Unverified Commit 86d8d958 authored by Thierry Volpiatto's avatar Thierry Volpiatto

Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

parents 5a62c4b4 6c9c45bf
Pipeline #4127 failed with stage
in 66 minutes and 25 seconds
......@@ -963,6 +963,10 @@ Display the changes that a ``pull'' operation will retrieve
@item C-x v O
Display the changes that will be sent by the next ``push'' operation
(@code{vc-log-outgoing}).
@item C-x v h
Display the history of changes made in the region of file visited by
the current buffer (@code{vc-region-history}).
@end table
@kindex C-x v l
......@@ -1068,20 +1072,20 @@ buffer. However, RCS, SCCS, CVS, and SRC do not support this feature.
@kindex C-x v h
@findex vc-region-history
A useful variant of examining changes is provided by the command
A useful variant of examining history of changes is provided by the command
@kbd{vc-region-history} (by default bound to @kbd{C-x v h}), which shows
a @file{*VC-history*} buffer with the history of changes to the region
of the current file between point and the mark (@pxref{Mark}). The
a @file{*VC-history*} buffer with the history of changes made in the region
of the current buffer's file between point and the mark (@pxref{Mark}). The
history of changes includes the commit log messages and also the
changes themselves in the Diff format.
Invoke this command after marking the region of the current file in
Invoke this command after marking in the current buffer the region in
whose changes you are interested. In the @file{*VC-history*} buffer
it pops up, you can use all of the commands available in the
@file{*vc-change-log*} buffer described above, and also the commands
defined by Diff mode (@pxref{Diff Mode}).
This command is currently available only with Git.
This command is currently available only with Git and Mercurial (hg).
@node VC Undo
@subsection Undoing Version Control Actions
......
......@@ -123,6 +123,9 @@ Objects that have no read syntax are presented like this
The printed representation of an interned symbol whose name is an
empty string (@pxref{Symbol Type}).
@item #'
This is a shortcut for @code{function}, see @ref{Anonymous Functions}.
@item #:
The printed representation of an uninterned symbol whose name is
@var{foo} is @samp{#:@var{foo}} (@pxref{Symbol Type}).
......
......@@ -222,7 +222,7 @@ The command-line argument '--socket-name' overrides it.
+++
*** Emacs and emacsclient now default to "$XDG_RUNTIME_DIR/emacs"
as the directory for client/server sockets, if Emacs is running
under an X Window System desktop that sets the 'XDG_RUNTIME_DIR'
on a platform or environment that sets the 'XDG_RUNTIME_DIR'
environment variable to indicate where session sockets should go.
To get the old, less-secure behavior, you can set the
'EMACS_SOCKET_NAME' environment variable to an appropriate value.
......@@ -926,6 +926,11 @@ with conflicts existed in earlier versions of Emacs, but incorrectly
never detected a conflict due to invalid assumptions about cached
values.
+++
*** The Hg (Mercurial) back-end now supports 'vc-region-history'.
The 'C-x v h' command now works in buffers that visit files controlled
by Hg.
+++
*** 'C-u C-x v D' ('vc-root-version-diff') prompts for two revisions
and compares their entire trees.
......
......@@ -1000,13 +1000,18 @@ Note that the MAX parameter is used so we can exit the parse early."
(forward-line 1)
(skip-chars-forward "\t ")))
(defun auth-source-netrc-looking-at-token ()
"Say whether the next think in the buffer is a token (password, etc).
Match data is altered to reflect the token."
(or (looking-at "'\\([^']*\\)'")
(looking-at "\"\\([^\"]*\\)\"")
(looking-at "\\([^ \t\n]+\\)")))
(defun auth-source-netrc-parse-one ()
"Read one thing from the current buffer."
(auth-source-netrc-parse-next-interesting)
(when (or (looking-at "'\\([^']*\\)'")
(looking-at "\"\\([^\"]*\\)\"")
(looking-at "\\([^ \t\n]+\\)"))
(when (auth-source-netrc-looking-at-token)
(forward-char (length (match-string 0)))
(prog1
(match-string-no-properties 1)
......@@ -2427,7 +2432,7 @@ passwords are revealed when point moved into the password.
(while (re-search-forward (format "\\(\\s-\\|^\\)\\(%s\\)\\s-+"
authinfo-hidden)
nil t)
(when (looking-at "[^\n\t ]+")
(when (auth-source-netrc-looking-at-token)
(let ((overlay (make-overlay (match-beginning 0) (match-end 0))))
(overlay-put overlay 'display (propertize "****"
'face 'warning))
......
......@@ -53,6 +53,7 @@ to make output that `read' can handle, whenever this is possible."
;;;###autoload
(defun pp-buffer ()
"Prettify the current buffer with printed representation of a Lisp object."
(interactive)
(goto-char (point-min))
(while (not (eobp))
;; (message "%06d" (- (point-max) (point)))
......
......@@ -1992,7 +1992,7 @@ increase the score of each group you read."
"x" gnus-summary-limit-to-unread
"s" gnus-summary-isearch-article
"\t" gnus-summary-button-forward
[backtab] gnus-summary-widget-backward
[backtab] gnus-summary-button-backward
"w" gnus-summary-browse-url
"t" gnus-summary-toggle-header
"g" gnus-summary-show-article
......@@ -2161,7 +2161,7 @@ increase the score of each group you read."
"g" gnus-summary-show-article
"s" gnus-summary-isearch-article
"\t" gnus-summary-button-forward
[backtab] gnus-summary-widget-backward
[backtab] gnus-summary-button-backward
"w" gnus-summary-browse-url
"P" gnus-summary-print-article
"S" gnus-sticky-article
......
......@@ -4123,6 +4123,7 @@ The usage of ARG is defined by the instance that called Message.
It should typically alter the sending method in some way or other."
(interactive "P")
(let ((buf (current-buffer))
(position (point-marker))
(actions message-exit-actions))
(when (and (message-send arg)
(buffer-live-p buf))
......@@ -4130,7 +4131,13 @@ It should typically alter the sending method in some way or other."
(if message-kill-buffer-on-exit
(kill-buffer buf))
(message-do-actions actions)
t)))
t)
;; Restore the point in the message buffer.
(when (buffer-live-p buf)
(save-window-excursion
(switch-to-buffer buf)
(set-window-point nil position)
(set-marker position nil)))))
(defun message-dont-send ()
"Don't send the message you have been editing.
......
......@@ -158,6 +158,10 @@ or \"ffmpeg\") is installed."
(let ((map (make-sparse-keymap)))
(define-key map "-" 'image-decrease-size)
(define-key map "+" 'image-increase-size)
(define-key map [C-wheel-down] 'image-mouse-decrease-size)
(define-key map [C-mouse-5] 'image-mouse-decrease-size)
(define-key map [C-wheel-up] 'image-mouse-increase-size)
(define-key map [C-mouse-4] 'image-mouse-increase-size)
(define-key map "r" 'image-rotate)
(define-key map "o" 'image-save)
map))
......@@ -476,6 +480,7 @@ Image file names that are not absolute are searched for in the
;; If we have external image conversion switched on (for exotic,
;; non-native image formats), then we convert the file.
(when (eq type 'image-convert)
(require 'image-converter)
(setq file-or-data (image-convert file-or-data data-format)
type 'png
data-p t)))
......@@ -1007,24 +1012,40 @@ has no effect."
(imagemagick-register-types)
(defun image-increase-size (n)
(defun image-increase-size (&optional n)
"Increase the image size by a factor of N.
If N is 3, then the image size will be increased by 30%. The
default is 20%."
(interactive "P")
(image--change-size (if n
(1+ (/ n 10.0))
(1+ (/ (prefix-numeric-value n) 10.0))
1.2)))
(defun image-decrease-size (n)
(defun image-decrease-size (&optional n)
"Decrease the image size by a factor of N.
If N is 3, then the image size will be decreased by 30%. The
default is 20%."
(interactive "P")
(image--change-size (if n
(- 1 (/ n 10.0))
(- 1 (/ (prefix-numeric-value n) 10.0))
0.8)))
(defun image-mouse-increase-size (&optional event)
"Increase the image size using the mouse."
(interactive "e")
(when (listp event)
(save-window-excursion
(posn-set-point (event-start event))
(image-increase-size))))
(defun image-mouse-decrease-size (&optional event)
"Decrease the image size using the mouse."
(interactive "e")
(when (listp event)
(save-window-excursion
(posn-set-point (event-start event))
(image-decrease-size))))
(defun image--get-image ()
"Return the image at point."
(let ((image (get-char-property (point) 'display)))
......
......@@ -70,14 +70,18 @@ is a string, it should be a MIME format string like
(defun image-convert (image &optional image-format)
"Convert IMAGE file to the PNG format.
IMAGE can either be a file name, which will make the return value
a string with the image data.
IMAGE can either be a file name or image data.
If IMAGE-FORMAT is non-nil, IMAGE is a string containing the
image data, and IMAGE-FORMAT is a symbol with a MIME format name
like \"image/webp\".
To pass in image data, IMAGE should a string containing the image
data, and IMAGE-FORMAT should be a symbol with a MIME format name
like \"image/webp\". For instance:
IMAGE can also be an image object as returned by `create-image'."
(image-convert data-string 'image/bmp)
IMAGE can also be an image object as returned by `create-image'.
This function converts the image to PNG, and the converted image
data is returned as a string."
;; Find an installed image converter.
(unless image-converter
(image-converter--find-converter))
......
......@@ -4958,8 +4958,6 @@ name of a process or buffer, or nil to default to the current buffer."
(defun tramp-unload-tramp ()
"Discard Tramp from loading remote files."
(interactive)
;; ange-ftp settings must be re-enabled.
(tramp-compat-funcall 'tramp-ftp-enable-ange-ftp)
;; Maybe it's not loaded yet.
(ignore-errors (unload-feature 'tramp 'force)))
......
......@@ -9,7 +9,7 @@
;; Keywords: languages
;; The "Version" is the date followed by the decimal rendition of the Git
;; commit hex.
;; Version: 2019.11.11.038630457
;; Version: 2019.11.21.248091482
;; Yoni Rabkin <yoni@rabkins.net> contacted the maintainer of this
;; file on 19/3/2008, and the maintainer agreed that when a bug is
......@@ -124,7 +124,7 @@
;;
;; This variable will always hold the version number of the mode
(defconst verilog-mode-version "2019-11-11-24d7439-vpo-GNU"
(defconst verilog-mode-version "2019-11-21-ec9935a-vpo-GNU"
"Version of this Verilog mode.")
(defconst verilog-mode-release-emacs t
"If non-nil, this version of Verilog mode was released with Emacs itself.")
......@@ -809,9 +809,7 @@ The name of the function or case will be set between the braces."
(defcustom verilog-auto-ignore-concat nil
"Non-nil means ignore signals in {...} concatenations for AUTOWIRE etc.
This will exclude signals referenced as pin connections in {...}
from AUTOWIRE, AUTOOUTPUT and friends. This flag should be set
for backward compatibility only and not set in new designs; it
may be removed in future versions."
or (...) from AUTOWIRE, AUTOOUTPUT and friends."
:group 'verilog-mode-actions
:type 'boolean)
(put 'verilog-auto-ignore-concat 'safe-local-variable 'verilog-booleanp)
......@@ -8862,11 +8860,10 @@ Return an array of [outputs inouts inputs wire reg assign const]."
;; {..., a, b} requires us to recurse on a,b
;; To support {#{},{#{a,b}} we'll just split everything on [{},]
((string-match "^\\s-*{\\(.*\\)}\\s-*$" expr)
(unless verilog-auto-ignore-concat
(let ((mlst (split-string (match-string 1 expr) "[{},]"))
mstr)
(while (setq mstr (pop mlst))
(verilog-read-sub-decls-expr submoddecls par-values comment port mstr)))))
(let ((mlst (split-string (match-string 1 expr) "[{},]"))
mstr)
(while (setq mstr (pop mlst))
(verilog-read-sub-decls-expr submoddecls par-values comment port mstr))))
(t
(let (sig vec multidim mem)
;; Remove leading reduction operators, etc
......@@ -8942,7 +8939,10 @@ Inserts the list of signals found, using submodi to look up each port."
;; We intentionally ignore (non-escaped) signals with .s in them
;; this prevents AUTOWIRE etc from noticing hierarchical sigs.
(when port
(cond ((looking-at "\\([a-zA-Z_][a-zA-Z_0-9]*\\)\\s-*)")
(cond ((and verilog-auto-ignore-concat
(looking-at "[({]"))
nil) ; {...} or (...) historically ignored with auto-ignore-concat
((looking-at "\\([a-zA-Z_][a-zA-Z_0-9]*\\)\\s-*)")
(verilog-read-sub-decls-sig
submoddecls par-values comment port
(verilog-string-remove-spaces (match-string-no-properties 1)) ; sig
......
......@@ -1295,9 +1295,9 @@ This requires git 1.8.4 or later, for the \"-L\" option of \"git log\"."
;; to the HEAD version of the file, not to the current state of the file.
;; So we need to look at all the local changes and adjust lfrom/lto
;; accordingly.
;; FIXME: Maybe this should be done in vc.el (i.e. for all backends), but
;; since Git is the only backend to support this operation so far, it's hard
;; to tell.
;; FIXME: Maybe this should be done in vc.el (i.e. for other backends),
;; but since Git is one of the two backends that support this operation
;; so far, it's hard to tell; hg doesn't need this.
(with-temp-buffer
(vc-call-backend 'git 'diff file "HEAD" nil (current-buffer))
(goto-char (point-min))
......
......@@ -483,6 +483,55 @@ If LIMIT is non-nil, show no more than this many entries."
(autoload 'vc-switches "vc")
(defun vc-hg-region-history (file buffer lfrom lto)
"Insert into BUFFER the history of FILE for lines LFROM to LTO.
This requires hg 4.4 or later, for the \"-L\" option of \"hg log\"."
(vc-hg-command buffer 'async nil "log" "-f" "-p" "-L"
(format "%s,%d:%d" (file-relative-name file) lfrom lto)))
(require 'diff-mode)
(defvar vc-hg-region-history-mode-map
(let ((map (make-composed-keymap
nil (make-composed-keymap
(list diff-mode-map vc-hg-log-view-mode-map)))))
map))
(defvar vc-hg--log-view-long-font-lock-keywords nil)
(defvar font-lock-keywords)
(defvar vc-hg-region-history-font-lock-keywords
'((vc-hg-region-history-font-lock)))
(defun vc-hg-region-history-font-lock (limit)
(let ((in-diff (save-excursion
(beginning-of-line)
(or (looking-at "^\\(?:diff\\|changeset\\)\\>")
(re-search-backward "^\\(?:diff\\|changeset\\)\\>"
nil t))
(eq ?d (char-after (match-beginning 0))))))
(while
(let ((end (save-excursion
(if (re-search-forward "\n\\(diff\\|changeset\\)\\>"
limit t)
(match-beginning 1)
limit))))
(let ((font-lock-keywords (if in-diff diff-font-lock-keywords
vc-hg--log-view-long-font-lock-keywords)))
(font-lock-fontify-keywords-region (point) end))
(goto-char end)
(prog1 (< (point) limit)
(setq in-diff (eq ?d (char-after))))))
nil))
(define-derived-mode vc-hg-region-history-mode
vc-hg-log-view-mode "Hg-Region-History"
"Major mode to browse Hg's \"log -p\" output."
(setq-local vc-hg--log-view-long-font-lock-keywords
log-view-font-lock-keywords)
(setq-local font-lock-defaults
(cons 'vc-hg-region-history-font-lock-keywords
(cdr font-lock-defaults))))
(defun vc-hg-diff (files &optional oldvers newvers buffer _async)
"Get a difference report using hg between two revisions of FILES."
(let* ((firstfile (car files))
......
......@@ -414,7 +414,7 @@ only when the upper directory of the renamed file is watched. */)
}
/* Open file. */
file = ENCODE_FILE (file);
Lisp_Object encoded_file = ENCODE_FILE (file);
oflags = O_NONBLOCK;
#if O_EVTONLY
oflags |= O_EVTONLY;
......@@ -426,7 +426,7 @@ only when the upper directory of the renamed file is watched. */)
#else
oflags |= O_NOFOLLOW;
#endif
fd = emacs_open (SSDATA (file), oflags, 0);
fd = emacs_open (SSDATA (encoded_file), oflags, 0);
if (fd == -1)
report_file_error ("File cannot be opened", file);
......
......@@ -167,7 +167,7 @@ maybe_disable_address_randomization (int argc, char **argv)
{
/* If dumping via unexec, ASLR must be disabled, as otherwise
data may be scattered and undumpable as a simple executable.
If pdumping, disabling ASLR makes the .pdmp file reproducible. */
If pdumping, disabling ASLR lessens differences in the .pdmp file. */
bool disable_aslr = will_dump_p ();
# ifdef __PPC64__
disable_aslr = true;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment