commit 0dbc4a697afb2a1e409909289f608fd4da875c24 (HEAD, refs/remotes/origin/master) Author: Mark Diekhans Date: Sun Feb 24 10:27:09 2019 -0800 Improve ispell.el diagnostics if Hunspell dictionaries aren't found * lisp/textmodes/ispell.el (ispell-set-spellchecker-params): Set ispell-last-program-name only at the end, so as to produce useful diagnostics when Hunspell dictionaries are not found. (Bug#34640) Copyright-paperwork-exempt: yes diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 35dae7bc43..6553a2799b 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -1273,7 +1273,6 @@ aspell is used along with Emacs).") (defun ispell-set-spellchecker-params () "Initialize some spellchecker parameters when changed or first used." (unless (eq ispell-last-program-name ispell-program-name) - (setq ispell-last-program-name ispell-program-name) (ispell-kill-ispell t) (if (and (condition-case () (progn @@ -1388,7 +1387,8 @@ aspell is used along with Emacs).") (nth 7 adict))) adict) tmp-dicts-alist :test #'equal)) - (setq ispell-dictionary-alist tmp-dicts-alist)))) + (setq ispell-dictionary-alist tmp-dicts-alist))) + (setq ispell-last-program-name ispell-program-name)) (defun ispell-valid-dictionary-list () "Return a list of valid dictionaries. commit ab9ae2fdfd24f93a9dfa7b1e0567b6a29962b55c Author: Paul Eggert Date: Thu Mar 7 10:43:19 2019 -0800 * lisp/net/rcirc.el: Undo previous change; it was a typo. diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index 9d53cd4436..b1a6c1ce8d 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el @@ -2685,7 +2685,7 @@ the only argument." (defun rcirc-handler-PART (process sender args _text) (let* ((channel (car args)) (reason (cadr args)) - (message "%s %s" channel reason)) + (message (concat channel " " reason))) (rcirc-print process sender "PART" channel message) ;; print in private chat buffer if it exists (when (rcirc-get-buffer (rcirc-buffer-process) sender) @@ -2697,7 +2697,7 @@ the only argument." (let* ((channel (car args)) (nick (cadr args)) (reason (nth 2 args)) - (message "%s %s %s" nick channel reason)) + (message (concat nick " " channel " " reason))) (rcirc-print process sender "KICK" channel message t) ;; print in private chat buffer if it exists (when (rcirc-get-buffer (rcirc-buffer-process) nick) commit 3739d51ef3b935b30e40ba4534fe362bc685865f Author: Paul Eggert Date: Thu Mar 7 09:02:15 2019 -0800 Be safer about "%" in message formats * lisp/calc/calc-store.el (calc-copy-special-constant): * lisp/net/rcirc.el (rcirc-handler-PART, rcirc-handler-KICK): * lisp/org/org-agenda.el (org-agenda): * lisp/org/org-clock.el (org-clock-out, org-clock-display): * lisp/org/org.el (org-refile): * lisp/progmodes/ada-xref.el (ada-goto-declaration): * lisp/progmodes/idlwave.el (idlwave-scan-library-catalogs): Don’t trust arbitrary strings to not contain "%" or "`" in (message (concat STRING1 STRING2 ...)). diff --git a/lisp/calc/calc-store.el b/lisp/calc/calc-store.el index 589a776c41..3987c129c2 100644 --- a/lisp/calc/calc-store.el +++ b/lisp/calc/calc-store.el @@ -405,8 +405,8 @@ sconst)))) (if var (let ((msg (calc-store-value var value ""))) - (message (concat "Special constant \"%s\" copied to \"%s\"" msg) - sconst (calc-var-name var))))))))) + (message "Special constant \"%s\" copied to \"%s\"%s" + sconst (calc-var-name var) msg)))))))) (defun calc-copy-variable (&optional var1 var2) (interactive) diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index b1a6c1ce8d..9d53cd4436 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el @@ -2685,7 +2685,7 @@ the only argument." (defun rcirc-handler-PART (process sender args _text) (let* ((channel (car args)) (reason (cadr args)) - (message (concat channel " " reason))) + (message "%s %s" channel reason)) (rcirc-print process sender "PART" channel message) ;; print in private chat buffer if it exists (when (rcirc-get-buffer (rcirc-buffer-process) sender) @@ -2697,7 +2697,7 @@ the only argument." (let* ((channel (car args)) (nick (cadr args)) (reason (nth 2 args)) - (message (concat nick " " channel " " reason))) + (message "%s %s %s" nick channel reason)) (rcirc-print process sender "KICK" channel message t) ;; print in private chat buffer if it exists (when (rcirc-get-buffer (rcirc-buffer-process) nick) diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el index e416f5f062..23ee8d71e6 100644 --- a/lisp/org/org-agenda.el +++ b/lisp/org/org-agenda.el @@ -2882,13 +2882,12 @@ Pressing `<' twice means to restrict to the current subtree or region (let* ((m (org-agenda-get-any-marker)) (note (and m (org-entry-get m "THEFLAGGINGNOTE")))) (when note - (message (concat - "FLAGGING-NOTE ([?] for more info): " - (org-add-props - (replace-regexp-in-string - "\\\\n" "//" - (copy-sequence note)) - nil 'face 'org-warning))))))) + (message "FLAGGING-NOTE ([?] for more info): %s" + (org-add-props + (replace-regexp-in-string + "\\\\n" "//" + (copy-sequence note)) + nil 'face 'org-warning)))))) t t)) ((equal org-keys "#") (call-interactively 'org-agenda-list-stuck-projects)) ((equal org-keys "/") (call-interactively 'org-occur-in-agenda-files)) diff --git a/lisp/org/org-clock.el b/lisp/org/org-clock.el index 34b694d487..62c7cd92d1 100644 --- a/lisp/org/org-clock.el +++ b/lisp/org/org-clock.el @@ -1622,9 +1622,10 @@ to, overriding the existing value of `org-clock-out-switch-to-state'." "\\>")))) (org-todo org-clock-out-switch-to-state)))))) (force-mode-line-update) - (message (concat "Clock stopped at %s after " - (org-duration-from-minutes (+ (* 60 h) m)) "%s") - te (if remove " => LINE REMOVED" "")) + (message (if remove + "Clock stopped at %s after %s => LINE REMOVED" + "Clock stopped at %s after %s") + te (org-duration-from-minutes (+ (* 60 h) m))) (run-hooks 'org-clock-out-hook) (unless (org-clocking-p) (setq org-clock-current-task nil))))))) @@ -1925,13 +1926,14 @@ Use `\\[org-clock-remove-overlays]' to remove the subtree times." nil 'local)))) (let* ((h (/ org-clock-file-total-minutes 60)) (m (- org-clock-file-total-minutes (* 60 h)))) - (message (concat (format "Total file time%s: " - (cond (todayp " for today") - (customp " (custom)") - (t ""))) - (org-duration-from-minutes - org-clock-file-total-minutes) - " (%d hours and %d minutes)") + (message (cond + (todayp + "Total file time for today: %s (%d hours and %d minutes)") + (customp + "Total file time (custom): %s (%d hours and %d minutes)") + (t + "Total file time: %s (%d hours and %d minutes)")) + (org-duration-from-minutes org-clock-file-total-minutes) h m)))) (defvar-local org-clock-overlays nil) diff --git a/lisp/org/org.el b/lisp/org/org.el index 3a434d12df..e3c78ae90d 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el @@ -11878,7 +11878,8 @@ prefix argument (`C-u C-u C-u C-c C-w')." (when (featurep 'org-inlinetask) (org-inlinetask-remove-END-maybe)) (setq org-markers-to-move nil) - (message (concat actionmsg " to \"%s\" in file %s: done") (car it) file))))))) + (message "%s to \"%s\" in file %s: done" actionmsg + (car it) file))))))) (defun org-refile-goto-last-stored () "Go to the location where the last refile was stored." diff --git a/lisp/progmodes/ada-xref.el b/lisp/progmodes/ada-xref.el index 28c52b0653..c9c923e1d6 100644 --- a/lisp/progmodes/ada-xref.el +++ b/lisp/progmodes/ada-xref.el @@ -1133,8 +1133,7 @@ If OTHER-FRAME is non-nil, display the cross-reference in another frame." (ada-find-in-ali identlist other-frame) ;; File not found: print explicit error message (ada-error-file-not-found - (message (concat (error-message-string err) - (nthcdr 1 err)))) + (message "%s%s" (error-message-string err) (nthcdr 1 err))) (error (let ((ali-file (ada-get-ali-file-name (ada-file-of identlist)))) diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el index 476d935e8a..25bc788ffc 100644 --- a/lisp/progmodes/idlwave.el +++ b/lisp/progmodes/idlwave.el @@ -5588,7 +5588,7 @@ be set to nil to disable library catalog scanning." (mapcar 'car idlwave-path-alist))) (old-libname "") dir-entry dir catalog all-routines) - (if message-base (message message-base)) + (if message-base (message "%s" message-base)) (while (setq dir (pop dirs)) (catch 'continue (when (file-readable-p @@ -5603,8 +5603,7 @@ be set to nil to disable library catalog scanning." message-base (not (string= idlwave-library-catalog-libname old-libname))) - (message "%s" (concat message-base - idlwave-library-catalog-libname)) + (message "%s%s" message-base idlwave-library-catalog-libname) (setq old-libname idlwave-library-catalog-libname)) (when idlwave-library-catalog-routines (setq all-routines @@ -5618,7 +5617,7 @@ be set to nil to disable library catalog scanning." (setq dir-entry (assoc dir idlwave-path-alist))) (idlwave-path-alist-add-flag dir-entry 'lib))))) (unless no-load (setq idlwave-library-catalog-routines all-routines)) - (if message-base (message (concat message-base "done")))))) + (if message-base (message "%sdone" message-base))))) ;;----- Communicating with the Shell ------------------- commit 953cbce77be9a8da1cbf0ca5ee6442923478e186 Merge: a0b2a5ad9e 3fd2100bff Author: Eli Zaretskii Date: Thu Mar 7 16:19:00 2019 +0200 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs commit a0b2a5ad9ec8186b679ee80e1c5b9786672344a0 Author: Eli Zaretskii Date: Wed Mar 6 21:06:00 2019 +0200 Fix OBJECT binding in conditional display specs * src/xdisp.c (compute_display_string_pos): Pass OBJECT1, not OBJECT to handle_display_spec, as the latter doesn't expect a window object. (Bug#34771) diff --git a/src/xdisp.c b/src/xdisp.c index 6ceb5c9e51..0af5e39dfb 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -3761,7 +3761,7 @@ compute_display_string_pos (struct text_pos *position, || !EQ (Fget_char_property (make_fixnum (charpos - 1), Qdisplay, object), spec)) - && (rv = handle_display_spec (NULL, spec, object, Qnil, &tpos, bufpos, + && (rv = handle_display_spec (NULL, spec, object1, Qnil, &tpos, bufpos, frame_window_p))) { if (rv == 2) @@ -3788,7 +3788,7 @@ compute_display_string_pos (struct text_pos *position, if (!STRINGP (object)) bufpos = CHARPOS (tpos); } while (NILP (spec) - || !(rv = handle_display_spec (NULL, spec, object, Qnil, &tpos, + || !(rv = handle_display_spec (NULL, spec, object1, Qnil, &tpos, bufpos, frame_window_p))); if (rv == 2) *disp_prop = 2;