aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/wid-edit.el
diff options
context:
space:
mode:
authorStephen Berman2025-06-23 11:51:31 +0200
committerStephen Berman2025-06-23 11:51:31 +0200
commit2b34f38b383533ca659202492870c319fbc7ef41 (patch)
tree973e81005041b43c7f2a51256a939ba492152272 /lisp/wid-edit.el
parentedd18978aaae3ea50478843d0c9ad3441125f82f (diff)
downloademacs-2b34f38b383533ca659202492870c319fbc7ef41.tar.gz
emacs-2b34f38b383533ca659202492870c319fbc7ef41.zip
Optionally suppress recentf open file messages (bug#78666)
* etc/NEWS: Announce new user option. * lisp/recentf.el (recentf-suppress-open-file-help): New defcustom. (recentf-dialog-goto-first): Use it; otherwise, make calling 'widget-move' suppress message only for interactive recentf use. (recentf-forward, recentf-backward): New commands, wrappers around 'widget-{forward, backward}' using 'recentf-suppress-open-file-help'. (recentf-dialog): Use them in locally remapped key bindings. * lisp/wid-edit.el (widget-forward, widget-backward): Add optional argument to suppress :help-echo message and pass it to 'widget-move'.
Diffstat (limited to 'lisp/wid-edit.el')
-rw-r--r--lisp/wid-edit.el16
1 files changed, 10 insertions, 6 deletions
diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el
index db241ca914a..311e39f4c0f 100644
--- a/lisp/wid-edit.el
+++ b/lisp/wid-edit.el
@@ -1383,19 +1383,23 @@ nothing is shown in the echo area."
1383 (widget-echo-help (point))) 1383 (widget-echo-help (point)))
1384 (run-hooks 'widget-move-hook)) 1384 (run-hooks 'widget-move-hook))
1385 1385
1386(defun widget-forward (arg) 1386(defun widget-forward (arg &optional suppress-echo)
1387 "Move point to the next field or button. 1387 "Move point to the next field or button.
1388With optional ARG, move across that many fields." 1388With optional ARG, move across that many fields.
1389When the second optional argument is non-nil,
1390nothing is shown in the echo area."
1389 (interactive "p") 1391 (interactive "p")
1390 (run-hooks 'widget-forward-hook) 1392 (run-hooks 'widget-forward-hook)
1391 (widget-move arg)) 1393 (widget-move arg suppress-echo))
1392 1394
1393(defun widget-backward (arg) 1395(defun widget-backward (arg &optional suppress-echo)
1394 "Move point to the previous field or button. 1396 "Move point to the previous field or button.
1395With optional ARG, move across that many fields." 1397With optional ARG, move across that many fields.
1398When the second optional argument is non-nil,
1399nothing is shown in the echo area."
1396 (interactive "p") 1400 (interactive "p")
1397 (run-hooks 'widget-backward-hook) 1401 (run-hooks 'widget-backward-hook)
1398 (widget-move (- arg))) 1402 (widget-move (- arg) suppress-echo))
1399 1403
1400;; Since the widget code uses a `field' property to identify fields, 1404;; Since the widget code uses a `field' property to identify fields,
1401;; ordinary beginning-of-line does the right thing. 1405;; ordinary beginning-of-line does the right thing.