commit 5fbf93d918ba85afa8506569328dfc9c510cee42 (HEAD, refs/remotes/origin/master) Author: Juri Linkov Date: Wed Sep 21 09:42:55 2022 +0300 * lisp/outline.el: More improvements for buttons/margins (bug#57813) (outline-minor-mode-use-margins): Don't use for modes derived from help-mode that are handled by 'outline-minor-mode-use-buttons'. (outline-open, outline-close, outline-close-rtl): Use image height proportional to font height of 0.8em. (outline-minor-mode): Remove overlays 'outline-button' and 'outline-margin', and move such overlay removal after the call of 'outline-show-all' that might trigger overlay addition. diff --git a/lisp/outline.el b/lisp/outline.el index 3503ba2265..93a9247f61 100644 --- a/lisp/outline.el +++ b/lisp/outline.el @@ -298,7 +298,8 @@ buffers (yet) -- that will be amended in a future version." (defvar-local outline--use-rtl nil "Non-nil when direction of clickable buttons is right-to-left.") -(defcustom outline-minor-mode-use-margins '(derived-mode . special-mode) +(defcustom outline-minor-mode-use-margins '(and (derived-mode . special-mode) + (not (derived-mode . help-mode))) "Whether to display clickable buttons in the margins. The value should be a `buffer-match-p' condition. @@ -312,7 +313,7 @@ Note that this feature is meant to be used in editing buffers." "Non-nil when buffer displays clickable buttons in the margins.") (define-icon outline-open nil - '((image "outline-open.svg" "outline-open.pbm" :height 15) + '((image "outline-open.svg" "outline-open.pbm" :height (0.8 . em)) (emoji "🔽") (symbol " ▼ ") (text " open ")) @@ -321,7 +322,7 @@ Note that this feature is meant to be used in editing buffers." :help-echo "Close this section") (define-icon outline-close nil - '((image "outline-close.svg" "outline-close.pbm" :height 15) + '((image "outline-close.svg" "outline-close.pbm" :height (0.8 . em)) (emoji "▶️") (symbol " ▶ ") (text " close ")) @@ -330,7 +331,8 @@ Note that this feature is meant to be used in editing buffers." :help-echo "Open this section") (define-icon outline-close-rtl outline-close - '((image "outline-close.svg" "outline-close.pbm" :height 15 :rotation 180) + '((image "outline-close.svg" "outline-close.pbm" :height (0.8 . em) + :rotation 180) (emoji "◀️") (symbol " ◀ ")) "Right-to-left icon used for buttons in closed outline sections." @@ -536,23 +538,26 @@ See the command `outline-mode' for more information on this mode." ;; Cause use of ellipses for invisible text. (add-to-invisibility-spec '(outline . t)) (outline-apply-default-state)) + (setq line-move-ignore-invisible nil) + ;; Cause use of ellipses for invisible text. + (remove-from-invisibility-spec '(outline . t)) + ;; When turning off outline mode, get rid of any outline hiding. + (outline-show-all) (when outline-minor-mode-highlight (if font-lock-fontified (font-lock-remove-keywords nil outline-font-lock-keywords)) - (remove-overlays nil nil 'outline-overlay t) - (font-lock-flush)) + (font-lock-flush) + (remove-overlays nil nil 'outline-overlay t)) + (when outline--use-buttons + (remove-overlays nil nil 'outline-button t)) (when outline--use-margins + (remove-overlays nil nil 'outline-margin t) (if outline--use-rtl (setq-local right-margin-width (1- right-margin-width)) (setq-local left-margin-width (1- left-margin-width))) (setq-local fringes-outside-margins nil) ;; Force removal of margins - (set-window-buffer nil (window-buffer))) - (setq line-move-ignore-invisible nil) - ;; Cause use of ellipses for invisible text. - (remove-from-invisibility-spec '(outline . t)) - ;; When turning off outline mode, get rid of any outline hiding. - (outline-show-all))) + (set-window-buffer nil (window-buffer))))) (defvar-local outline-heading-alist () "Alist associating a heading for every possible level. commit cc9acda7d36ea980af8cc987ab5eb746284bbff0 Author: Stefan Kangas Date: Wed Sep 21 08:27:42 2022 +0200 image-dired: Support the customize-mode command * lisp/image/image-dired.el (image-dired-thumbnail-mode) (image-dired-display-image-mode): Add custom group 'image-dired'. diff --git a/lisp/image/image-dired.el b/lisp/image/image-dired.el index c2bb874cef..41ed05f191 100644 --- a/lisp/image/image-dired.el +++ b/lisp/image/image-dired.el @@ -936,6 +936,7 @@ You probably want to use this together with "Browse and manipulate thumbnail images using Dired. Use `image-dired-minor-mode' to get a nice setup." :interactive nil + :group 'image-dired (buffer-disable-undo) (add-hook 'file-name-at-point-functions 'image-dired-file-name-at-point nil t) (setq-local window-resize-pixelwise t) @@ -951,6 +952,7 @@ Use `image-dired-minor-mode' to get a nice setup." "Mode for displaying and manipulating original image. Resized or in full-size." :interactive nil + :group 'image-dired (add-hook 'file-name-at-point-functions #'image-dired-file-name-at-point nil t)) commit df79a23da7ac5664ae83b8a05dc725f0a3f20ac3 Author: Po Lu Date: Wed Sep 21 14:23:13 2022 +0800 Fix minor thinko in focus tracking logic * src/xterm.c (xi_handle_focus_change): Prefer explicit focus to implicit focus. diff --git a/src/xterm.c b/src/xterm.c index 59cde718d0..97c070736c 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -12647,9 +12647,11 @@ xi_handle_focus_change (struct x_display_info *dpyinfo) else dpyinfo->client_pointer_device = device->device_id; } - - if (device->focus_implicit_frame - && device->focus_implicit_time > time) + /* Even if the implicit focus was set after the explicit focus + on this specific device, the explicit focus is what really + matters. So use it instead. */ + else if (device->focus_implicit_frame + && device->focus_implicit_time > time) { new = device->focus_implicit_frame; time = device->focus_implicit_time; commit 1231a601ebe1fd9fe454c504dbeb9267440242e7 Author: Mauro Aranda Date: Tue Sep 20 11:18:45 2022 -0300 Recognize the backslash operator in perl-mode * lisp/progmodes/perl-mode.el (perl-syntax-propertize-function): Add new rule to detect a backslash operator. (Bug#11996) * test/lisp/progmodes/cperl-mode-tests.el (cperl-test-bug-11996): New test. * test/lisp/progmodes/cperl-mode-resources/cperl-bug-11996.pl: New file. diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index bd8f4ecd1c..7b7a2cdf01 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el @@ -242,6 +242,12 @@ (not (nth 3 (syntax-ppss (match-beginning 0)))))) (string-to-syntax ". p")))) + ;; If "\" is acting as a backslash operator, it shouldn't start an + ;; escape sequence, so change its syntax. This allows us to handle + ;; correctly the \() construct (Bug#11996) as well as references + ;; to string values. + ("\\(\\\\\\)['`\"($]" (1 (unless (nth 3 (syntax-ppss)) + (string-to-syntax ".")))) ;; Handle funny names like $DB'stop. ("\\$ ?{?\\^?[_[:alpha:]][_[:alnum:]]*\\('\\)[_[:alpha:]]" (1 "_")) ;; format statements diff --git a/test/lisp/progmodes/cperl-mode-resources/cperl-bug-11996.pl b/test/lisp/progmodes/cperl-mode-resources/cperl-bug-11996.pl new file mode 100644 index 0000000000..566b7e7550 --- /dev/null +++ b/test/lisp/progmodes/cperl-mode-resources/cperl-bug-11996.pl @@ -0,0 +1,8 @@ +{ + my @zzzz=(\%seen_couchrequsts, \%seen_people ); + my @zzzz=\(%seen_couchrequsts, %seen_people ); + my @zzzz=(\%seen_couchrequsts, \%seen_people ); +} + +print "\"Watch out\""; +$ref = \"howdy"; diff --git a/test/lisp/progmodes/cperl-mode-tests.el b/test/lisp/progmodes/cperl-mode-tests.el index 66039d6fc7..1bb206e704 100644 --- a/test/lisp/progmodes/cperl-mode-tests.el +++ b/test/lisp/progmodes/cperl-mode-tests.el @@ -788,6 +788,36 @@ under timeout control." (should (string-match "poop ('foo', \n 'bar')" (buffer-string)))))) +(ert-deftest cperl-test-bug-11996 () + "Verify that we give the right syntax property to a backslash operator." + (with-temp-buffer + (insert-file-contents (ert-resource-file "cperl-bug-11996.pl")) + (funcall cperl-test-mode) + (font-lock-ensure) + (goto-char (point-min)) + (re-search-forward "\\(\\\\(\\)") + (save-excursion + (goto-char (match-beginning 1)) + (should (equal (syntax-after (point)) (string-to-syntax "."))) + ;; `forward-sexp' shouldn't complain. + (forward-sexp) + (should (char-equal (char-after) ?\;))) + (re-search-forward "\\(\\\\\"\\)") + (save-excursion + (goto-char (match-beginning 1)) + (should (equal (syntax-after (point)) (string-to-syntax "\\"))) + (should (equal (get-text-property (point) 'face) 'font-lock-string-face))) + (re-search-forward "\\(\\\\\"\\)") + (save-excursion + (goto-char (match-beginning 1)) + (should (equal (syntax-after (point)) (string-to-syntax "\\")))) + (re-search-forward "\\(\\\\\"\\)") + (save-excursion + (goto-char (match-beginning 1)) + (should (equal (syntax-after (point)) (string-to-syntax "."))) + (should (equal (get-text-property (1+ (point)) 'face) + 'font-lock-string-face))))) + (ert-deftest cperl-test-bug-14343 () "Verify that inserting text into a HERE-doc string with Elisp does not break fontification." commit d506d91b1fa98b3868437e4d3638f606b4bd20a0 Author: Stefan Kangas Date: Tue Sep 20 20:52:42 2022 +0200 Make linum.el obsolete * lisp/obsolete/linum.el: Add Obsolete-since. * etc/NEWS: Announce obsoletion of linum.el. (Bug#57412) * doc/misc/efaq.texi (Displaying the current line or column): * etc/TODO: * lisp/faces.el: Don't mention linum.el. diff --git a/doc/misc/efaq.texi b/doc/misc/efaq.texi index ccaca1d017..0da397919d 100644 --- a/doc/misc/efaq.texi +++ b/doc/misc/efaq.texi @@ -1810,9 +1810,6 @@ optional display. Alternatively, you can use the customize @code{display-line-numbers-type} with the same value as you would use with @code{display-line-numbers}. -There is also the @samp{linum} package which will henceforth become -obsolete. We recommend using @samp{display-line-numbers} instead. - @node Displaying the current file name in the titlebar @section How can I modify the titlebar to contain the current file name? @cindex Titlebar, displaying the current file name in diff --git a/etc/NEWS b/etc/NEWS index 5e34f43179..97174ba7a2 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -389,6 +389,12 @@ The user options 'url-gateway-rlogin-host', 'url-gateway-rlogin-parameters', and 'url-gateway-rlogin-user-name' are also obsolete. +--- +** The linum.el library is now obsolete. +We recommend using either the built-in `display-line-numbers-mode', or +the `nlinum' package from GNU ELPA instead. The former has better +performance, but the latter is closer to a drop-in replacement. + --- ** The autoarg.el library is now marked obsolete. This library provides the 'autoarg-mode' and 'autoarg-kp-mode' minor diff --git a/etc/TODO b/etc/TODO index 5a89c47a9c..3e4979da8a 100644 --- a/etc/TODO +++ b/etc/TODO @@ -1686,12 +1686,6 @@ and the one to use when terminating the selection. More specifically do what's needed to make ibuffer.el the default, or just an extension of buff-menu.el. -** Replace linum.el with nlinum.el -https://lists.gnu.org/r/emacs-devel/2013-08/msg00379.html - -(Since Emacs 26 introduced native line numbers, this item is -probably obsolete.) - ** Merge sendmail.el and messages.el Probably not a complete merge, but at least arrange for messages.el to be a derived mode of sendmail.el. Or arrange for messages.el to be diff --git a/lisp/faces.el b/lisp/faces.el index e171b32e31..ffdc391f66 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -2548,7 +2548,6 @@ default." :version "21.1" :group 'basic-faces) -;; Definition stolen from linum.el. (defface line-number '((t :inherit (shadow default))) "Face for displaying line numbers. diff --git a/lisp/obsolete/linum.el b/lisp/obsolete/linum.el index 1b897a2bd2..017c06e426 100644 --- a/lisp/obsolete/linum.el +++ b/lisp/obsolete/linum.el @@ -6,6 +6,7 @@ ;; Maintainer: emacs-devel@gnu.org ;; Keywords: convenience ;; Old-Version: 0.9x +;; Obsolete-since: 29.1 ;; This file is part of GNU Emacs. @@ -24,6 +25,13 @@ ;;; Commentary: +;; NOTE: This library was made obsolete in Emacs 29.1. We recommend +;; using either the built-in `display-line-numbers-mode', or the +;; `nlinum' package from GNU ELPA instead. The former has better +;; performance, but the latter is closer to a drop-in replacement. +;; +;; -------------------- +;; ;; Display line numbers for the current buffer. ;; ;; Toggle display of line numbers with M-x linum-mode. To enable commit 903de63c6c8da03816d3469bc8a3cc480df5ae1b Author: Stefan Kangas Date: Tue Sep 20 20:42:51 2022 +0200 Move linum.el to lisp/obsolete * lisp/linum.el: Move from here... * lisp/obsolete/linum.el: ...to here. (Bug#57412) diff --git a/lisp/linum.el b/lisp/obsolete/linum.el similarity index 100% rename from lisp/linum.el rename to lisp/obsolete/linum.el commit 91c03e67f27c0775c3931026e00bdd1f801160ab Author: Stefan Kangas Date: Tue Sep 20 20:37:44 2022 +0200 ; * doc/misc/gnus-faq.texi: Repunctuate sentences. diff --git a/doc/misc/gnus-faq.texi b/doc/misc/gnus-faq.texi index 6d09fd4ec9..3aad985c5a 100644 --- a/doc/misc/gnus-faq.texi +++ b/doc/misc/gnus-faq.texi @@ -49,23 +49,23 @@ This is the Gnus Frequently Asked Questions list. Gnus is a Usenet Newsreader and Electronic Mail User Agent implemented as a part of Emacs. It's been around in some form since the early 1990s, and has been distributed as a standard part of Emacs for much -of that time. Gnus 5 is the latest (and greatest) incarnation. The +of that time. Gnus 5 is the latest (and greatest) incarnation. The original version was called GNUS, and was written by Masanobu UMEDA@. When autumn crept up in 1994, Lars Magne Ingebrigtsen grew bored and decided to rewrite Gnus. Its biggest strength is the fact that it is extremely -customizable. It is somewhat intimidating at first glance, but +customizable. It is somewhat intimidating at first glance, but most of the complexity can be ignored until you're ready to take -advantage of it. If you receive a reasonable volume of e-mail +advantage of it. If you receive a reasonable volume of e-mail (you're on various mailing lists), or you would like to read high-volume mailing lists but cannot keep up with them, or read high volume newsgroups or are just bored, then Gnus is what you want. -This FAQ was maintained by Justin Sheehy until March 2002. He +This FAQ was maintained by Justin Sheehy until March 2002. He would like to thank Steve Baur and Per Abrahamsen for doing a wonderful -job with this FAQ before him. We would like to do the same: thanks, +job with this FAQ before him. We would like to do the same: thanks, Justin! The information contained here was compiled with the assistance @@ -117,7 +117,7 @@ development version that became Gnus 5.12. @menu * FAQ 2-1:: Every time I start Gnus I get a message "Gnus auto-save - file exists. Do you want to read it?", what does this mean and + file exists. Do you want to read it?", what does this mean and how to prevent it? * FAQ 2-2:: Gnus doesn't remember which groups I'm subscribed to, what's this? @@ -133,7 +133,7 @@ development version that became Gnus 5.12. @subsubheading Question 2.1 Every time I start Gnus I get a message "Gnus auto-save -file exists. Do you want to read it?", what does this mean +file exists. Do you want to read it?", what does this mean and how to prevent it? @subsubheading Answer @@ -168,8 +168,8 @@ How to change the format of the lines in Group buffer? @subsubheading Answer You've got to tweak the value of the variable -gnus-group-line-format. See the manual node "Group Line -Specification" for information on how to do this. An +gnus-group-line-format. See the manual node "Group Line +Specification" for information on how to do this. An example for this (guess from whose .gnus :-)): @example @@ -192,11 +192,11 @@ Linux under the topic linux, all dealing with music under the topic music and all dealing with scottish music under the topic scottish which is a subtopic of music. -To enter topic mode, just hit t while in Group buffer. Now +To enter topic mode, just hit t while in Group buffer. Now you can use @samp{T n} to create a topic at point and @samp{T m} to move a group to -a specific topic. For more commands see the manual or the -menu. You might want to include the %P specifier at the +a specific topic. For more commands see the manual or the +menu. You might want to include the %P specifier at the beginning of your gnus-group-line-format variable to have the groups nicely indented. @@ -231,7 +231,7 @@ hit @samp{C-y}. possible? * FAQ 3-7:: And how about local spool files? * FAQ 3-8:: OK, reading news works now, but I want to be able to - read my mail with Gnus, too. How to do it? + read my mail with Gnus, too. How to do it? * FAQ 3-9:: And what about IMAP? * FAQ 3-10:: At the office we use one of those MS Exchange servers, can I use Gnus to read my mail from it? @@ -248,8 +248,8 @@ but it only says "nntp (news) open error", what to do? @subsubheading Answer -You've got to tell Gnus where to fetch the news from. Read -the documentation for information on how to do this. As a +You've got to tell Gnus where to fetch the news from. Read +the documentation for information on how to do this. As a first start, put those lines in @file{~/.gnus.el}: @example @@ -279,7 +279,7 @@ directory Emacs chooses will most certainly not be what you want, so let's do it the correct way. The first thing you've got to do is to create a suitable directory (no blanks in names -please), e.g., c:\myhome. Then you must set the environment +please), e.g., c:\myhome. Then you must set the environment variable HOME to this directory. To do this under Windows 9x or Me include the line @@ -290,7 +290,7 @@ SET HOME=C:\myhome in your autoexec.bat and reboot. Under NT, 2000 and XP, hit Winkey+Pause/Break to enter system options (if it doesn't work, go -to Control Panel -> System -> Advanced). There you'll find the +to Control Panel -> System -> Advanced). There you'll find the possibility to set environment variables. Create a new one with name HOME and value C:\myhome. Rebooting is not necessary. @@ -333,8 +333,8 @@ subscribe to a group. If you know the name of the group say @samp{U name.of.group @key{RET}} in group buffer (use the -tab-completion Luke). Otherwise hit ^ in group buffer, -this brings you to the server buffer. Now place point (the +tab-completion Luke). Otherwise hit ^ in group buffer, +this brings you to the server buffer. Now place point (the cursor) over the server which carries the group you want, hit @samp{@key{RET}}, move point to the group you want to subscribe to and say @samp{u} @@ -349,7 +349,7 @@ post on this server as well as I am, what's that? @subsubheading Answer Some providers allow restricted anonymous access and full -access only after authorization. To make Gnus send authinfo +access only after authorization. To make Gnus send authinfo to those servers append @example @@ -366,8 +366,8 @@ I want Gnus to fetch news from several servers, is this possible? @subsubheading Answer -Of course. You can specify more sources for articles in the -variable gnus-secondary-select-methods. Add something like +Of course. You can specify more sources for articles in the +variable gnus-secondary-select-methods. Add something like this in @file{~/.gnus.el}: @example @@ -418,25 +418,25 @@ to post articles, see the Gnus manual on how to do this. @subsubheading Question 3.8 OK, reading news works now, but I want to be able to read my mail -with Gnus, too. How to do it? +with Gnus, too. How to do it? @subsubheading Answer That's a bit harder since there are many possible sources for mail, many possible ways for storing mail and many -different ways for sending mail. The most common cases are +different ways for sending mail. The most common cases are these: 1: You want to read your mail from a pop3 server and send them directly to a SMTP Server 2: Some program like fetchmail retrieves your mail and stores it on disk from -where Gnus shall read it. Outgoing mail is sent by -Sendmail, Postfix or some other MTA@. Sometimes, you even +where Gnus shall read it. Outgoing mail is sent by +Sendmail, Postfix or some other MTA@. Sometimes, you even need a combination of the above cases. However, the first thing to do is to tell Gnus in which way it should store the mail, in Gnus terminology which back end -to use. Gnus supports many different back ends, the most -commonly used one is nnml. It stores every mail in one file -and is therefore quite fast. However you might prefer a one +to use. Gnus supports many different back ends, the most +commonly used one is nnml. It stores every mail in one file +and is therefore quite fast. However you might prefer a one file per group approach if your file system has problems with many small files, the nnfolder back end is then probably the choice for you. To use nnml add the following to @file{~/.gnus.el}: @@ -453,7 +453,7 @@ As you might have guessed, if you want nnfolder, it's @end example @noindent -Now we need to tell Gnus, where to get its mail from. If +Now we need to tell Gnus, where to get its mail from. If it's a POP3 server, then you need something like this: @example @@ -465,7 +465,7 @@ it's a POP3 server, then you need something like this: @noindent Make sure @file{~/.gnus.el} isn't readable to others if you store -your password there. If you want to read your mail from a +your password there. If you want to read your mail from a traditional spool file on your local machine, it's @example @@ -499,10 +499,10 @@ mail, it's Where :suffix ".prcml" tells Gnus only to use files with the suffix .prcml. -OK, now you only need to tell Gnus how to send mail. If you +OK, now you only need to tell Gnus how to send mail. If you want to send mail via sendmail (or whichever MTA is playing the role of sendmail on your system), you don't need to do -anything. However, if you want to send your mail to an +anything. However, if you want to send your mail to an SMTP Server you need the following in your @file{~/.gnus.el} @example @@ -519,9 +519,9 @@ And what about IMAP? @subsubheading Answer -There are two ways of using IMAP with Gnus. The first one is +There are two ways of using IMAP with Gnus. The first one is to use IMAP like POP3, that means Gnus fetches the mail from -the IMAP server and stores it on disk. If you want to do +the IMAP server and stores it on disk. If you want to do this (you don't really want to do this) add the following to @file{~/.gnus.el} @@ -586,7 +586,7 @@ each POP3 mail source. @xref{Mail Source Specifiers}, for details on @subsection Reading messages @menu -* FAQ 4-1:: When I enter a group, all read messages are gone. How to +* FAQ 4-1:: When I enter a group, all read messages are gone. How to view them again? * FAQ 4-2:: How to tell Gnus to show an important message every time I enter a group, even when it's read? @@ -595,7 +595,7 @@ each POP3 mail source. @xref{Mail Source Specifiers}, for details on * FAQ 4-5:: How can I change the headers Gnus displays by default at the top of the article buffer? * FAQ 4-6:: I'd like Gnus NOT to render HTML-mails but show me the - text part if it's available. How to do it? + text part if it's available. How to do it? * FAQ 4-7:: Can I use some other browser than shr to render my HTML-mails? * FAQ 4-8:: Is there anything I can do to make poorly formatted @@ -609,7 +609,7 @@ each POP3 mail source. @xref{Mail Source Specifiers}, for details on those? * FAQ 4-12:: The number of total messages in a group which Gnus displays in group buffer is by far to high, especially in mail - groups. Is this a bug? + groups. Is this a bug? * FAQ 4-13:: I don't like the layout of summary and article buffer, how to change it? Perhaps even a three pane display? * FAQ 4-14:: I don't like the way the Summary buffer looks, how to @@ -621,15 +621,15 @@ each POP3 mail source. @xref{Mail Source Specifiers}, for details on @node FAQ 4-1 @subsubheading Question 4.1 -When I enter a group, all read messages are gone. How to view them again? +When I enter a group, all read messages are gone. How to view them again? @subsubheading Answer If you enter the group by saying @samp{@key{RET}} -in group buffer with point over the group, only unread and ticked messages are loaded. Say +in group buffer with point over the group, only unread and ticked messages are loaded. Say @samp{C-u @key{RET}} -instead to load all available messages. If you want only the 300 newest say +instead to load all available messages. If you want only the 300 newest say @samp{C-u 300 @key{RET}} Loading only unread messages can be annoying if you have threaded view enabled, say @@ -658,9 +658,9 @@ enter a group, even when it's read? @subsubheading Answer -You can tick important messages. To do this hit +You can tick important messages. To do this hit @samp{u} while point is in summary buffer -over the message. When you want to remove the mark, hit +over the message. When you want to remove the mark, hit either @samp{d} (this deletes the tick mark and set's unread mark) or @samp{M c} (which deletes all marks for the message). @@ -700,7 +700,7 @@ the top of the article buffer? The variable gnus-visible-headers controls which headers are shown, its value is a regular expression, header lines -which match it are shown. So if you want author, subject, +which match it are shown. So if you want author, subject, date, and if the header exists, Followup-To and MUA / NUA say this in @file{~/.gnus.el}: @@ -715,7 +715,7 @@ say this in @file{~/.gnus.el}: @subsubheading Question 4.6 I'd like Gnus NOT to render HTML-mails but show me the -text part if it's available. How to do it? +text part if it's available. How to do it? @subsubheading Answer @@ -728,7 +728,7 @@ Say @end example @noindent -in @file{~/.gnus.el}. If you don't want HTML rendered, even if there's no text alternative add +in @file{~/.gnus.el}. If you don't want HTML rendered, even if there's no text alternative add @example (setq mm-automatic-display (remove "text/html" mm-automatic-display)) @@ -764,7 +764,7 @@ more readable? Gnus offers you several functions to ``wash'' incoming mail, you can find them if you browse through the menu, item -Article->Washing. The most interesting ones are probably ``Wrap +Article->Washing. The most interesting ones are probably ``Wrap long lines'' (@samp{W w}), ``Decode ROT13'' (@samp{W r}) and ``Outlook Deuglify'' which repairs the dumb quoting used by many users of Microsoft products @@ -781,40 +781,40 @@ highlight more interesting ones in some way? @subsubheading Answer -You want Scoring. Scoring means, that you define rules -which assign each message an integer value. Depending on +You want Scoring. Scoring means, that you define rules +which assign each message an integer value. Depending on the value the message is highlighted in summary buffer (if it's high, say +2000) or automatically marked read (if the value is low, say @minus{}800) or some other action happens. There are basically three ways of setting up rules which assign -the scoring-value to messages. The first and easiest way is to set -up rules based on the article you are just reading. Say you're +the scoring-value to messages. The first and easiest way is to set +up rules based on the article you are just reading. Say you're reading a message by a guy who always writes nonsense and you want -to ignore his messages in the future. Hit +to ignore his messages in the future. Hit @samp{L}, to set up a rule which lowers the score. Now Gnus asks you which the criteria for lowering the Score shall -be. Hit @samp{?} twice to see all possibilities, +be. Hit @samp{?} twice to see all possibilities, we want @samp{a} which means the author (the from -header). Now Gnus wants to know which kind of matching we want. +header). Now Gnus wants to know which kind of matching we want. Hit either @samp{e} for an exact match or @samp{s} for substring-match and delete afterwards everything but the name to score down all authors with the given -name no matter which email address is used. Now you need to tell +name no matter which email address is used. Now you need to tell Gnus when to apply the rule and how long it should last, hit @samp{p} to apply the rule now and let it last -forever. If you want to raise the score instead of lowering it say +forever. If you want to raise the score instead of lowering it say @samp{I} instead of @samp{L}. -You can also set up rules by hand. To do this say @samp{V -f} in summary buffer. Then you are asked for the name +You can also set up rules by hand. To do this say @samp{V +f} in summary buffer. Then you are asked for the name of the score file, it's name.of.group.SCORE for rules valid in -only one group or all.Score for rules valid in all groups. See the +only one group or all.Score for rules valid in all groups. See the Gnus manual for the exact syntax, basically it's one big list whose elements are lists again. the first element of those lists is the header to score on, then one more list with what to match, which score to assign, when to expire the rule and how to do the -matching. If you find me very interesting, you could add the +matching. If you find me very interesting, you could add the following to your all.Score: @example @@ -825,14 +825,14 @@ following to your all.Score: This would add 999 to the score of messages written by me and 500 to the score of messages which are a (possibly -indirect) answer to a message written by me. Of course +indirect) answer to a message written by me. Of course nobody with a sane mind would do this :-) -The third alternative is adaptive scoring. This means Gnus +The third alternative is adaptive scoring. This means Gnus watches you and tries to find out what you find interesting and what annoying and sets up rules -which reflect this. Adaptive scoring can be a huge help -when reading high traffic groups. If you want to activate +which reflect this. Adaptive scoring can be a huge help +when reading high traffic groups. If you want to activate adaptive scoring say @example @@ -852,11 +852,11 @@ set other variables specific for some groups? While in group buffer move point over the group and hit @samp{G c}, this opens a buffer where you -can set options for the group. At the bottom of the buffer +can set options for the group. At the bottom of the buffer you'll find an item that allows you to set variables -locally for the group. To disable threading enter +locally for the group. To disable threading enter gnus-show-threads as name of variable and @code{nil} as -value. Hit button done at the top of the buffer when +value. Hit button done at the top of the buffer when you're ready. @node FAQ 4-11 @@ -868,7 +868,7 @@ those? @subsubheading Answer Stop those "Can I ..." questions, the answer is always yes -in Gnus Country :-). It's a three step process: First we +in Gnus Country :-). It's a three step process: First we make faces (specifications of how summary-line shall look like) for those postings, then we'll give them some special score and finally we'll tell Gnus to use the new @@ -879,16 +879,16 @@ faces. The number of total messages in a group which Gnus displays in group buffer is by far to high, especially in -mail groups. Is this a bug? +mail groups. Is this a bug? @subsubheading Answer No, that's a matter of design of Gnus, fixing this would mean reimplementation of major parts of Gnus' -back ends. Gnus thinks ``highest-article-number @minus{} -lowest-article-number = total-number-of-articles''. This +back ends. Gnus thinks ``highest-article-number @minus{} +lowest-article-number = total-number-of-articles''. This works OK for Usenet groups, but if you delete and move -many messages in mail groups, this fails. To cure the +many messages in mail groups, this fails. To cure the symptom, enter the group via @samp{C-u @key{RET}} (this makes Gnus get all messages), then hit @samp{M P b} to mark all messages and @@ -907,9 +907,9 @@ to change it? Perhaps even a three pane display? @subsubheading Answer You can control the windows configuration by calling the -function gnus-add-configuration. The syntax is a bit +function gnus-add-configuration. The syntax is a bit complicated but explained very well in the manual node -"Window Layout". Some popular examples: +"Window Layout". Some popular examples: Instead 25% summary 75% article buffer 35% summary and 65% article (the 1.0 for article means "take the remaining @@ -951,11 +951,11 @@ I don't like the way the Summary buffer looks, how to tweak it? @subsubheading Answer You've got to play around with the variable -gnus-summary-line-format. Its value is a string of +gnus-summary-line-format. Its value is a string of symbols which stand for things like author, date, subject -etc. A list of the available specifiers can be found in the +etc. A list of the available specifiers can be found in the manual node ``Summary Buffer Lines'' and the often forgotten -node ``Formatting Variables'' and its sub-nodes. There +node ``Formatting Variables'' and its sub-nodes. There you'll find useful things like positioning the cursor and tabulators which allow you a summary in table form, but sadly hard tabulators are broken in 5.8.8. @@ -963,7 +963,7 @@ sadly hard tabulators are broken in 5.8.8. Gnus offers you some very nice new specifiers, e.g., %B which draws a thread-tree and %&user-date which gives you a date where the details are dependent of the -articles age. Here's an example which uses both: +articles age. Here's an example which uses both: @example (setq gnus-summary-line-format ":%U%R %B %s %-60=|%4L |%-20,20f |%&user-date; \n") @@ -997,19 +997,19 @@ How to split incoming mails in several groups? Gnus offers two possibilities for splitting mail, the easy nnmail-split-methods and the more powerful Fancy Mail -Splitting. I'll only talk about the first one, refer to +Splitting. I'll only talk about the first one, refer to the manual, node "Fancy Mail Splitting" for the latter. The value of nnmail-split-methods is a list, each element -is a list which stands for a splitting rule. Each rule has +is a list which stands for a splitting rule. Each rule has the form "group where matching articles should go to", "regular expression which has to be matched", the first -rule which matches wins. The last rule must always be a +rule which matches wins. The last rule must always be a general rule (regular expression .*) which denotes where -articles should go which don't match any other rule. If +articles should go which don't match any other rule. If the folder doesn't exist yet, it will be created as soon as an article lands there. By default the mail will be -send to all groups whose rules match. If you +send to all groups whose rules match. If you don't want that (you probably don't want), say @example @@ -1020,11 +1020,11 @@ don't want that (you probably don't want), say in @file{~/.gnus.el}. An example might be better than thousand words, so here's -my nnmail-split-methods. Note that I send duplicates in a +my nnmail-split-methods. Note that I send duplicates in a special group and that the default group is spam, since I filter all mails out which are from some list I'm subscribed to or which are addressed directly to me -before. Those rules kill about 80% of the Spam which +before. Those rules kill about 80% of the Spam which reaches me (Email addresses are changed to prevent spammers from using them): @@ -1089,10 +1089,10 @@ of the variables @code{shr-color-visible-distance-min} and * FAQ 5-7:: Is there some kind of address-book, so I needn't remember all those email addresses? * FAQ 5-8:: Sometimes I see little images at the top of article - buffer. What's that and how can I send one with my postings, + buffer. What's that and how can I send one with my postings, too? * FAQ 5-9:: Sometimes I accidentally hit r instead of f in - newsgroups. Can Gnus warn me, when I'm replying by mail in + newsgroups. Can Gnus warn me, when I'm replying by mail in newsgroups? * FAQ 5-10:: How to tell Gnus not to generate a sender header? * FAQ 5-11:: I want Gnus to locally store copies of my send mail and @@ -1115,18 +1115,18 @@ either in Group or Summary buffer, for a posting, it's either @samp{a} in Group buffer and filling the Newsgroups header manually or @samp{a} in the Summary buffer of the -group where the posting shall be send to. Replying by mail +group where the posting shall be send to. Replying by mail is @samp{r} if you don't want to cite the author, or import the cited text manually and @samp{R} to cite the text of the original -message. For a follow up to a newsgroup, it's +message. For a follow up to a newsgroup, it's @samp{f} and @samp{F} (analogously to @samp{r} and @samp{R}). Enter new headers above the line saying "--text follows -this line--", enter the text below the line. When ready +this line--", enter the text below the line. When ready hit @samp{C-c C-c}, to send the message, if you want to finish it later hit @samp{C-c C-d} to save it in the drafts group, where you @@ -1189,7 +1189,7 @@ organization, address, name or body. The attribute name can also be a string. In that case, this will be used as a header name, and the value will be inserted in the headers of the article; if the value is @code{nil}, the header -name will be removed. You can also say (eval (foo bar)), +name will be removed. You can also say (eval (foo bar)), then the function foo will be evaluated with argument bar and the result will be thrown away. @@ -1200,8 +1200,8 @@ Can I set things like From, Signature etc group based on the group I post too? @subsubheading Answer -That's the strength of posting styles. Before, we used ".*" -to set the default for all groups. You can use a regexp +That's the strength of posting styles. Before, we used ".*" +to set the default for all groups. You can use a regexp like "^gmane" and the following settings are only applied to postings you send to the gmane hierarchy, use ".*binaries" instead and they will be applied to postings @@ -1210,7 +1210,7 @@ name etc. You can instead of specifying a regexp specify a function which is evaluated, only if it returns true, the -corresponding settings take effect. Two interesting +corresponding settings take effect. Two interesting candidates for this are message-news-p which returns t if the current Group is a newsgroup and the corresponding message-mail-p. @@ -1220,7 +1220,7 @@ the example below, when I post to gmane.mail.spam.spamassassin.general, the settings under ".*" are applied and the settings under message-news-p and those under "^gmane" and those under -"^gmane\\.mail\\.spam\\.spamassassin\\.general$". Because +"^gmane\\.mail\\.spam\\.spamassassin\\.general$". Because of this put general settings at the top and specific ones at the bottom. @@ -1302,7 +1302,7 @@ Yes, say something like @end example @noindent -in @file{~/.gnus.el}. Change "^de\\." and "deutsch8" to something +in @file{~/.gnus.el}. Change "^de\\." and "deutsch8" to something that suits your needs. @node FAQ 5-7 @@ -1324,12 +1324,12 @@ alias al "Al " Then typing your alias (followed by a space or punctuation character) on a To: or Cc: line in the message buffer will -cause Gnus to insert the full address for you. See the +cause Gnus to insert the full address for you. See the node "Mail Aliases" in Message (not Gnus) manual for details. However, what you really want is the Insidious Big Brother -Database bbdb. Get it from +Database bbdb. Get it from @uref{http://bbdb.sourceforge.net/, bbdb's website}. Now place the following in @file{~/.gnus.el}, to activate bbdb for Gnus: @@ -1358,14 +1358,14 @@ place them in ~/.emacs: @end example @noindent -Now you should be ready to go. Say @samp{M-x bbdb @key{RET} +Now you should be ready to go. Say @samp{M-x bbdb @key{RET} @key{RET}} to open a bbdb buffer showing all -entries. Say @samp{c} to create a new +entries. Say @samp{c} to create a new entry, @samp{b} to search your BBDB and @samp{C-o} to add a new field to an -entry. If you want to add a sender to the BBDB you can +entry. If you want to add a sender to the BBDB you can also just hit @kbd{:} on the posting in the summary buffer and -you are done. When you now compose a new mail, +you are done. When you now compose a new mail, hit @samp{TAB} to cycle through know recipients. @@ -1373,18 +1373,18 @@ recipients. @subsubheading Question 5.8 Sometimes I see little images at the top of article -buffer. What's that and how can I send one with my +buffer. What's that and how can I send one with my postings, too? @subsubheading Answer -Those images are called X-Faces. They are 48*48 pixel b/w -pictures, encoded in a header line. If you want to include +Those images are called X-Faces. They are 48*48 pixel b/w +pictures, encoded in a header line. If you want to include one in your posts, you've got to convert some image to a -X-Face. So fire up some image manipulation program (say +X-Face. So fire up some image manipulation program (say Gimp), open the image you want to include, cut out the relevant part, reduce color depth to 1 bit, resize to -48*48 and save as bitmap. Now you should get the compface +48*48 and save as bitmap. Now you should get the compface package from @uref{ftp://ftp.cs.indiana.edu/pub/faces/, this site}. and create the actual X-face by saying @@ -1424,7 +1424,7 @@ to @code{gnus-posting-styles}. @subsubheading Question 5.9 Sometimes I accidentally hit r instead of f in -newsgroups. Can Gnus warn me, when I'm replying by mail in +newsgroups. Can Gnus warn me, when I'm replying by mail in newsgroups? @subsubheading Answer @@ -1454,7 +1454,7 @@ news, how to do it? @subsubheading Answer You must set the variable gnus-message-archive-group to do -this. You can set it to a string giving the name of the +this. You can set it to a string giving the name of the group where the copies shall go or like in the example below use a function which is evaluated and which returns the group to use. @@ -1491,8 +1491,8 @@ aren't they and how to fix it? @subsubheading Answer The message-ID is a unique identifier for messages you -send. To make it unique, Gnus need to know which machine -name to put after the "@@". If the name of the machine +send. To make it unique, Gnus need to know which machine +name to put after the "@@". If the name of the machine where Gnus is running isn't suitable (it probably isn't at most private machines) you can tell Gnus what to use by saying: @@ -1519,7 +1519,7 @@ instead (works for newer versions as well): If you have no idea what to insert for "yourmachine.yourdomain.tld", you've got several -choices. You can either ask your provider if he allows +choices. You can either ask your provider if he allows you to use something like yourUserName.userfqdn.provider.net, or you can use somethingUnique.yourdomain.tld if you own the domain @@ -1556,7 +1556,7 @@ correctly by sending yourself a Mail and looking at the Message-ID. * FAQ 6-3:: How to search for a specific message? * FAQ 6-4:: How to get rid of old unwanted mail? * FAQ 6-5:: I want that all read messages are expired (at least in - some groups). How to do it? + some groups). How to do it? * FAQ 6-6:: I don't want expiration to delete my mails but to move them to another group. @end menu @@ -1569,16 +1569,16 @@ How to import my old mail into Gnus? @subsubheading Answer The easiest way is to tell your old mail program to -export the messages in mbox format. Most Unix mailers +export the messages in mbox format. Most Unix mailers are able to do this, if you come from the MS Windows world, you may find tools at @uref{https://sourceforge.net/projects/mbx2mbox/}. -Now you've got to import this mbox file into Gnus. To do +Now you've got to import this mbox file into Gnus. To do this, create a nndoc group based on the mbox file by saying @samp{G f /path/file.mbox @key{RET}} in -Group buffer. You now have read-only access to your -mail. If you want to import the messages to your normal +Group buffer. You now have read-only access to your +mail. If you want to import the messages to your normal Gnus mail groups hierarchy, enter the nndoc group you've just created by saying @samp{C-u @key{RET}} (thus making sure all messages are retrieved), mark all @@ -1597,8 +1597,8 @@ How to archive interesting messages? If you stumble across an interesting message, say in gnu.emacs.gnus and want to archive it there are several -solutions. The first and easiest is to save it to a file -by saying @samp{O f}. However, wouldn't +solutions. The first and easiest is to save it to a file +by saying @samp{O f}. However, wouldn't it be much more convenient to have more direct access to the archived message from Gnus? If you say yes, put this snippet by Frank Haun in @@ -1607,7 +1607,7 @@ snippet by Frank Haun in @example (defun my-archive-article (&optional n) "Copies one or more article(s) to a corresponding `nnml:' group, e.g., -`gnus.ding' goes to `nnml:1.gnus.ding'. And `nnml:List-gnus.ding' goes +`gnus.ding' goes to `nnml:1.gnus.ding'. And `nnml:List-gnus.ding' goes to `nnml:1.List-gnus-ding'. Use process marks or mark a region in the summary buffer to archive @@ -1644,7 +1644,7 @@ How to search for a specific message? @subsubheading Answer -There are several ways for this, too. For a posting from +There are several ways for this, too. For a posting from a Usenet group the easiest solution is probably to ask @uref{https://groups.google.com, groups.google.com}, if you found the posting there, tell Google to display @@ -1659,9 +1659,9 @@ Another idea which works for both mail and news groups is to enter the group where the message you are searching is and use the standard Emacs search @samp{C-s}, it's smart enough to look at -articles in collapsed threads, too. If you want to +articles in collapsed threads, too. If you want to search bodies, too try @samp{M-s} -instead. Further on there are the +instead. Further on there are the gnus-summary-limit-to-foo functions, which can help you, too. @@ -1675,17 +1675,17 @@ How to get rid of old unwanted mail? You can of course just mark the mail you don't need anymore by saying @samp{#} with point over the mail and then say @samp{B @key{DEL}} -to get rid of them forever. You could also instead of +to get rid of them forever. You could also instead of actually deleting them, send them to a junk-group by saying @samp{B m nnml:trash-bin} which you clear from time to time, but both are not the intended way in Gnus. In Gnus, we let mail expire like news expires on a news -server. That means you tell Gnus the message is +server. That means you tell Gnus the message is expirable (you tell Gnus "I don't need this mail anymore") by saying @samp{E} with point -over the mail in summary buffer. Now when you leave the +over the mail in summary buffer. Now when you leave the group, Gnus looks at all messages which you marked as expirable before and if they are old enough (default is older than a week) they are deleted. @@ -1694,24 +1694,24 @@ older than a week) they are deleted. @subsubheading Question 6.5 I want that all read messages are expired (at least in -some groups). How to do it? +some groups). How to do it? @subsubheading Answer If you want all read messages to be expired (e.g., in mailing lists where there's an online archive), you've got two choices: auto-expire and -total-expire. Auto-expire means, that every article +total-expire. Auto-expire means, that every article which has no marks set and is selected for reading is marked as expirable, Gnus hits @samp{E} -for you every time you read a message. Total-expire +for you every time you read a message. Total-expire follows a slightly different approach, here all article where the read mark is set are expirable. To activate auto-expire, include auto-expire in the Group parameters for the group. (Hit @samp{G c} in summary buffer with point over the -group to change group parameters). For total-expire add +group to change group parameters). For total-expire add total-expire to the group-parameters. Which method you choose is merely a matter of taste: @@ -1753,7 +1753,7 @@ variables specific for some groups?") * FAQ 7-1:: I don't have a permanent connection to the net, how can I minimize the time I've got to be connected? * FAQ 7-2:: So what was this thing about the Agent? -* FAQ 7-3:: I want to store article bodies on disk, too. How to do +* FAQ 7-3:: I want to store article bodies on disk, too. How to do it? * FAQ 7-4:: How to tell Gnus not to try to send mails / postings while I'm offline? @@ -1790,7 +1790,7 @@ Then you want to fetch your Mail, popular choices are @uref{https://www.fetchmail.info/, fetchmail} and @uref{http://pyropus.ca/software/getmail/, getmail}. You should tell those to write the mail to your disk and -Gnus to read it from there. Last but not least the mail +Gnus to read it from there. Last but not least the mail sending part: This can be done with every MTA like @uref{https://www.proofpoint.com/us/open-source-email-solution, sendmail} or @uref{https://www.exim.org/, exim}. @@ -1800,7 +1800,7 @@ On windows boxes I'd vote for it's a small freeware, open-source program which fetches your mail and news from remote servers and offers them to Gnus (or any other mail and/or news reader) via nntp -respectively POP3 or IMAP@. It also includes a smtp +respectively POP3 or IMAP@. It also includes a smtp server for receiving mails from Gnus. @node FAQ 7-2 @@ -1812,7 +1812,7 @@ So what was this thing about the Agent? The Gnus agent is part of Gnus, it allows you to fetch mail and news and store them on disk for reading them -later when you're offline. It kind of mimics offline +later when you're offline. It kind of mimics offline newsreaders like Forte Agent. It is enabled by default. You've got to select the servers whose groups can be @@ -1831,7 +1831,7 @@ there the next time you enter the group. @node FAQ 7-3 @subsubheading Question 7.3 -I want to store article bodies on disk, too. How to do it? +I want to store article bodies on disk, too. How to do it? @subsubheading Answer @@ -1839,16 +1839,16 @@ You can tell the agent to automatically fetch the bodies of articles which fulfill certain predicates, this is done in a special buffer which can be reached by saying @samp{J c} in group -buffer. Please refer to the documentation for +buffer. Please refer to the documentation for information which predicates are possible and how exactly to do it. Further on you can tell the agent manually which -articles to store on disk. There are two ways to do +articles to store on disk. There are two ways to do this: Number one: In the summary buffer, process mark a set of articles that shall be stored in the agent by saying @samp{#} with point over the -article and then type @samp{J s}. The +article and then type @samp{J s}. The other possibility is to set, again in the summary buffer, downloadable (%) marks for the articles you want by typing @samp{@@} with point over @@ -1873,11 +1873,11 @@ while I'm offline? All you've got to do is to tell Gnus when you are online (plugged) and when you are offline (unplugged), the rest -works automatically. You can toggle plugged/unplugged +works automatically. You can toggle plugged/unplugged state by saying @samp{J j} in group -buffer. To start Gnus unplugged say @samp{M-x +buffer. To start Gnus unplugged say @samp{M-x gnus-unplugged} instead of -@samp{M-x gnus}. Note that for this to +@samp{M-x gnus}. Note that for this to work, the agent must be active. @node FAQ 8 - Getting help @@ -1903,10 +1903,10 @@ How to find information and help inside Emacs? The first stop should be the Gnus manual (Say @samp{C-h i d m Gnus @key{RET}} to start the Gnus manual, then walk through the menus or do a -full-text search with @samp{s}). Then +full-text search with @samp{s}). Then there are the general Emacs help commands starting with C-h, type @samp{C-h ? ?} to get a list -of all available help commands and their meaning. Finally +of all available help commands and their meaning. Finally @samp{M-x apropos-command} lets you search through all available functions and @samp{M-x apropos} searches the bound variables. @@ -1999,10 +1999,10 @@ active file, see the node "The Active File" in the Gnus manual for things you might try to speed the process up. An other idea would be to byte compile your @file{~/.gnus.el} (say @samp{M-x byte-compile-file @key{RET} ~/.gnus.el -@key{RET}} to do it). Finally, if you have require +@key{RET}} to do it). Finally, if you have require statements in your .gnus, you could replace them with @code{with-eval-after-load}, which loads the stuff not at startup -time, but when it's needed. Say you've got this in your +time, but when it's needed. Say you've got this in your @file{~/.gnus.el}: @example @@ -2011,7 +2011,7 @@ time, but when it's needed. Say you've got this in your @end example @noindent -then as soon as you start Gnus, message.el is loaded. If +then as soon as you start Gnus, message.el is loaded. If you replace it with @example @@ -2052,7 +2052,7 @@ Sending mail becomes slower and slower, what's up? The reason could be that you told Gnus to archive the messages you wrote by setting -gnus-message-archive-group. Try to use a nnml group +gnus-message-archive-group. Try to use a nnml group instead of an archive group, this should bring you back to normal speed. @@ -2063,7 +2063,7 @@ to normal speed. @item ~/.gnus.el When the term @file{~/.gnus.el} is used it just means your Gnus -configuration file. You might as well call it @file{~/.gnus} or +configuration file. You might as well call it @file{~/.gnus} or specify another name. @item Back End commit 5dd154deed87695fbfcedb2533651eb83107e7d0 Author: Stefan Kangas Date: Tue Sep 20 20:19:20 2022 +0200 * doc/misc/ede.texi (Extending EDE): Fix reference. diff --git a/doc/misc/ede.texi b/doc/misc/ede.texi index 9867883b24..c0c2ef93d9 100644 --- a/doc/misc/ede.texi +++ b/doc/misc/ede.texi @@ -1031,8 +1031,9 @@ superclasses. In this way, specific behaviors such as how a project is saved, or how a target is compiled can be customized by a project author in detail. @ede{} communicates to these project objects via an API using methods. The commands you use in @ede{} mode are high-level -functional wrappers over these methods. @xref{Top,,, eieio, EIEIO manual}. For -details on using @eieio{} to extending classes, and writing methods. +functional wrappers over these methods. @xref{Top,,, eieio, EIEIO +manual} for details on using @eieio{} to extending classes, and +writing methods. If you intend to extend @ede{}, it is most likely that a new target type is needed in one of the existing project types. The rest of this chapter commit 0d16e567fed642f8887e1d806c5818975d83a12f Author: Philip Kaludercic Date: Tue Sep 20 10:32:26 2022 +0200 ; * doc/misc/rcirc.texi: Prefer 'setopt' over 'setq' diff --git a/doc/misc/rcirc.texi b/doc/misc/rcirc.texi index 5781e974a1..307fe55a63 100644 --- a/doc/misc/rcirc.texi +++ b/doc/misc/rcirc.texi @@ -531,7 +531,7 @@ This variable is used for the default nick. It defaults to the login name returned by @code{user-login-name}. @example -(setq rcirc-default-nick "kensanata") +(setopt rcirc-default-nick "kensanata") @end example @item rcirc-default-port @@ -557,7 +557,7 @@ to the name returned by @code{user-full-name}. If you want to hide your full name, you might want to set it to some pseudonym. @example -(setq rcirc-default-full-name "Curious Minds Want To Know") +(setopt rcirc-default-full-name "Curious Minds Want To Know") @end example @item rcirc-authinfo @@ -575,10 +575,10 @@ followed by the arguments this method requires. Here is an example to illustrate how you would set it: @example -(setq rcirc-authinfo - '(("Libera.Chat" nickserv "bob" "p455w0rd") - ("Libera.Chat" chanserv "bob" "#bobland" "passwd99") - ("bitlbee" bitlbee "robert" "sekrit"))) +(setopt rcirc-authinfo + '(("Libera.Chat" nickserv "bob" "p455w0rd") + ("Libera.Chat" chanserv "bob" "#bobland" "passwd99") + ("bitlbee" bitlbee "robert" "sekrit"))) @end example And here are the valid method symbols and the arguments they require: @@ -821,7 +821,7 @@ You can control which notices get omitted via the omit away messages: @example -(setq rcirc-omit-responses '("JOIN" "PART" "QUIT" "NICK" "AWAY")) +(setopt rcirc-omit-responses '("JOIN" "PART" "QUIT" "NICK" "AWAY")) @end example @vindex rcirc-omit-threshold @@ -840,7 +840,7 @@ and @code{NAMES} messages, after reconnecting, you can configure @code{rcirc-omit-unless-requested} to hide: @example -(setq rcirc-omit-unless-requested '("TOPIC" "NAMES")) +(setopt rcirc-omit-unless-requested '("TOPIC" "NAMES")) @end example Now NAMES will only be displayed, after it has been requested via the @@ -934,7 +934,7 @@ Manual}, for details. how to include the date in the time stamp: @example -(setq rcirc-time-format "%Y-%m-%d %H:%M ") +(setopt rcirc-time-format "%Y-%m-%d %H:%M ") @end example @findex rcirc-when @@ -989,8 +989,8 @@ displayed. A simple configuration to fix the above example might be: (substring str 0 (match-beginning 0)) str))) -(setq rcirc-nick-filter #'my/rcirc-remove-suffix - rcirc-channel-filter #'local/rcirc-soju-suffix) +(setopt rcirc-nick-filter #'my/rcirc-remove-suffix + rcirc-channel-filter #'local/rcirc-soju-suffix) @end smallexample @node Dealing with Bridge Bots commit 9b5fe5d6f1e9b9d044d6dea5b68ed0725d95884a Author: Philip Kaludercic Date: Mon Sep 19 21:18:18 2022 +0200 ; * doc/misc/rcirc.texi: Repunctuate some sentences diff --git a/doc/misc/rcirc.texi b/doc/misc/rcirc.texi index a028697847..5781e974a1 100644 --- a/doc/misc/rcirc.texi +++ b/doc/misc/rcirc.texi @@ -177,7 +177,7 @@ using a different nick. This will prompt you for four things: @cindex server, connecting @cindex Libera.Chat network @item IRC Server -What server do you want to connect to? All the servers in a particular +What server do you want to connect to? All the servers in a particular network are equivalent. Some networks use a round-robin system where a single server redirects new connections to a random server in the network. @code{irc.libera.chat} is such a server for the Libera.Chat @@ -970,16 +970,16 @@ because @code{rcirc-define-command} is not yet available, and without @cindex bouncer Some bouncers multiplex connections to various servers, but have to -modify nicks and channel names to make this work. The channel +modify nicks and channel names to make this work. The channel @code{#emacs} on @code{irc.libera.chat} becomes @code{#emacs/irc.libera.chat}. @vindex rcirc-nick-filter @vindex rcirc-channel-filter The options @code{rcirc-nick-filter} and @code{rcirc-channel-filter} -can be used to make this feel more natural. When set to functions, +can be used to make this feel more natural. When set to functions, these will be used to change how nicks and channel names are -displayed. A simple configuration to fix the above example might be: +displayed. A simple configuration to fix the above example might be: @smallexample (defun my/rcirc-remove-suffix (STR) commit 6795b93d06917806cf0b8a962c5aef92c7a27343 Author: Philip Kaludercic Date: Mon Sep 19 21:17:09 2022 +0200 ; Don't set nil to be a face fore-/background * lisp/net/rcirc.el (rcirc-color-attributes): Check if the parsed background or foreground is nil before using it. diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index 5e48b3c70f..eb3b48da6e 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el @@ -3042,10 +3042,8 @@ indicated by RESPONSE)." ((<= 0 bg (1- (length rcirc-color-codes))))) (setq background (aref rcirc-color-codes bg))) (rcirc-add-face (match-beginning 0) (match-end 0) - `(face (:foreground - ,foreground - :background - ,background)))))) + `(face (,@(and foreground (list :foreground foreground)) + ,@(and background (list :background background)))))))) (defun rcirc-remove-markup-codes (_sender _response) "Remove ASCII control codes used to designate markup." commit 1d9a8884db63d430c96ce53e3d24c278dd8dbd8c Author: Philip Kaludercic Date: Mon Sep 19 21:15:04 2022 +0200 Have rcirc handle bridge bots * doc/misc/rcirc.texi (Dealing with Bridge Bots): Document new feature. * etc/NEWS: Mention the new feature. * lisp/net/rcirc.el (rcirc-markup-text-functions): Add new markup function (rcirc-pseudo-nicks): Add new local variable. (rcirc-channel-nicks): Use 'rcirc-pseudo-nicks' for nick completion. (rcirc-bridge-bot-alist): Add new user option. (rcirc-bridged-nick): Add new face. (rcirc-markup-bridge-bots): Add new function. diff --git a/doc/misc/rcirc.texi b/doc/misc/rcirc.texi index 8c798d6c33..a028697847 100644 --- a/doc/misc/rcirc.texi +++ b/doc/misc/rcirc.texi @@ -859,6 +859,7 @@ Here are some examples of stuff you can do to configure @code{rcirc}. * Changing the time stamp format:: * Defining a new command:: * Using rcirc with bouncers:: +* Dealing with Bridge Bots:: @end menu @node Skipping /away messages using handlers @@ -992,6 +993,46 @@ displayed. A simple configuration to fix the above example might be: rcirc-channel-filter #'local/rcirc-soju-suffix) @end smallexample +@node Dealing with Bridge Bots +@section Dealing with Bridge Bots +@cindex bridge + +It is increasingly common for IRC channels to be ``bridged'' onto +other networks such as XMPP, Matrix, etc. Sometimes the software does +a good job at mapping each non-IRC user into an IRC user, but more +often than not it doesn't. In that case you might receive a message +like: + +@example +@verbatim +09:47 I am not on IRC +@end verbatim +@end example + +where @samp{bridge} is a bot responsible for sending messages back and +forth between networks, and @samp{john} is the user name of someone on +a different network. Note that the bot indicates this within the +message (@verb{| I am not on IRC|}) that appears in your chat +buffer. + +@vindex rcirc-bridge-bot-alist +If this annoys you, the user option @code{rcirc-bridge-bot-alist} may +be of use. It consists of descriptions of what users are these kinds +of ``bridge bots'' and how they format their messages. To handle the +above example, we might set the user option to: + +@example +(setopt rcirc-bridge-bot-alist + '(("bridge" . "<\\(.+?\\)>[[:space:]]+"))) +@end example + +If there is an entry for the current user, @code{rcirc} will take the +associated regular expression and try to find a match in the message +string. If it manages to find anything, the matching expression is +deleted from the message. The regular expression must contain at +least one group that will match the user name of the bridged message. +This will then be used to replace the username of the bridge bot. + @node GNU Free Documentation License @appendix GNU Free Documentation License @include doclicense.texi diff --git a/etc/NEWS b/etc/NEWS index 9b4238eea7..5e34f43179 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1060,6 +1060,22 @@ Rcirc will use the default 'completion-at-point' mechanism. The conventional IRC behavior of completing by cycling through the available options can be restored by enabling this option. ++++ +*** New user option 'rcirc-bridge-bot-alist'. +If you are in a channel where a bot is responsible for bridging +between networks, you can use this variable to make these messages +appear more native. For example you might set the option to: + + (setq rcirc-bridge-bot-alist '(("bridge" . "{\\(.+?\\)}[[:space:]]+"))) + +for messages like + + 09:47 {john} I am not on IRC + +to be reformatted into + + 09:47 I am not on IRC + ** Imenu +++ diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index abb67da95f..5e48b3c70f 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el @@ -1925,7 +1925,8 @@ PROCESS is the process object for the current connection." rcirc-markup-my-nick rcirc-markup-urls rcirc-markup-keywords - rcirc-markup-bright-nicks) + rcirc-markup-bright-nicks + rcirc-markup-bridge-bots) "List of functions used to manipulate text before it is printed. Each function takes two arguments, SENDER, and RESPONSE. The @@ -2220,24 +2221,27 @@ PROCESS is the process object for the current connection." (puthash nick newchans rcirc-nick-table) (remhash nick rcirc-nick-table))))) +(defvar rcirc-pseudo-nicks) (defun rcirc-channel-nicks (process target) "Return the list of nicks associated with TARGET sorted by last activity. PROCESS is the process object for the current connection." (when target (if (rcirc-channel-p target) - (with-rcirc-process-buffer process - (let (nicks) - (maphash - (lambda (k v) - (let ((record (assoc-string target v t))) - (if record - (setq nicks (cons (cons k (cdr record)) nicks))))) - rcirc-nick-table) - (mapcar (lambda (x) (car x)) - (sort nicks (lambda (x y) - (let ((lx (or (cdr x) 0)) - (ly (or (cdr y) 0))) - (< ly lx))))))) + (let ((pseudo-nicks (mapcar #'list rcirc-pseudo-nicks))) + (with-rcirc-process-buffer process + (let (nicks) + (maphash + (lambda (k v) + (let ((record (assoc-string target v t))) + (if record + (setq nicks (cons (cons k (cdr record)) nicks))))) + rcirc-nick-table) + (mapcar (lambda (x) (car x)) + (sort (nconc pseudo-nicks nicks) + (lambda (x y) + (let ((lx (or (cdr x) 0)) + (ly (or (cdr y) 0))) + (< ly lx)))))))) (list target)))) (defun rcirc-ignore-update-automatic (nick) @@ -2911,6 +2915,78 @@ If ARG is given, opens the URL in a new browser window." (insert (rcirc-facify (format-time-string rcirc-time-format time) 'rcirc-timestamp)))) +(defvar-local rcirc-pseudo-nicks '() + "List of virtual nicks detected in a channel. +These are collected by `rcirc-markup-bridge-bots' and don't +constitute actual users in the current channel. Usually these +are bridged via a some bot as described in +`rcirc-bridge-bot-alist'.") + +(defcustom rcirc-bridge-bot-alist '() + "Alist for handling bouncers by `rcirc-markup-bridge-bots'. +Each entry has the form (NAME . REGEXP), where NAME is the user +name of a bouncer and REGEXP is a pattern used to match the +message. The matching part of the message will be stripped from +the message, and the first match group will replace the user name +of the bot. Any matched name will noted and used in some cases +for nick completion." + :type '(alist :key-type (string :tag "Bot name") + :value-type regexp) + :version "29.1") + +(defface rcirc-bridged-nick + '((((class color) (min-colors 88) (background light)) :background "SlateGray1") + (((class color) (min-colors 88) (background dark)) :background "DarkSlateGray4") + (((class color) (min-colors 16) (background light)) :background "LightBlue") + (((class color) (min-colors 16) (background dark)) :background "DarkSlateGray") + (t :background "blue")) + "Face used for pseudo-nick ." + :version "29.1") + +(defun rcirc-markup-bridge-bots (sender response) + "Detect and reformat bridged messages to appear more natural. +The user option `rcirc-bridge-bot-alist' specified what SENDER to +handle. This function only operates on direct messages (as +indicated by RESPONSE)." + (catch 'quit + (atomic-change-group + (save-match-data + (when-let* (((string= response "PRIVMSG")) + (regexp (alist-get sender rcirc-bridge-bot-alist + nil nil #'string=)) + ((search-forward-regexp regexp nil t)) + (nick (match-string-no-properties 1))) + (replace-match "") ;delete the bot string + (unless (member nick rcirc-pseudo-nicks) + (push nick rcirc-pseudo-nicks)) + (goto-char (point-min)) + (let ((fmt (alist-get "PRIVMSG" rcirc-response-formats + nil nil #'string=)) + (hl-face (cond ((member sender rcirc-bright-nicks) + 'rcirc-bright-nick) + ((member sender rcirc-dim-nicks) + 'rcirc-dim-nick) + (t 'rcirc-other-nick))) + hl-username-p) + (when (string-match (rx (* "%%") "%" (group (or ?N ?n))) fmt) + (when (string= (match-string 1 fmt) "N") + (setq hl-username-p t)) + (search-forward-regexp + (format-spec + (alist-get "PRIVMSG" rcirc-response-formats + nil nil #'string=) + `((?m . "") (?r . "") (?t . "") (?f . "") + (?N . ,(rx (group (+? nonl)))) + (?n . ,(rx (group (+? nonl)))))) + nil t) + (replace-match + (propertize + nick + 'help-echo (format "Message bridged via %s" sender) + 'face `(,@(and hl-username-p (list hl-face)) + rcirc-bridged-nick)) + nil t nil 1)))))))) + (defun rcirc-markup-attributes (_sender _response) "Highlight IRC markup, indicated by ASCII control codes." (while (re-search-forward commit 96d2fb8d798fd8a3a7b34ccf46ed584384c7a9fe Merge: 814fd3057f cefda4a6c5 Author: Michael Albinus Date: Tue Sep 20 18:36:20 2022 +0200 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs commit 814fd3057fb8f3122db86f30fde014f5e19502f5 Author: Michael Albinus Date: Tue Sep 20 18:35:57 2022 +0200 ; Minor Tramp cleanups * lisp/net/tramp.el (tramp-build-remote-file-name-spec-regexp): Handle the `simplified' syntax better. (tramp-handle-file-name-case-insensitive-p): Do not unquote candidate. diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index f18e4c41c3..55c7cd5f37 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -1087,18 +1087,34 @@ Derived from `tramp-postfix-host-format'.") (defun tramp-build-remote-file-name-spec-regexp () "Construct a regexp matching a Tramp file name for a Tramp syntax. It is expected, that `tramp-syntax' has the proper value." - (tramp-compat-rx - ;; Method. - (group (regexp tramp-method-regexp)) (regexp tramp-postfix-method-regexp) - ;; Optional user. This includes domain. - (? (group (regexp tramp-user-regexp)) (regexp tramp-postfix-user-regexp)) - ;; Optional host. - (? (group (| (regexp tramp-host-regexp) - (: (regexp tramp-prefix-ipv6-regexp) - (? (regexp tramp-ipv6-regexp)) - (regexp tramp-postfix-ipv6-regexp))) - ;; Optional port. - (? (regexp tramp-prefix-port-regexp) (regexp tramp-port-regexp)))))) + ;; Starting with Emacs 27, we can use `rx-let'. + (let* ((user-regexp + (tramp-compat-rx + (group-n 6 (regexp tramp-user-regexp)) + (regexp tramp-postfix-user-regexp))) + (host-regexp + (tramp-compat-rx + (group-n 7 (| (regexp tramp-host-regexp) + (: (regexp tramp-prefix-ipv6-regexp) + (? (regexp tramp-ipv6-regexp)) + (regexp tramp-postfix-ipv6-regexp))) + ;; Optional port. + (? (regexp tramp-prefix-port-regexp) + (regexp tramp-port-regexp))))) + (user-host-regexp + (if (eq tramp-syntax 'simplified) + ;; There must be either user or host. + (tramp-compat-rx + (| (: (regexp user-regexp) (? (regexp host-regexp))) + (: (? (regexp user-regexp)) (regexp host-regexp)))) + (tramp-compat-rx + (? (regexp user-regexp)) (? (regexp host-regexp)))))) + (tramp-compat-rx + ;; Method. + (group-n 5 (regexp tramp-method-regexp)) + (regexp tramp-postfix-method-regexp) + ;; User and host. + (regexp user-host-regexp)))) (defvar tramp-remote-file-name-spec-regexp nil ; Initialized when defining `tramp-syntax'! @@ -3904,9 +3920,7 @@ Let-bind it when necessary.") (with-tramp-progress-reporter v 5 "Checking case-insensitive" ;; The idea is to compare a file with lower case ;; letters with the same file with upper case letters. - (let ((candidate - (tramp-compat-file-name-unquote - (directory-file-name filename))) + (let ((candidate (directory-file-name filename)) case-fold-search tmpfile) ;; Check, whether we find an existing file with commit cefda4a6c521a01b031f5e94a31473a91d06eaea Author: Juri Linkov Date: Tue Sep 20 19:11:58 2022 +0300 * lisp/outline.el: Bind margin mouse event to cycle outlines (bug#57813) (outline-minor-mode): In mode keymap bind 'right/left-margin mouse-1' to outline-cycle, and 'right/left-margin S-mouse-1' to outline-cycle-buffer. (outline-hide-subtree, outline-show-subtree): Add save-excursion to keep point unmoved after mouse click. (outline-cycle): Add optional arg 'event' like in outline-hide-subtree and outline-show-subtree, and add save-excursion to keep point unmoved after mouse click. (outline--make-button-overlay, outline--make-margin-overlay): Put overlay property 'evaporate' to t. (outline--insert-open-button, outline--insert-close-button): Remove temporary attempts to bind margin-local mouse events. diff --git a/lisp/outline.el b/lisp/outline.el index 3aebc25e13..3503ba2265 100644 --- a/lisp/outline.el +++ b/lisp/outline.el @@ -490,6 +490,10 @@ See the command `outline-mode' for more information on this mode." :keymap (define-keymap :parent outline-minor-mode-cycle-map "" outline-minor-mode-menu-bar-map + " " 'outline-cycle + " " 'outline-cycle + " S-" 'outline-cycle-buffer + " S-" 'outline-cycle-buffer (key-description outline-minor-mode-prefix) outline-mode-prefix-map) (if outline-minor-mode (progn @@ -1051,9 +1055,10 @@ Note that this does not hide the lines preceding the first heading line." "Hide everything after this heading at deeper levels. If non-nil, EVENT should be a mouse event." (interactive (list last-nonmenu-event)) - (when (mouse-event-p event) - (mouse-set-point event)) - (outline-flag-subtree t)) + (save-excursion + (when (mouse-event-p event) + (mouse-set-point event)) + (outline-flag-subtree t))) (defun outline--make-button-overlay (type) (let ((o (seq-find (lambda (o) @@ -1061,6 +1066,7 @@ If non-nil, EVENT should be a mouse event." (overlays-at (point))))) (unless o (setq o (make-overlay (point) (1+ (point)))) + (overlay-put o 'evaporate t) (overlay-put o 'follow-link 'mouse-face) (overlay-put o 'mouse-face 'highlight) (overlay-put o 'outline-button t)) @@ -1088,8 +1094,7 @@ If non-nil, EVENT should be a mouse event." (overlays-at (point))))) (unless o (setq o (make-overlay (point) (1+ (point)))) - (overlay-put o 'follow-link 'mouse-face) - (overlay-put o 'mouse-face 'highlight) + (overlay-put o 'evaporate t) (overlay-put o 'outline-margin t)) (let ((icon (icon-elements (if (eq type 'close) (if outline--use-rtl @@ -1111,11 +1116,7 @@ If non-nil, EVENT should be a mouse event." (save-excursion (beginning-of-line) (if use-margins - (let ((o (outline--make-margin-overlay 'open))) - (overlay-put o 'help-echo "Click to hide") - (overlay-put o 'keymap - (define-keymap - "" #'outline-hide-subtree))) + (outline--make-margin-overlay 'open) (when (derived-mode-p 'special-mode) (let ((inhibit-read-only t)) (insert " ") @@ -1125,19 +1126,14 @@ If non-nil, EVENT should be a mouse event." (overlay-put o 'keymap (define-keymap "RET" #'outline-hide-subtree - "" #'outline-hide-subtree - " " #'outline-hide-subtree))))))) + "" #'outline-hide-subtree))))))) (defun outline--insert-close-button (&optional use-margins) (with-silent-modifications (save-excursion (beginning-of-line) (if use-margins - (let ((o (outline--make-margin-overlay 'close))) - (overlay-put o 'help-echo "Click to show") - (overlay-put o 'keymap - (define-keymap - "" #'outline-show-subtree))) + (outline--make-margin-overlay 'close) (when (derived-mode-p 'special-mode) (let ((inhibit-read-only t)) (insert " ") @@ -1147,8 +1143,7 @@ If non-nil, EVENT should be a mouse event." (overlay-put o 'keymap (define-keymap "RET" #'outline-show-subtree - "" #'outline-show-subtree - " " #'outline-show-subtree))))))) + "" #'outline-show-subtree))))))) (defun outline--fix-up-all-buttons (&optional from to) (when (or outline--use-buttons outline--use-margins) @@ -1182,11 +1177,13 @@ If non-nil, EVENT should be a mouse event." (define-obsolete-function-alias 'hide-leaves #'outline-hide-leaves "25.1") (defun outline-show-subtree (&optional event) - "Show everything after this heading at deeper levels." + "Show everything after this heading at deeper levels. +If non-nil, EVENT should be a mouse event." (interactive (list last-nonmenu-event)) - (when (mouse-event-p event) - (mouse-set-point event)) - (outline-flag-subtree nil)) + (save-excursion + (when (mouse-event-p event) + (mouse-set-point event)) + (outline-flag-subtree nil))) (define-obsolete-function-alias 'show-subtree #'outline-show-subtree "25.1") @@ -1661,7 +1658,7 @@ Return either `hide-all', `headings-only', or `show-all'." (< (save-excursion (outline-next-heading) (point)) (save-excursion (outline-end-of-subtree) (point))))) -(defun outline-cycle () +(defun outline-cycle (&optional event) "Cycle visibility state of the current heading line's body. This cycles the visibility of the current heading line's subheadings @@ -1669,23 +1666,28 @@ and body between `hide all', `headings only' and `show all'. `Hide all' means hide all the subheadings and their bodies. `Headings only' means show the subheadings, but not their bodies. -`Show all' means show all the subheadings and their bodies." - (interactive) - (condition-case nil - (pcase (outline--cycle-state) - ('hide-all - (if (outline-has-subheading-p) - (progn (outline-show-children) - (message "Only headings")) +`Show all' means show all the subheadings and their bodies. + +If non-nil, EVENT should be a mouse event." + (interactive (list last-nonmenu-event)) + (save-excursion + (when (mouse-event-p event) + (mouse-set-point event)) + (condition-case nil + (pcase (outline--cycle-state) + ('hide-all + (if (outline-has-subheading-p) + (progn (outline-show-children) + (message "Only headings")) + (outline-show-subtree) + (message "Show all"))) + ('headings-only (outline-show-subtree) - (message "Show all"))) - ('headings-only - (outline-show-subtree) - (message "Show all")) - ('show-all - (outline-hide-subtree) - (message "Hide all"))) - (outline-before-first-heading nil))) + (message "Show all")) + ('show-all + (outline-hide-subtree) + (message "Hide all"))) + (outline-before-first-heading nil)))) (defvar-local outline--cycle-buffer-state 'show-all "Internal variable used for tracking buffer cycle state.") commit 120ade62cd26dd502f1ae3784079e4cd88607a0b Author: Robert Pluim Date: Mon Sep 19 15:53:52 2022 +0200 Allow keymap to override advertised-binding in docstrings Previously (substitute-command-keys "\\\\[undo]") would use the global advertised-binding for `undo', even though there's a binding in `undo-repeat-map', which is highly counter-intuitive. Now the binding is looked up in the specified keymap first. * lisp/help.el (substitute-command-keys): Restrict the initial key lookup to the specified keymap (if there is one). (Bug#51384) diff --git a/lisp/help.el b/lisp/help.el index 92b87cf799..0ec5b9c85b 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -1204,7 +1204,10 @@ Otherwise, return a new string." (delete-char 2) (let* ((fun (intern (buffer-substring (point) (1- end-point)))) (key (with-current-buffer orig-buf - (where-is-internal fun keymap t)))) + (where-is-internal fun + (and keymap + (list keymap)) + t)))) (if (not key) ;; Function is not on any key. (let ((op (point))) commit 01ceb23372e6af635f57c3ff3a8860b9035df3b0 Author: Robert Pluim Date: Mon Sep 19 15:29:27 2022 +0200 Specify keymap in gnus-custom-mode docstring * lisp/gnus/gnus-cus.el (gnus-custom-mode): Put in the keymap to use, otherwise the bindings are looked up in the global map (where they don't exist). diff --git a/lisp/gnus/gnus-cus.el b/lisp/gnus/gnus-cus.el index ddd939794d..32c475239e 100644 --- a/lisp/gnus/gnus-cus.el +++ b/lisp/gnus/gnus-cus.el @@ -36,11 +36,11 @@ (define-derived-mode gnus-custom-mode fundamental-mode "Gnus Customize" "Major mode for editing Gnus customization buffers. -The following commands are available: +The following commands are available:\\ \\[widget-forward] Move to next button or editable field. \\[widget-backward] Move to previous button or editable field. -\\[widget-button-click] Activate button under the mouse pointer. +\\[widget-button-click] Activate button under the mouse pointer. \\[widget-button-press] Activate button under point. Entry to this mode calls the value of `gnus-custom-mode-hook' commit f372afef20eaa0ba139f378a6481b147d93c060d Author: Drew Adams Date: Tue Sep 20 17:11:47 2022 +0200 Tweak how use-region-p works with `use-empty-active-region' * lisp/simple.el (use-region-p): Don't report non-nil if the user has just clicked mouse-1 without extending the region (bug#51874). diff --git a/lisp/simple.el b/lisp/simple.el index 1b9bf9fa6d..aed1547b15 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -6887,6 +6887,11 @@ The return value is t if Transient Mark mode is enabled and the mark is active; furthermore, if `use-empty-active-region' is nil, the region must not be empty. Otherwise, the return value is nil. +If `use-empty-active-region' is non-nil, there is one further +caveat: If the user has used `mouse-1' to set point, but used the +mouse to move point to a different character yet, this function +returns nil. + For some commands, it may be appropriate to ignore the value of `use-empty-active-region'; in that case, use `region-active-p'. @@ -6894,8 +6899,10 @@ Also see the convenience functions `use-region-beginning' and `use-region-end', which may be handy when writing `interactive' specs." (and (region-active-p) - (or use-empty-active-region (> (region-end) (region-beginning))) - t)) + (or (> (region-end) (region-beginning)) + (and use-empty-active-region + (not (eq (car-safe last-input-event) 'down-mouse-1)) + (not (mouse-movement-p last-input-event)))))) (defun region-active-p () "Return t if Transient Mark mode is enabled and the mark is active. commit 127ab231be4ab3aea460ded1c8efa79fc7d39164 Author: Lars Ingebrigtsen Date: Tue Sep 20 16:47:21 2022 +0200 Attempt to clarify Input Focus documentation * doc/lispref/frames.texi (Input Focus): Try to clarify the documentation (bug#51862). diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi index 262b86672d..e38a81d3e7 100644 --- a/doc/lispref/frames.texi +++ b/doc/lispref/frames.texi @@ -2997,17 +2997,25 @@ explicit focus notifications.) @end defun @defvar after-focus-change-function -This function is an extension point that code can use to receive a -notification that focus has changed. - -This function is called with no arguments when Emacs notices that the -set of focused frames may have changed. Code wanting to do something -when frame focus changes should use @code{add-function} to add a -function to this one, and in this added function, re-scan the set of -focused frames, calling @code{frame-focus-state} to retrieve the last -known focus state of each frame. Focus events are delivered -asynchronously, and frame input focus according to an external system -may not correspond to the notion of the Emacs selected frame. +This function is called with no arguments when Emacs notices that a +frame may have gotten or lost focus. Focus events are delivered +asynchronously, and may not be delivered in the expected order, so +code that wants to do something depending on the state of focused +frames have go through all the frames and check. + +For instance, here's a simple example function that sets the +background color based on whether the frame has focus or not: + +@lisp +(add-function :after after-focus-change-function + #'my-change-background) +(defun my-change-background () + (dolist (frame (frame-list)) + (pcase (frame-focus-state frame) + (`t (set-face-background 'default "black" frame)) + (`nil (set-face-background 'default "#404040" frame))))) +@end lisp + Multiple frames may appear to have input focus simultaneously due to focus event delivery differences, the presence of multiple Emacs terminals, and other factors, and code should be robust in the face of commit 523821ed046878f70e5022f9ce27a34ee742ade4 Author: Gregory Heytings Date: Tue Sep 20 14:12:31 2022 +0000 Improve display of advices on build failures. * Makefile.in: Use three leading '*' characters, and redirect to stderr. diff --git a/Makefile.in b/Makefile.in index c841804757..79a1d4204c 100644 --- a/Makefile.in +++ b/Makefile.in @@ -380,37 +380,37 @@ bootstrap-all: actual-all: ${SUBDIR} info $(gsettings_SCHEMAS:.xml=.valid) src-depending-on-lisp # ADVICE-ON-FAILURE-BEGIN:all -# You might try to: -# - run "make bootstrap", which might fix the problem -# - run "make V=1", which displays the full commands invoked by make, -# ​ to further investigate the problem +# You might try to: +# - run "make bootstrap", which might fix the problem +# - run "make V=1", which displays the full commands invoked by make, +# to further investigate the problem # ADVICE-ON-FAILURE-END:all # ADVICE-ON-FAILURE-BEGIN:bootstrap -# You might try to: -# - run "make extraclean" and run "make" again (or, equivalently, run -# ​ "make bootstrap configure=default"), to rebuild Emacs with the -# ​ default configuration options, which might fix the problem -# - run "git clean -fdx" and run "make bootstrap" again, which might -# ​ fix the problem if "make bootstrap configure=default" did not -# ​ !BEWARE! "git clean -fdx" deletes all files that are not under -# ​ !BEWARE! version control, which means that all changes to such -# ​ !BEWARE! files will be lost and cannot be restored later -# - run "make V=1", which displays the full commands invoked by make, -# ​ to further investigate the problem -# - report the problem and ask for help by sending an email to -# ​ bug-gnu-emacs@gnu.org, mentioning at least the build error -# ​ message, the platform, and the repository revision displayed by -# ​ "git rev-parse HEAD" +# You might try to: +# - run "make extraclean" and run "make" again (or, equivalently, run +# "make bootstrap configure=default"), to rebuild Emacs with the +# default configuration options, which might fix the problem +# - run "git clean -fdx" and run "make bootstrap" again, which might +# fix the problem if "make bootstrap configure=default" did not +# !BEWARE! "git clean -fdx" deletes all files that are not under +# !BEWARE! version control, which means that all changes to such +# !BEWARE! files will be lost and cannot be restored later +# - run "make V=1", which displays the full commands invoked by make, +# to further investigate the problem +# - report the problem and ask for help by sending an email to +# bug-gnu-emacs@gnu.org, mentioning at least the build error +# message, the platform, and the repository revision displayed by +# "git rev-parse HEAD" # ADVICE-ON-FAILURE-END:bootstrap advice-on-failure: - @echo - @echo " \"make ${make-target}\" failed with exit status ${exit-status}." + @echo >&2 '***' + @echo >&2 '*** '"\"make ${make-target}\" failed with exit status ${exit-status}." @cat Makefile | \ sed -n '/^# ADVICE-ON-FAILURE-BEGIN:${make-target}/,$${p;/^# ADVICE-ON-FAILURE-END:${make-target}/q};' | \ - sed 's/^# //' | grep -v '^ADVICE-ON-FAILURE-' - @echo + sed 's/^# /*** /' | grep -v '^*** ADVICE-ON-FAILURE-' >&2 + @echo >&2 '***' @exit ${exit-status} sanity-check: @@ -418,12 +418,12 @@ sanity-check: '(progn (defun f (n) (if (= 0 n) 1 (* n (f (- n 1))))) (princ (f 10)))' \ 2> /dev/null); \ [ "X$$v" = "X3628800" ] && exit 0; \ - echo; \ - echo " \"make ${make-target}\" succeeded, but Emacs is not functional."; \ + echo >&2 '***'; \ + echo >&2 '*** '"\"make ${make-target}\" succeeded, but Emacs is not functional."; \ cat Makefile | \ sed -n '/^# ADVICE-ON-FAILURE-BEGIN:${make-target}/,$${p;/^# ADVICE-ON-FAILURE-END:${make-target}/q};' | \ - sed 's/^# //' | grep -v '^ADVICE-ON-FAILURE-'; \ - echo; \ + sed 's/^# /*** /' | grep -v '^*** ADVICE-ON-FAILURE-' >&2; \ + echo >&2 '***'; \ exit 1 .PHONY: all ${SUBDIR} blessmail epaths-force epaths-force-w32 epaths-force-ns-self-contained etc-emacsver commit f419c507a778b87edd95983e8ea37f162ce50bf3 Author: Michael Albinus Date: Tue Sep 20 14:07:45 2022 +0200 Wrap max-specpdl-size with with-no-warnings in Tramp * lisp/net/tramp-archive.el (max-specpdl-size): * lisp/net/tramp-gvfs.el (max-specpdl-size): Wrap with `with-no-warnings'. diff --git a/lisp/net/tramp-archive.el b/lisp/net/tramp-archive.el index 9ff5d6ac75..b343e460df 100644 --- a/lisp/net/tramp-archive.el +++ b/lisp/net/tramp-archive.el @@ -112,8 +112,10 @@ (eval-when-compile (require 'cl-lib)) ;; Sometimes, compilation fails with "Variable binding depth exceeds ;; max-specpdl-size". Shall be fixed in Emacs 27. -(eval-and-compile - (let ((max-specpdl-size (* 2 max-specpdl-size))) (require 'tramp-gvfs))) +(with-no-warnings ;; max-specpdl-size + (eval-and-compile + (let ((max-specpdl-size (* 2 max-specpdl-size))) + (require 'tramp-gvfs)))) (autoload 'dired-uncache "dired") (autoload 'url-tramp-convert-url-to-tramp "url-tramp") @@ -343,6 +345,7 @@ arguments to pass to the OPERATION." (tramp-register-file-name-handlers) (tramp-archive-run-real-handler operation args)) + (with-no-warnings ;; max-specpdl-size (let* ((filename (apply #'tramp-archive-file-name-for-operation operation args)) (archive (tramp-archive-file-name-archive filename)) @@ -376,7 +379,7 @@ arguments to pass to the OPERATION." (setq args (cons operation args))) (if fn (save-match-data (apply (cdr fn) args)) - (tramp-archive-run-real-handler operation args))))))) + (tramp-archive-run-real-handler operation args)))))))) ;;;###autoload (progn (defun tramp-archive-autoload-file-name-handler (operation &rest args) diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el index cf23676b0c..477f8fb3fd 100644 --- a/lisp/net/tramp-gvfs.el +++ b/lisp/net/tramp-gvfs.el @@ -2505,6 +2505,7 @@ This uses \"avahi-browse\" in case D-Bus is not enabled in Avahi." result)))) (when tramp-gvfs-enabled + (with-no-warnings ;; max-specpdl-size ;; Suppress D-Bus error messages and Tramp traces. (let (;; Sometimes, it fails with "Variable binding depth exceeds ;; max-specpdl-size". Shall be fixed in Emacs 27. @@ -2562,7 +2563,7 @@ This uses \"avahi-browse\" in case D-Bus is not enabled in Avahi." "mtp" (mapcar (lambda (method) `(tramp-parse-media-names ,(format "_%s._tcp" method))) - tramp-media-methods)))) + tramp-media-methods))))) (add-hook 'tramp-unload-hook (lambda () commit 32d3cf6298460b68e710420c14db3fdc882d70f8 Author: Lars Ingebrigtsen Date: Tue Sep 20 14:04:09 2022 +0200 Mention compilation in the Package Installation node * doc/emacs/package.texi (Package Installation): Mention that packages are compiled (bug#51660). diff --git a/doc/emacs/package.texi b/doc/emacs/package.texi index 7e16c82cf5..420da09097 100644 --- a/doc/emacs/package.texi +++ b/doc/emacs/package.texi @@ -421,13 +421,13 @@ lower-priority archives will not be shown in the menu, if the same package is available from a higher-priority archive. (This is controlled by the value of @code{package-menu-hide-low-priority}.) - Once a package is downloaded and installed, it is made available to -the current Emacs session. Making a package available adds its -directory to @code{load-path} and loads its autoloads. The effect of -a package's autoloads varies from package to package. Most packages -just make some new commands available, while others have more -wide-ranging effects on the Emacs session. For such information, -consult the package's help buffer. + Once a package is downloaded, byte-compiled and installed, it is +made available to the current Emacs session. Making a package +available adds its directory to @code{load-path} and loads its +autoloads. The effect of a package's autoloads varies from package to +package. Most packages just make some new commands available, while +others have more wide-ranging effects on the Emacs session. For such +information, consult the package's help buffer. Installed packages are automatically made available by Emacs in all subsequent sessions. This happens at startup, before processing the commit d989fc89972a7b2c1bef9000cca275ce85bd69c6 Author: Lars Ingebrigtsen Date: Tue Sep 20 13:55:39 2022 +0200 Allow hl-line-mode so work when global-hl-line-mode is active * lisp/hl-line.el (hl-line-mode): Allow switching off the global mode in the current buffer (bug#51580). diff --git a/lisp/hl-line.el b/lisp/hl-line.el index e5ca6819f0..693c94eea8 100644 --- a/lisp/hl-line.el +++ b/lisp/hl-line.el @@ -154,6 +154,12 @@ non-selected window. Hl-Line mode uses the function When `hl-line-sticky-flag' is nil, Hl-Line mode highlights the line about point in the selected window only." :group 'hl-line + ;; If the global mode is switched on, then `M-x hl-line-mode' should + ;; switch the mode off in this buffer. + (when global-hl-line-mode + (setq hl-line-mode nil) + (setq-local global-hl-line-mode nil) + (global-hl-line-unhighlight)) (if hl-line-mode (progn ;; In case `kill-all-local-variables' is called. commit 0be83e07dde2d12eb4ee170f291d7a415b614a22 Author: Eli Zaretskii Date: Tue Sep 20 14:53:22 2022 +0300 ; * etc/NEWS: Fix capitalization. diff --git a/etc/NEWS b/etc/NEWS index 821da805ca..9b4238eea7 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -181,7 +181,7 @@ of 'user-emacs-directory'. * Incompatible changes in Emacs 29.1 +++ -*** bookmarks no longer include context for encrypted files. +*** Bookmarks no longer include context for encrypted files. If you're visiting an encrypted file, setting a bookmark no longer includes excerpts from that buffer in the bookmarks file. commit a498e5f8301eeb3bf7b15136469449ab4c93b99a Author: Lars Ingebrigtsen Date: Tue Sep 20 13:33:07 2022 +0200 Get fewer false positives for :keyword and &options * lisp/emacs-lisp/lisp-mode.el (lisp-mode--search-key): New function to check more carefully for start of :keywords and &options (bug#51574). (lisp-fdefs): Use it. diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index c906ee6e31..7e39a77aed 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -325,6 +325,20 @@ This will generate compile-time constants from BINDINGS." (throw 'matched t))) (throw 'matched nil))))) +(defun lisp-mode--search-key (char bound) + (catch 'found + (while (re-search-forward + (concat "\\_<" char (rx lisp-mode-symbol) "\\_>") + bound t) + (when (or (< (match-beginning 0) (+ (point-min) 2)) + ;; A quoted white space before the &/: means that this + ;; is not the start of a :keyword or an &option. + (not (eql (char-after (- (match-beginning 0) 2)) + ?\\)) + (not (memq (char-after (- (match-beginning 0) 1)) + '(?\s ?\n ?\t)))) + (throw 'found t))))) + (let-when-compile ((lisp-fdefs '("defmacro" "defun")) (lisp-vdefs '("defvar")) @@ -496,11 +510,11 @@ This will generate compile-time constants from BINDINGS." (,(rx "\\\\=") (0 font-lock-builtin-face prepend)) ;; Constant values. - (,(concat "\\_<:" (rx lisp-mode-symbol) "\\_>") + (,(lambda (bound) (lisp-mode--search-key ":" bound)) (0 font-lock-builtin-face)) ;; ELisp and CLisp `&' keywords as types. - (,(concat "\\_<&" (rx lisp-mode-symbol) "\\_>") - . font-lock-type-face) + (,(lambda (bound) (lisp-mode--search-key "&" bound)) + (0 font-lock-builtin-face)) ;; ELisp regexp grouping constructs (,(lambda (bound) (catch 'found @@ -549,11 +563,12 @@ This will generate compile-time constants from BINDINGS." ;; must come before keywords below to have effect (,(concat "#:" (rx lisp-mode-symbol) "") 0 font-lock-builtin-face) ;; Constant values. - (,(concat "\\_<:" (rx lisp-mode-symbol) "\\_>") + (,(lambda (bound) (lisp-mode--search-key ":" bound)) (0 font-lock-builtin-face)) ;; ELisp and CLisp `&' keywords as types. - (,(concat "\\_<&" (rx lisp-mode-symbol) "\\_>") - . font-lock-type-face) + (,(lambda (bound) (lisp-mode--search-key "&" bound)) + (0 font-lock-builtin-face)) + ;; ELisp regexp grouping constructs ;; This is too general -- rms. ;; A user complained that he has functions whose names start with `do' ;; and that they get the wrong color. commit e5de29aa47e96f675b7f4ef3a7f84bd30d68ea0f Author: Stefan Kangas Date: Tue Sep 20 11:46:18 2022 +0200 Obsolete unused variable in debug.el * lisp/emacs-lisp/debug.el (debugger-previous-backtrace): Make unused variable obsolete. diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index 460057b3af..f78d44cf98 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el @@ -110,10 +110,6 @@ The value used here is passed to `quit-restore-window'." (defvar debugger-previous-window-height nil "The last recorded height of `debugger-previous-window'.") -(defvar debugger-previous-backtrace nil - "The contents of the previous backtrace (including text properties). -This is to optimize `debugger-make-xrefs'.") - (defvar debugger-outer-match-data) (defvar debugger-will-be-back nil "Non-nil if we expect to get back in the debugger soon.") @@ -836,6 +832,10 @@ To specify a nil argument interactively, exit with an empty minibuffer." ;;;###autoload (defalias 'cancel-debug-watch #'cancel-debug-on-variable-change) +(make-obsolete-variable 'debugger-previous-backtrace + "no longer used." "29.1") +(defvar debugger-previous-backtrace nil) + (provide 'debug) ;;; debug.el ends here commit 34186fb365f4d1b4e7368aa051f469bc74498730 Author: Lars Ingebrigtsen Date: Tue Sep 20 12:38:58 2022 +0200 Further ffap-read-file-or-url tweaks * lisp/ffap.el (ffap-read-file-or-url): Make this work for URLs again if you're using `ido-everywhere' (bug#57943). diff --git a/lisp/ffap.el b/lisp/ffap.el index 7ea05dccbd..482ac3764a 100644 --- a/lisp/ffap.el +++ b/lisp/ffap.el @@ -1504,7 +1504,11 @@ which may actually result in an URL rather than a filename." (progn (push elem file-name-handler-alist) (if (ffap-url-p guess) - (read-file-name prompt guess guess) + ;; We're using the default file name prompter here -- it + ;; allows you to switch back to reading a file name, + ;; while other prompters, like ido, really expect a + ;; file, and don't allow you to edit it if it's an URL. + (funcall #'read-file-name-default prompt guess guess) (unless guess (setq guess default-directory)) (unless (ffap-file-remote-p guess) commit 8c316ba8dac54360afff12c3f09522df9f6e1f1f Author: Gregory Heytings Date: Tue Sep 20 11:20:12 2022 +0200 ; * Makefile.in: Fix bashism. diff --git a/Makefile.in b/Makefile.in index 1cc695482d..c841804757 100644 --- a/Makefile.in +++ b/Makefile.in @@ -417,7 +417,7 @@ sanity-check: @v=$$(src/emacs${EXEEXT} --batch --eval \ '(progn (defun f (n) (if (= 0 n) 1 (* n (f (- n 1))))) (princ (f 10)))' \ 2> /dev/null); \ - [ "X$$v" == "X3628800" ] && exit 0; \ + [ "X$$v" = "X3628800" ] && exit 0; \ echo; \ echo " \"make ${make-target}\" succeeded, but Emacs is not functional."; \ cat Makefile | \ commit 98a89dd0fa340e852f7a5633d2d68885c0e52219 Author: Stefan Kangas Date: Tue Sep 20 10:27:10 2022 +0200 Use "set -o nounset" in bash scripts * admin/automerge: * admin/make-manuals: * admin/update-copyright: * admin/update_autogen: * admin/upload-manuals: Use "set -o nounset". diff --git a/admin/automerge b/admin/automerge index 9919186736..c7c17dfb5e 100755 --- a/admin/automerge +++ b/admin/automerge @@ -35,6 +35,8 @@ ## it with the -d option in the repository directory, in case a pull ## updates this script while it is working. +set -o nounset + die () # write error to stderr and exit { [ $# -gt 0 ] && echo "$PN: $*" >&2 diff --git a/admin/make-manuals b/admin/make-manuals index 8085412cc8..cb0c00a423 100755 --- a/admin/make-manuals +++ b/admin/make-manuals @@ -33,6 +33,8 @@ ### Code: +set -o nounset + die () # write error to stderr and exit { [ $# -gt 0 ] && echo "$PN: $@" >&2 diff --git a/admin/update-copyright b/admin/update-copyright index 5a04847a66..8b7c05749d 100755 --- a/admin/update-copyright +++ b/admin/update-copyright @@ -31,6 +31,8 @@ # updated and some should not be, due to registration numbers, so # this script leaves these copyright years alone for now. +set -o nounset + : ${UPDATE_COPYRIGHT_USE_INTERVALS=1} export UPDATE_COPYRIGHT_USE_INTERVALS diff --git a/admin/update_autogen b/admin/update_autogen index 2451367171..8bfbdc92e9 100755 --- a/admin/update_autogen +++ b/admin/update_autogen @@ -32,6 +32,8 @@ ### Code: +set -o nounset + die () # write error to stderr and exit { [ $# -gt 0 ] && echo "$PN: $@" >&2 diff --git a/admin/upload-manuals b/admin/upload-manuals index 1b7950ede8..50336ee64c 100755 --- a/admin/upload-manuals +++ b/admin/upload-manuals @@ -36,6 +36,7 @@ ### Code: +set -o nounset die () # write error to stderr and exit { commit 9035c20888736180f58becb5dedd3957470b5476 Author: Stefan Kangas Date: Tue Sep 20 09:28:46 2022 +0200 Revert "Allow nil value for filter-buffer-substring-function" This reverts commit a7c65fc6660878e244432a5b25fb3a4ff20e8604. diff --git a/lisp/simple.el b/lisp/simple.el index 40df5695c3..1b9bf9fa6d 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -5363,10 +5363,7 @@ These commands include \\[set-mark-command] and \\[start-kbd-macro]." The function is called with the same 3 arguments (BEG END DELETE) that `filter-buffer-substring' received. It should return the buffer substring between BEG and END, after filtering. If DELETE is -non-nil, it should delete the text between BEG and END from the buffer. - -The default value is `buffer-substring--filter', and nil means -the same as the default.") +non-nil, it should delete the text between BEG and END from the buffer.") (defun filter-buffer-substring (beg end &optional delete) "Return the buffer substring between BEG and END, after filtering. @@ -5382,9 +5379,7 @@ Use `filter-buffer-substring' instead of `buffer-substring', you want to allow filtering to take place. For example, major or minor modes can use `filter-buffer-substring-function' to exclude text properties that are special to a buffer, and should not be copied into other buffers." - (funcall (or filter-buffer-substring-function - #'buffer-substring--filter) - beg end delete)) + (funcall filter-buffer-substring-function beg end delete)) (defun buffer-substring--filter (beg end &optional delete) "Default function to use for `filter-buffer-substring-function'.