commit a812992aee8d75969ebf9d2fb93aca21aed4a755 (HEAD, refs/remotes/origin/master) Author: Stephen Gildea Date: Sun Aug 1 21:07:52 2021 -0700 ; mh-junk-background: fix documentation typo * lisp/mh-e/mh-e.el (mh-junk-background), doc/misc/mh-e.texi: In documentation, name the correct argument to call-process. diff --git a/doc/misc/mh-e.texi b/doc/misc/mh-e.texi index 0724640cf7..a7c1fed29c 100644 --- a/doc/misc/mh-e.texi +++ b/doc/misc/mh-e.texi @@ -7687,7 +7687,7 @@ By default, the programs are run in the foreground, but this can be slow when junking large numbers of messages. If you have enough memory or don't junk that many messages at the same time, you might try turning on the option @code{mh-junk-background}. @footnote{Note that -the option @code{mh-junk-background} is used as the @code{display} +the option @code{mh-junk-background} is used as the @code{destination} argument in the call to @code{call-process}. Therefore, turning on this option means setting its value to @samp{0}. You can also set its value to @samp{t} to direct the programs' output to the @file{*MH-E diff --git a/lisp/mh-e/mh-e.el b/lisp/mh-e/mh-e.el index 797bfcc213..949787a250 100644 --- a/lisp/mh-e/mh-e.el +++ b/lisp/mh-e/mh-e.el @@ -1718,8 +1718,8 @@ be slow when junking large numbers of messages. If you have enough memory or don't junk that many messages at the same time, you might try turning on this option. -Note that this option is used as the \"display\" argument in the -call to `call-process'. Therefore, turning on this option means +Note that this option is used as the \"destination\" argument in +the call to `call-process'. Therefore, turning on this option means setting its value to \"0\". You can also set its value to t to direct the programs' output to the \"*MH-E Log*\" buffer; this may be useful for debugging." commit d160d1aff5a17e56d23768adb1beba950440d0d9 Author: Stephen Gildea Date: Sun Aug 1 21:00:37 2021 -0700 mh-junk: adjust messages for allow/block actions * lisp/mh-e/mh-junk.el: Remove messages that get overwritten quickly. Keep messages that give status for slow operations. Add information that might be useful for debugging failures. diff --git a/lisp/mh-e/mh-junk.el b/lisp/mh-e/mh-junk.el index 0890cb6839..6c3674811b 100644 --- a/lisp/mh-e/mh-junk.el +++ b/lisp/mh-e/mh-junk.el @@ -103,9 +103,7 @@ message(s) as specified by the option `mh-junk-disposition'." (unless blocklist-func (error "Customize `mh-junk-program' appropriately")) (mh-iterate-on-range msg range - (message "Blocklisting message %d..." msg) - (funcall (symbol-function blocklist-func) msg) - (message "Blocklisting message %d...done" msg)))) + (funcall (symbol-function blocklist-func) msg)))) ;;;###mh-autoload (defun mh-junk-whitelist (range) @@ -165,9 +163,7 @@ classified as spam (see the option `mh-junk-program')." (unless allowlist-func (error "Customize `mh-junk-program' appropriately")) (mh-iterate-on-range msg range - (message "Allowlisting message %d..." msg) - (funcall (symbol-function allowlist-func) msg) - (message "Allowlisting message %d...done" msg)))) + (funcall (symbol-function allowlist-func) msg)))) @@ -256,16 +252,16 @@ information can be used so that you can replace multiple (let ((current-folder mh-current-folder) (msg-file (mh-msg-filename msg mh-current-folder)) (sender)) - (message "Reporting message %d..." msg) + (message "Reporting message %d as spam with spamassassin..." msg) (mh-truncate-log-buffer) ;; Put call-process output in log buffer if we are saving it ;; (this happens if mh-junk-background is t). (with-current-buffer mh-log-buffer (call-process mh-spamassassin-executable msg-file mh-junk-background nil - ;; -R removes from allow-list + ;; -R removes from allowlist "--report" "-R") (when mh-sa-learn-executable - (message "Recategorizing message %d as spam..." msg) + (message "Recategorizing message %d as spam with sa-learn..." msg) (mh-truncate-log-buffer) (call-process mh-sa-learn-executable msg-file mh-junk-background nil "--spam" "--local" "--no-sync"))) @@ -307,7 +303,7 @@ See `mh-spamassassin-blocklist' for more information." (kill-buffer show-buffer)) (write-file msg-file) (when mh-sa-learn-executable - (message "Recategorizing message %d as ham..." msg) + (message "Recategorizing message %d as ham with sa-learn..." msg) (mh-truncate-log-buffer) ;; Put call-process output in log buffer if we are saving it ;; (this happens if mh-junk-background is t). @@ -319,9 +315,11 @@ See `mh-spamassassin-blocklist' for more information." (car (mh-funcall-if-exists ietf-drums-parse-address (mh-get-header-field "From:")))) (kill-buffer nil) - (unless (or (null from) (equal from "")) - (mh-spamassassin-add-rule "whitelist_from" from)) - (message "Allowlisting sender of message %d...done" msg)))) + (if (or (null from) (equal from "")) + (message "Allowlisting sender of message %d...%s" + msg "not done (cannot identify sender)") + (mh-spamassassin-add-rule "whitelist_from" from) + (message "Allowlisting sender of message %d...done" msg))))) (defun mh-spamassassin-add-rule (rule body) "Add a new rule to \"~/.spamassassin/user_prefs\". @@ -442,13 +440,15 @@ occasionally to shrink the database: The \"Bogofilter tuning HOWTO\" describes how you can fine-tune Bogofilter." (unless mh-bogofilter-executable (error "Unable to find the bogofilter executable")) + (message "Blocklisting message %d with bogofilter..." msg) (let ((msg-file (mh-msg-filename msg mh-current-folder))) (mh-truncate-log-buffer) ;; Put call-process output in log buffer if we are saving it ;; (this happens if mh-junk-background is t). (with-current-buffer mh-log-buffer (call-process mh-bogofilter-executable msg-file mh-junk-background - nil "-s")))) + nil "-s") + (message "Blocklisting message %d with bogofilter...done" msg)))) ;;;###mh-autoload (defun mh-bogofilter-allowlist (msg) @@ -457,13 +457,15 @@ The \"Bogofilter tuning HOWTO\" describes how you can fine-tune Bogofilter." See `mh-bogofilter-blocklist' for more information." (unless mh-bogofilter-executable (error "Unable to find the bogofilter executable")) + (message "Allowlisting message %d with bogofilter..." msg) (let ((msg-file (mh-msg-filename msg mh-current-folder))) (mh-truncate-log-buffer) ;; Put call-process output in log buffer if we are saving it ;; (this happens if mh-junk-background is t). (with-current-buffer mh-log-buffer (call-process mh-bogofilter-executable msg-file mh-junk-background - nil "-n")))) + nil "-n") + (message "Allowlisting message %d with bogofilter...done" msg)))) @@ -500,13 +502,15 @@ MH-E commands \\[mh-junk-blocklist] and \\[mh-junk-allowlist] to update SpamProbe's training." (unless mh-spamprobe-executable (error "Unable to find the spamprobe executable")) + (message "Blocklisting message %d with spamprobe..." msg) (let ((msg-file (mh-msg-filename msg mh-current-folder))) (mh-truncate-log-buffer) ;; Put call-process output in log buffer if we are saving it ;; (this happens if mh-junk-background is t). (with-current-buffer mh-log-buffer (call-process mh-spamprobe-executable msg-file mh-junk-background - nil "spam")))) + nil "spam") + (message "Blocklisting message %d with spamprobe...done" msg)))) ;;;###mh-autoload (defun mh-spamprobe-allowlist (msg) @@ -515,13 +519,15 @@ update SpamProbe's training." See `mh-spamprobe-blocklist' for more information." (unless mh-spamprobe-executable (error "Unable to find the spamprobe executable")) + (message "Allowlisting message %d with spamprobe..." msg) (let ((msg-file (mh-msg-filename msg mh-current-folder))) (mh-truncate-log-buffer) ;; Put call-process output in log buffer if we are saving it ;; (this happens if mh-junk-background is t). (with-current-buffer mh-log-buffer (call-process mh-spamprobe-executable msg-file mh-junk-background - nil "good")))) + nil "good") + (message "Allowlisting message %d with spamprobe...done" msg)))) (provide 'mh-junk) commit e68bc86bcfcc6431c4cf1e8a75b608d76ca1d1ae Author: Stefan Monnier Date: Sun Aug 1 18:13:41 2021 -0400 * lisp/mwheel.el: Don't use `custom-initialize-delay`. Set up the keybindings when loading the file. (mouse-wheel--installed-bindings-alist): Move to beginning. (mouse-wheel-change-button): Don't update bindings when they're not installed. (mouse-wheel--setup-bindings): New function extracted from `mouse-wheel-mode`. (): Call it when loading the file. (mouse-wheel-mode): Use the default :initializer. diff --git a/lisp/mwheel.el b/lisp/mwheel.el index b31805a575..def7758774 100644 --- a/lisp/mwheel.el +++ b/lisp/mwheel.el @@ -40,6 +40,8 @@ (require 'timer) (defvar mouse-wheel-mode) +(defvar mouse-wheel--installed-bindings-alist nil + "Alist of all installed mouse wheel key bindings.") ;; Setter function for mouse-button user-options. Switch Mouse Wheel ;; mode off and on again so that the old button is unbound and @@ -47,8 +49,10 @@ (defun mouse-wheel-change-button (var button) (set-default var button) - ;; Sync the bindings. - (when (bound-and-true-p mouse-wheel-mode) (mouse-wheel-mode 1))) + ;; Sync the bindings if they're already setup. + (when (and mouse-wheel--installed-bindings-alist + (bound-and-true-p mouse-wheel-mode)) + (mouse-wheel-mode 1))) (defcustom mouse-wheel-down-event (if (or (featurep 'w32-win) (featurep 'ns-win)) @@ -380,9 +384,6 @@ value of ARG, and the command uses it in subsequent scrolls." (text-scale-decrease 1))) (select-window selected-window)))) -(defvar mouse-wheel--installed-bindings-alist nil - "Alist of all installed mouse wheel key bindings.") - (defun mouse-wheel--add-binding (key fun) "Bind mouse wheel button KEY to function FUN. Save it for later removal by `mouse-wheel--remove-bindings'." @@ -418,30 +419,31 @@ an event used for scrolling, such as `mouse-wheel-down-event'." (define-minor-mode mouse-wheel-mode "Toggle mouse wheel support (Mouse Wheel mode)." :init-value t - ;; We'd like to use custom-initialize-set here so the setup is done - ;; before dumping, but at the point where the defcustom is evaluated, - ;; the corresponding function isn't defined yet, so - ;; custom-initialize-set signals an error. - :initialize 'custom-initialize-delay :global t :group 'mouse ;; Remove previous bindings, if any. (mouse-wheel--remove-bindings) ;; Setup bindings as needed. (when mouse-wheel-mode - (dolist (binding mouse-wheel-scroll-amount) - (cond - ;; Bindings for changing font size. - ((and (consp binding) (eq (cdr binding) 'text-scale)) - (dolist (event (list mouse-wheel-down-event mouse-wheel-up-event)) - (mouse-wheel--add-binding `[,(list (caar binding) event)] - 'mouse-wheel-text-scale))) - ;; Bindings for scrolling. - (t - (dolist (event (list mouse-wheel-down-event mouse-wheel-up-event - mouse-wheel-left-event mouse-wheel-right-event)) - (dolist (key (mouse-wheel--create-scroll-keys binding event)) - (mouse-wheel--add-binding key 'mwheel-scroll)))))))) + (mouse-wheel--setup-bindings))) + +(defun mouse-wheel--setup-bindings () + (dolist (binding mouse-wheel-scroll-amount) + (cond + ;; Bindings for changing font size. + ((and (consp binding) (eq (cdr binding) 'text-scale)) + (dolist (event (list mouse-wheel-down-event mouse-wheel-up-event)) + (mouse-wheel--add-binding `[,(list (caar binding) event)] + 'mouse-wheel-text-scale))) + ;; Bindings for scrolling. + (t + (dolist (event (list mouse-wheel-down-event mouse-wheel-up-event + mouse-wheel-left-event mouse-wheel-right-event)) + (dolist (key (mouse-wheel--create-scroll-keys binding event)) + (mouse-wheel--add-binding key 'mwheel-scroll))))))) + +(when mouse-wheel-mode + (mouse-wheel--setup-bindings)) ;;; Obsolete. commit 1a7818824b8e6d4ef104bd00395e82ea6e69f4cc Author: Stefan Monnier Date: Sun Aug 1 18:08:01 2021 -0400 * lisp/progmodes/flymake.el (flymake--mode-line-title): Don't quote lambda diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index e10602ab08..77a807f21a 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el @@ -1245,13 +1245,13 @@ correctly.") "Flymake" mouse-face mode-line-highlight help-echo - (lambda (&rest whatever) - (concat - (format "%s known backends\n" (hash-table-count flymake--backend-state)) - (format "%s running\n" (length (flymake-running-backends))) - (format "%s disabled\n" (length (flymake-disabled-backends))) - "mouse-1: Display minor mode menu\n" - "mouse-2: Show help for minor mode")) + ,(lambda (&rest _) + (concat + (format "%s known backends\n" (hash-table-count flymake--backend-state)) + (format "%s running\n" (length (flymake-running-backends))) + (format "%s disabled\n" (length (flymake-disabled-backends))) + "mouse-1: Display minor mode menu\n" + "mouse-2: Show help for minor mode")) keymap ,(let ((map (make-sparse-keymap))) (define-key map [mode-line down-mouse-1] commit a6f67d60e13e06a8d07e54e63f93801a39b5c04b Author: Juri Linkov Date: Sun Aug 1 23:43:37 2021 +0300 * lisp/progmodes/project.el (project-switch-project): Use 'let*' (bug#49635). This allows overriding-local-map to have effect on read-key-sequence. diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index eab60756c8..0e73286426 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -1386,8 +1386,8 @@ to directory DIR." (define-key temp-map (vector keychar) cmd))))) command) (while (not command) - (let ((overriding-local-map commands-map) - (choice (read-key-sequence (project--keymap-prompt)))) + (let* ((overriding-local-map commands-map) + (choice (read-key-sequence (project--keymap-prompt)))) (when (setq command (lookup-key commands-map choice)) (unless (or project-switch-use-entire-map (assq command commands-menu)) commit cd7eb4bee1805ca810332e495d566a555e2c9196 Author: Juri Linkov Date: Sun Aug 1 22:58:09 2021 +0300 * lisp/emacs-lisp/autoload.el (autoload--make-defs-autoload): Display warning. https://lists.gnu.org/archive/html/emacs-devel/2021-08/msg00007.html diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index 9d1ae70597..e9a20634af 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el @@ -626,8 +626,8 @@ Don't try to split prefixes that are already longer than that.") (radix-tree-iter-mappings (cdr x) (lambda (s _) (push (concat prefix s) dropped))) - (message "Not registering prefix \"%s\" from %s. Affects: %S" - prefix file dropped) + (message "%s:0: Warning: Not registering prefix \"%s\". Affects: %S" + file prefix dropped) nil)))) prefixes))) `(register-definition-prefixes ,file ',(sort (delq nil strings) commit b72f88518b89560accf740a4548368863e6238e0 Author: Mattias Engdegård Date: Sun Aug 1 17:05:48 2021 +0200 Make dlet work like let, not let* Change `dlet` so that it has binding semantics like `let` because that is what a user would expect and it allows a corresponding `dlet*` to be added later should the need arise. Fortunately the change has no effect where it is currently used. * lisp/subr.el (dlet): Work like let. * lisp/calendar/cal-bahai.el (calendar-bahai-date-string): * lisp/calendar/cal-coptic.el (calendar-coptic-date-string): * lisp/calendar/cal-dst.el (calendar-time-zone-daylight-rules) (calendar-dst-starts, dst-in-effect): * lisp/calendar/cal-persia.el (calendar-persian-date-string): * lisp/calendar/calendar.el (calendar-dlet, calendar-generate-month) (calendar-update-mode-line, calendar-date-string): * lisp/calendar/diary-lib.el (diary-list-entries-2) (diary-list-entries, diary-mark-entries-1, diary-sexp-entry) (diary-remind, diary-font-lock-date-forms, diary-fancy-date-pattern): * lisp/calendar/holidays.el (holiday-sexp): * lisp/calendar/icalendar.el (icalendar--convert-float-to-ical): * lisp/calendar/solar.el (solar-time-string): * lisp/calendar/todo-mode.el (todo-date-pattern) (todo-edit-item--header, todo-convert-legacy-date-time) (todo-read-date): Rename `calendar-dlet*` to `calendar-dlet` since it uses `dlet`. diff --git a/lisp/calendar/cal-bahai.el b/lisp/calendar/cal-bahai.el index ff419c72f6..350b7e51cb 100644 --- a/lisp/calendar/cal-bahai.el +++ b/lisp/calendar/cal-bahai.el @@ -126,7 +126,7 @@ Defaults to today's date if DATE is not given." "" ; pre-Bahai (let ((m (calendar-extract-month bahai-date)) (d (calendar-extract-day bahai-date))) - (calendar-dlet* + (calendar-dlet ((monthname (if (and (= m 19) (<= d 0)) "Ayyám-i-Há" diff --git a/lisp/calendar/cal-coptic.el b/lisp/calendar/cal-coptic.el index 346585e181..11785c48f1 100644 --- a/lisp/calendar/cal-coptic.el +++ b/lisp/calendar/cal-coptic.el @@ -116,7 +116,7 @@ Defaults to today's date if DATE is not given." (m (calendar-extract-month coptic-date))) (if (< y 1) "" - (calendar-dlet* + (calendar-dlet ((monthname (aref calendar-coptic-month-name-array (1- m))) (day (number-to-string (calendar-extract-day coptic-date))) (dayname nil) diff --git a/lisp/calendar/cal-dst.el b/lisp/calendar/cal-dst.el index 9e6c295928..29864110a3 100644 --- a/lisp/calendar/cal-dst.el +++ b/lisp/calendar/cal-dst.el @@ -200,7 +200,7 @@ The result has the proper form for `calendar-daylight-savings-starts'." (calendar-persian-to-absolute `(7 1 ,(- year 621)))))))) (prevday-sec (- -1 utc-diff)) ; last sec of previous local day new-rules) - (calendar-dlet* ((year (1+ y))) + (calendar-dlet ((year (1+ y))) ;; Scan through the next few years until only one rule remains. (while (cdr candidate-rules) (dolist (rule candidate-rules) @@ -397,7 +397,7 @@ This function respects the value of `calendar-dst-check-each-year-flag'." (or (let ((expr (if calendar-dst-check-each-year-flag (cadr (calendar-dst-find-startend year)) (nth 4 calendar-current-time-zone-cache)))) - (calendar-dlet* ((year year)) + (calendar-dlet ((year year)) (if expr (eval expr)))) ;; New US rules commencing 2007. https://www.iana.org/time-zones (and (not (zerop calendar-daylight-time-offset)) @@ -409,7 +409,7 @@ This function respects the value of `calendar-dst-check-each-year-flag'." (or (let ((expr (if calendar-dst-check-each-year-flag (nth 2 (calendar-dst-find-startend year)) (nth 5 calendar-current-time-zone-cache)))) - (calendar-dlet* ((year year)) + (calendar-dlet ((year year)) (if expr (eval expr)))) ;; New US rules commencing 2007. https://www.iana.org/time-zones (and (not (zerop calendar-daylight-time-offset)) @@ -419,7 +419,7 @@ This function respects the value of `calendar-dst-check-each-year-flag'." (defun dst-in-effect (date) "True if on absolute DATE daylight saving time is in effect. Fractional part of DATE is local standard time of day." - (calendar-dlet* ((year (calendar-extract-year + (calendar-dlet ((year (calendar-extract-year (calendar-gregorian-from-absolute (floor date))))) (let* ((dst-starts-gregorian (eval calendar-daylight-savings-starts)) (dst-ends-gregorian (eval calendar-daylight-savings-ends)) diff --git a/lisp/calendar/cal-persia.el b/lisp/calendar/cal-persia.el index ca37d80322..dd005e8660 100644 --- a/lisp/calendar/cal-persia.el +++ b/lisp/calendar/cal-persia.el @@ -140,7 +140,7 @@ Gregorian date Sunday, December 31, 1 BC." (or date (calendar-current-date))))) (y (calendar-extract-year persian-date)) (m (calendar-extract-month persian-date))) - (calendar-dlet* + (calendar-dlet ((monthname (aref calendar-persian-month-name-array (1- m))) (day (number-to-string (calendar-extract-day persian-date))) (year (number-to-string y)) diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index 3f9fe1c9d8..76d6132eae 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el @@ -137,7 +137,7 @@ ;; - whatever is passed to diary-sexp-entry ;; - whatever is passed to diary-remind -(defmacro calendar-dlet* (binders &rest body) +(defmacro calendar-dlet (binders &rest body) "Like `dlet' but without warnings about non-prefixed var names." (declare (indent 1) (debug let)) (let ((vars (mapcar (lambda (binder) @@ -1499,7 +1499,7 @@ first INDENT characters on the line." (goto-char (point-min)) (calendar-move-to-column indent) (insert - (calendar-dlet* ((month month) (year year)) + (calendar-dlet ((month month) (year year)) (calendar-string-spread (list calendar-month-header) ?\s calendar-month-digit-width))) (calendar-ensure-newline) @@ -1516,7 +1516,7 @@ first INDENT characters on the line." calendar-day-header-width nil ?\s) (make-string (- calendar-column-width calendar-day-header-width) ?\s))) (calendar-ensure-newline) - (calendar-dlet* ((day day) (month month) (year year)) + (calendar-dlet ((day day) (month month) (year year)) (calendar-insert-at-column indent calendar-intermonth-text trunc)) ;; Add blank days before the first of the month. (insert (make-string (* blank-days calendar-column-width) ?\s)) @@ -1527,7 +1527,7 @@ first INDENT characters on the line." (insert (propertize (format (format "%%%dd" calendar-day-digit-width) day) 'mouse-face 'highlight - 'help-echo (calendar-dlet* ((day day) (month month) (year year)) + 'help-echo (calendar-dlet ((day day) (month month) (year year)) (eval calendar-date-echo-text t)) ;; 'date property prevents intermonth text confusing re-searches. ;; (Tried intangible, it did not really work.) @@ -1538,7 +1538,7 @@ first INDENT characters on the line." (/= day last)) (calendar-ensure-newline) (setq day (1+ day)) ; first day of next week - (calendar-dlet* ((day day) (month month) (year year)) + (calendar-dlet ((day day) (month month) (year year)) (calendar-insert-at-column indent calendar-intermonth-text trunc)))))) (defun calendar-redraw () @@ -1833,7 +1833,7 @@ concatenated and the result truncated." (bufferp (get-buffer calendar-buffer))) (with-current-buffer calendar-buffer (let ((start (- calendar-left-margin 2))) - (calendar-dlet* ((date (condition-case nil + (calendar-dlet ((date (condition-case nil (calendar-cursor-to-nearest-date) (error (calendar-current-date))))) (setq mode-line-format @@ -2561,7 +2561,7 @@ and day names to be abbreviated as specified by respectively. An optional parameter NODAYNAME, when t, omits the name of the day of the week." (let ((month (calendar-extract-month date))) - (calendar-dlet* + (calendar-dlet ((dayname (unless nodayname (calendar-day-name date abbreviate))) (monthname (calendar-month-name month abbreviate)) (day (number-to-string (calendar-extract-day date))) diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index 4efa366996..f57fe26058 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el @@ -663,7 +663,7 @@ any entries were found." (calendar-month-name-array (or months calendar-month-name-array)) (case-fold-search t) entry-found) - (calendar-dlet* + (calendar-dlet ((dayname (format "%s\\|%s\\.?" (calendar-day-name date) (calendar-day-name date 'abbrev))) (monthname (format "\\*\\|%s%s" (calendar-month-name month) @@ -858,7 +858,7 @@ LIST-ONLY is non-nil, in which case it just returns the list." ;; every time, diary-include-other-diary-files ;; binds it to nil (essentially) when it runs ;; in included files. - (calendar-dlet* ((number number) + (calendar-dlet ((number number) (list-only list-only)) (run-hooks 'diary-nongregorian-listing-hook 'diary-list-entries-hook)) @@ -877,7 +877,7 @@ LIST-ONLY is non-nil, in which case it just returns the list." (copy-sequence (car display-buffer-fallback-action)))))) (funcall diary-display-function))) - (calendar-dlet* ((number number) + (calendar-dlet ((number number) (original-date original-date)) (run-hooks 'diary-hook)))))) (and temp-buff (buffer-name temp-buff) (kill-buffer temp-buff))) @@ -1266,7 +1266,7 @@ MARKFUNC is a function that marks entries of the appropriate type matching a given date pattern. MONTHS is an array of month names. SYMBOL marks diary entries of the type in question. ABSFUNC is a function that converts absolute dates to dates of the appropriate type." - (calendar-dlet* + (calendar-dlet ((dayname (diary-name-pattern calendar-day-name-array calendar-day-abbrev-array)) (monthname (format "%s\\|\\*" @@ -1435,7 +1435,7 @@ marks. This is intended to deal with deleted diary entries." (defun diary-sexp-entry (sexp entry date) "Process a SEXP diary ENTRY for DATE." (let ((result - (calendar-dlet* ((date date) + (calendar-dlet ((date date) (entry entry)) (if calendar-debug-sexp (let ((debug-on-error t)) @@ -2043,7 +2043,7 @@ calendar." (and (integerp days) (< days 0) (setq days (number-sequence 1 (- days)))) - (calendar-dlet* ((diary-entry (eval sexp))) + (calendar-dlet ((diary-entry (eval sexp))) (cond ;; Diary entry applies on date. ((and diary-entry @@ -2059,7 +2059,7 @@ calendar." (when (setq diary-entry (eval sexp)) ;; Discard any mark portion from diary-anniversary, etc. (if (consp diary-entry) (setq diary-entry (cdr diary-entry))) - (calendar-dlet* ((days days)) + (calendar-dlet ((days days)) (mapconcat #'eval diary-remind-message ""))))) ;; Diary entry may apply to one of a list of days before date. ((and (listp days) days) @@ -2264,7 +2264,7 @@ If given, optional SYMBOL must be a prefix to entries. If optional ABBREV-ARRAY is present, also matches the abbreviations from this array (with or without a final `.'), in addition to the full month names." - (calendar-dlet* + (calendar-dlet ((dayname (diary-name-pattern calendar-day-name-array calendar-day-abbrev-array t)) (monthname (format "\\(%s\\|\\*\\)" @@ -2400,7 +2400,7 @@ return a font-lock pattern matching array of MONTHS and marking SYMBOL." This depends on the calendar date style." (declare (obsolete nil "28.1")) (concat - (calendar-dlet* + (calendar-dlet ((dayname (diary-name-pattern calendar-day-name-array nil t)) (monthname (diary-name-pattern calendar-month-name-array nil t)) (day "1") diff --git a/lisp/calendar/holidays.el b/lisp/calendar/holidays.el index 4bc17de306..3eae2dcc7f 100644 --- a/lisp/calendar/holidays.el +++ b/lisp/calendar/holidays.el @@ -683,7 +683,7 @@ nil, or if the date is not visible, there is no holiday." (y displayed-year)) (calendar-increment-month m y -1) (holiday-filter-visible-calendar - (calendar-dlet* (year date) + (calendar-dlet (year date) (list (progn (setq year y diff --git a/lisp/calendar/icalendar.el b/lisp/calendar/icalendar.el index 6eb086aa14..d18ec5e798 100644 --- a/lisp/calendar/icalendar.el +++ b/lisp/calendar/icalendar.el @@ -1783,8 +1783,8 @@ entries. ENTRY-MAIN is the first line of the diary entry." ;;BUT remove today if `diary-float' ;;expression does not hold true for today: (when - (null (calendar-dlet* ((date (calendar-current-date)) - (entry entry-main)) + (null (calendar-dlet ((date (calendar-current-date)) + (entry entry-main)) (diary-float month dayname n))) (concat "\nEXDATE;VALUE=DATE:" diff --git a/lisp/calendar/solar.el b/lisp/calendar/solar.el index 372490db9e..b5f2f454ae 100644 --- a/lisp/calendar/solar.el +++ b/lisp/calendar/solar.el @@ -552,7 +552,7 @@ degrees to find out if polar regions have 24 hours of sun or only night." Format used is given by `calendar-time-display-form'." (let* ((time (round (* 60 time))) (24-hours (/ time 60))) - (calendar-dlet* + (calendar-dlet ((time-zone time-zone) (minutes (format "%02d" (% time 60))) (12-hours (format "%d" (1+ (% (+ 24-hours 11) 12)))) diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el index dab468d0c1..680beb85af 100644 --- a/lisp/calendar/todo-mode.el +++ b/lisp/calendar/todo-mode.el @@ -191,7 +191,7 @@ The final element is \"*\", indicating an unspecified month.") (defconst todo-date-pattern (let ((dayname (diary-name-pattern calendar-day-name-array nil t))) (concat "\\(?4:\\(?5:" dayname "\\)\\|" - (calendar-dlet* + (calendar-dlet ((dayname) (monthname (format "\\(?6:%s\\)" (diary-name-pattern todo-month-name-array @@ -2431,7 +2431,7 @@ made in the number or names of categories." ;; changed, rebuild the date string. (when (memq what '(year month day)) (setq ndate - (calendar-dlet* + (calendar-dlet ;; Needed by calendar-date-display-form. ((year year) (monthname monthname) @@ -4658,7 +4658,7 @@ strings built using the default value of (defun todo-convert-legacy-date-time () "Return converted date-time string. Helper function for `todo-convert-legacy-files'." - (calendar-dlet* + (calendar-dlet ((year (match-string 1)) (month (match-string 2)) (monthname (calendar-month-name (string-to-number month) t)) @@ -6036,7 +6036,7 @@ indicating an unspecified month, day, or year. When ARG is `day', non-nil arguments MO and YR determine the number of the last the day of the month." - (calendar-dlet* + (calendar-dlet (year monthname month day dayname) ;Needed by calendar-date-display-form. (when (or (not arg) (eq arg 'year)) (while (if (natnump year) (< year 1) (not (eq year '*))) diff --git a/lisp/subr.el b/lisp/subr.el index 59a1af01ba..b828660066 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -2001,10 +2001,10 @@ all symbols are bound before any of the VALUEFORMs are evalled." (t `(let* ,(nreverse seqbinds) ,nbody)))))) (defmacro dlet (binders &rest body) - "Like `let*' but using dynamic scoping." + "Like `let' but using dynamic scoping." (declare (indent 1) (debug let)) ;; (defvar FOO) only affects the current scope, but in order for - ;; this not to affect code after the `let*' we need to create a new scope, + ;; this not to affect code after the main `let' we need to create a new scope, ;; which is what the surrounding `let' is for. ;; FIXME: (let () ...) currently doesn't actually create a new scope, ;; which is why we use (let (_) ...). @@ -2012,7 +2012,7 @@ all symbols are bound before any of the VALUEFORMs are evalled." ,@(mapcar (lambda (binder) `(defvar ,(if (consp binder) (car binder) binder))) binders) - (let* ,binders ,@body))) + (let ,binders ,@body))) (defmacro with-wrapper-hook (hook args &rest body) commit 3b7f72ca55db149e11d26649d187fcaa00a34d8d Author: Glenn Morris Date: Sun Aug 1 06:29:49 2021 -0700 ; Auto-commit of loaddefs files. diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el index efaf061f31..e6ac5d54fc 100644 --- a/lisp/ldefs-boot.el +++ b/lisp/ldefs-boot.el @@ -952,6 +952,11 @@ This is a good function to put in `comint-output-filter-functions'. \(fn IGNORED)" nil nil) +(autoload 'ansi-color-compilation-filter "ansi-color" "\ +Maybe translate SGR control sequences into text properties. +This function depends on the `ansi-color-for-compilation-mode' +variable, and is meant to be used in `compilation-filter-hook'." nil nil) + (register-definition-prefixes "ansi-color" '("ansi-color-")) ;;;*** @@ -1548,7 +1553,7 @@ ENTRY is the name of a password-store entry. The key used to retrieve the password is the symbol `secret'. The convention used as the format for a password-store file is -the following (see https://www.passwordstore.org/#organization): +the following (see URL `https://www.passwordstore.org/#organization'): secret key1: value1 @@ -1788,6 +1793,10 @@ disk changes. When a buffer is reverted, a message is generated. This can be suppressed by setting `auto-revert-verbose' to nil. +Reverting can sometimes fail to preserve all the markers in the buffer. +To avoid that, set `revert-buffer-insert-file-contents-function' to +the slower function `revert-buffer-insert-file-contents-delicately'. + Use `global-auto-revert-mode' to automatically revert all buffers. Use `auto-revert-tail-mode' if you know that the file will only grow without being changed in the part that is already in the buffer. @@ -5215,7 +5224,7 @@ Normally display output in temp buffer, but prefix arg means replace the region with it. `c-macro-preprocessor' specifies the preprocessor to use. -Tf the user option `c-macro-prompt-flag' is non-nil +If the user option `c-macro-prompt-flag' is non-nil prompt for arguments to the preprocessor (e.g. `-DDEBUG -I ./include'), otherwise use `c-macro-cppflags'. @@ -11216,6 +11225,8 @@ Any other value means use the setting of `case-fold-search'.") (custom-autoload 'tags-case-fold-search "etags" t) +(put 'tags-case-fold-search 'safe-local-variable 'symbolp) + (defvar tags-table-list nil "\ List of file names of tags tables to search. An element that is a directory means the file \"TAGS\" in that directory. @@ -12269,6 +12280,9 @@ Besides the choice of face, it is the same as `buffer-face-mode'. ;;;### (autoloads nil "facemenu" "facemenu.el" (0 0 0 0)) ;;; Generated autoloads from facemenu.el + (autoload 'facemenu-menu "facemenu" nil nil 'keymap) + +(define-key global-map [C-down-mouse-2] 'facemenu-menu) (autoload 'list-colors-display "facemenu" "\ Display names of defined colors, and show what they look like. @@ -12387,6 +12401,11 @@ reminders, you can set `feedmail-queue-reminder-alist' to nil. ;;;### (autoloads nil "ffap" "ffap.el" (0 0 0 0)) ;;; Generated autoloads from ffap.el +(defvar ffap-file-finder 'find-file "\ +The command called by `find-file-at-point' to find a file.") + +(custom-autoload 'ffap-file-finder "ffap" t) + (autoload 'ffap-next "ffap" "\ Search buffer for next file or URL, and run ffap. Optional argument BACK says to search backwards. @@ -15348,7 +15367,7 @@ List of hook functions run by `grep-process-setup' (see `run-hooks').") (custom-autoload 'grep-setup-hook "grep" t) -(defconst grep-regexp-alist `((,(concat "^\\(?:" "\\(?1:[^\0\n]+\\)\\(?3:\0\\)\\(?2:[0-9]+\\):" "\\|" "\\(?1:" "\\(?:[a-zA-Z]:\\)?" "[^\n:]+?[^\n/:]\\):[\11 ]*\\(?2:[1-9][0-9]*\\)[\11 ]*:" "\\)") 1 2 (,(lambda nil (when grep-highlight-matches (let* ((beg (match-end 0)) (end (save-excursion (goto-char beg) (line-end-position))) (mbeg (text-property-any beg end 'font-lock-face grep-match-face))) (when mbeg (- mbeg beg))))) \, (lambda nil (when grep-highlight-matches (let* ((beg (match-end 0)) (end (save-excursion (goto-char beg) (line-end-position))) (mbeg (text-property-any beg end 'font-lock-face grep-match-face)) (mend (and mbeg (next-single-property-change mbeg 'font-lock-face nil end)))) (when mend (- mend beg)))))) nil nil (3 '(face nil display ":"))) ("^Binary file \\(.+\\) matches" 1 nil nil 0 1)) "\ +(defconst grep-regexp-alist `((,(concat "^\\(?:" "\\(?1:[^\0\n]+\\)\\(?3:\0\\)\\(?2:[0-9]+\\):" "\\|" "\\(?1:" "\\(?:[a-zA-Z]:\\)?" "[^\n:]+?[^\n/:]\\):[\11 ]*\\(?2:[1-9][0-9]*\\)[\11 ]*:" "\\)") 1 2 (,(lambda nil (when grep-highlight-matches (let* ((beg (match-end 0)) (end (save-excursion (goto-char beg) (line-end-position))) (mbeg (text-property-any beg end 'font-lock-face grep-match-face))) (when mbeg (- mbeg beg))))) \, (lambda nil (when grep-highlight-matches (let* ((beg (match-end 0)) (end (save-excursion (goto-char beg) (line-end-position))) (mbeg (text-property-any beg end 'font-lock-face grep-match-face)) (mend (and mbeg (next-single-property-change mbeg 'font-lock-face nil end)))) (when mend (- mend beg 1)))))) nil nil (3 '(face nil display ":"))) ("^Binary file \\(.+\\) matches" 1 nil nil 0 1)) "\ Regexp used to match grep hits. See `compilation-error-regexp-alist' for format details.") @@ -16169,7 +16188,7 @@ it does not already exist." nil nil) Parse and hyperlink documentation cross-references in the given BUFFER. Find cross-reference information in a buffer and activate such cross -references for selection with `help-follow'. Cross-references have +references for selection with `help-follow-symbol'. Cross-references have the canonical form `...' and the type of reference may be disambiguated by the preceding word(s) used in `help-xref-symbol-regexp'. Faces only get cross-referenced if @@ -18657,9 +18676,14 @@ Convert old Emacs Devanagari characters to UCS. Run an inferior Lisp process, input and output via buffer `*inferior-lisp*'. If there is a process already running in `*inferior-lisp*', just switch to that buffer. + With argument, allows you to edit the command line (default is value of `inferior-lisp-program'). Runs the hooks from `inferior-lisp-mode-hook' (after the `comint-mode-hook' is run). + +If any parts of the command name contains spaces, they should be +quoted using shell quote syntax. + \(Type \\[describe-mode] in the process buffer for a list of commands.) \(fn CMD)" t nil) @@ -27308,7 +27332,11 @@ If ARG is non-nil, instead prompt for connection parameters. (defalias 'irc 'rcirc) (autoload 'rcirc-connect "rcirc" "\ - +Connect to SERVER. +The arguments PORT, NICK, USER-NAME, FULL-NAME, PASSWORD, +ENCRYPTION, SERVER-ALIAS are interpreted as in +`rcirc-server-alist'. STARTUP-CHANNELS is a list of channels +that are joined after authentication. \(fn SERVER &optional PORT NICK USER-NAME FULL-NAME STARTUP-CHANNELS PASSWORD ENCRYPTION SERVER-ALIAS)" nil nil) @@ -27341,7 +27369,7 @@ disabled. \(fn &optional ARG)" t nil) -(register-definition-prefixes "rcirc" '("defun-rcirc-command" "rcirc-" "set-rcirc-" "with-rcirc-")) +(register-definition-prefixes "rcirc" '("rcirc-" "with-rcirc-")) ;;;*** @@ -27782,8 +27810,8 @@ This means the number of non-shy regexp grouping constructs (autoload 'remember "remember" "\ Remember an arbitrary piece of data. -INITIAL is the text to initially place in the *Remember* buffer, -or nil to bring up a blank *Remember* buffer. +INITIAL is the text to initially place in the `remember-buffer', +or nil to bring up a blank `remember-buffer'. With a prefix or a visible region, use the region as INITIAL. @@ -27884,7 +27912,7 @@ disabled. \(fn &optional ARG)" t nil) -(register-definition-prefixes "repeat" '("describe-repeat" "repeat-")) +(register-definition-prefixes "repeat" '("describe-repeat-maps" "repeat-")) ;;;*** @@ -30312,6 +30340,13 @@ arguments.") (custom-autoload 'shell-dumb-shell-regexp "shell" t) +(autoload 'split-string-shell-command "shell" "\ +Split STRING (a shell command) into a list of strings. +General shell syntax, like single and double quoting, as well as +backslash quoting, is respected. + +\(fn STRING)" nil nil) + (autoload 'shell "shell" "\ Run an inferior shell, with I/O through BUFFER (which defaults to `*shell*'). Interactively, a prefix arg means to prompt for BUFFER. @@ -30358,8 +30393,9 @@ Make the shell buffer the current buffer, and return it. (autoload 'shortdoc-display-group "shortdoc" "\ Pop to a buffer with short documentation summary for functions in GROUP. +If FUNCTION is non-nil, place point on the entry for FUNCTION (if any). -\(fn GROUP)" t nil) +\(fn GROUP &optional FUNCTION)" t nil) (register-definition-prefixes "shortdoc" '("alist" "buffer" "define-short-documentation-group" "file" "hash-table" "list" "number" "overlay" "process" "regexp" "sequence" "shortdoc-" "string" "vector")) @@ -34761,7 +34797,7 @@ Add archive file name handler to `file-name-handler-alist'." (when tramp-archive ;;;### (autoloads nil "trampver" "net/trampver.el" (0 0 0 0)) ;;; Generated autoloads from net/trampver.el -(push (purecopy '(tramp 2 5 1)) package--builtin-versions) +(push (purecopy '(tramp 2 5 2 -1)) package--builtin-versions) (register-definition-prefixes "trampver" '("tramp-")) @@ -35885,11 +35921,14 @@ instead of just \"key\" as in the example above. \(fn QUERY &optional SEMICOLONS KEEP-EMPTY)" nil nil) (autoload 'url-unhex-string "url-util" "\ -Remove %XX embedded spaces, etc in a URL. +Decode %XX sequences in a percent-encoded URL. If optional second argument ALLOW-NEWLINES is non-nil, then allow the decoding of carriage returns and line feeds in the string, which is normally forbidden in URL encoding. +The resulting string in general requires decoding using an +appropriate coding-system; see `decode-coding-string'. + \(fn STR &optional ALLOW-NEWLINES)" nil nil) (autoload 'url-hexify-string "url-util" "\ commit 0ecebbf2746e41f4a3c3e27c18d96e74f6f3b030 Author: Mattias Engdegård Date: Sun Aug 1 15:25:02 2021 +0200 ; * lisp/replace.el (occur--set-arrow): Remove unused variable. diff --git a/lisp/replace.el b/lisp/replace.el index 462cc26e99..54d652b2ed 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -1446,8 +1446,7 @@ To return to ordinary Occur mode, use \\[occur-cease-edit]." (defun occur--set-arrow () "Set the overlay arrow at the first line of the occur match at point." (save-excursion - (let ((start (point)) - (target (get-text-property (point) 'occur-target)) + (let ((target (get-text-property (point) 'occur-target)) ;; Find the start of the occur match, in case it's multi-line. (prev (previous-single-property-change (point) 'occur-target))) (when (and prev (eq (get-text-property prev 'occur-target) target)) commit 660b17ef3e2f169478b56aaaacf6b9aa761b0619 Author: Mattias Engdegård Date: Sun Aug 1 11:52:00 2021 +0200 Indicate selected occur target with fringe arrow * lisp/replace.el (occur--set-arrow): New function. (occur-mode-goto-occurrence) (occur-mode-goto-occurrence-other-window) (occur-mode-display-occurrence): Call it. * etc/NEWS: Announce. diff --git a/etc/NEWS b/etc/NEWS index bd5c803d37..95a2c87d05 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -791,6 +791,9 @@ compilation buffers, recenters the current displayed occurrence/error. The method of highlighting is specified by the user options 'next-error-highlight' and 'next-error-highlight-no-select'. +--- +*** A fringe arrow in the '*Occur*' buffer indicates the selected match. + --- *** Occur mode may use a different type for 'occur-target' property values. The value was previously always a marker set to the start of the first diff --git a/lisp/replace.el b/lisp/replace.el index 148b7ce48b..462cc26e99 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -1443,6 +1443,19 @@ To return to ordinary Occur mode, use \\[occur-cease-edit]." (error "Buffer for this occurrence was killed")) targets)) +(defun occur--set-arrow () + "Set the overlay arrow at the first line of the occur match at point." + (save-excursion + (let ((start (point)) + (target (get-text-property (point) 'occur-target)) + ;; Find the start of the occur match, in case it's multi-line. + (prev (previous-single-property-change (point) 'occur-target))) + (when (and prev (eq (get-text-property prev 'occur-target) target)) + (goto-char prev)) + (setq overlay-arrow-position + (set-marker (or overlay-arrow-position (make-marker)) + (line-beginning-position)))))) + (defalias 'occur-mode-mouse-goto 'occur-mode-goto-occurrence) (defun occur-mode-goto-occurrence (&optional event) "Go to the occurrence specified by EVENT, a mouse click. @@ -1460,6 +1473,7 @@ If not invoked by a mouse click, go to occurrence on the current line." (goto-char (posn-point (event-end event))) (occur-mode--find-occurrences))))) (pos (occur--targets-start targets))) + (occur--set-arrow) (pop-to-buffer (marker-buffer pos)) (goto-char pos) (occur--highlight-occurrences targets) @@ -1471,6 +1485,7 @@ If not invoked by a mouse click, go to occurrence on the current line." (interactive) (let ((buffer (current-buffer)) (pos (occur--targets-start (occur-mode--find-occurrences)))) + (occur--set-arrow) (switch-to-buffer-other-window (marker-buffer pos)) (goto-char pos) (next-error-found buffer (current-buffer)) @@ -1530,6 +1545,7 @@ If not invoked by a mouse click, go to occurrence on the current line." '(nil (inhibit-same-window . t))) window) (setq window (display-buffer (marker-buffer pos) t)) + (occur--set-arrow) ;; This is the way to set point in the proper window. (save-selected-window (select-window window)