commit 4a1e97bea96a3ed075cfbc09f4268ba5be9e44fd (HEAD, refs/remotes/origin/master) Author: Utkarsh Singh Date: Tue Jun 1 14:33:01 2021 +0530 New user option for Git log switches * lisp/vc/vc-git.el (vc-git-diff-switches): New defcustom. (vc-git-print-log): Use it. * etc/NEWS: Announce the new option. Copyright-paperwork-exempt: yes diff --git a/etc/NEWS b/etc/NEWS index 60226f0a3e..3dca94f97b 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -880,6 +880,10 @@ If non-nil, only branches and remotes are considered when doing completion over Git branch names. The default is nil, which causes tags to be considered as well. +--- +*** New user option 'vc-git-log-switches'. +String or list of strings specifying switches for Git log under VC. + ** Gnus +++ diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index e37c09df7c..bd29b88e87 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -127,6 +127,13 @@ If nil, use the value of `vc-annotate-switches'. If t, use no switches." (repeat :tag "Argument List" :value ("") string)) :version "25.1") +(defcustom vc-git-log-switches t + "String or list of strings specifying switches for Git log under VC." + :type '(choice (const :tag "None" t) + (string :tag "Argument String") + (repeat :tag "Argument List" :value ("") string)) + :version "28.1") + (defcustom vc-git-resolve-conflicts t "When non-nil, mark conflicted file as resolved upon saving. That is performed after all conflict markers in it have been @@ -1131,6 +1138,8 @@ This prompts for a branch to merge from." :type 'boolean :version "26.1") +(autoload 'vc-switches "vc") + (defun vc-git-print-log (files buffer &optional shortlog start-revision limit) "Print commit log associated with FILES into specified BUFFER. If SHORTLOG is non-nil, use a short format based on `vc-git-root-log-format'. @@ -1164,6 +1173,7 @@ If LIMIT is a revision string, use it as an end-revision." ,(format "--pretty=tformat:%s" (car vc-git-root-log-format)) "--abbrev-commit")) + (vc-switches 'git 'log) (when (numberp limit) (list "-n" (format "%s" limit))) (when start-revision @@ -1385,8 +1395,6 @@ This requires git 1.8.4 or later, for the \"-L\" option of \"git log\"." samp coding-system-for-read t))) (setq coding-system-for-read 'undecided))) -(autoload 'vc-switches "vc") - (defun vc-git-diff (files &optional rev1 rev2 buffer _async) "Get a difference report using Git between two revisions of FILES." (let (process-file-side-effects commit 90f54aad5e978653f5a590cdfb68090a0f9a25fc Author: Harald Jörg Date: Tue Jun 8 23:23:25 2021 +0200 ; perl-mode.el: Detect regexes immediately after "|&" * lisp/progmodes/perl-mode.el (perl-syntax-propertize-function): Add "|&" to the list of characters after which a slash starts a regular expression (Bug#23992). * test/lisp/progmodes/cperl-mode-tests.el (cperl-test-ppss): Correct the docstring. (cperl-test-bug-23992): New test for Bug#23992. (cperl-test-bug-42168): Adapt inline comments to the current code. * test/lisp/progmodes/cperl-mode-resources/cperl-bug-23992.pl: Resource file with example code from the bug report. diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index fd23683bc0..d13c9053d5 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el @@ -285,7 +285,7 @@ (put-text-property (match-beginning 2) (match-end 2) 'syntax-table (string-to-syntax "\"")) (perl-syntax-propertize-special-constructs end))))) - ("\\(^\\|[?:.,;=!~({[ \t]\\)\\([msy]\\|q[qxrw]?\\|tr\\)\\>\\s-*\\(?:\\([^])}>= \n\t]\\)\\|\\(?3:=\\)[^>]\\)" + ("\\(^\\|[?:.,;=|&!~({[ \t]\\)\\([msy]\\|q[qxrw]?\\|tr\\)\\>\\s-*\\(?:\\([^])}>= \n\t]\\)\\|\\(?3:=\\)[^>]\\)" ;; Nasty cases: ;; /foo/m $a->m $#m $m @m %m ;; \s (appears often in regexps). diff --git a/test/lisp/progmodes/cperl-mode-resources/cperl-bug-23992.pl b/test/lisp/progmodes/cperl-mode-resources/cperl-bug-23992.pl new file mode 100644 index 0000000000..1db639c6aa --- /dev/null +++ b/test/lisp/progmodes/cperl-mode-resources/cperl-bug-23992.pl @@ -0,0 +1,10 @@ +# Test file for Bug#23992 +# +# The "||" case is directly from the report, +# the "&&" case has been added for symmetry. + +s/LEFT/L/g || s/RIGHT/R/g || s/aVALUE\D+//g; +s/LEFT/L/g||s/RIGHT/R/g||s/aVALUE\D+//g; + +s/LEFT/L/g && s/RIGHT/R/g && s/aVALUE\D+//g; +s/LEFT/L/g&&s/RIGHT/R/g&&s/aVALUE\D+//g; diff --git a/test/lisp/progmodes/cperl-mode-tests.el b/test/lisp/progmodes/cperl-mode-tests.el index 7cdfa45d6f..036e20d7cc 100644 --- a/test/lisp/progmodes/cperl-mode-tests.el +++ b/test/lisp/progmodes/cperl-mode-tests.el @@ -37,7 +37,7 @@ ;;; Utilities (defun cperl-test-ppss (text regexp) - "Return the `syntax-ppss' of the first character matched by REGEXP in TEXT." + "Return the `syntax-ppss' after the last character matched by REGEXP in TEXT." (interactive) (with-temp-buffer (insert text) @@ -377,6 +377,26 @@ documentation it does the right thing anyway." (cperl-indent-command) (forward-line 1)))) +(ert-deftest cperl-test-bug-23992 () + "Verify that substitutions are fontified directly after \"|&\". +Regular expressions are strings in both perl-mode and cperl-mode." + (with-temp-buffer + (insert-file-contents (ert-resource-file "cperl-bug-23992.pl")) + (funcall cperl-test-mode) + (goto-char (point-min)) + ;; "or" operator, with spaces + (search-forward "RIGHT") + (should (nth 3 (syntax-ppss))) + ;; "or" operator, without spaces + (search-forward "RIGHT") + (should (nth 3 (syntax-ppss))) + ;; "and" operator, with spaces + (search-forward "RIGHT") + (should (nth 3 (syntax-ppss))) + ;; "and" operator, without spaces + (search-forward "RIGHT") + (should (nth 3 (syntax-ppss))))) + (ert-deftest cperl-test-bug-28650 () "Verify that regular expressions are recognized after 'return'. The test uses the syntax property \"inside a string\" for the @@ -448,14 +468,14 @@ If seen as regular expression, then the slash is displayed using font-lock-constant-face. If seen as a division, then it doesn't have a face property." :tags '(:fontification) - ;; The next two Perl expressions have divisions. Perl "punctuation" - ;; operators don't get a face. + ;; The next two Perl expressions have divisions. The slash does not + ;; start a string. (let ((code "{ $a++ / $b }")) (should (equal (nth 8 (cperl-test-ppss code "/")) nil))) (let ((code "{ $a-- / $b }")) (should (equal (nth 8 (cperl-test-ppss code "/")) nil))) - ;; The next two Perl expressions have regular expressions. The - ;; delimiter of a RE is fontified with font-lock-constant-face. + ;; The next two Perl expressions have regular expressions. The slash + ;; starts a string. (let ((code "{ $a+ / $b } # /")) (should (equal (nth 8 (cperl-test-ppss code "/")) 7))) (let ((code "{ $a- / $b } # /")) commit 9625e3026b516cba3117d0096fe33ad7e523482b Author: Juri Linkov Date: Tue Jun 8 19:54:17 2021 +0300 * lisp/simple.el (yank-from-kill-ring): Add edited string to the kill-ring. (Bug#48478) diff --git a/lisp/simple.el b/lisp/simple.el index a0adaff431..90dd8f1c34 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -5781,8 +5781,9 @@ When called from Lisp, insert STRING like `insert-for-yank' does." (insert-for-yank string) (when yank-from-kill-ring-rotate (let ((pos (seq-position kill-ring string))) - (when pos - (setq kill-ring-yank-pointer (nthcdr pos kill-ring))))) + (if pos + (setq kill-ring-yank-pointer (nthcdr pos kill-ring)) + (kill-new string)))) (if (consp arg) ;; Swap point and mark like in `yank' and `yank-pop'. (goto-char (prog1 (mark t) commit 15f4237303f304ef4e40cdf692570e1ef1c033b5 Author: Juri Linkov Date: Tue Jun 8 19:51:51 2021 +0300 Sync overlay code in minibuffer-message and set-minibuffer-message (bug#48669) * lisp/minibuffer.el (minibuffer-message): Copy more overlay positioning code from set-minibuffer-message. (minibuffer--message-overlay-pos): Mention both minibuffer-message and set-minibuffer-message in the docstring. (set-minibuffer-message): Use 'cursor t' instead of 1. diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index d5a0118b7c..d09a348211 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -741,14 +741,16 @@ If ARGS are provided, then pass MESSAGE through `format-message'." ;; Don't overwrite the face properties the caller has set (text-properties-at 0 message)) (setq message (apply #'propertize message minibuffer-message-properties))) - (let ((ol (make-overlay (point-max) (point-max) nil t t)) - ;; A quit during sit-for normally only interrupts the sit-for, - ;; but since minibuffer-message is used at the end of a command, - ;; at a time when the command has virtually finished already, a C-g - ;; should really cause an abort-recursive-edit instead (i.e. as if - ;; the C-g had been typed at top-level). Binding inhibit-quit here - ;; is an attempt to get that behavior. - (inhibit-quit t)) + ;; Put overlay either on `minibuffer-message' property, or at EOB. + (let* ((ovpos (minibuffer--message-overlay-pos)) + (ol (make-overlay ovpos ovpos nil t t)) + ;; A quit during sit-for normally only interrupts the sit-for, + ;; but since minibuffer-message is used at the end of a command, + ;; at a time when the command has virtually finished already, a C-g + ;; should really cause an abort-recursive-edit instead (i.e. as if + ;; the C-g had been typed at top-level). Binding inhibit-quit here + ;; is an attempt to get that behavior. + (inhibit-quit t)) (unwind-protect (progn (unless (zerop (length message)) @@ -757,6 +759,12 @@ If ARGS are provided, then pass MESSAGE through `format-message'." ;; before or after the string, so let's spoon-feed it the pos. (put-text-property 0 1 'cursor t message)) (overlay-put ol 'after-string message) + ;; Make sure the overlay with the message is displayed before + ;; any other overlays in that position, in case they have + ;; resize-mini-windows set to nil and the other overlay strings + ;; are too long for the mini-window width. This makes sure the + ;; temporary message will always be visible. + (overlay-put ol 'priority 1100) (sit-for (or minibuffer-message-timeout 1000000))) (delete-overlay ol))))) @@ -778,8 +786,10 @@ and `clear-minibuffer-message' called automatically via (defvar minibuffer-message-overlay nil) (defun minibuffer--message-overlay-pos () - "Return position where `set-minibuffer-message' shall put message overlay." - ;; Starting from point, look for non-nil 'minibuffer-message' + "Return position where minibuffer message functions shall put message overlay. +The minibuffer message functions include `minibuffer-message' and +`set-minibuffer-message'." + ;; Starting from point, look for non-nil `minibuffer-message' ;; property, and return its position. If none found, return the EOB ;; position. (let* ((pt (point)) @@ -824,7 +834,7 @@ via `set-message-function'." ;; The current C cursor code doesn't know to use the overlay's ;; marker's stickiness to figure out whether to place the cursor ;; before or after the string, so let's spoon-feed it the pos. - (put-text-property 0 1 'cursor 1 message)) + (put-text-property 0 1 'cursor t message)) (overlay-put minibuffer-message-overlay 'after-string message) ;; Make sure the overlay with the message is displayed before ;; any other overlays in that position, in case they have commit bef3070ab8dfbb8b68c08f0f0aa03532311f3dd5 Merge: 6456a67b5d 37f4457994 Author: Glenn Morris Date: Tue Jun 8 07:50:36 2021 -0700 Merge from origin/emacs-27 37f4457994 (origin/emacs-27) ; Fix typo in dynamic module functions d... f7d4bbceee ; * src/composite.h: Improve comments for LGSTRING and LGL... commit 6456a67b5d62fb2682bf163ade8ca1f65554a2aa Merge: 4888addd30 bef00aa137 Author: Glenn Morris Date: Tue Jun 8 07:50:36 2021 -0700 ; Merge from origin/emacs-27 The following commit was skipped: bef00aa137 (emacs-27) ; Auto-commit of loaddefs files. commit 4888addd3061c2034ce0ef8bfdb2ce879fb355b0 Author: Alex Bochannek Date: Tue Jun 8 13:34:24 2021 +0200 Change the Gnus default to use `#' to toggle the process mark * doc/misc/gnus.texi (Marking Groups, Topic Commands): (Setting Process Marks, Pick and Read): Document the new default. * lisp/gnus/gnus-group.el (gnus-group-make-menu-bar): Update menu. * lisp/gnus/gnus-sum.el (gnus-summary-make-menu-bar): Update menu. * lisp/gnus/gnus-topic.el (gnus-topic-make-menu-bar): Update menu. * lisp/gnus/gnus.el (gnus-process-mark-toggle): Change default. diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index 11bcfc16ae..32ba5aee92 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi @@ -2583,27 +2583,28 @@ with the process mark and then execute the command. @itemx M m @kindex M m @r{(Group)} @findex gnus-group-mark-group -Set the mark on the current group (@code{gnus-group-mark-group}).@* -If @code{gnus-process-mark-toggle} is non-@code{nil}, toggle the -existing process mark for the current group. +Toggle the process mark for the current group +(@code{gnus-group-mark-group}).@* +If @code{gnus-process-mark-toggle} is @code{nil}, set the process mark +for the current group. @item M-# @kindex M-# @r{(Group)} @itemx M u @kindex M u @r{(Group)} @findex gnus-group-unmark-group -Remove the mark from the current group +Remove the process mark, if any, from the current group (@code{gnus-group-unmark-group}). @item M U @kindex M U @r{(Group)} @findex gnus-group-unmark-all-groups -Remove the mark from all groups (@code{gnus-group-unmark-all-groups}). +Remove the process mark from all groups (@code{gnus-group-unmark-all-groups}). @item M w @kindex M w @r{(Group)} @findex gnus-group-mark-region -Mark all groups between point and mark (@code{gnus-group-mark-region}). +Mark groups in region (@code{gnus-group-mark-region}). @item M b @kindex M b @r{(Group)} @@ -4043,11 +4044,11 @@ Toggle hiding empty topics @item T # @kindex T # @r{(Topic)} @findex gnus-topic-mark-topic -Mark all groups in the current topic with the process mark +Toggle the process mark for all groups in the current topic (@code{gnus-topic-mark-topic}). This command works recursively on sub-topics unless given a prefix.@* -If @code{gnus-process-mark-toggle} is non-@code{nil}, toggle the -existing process mark for the current topic. +If @code{gnus-process-mark-toggle} is @code{nil}, set the process mark +for the current topic. @item T M-# @kindex T M-# @r{(Topic)} @@ -6621,10 +6622,10 @@ articles into the cache. For more information, @kindex # @r{(Summary)} @kindex M P p @r{(Summary)} @findex gnus-summary-mark-as-processable -Mark the current article with the process mark +Toggle the process mark for the current article (@code{gnus-summary-mark-as-processable}).@* -If @code{gnus-process-mark-toggle} is non-@code{nil}, toggle the -existing process mark for the current article. +If @code{gnus-process-mark-toggle} is @code{nil}, set the process mark +for the current article. @item M P u @itemx M-# @@ -10568,15 +10569,15 @@ Here are the available keystrokes when using pick mode: @item . @kindex . @r{(Pick)} @findex gnus-pick-article-or-thread -Pick the article or thread on the current line -(@code{gnus-pick-article-or-thread}). If the variable +Pick the article or thread on the current line or unpick it if is +already picked (@code{gnus-pick-article-or-thread}). If the variable @code{gnus-thread-hide-subtree} is true, then this key selects the entire thread when used at the first article of the thread. Otherwise, it selects just the article. If given a numerical prefix, go to that thread or article and pick it. (The line number is normally displayed at the beginning of the summary pick lines.) If -@code{gnus-process-mark-toggle} is non-@code{nil}, this key will -unpick an already picked article. +@code{gnus-process-mark-toggle} is @code{nil}, this key will pick an +article or thread. @item @key{SPC} @kindex SPC @r{(Pick)} diff --git a/etc/NEWS b/etc/NEWS index eadf3e7948..60226f0a3e 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -882,10 +882,15 @@ tags to be considered as well. ** Gnus ++++ +*** The '#' command in the Group and Summary buffer now toggles, +instead of sets, the process mark. + +++ *** New user option 'gnus-process-mark-toggle'. -If non-nil, the `#' command in the Group and Summary buffers will -toggle instead of setting the process mark. +If non-nil (the default), the `#' command in the Group and Summary +buffers will toggle, instead of set, the process mark. + +++ *** New user option 'gnus-registry-register-all'. diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index 06d1313d37..c8b95d9185 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el @@ -894,7 +894,7 @@ simple manner." ["Sort by real name" gnus-group-sort-selected-groups-by-real-name (not (gnus-topic-mode-p))]) ("Mark" - ["Set/Toggle mark" gnus-group-mark-group + ["Toggle/Set mark" gnus-group-mark-group (and (gnus-group-group-name) (not (memq (gnus-group-group-name) gnus-group-marked)))] ["Remove mark" gnus-group-unmark-group diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 3279c3221e..bcd76dda29 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -2774,7 +2774,7 @@ gnus-summary-show-article-from-menu-as-charset-%s" cs)))) ["Hide marked" gnus-summary-limit-exclude-marks t] ["Show expunged" gnus-summary-limit-include-expunged t]) ("Process Mark" - ["Set/Toggle mark" gnus-summary-mark-as-processable t] + ["Toggle/Set mark" gnus-summary-mark-as-processable t] ["Remove mark" gnus-summary-unmark-as-processable t] ["Remove all marks" gnus-summary-unmark-all-processable t] ["Invert marks" gnus-uu-invert-processable t] diff --git a/lisp/gnus/gnus-topic.el b/lisp/gnus/gnus-topic.el index c0484622f4..b974dff372 100644 --- a/lisp/gnus/gnus-topic.el +++ b/lisp/gnus/gnus-topic.el @@ -1112,7 +1112,7 @@ articles in the topic and its subtopics." ["Delete" gnus-topic-delete t] ["Rename..." gnus-topic-rename t] ["Create..." gnus-topic-create-topic t] - ["Set/Toggle mark" gnus-topic-mark-topic t] + ["Toggle/Set mark" gnus-topic-mark-topic t] ["Indent" gnus-topic-indent t] ["Sort" gnus-topic-sort-topics t] ["Previous topic" gnus-topic-goto-previous-topic t] diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el index 21b5f31c14..7dde799a5b 100644 --- a/lisp/gnus/gnus.el +++ b/lisp/gnus/gnus.el @@ -1183,8 +1183,8 @@ newsgroups." :group 'gnus-summary-marks :type 'character) -(defcustom gnus-process-mark-toggle nil - "If non-nil the process mark command toggles the process mark." +(defcustom gnus-process-mark-toggle t + "If nil the process mark command only sets the process mark." :version "28.1" :group 'gnus-summary :group 'gnus-group-various commit 0d42c92978491588a3ad67ec59a5e105e8f1ab3a Author: Stephen Gildea Date: Mon Jun 7 21:47:24 2021 -0700 MH-E: do not look for MH variants in relative directories * lisp/mh-e/mh-e.el (mh-variants): Do not examine relative directories in exec-path (e.g., "."); these won't have MH installed. Also, file-chase-links is not robust with relative names: you cannot pass it a relative name that is a symlink. diff --git a/lisp/mh-e/mh-e.el b/lisp/mh-e/mh-e.el index 1aac337415..e935cfda97 100644 --- a/lisp/mh-e/mh-e.el +++ b/lisp/mh-e/mh-e.el @@ -738,8 +738,11 @@ is described by the variable `mh-variants'." ;; Make a unique list of directories, keeping the given order. ;; We don't want the same MH variant to be listed multiple times. (cl-loop for dir in (append mh-path mh-sys-path exec-path) do - (setq dir (file-chase-links (directory-file-name dir))) - (cl-pushnew dir list-unique :test #'equal)) + ;; skip relative dirs, typically "." + (if (file-name-absolute-p dir) + (progn + (setq dir (file-chase-links (directory-file-name dir))) + (cl-pushnew dir list-unique :test #'equal)))) (cl-loop for dir in (nreverse list-unique) do (when (and dir (file-accessible-directory-p dir)) (let ((variant (mh-variant-info dir))) commit 19ef864084c9765b7736851b46dcbcbe3dbfcf27 Author: Stefan Kangas Date: Tue Jun 8 01:58:18 2021 +0200 Fix an example in ERC docs * doc/misc/erc.texi (Connecting): * lisp/erc/erc.el (erc, erc-tls): Fix example to use J. Random Hacker instead of Harry S. Truman. diff --git a/doc/misc/erc.texi b/doc/misc/erc.texi index 213b69e1ef..77a19a4a59 100644 --- a/doc/misc/erc.texi +++ b/doc/misc/erc.texi @@ -518,7 +518,7 @@ That is, if called with the following arguments, @var{server} and for the values of the other parameters. @example -(erc :server "chat.freenode.net" :full-name "Harry S Truman") +(erc :server "chat.freenode.net" :full-name "J. Random Hacker") @end example @end defun @@ -545,7 +545,7 @@ for the values of the other parameters, and @code{client-certificate} will be @code{nil}. @example -(erc-tls :server "chat.freenode.net" :full-name "Harry S Truman") +(erc-tls :server "chat.freenode.net" :full-name "J. Random Hacker") @end example To use a certificate with @code{erc-tls}, specify the optional diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index 547056361a..52452043e9 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -2225,7 +2225,7 @@ Non-interactively, it takes the keyword arguments That is, if called with - (erc :server \"chat.freenode.net\" :full-name \"Harry S Truman\") + (erc :server \"chat.freenode.net\" :full-name \"J. Random Hacker\") then the server and full-name will be set to those values, whereas `erc-compute-port' and `erc-compute-nick' will be invoked @@ -2260,7 +2260,7 @@ Non-interactively, it takes the keyword arguments That is, if called with - (erc-tls :server \"chat.freenode.net\" :full-name \"Harry S Truman\") + (erc-tls :server \"chat.freenode.net\" :full-name \"J. Random Hacker\") then the server and full-name will be set to those values, whereas `erc-compute-port' and `erc-compute-nick' will be invoked commit 27366fffbb906d7105bbec66facfcdb49718b9d8 Author: Stefan Kangas Date: Tue May 18 19:03:36 2021 +0200 * doc/man/emacs.1.in: Minor fixes. diff --git a/doc/man/emacs.1.in b/doc/man/emacs.1.in index da912bd511..290be604e3 100644 --- a/doc/man/emacs.1.in +++ b/doc/man/emacs.1.in @@ -197,7 +197,7 @@ searches for Lisp files. .\" START DELETING HERE IF YOU'RE NOT USING X .SS Using Emacs with X .I Emacs -has been tailored to work well with the X window system. +has been tailored to work well with the X Window System. If you run .I Emacs from under X windows, it will create its own X window to @@ -566,7 +566,7 @@ distribution. /usr/local/share/info \(em files for the Info documentation browser. The complete text of the Emacs reference manual is included in a convenient tree structured form. -Also includes the Emacs Lisp Reference Manual, useful to anyone +This includes the Emacs Lisp Reference Manual, useful to anyone wishing to write programs in the Emacs Lisp extension language, and the Introduction to Programming in Emacs Lisp. commit f7d98dbba0dc7c7e9fea63d39fe88aefa4e9f66c Author: Alan Third Date: Mon Jun 7 23:13:33 2021 +0100 Revert "src/nsterm.m: fix window tabbing on macOS" This reverts commit 2207f9adccc0411b7ad73a3703f16250d7f8e139. diff --git a/etc/NEWS b/etc/NEWS index 64b39d737a..eadf3e7948 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -3234,14 +3234,6 @@ The new variable 'xwidget-webkit-download-dir' says where to download to. 'module-file-suffix' now has the value ".dylib" on macOS, but the ".so" suffix is supported as well. -+++ -** On macOS, Emacs now supports native tabs (in macOS 10.12 and later). -Native tabbing behavior is specified system-wide via System -Preferences, under under "General => Prefer tabs when opening -documents". In macOS versions 10.15 and earlier, this option is -located under Dock instead. Note that this feature is unrelated to -the Emacs 'tab-bar-mode'. - +++ ** On MS-Windows, Emacs can now toggle the IME. A new function 'w32-set-ime-open-status' can now be used to disable diff --git a/src/nsterm.m b/src/nsterm.m index 11b02f1726..f6168243a4 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -7628,6 +7628,14 @@ - (instancetype) initFrameFromEmacs: (struct frame *)f selector:@selector (viewDidResize:) name:NSViewFrameDidChangeNotification object:nil]; + /* macOS Sierra automatically enables tabbed windows. We can't + allow this to be enabled until it's available on a Free system. + Currently it only happens by accident and is buggy anyway. */ +#ifdef NS_IMPL_COCOA + if ([win respondsToSelector: @selector(setTabbingMode:)]) + [win setTabbingMode: NSWindowTabbingModeDisallowed]; +#endif + ns_window_num++; return self; } commit fcc827619f2cdac9d574f49e08ce4e5be41daf0a Author: Michael Albinus Date: Mon Jun 7 20:41:30 2021 +0200 Improve support of remote files in browse-url.el * etc/NEWS: Mention support of remote file browsing. * lisp/net/browse-url.el (browse-url-of-buffer): Revert last change. (browse-url-of-file): Use temporary file in case of remote file. (Bug#48397) diff --git a/etc/NEWS b/etc/NEWS index ff06a13a98..64b39d737a 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1599,6 +1599,11 @@ symbol property to the browsing commands. With a new command 'browse-url-with-browser-kind', an URL can explicitly be browsed with either an internal or external browser. +--- +*** Support for browsing of remote files. +If a remote file is taken, a local temporary copy of that file is +passed to the browser. + *** Support for the conkeror browser is now obsolete. *** Support for the Mosaic browser has been removed. diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index 0220c7adf6..7fa81c5c29 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el @@ -47,6 +47,7 @@ ;; browse-url-xdg-open freedesktop.org xdg-open ;; browse-url-kde KDE konqueror (kfm) ;; browse-url-elinks Elinks Don't know (tried with 0.12.GIT) +;; eww-browse-url Emacs Web Wowser ;; Browsers can cache Web pages so it may be necessary to tell them to ;; reload the current page if it has changed (e.g., if you have edited @@ -773,6 +774,8 @@ interactively. Turn the filename into a URL with function (cond ((not (buffer-modified-p))) (browse-url-save-file (save-buffer)) (t (message "%s modified since last save" file)))))) + (when (file-remote-p file) + (setq file (file-local-copy file))) (browse-url (browse-url-file-url file)) (run-hooks 'browse-url-of-file-hook)) @@ -806,7 +809,6 @@ narrowed." (or buffer-file-name (and (boundp 'dired-directory) dired-directory))))) (when (or (not file-name) - (file-remote-p file-name) ;; This can happen when we're looking at a file from a ;; zip file buffer, for instance. (not (file-exists-p file-name))) commit 89f91e502ec484e7e544c3d33de596da5fe53f73 Author: Michael Albinus Date: Mon Jun 7 20:36:57 2021 +0200 ; Fix typos in etc/NEWS diff --git a/etc/NEWS b/etc/NEWS index 797b265383..ff06a13a98 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -116,7 +116,7 @@ filters. See https://mercurylang.org. +++ -** Etags command line option --declarations now has Mercury-specific behavior. +** Etags command line option '--declarations' now has Mercury-specific behavior. All Mercury declarations are tagged by default. However, for compatibility with 'etags' support for Prolog, predicates and functions appearing first in clauses will also be tagged if 'etags' is @@ -311,7 +311,7 @@ prompt, and how you can tweak the file size threshold. Some terminal emulators set the 8th bit of Meta characters, and then encode the resulting character code as if it were non-ASCII character above codepoint 127. Previously, the only way of using these in Emacs -was to set up the terminal emulator to use the ESC characters to send +was to set up the terminal emulator to use the 'ESC' characters to send Meta characters to Emacs, e.g., send "ESC x" when the user types 'M-x'. You can now avoid the need for this setup of such terminal emulators by using the new input-meta-mode with the special value @@ -571,14 +571,14 @@ Icomplete, completions are rotated and selection kept at the top. When used with Fido, completions scroll like a typical dropdown widget. -*** Default value of 'icomplete-compute-delay has been changed to 0.15 s. +*** Default value of 'icomplete-compute-delay' has been changed to 0.15 s. *** Default value of 'icomplete-max-delay-chars' has been changed to 2. *** Reduced blinking while completing the next completions set. Icomplete doesn't hide the hint with the previously computed completions anymore when compute delay is in effect, or the previous -computation has been aborted by input. Instead it shows the previous +computation has been aborted by input. Instead it shows the previous completions until the new ones are ready. --- @@ -1115,14 +1115,14 @@ GTK toolkit, this is only true if 'x-gtk-use-system-tooltips' is t. +++ *** New command 'describe-command' shows help for a command. This can be used instead of 'describe-function' for interactive -commands and is globally bound to `C-h x'. +commands and is globally bound to 'C-h x'. +++ *** New command 'describe-keymap' describes keybindings in a keymap. --- *** New user option 'describe-bindings-outline'. -It enables outlines in the output buffer of `describe-bindings' that +It enables outlines in the output buffer of 'describe-bindings' that can provide a better overview in a long list of available bindings. --- @@ -2056,7 +2056,7 @@ This can be used to change the priority of the hl-line overlays. +++ *** New command 'mailcap-view-file'. This command will open a viewer based on the file type, as determined -by ~/.mailcap and related files and variables. +by "~/.mailcap" and related files and variables. +++ *** New command 'C-x C-k Q' to force redisplay in keyboard macros. @@ -2518,7 +2518,7 @@ similar to prefix arguments, but are more flexible and discoverable. * Incompatible Editing Changes in Emacs 28.1 -** `electric-indent-mode` now also indents inside strings and comments, +** 'electric-indent-mode' now also indents inside strings and comments, (unless the indentation function doesn't, of course). To recover the previous behavior you can use: @@ -2576,7 +2576,7 @@ In previous versions of Emacs, numbers with a trailing dot and an exponent were read as integers and the exponent ignored: 2.e6 was interpreted as the integer 2. Such numerals are now read as floats with the exponent included: 2.e6 is now read as the floating-point value 2000000.0. -That is, (read-from-string "1.e3") => (1000.0 . 4) now. +That is, '(read-from-string "1.e3")' => '(1000.0 . 4)' now. +++ ** The 'lexical-binding' local variable is always enabled. @@ -2785,7 +2785,7 @@ form should be exceedingly rare. See the Info node "(elisp) Backtracking" in the Emacs Lisp reference manual for background. --- -** 'sql-*-statement-starters' are no longer defcustoms. +** 'sql-*-statement-starters' are no longer user options. These variables describe facts about the SQL standard and product-specific additions. There should be no need for users to customize them. @@ -3232,10 +3232,10 @@ The new variable 'xwidget-webkit-download-dir' says where to download to. +++ ** On macOS, Emacs now supports native tabs (in macOS 10.12 and later). Native tabbing behavior is specified system-wide via System -Preferences, under under General > 'Prefer tabs when opening -documents'. In macOS versions 10.15 and earlier, this option is -located under Dock instead. Note that this feature is unrelated to the -Emacs 'tab-bar-mode'. +Preferences, under under "General => Prefer tabs when opening +documents". In macOS versions 10.15 and earlier, this option is +located under Dock instead. Note that this feature is unrelated to +the Emacs 'tab-bar-mode'. +++ ** On MS-Windows, Emacs can now toggle the IME. commit 17aced49a80e0b9df1eef9624928854f07ac5b7d Merge: 69a65212a2 722064022c Author: Eli Zaretskii Date: Mon Jun 7 15:03:56 2021 +0300 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs commit 722064022ccbf594e2f74fa13b252b686c3ff0ea Author: Dmitry Gutov Date: Mon Jun 7 15:03:11 2021 +0300 Fix rgrep abbreviation * lisp/progmodes/grep.el (grep-mode-font-lock-keywords): Update for the last change in grep-find-template (bug#48471). diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 8647c7089d..462ea51e2c 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -473,7 +473,7 @@ buffer `default-directory'." (1 (if (eq (char-after (match-beginning 1)) ?\0) `(face nil display ,(match-string 2))))) ;; Hide excessive part of rgrep command - ("^find \\(\\. -type d .*\\(?:\\\\)\\|\")\"\\)\\)" + ("^find \\(\\(?:-H \\)?\\. -type d .*\\(?:\\\\)\\|\")\"\\)\\)" (1 (if grep-find-abbreviate grep-find-abbreviate-properties '(face nil abbreviated-command t)))) ;; Hide excessive part of lgrep command commit 69a65212a233333ab0605374b4985ead23f4a541 Author: Eli Zaretskii Date: Mon Jun 7 15:03:06 2021 +0300 * src/xdisp.c (Fwindow_text_pixel_size): Plug memory leak. (Bug#48884) diff --git a/src/xdisp.c b/src/xdisp.c index e761ef8b37..6854fa03fe 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -10795,6 +10795,9 @@ include the height of both, if present, in the return value. */) it.max_descent = max (it.max_descent, it.descent); } } + else + bidi_unshelve_cache (it2data, true); + if (!NILP (x_limit)) { /* Don't return more than X-LIMIT. */ commit c8d4af863727d25adc71f7bec906fddbd0fa0d58 Author: Michael Albinus Date: Mon Jun 7 13:45:38 2021 +0200 Support remote file names in `browse-url-of-buffer' * lisp/net/browse-url.el (browse-url-of-buffer): Use temporary file in case of remote `file-name'. (Bug#48397) diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index 8157422d6f..0220c7adf6 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el @@ -806,6 +806,7 @@ narrowed." (or buffer-file-name (and (boundp 'dired-directory) dired-directory))))) (when (or (not file-name) + (file-remote-p file-name) ;; This can happen when we're looking at a file from a ;; zip file buffer, for instance. (not (file-exists-p file-name))) commit 37f44579946380ec13f7929360f8f552334362d4 (refs/remotes/origin/emacs-27) Author: Basil L. Contovounesios Date: Sun Jun 6 07:52:01 2021 +0100 ; Fix typo in dynamic module functions docs. diff --git a/doc/lispref/internals.texi b/doc/lispref/internals.texi index afd6c4c8d9..2d0327ca57 100644 --- a/doc/lispref/internals.texi +++ b/doc/lispref/internals.texi @@ -1411,7 +1411,7 @@ other words, if a module function wants to call Lisp functions or Emacs primitives, convert @code{emacs_value} objects to and from C datatypes (@pxref{Module Values}), or interact with Emacs in any other way, some call from Emacs to @code{emacs_module_init} or to a module -function must be in the call stack. Module function may not interact +function must be in the call stack. Module functions may not interact with Emacs while garbage collection is running; @pxref{Garbage Collection}. They may only interact with Emacs from Lisp interpreter threads (including the main thread) created by Emacs; @pxref{Threads}. commit f7d4bbceee8c3c29e2ef0bfacf9ff24fb020d3ee Author: Eli Zaretskii Date: Wed Jun 2 17:50:57 2021 +0300 ; * src/composite.h: Improve comments for LGSTRING and LGLYPH. diff --git a/src/composite.h b/src/composite.h index 1b346b4cdf..ebbb55f49c 100644 --- a/src/composite.h +++ b/src/composite.h @@ -243,6 +243,11 @@ composition_valid_p (ptrdiff_t start, ptrdiff_t end, Lisp_Object prop) /* Macros for lispy glyph-string. This is completely different from struct glyph_string. */ +/* LGSTRING is a string of font glyphs, LGLYPHs. It is represented as + a Lisp vector, with components shown below. Once LGSTRING was + processed by a shaping engine, it holds font glyphs for one or more + grapheme clusters. */ + #define LGSTRING_HEADER(lgs) AREF (lgs, 0) #define LGSTRING_SET_HEADER(lgs, header) ASET (lgs, 0, header) @@ -256,6 +261,10 @@ composition_valid_p (ptrdiff_t start, ptrdiff_t end, Lisp_Object prop) #define LGSTRING_ID(lgs) AREF (lgs, 1) #define LGSTRING_SET_ID(lgs, id) ASET (lgs, 1, id) +/* LGSTRING_GLYPH_LEN is the maximum number of LGLYPHs that the + LGSTRING can hold. This is NOT the actual number of valid LGLYPHs; + to find the latter, walk the glyphs returned by LGSTRING_GLYPH + until the first one that is nil. */ #define LGSTRING_GLYPH_LEN(lgs) (ASIZE ((lgs)) - 2) #define LGSTRING_GLYPH(lgs, idx) AREF ((lgs), (idx) + 2) #define LGSTRING_SET_GLYPH(lgs, idx, val) ASET ((lgs), (idx) + 2, (val)) @@ -275,6 +284,14 @@ enum lglyph_indices LGLYPH_SIZE }; +/* Each LGLYPH is a single font glyph, whose font code is in + LGLYPH_CODE. + LGLYPH_FROM and LGLYPH_TO are indices into LGSTRING; all the + LGLYPHs that share the same values of LGLYPH_FROM and LGLYPH_TO + belong to the same grapheme cluster. + LGLYPH_CHAR is one of the characters, usually the first one, that + contributed to the glyph (since there isn't a 1:1 correspondence + between composed characters and the font glyphs). */ #define LGLYPH_NEW() make_nil_vector (LGLYPH_SIZE) #define LGLYPH_FROM(g) XFIXNUM (AREF ((g), LGLYPH_IX_FROM)) #define LGLYPH_TO(g) XFIXNUM (AREF ((g), LGLYPH_IX_TO)) commit bef00aa1372dbd8a72ac84be0ee397cca46a1250 Author: Glenn Morris Date: Tue Jun 1 06:12:39 2021 -0700 ; Auto-commit of loaddefs files. diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el index b68ef6851a..655285e0f6 100644 --- a/lisp/ldefs-boot.el +++ b/lisp/ldefs-boot.el @@ -19024,7 +19024,7 @@ It is not recommended to set this variable permanently to anything but nil.") Uninstall jka-compr. This removes the entries in `file-name-handler-alist' and `auto-mode-alist' and `inhibit-local-variables-suffixes' that were added -by `jka-compr-installed'." nil nil) +by `jka-compr-install'." nil nil) (if (fboundp 'register-definition-prefixes) (register-definition-prefixes "jka-compr" '("compression-error" "jka-compr-"))) @@ -19694,28 +19694,28 @@ except that FILTER is not optional. ;;; Generated autoloads from vc/log-edit.el (autoload 'log-edit "log-edit" "\ -Setup a buffer to enter a log message. -The buffer is put in mode MODE or `log-edit-mode' if MODE is nil. +Setup a buffer to enter a VC commit log message. +The buffer is put in mode MODE, or `log-edit-mode' if MODE is nil. \\ If SETUP is non-nil, erase the buffer and run `log-edit-hook'. Set mark and point around the entire contents of the buffer, so that it is easy to kill the contents of the buffer with -\\[kill-region]. Once the user is done editing the message, -invoking the command \\[log-edit-done] (`log-edit-done') will -call CALLBACK to do the actual commit. +\\[kill-region]. Once the user is done editing the message, he +or she is expected to invoke the command \\[log-edit-done] (`log-edit-done'), +which will call CALLBACK, a function to do the actual commit. -PARAMS if non-nil is an alist of variables and buffer-local -values to give them in the Log Edit buffer. Possible keys and -associated values: +PARAMS, if non-nil, is an alist of variables and buffer-local +values to give to those variables in the Log Edit buffer. Possible +keys and associated values are: `log-edit-listfun' -- function taking no arguments that returns the list of - files that are concerned by the current operation (using relative names); + files that are concerned by the current operation (using relative names); `log-edit-diff-function' -- function taking no arguments that - displays a diff of the files concerned by the current operation. + displays a diff of the files concerned by the current operation. `vc-log-fileset' -- the VC fileset to be committed (if any). -If BUFFER is non-nil `log-edit' will jump to that buffer, use it +If BUFFER is non-nil, `log-edit' will switch to that buffer, use it to edit the log message and go back to the current buffer when -done. Otherwise, it uses the current buffer. +done. Otherwise, this function will use the current buffer. \(fn CALLBACK &optional SETUP PARAMS BUFFER MODE &rest IGNORE)" nil nil)