From 3b7b181bded1bddb2505eda1224a5631cbf04c1b Mon Sep 17 00:00:00 2001 From: Mattias Engdegård Date: Mon, 9 Aug 2021 11:20:00 +0200 Subject: Use string-search instead of string-match[-p] `string-search` is easier to understand, less error-prone, much faster, does not pollute the regexp cache, and does not mutate global state. Use it where applicable and obviously safe (erring on the conservative side). * admin/authors.el (authors-canonical-file-name) (authors-scan-change-log): * lisp/apropos.el (apropos-command) (apropos-documentation-property, apropos-symbols-internal): * lisp/arc-mode.el (archive-arc-summarize) (archive-zoo-summarize): * lisp/calc/calc-aent.el (math-read-factor): * lisp/calc/calc-ext.el (math-read-big-expr) (math-format-nice-expr, math-format-number-fancy): * lisp/calc/calc-forms.el (math-read-angle-brackets): * lisp/calc/calc-graph.el (calc-graph-set-range): * lisp/calc/calc-keypd.el (calc-keypad-press): * lisp/calc/calc-lang.el (tex, latex, math-read-big-rec): * lisp/calc/calc-prog.el (calc-fix-token-name) (calc-user-define-permanent, math-define-exp): * lisp/calc/calc.el (calc-record, calcDigit-key) (calc-count-lines): * lisp/calc/calcalg2.el (calc-solve-for, calc-poly-roots) (math-do-integral): * lisp/calc/calcalg3.el (calc-find-root, calc-find-minimum) (calc-get-fit-variables): * lisp/cedet/ede/speedbar.el (ede-tag-expand): * lisp/cedet/semantic/java.el (semantic-java-expand-tag): * lisp/cedet/semantic/sb.el (semantic-sb-show-extra) (semantic-sb-expand-group): * lisp/cedet/semantic/wisent/python.el (semantic-python-instance-variable-p): * lisp/cus-edit.el (get): * lisp/descr-text.el (describe-text-sexp): * lisp/dired-aux.el (dired-compress-file): * lisp/dired-x.el (dired-make-relative-symlink): * lisp/dired.el (dired-glob-regexp): * lisp/dos-fns.el (dos-convert-standard-filename, dos-8+3-filename): * lisp/edmacro.el (edmacro-format-keys): * lisp/emacs-lisp/eieio-opt.el (eieio-sb-expand): * lisp/emacs-lisp/eieio-speedbar.el (eieio-speedbar-object-expand): * lisp/emacs-lisp/lisp-mnt.el (lm-keywords-list): * lisp/emacs-lisp/warnings.el (display-warning): * lisp/emulation/viper-ex.el (viper-ex-read-file-name) (ex-print-display-lines): * lisp/env.el (read-envvar-name, setenv): * lisp/epa-mail.el (epa-mail-encrypt): * lisp/epg.el (epg--start): * lisp/erc/erc-backend.el (erc-parse-server-response): * lisp/erc/erc-dcc.el (erc-dcc-member): * lisp/erc/erc-speedbar.el (erc-speedbar-expand-server) (erc-speedbar-expand-channel, erc-speedbar-expand-user): * lisp/erc/erc.el (erc-send-input): * lisp/eshell/em-glob.el (eshell-glob-entries): * lisp/eshell/esh-proc.el (eshell-needs-pipe-p): * lisp/eshell/esh-util.el (eshell-convert): * lisp/eshell/esh-var.el (eshell-envvar-names): * lisp/faces.el (x-resolve-font-name): * lisp/ffap.el (ffap-file-at-point): * lisp/files.el (wildcard-to-regexp, shell-quote-wildcard-pattern): * lisp/forms.el (forms--update): * lisp/frameset.el (frameset-filter-unshelve-param): * lisp/gnus/gnus-art.el (article-decode-charset): * lisp/gnus/gnus-kill.el (gnus-kill-parse-rn-kill-file): * lisp/gnus/gnus-mlspl.el (gnus-group-split-fancy): * lisp/gnus/gnus-msg.el (gnus-summary-resend-message-insert-gcc) (gnus-inews-insert-gcc): * lisp/gnus/gnus-rfc1843.el (rfc1843-decode-article-body): * lisp/gnus/gnus-search.el (gnus-search-indexed-parse-output) (gnus-search--complete-key-data): * lisp/gnus/gnus-spec.el (gnus-parse-simple-format): * lisp/gnus/gnus-sum.el (gnus-summary-refer-article): * lisp/gnus/gnus-util.el (gnus-extract-address-components) (gnus-newsgroup-directory-form): * lisp/gnus/gnus-uu.el (gnus-uu-grab-view): * lisp/gnus/gnus.el (gnus-group-native-p, gnus-short-group-name): * lisp/gnus/message.el (message-check-news-header-syntax) (message-make-message-id, message-user-mail-address) (message-make-fqdn, message-get-reply-headers, message-followup): * lisp/gnus/mm-decode.el (mm-dissect-buffer): * lisp/gnus/nnheader.el (nnheader-insert): * lisp/gnus/nnimap.el (nnimap-process-quirk) (nnimap-imap-ranges-to-gnus-ranges): * lisp/gnus/nnmaildir.el (nnmaildir--ensure-suffix): * lisp/gnus/nnmairix.el (nnmairix-determine-original-group-from-path): * lisp/gnus/nnrss.el (nnrss-match-macro): * lisp/gnus/nntp.el (nntp-find-group-and-number): * lisp/help-fns.el (help--symbol-completion-table-affixation): * lisp/help.el (help-function-arglist): * lisp/hippie-exp.el (he-concat-directory-file-name): * lisp/htmlfontify.el (hfy-relstub): * lisp/ido.el (ido-make-prompt, ido-complete, ido-copy-current-word) (ido-exhibit): * lisp/image/image-converter.el (image-convert-p): * lisp/info-xref.el (info-xref-docstrings): * lisp/info.el (Info-toc-build, Info-follow-reference) (Info-backward-node, Info-finder-find-node) (Info-speedbar-expand-node): * lisp/international/mule-diag.el (print-fontset-element): * lisp/language/korea-util.el (default-korean-keyboard): * lisp/linum.el (linum-after-change): * lisp/mail/ietf-drums.el (ietf-drums-parse-address): * lisp/mail/mail-utils.el (mail-dont-reply-to): * lisp/mail/rfc2047.el (rfc2047-encode-1, rfc2047-decode-string): * lisp/mail/rfc2231.el (rfc2231-parse-string): * lisp/mail/rmailkwd.el (rmail-set-label): * lisp/mail/rmailsum.el (rmail-header-summary): * lisp/mail/smtpmail.el (smtpmail-maybe-append-domain) (smtpmail-user-mail-address): * lisp/mail/uce.el (uce-reply-to-uce): * lisp/man.el (Man-default-man-entry): * lisp/mh-e/mh-alias.el (mh-alias-gecos-name) (mh-alias-minibuffer-confirm-address): * lisp/mh-e/mh-comp.el (mh-forwarded-letter-subject): * lisp/mh-e/mh-speed.el (mh-speed-parse-flists-output): * lisp/mh-e/mh-utils.el (mh-collect-folder-names-filter) (mh-folder-completion-function): * lisp/minibuffer.el (completion--make-envvar-table) (completion-file-name-table, completion-flex-try-completion) (completion-flex-all-completions): * lisp/mpc.el (mpc--proc-quote-string, mpc-cmd-special-tag-p) (mpc-constraints-tag-lookup): * lisp/net/ange-ftp.el (ange-ftp-send-cmd) (ange-ftp-allow-child-lookup): * lisp/net/mailcap.el (mailcap-mime-types): * lisp/net/mairix.el (mairix-search-thread-this-article): * lisp/net/pop3.el (pop3-open-server): * lisp/net/soap-client.el (soap-decode-xs-complex-type): * lisp/net/socks.el (socks-filter): * lisp/nxml/nxml-outln.el (nxml-highlighted-qname): * lisp/nxml/rng-cmpct.el (rng-c-expand-name, rng-c-expand-datatype): * lisp/nxml/rng-uri.el (rng-uri-file-name-1): * lisp/obsolete/complete.el (partial-completion-mode) (PC-do-completion): * lisp/obsolete/longlines.el (longlines-encode-string): * lisp/obsolete/nnir.el (nnir-compose-result): * lisp/obsolete/terminal.el (te-quote-arg-for-sh): * lisp/obsolete/tpu-edt.el (tpu-check-search-case): * lisp/obsolete/url-ns.el (isPlainHostName): * lisp/pcmpl-unix.el (pcomplete/scp): * lisp/play/dunnet.el (dun-listify-string2, dun-get-path) (dun-unix-parse, dun-doassign, dun-cat, dun-batch-unix-interface): * lisp/progmodes/ebnf2ps.el: (ebnf-eps-header-footer-comment): * lisp/progmodes/gdb-mi.el (gdb-var-delete) (gdb-speedbar-expand-node, gdbmi-bnf-incomplete-record-result): * lisp/progmodes/gud.el (gud-find-expr): * lisp/progmodes/idlw-help.el (idlwave-do-context-help1): * lisp/progmodes/idlw-shell.el (idlwave-shell-mode) (idlwave-shell-filter-hidden-output, idlwave-shell-filter): * lisp/progmodes/idlwave.el (idlwave-skip-label-or-case) (idlwave-routine-info): * lisp/progmodes/octave.el (inferior-octave-completion-at-point): * lisp/progmodes/sh-script.el (sh-add-completer): * lisp/progmodes/sql.el (defun): * lisp/progmodes/xscheme.el (xscheme-process-filter): * lisp/replace.el (query-replace-compile-replacement) (map-query-replace-regexp): * lisp/shell.el (shell--command-completion-data) (shell-environment-variable-completion): * lisp/simple.el (display-message-or-buffer): * lisp/speedbar.el (speedbar-dired, speedbar-tag-file) (speedbar-tag-expand): * lisp/subr.el (split-string-and-unquote): * lisp/tar-mode.el (tar-extract): * lisp/term.el (term-command-hook, serial-read-name): * lisp/textmodes/bibtex.el (bibtex-print-help-message): * lisp/textmodes/ispell.el (ispell-lookup-words, ispell-filter) (ispell-parse-output, ispell-buffer-local-parsing): * lisp/textmodes/reftex-cite.el (reftex-do-citation): * lisp/textmodes/reftex-parse.el (reftex-notice-new): * lisp/textmodes/reftex-ref.el (reftex-show-entry): * lisp/textmodes/reftex.el (reftex-compile-variables): * lisp/textmodes/tex-mode.el (tex-send-command) (tex-start-tex, tex-append): * lisp/thingatpt.el (thing-at-point-url-at-point): * lisp/tmm.el (tmm-add-one-shortcut): * lisp/transient.el (transient-format-key): * lisp/url/url-auth.el (url-basic-auth) (url-digest-auth-directory-id-assoc): * lisp/url/url-news.el (url-news): * lisp/url/url-util.el (url-parse-query-string): * lisp/vc/vc-cvs.el (vc-cvs-parse-entry): * lisp/wid-browse.el (widget-browse-sexp): * lisp/woman.el (woman-parse-colon-path, woman-mini-help) (WoMan-getpage-in-background, woman-negative-vertical-space): * lisp/xml.el: * test/lisp/emacs-lisp/check-declare-tests.el (check-declare-tests-warn): * test/lisp/files-tests.el (files-tests-file-name-non-special-dired-compress-handler): * test/lisp/net/network-stream-tests.el (server-process-filter): * test/src/coding-tests.el (ert-test-unibyte-buffer-dos-eol-decode): Use `string-search` instead of `string-match` and `string-match-p`. --- lisp/cus-edit.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp/cus-edit.el') diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 980a1cc7179..7eae2e416bb 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -1910,7 +1910,7 @@ item in another window.\n\n")) (widget-put (get 'editable-field 'widget-type) :custom-show (lambda (_widget value) (let ((pp (pp-to-string value))) - (cond ((string-match-p "\n" pp) + (cond ((string-search "\n" pp) nil) ((> (length pp) 40) nil) -- cgit v1.2.3 From aebba085cba13ad1439462923ffa0520456f1aad Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Wed, 22 Sep 2021 20:26:40 +0200 Subject: ; More minor stylistic fixes found by checkdoc --- lisp/allout.el | 35 +++++++++--------- lisp/ansi-color.el | 2 +- lisp/apropos.el | 4 +-- lisp/auth-source.el | 8 ++--- lisp/autoinsert.el | 7 ++-- lisp/bindings.el | 6 ++-- lisp/bookmark.el | 17 +++++---- lisp/buff-menu.el | 6 ++-- lisp/button.el | 45 +++++++++++------------ lisp/calc/calc-aent.el | 3 +- lisp/calc/calc-forms.el | 15 ++++---- lisp/calc/calc-poly.el | 2 +- lisp/calc/calc.el | 12 +++---- lisp/calculator.el | 9 +++-- lisp/calendar/diary-lib.el | 7 ++-- lisp/char-fold.el | 2 ++ lisp/cmuscheme.el | 2 +- lisp/comint.el | 2 +- lisp/cus-edit.el | 4 +-- lisp/cus-theme.el | 2 ++ lisp/dabbrev.el | 3 +- lisp/dired-aux.el | 4 +-- lisp/dired-x.el | 4 +-- lisp/dired.el | 5 ++- lisp/display-fill-column-indicator.el | 2 +- lisp/dos-vars.el | 6 ++-- lisp/edmacro.el | 13 +++---- lisp/elec-pair.el | 2 +- lisp/epa-dired.el | 2 ++ lisp/epa-file.el | 3 +- lisp/epa-hook.el | 2 ++ lisp/epa-mail.el | 3 +- lisp/epa.el | 11 +++--- lisp/epg.el | 4 ++- lisp/face-remap.el | 2 +- lisp/faces.el | 4 +-- lisp/ffap.el | 10 +++--- lisp/fileloop.el | 1 + lisp/files.el | 4 +-- lisp/filesets.el | 14 ++++---- lisp/find-dired.el | 2 +- lisp/foldout.el | 2 +- lisp/font-core.el | 2 ++ lisp/forms.el | 4 +-- lisp/hexl.el | 2 +- lisp/hi-lock.el | 2 +- lisp/image-dired.el | 4 +-- lisp/imenu.el | 3 +- lisp/indent.el | 15 ++++---- lisp/info-look.el | 6 ++-- lisp/international/ccl.el | 13 +++---- lisp/international/quail.el | 3 +- lisp/international/robin.el | 3 +- lisp/isearch.el | 2 +- lisp/jit-lock.el | 2 +- lisp/kmacro.el | 4 +-- lisp/loadhist.el | 3 +- lisp/locate.el | 2 +- lisp/macros.el | 13 ++++--- lisp/menu-bar.el | 6 ++-- lisp/mouse-drag.el | 2 +- lisp/mouse.el | 2 +- lisp/nxml/nxml-mode.el | 3 +- lisp/nxml/rng-loc.el | 4 +-- lisp/nxml/rng-valid.el | 5 ++- lisp/pcmpl-x.el | 2 ++ lisp/play/5x5.el | 6 ++-- lisp/play/doctor.el | 4 +-- lisp/play/dunnet.el | 12 +++---- lisp/play/hanoi.el | 2 +- lisp/play/mpuz.el | 2 +- lisp/play/tetris.el | 2 +- lisp/printing.el | 12 +++---- lisp/profiler.el | 6 ++-- lisp/progmodes/cc-bytecomp.el | 30 ++++++++-------- lisp/progmodes/cc-cmds.el | 5 +-- lisp/progmodes/cc-defs.el | 14 ++++---- lisp/progmodes/cc-engine.el | 10 +++--- lisp/progmodes/cc-fonts.el | 2 +- lisp/progmodes/cc-langs.el | 3 +- lisp/progmodes/cc-mode.el | 2 +- lisp/progmodes/cc-vars.el | 2 +- lisp/progmodes/cmacexp.el | 2 +- lisp/progmodes/compile.el | 8 +++-- lisp/progmodes/cperl-mode.el | 4 +-- lisp/progmodes/cpp.el | 6 ++-- lisp/progmodes/dcl-mode.el | 4 +-- lisp/progmodes/ebnf-yac.el | 2 +- lisp/progmodes/f90.el | 6 ++-- lisp/progmodes/flymake.el | 4 +-- lisp/progmodes/gdb-mi.el | 6 ++-- lisp/progmodes/grep.el | 4 +-- lisp/progmodes/hideshow.el | 2 +- lisp/progmodes/idlwave.el | 2 +- lisp/progmodes/opascal.el | 5 +-- lisp/progmodes/prog-mode.el | 4 +-- lisp/progmodes/project.el | 4 +-- lisp/progmodes/verilog-mode.el | 4 +-- lisp/progmodes/vhdl-mode.el | 67 +++++++++++++++++------------------ lisp/progmodes/xref.el | 2 +- lisp/rect.el | 4 +-- lisp/repeat.el | 2 +- lisp/replace.el | 13 +++---- lisp/ruler-mode.el | 2 +- lisp/server.el | 2 +- lisp/ses.el | 10 +++--- lisp/shell.el | 3 +- lisp/simple.el | 18 ++++++---- lisp/so-long.el | 8 ++--- lisp/sort.el | 3 +- lisp/subr.el | 2 ++ lisp/tempo.el | 2 +- lisp/term.el | 38 ++++++++++---------- lisp/textmodes/bib-mode.el | 2 +- lisp/textmodes/flyspell.el | 2 +- lisp/textmodes/makeinfo.el | 7 ++-- lisp/textmodes/mhtml-mode.el | 2 ++ lisp/textmodes/refill.el | 2 +- lisp/textmodes/reftex-dcr.el | 19 +++++----- lisp/textmodes/reftex-global.el | 6 ++-- lisp/textmodes/reftex-index.el | 4 +-- lisp/textmodes/reftex-parse.el | 6 ++-- lisp/textmodes/reftex-vars.el | 9 ++--- lisp/textmodes/texinfmt.el | 14 ++++---- lisp/transient.el | 4 +-- lisp/wdired.el | 4 +-- lisp/whitespace.el | 6 ++-- lisp/wid-edit.el | 7 ++-- lisp/woman.el | 4 +-- 129 files changed, 447 insertions(+), 408 deletions(-) (limited to 'lisp/cus-edit.el') diff --git a/lisp/allout.el b/lisp/allout.el index bb365246587..c123e8ded4c 100644 --- a/lisp/allout.el +++ b/lisp/allout.el @@ -116,7 +116,7 @@ Do NOT set the value of this variable. Instead, customize "Create the allout keymap according to the keybinding specs, and set it. Useful standalone or to effect customizations of the -respective allout-mode keybinding variables, `allout-command-prefix', +respective `allout-mode' keybinding variables, `allout-command-prefix', `allout-prefixed-keybindings', and `allout-unprefixed-keybindings'" ;; Set the customization variable, if any: (when varname @@ -145,7 +145,7 @@ respective allout-mode keybinding variables, `allout-command-prefix', (allout-institute-keymap map))) ;;;_ > allout-institute-keymap (map) (defun allout-institute-keymap (map) - "Associate allout-mode bindings with allout as a minor mode." + "Associate `allout-mode' bindings with allout as a minor mode." ;; Architecture: ;; allout-mode-map var is a keymap by virtue of being a defalias for ;; allout-mode-map-value, which has the actual keymap value. @@ -358,7 +358,7 @@ Examples: See `allout-expose-topic' for more about the exposure process. Also, allout's mode-specific provisions will make topic prefixes default -to the comment-start string, if any, of the language of the file. This +to the `comment-start' string, if any, of the language of the file. This is modulo the setting of `allout-use-mode-specific-leader', which see." :type 'allout-layout-type :group 'allout) @@ -429,8 +429,7 @@ those that do not have the variable `comment-start' set. A value of ;;;_ = allout-show-bodies (defcustom allout-show-bodies nil - "If non-nil, show entire body when exposing a topic, rather than -just the header." + "If non-nil, show entire body when exposing a topic, rather than just the header." :type 'boolean :group 'allout) (make-variable-buffer-local 'allout-show-bodies) @@ -596,16 +595,16 @@ strings." "When non-nil, use mode-specific topic-header prefixes. Allout outline mode will use the mode-specific `allout-mode-leaders' or -comment-start string, if any, to lead the topic prefix string, so topic +`comment-start' string, if any, to lead the topic prefix string, so topic headers look like comments in the programming language. It will also use -the comment-start string, with an `_' appended, for `allout-primary-bullet'. +the `comment-start' string, with an `_' appended, for `allout-primary-bullet'. String values are used as literals, not regular expressions, so do not escape any regular-expression characters. Value t means to first check for assoc value in `allout-mode-leaders' -alist, then use comment-start string, if any, then use default (`.'). -\(See note about use of comment-start strings, below.) +alist, then use `comment-start' string, if any, then use default (`.'). +\(See note about use of `comment-start' strings, below.) Set to the symbol for either of `allout-mode-leaders' or `comment-start' to use only one of them, respectively. @@ -613,9 +612,9 @@ Set to the symbol for either of `allout-mode-leaders' or Value nil means to always use the default (`.') and leave `allout-primary-bullet' unaltered. -comment-start strings that do not end in spaces are tripled in +`comment-start' strings that do not end in spaces are tripled in the header-prefix, and an `_' underscore is tacked on the end, to -distinguish them from regular comment strings. comment-start +distinguish them from regular comment strings. `comment-start' strings that do end in spaces are not tripled, but an underscore is substituted for the space. [This presumes that the space is for appearance, not comment syntax. You can use @@ -633,8 +632,8 @@ undesired.]" (defvar allout-mode-leaders '() "Specific allout-prefix leading strings per major modes. -Use this if the mode's comment-start string isn't what you -prefer, or if the mode lacks a comment-start string. See +Use this if the mode's `comment-start' string isn't what you +prefer, or if the mode lacks a `comment-start' string. See `allout-use-mode-specific-leader' for more details. If you're constructing a string that will comment-out outline @@ -860,7 +859,7 @@ For details, see `allout-toggle-current-subtree-encryption's docstring." ;;;_ : Version ;;;_ = allout-version (defvar allout-version "2.3" - "Version of currently loaded outline package. (allout.el)") + "Version of currently loaded allout.el package.") ;;;_ > allout-version (defun allout-version (&optional here) "Return string describing the loaded outline version." @@ -1509,7 +1508,7 @@ See `allout-encryption-ciphertext-rejection-regexps' for rejection reasons.") 'allout-mode) ;;;_ > allout-write-contents-hook-handler () (defun allout-write-contents-hook-handler () - "Implement `allout-encrypt-unencrypted-on-saves' for file writes + "Implement `allout-encrypt-unencrypted-on-saves' for file writes. Return nil if all goes smoothly, or else return an informative message if an error is encountered. The message will serve as a @@ -3998,8 +3997,7 @@ With repeat count, shift topic depth by that amount." index do-successors sans-offspring) - "Like `allout-rebullet-topic', but on nearest containing topic -\(visible or not). + "Like `allout-rebullet-topic', but on nearest containing topic (visible or not). See `allout-rebullet-heading' for rebulleting behavior. @@ -5056,8 +5054,7 @@ Examples: max-pos))) ;;;_ > allout-old-expose-topic (spec &rest followers) (defun allout-old-expose-topic (spec &rest followers) - "Deprecated. Use `allout-expose-topic' (with different schema -format) instead. + "Deprecated. Use `allout-expose-topic' (with different schema format) instead. Dictate wholesale exposure scheme for current topic, according to SPEC. diff --git a/lisp/ansi-color.el b/lisp/ansi-color.el index 79b1c9912f5..4315a7f3cef 100644 --- a/lisp/ansi-color.el +++ b/lisp/ansi-color.el @@ -604,7 +604,7 @@ codes. Finally, the so changed list of codes is returned." codes)) (defun ansi-color-make-color-map () - "Creates a vector of face definitions and returns it. + "Create a vector of face definitions and return it. The index into the vector is an ANSI code. See the documentation of `ansi-color-map' for an example. diff --git a/lisp/apropos.el b/lisp/apropos.el index 513175d7513..fc15cd3e011 100644 --- a/lisp/apropos.el +++ b/lisp/apropos.el @@ -1305,7 +1305,7 @@ as a heading." (error "There is nothing to follow here")))) (defun apropos-next-symbol () - "Move cursor down to the next symbol in an apropos-mode buffer." + "Move cursor down to the next symbol in an `apropos-mode' buffer." (interactive) (forward-line) (while (and (not (eq (face-at-point) 'apropos-symbol)) @@ -1313,7 +1313,7 @@ as a heading." (forward-line))) (defun apropos-previous-symbol () - "Move cursor back to the last symbol in an apropos-mode buffer." + "Move cursor back to the last symbol in an `apropos-mode' buffer." (interactive) (forward-line -1) (while (and (not (eq (face-at-point) 'apropos-symbol)) diff --git a/lisp/auth-source.el b/lisp/auth-source.el index d938522c803..3c1a6feaeeb 100644 --- a/lisp/auth-source.el +++ b/lisp/auth-source.el @@ -176,7 +176,7 @@ Overrides `password-cache-expiry' through a let-binding." ;; TODO: or maybe leave as (setq auth-source-netrc-use-gpg-tokens 'never) (defcustom auth-source-netrc-use-gpg-tokens 'never - "Set this to tell auth-source when to create GPG password + "Set this to tell `auth-source' when to create GPG password tokens in netrc files. It's either an alist or `never'. Note that if EPA/EPG is not available, this should NOT be used." :version "23.2" ;; No Gnus @@ -503,7 +503,7 @@ soon as a function returns non-nil.") (add-hook 'auth-source-backend-parser-functions #'auth-source-backends-parser-secrets) (defun auth-source-backend-parse-parameters (entry backend) - "Fill in the extra auth-source-backend parameters of ENTRY. + "Fill in the extra `auth-source-backend' parameters of ENTRY. Using the plist ENTRY, get the :host, :port, and :user search parameters." (let ((entry (if (stringp entry) @@ -1227,7 +1227,7 @@ FILE is the file from which we obtained this token." &key backend require create type max host user port &allow-other-keys) - "Given a property list SPEC, return search matches from the :backend. + "Given a property list SPEC, return search matches from the `:backend'. See `auth-source-search' for details on SPEC." ;; just in case, check that the type is correct (null or same as the backend) (cl-assert (or (null type) (eq type (oref backend type))) @@ -2274,7 +2274,7 @@ entries for git.gnus.org: &key backend require type max host user port &allow-other-keys) - "Given a property list SPEC, return search matches from the :backend. + "Given a property list SPEC, return search matches from the `:backend'. See `auth-source-search' for details on SPEC." ;; just in case, check that the type is correct (null or same as the backend) (cl-assert (or (null type) (eq type (oref backend type))) diff --git a/lisp/autoinsert.el b/lisp/autoinsert.el index 995d9e2e0fe..063d0a14d63 100644 --- a/lisp/autoinsert.el +++ b/lisp/autoinsert.el @@ -83,10 +83,11 @@ When this is `function', only ask when called non-interactively." (const :tag "Ask if called non-interactively" function) (other :tag "Ask" t))) -(defcustom auto-insert-prompt "Perform %s auto-insertion? " - "Prompt to use when querying whether to auto-insert. +(defcustom auto-insert-prompt "Perform %s auto-insertion?" + "Prompt to use when querying whether to `auto-insert'. If this contains a %s, that will be replaced by the matching rule." - :type 'string) + :type 'string + :version "28.1") (defcustom auto-insert-alist diff --git a/lisp/bindings.el b/lisp/bindings.el index 5c1adef9b50..343f1ba0fa7 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el @@ -184,8 +184,8 @@ mouse-3: Remove current window from display")) (defvar mode-line-front-space '(:eval (if (display-graphic-p) " " "-")) "Mode line construct to put at the front of the mode line. By default, this construct is displayed right at the beginning of -the mode line, except that if there is a memory-full message, it -is displayed first.") +the mode line, except that if there is a \"memory full\" message, +it is displayed first.") (put 'mode-line-front-space 'risky-local-variable t) (defun mode-line-mule-info-help-echo (window _object _point) @@ -1086,7 +1086,7 @@ if `inhibit-field-text-motion' is non-nil." (define-key map "p" 'previous-error) (define-key map "\M-p" 'previous-error) map) - "Keymap to repeat next-error key sequences. Used in `repeat-mode'.") + "Keymap to repeat `next-error' key sequences. Used in `repeat-mode'.") (put 'next-error 'repeat-map 'next-error-repeat-map) (put 'previous-error 'repeat-map 'next-error-repeat-map) diff --git a/lisp/bookmark.el b/lisp/bookmark.el index ac63c8f1b0a..d64966df5af 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el @@ -905,7 +905,9 @@ others are still there, should the user decide to delete the most recent one. To yank words from the text of the buffer and use them as part of the -bookmark name, type C-w while setting a bookmark. Successive C-w's +bookmark name, type \\\ +\\[bookmark-yank-word] while setting a bookmark. Successive \ +\\[bookmark-yank-word]'s yank successive words. Typing \\[universal-argument] inserts (at the bookmark name prompt) the name of the last @@ -938,7 +940,9 @@ Otherwise, if a bookmark named NAME already exists but PUSH-BOOKMARK is nil, raise an error. To yank words from the text of the buffer and use them as part of the -bookmark name, type C-w while setting a bookmark. Successive C-w's +bookmark name, type \\\ +\\[bookmark-yank-word] while setting a bookmark. Successive \ +\\[bookmark-yank-word]'s yank successive words. Typing \\[universal-argument] inserts (at the bookmark name prompt) the name of the last @@ -1361,7 +1365,8 @@ If called from Lisp, prompt for NEW-NAME if only OLD-NAME was passed as an argument. If called with two strings, then no prompting is done. You must pass at least OLD-NAME when calling from Lisp. -While you are entering the new name, consecutive C-w's insert +While you are entering the new name, consecutive \ +\\\\[bookmark-yank-word]'s insert consecutive words from the text of the buffer into the new bookmark name." (interactive (list (bookmark-completing-read "Old bookmark name"))) @@ -1734,8 +1739,8 @@ unique numeric suffixes \"<2>\", \"<3>\", etc." (define-key map [mouse-2] 'bookmark-bmenu-other-window-with-mouse) map)) -(easy-menu-define - bookmark-menu bookmark-bmenu-mode-map "Bookmark Menu" +(easy-menu-define bookmark-menu bookmark-bmenu-mode-map + "Menu for `bookmark-bmenu'." '("Bookmark" ["Select Bookmark in This Window" bookmark-bmenu-this-window t] ["Select Bookmark in Full-Frame Window" bookmark-bmenu-1-window t] @@ -2062,7 +2067,7 @@ You can mark bookmarks with the \\\\[bookmark-bmenu-mar (defun bookmark-bmenu-save () "Save the current list into a bookmark file. -With a prefix arg, prompts for a file to save them in. +With a prefix arg, prompt for a file to save them in. See also the related behaviors of `bookmark-load' and `bookmark-bmenu-load'." diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el index 340c926f8d6..1013a7c4973 100644 --- a/lisp/buff-menu.el +++ b/lisp/buff-menu.el @@ -222,7 +222,7 @@ In Buffer Menu mode, the following commands are defined: so the Buffer Menu remains visible in its window. \\[Buffer-menu-view] Select current line's buffer, in View mode. \\[Buffer-menu-view-other-window] Select that buffer in - another window, in view-mode. + another window, in `view-mode'. \\[Buffer-menu-switch-other-window] Make another window display that buffer. \\[Buffer-menu-mark] Mark current line's buffer to be displayed. \\[Buffer-menu-select] Select current line's buffer. @@ -233,7 +233,7 @@ In Buffer Menu mode, the following commands are defined: \\[Buffer-menu-isearch-buffers] Incremental search in the marked buffers. \\[Buffer-menu-isearch-buffers-regexp] Isearch for regexp in the marked buffers. \\[Buffer-menu-multi-occur] Show lines matching regexp in the marked buffers. -\\[Buffer-menu-visit-tags-table] visit-tags-table this buffer. +\\[Buffer-menu-visit-tags-table] `visit-tags-table' this buffer. \\[Buffer-menu-not-modified] Clear modified-flag on that buffer. \\[Buffer-menu-save] Mark that buffer to be saved, and move down. \\[Buffer-menu-delete] Mark that buffer to be deleted, and move down. @@ -306,7 +306,7 @@ ARG, show only buffers that are visiting files." (display-buffer (list-buffers-noselect arg))) (defun Buffer-menu-toggle-files-only (arg) - "Toggle whether the current buffer-menu displays only file buffers. + "Toggle whether the current `buffer-menu' displays only file buffers. With a positive ARG, display only file buffers. With zero or negative ARG, display other buffers as well." (interactive "P" Buffer-menu-mode) diff --git a/lisp/button.el b/lisp/button.el index 74dfb5d5419..aedd07b762d 100644 --- a/lisp/button.el +++ b/lisp/button.el @@ -113,21 +113,22 @@ Mode-specific keymaps may want to use this as their parent keymap.") ;; [this is an internal function] (defsubst button-category-symbol (type) - "Return the symbol used by button-type TYPE to store properties. + "Return the symbol used by `button-type' TYPE to store properties. Buttons inherit them by setting their `category' property to that symbol." (or (get type 'button-category-symbol) (error "Unknown button type `%s'" type))) (defun define-button-type (name &rest properties) "Define a `button type' called NAME (a symbol). -The remaining arguments form a plist of PROPERTY VALUE pairs, -specifying properties to use as defaults for buttons with this type -\(a button's type may be set by giving it a `type' property when -creating the button, using the :type keyword argument). +The remaining PROPERTIES arguments form a plist of PROPERTY VALUE +pairs, specifying properties to use as defaults for buttons with +this type (a button's type may be set by giving it a `type' +property when creating the button, using the :type keyword +argument). In addition, the keyword argument :supertype may be used to specify a -button-type from which NAME inherits its default property values -\(however, the inheritance happens only when NAME is defined; subsequent +`button-type' from which NAME inherits its default property values +(however, the inheritance happens only when NAME is defined; subsequent changes to a supertype are not reflected in its subtypes)." (let ((catsym (make-symbol (concat (symbol-name name) "-button"))) (super-catsym @@ -156,15 +157,15 @@ changes to a supertype are not reflected in its subtypes)." name)) (defun button-type-put (type prop val) - "Set the button-type TYPE's PROP property to VAL." + "Set the `button-type' TYPE's PROP property to VAL." (put (button-category-symbol type) prop val)) (defun button-type-get (type prop) - "Get the property of button-type TYPE named PROP." + "Get the property of `button-type' TYPE named PROP." (get (button-category-symbol type) prop)) (defun button-type-subtype-p (type supertype) - "Return non-nil if button-type TYPE is a subtype of SUPERTYPE." + "Return non-nil if `button-type' TYPE is a subtype of SUPERTYPE." (or (eq type supertype) (and type (button-type-subtype-p (button-type-get type 'supertype) @@ -271,11 +272,11 @@ This function only works when BUTTON is in the current buffer." (button-end button)))) (defsubst button-type (button) - "Return BUTTON's button-type." + "Return BUTTON's `button-type'." (button-get button 'type)) (defun button-has-type-p (button type) - "Return non-nil if BUTTON has button-type TYPE, or one of its subtypes." + "Return non-nil if BUTTON has `button-type' TYPE, or one of its subtypes." (button-type-subtype-p (button-get button 'type) type)) (defun button--area-button-p (b) @@ -290,10 +291,10 @@ Such area buttons are used for buttons in the mode-line and header-line." (defun make-button (beg end &rest properties) "Make a button from BEG to END in the current buffer. -The remaining arguments form a plist of PROPERTY VALUE pairs, -specifying properties to add to the button. +The remaining PROPERTIES arguments form a plist of PROPERTY VALUE +pairs, specifying properties to add to the button. In addition, the keyword argument :type may be used to specify a -button-type from which to inherit other properties; see +`button-type' from which to inherit other properties; see `define-button-type'. Also see `make-text-button', `insert-button'." @@ -314,7 +315,7 @@ Also see `make-text-button', `insert-button'." The remaining arguments form a plist of PROPERTY VALUE pairs, specifying properties to add to the button. In addition, the keyword argument :type may be used to specify a -button-type from which to inherit other properties; see +`button-type' from which to inherit other properties; see `define-button-type'. Also see `insert-text-button', `make-button'." @@ -328,10 +329,10 @@ Also see `insert-text-button', `make-button'." (defun make-text-button (beg end &rest properties) "Make a button from BEG to END in the current buffer. -The remaining arguments form a plist of PROPERTY VALUE pairs, -specifying properties to add to the button. +The remaining PROPERTIES arguments form a plist of PROPERTY VALUE +pairs, specifying properties to add to the button. In addition, the keyword argument :type may be used to specify a -button-type from which to inherit other properties; see +`button-type' from which to inherit other properties; see `define-button-type'. This function is like `make-button', except that the button is actually @@ -382,10 +383,10 @@ Also see `insert-text-button'." (defun insert-text-button (label &rest properties) "Insert a button with the label LABEL. -The remaining arguments form a plist of PROPERTY VALUE pairs, -specifying properties to add to the button. +The remaining PROPERTIES arguments form a plist of PROPERTY VALUE +pairs, specifying properties to add to the button. In addition, the keyword argument :type may be used to specify a -button-type from which to inherit other properties; see +`button-type' from which to inherit other properties; see `define-button-type'. This function is like `insert-button', except that the button is diff --git a/lisp/calc/calc-aent.el b/lisp/calc/calc-aent.el index 0e913ddfdb9..52c024865a7 100644 --- a/lisp/calc/calc-aent.el +++ b/lisp/calc/calc-aent.el @@ -537,8 +537,7 @@ The value t means abort and give an error message.") ("₋" "-") ; - ("₍" "(") ; ( ("₎" ")")) ; ) - "A list whose elements (old new) indicate replacements to make -in Calc algebraic input.") + "A list indicating replacements to make in Calc algebraic input.") (defvar math-read-superscripts "⁰¹²³⁴⁵⁶⁷⁸⁹⁺⁻⁽⁾ⁿⁱ" ; 0123456789+-()ni diff --git a/lisp/calc/calc-forms.el b/lisp/calc/calc-forms.el index ac57011da04..ce8e3579f48 100644 --- a/lisp/calc/calc-forms.el +++ b/lisp/calc/calc-forms.el @@ -703,16 +703,19 @@ in the Gregorian calendar." fmt)))) (defconst math-julian-date-beginning '(float 17214245 -1) - "The beginning of the Julian date calendar, -as measured in the number of days before December 31, 1 BC (Gregorian).") + "The beginning of the Julian date calendar. +This is measured in the number of days before December 31, 1 +BC (Gregorian).") (defconst math-julian-date-beginning-int 1721425 - "The beginning of the Julian date calendar, -as measured in the integer number of days before December 31, 1 BC (Gregorian).") + "The beginning of the Julian date calendar. +This is measured in the integer number of days before December +31, 1 BC (Gregorian).") (defconst math-unix-epoch 719163 - "The beginning of Unix time: days from December 31, 1 BC (Gregorian) -to Jan 1, 1970 AD.") + "The beginning of Unix time. +This is measured in the integer number of days from December 31, +1 BC (Gregorian) to Jan 1, 1970 AD.") (defun math-format-date-part (x) (cond ((stringp x) diff --git a/lisp/calc/calc-poly.el b/lisp/calc/calc-poly.el index 77587cc4b86..5d74a8f106b 100644 --- a/lisp/calc/calc-poly.el +++ b/lisp/calc/calc-poly.el @@ -454,7 +454,7 @@ This returns only the remainder from the pseudo-division." (defun math-atomic-factorp (expr) - "Return true if is a factor containing no sums or quotients." + "Return non-nil if is a factor containing no sums or quotients." (cond ((eq (car-safe expr) '*) (and (math-atomic-factorp (nth 1 expr)) (math-atomic-factorp (nth 2 expr)))) diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el index afb43c0f338..45a4d56a371 100644 --- a/lisp/calc/calc.el +++ b/lisp/calc/calc.el @@ -400,8 +400,7 @@ This is not required to be present for user-written mode annotations." :type 'boolean) (defcustom calc-ensure-consistent-units nil - "If non-nil, make sure new units are consistent with current units -when converting units." + "If non-nil, ensure new units are consistent with current units when converting." :version "24.3" :type 'boolean) @@ -468,11 +467,11 @@ This is 1 unless `calc-truncate-stack' has been used.") (defvar calc-display-sci-high 0 "Floating-point numbers with this positive exponent or higher above the -current precision are displayed in scientific notation in calc-mode.") +current precision are displayed in scientific notation in `calc-mode'.") (defvar calc-display-sci-low -3 "Floating-point numbers with this negative exponent or lower are displayed -scientific notation in calc-mode.") +scientific notation in `calc-mode'.") (defvar calc-digit-after-point nil "If t, display at least one digit after the decimal point, as in `12.0'. @@ -493,8 +492,7 @@ This setting only applies to floats in normal display mode.") "List of variables used in customizing GNU Calc.") (defmacro defcalcmodevar (var defval &optional doc) - "Declare VAR as a Calc variable, with default value DEFVAL -and doc-string DOC. + "Declare VAR as a Calc variable, with default value DEFVAL and doc-string DOC. The variable VAR will be added to `calc-mode-var-list'." `(progn (defvar ,var ,defval ,doc) @@ -912,7 +910,7 @@ Used by `calc-user-invocation'.") (defvar calc-trail-pointer nil "The \"current\" entry in trail buffer.") (defvar calc-trail-overlay nil - "The value of overlay-arrow-string.") + "The value of `overlay-arrow-string'.") (defvar calc-undo-list nil "The list of previous operations for undo.") (defvar calc-redo-list nil diff --git a/lisp/calculator.el b/lisp/calculator.el index 415e0b4c77c..6bcea2d885e 100644 --- a/lisp/calculator.el +++ b/lisp/calculator.el @@ -833,8 +833,7 @@ The result should not exceed the screen width." (concat prompt (if (<= trim 0) expr (substring expr trim))))) (defun calculator-string-to-number (str) - "Convert the given STR to a number, according to the value of -`calculator-input-radix'." + "Convert STR to number according to `calculator-input-radix'." (if calculator-input-radix (string-to-number str (cadr (assq calculator-input-radix '((bin 2) (oct 8) (hex 16))))) @@ -1171,9 +1170,9 @@ arguments." ;;; Input interaction (defun calculator-last-input (&optional keys) - "Return the last key sequence that was used to invoke this command, or -the input KEYS. Uses the `function-key-map' translate keypad numbers to -plain ones." + "Return the last key sequence used to invoke this command, or the input KEYS. +Uses the `function-key-map' translate keypad numbers to plain +ones." (let* ((inp (or keys (this-command-keys))) (inp (or (and (arrayp inp) (not (stringp inp)) (lookup-key function-key-map inp)) diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index 9ca7ce3f003..2eb7977a164 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el @@ -1223,8 +1223,7 @@ ensure that all relevant variables are set. \(diary-mail-entries) -# diary-rem.el ends here -" +# diary-rem.el ends here" (interactive "P") (if (string-equal diary-mail-addr "") (user-error "You must set `diary-mail-addr' to use this command") @@ -1254,10 +1253,10 @@ the regexp with parentheses." paren)) (defvar diary-marking-entries-flag nil - "True during the marking of diary entries, nil otherwise.") + "Non-nil during the marking of diary entries, nil otherwise.") (defvar diary-marking-entry-flag nil - "True during the marking of diary entries, if current entry is marking.") + "Non-nil during the marking of diary entries, if current entry is marking.") ;; file-glob-attrs bound in diary-mark-entries. (defun diary-mark-entries-1 (markfunc &optional months symbol absfunc) diff --git a/lisp/char-fold.el b/lisp/char-fold.el index 46a3f93d0af..e3ab7d5b64c 100644 --- a/lisp/char-fold.el +++ b/lisp/char-fold.el @@ -20,6 +20,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . +;;; Commentary: + ;;; Code: (eval-and-compile diff --git a/lisp/cmuscheme.el b/lisp/cmuscheme.el index 0910ea6187e..e197069d6b8 100644 --- a/lisp/cmuscheme.el +++ b/lisp/cmuscheme.el @@ -186,7 +186,7 @@ Return before the end of the process' output copies the sexp ending at point Delete converts tabs to spaces as it moves back. Tab indents for Scheme; with argument, shifts rest of expression rigidly with the current line. -C-M-q does Tab on each line starting within following expression. +\\[indent-pp-sexp] does Tab on each line starting within following expression. Paragraphs are separated only by blank lines. Semicolons start comments. If you accidentally suspend your process, use \\[comint-continue-subjob] to continue it." diff --git a/lisp/comint.el b/lisp/comint.el index 56d4420e609..8bf23897f9e 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -2830,7 +2830,7 @@ if necessary." (when (>= count 0) (comint-update-fence)))) (defun comint-kill-region (beg end) - "Like `kill-region', but ignores read-only properties, if safe. + "Like `kill-region', but ignore read-only properties, if safe. This command assumes that the buffer contains read-only \"prompts\" which are regions with front-sticky read-only properties at the beginning of a line, with the preceding newline diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 7eae2e416bb..69baf17f5ee 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -5123,8 +5123,8 @@ If several parents are listed, go to the first of them." The following commands are available: \\\ -Move to next button, link or editable field. \\[widget-forward] -Move to previous button, link or editable field. \\[widget-backward] +Move to next button, link or editable field. \\[widget-forward] +Move to previous button, link or editable field. \\[widget-backward] \\\ Complete content of editable text field. \\[widget-complete] \\\ diff --git a/lisp/cus-theme.el b/lisp/cus-theme.el index 7457d9e3236..07881e9b74e 100644 --- a/lisp/cus-theme.el +++ b/lisp/cus-theme.el @@ -22,6 +22,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . +;;; Commentary: + ;;; Code: (require 'widget) diff --git a/lisp/dabbrev.el b/lisp/dabbrev.el index e113cc94c33..037787797bb 100644 --- a/lisp/dabbrev.el +++ b/lisp/dabbrev.el @@ -568,8 +568,7 @@ See also `dabbrev-abbrev-char-regexp' and \\[dabbrev-completion]." major-mode))) (defun dabbrev--goto-start-of-abbrev () - "Back over all abbrev type characters and then moves forward over -all skip characters." + "Back over all abbrev type characters then move forward over all skip characters." ;; Move backwards over abbrev chars (save-match-data (when (> (point) (minibuffer-prompt-end)) diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 4549f45ef67..1bb5b929353 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -1326,7 +1326,7 @@ Return nil if no change in files." (user-error "No compression rule found for \ `dired-compress-directory-default-suffix' %s, see `dired-compress-files-alist' for\ - the supported suffixes list." + the supported suffixes list" dired-compress-directory-default-suffix))) (let* ((suffix (or dired-compress-file-default-suffix ".gz")) (out-name (concat file suffix)) @@ -1335,7 +1335,7 @@ Return nil if no change in files." dired-compress-file-alist))) (if (not rule) (user-error "No compression rule found for suffix %s, \ -see `dired-compress-file-alist' for the supported suffixes list." +see `dired-compress-file-alist' for the supported suffixes list" dired-compress-file-default-suffix) (and (file-exists-p file) (or (not (file-exists-p out-name)) diff --git a/lisp/dired-x.el b/lisp/dired-x.el index 9f9f1701730..cf257c8169d 100644 --- a/lisp/dired-x.el +++ b/lisp/dired-x.el @@ -589,7 +589,7 @@ This is useful if you want to peruse and move around in an ls -lR output file, for example one you got from an ftp server. With ange-ftp, you can even Dired a directory containing an ls-lR file, visit that file and turn on Virtual Dired mode. But don't try to save -this file, as dired-virtual indents the listing and thus changes the +this file, as `dired-virtual' indents the listing and thus changes the buffer. If you have saved a Dired buffer in a file you can use \\[dired-virtual] to @@ -956,7 +956,7 @@ as the variable `file'. If several COMMANDs are given, the first one will be the default and the rest will be added temporarily to the history and can be retrieved -with \\[previous-history-element] (M-p) . +with `previous-history-element' (\\\\[previous-history-element]). The variable `dired-guess-shell-case-fold-search' controls whether REGEXP is matched case-sensitively." diff --git a/lisp/dired.el b/lisp/dired.el index 266a03e6cc3..07c13e18b95 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -2219,8 +2219,7 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST." ;; Autoload cookie needed by desktop.el ;;;###autoload (defun dired-mode (&optional dirname switches) - "\ -Mode for \"editing\" directory listings. + "Mode for \"editing\" directory listings. In Dired, you are \"editing\" a list of the files in a directory and (optionally) its subdirectories, in the format of `ls -lR'. Each directory is a page: use \\[backward-page] and \\[forward-page] to move pagewise. @@ -3697,7 +3696,7 @@ no ARGth marked file is found before this line." (defun dired-mark-files-in-region (start end) (let ((inhibit-read-only t)) (if (> start end) - (error "start > end")) + (error "Start > End")) (goto-char start) ; assumed at beginning of line (while (< (point) end) ;; Skip subdir line and following garbage like the `total' line: diff --git a/lisp/display-fill-column-indicator.el b/lisp/display-fill-column-indicator.el index 50252af4533..7e9d62c5d1a 100644 --- a/lisp/display-fill-column-indicator.el +++ b/lisp/display-fill-column-indicator.el @@ -45,7 +45,7 @@ ;;;###autoload (define-minor-mode display-fill-column-indicator-mode - "Toggle display of fill-column indicator. + "Toggle display of `fill-column' indicator. This uses `display-fill-column-indicator' internally. To change the position of the column displayed by default diff --git a/lisp/dos-vars.el b/lisp/dos-vars.el index 2f7b3760e3f..7fcbb56d224 100644 --- a/lisp/dos-vars.el +++ b/lisp/dos-vars.el @@ -34,9 +34,9 @@ :type '(repeat string)) (defcustom dos-codepage-setup-hook nil - "List of functions to be called after the DOS terminal and coding -systems are set up. This is the place, e.g., to set specific entries -in `standard-display-table' as appropriate for your codepage, if + "List of functions to call after setting up DOS terminal and coding systems. +This is the place, e.g., to set specific entries in +`standard-display-table' as appropriate for your codepage, if `IT-display-table-setup' doesn't do a perfect job." :type '(hook) :version "20.3.3") diff --git a/lisp/edmacro.el b/lisp/edmacro.el index 8ee413acd06..e90b3a006ef 100644 --- a/lisp/edmacro.el +++ b/lisp/edmacro.el @@ -108,7 +108,7 @@ With a prefix argument, format the macro in a more concise way." (memq cmd-noremap '(call-last-kbd-macro kmacro-call-macro kmacro-end-or-call-macro kmacro-end-and-call-macro)) (member keys '("\r" [return]))) (or last-kbd-macro - (y-or-n-p "No keyboard macro defined. Create one? ") + (y-or-n-p "No keyboard macro defined. Create one?") (keyboard-quit)) (setq mac (or last-kbd-macro "")) (setq keys nil) @@ -244,8 +244,9 @@ or nil, use a compact 80-column format." (and (fboundp cmd) (not (arrayp (symbol-function cmd))) (not (get cmd 'kmacro)) (not (y-or-n-p - (format "Command %s is already defined; %s" - cmd "proceed? "))) + (format + "Command %s is already defined; proceed?" + cmd))) (keyboard-quit)))) t) ((looking-at "Key:\\(.*\\)$") @@ -264,9 +265,9 @@ or nil, use a compact 80-column format." (not (or (arrayp (symbol-function b)) (get b 'kmacro)))) (not (y-or-n-p - (format "Key %s is already defined; %s" - (edmacro-format-keys key 1) - "proceed? "))) + (format + "Key %s is already defined; proceed?" + (edmacro-format-keys key 1)))) (keyboard-quit)))))) t) ((looking-at "Counter:[ \t]*\\([^ \t\n]*\\)[ \t]*$") diff --git a/lisp/elec-pair.el b/lisp/elec-pair.el index 45bc270db6a..ba88c819133 100644 --- a/lisp/elec-pair.el +++ b/lisp/elec-pair.el @@ -63,7 +63,7 @@ When inserting a closing paren character right before the same character, just skip that character instead, so that hitting ( followed by ) results in \"()\" rather than \"())\". -This can be convenient for people who find it easier to hit ) than C-f. +This can be convenient for people who find it easier to hit ) than \\[forward-char]. Can also be a function of one argument (the closer char just inserted), in which case that function's return value is diff --git a/lisp/epa-dired.el b/lisp/epa-dired.el index 8a4f8933bf8..18f3f055745 100644 --- a/lisp/epa-dired.el +++ b/lisp/epa-dired.el @@ -21,6 +21,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . +;;; Commentary: + ;;; Code: (require 'epa) diff --git a/lisp/epa-file.el b/lisp/epa-file.el index 33bf5adabe6..fe187589aa7 100644 --- a/lisp/epa-file.el +++ b/lisp/epa-file.el @@ -21,8 +21,9 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . +;;; Commentary: + ;;; Code: -;;; Dependencies (require 'epa) (require 'epa-hook) diff --git a/lisp/epa-hook.el b/lisp/epa-hook.el index 99a432c236e..aa196851d4d 100644 --- a/lisp/epa-hook.el +++ b/lisp/epa-hook.el @@ -21,6 +21,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . +;;; Commentary: + ;;; Code: (defgroup epa-file nil diff --git a/lisp/epa-mail.el b/lisp/epa-mail.el index b9dd437ed12..9b3aa0c7fd3 100644 --- a/lisp/epa-mail.el +++ b/lisp/epa-mail.el @@ -21,8 +21,9 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . +;;; Commentary: + ;;; Code: -;;; Dependencies (require 'epa) (require 'mail-utils) diff --git a/lisp/epa.el b/lisp/epa.el index ed1dae3e8ae..57d355cb3e0 100644 --- a/lisp/epa.el +++ b/lisp/epa.el @@ -20,8 +20,9 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . +;;; Commentary: + ;;; Code: -;;; Dependencies (require 'epg) (eval-when-compile (require 'subr-x)) @@ -461,7 +462,7 @@ q trust status questionable. - trust status unspecified. ;;;###autoload (defun epa-select-keys (context prompt &optional names secret) "Display a user's keyring and ask him to select keys. -CONTEXT is an epg-context. +CONTEXT is an `epg-context'. PROMPT is a string to prompt with. NAMES is a list of strings to be matched with keys. If it is nil, all the keys are listed. @@ -968,8 +969,7 @@ For example: ;;;###autoload (defun epa-verify-cleartext-in-region (start end) - "Verify OpenPGP cleartext signed messages in the current region -between START and END. + "Verify OpenPGP cleartext signed messages in current region from START to END. Don't use this command in Lisp programs! See the reason described in the `epa-verify-region' documentation." @@ -1202,8 +1202,7 @@ If no one is selected, symmetric encryption will be performed. ") ;;;###autoload (defun epa-import-armor-in-region (start end) - "Import keys in the OpenPGP armor format in the current region -between START and END." + "Import keys in the OpenPGP armor format in the current region from START to END." (interactive "r") (save-excursion (save-restriction diff --git a/lisp/epg.el b/lisp/epg.el index 1d37cbcfb57..ea7aa869a0f 100644 --- a/lisp/epg.el +++ b/lisp/epg.el @@ -21,6 +21,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . +;;; Commentary: + ;;; Code: ;;; Prelude @@ -804,7 +806,7 @@ callback data (if any)." (when (and epg-key-id (string-match "\\`passphrase\\." string)) (unless (epg-context-passphrase-callback context) - (error "passphrase-callback not set")) + (error "Variable `passphrase-callback' not set")) (let (inhibit-quit passphrase passphrase-with-new-line diff --git a/lisp/face-remap.el b/lisp/face-remap.el index c84742be5a2..50302b9682c 100644 --- a/lisp/face-remap.el +++ b/lisp/face-remap.el @@ -397,7 +397,7 @@ a top-level keymap, `text-scale-increase' or (defcustom buffer-face-mode-face 'variable-pitch "The face specification used by `buffer-face-mode'. It may contain any value suitable for a `face' text property, -including a face name, a list of face names, a face-attribute +including a face name, a list of face names, a face attribute plist, etc." :type '(choice (face) (repeat :tag "List of faces" face) diff --git a/lisp/faces.el b/lisp/faces.el index a5aef757b1d..7b96d938c56 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -1796,8 +1796,8 @@ If FRAME is nil, that stands for the selected frame." (defalias 'x-defined-colors 'defined-colors) (defun defined-colors-with-face-attributes (&optional frame foreground) - "Return a list of colors supported for a particular frame. -See `defined-colors' for arguments and return value. In contrast + "Return a list of colors supported for a particular FRAME. +See `defined-colors' for arguments and return value. In contrast to `defined-colors' the elements of the returned list are color strings with text properties, that make the color names render with the color they represent as background color (if FOREGROUND diff --git a/lisp/ffap.el b/lisp/ffap.el index b6e419b2d67..db380164272 100644 --- a/lisp/ffap.el +++ b/lisp/ffap.el @@ -465,11 +465,11 @@ Returned values: mesg) nil) ((string-match "not responding$" mesg) mesg) ;; v19: - ;; (file-error "connection failed" "permission denied" + ;; (file-error "Connection failed" "permission denied" ;; "nonesuch" "ffap-machine-p") - ;; (file-error "connection failed" "host is unreachable" + ;; (file-error "Connection failed" "host is unreachable" ;; "gopher.house.gov" "ffap-machine-p") - ;; (file-error "connection failed" "address already in use" + ;; (file-error "Connection failed" "address already in use" ;; "ftp.uu.net" "ffap-machine-p") ((equal mesg "connection failed") (if (string= (downcase (nth 2 error)) "permission denied") @@ -1088,8 +1088,8 @@ If a given RFC isn't in these then `ffap-rfc-path' is offered." (latex-mode "--:\\\\$+<>@-Z_[:alpha:]~*?" "<@" "@>;.,!:") (tex-mode "--:\\\\$+<>@-Z_[:alpha:]~*?" "<@" "@>;.,!:") ) - "Alist of (MODE CHARS BEG END), where MODE is a symbol, -possibly a major-mode name, or one of the symbols + "Alist of (MODE CHARS BEG END), where MODE is a symbol. +This is possibly a major-mode name, or one of the symbols `file', `url', `machine', and `nocolon'. Function `ffap-string-at-point' uses the data fields as follows: 1. find a maximal string of CHARS around point, diff --git a/lisp/fileloop.el b/lisp/fileloop.el index 45b9cea9397..cd60600a250 100644 --- a/lisp/fileloop.el +++ b/lisp/fileloop.el @@ -44,6 +44,7 @@ (defcustom fileloop-revert-buffers 'silent "Whether to revert files during fileloop operation. +This can be one of: `silent' means to only do it if `revert-without-query' is applicable; t means to offer to do it for all applicable files; nil means never to do it" diff --git a/lisp/files.el b/lisp/files.el index b113ff32f2f..2f7e936ff61 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -1584,7 +1584,7 @@ Signals a `file-already-exists' error if a file of the new name already exists unless optional fourth argument OK-IF-ALREADY-EXISTS is non-nil. A number as fourth arg means request confirmation if the new name already exists. This is what happens in interactive -use with M-x." +use with \\[execute-extended-command]." (interactive (let ((default-coding (or file-name-coding-system default-file-name-coding-system)) @@ -2520,7 +2520,7 @@ Do you want to revisit the file normally now? "))) (current-buffer)))) (defun insert-file-contents-literally (filename &optional visit beg end replace) - "Like `insert-file-contents', but only reads in the file literally. + "Like `insert-file-contents', but only read in the file literally. See `insert-file-contents' for an explanation of the parameters. A buffer may be modified in several ways after reading into the buffer, due to Emacs features such as format decoding, character code diff --git a/lisp/filesets.el b/lisp/filesets.el index 63f0e8ba3ff..9182c539452 100644 --- a/lisp/filesets.el +++ b/lisp/filesets.el @@ -112,7 +112,8 @@ (defvar filesets-updated-buffers nil "A list of buffers with updated menu bars.") (defvar filesets-menu-use-cached-flag nil - "Use cached data. See `filesets-menu-ensure-use-cached' for details.") + "Non-nil means use cached data. +See `filesets-menu-ensure-use-cached' for details.") (defvar filesets-update-cache-file-flag nil "Non-nil means the cache needs updating.") (defvar filesets-ignore-next-set-default nil @@ -607,8 +608,8 @@ the filename." (:ignore-on-read-text t) ;; (:constraintp ,pic-cmd) )))) - "Alist of file patterns and external viewers for use with -`filesets-find-or-display-file'. + "Alist of file patterns and external viewers. +This is intended for use with `filesets-find-or-display-file'. Has the form ((FILE-PATTERN VIEWER PROPERTIES) ...), VIEWER being either a function or a command name as string. @@ -1770,7 +1771,7 @@ User will be queried, if no fileset name is provided." filesets-data nil))) (entry (or (assoc name filesets-data) (when (y-or-n-p - (format "Fileset %s does not exist. Create it? " + (format "Fileset %s does not exist. Create it?" name)) (progn (add-to-list 'filesets-data (list name '(:files))) @@ -2198,8 +2199,9 @@ FS is a fileset's name. FLIST is a list returned by nil)) (defun filesets-build-dir-submenu (entry lookup-name dir patt) - "Build a :tree submenu named LOOKUP-NAME with base directory DIR including -all files matching PATT for filesets ENTRY." + "Build a `:tree' submenu named LOOKUP-NAME. +It has base directory DIR including all files matching PATT for +filesets ENTRY." (let ((fd (filesets-entry-get-filter-dirs-flag entry)) (depth (or (filesets-entry-get-tree-max-level entry) filesets-tree-max-level))) diff --git a/lisp/find-dired.el b/lisp/find-dired.el index 87a7407a866..ebdb10ae9fc 100644 --- a/lisp/find-dired.el +++ b/lisp/find-dired.el @@ -266,7 +266,7 @@ it finishes, type \\[kill-find]." ;;;###autoload (defun find-name-dired (dir pattern) - "Search DIR recursively for files matching the globbing pattern PATTERN, + "Search DIR recursively for files matching the globbing PATTERN, and run Dired on those files. PATTERN is a shell wildcard (not an Emacs regexp) and need not be quoted. The default command run (after changing into DIR) is diff --git a/lisp/foldout.el b/lisp/foldout.el index cadf2746ba1..8925241df32 100644 --- a/lisp/foldout.el +++ b/lisp/foldout.el @@ -239,7 +239,7 @@ An end marker of nil means the fold ends after (point-max).") Normally the body and the immediate subheadings are exposed, but optional arg EXPOSURE \(interactively with prefix arg) changes this:- - EXPOSURE > 0 exposes n levels of subheadings (c.f. show-children) + EXPOSURE > 0 exposes n levels of subheadings (c.f. `show-children') EXPOSURE < 0 exposes only the body EXPOSURE = 0 exposes the entire subtree" (interactive "P") diff --git a/lisp/font-core.el b/lisp/font-core.el index db06a607660..95bf46c9b8b 100644 --- a/lisp/font-core.el +++ b/lisp/font-core.el @@ -21,6 +21,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . +;;; Commentary: + ;;; Code: ;; This variable is used by mode packages that support Font Lock mode by diff --git a/lisp/forms.el b/lisp/forms.el index e1de0111336..551a1ba3c97 100644 --- a/lisp/forms.el +++ b/lisp/forms.el @@ -1705,7 +1705,7 @@ As a side effect: re-calculates the number of records in the data file." ;;; Other commands (defun forms-toggle-read-only (arg) - "Toggles read-only mode of a forms mode buffer. + "Toggle read-only mode of a forms mode buffer. With an argument, enables read-only mode if the argument is positive. Otherwise enables edit mode if the visited file is writable." @@ -1878,7 +1878,7 @@ after the current record." (setq forms--search-regexp regexp)) (defun forms-save-buffer (&optional args) - "Forms mode replacement for save-buffer. + "Forms mode replacement for `save-buffer'. It saves the data buffer instead of the forms buffer. Calls `forms-write-file-filter' before, and `forms-read-file-filter' after writing out the data." diff --git a/lisp/hexl.el b/lisp/hexl.el index 4a7bf9479aa..79dd5c40c69 100644 --- a/lisp/hexl.el +++ b/lisp/hexl.el @@ -1165,7 +1165,7 @@ This function is assumed to be used as callback function for `hl-line-mode'." ;; startup stuff. -(easy-menu-define hexl-menu hexl-mode-map "Hexl Mode menu" +(easy-menu-define hexl-menu hexl-mode-map "Hexl Mode menu." '("Hexl" :help "Hexl-specific Features" diff --git a/lisp/hi-lock.el b/lisp/hi-lock.el index 4c924e9d52a..7d126cb558e 100644 --- a/lisp/hi-lock.el +++ b/lisp/hi-lock.el @@ -244,7 +244,7 @@ by cycling through the faces in `hi-lock-face-defaults'." "String used to identify hi-lock patterns at the start of files.") (defvar hi-lock-archaic-interface-message-used nil - "True if user alerted that `global-hi-lock-mode' is now the global switch. + "Non-nil if user alerted that `global-hi-lock-mode' is now the global switch. Earlier versions of hi-lock used `hi-lock-mode' as the global switch; the message is issued if it appears that `hi-lock-mode' is used assuming that older functionality. This variable avoids multiple reminders.") diff --git a/lisp/image-dired.el b/lisp/image-dired.el index b92a9371ec2..3ca47300a99 100644 --- a/lisp/image-dired.el +++ b/lisp/image-dired.el @@ -519,7 +519,7 @@ Used by `image-dired-copy-with-exif-file-name'." (defcustom image-dired-show-all-from-dir-max-files 50 "Maximum number of files to show using `image-dired-show-all-from-dir' -before warning the user." +before warning." :type 'integer) (defmacro image-dired--with-db-file (&rest body) @@ -1958,7 +1958,7 @@ With prefix argument ARG, display image in its original size." (image-dired-display-image (dired-get-filename) arg)) (defun image-dired-image-at-point-p () - "Return true if there is an image-dired thumbnail at point." + "Return non-nil if there is an `image-dired' thumbnail at point." (get-text-property (point) 'image-dired-thumbnail)) (defun image-dired-rotate-thumbnail (degrees) diff --git a/lisp/imenu.el b/lisp/imenu.el index 788755a2d7e..22412d5f88b 100644 --- a/lisp/imenu.el +++ b/lisp/imenu.el @@ -829,8 +829,7 @@ A trivial interface to `imenu-add-to-menubar' suitable for use in a hook." (defvar imenu-buffer-menubar nil) (defvar-local imenu-menubar-modified-tick 0 - "The value of (buffer-chars-modified-tick) as of the last call -to `imenu-update-menubar'.") + "Value of (buffer-chars-modified-tick) when `imenu-update-menubar' was called.") (defun imenu-update-menubar () (when (and (current-local-map) diff --git a/lisp/indent.el b/lisp/indent.el index aa2bfbceebf..aa6b8d17c4a 100644 --- a/lisp/indent.el +++ b/lisp/indent.el @@ -463,7 +463,7 @@ Optional fifth argument OBJECT specifies the string or buffer to operate on." (put-text-property begin to prop (funcall func val) object)))) (defun increase-left-margin (from to inc) - "Increase or decrease the left-margin of the region. + "Increase or decrease the `left-margin' of the region. With no prefix argument, this adds `standard-indent' of indentation. A prefix arg (optional third arg INC noninteractively) specifies the amount to change the margin by, in characters. @@ -520,11 +520,14 @@ If `auto-fill-mode' is active, re-fills region to fit in new margin." (defun beginning-of-line-text (&optional n) "Move to the beginning of the text on this line. -With optional argument, move forward N-1 lines first. -From the beginning of the line, moves past the left-margin indentation, the -fill-prefix, and any indentation used for centering or right-justifying the -line, but does not move past any whitespace that was explicitly inserted -\(such as a tab used to indent the first line of a paragraph)." + +With optional argument N, move forward N-1 lines first. + +From the beginning of the line, moves past the `left-margin' +indentation, the `fill-prefix', and any indentation used for +centering or right-justifying the line, but does not move past +any whitespace that was explicitly inserted (such as a tab used +to indent the first line of a paragraph)." (interactive "^p") (beginning-of-line n) (skip-chars-forward " \t") diff --git a/lisp/info-look.el b/lisp/info-look.el index 33f15a34e99..7cc5462dd4a 100644 --- a/lisp/info-look.el +++ b/lisp/info-look.el @@ -262,7 +262,8 @@ system." (defun info-lookup-symbol (symbol &optional mode) "Display the definition of SYMBOL, as found in the relevant manual. When this command is called interactively, it reads SYMBOL from the -minibuffer. In the minibuffer, use M-n to yank the default argument +minibuffer. In the minibuffer, use \\\ +\\[next-history-element] to yank the default argument value into the minibuffer so you can edit it. The default symbol is the one found at point. @@ -276,7 +277,8 @@ With prefix arg MODE a query for the symbol help mode is offered." (defun info-lookup-file (file &optional mode) "Display the documentation of a file. When this command is called interactively, it reads FILE from the minibuffer. -In the minibuffer, use M-n to yank the default file name +In the minibuffer, use \\\ +\\[next-history-element] to yank the default file name into the minibuffer so you can edit it. The default file name is the one found at point. diff --git a/lisp/international/ccl.el b/lisp/international/ccl.el index 0eb009fa526..9be4d1ee955 100644 --- a/lisp/international/ccl.el +++ b/lisp/international/ccl.el @@ -213,8 +213,7 @@ proper index number for SYMBOL. PROP should be (ccl-embed-data (cons symbol prop))) (defun ccl-embed-string (len str) - "Embed string STR of length LEN in `ccl-program-vector' at -`ccl-current-ic'." + "Embed string STR of length LEN in `ccl-program-vector' at `ccl-current-ic'." (if (> len #xFFFFF) (error "CCL: String too long: %d" len)) (if (> (string-bytes str) len) @@ -282,8 +281,7 @@ changed to a relative jump address." (defvar ccl-loop-head nil "If non-nil, index of the start of the current loop.") (defvar ccl-breaks nil - "If non-nil, list of absolute addresses of the breaking points of -the current loop.") + "If non-nil, list of absolute addresses of breaking points of the current loop.") ;;;###autoload (defun ccl-compile (ccl-program) @@ -568,8 +566,8 @@ If READ-FLAG is non-nil, this statement has the form (cdr (cdr cmd)))) (defun ccl-compile-branch-expression (expr cmd) - "Compile EXPRESSION part of BRANCH statement and return register -which holds a value of the expression." + "Compile EXPRESSION part of BRANCH statement. +Return register which holds a value of the expression." (if (listp expr) ;; EXPR has the form `(EXPR2 OP ARG)'. Compile it as SET ;; statement of the form `(r7 = (EXPR2 OP ARG))'. @@ -1554,8 +1552,7 @@ MAP := MAP-IDs := MAP-ID ... MAP-SET := MAP-IDs | (MAP-IDs) MAP-SET -MAP-ID := integer -" +MAP-ID := integer" (declare (doc-string 3)) `(let ((prog ,(unwind-protect (progn diff --git a/lisp/international/quail.el b/lisp/international/quail.el index c0e53d26fba..50ff307b73a 100644 --- a/lisp/international/quail.el +++ b/lisp/international/quail.el @@ -471,7 +471,8 @@ conversion region is active. It is an alist of single key character vs. corresponding command to be called. If SIMPLE is non-nil, then we do not alter the meanings of -commands such as C-f, C-b, C-n, C-p and TAB; they are treated as +commands such as \\[forward-char], \\[backward-char], \\[next-line], \ +\\[previous-line] and \\[indent-for-tab-command]; they are treated as non-Quail commands." (let (translation-keymap conversion-keymap) (if deterministic (setq forget-last-selection t)) diff --git a/lisp/international/robin.el b/lisp/international/robin.el index e4a11801c38..c38cd822693 100644 --- a/lisp/international/robin.el +++ b/lisp/international/robin.el @@ -276,8 +276,7 @@ this robin package will be the following. (?c \"AC\" (?d \"ACD\") (?e \"ACE\"))) - (?b \"B\")) -") + (?b \"B\"))") ;;;###autoload (defmacro robin-define-package (name docstring &rest rules) diff --git a/lisp/isearch.el b/lisp/isearch.el index 952caa7ac22..242f2b0dd09 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -1221,7 +1221,7 @@ is processed. (It is not called after characters that exit the search.) When the arg RECURSIVE-EDIT is non-nil, this function behaves modally and does not return to the calling function until the search is completed. -To behave this way it enters a recursive-edit and exits it when done +To behave this way it enters a recursive edit and exits it when done isearching. The arg REGEXP-FUNCTION, if non-nil, should be a function. It is diff --git a/lisp/jit-lock.el b/lisp/jit-lock.el index c1a5bbe9478..bb2df2b1ffa 100644 --- a/lisp/jit-lock.el +++ b/lisp/jit-lock.el @@ -47,7 +47,7 @@ Preserves the `buffer-modified-p' state of the current buffer." (defcustom jit-lock-chunk-size 1500 "Jit-lock fontifies chunks of at most this many characters at a time. -This variable controls both display-time and stealth fontification. +This variable controls both `display-time' and stealth fontification. The optimum value is a little over the typical number of buffer characters which fit in a typical window." diff --git a/lisp/kmacro.el b/lisp/kmacro.el index a39f433cdc3..53e6e5e288a 100644 --- a/lisp/kmacro.el +++ b/lisp/kmacro.el @@ -820,8 +820,8 @@ If kbd macro currently being defined end it before activating it." (defun kmacro-bind-to-key (_arg) "When not defining or executing a macro, offer to bind last macro to a key. -The key sequences [C-x C-k 0] through [C-x C-k 9] and [C-x C-k A] -through [C-x C-k Z] are reserved for user bindings, and to bind to +The key sequences `C-x C-k 0' through `C-x C-k 9' and `C-x C-k A' +through `C-x C-k Z' are reserved for user bindings, and to bind to one of these sequences, just enter the digit or letter, rather than the whole sequence. diff --git a/lisp/loadhist.el b/lisp/loadhist.el index 0b12bdad058..4a7946a212b 100644 --- a/lisp/loadhist.el +++ b/lisp/loadhist.el @@ -168,8 +168,7 @@ documentation of `unload-feature' for details.") ;; So we use this auxiliary variable to keep track of the last (t . SYMBOL) ;; that occurred. (defvar loadhist--restore-autoload nil - "If non-nil, this is a symbol for which we should -restore a previous autoload if possible.") + "If non-nil, is a symbol for which to try to restore a previous autoload.") (cl-defmethod loadhist-unload-element ((x (head t))) (setq loadhist--restore-autoload (cdr x))) diff --git a/lisp/locate.el b/lisp/locate.el index 008d65e055f..6190fc6302a 100644 --- a/lisp/locate.el +++ b/lisp/locate.el @@ -50,7 +50,7 @@ ;; from a shell prompt. GNU locate and BSD find expect the file databases ;; to either be in standard places or located via environment variables. ;; If the latter, make sure these environment variables are set in -;; your emacs process. +;; your Emacs process. ;; ;; Locate-mode assumes that each line output from the locate-command ;; consists exactly of a file name, possibly preceded or trailed by diff --git a/lisp/macros.el b/lisp/macros.el index 689c4210cd7..89e38abab2d 100644 --- a/lisp/macros.el +++ b/lisp/macros.el @@ -148,11 +148,16 @@ use this command, and then save the file." ;;;###autoload (defun kbd-macro-query (flag) "Query user during kbd macro execution. - With prefix argument, enters recursive edit, reading keyboard -commands even within a kbd macro. You can give different commands -each time the macro executes. - Without prefix argument, asks whether to continue running the macro. + +With prefix argument FLAG, enter recursive edit, reading +keyboard commands even within a kbd macro. You can give +different commands each time the macro executes. + +Without prefix argument, ask whether to continue running the +macro. + Your options are: \\ + \\[act] Finish this iteration normally and continue with the next. \\[skip] Skip the rest of this iteration, and start the next. \\[exit] Stop the macro entirely right now. diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 07f7beb92c8..e84eec5002c 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@ -2156,7 +2156,7 @@ otherwise it could decide to silently do nothing." (> count 1))) (defcustom yank-menu-length 20 - "Maximum length to display in the yank-menu." + "Maximum length to display in the `yank-menu'." :type 'integer :group 'menu) @@ -2289,7 +2289,7 @@ Buffers menu is regenerated." It must accept a buffer as its only required argument.") (defun menu-bar-buffer-vector (alist) - ;; turn ((name . buffer) ...) into a menu + "Turn ((name . buffer) ...) into a menu." (let ((buffers-vec (make-vector (length alist) nil)) (i (length alist))) (dolist (pair alist) @@ -2303,7 +2303,7 @@ It must accept a buffer as its only required argument.") buffers-vec)) (defun menu-bar-update-buffers (&optional force) - ;; If user discards the Buffers item, play along. + "If user discards the Buffers item, play along." (and (lookup-key (current-global-map) [menu-bar buffer]) (or force (frame-or-buffer-changed-p)) (let ((buffers (buffer-list)) diff --git a/lisp/mouse-drag.el b/lisp/mouse-drag.el index b424b6edfe8..ecfb359b36f 100644 --- a/lisp/mouse-drag.el +++ b/lisp/mouse-drag.el @@ -147,7 +147,7 @@ Keep the cursor on the screen as needed." (= (cdr start-col-row) (cdr end-col-row))))) (defvar mouse-drag-electric-col-scrolling t - "If non-nil, mouse-drag on a long line enables truncate-lines.") + "If non-nil, mouse-drag on a long line enables `truncate-lines'.") (defun mouse-drag-should-do-col-scrolling () "Determine if it's wise to enable col-scrolling for the current window. diff --git a/lisp/mouse.el b/lisp/mouse.el index edac5085ff8..41333eb7f71 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -46,7 +46,7 @@ :type 'boolean) (defcustom mouse-drag-copy-region nil - "If non-nil, copy to kill-ring upon mouse adjustments of the region. + "If non-nil, copy to kill ring upon mouse adjustments of the region. This affects `mouse-save-then-kill' (\\[mouse-save-then-kill]) in addition to mouse drags. diff --git a/lisp/nxml/nxml-mode.el b/lisp/nxml/nxml-mode.el index c5c9dfb2afc..98ce1d6993e 100644 --- a/lisp/nxml/nxml-mode.el +++ b/lisp/nxml/nxml-mode.el @@ -455,8 +455,9 @@ reference.") ;; because Emacs turns C-c C-i into C-c TAB which is hard to type and ;; not mnemonic. "Major mode for editing XML. - +\\ \\[nxml-finish-element] finishes the current element by inserting an end-tag. + C-c C-i closes a start-tag with `>' and then inserts a balancing end-tag leaving point between the start-tag and end-tag. \\[nxml-balanced-close-start-tag-block] is similar but for block rather than inline elements: diff --git a/lisp/nxml/rng-loc.el b/lisp/nxml/rng-loc.el index a38da794226..c8b19e8c229 100644 --- a/lisp/nxml/rng-loc.el +++ b/lisp/nxml/rng-loc.el @@ -501,7 +501,7 @@ saved to the first writable file in `rng-schema-locating-files'." nil (error "Buffer does not have a filename"))) ((and prompt - (not (y-or-n-p (format "Save %s to %s " + (not (y-or-n-p (format "Save %s to %s?" (if type-id "type identifier" "schema location") @@ -539,7 +539,7 @@ saved to the first writable file in `rng-schema-locating-files'." locating-file-uri)))))) (indent-according-to-mode) (when (or (not modified) - (y-or-n-p (format "Save file %s " + (y-or-n-p (format "Save file %s?" (buffer-file-name)))) (save-buffer)))))))) diff --git a/lisp/nxml/rng-valid.el b/lisp/nxml/rng-valid.el index fca666115a2..9df20a16b1d 100644 --- a/lisp/nxml/rng-valid.el +++ b/lisp/nxml/rng-valid.el @@ -962,9 +962,8 @@ Return nil at end of buffer, t otherwise." (and type t))) (defun rng-process-start-tag (tag-type) - "TAG-TYPE is `start-tag' for a start-tag, `empty-element' for -an empty element. `partial-empty-element' should be passed -as empty-element." + "TAG-TYPE is `start-tag' for a start-tag, `empty-element' for an empty element. +`partial-empty-element' should be passed as empty-element." (and rng-collecting-text (rng-flush-text)) (setq rng-collecting-text nil) (setq rng-pending-contents nil) diff --git a/lisp/pcmpl-x.el b/lisp/pcmpl-x.el index fd147101b69..d9479edf6a6 100644 --- a/lisp/pcmpl-x.el +++ b/lisp/pcmpl-x.el @@ -21,6 +21,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . +;;; Commentary: + ;;; Code: (eval-when-compile (require 'cl-lib)) diff --git a/lisp/play/5x5.el b/lisp/play/5x5.el index 1d193306296..085c97f5d8e 100644 --- a/lisp/play/5x5.el +++ b/lisp/play/5x5.el @@ -387,7 +387,7 @@ Mutate the result." (defun 5x5-crack (breeder) "Attempt to find a solution for 5x5. -5x5-crack takes the argument BREEDER which should be a function that takes +`5x5-crack' takes the argument BREEDER which should be a function that takes two parameters, the first will be a grid vector array that is the current solution and the second will be the best solution so far. The function should return a grid vector array that is the new solution." @@ -474,8 +474,8 @@ position." grid))) (defun 5x5-vec-to-grid (grid-matrix) - "Convert a grid matrix GRID-MATRIX in Calc format to a grid in -5x5 format. See function `5x5-grid-to-vec'." + "Convert a grid matrix GRID-MATRIX in Calc format to a grid in 5x5 format. +See function `5x5-grid-to-vec'." (apply #'vector (mapcar diff --git a/lisp/play/doctor.el b/lisp/play/doctor.el index 9777fc3ea24..b855f7e35a1 100644 --- a/lisp/play/doctor.el +++ b/lisp/play/doctor.el @@ -115,7 +115,7 @@ (defun doc// (x) x) (defmacro doc$ (what) - "Quoted arg form of doctor-$." + "Quoted arg form of `doctor-$'." `(doctor-$ ',what)) (defun doctor-$ (what) @@ -1011,7 +1011,7 @@ Put dialogue in buffer." (defun doctor-subjsearch (sent key type) "Search for the subject of a sentence SENT, looking for the noun closest -to and preceding KEY by at least TYPE words. Set global variable doctor-subj to +to and preceding KEY by at least TYPE words. Set global variable `doctor-subj' to the subject noun, and return the portion of the sentence following it." (let ((i (- (length sent) (length (memq key sent)) type))) (while (and (> i -1) (not (doctor-nounp (nth i sent)))) diff --git a/lisp/play/dunnet.el b/lisp/play/dunnet.el index d9acad8e43e..706c1be81e0 100644 --- a/lisp/play/dunnet.el +++ b/lisp/play/dunnet.el @@ -944,8 +944,8 @@ handled specially by 'dun-describe-room.") (list obj-pc) ;; pc-area nil nil nil nil nil nil ) - "These are objects in a room that are only described in the -room description. They are permanent.") + "These are objects in a room that are only described in the room description. +They are permanent.") (defvar dun-inventory '(1)) (defconst dun-objects @@ -1010,8 +1010,7 @@ the inventory.") nil nil ("There is a bus here.") nil nil nil) - "These are the descriptions for the negative numbered objects from -`dun-room-objects'.") + "Descriptions for the negative numbered objects from `dun-room-objects'.") (defconst dun-physobj-desc '( @@ -1216,8 +1215,9 @@ Otherwise short. Also give long if we were called with negative room number." (dun-mprincl "You are on the bus.")))) (defun dun-special-object () - "There is a special object in the room. This object's description, -or lack thereof, depends on certain conditions." + "There is a special object in the room. +This object's description, or lack thereof, depends on certain +conditions." (cond ((= dun-current-room computer-room) (if dun-computer diff --git a/lisp/play/hanoi.el b/lisp/play/hanoi.el index d3d0ad1309c..227dd790af5 100644 --- a/lisp/play/hanoi.el +++ b/lisp/play/hanoi.el @@ -133,7 +133,7 @@ Repent before ring 31 moves." (defun hanoi-unix-64 () "Like `hanoi-unix', but pretend to have a 64-bit clock. This is, necessarily (as of Emacs 20.3), a crock. When the -current-time interface is made s2G-compliant, hanoi.el will need +`current-time' interface is made s2G-compliant, hanoi.el will need to be updated." (interactive) (let* ((start (ftruncate (float-time))) diff --git a/lisp/play/mpuz.el b/lisp/play/mpuz.el index 5ac1d7c60c2..ff174fed6c2 100644 --- a/lisp/play/mpuz.el +++ b/lisp/play/mpuz.el @@ -119,7 +119,7 @@ You may abort a game by typing \\\\[mpuz-offer-abort]." ;; Some variables for game tracking ;;--------------------------------- (defvar mpuz-in-progress nil - "True if a game is currently in progress.") + "Non-nil if a game is currently in progress.") (defvar mpuz-found-digits (make-bool-vector 10 nil) "A vector recording which digits have been decrypted.") diff --git a/lisp/play/tetris.el b/lisp/play/tetris.el index f43aa47326f..3d6ddd5307f 100644 --- a/lisp/play/tetris.el +++ b/lisp/play/tetris.el @@ -620,7 +620,7 @@ Shapes drop from the top of the screen, and the user has to move and rotate the shape to fit in with those at the bottom of the screen so as to form complete rows. -tetris-mode keybindings: +`tetris-mode' keybindings: \\ \\[tetris-start-game] Start a new game of Tetris \\[tetris-end-game] Terminate the current game diff --git a/lisp/printing.el b/lisp/printing.el index 89e49ccb2a4..fb718f9aa62 100644 --- a/lisp/printing.el +++ b/lisp/printing.el @@ -1672,7 +1672,7 @@ DEFAULT It's a way to set default values when this entry is selected. (set VARIABLE (eval VALUE)) - Note that VALUE can be any valid lisp expression. So, don't + Note that VALUE can be any valid Lisp expression. So, don't forget to quote symbols and constant lists. If VARIABLE is the special keyword `inherits-from:', VALUE must be a symbol name setting defined in `pr-setting-database' from @@ -1772,8 +1772,7 @@ Useful links: `https://linux.die.net/man/1/lp' * GNU utilities for w32 (cp.exe) - `http://unxutils.sourceforge.net/' -" + `http://unxutils.sourceforge.net/'" :type '(repeat (list :tag "PostScript Printer" @@ -2181,7 +2180,7 @@ DEFAULT It's a way to set default values when this entry is selected. (set (make-local-variable VARIABLE-SYM) (eval VALUE)) - Note that VALUE can be any valid lisp expression. So, don't + Note that VALUE can be any valid Lisp expression. So, don't forget to quote symbols and constant lists. If VARIABLE is the special keyword `inherits-from:', VALUE must be a symbol name setting defined in `pr-setting-database' from @@ -2413,8 +2412,7 @@ Useful links: * GNU Enscript documentation (Windows, GNU or Unix) `https://people.ssh.com/mtr/genscript/enscript.man.html' - (on GNU or Unix, type `man enscript') -" + (on GNU or Unix, type `man enscript')" :type '(repeat (list :tag "PS File Utility" (symbol :tag "Utility Symbol") @@ -4276,7 +4274,7 @@ printed using `pr-ps-mode-ps-print'. Interactively, you have the following situations: - M-x pr-ps-fast-fire RET + \\[pr-ps-fast-fire] The command prompts the user for a N-UP value and printing will immediately be done using the current active printer. diff --git a/lisp/profiler.el b/lisp/profiler.el index 0b456bb3e31..fa74fe8de25 100644 --- a/lisp/profiler.el +++ b/lisp/profiler.el @@ -105,8 +105,8 @@ ;;; Entries (defun profiler-format-entry (entry) - "Format ENTRY in human readable string. ENTRY would be a -function name of a function itself." + "Format ENTRY in human readable string. +ENTRY would be a function name of a function itself." (cond ((memq (car-safe entry) '(closure lambda)) (format "#" (sxhash entry))) ((byte-code-function-p entry) @@ -463,7 +463,7 @@ Optional argument MODE means only check for the specified mode (cpu or mem)." "The current profile.") (defvar-local profiler-report-reversed nil - "True if calltree is rendered in bottom-up. + "Non-nil if calltree is rendered in bottom-up. Do not touch this variable directly.") (defvar-local profiler-report-order nil diff --git a/lisp/progmodes/cc-bytecomp.el b/lisp/progmodes/cc-bytecomp.el index f07f18678a2..b6805898b0e 100644 --- a/lisp/progmodes/cc-bytecomp.el +++ b/lisp/progmodes/cc-bytecomp.el @@ -339,8 +339,8 @@ should be a string. CONDITION should not be quoted." '(progn))) (defmacro cc-provide (feature) - "A replacement for the `provide' form that restores the environment -after the compilation. Don't use within `eval-when-compile'." + "A replacement for `provide' that restores the environment after the compilation. +Don't use within `eval-when-compile'." (declare (debug t)) `(progn (eval-when-compile (cc-bytecomp-restore-environment)) @@ -381,8 +381,9 @@ afterwards. Don't use within `eval-when-compile'." (eval-when-compile (cc-bytecomp-setup-environment)))) (defmacro cc-bytecomp-defvar (var) - "Bind the symbol as a variable during compilation of the file, -to silence the byte compiler. Don't use within `eval-when-compile'." + "Bind the symbol VAR as a variable during compilation of the file. +This can be used to silence the byte compiler. Don't use within +`eval-when-compile'." (declare (debug nil)) `(eval-when-compile (if (boundp ',var) @@ -403,8 +404,9 @@ to silence the byte compiler. Don't use within `eval-when-compile'." "cc-bytecomp-defvar: Covered variable %s" ',var)))))) (defmacro cc-bytecomp-defun (fun) - "Bind the symbol as a function during compilation of the file, -to silence the byte compiler. Don't use within `eval-when-compile'. + "Bind the symbol FUN as a function during compilation of the file. +This can be used to silence the byte compiler. Don't use within +`eval-when-compile'. If the symbol already is bound as a function, it will keep that definition. That means that this macro will not shut up warnings @@ -431,8 +433,8 @@ at compile time, e.g. for macros and inline functions." "cc-bytecomp-defun: Covered function %s" ',fun)))))) (defmacro cc-bytecomp-put (symbol propname value) - "Set a property on a symbol during compilation (and evaluation) of -the file. Don't use outside `eval-when-compile'." + "Set a property on SYMBOL during compilation (and evaluation) of the file. +Don't use outside `eval-when-compile'." (declare (debug t)) `(eval-when-compile (if (not (assoc (cons ,symbol ,propname) cc-bytecomp-original-properties)) @@ -450,9 +452,9 @@ the file. Don't use outside `eval-when-compile'." ,propname ,symbol ,value))) (defmacro cc-bytecomp-boundp (symbol) - "Return non-nil if the given symbol is bound as a variable outside -the compilation. This is the same as using `boundp' but additionally -exclude any variables that have been bound during compilation with + "Return non-nil if SYMBOL is bound as a variable outside the compilation. +This is the same as using `boundp' but additionally exclude any +variables that have been bound during compilation with `cc-bytecomp-defvar'." (declare (debug t)) (if (and (cc-bytecomp-is-compiling) @@ -461,9 +463,9 @@ exclude any variables that have been bound during compilation with `(boundp ,symbol))) (defmacro cc-bytecomp-fboundp (symbol) - "Return non-nil if the given symbol is bound as a function outside -the compilation. This is the same as using `fboundp' but additionally -exclude any functions that have been bound during compilation with + "Return non-nil if SYMBOL is bound as a function outside the compilation. +This is the same as using `fboundp' but additionally exclude any +functions that have been bound during compilation with `cc-bytecomp-defun'." (declare (debug t)) (let (fun-elem) diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el index 217281b8a24..6c3da667bfc 100644 --- a/lisp/progmodes/cc-cmds.el +++ b/lisp/progmodes/cc-cmds.el @@ -5113,8 +5113,9 @@ inside a preprocessor directive." (defun c-context-open-line () "Insert a line break suitable to the context and leave point before it. -This is the `c-context-line-break' equivalent to `open-line', which is -normally bound to C-o. See `c-context-line-break' for the details." +This is the `c-context-line-break' equivalent to `open-line' +\(bound to \\[open-line]). See `c-context-line-break' for the +details." (interactive "*") (let ((here (point))) (unwind-protect diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el index be0b40fd6c2..12e10c26eec 100644 --- a/lisp/progmodes/cc-defs.el +++ b/lisp/progmodes/cc-defs.el @@ -827,9 +827,9 @@ right side of it." ;; impossible to get a feel for how that function works. (defmacro c-go-list-forward (&optional pos limit) - "Move forward across one balanced group of parentheses starting at POS or -point. Return POINT when we succeed, NIL when we fail. In the latter case, -leave point unmoved. + "Move forward across one balanced group of parentheses starting at POS or point. +Return POINT when we succeed, NIL when we fail. In the latter +case, leave point unmoved. A LIMIT for the search may be given. The start position is assumed to be before it." @@ -838,9 +838,9 @@ before it." (when dest (goto-char dest) dest))) (defmacro c-go-list-backward (&optional pos limit) - "Move backward across one balanced group of parentheses starting at POS or -point. Return POINT when we succeed, NIL when we fail. In the latter case, -leave point unmoved. + "Move backward across one balanced group of parentheses starting at POS or point. +Return POINT when we succeed, NIL when we fail. In the latter +case, leave point unmoved. A LIMIT for the search may be given. The start position is assumed to be after it." @@ -2593,7 +2593,7 @@ quoted." (defvar c-lang-constants-under-evaluation nil "Alist of constants in the process of being evaluated. The `cdr' of each entry indicates how far we've looked in the list -of definitions, so that the def for var FOO in c-mode can be defined in +of definitions, so that the def for var FOO in `c-mode' can be defined in terms of the def for that same var FOO (which will then rely on the fallback definition for all modes, to break the cycle).") diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 53c382f018c..20cdb72ccf1 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -1545,7 +1545,7 @@ comment at the start of cc-engine.el for more info." nil)))))) (defun c-at-statement-start-p () - "Return non-nil if the point is at the first token in a statement + "Return non-nil if point is at the first token in a statement or somewhere in the syntactic whitespace before it. A \"statement\" here is not restricted to those inside code blocks. @@ -1574,7 +1574,7 @@ comment at the start of cc-engine.el for more info." (c-crosses-statement-barrier-p (point) end))))) (defun c-at-expression-start-p () - "Return non-nil if the point is at the first token in an expression or + "Return non-nil if point is at the first token in an expression or statement, or somewhere in the syntactic whitespace before it. An \"expression\" here is a bit different from the normal language @@ -4969,7 +4969,7 @@ out of an enclosing paren." nil)))) (defun c-forward-over-token-and-ws (&optional balanced) - "Move forward over a token and any following whitespace + "Move forward over a token and any following whitespace. Return t if we moved, nil otherwise (i.e. we were at EOB, or a non-token or BALANCED is non-nil and we can't move). If we are at syntactic whitespace, move over this in place of a token. @@ -5384,8 +5384,8 @@ comment at the start of cc-engine.el for more info." (defvar safe-pos-list) ; bound in c-syntactic-skip-backward (defun c-syntactic-skip-backward (skip-chars &optional limit paren-level) - "Like `skip-chars-backward' but only look at syntactically relevant chars, -i.e. don't stop at positions inside syntactic whitespace or string + "Like `skip-chars-backward' but only look at syntactically relevant chars. +This means don't stop at positions inside syntactic whitespace or string literals. Preprocessor directives are also ignored, with the exception of the one that the point starts within, if any. If LIMIT is given, it's assumed to be at a syntactically relevant position. diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el index 7e7053b98e1..bc0ae6cc95a 100644 --- a/lisp/progmodes/cc-fonts.el +++ b/lisp/progmodes/cc-fonts.el @@ -1765,7 +1765,7 @@ casts and declarations are fontified. Used on level 2 and higher." (> (match-beginning 0) (point-min)) (memq (c-get-char-property (1- (match-beginning 0)) 'face) '(font-lock-comment-face font-lock-string-face - font-lock-comment-delimiter-face)))) + font-lock-comment-delimiter-face)))) (when found (setq open-delim (cons (match-beginning 1) (cons (match-end 1) (match-beginning 2))) diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index b106454b11e..36f12369fca 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el @@ -4178,8 +4178,7 @@ aliases in Emacs are resolved." (cdr c-emacs-variable-inits)))) (defun c-make-init-lang-vars-fun (mode) - "Create a function that initializes all the language dependent variables -for the given mode. + "Create a function that initializes all language dependent variables for MODE. This function should be evaluated at compile time, so that the function it returns is byte compiled with all the evaluated results diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index c818c1a3582..8b302414496 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el @@ -1648,7 +1648,7 @@ Note that the style variables are always made local to the buffer." (and (memq (char-before) c-string-delims) (not (nth 4 s))))) ; Check we're actually out of the ; comment. not stuck at EOB - (unless + (unless (and c-ml-string-opener-re (c-maybe-re-mark-ml-string)) (if (c-unescaped-nls-in-string-p (1- (point))) diff --git a/lisp/progmodes/cc-vars.el b/lisp/progmodes/cc-vars.el index dcd9546d9aa..8869c565737 100644 --- a/lisp/progmodes/cc-vars.el +++ b/lisp/progmodes/cc-vars.el @@ -1227,7 +1227,7 @@ can always override the use of `c-default-style' by making calls to ;; Anchor pos: None. )) (defcustom c-offsets-alist nil - "Association list of syntactic element symbols and indentation offsets. + "Alist of syntactic element symbols and indentation offsets. As described below, each cons cell in this list has the form: (SYNTACTIC-SYMBOL . OFFSET) diff --git a/lisp/progmodes/cmacexp.el b/lisp/progmodes/cmacexp.el index 0f7c8c6f31a..07648ac623c 100644 --- a/lisp/progmodes/cmacexp.el +++ b/lisp/progmodes/cmacexp.el @@ -101,7 +101,7 @@ :type 'boolean) (defcustom c-macro-prompt-flag nil - "Non-nil makes `c-macro-expand' prompt for preprocessor arguments." + "Non-nil means `c-macro-expand' will prompt for preprocessor arguments." :type 'boolean) (defcustom c-macro-preprocessor diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 6b521e8d90b..73f98068110 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -687,11 +687,13 @@ matched file names, and weeding out false positives." ,(expand-file-name "compilation.txt" data-directory))) (defvar compilation-error-case-fold-search nil - "If non-nil, use case-insensitive matching of compilation errors -by the regexps of `compilation-error-regexp-alist' and -`compilation-error-regexp-alist-alist'. + "If non-nil, use case-insensitive matching of compilation errors. If nil, matching is case-sensitive. +Compilation errors are given by the regexps in +`compilation-error-regexp-alist' and +`compilation-error-regexp-alist-alist'. + This variable should only be set for backward compatibility as a temporary measure. The proper solution is to use a regexp that matches the messages without case-folding.") diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index 634dd29bad6..c371a84b9d2 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -361,14 +361,14 @@ Affects: `cperl-font-lock', `cperl-electric-lbrace-space', ;; :group 'cperl) (defcustom cperl-info-on-command-no-prompt nil - "Not-nil (and non-null) means not to prompt on C-h f. + "Not-nil (and non-null) means not to prompt on \\[cperl-info-on-command]. The opposite behavior is always available if prefixed with C-c. Can be overwritten by `cperl-hairy' if nil." :type '(choice (const null) boolean) :group 'cperl-affected-by-hairy) (defcustom cperl-clobber-lisp-bindings nil - "Not-nil (and non-null) means not overwrite C-h f. + "Not-nil (and non-null) means not overwrite \\[describe-function]. The function is available on \\[cperl-info-on-command], \\[cperl-get-help]. Can be overwritten by `cperl-hairy' if nil." :type '(choice (const null) boolean) diff --git a/lisp/progmodes/cpp.el b/lisp/progmodes/cpp.el index 6602a79b2a4..d800365e66d 100644 --- a/lisp/progmodes/cpp.el +++ b/lisp/progmodes/cpp.el @@ -711,8 +711,8 @@ BRANCH should be either nil (false branch), t (true branch) or `both'." default)) (defun cpp-choose-default-face (type) - ;; Choose default face list for screen of TYPE. - ;; Type must be one of the types defined in `cpp-face-type-list'. + "Choose default face list for screen of TYPE. +Type must be one of the types defined in `cpp-face-type-list'." (interactive (list (if cpp-button-event (x-popup-menu cpp-button-event (list "Screen type" @@ -789,7 +789,7 @@ BRANCH should be either nil (false branch), t (true branch) or `both'." (if data (list 'cpp-data data)))))) (defun cpp-push-button (event) - ;; Pushed a CPP button. + "Pushed a CPP button." (interactive "@e") (set-buffer (window-buffer (posn-window (event-start event)))) (let ((pos (posn-point (event-start event)))) diff --git a/lisp/progmodes/dcl-mode.el b/lisp/progmodes/dcl-mode.el index ed024f24344..b74b558f8df 100644 --- a/lisp/progmodes/dcl-mode.el +++ b/lisp/progmodes/dcl-mode.el @@ -494,7 +494,7 @@ Variables controlling indentation style and extra features: These variables control the look of expanded templates. dcl-imenu-generic-expression - Default value for imenu-generic-expression. The default includes + Default value for `imenu-generic-expression'. The default includes SUBROUTINE labels in the main listing and sub-listings for other labels, CALL, GOTO and GOSUB statements. @@ -1463,7 +1463,7 @@ Inserts continuation marks and splits character strings." ;;;------------------------------------------------------------------------- (defun dcl-delete-indentation (&optional arg) - "Join this line to previous like delete-indentation. + "Join this line to previous like `delete-indentation'. Also remove the continuation mark if easily detected." (interactive "*P") (delete-indentation arg) diff --git a/lisp/progmodes/ebnf-yac.el b/lisp/progmodes/ebnf-yac.el index 816cc432d1b..84950e45f51 100644 --- a/lisp/progmodes/ebnf-yac.el +++ b/lisp/progmodes/ebnf-yac.el @@ -113,7 +113,7 @@ ;;; YACC-Code = "any C definition". (defun ebnf-yac-parser (start) - "yacc/Bison parser." + "Yacc/Bison parser." (let ((total (+ (- ebnf-limit start) 1)) (bias (1- start)) (origin (point)) diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el index 3f2c9b71485..f9e6101e7ab 100644 --- a/lisp/progmodes/f90.el +++ b/lisp/progmodes/f90.el @@ -65,8 +65,8 @@ ;; the variable f90-comment-region in every line of the region. ;; One common convention for free vs. fixed format is that free format -;; files have the ending .f90 or .f95 while fixed format files have -;; the ending .f. Emacs automatically loads Fortran files in the +;; files have the ending ".f90" or ".f95" while fixed format files have +;; the ending ".f". Emacs automatically loads Fortran files in the ;; appropriate mode based on extension. You can modify this by ;; adjusting the variable `auto-mode-alist'. ;; For example: @@ -984,7 +984,7 @@ Used in the F90 entry in `hs-special-modes-alist'.") ;; FIXME trivial to extend this to enum. Worth it? (defun f90-imenu-type-matcher () "Search backward for the start of a derived type. -Set subexpression 1 in the match-data to the name of the type." +Set subexpression 1 in the `match-data' to the name of the type." (let (found) (while (and (re-search-backward "^[ \t0-9]*type[ \t]*" nil t) (not (setq found diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index e8ce0e723e4..9418debe5e3 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el @@ -559,7 +559,7 @@ Currently accepted REPORT-KEY arguments are: (put :warning 'flymake-category 'flymake-warning) (put :note 'flymake-category 'flymake-note) -(defvar flymake-diagnostic-types-alist '() "") +(defvar flymake-diagnostic-types-alist '()) (make-obsolete-variable 'flymake-diagnostic-types-alist "Set properties on the diagnostic symbols instead. See Info @@ -1329,7 +1329,7 @@ default) no filter is applied." ;;; Mode-line and menu ;;; -(easy-menu-define flymake-menu flymake-mode-map "Flymake" +(easy-menu-define flymake-menu flymake-mode-map "Flymake menu." '("Flymake" [ "Go to next problem" flymake-goto-next-error t ] [ "Go to previous problem" flymake-goto-prev-error t ] diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index 902466e4feb..3e5b8e2f32b 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el @@ -467,8 +467,8 @@ GDB session needs to be restarted for this setting to take effect." ;; TODO Some commands can't be called with --all (give a notice about ;; it in setting doc) (defcustom gdb-gud-control-all-threads t - "When non-nil, GUD execution commands affect all threads when -in non-stop mode. Otherwise, only current thread is affected." + "When non-nil, GUD execution commands affect all threads when in non-stop mode. +Otherwise, only current thread is affected." :type 'boolean :group 'gdb-non-stop :version "23.2") @@ -1483,7 +1483,7 @@ INDENT is the current indentation depth." (expr (nth 1 var)) (children (nth 2 var))) (if (or (<= (string-to-number children) gdb-max-children) (y-or-n-p - (format "%s has %s children. Continue? " expr children))) + (format "%s has %s children. Continue?" expr children))) (gdb-var-list-children token)))) ((string-search "-" text) ;contract this node (dolist (var gdb-var-list) diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index d7f4582dd0b..ec2850737c8 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -72,7 +72,7 @@ SYMBOL should be one of `grep-command', `grep-template', Some grep programs are able to surround matches with special markers in grep output. Such markers can be used to highlight matches in grep mode. This requires `font-lock-mode' to be active -in grep buffers, so if you have globally disabled font-lock-mode, +in grep buffers, so if you have globally disabled `font-lock-mode', you will not get highlighting. This option sets the environment variable GREP_COLORS to specify @@ -137,7 +137,7 @@ The following place holders should be present in the string: - file names and wildcards to search. - file names and wildcards to exclude. - the regular expression searched for. - - place to insert null-device. + - place to insert `null-device'. In interactive usage, the actual value of this variable is set up by `grep-compute-defaults'; to change the default value, use diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el index b2557587c6c..e2ad480281f 100644 --- a/lisp/progmodes/hideshow.el +++ b/lisp/progmodes/hideshow.el @@ -62,7 +62,7 @@ ;; activated or deactivated, `hs-minor-mode-hook' is run w/ `run-hooks'. ;; ;; Additionally, Joseph Eydelnant writes: -;; I enjoy your package hideshow.el Ver. 5.24 2001/02/13 +;; I enjoy your package hideshow.el Version 5.24 2001/02/13 ;; a lot and I've been looking for the following functionality: ;; toggle hide/show all with a single key. ;; Here are a few lines of code that lets me do just that. diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el index 36f8a6d6b6e..d6828eeffbb 100644 --- a/lisp/progmodes/idlwave.el +++ b/lisp/progmodes/idlwave.el @@ -5316,7 +5316,7 @@ directories and save the routine info. (defun idlwave-delete-user-catalog-file (&rest _ignore) (if (yes-or-no-p - (format "Delete file %s " idlwave-user-catalog-file)) + (format "Delete file %s?" idlwave-user-catalog-file)) (progn (delete-file idlwave-user-catalog-file) (message "%s has been deleted" idlwave-user-catalog-file)))) diff --git a/lisp/progmodes/opascal.el b/lisp/progmodes/opascal.el index 51c888d25f3..e55b09d8fcf 100644 --- a/lisp/progmodes/opascal.el +++ b/lisp/progmodes/opascal.el @@ -51,7 +51,7 @@ :group 'languages) (defconst opascal-debug nil - "True if in debug mode.") + "Non-nil if in debug mode.") (define-obsolete-variable-alias 'delphi-search-path 'opascal-search-path "24.4") @@ -1732,7 +1732,8 @@ comment block. If not in a // comment, just does a normal newline." (define-obsolete-function-alias 'delphi-mode #'opascal-mode "24.4") ;;;###autoload (define-derived-mode opascal-mode prog-mode "OPascal" - "Major mode for editing OPascal code.\\ + "Major mode for editing OPascal code. +\\ \\[opascal-find-unit]\t- Search for a OPascal source file. \\[opascal-fill-comment]\t- Fill the current comment. \\[opascal-new-comment-line]\t- If in a // comment, do a new comment line. diff --git a/lisp/progmodes/prog-mode.el b/lisp/progmodes/prog-mode.el index 7f70e02b72e..6c09dcf881d 100644 --- a/lisp/progmodes/prog-mode.el +++ b/lisp/progmodes/prog-mode.el @@ -127,7 +127,7 @@ which case it will be used to compose the new symbol as per the third argument of `compose-region'.") (defun prettify-symbols-default-compose-p (start end _match) - "Return true iff the symbol MATCH should be composed. + "Return non-nil iff the symbol MATCH should be composed. The symbol starts at position START and ends at position END. This is the default for `prettify-symbols-compose-predicate' which is suitable for most programming languages such as C or Lisp." @@ -145,7 +145,7 @@ which is suitable for most programming languages such as C or Lisp." "A predicate for deciding if the currently matched symbol is to be composed. The matched symbol is the car of one entry in `prettify-symbols-alist'. The predicate receives the match's start and end positions as well -as the match-string as arguments.") +as the `match-string' as arguments.") (defun prettify-symbols--compose-symbol (alist) "Compose a sequence of characters into a symbol. diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 2eead0d0696..9b63f4b1bc8 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -1033,8 +1033,8 @@ command \\[fileloop-continue]." (defun project-query-replace-regexp (from to) "Query-replace REGEXP in all the files of the project. Stops when a match is found and prompts for whether to replace it. -If you exit the query-replace, you can later continue the query-replace -loop using the command \\[fileloop-continue]." +If you exit the `query-replace', you can later continue the +`query-replace' loop using the command \\[fileloop-continue]." (interactive (pcase-let ((`(,from ,to) (query-replace-read-args "Query replace (regexp)" t t))) diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el index d47bb8bcb96..dabf9c479e2 100644 --- a/lisp/progmodes/verilog-mode.el +++ b/lisp/progmodes/verilog-mode.el @@ -414,7 +414,7 @@ wherever possible, since it is slow." ;; "----" ["MB" nil :help "Help MB"])) (defun verilog-define-abbrev-table (tablename definitions &optional docstring &rest props) - "Filter `define-abbrev-table' TABLENAME DEFINITIONS + "Filter `define-abbrev-table' TABLENAME DEFINITIONS. Provides DOCSTRING PROPS in newer Emacs (23.1)." (condition-case nil (apply #'define-abbrev-table tablename definitions docstring props) @@ -13380,7 +13380,7 @@ Typing \\[verilog-auto] will call my-verilog-insert-hello and expand the above into: /*AUTOINSERTLISP(my-verilog-insert-hello \"world\")*/ - // Beginning of automatic insert lisp + // Beginning of automatic insert Lisp initial $write(\"hello world\"); // End of automatics diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el index fef7dff65e2..fc0d406f73c 100644 --- a/lisp/progmodes/vhdl-mode.el +++ b/lisp/progmodes/vhdl-mode.el @@ -2197,8 +2197,8 @@ is pair matching KEY." (setq alist alist-cdr))))) (defun vhdl-aget (alist key) - "Return the value in ALIST that is associated with KEY. If KEY is -not found, then nil is returned." + "Return the value in ALIST that is associated with KEY. +If KEY is not found, then nil is returned." (cdr (assoc key alist))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -4275,8 +4275,7 @@ STRING are replaced by `-' and substrings are converted to lower case." (defvar vhdl-sources-menu nil) (defun vhdl-directory-files (directory &optional full match) - "Call `directory-files' if DIRECTORY exists, otherwise generate error -message." + "Call `directory-files' if DIRECTORY exists, otherwise generate error message." (if (not (file-directory-p directory)) (vhdl-warning-when-idle "No such directory: \"%s\"" directory) (let ((dir (directory-files directory full match))) @@ -5734,8 +5733,8 @@ the offset is simply returned." (save-excursion (re-search-forward "\\\\" (vhdl-point 'eol) t))))) (defun vhdl-forward-comment (&optional direction) - "Skip all comments (including whitespace). Skip backwards if DIRECTION is -negative, skip forward otherwise." + "Skip all comments (including whitespace). +Skip backwards if DIRECTION is negative, skip forward otherwise." (interactive "p") (if (and direction (< direction 0)) ;; skip backwards @@ -6912,9 +6911,9 @@ previous libunit keyword)." (concat vhdl-case-alternative-re "\\|" vhdl-case-header-key)) (defun vhdl-skip-case-alternative (&optional lim) - "Skip forward over case/when bodies, with optional maximal -limit. If no next case alternative is found, nil is returned and -point is not moved." + "Skip forward over case/when bodies, with optional maximal limit. +If no next case alternative is found, nil is returned and point +is not moved." (let ((lim (or lim (point-max))) (here (point)) donep foundp) @@ -6939,9 +6938,8 @@ point is not moved." foundp)) (defun vhdl-backward-skip-label (&optional lim) - "Skip backward over a label, with optional maximal -limit. If label is not found, nil is returned and point -is not moved." + "Skip backward over a label, with optional maximal limit. +If label is not found, nil is returned and point is not moved." (let ((lim (or lim (point-min))) placeholder) (if (save-excursion @@ -6955,9 +6953,8 @@ is not moved." )) (defun vhdl-forward-skip-label (&optional lim) - "Skip forward over a label, with optional maximal -limit. If label is not found, nil is returned and point -is not moved." + "Skip forward over a label, with optional maximal limit. +If label is not found, nil is returned and point is not moved." (let ((lim (or lim (point-max)))) (if (looking-at vhdl-label-key) (progn @@ -7327,9 +7324,9 @@ after the containing paren which starts the arglist." (- ce-curcol cs-curcol -1)))) (defun vhdl-lineup-comment (_langelem) - "Support old behavior for comment indentation. We look at -vhdl-comment-only-line-offset to decide how to indent comment -only-lines." + "Support old behavior for comment indentation. +We look at `vhdl-comment-only-line-offset' to decide how to +indent comment only-lines." (save-excursion (back-to-indentation) ;; at or to the right of comment-column @@ -7445,7 +7442,7 @@ else indent `correctly'." (setq this-command 'vhdl-electric-tab))) (defun vhdl-electric-return () - "newline-and-indent or indent-new-comment-line if in comment and preceding + "`newline-and-indent' or `indent-new-comment-line' if in comment and preceding character is a space." (interactive) (if (and (= (preceding-char) ? ) (vhdl-in-comment-p)) @@ -7456,8 +7453,8 @@ character is a space." (newline-and-indent))) (defun vhdl-indent-line () - "Indent the current line as VHDL code. Returns the amount of -indentation change." + "Indent the current line as VHDL code. +Return the amount of indentation change." (interactive) (let* ((syntax (and vhdl-indent-syntax-based (vhdl-get-syntactic-context))) (pos (- (point-max) (point))) @@ -7617,8 +7614,8 @@ ALIGN-PATTERN matches the white space to be expanded/contracted.") ;; Align code (defvar vhdl-align-try-all-clauses t - "If REGEXP is not found on the first line of the region that clause -is ignored. If this variable is non-nil, then the clause is tried anyway.") + "If REGEXP is not found on the first line of the region that clause is ignored. +If this variable is non-nil, then the clause is tried anyway.") (defun vhdl-do-group (function &optional spacing) "Apply FUNCTION on group of lines between empty lines." @@ -7637,8 +7634,7 @@ is ignored. If this variable is non-nil, then the clause is tried anyway.") (funcall function beg end spacing))) (defun vhdl-do-list (function &optional spacing) - "Apply FUNCTION to the lines of a list surrounded by a balanced group of -parentheses." + "Apply FUNCTION to lines of a list surrounded by a balanced group of parentheses." (let (beg end) (save-excursion ;; search for beginning of balanced group of parentheses @@ -7683,11 +7679,11 @@ parentheses." (funcall function beg end spacing))) (defun vhdl-align-region-1 (begin end &optional spacing alignment-list _indent) - "Attempt to align a range of lines based on the content of the -lines. The definition of `alignment-list' determines the matching -order and the manner in which the lines are aligned. If ALIGNMENT-LIST -is not specified `vhdl-align-alist' is used. If INDENT is non-nil, -indentation is done before aligning." + "Attempt to align a range of lines based on the content of the lines. +The definition of `alignment-list' determines the matching order +and the manner in which the lines are aligned. If ALIGNMENT-LIST +is not specified `vhdl-align-alist' is used. If INDENT is +non-nil, indentation is done before aligning." (interactive "r\np") (setq alignment-list (or alignment-list vhdl-align-alist)) (setq spacing (or spacing 1)) @@ -11070,7 +11066,7 @@ Point is left between them." ;; Help functions (defun vhdl-electric-space (count) - "Expand abbreviations and self-insert space(s), do indent-new-comment-line + "Expand abbreviations and self-insert space(s), do `indent-new-comment-line' if in comment and past end-comment-column." (interactive "p") (cond ((vhdl-in-comment-p) @@ -11619,8 +11615,7 @@ but not if inside a comment or quote." string))) (defun vhdl-paste-group-comment (string indent) - "Paste comment and empty lines from STRING between groups of lines -with INDENT." + "Paste comment and empty lines from STRING between groups of lines with INDENT." (let ((pos (point-marker))) (when (> indent 0) (while (string-match "^\\(--\\)" string) @@ -14919,7 +14914,8 @@ if required." (setq project-alist (cdr project-alist))))) (defun vhdl-speedbar-insert-project-hierarchy (project indent &optional rescan) - "Insert hierarchy of PROJECT. Rescan directories if RESCAN is non-nil, + "Insert hierarchy of PROJECT. +Rescan directories if optional argument RESCAN is non-nil, otherwise use cached data." (when (or rescan (and (not (assoc project vhdl-file-alist)) (not (vhdl-load-cache project)))) @@ -14937,7 +14933,8 @@ otherwise use cached data." (vhdl-speedbar-expand-units project)) (defun vhdl-speedbar-insert-dir-hierarchy (directory depth &optional rescan) - "Insert hierarchy of DIRECTORY. Rescan directory if RESCAN is non-nil, + "Insert hierarchy of DIRECTORY. +Rescan directory if optional argument RESCAN is non-nil, otherwise use cached data." (when (or rescan (and (not (assoc directory vhdl-file-alist)) (not (vhdl-load-cache directory)))) diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index 69cabd0b5a5..772e6646d95 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -760,7 +760,7 @@ references displayed in the current *xref* buffer." (defun xref--outdated-p (item) "Check that the match location at current position is up-to-date. -ITEMS is an xref item which " +ITEMS is an xref item which " ; FIXME: Expand documentation. ;; FIXME: The check should most likely be a generic function instead ;; of the assumption that all matches' summaries relate to the ;; buffer text in a particular way. diff --git a/lisp/rect.el b/lisp/rect.el index 504be41b673..d288adfbaf6 100644 --- a/lisp/rect.el +++ b/lisp/rect.el @@ -202,8 +202,8 @@ rectangles, as conses of the form (WIDTH . HEIGHT)." (<= (+ y2 h2) y1))))) (defun rectangle-dimensions (start end) - "Return the dimensions of the rectangle with corners at START -and END. The returned value has the form of (WIDTH . HEIGHT)." + "Return the dimensions of the rectangle with corners at START and END. +The returned value has the form of (WIDTH . HEIGHT)." (save-excursion (let* ((height (1+ (abs (- (line-number-at-pos end) (line-number-at-pos start))))) diff --git a/lisp/repeat.el b/lisp/repeat.el index 0b761fff1e3..ee9e14b5155 100644 --- a/lisp/repeat.el +++ b/lisp/repeat.el @@ -218,7 +218,7 @@ recently executed command not bound to an input event\"." ((null last-repeatable-command) (error "There is nothing to repeat")) ((eq last-repeatable-command 'mode-exit) - (error "last-repeatable-command is mode-exit & can't be repeated")) + (error "`last-repeatable-command' is `mode-exit' and can't be repeated")) ((memq last-repeatable-command repeat-too-dangerous) (error "Command %S too dangerous to repeat automatically" last-repeatable-command))) diff --git a/lisp/replace.el b/lisp/replace.el index e4155d4c27a..84ec042f455 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -63,7 +63,7 @@ it will match any sequence matched by the regexp `search-whitespace-regexp'." :version "24.3") (defvar query-replace-history nil - "Default history list for query-replace commands. + "Default history list for `query-replace' commands. See `query-replace-from-history-variable' and `query-replace-to-history-variable'.") @@ -202,7 +202,7 @@ by this function to the end of values available via (car (symbol-value query-replace-from-history-variable))))) (defun query-replace-read-from (prompt regexp-flag) - "Query and return the `from' argument of a query-replace operation. + "Query and return the `from' argument of a `query-replace' operation. Prompt with PROMPT. REGEXP-FLAG non-nil means the response should be a regexp. The return value can also be a pair (FROM . TO) indicating that the user wants to replace FROM with TO." @@ -326,8 +326,9 @@ the original string if not." (defun query-replace-read-to (from prompt regexp-flag) - "Query and return the `to' argument of a query-replace operation. -Prompt with PROMPT. REGEXP-FLAG non-nil means the response should a regexp." + "Query and return the `to' argument of a `query-replace' operation. +Prompt with PROMPT. REGEXP-FLAG non-nil means the response +should a regexp." (query-replace-compile-replacement (save-excursion (let* ((history-add-new-input nil) @@ -1300,7 +1301,7 @@ See `occur-revert-function'.") (defcustom occur-mode-find-occurrence-hook nil "Hook run by Occur after locating an occurrence. This will be called with the cursor position at the occurrence. An application -for this is to reveal context in an outline-mode when the occurrence is hidden." +for this is to reveal context in an outline mode when the occurrence is hidden." :type 'hook :group 'matching) @@ -2606,7 +2607,7 @@ passed in. If LITERAL is set, no checking is done, anyway." noedit) (defvar replace-update-post-hook nil - "Function(s) to call after query-replace has found a match in the buffer.") + "Function(s) to call after `query-replace' has found a match in the buffer.") (defvar replace-search-function nil "Function to use when searching for strings to replace. diff --git a/lisp/ruler-mode.el b/lisp/ruler-mode.el index a0d4f6e96c2..84c9d06ecec 100644 --- a/lisp/ruler-mode.el +++ b/lisp/ruler-mode.el @@ -348,7 +348,7 @@ nothing is dragged.") (defun ruler-mode-text-scaled-width (width) "Compute scaled text width according to current font scaling. Convert a width of char units into a text-scaled char width units, -Ex. `window-hscroll'." +for example `window-hscroll'." (/ (* width (frame-char-width)) (default-font-width))) (defun ruler-mode-text-scaled-window-hscroll () diff --git a/lisp/server.el b/lisp/server.el index 5dd30db195a..6359a761994 100644 --- a/lisp/server.el +++ b/lisp/server.el @@ -1078,7 +1078,7 @@ The following commands are accepted by the client: `-suspend' Suspend this terminal, i.e., stop the client process. - Sent when the user presses C-z." + Sent when the user presses \\[suspend-frame]." (server-log (concat "Received " string) proc) ;; First things first: let's check the authentication (unless (process-get proc :authenticated) diff --git a/lisp/ses.el b/lisp/ses.el index 9250f7ede0f..ea966295b18 100644 --- a/lisp/ses.el +++ b/lisp/ses.el @@ -299,11 +299,11 @@ Used for listing local printers or renamed cells.") ses-center-span ses-dashfill ses-dashfill-span ses-tildefill-span ses-prin1) - "List of print functions to be included in initial history of -printer functions. None of these standard-printer functions, -except function `ses-prin1', is suitable for use as a column -printer or a global-default printer because they invoke the -column or default printer and then modify its output.") + "List of print functions to be included in initial history of printer functions. +None of these standard-printer functions, except function +`ses-prin1', is suitable for use as a column printer or a +global-default printer because they invoke the column or default +printer and then modify its output.") ;;---------------------------------------------------------------------------- diff --git a/lisp/shell.el b/lisp/shell.el index 5cdc0385a6f..b575024e016 100644 --- a/lisp/shell.el +++ b/lisp/shell.el @@ -517,7 +517,8 @@ Shell buffers. It implements `shell-completion-execonly' for (put 'shell-mode 'mode-class 'special) (define-derived-mode shell-mode comint-mode "Shell" - "Major mode for interacting with an inferior shell.\\ + "Major mode for interacting with an inferior shell. +\\ \\[comint-send-input] after the end of the process' output sends the text from the end of process to the end of the current line. \\[comint-send-input] before end of process output copies the current line minus the prompt to diff --git a/lisp/simple.el b/lisp/simple.el index 1267c92fe54..298e3ea5ee0 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -241,7 +241,7 @@ all other buffers." (defun next-error-buffer-on-selected-frame (&optional _avoid-current extra-test-inclusive extra-test-exclusive) - "Return a single visible next-error buffer on the selected frame." + "Return a single visible `next-error' buffer on the selected frame." (let ((window-buffers (delete-dups (delq nil (mapcar (lambda (w) @@ -2133,21 +2133,23 @@ or (if one of MODES is a minor mode), if it is switched on in BUFFER." command-names))) (defcustom suggest-key-bindings t - "Non-nil means show the equivalent key-binding when M-x command has one. + "Non-nil means show the equivalent keybinding when \ +\\[execute-extended-command] has one. The value can be a length of time to show the message for. If the value is non-nil and not a number, we wait 2 seconds. Also see `extended-command-suggest-shorter'. Equivalent key-bindings are also shown in the completion list of -M-x for all commands that have them." +\\[execute-extended-command] for all commands that have them." :group 'keyboard :type '(choice (const :tag "off" nil) (integer :tag "time" 2) (other :tag "on"))) (defcustom extended-command-suggest-shorter t - "If non-nil, show a shorter M-x invocation when there is one. + "If non-nil, show a shorter \\[execute-extended-command] invocation \ +when there is one. Also see `suggest-key-bindings'." :group 'keyboard @@ -3522,7 +3524,7 @@ with < or <= based on USE-<." ;; called or in some cases on a timer called after a change is made in ;; any buffer. (defvar-local undo-auto--last-boundary-cause nil - "Describe the cause of the last undo-boundary. + "Describe the cause of the last `undo-boundary'. If `explicit', the last boundary was caused by an explicit call to `undo-boundary', that is one not called by the code in this @@ -9817,11 +9819,13 @@ warning using STRING as the message.") The argument `COMMAND' should be a symbol. -Running `M-x COMMAND RET' for the first time prompts for which +Running `\\[execute-extended-command] COMMAND RET' for \ +the first time prompts for which alternative to use and records the selected command as a custom variable. -Running `C-u M-x COMMAND RET' prompts again for an alternative +Running `\\[universal-argument] \\[execute-extended-command] COMMAND RET' \ +prompts again for an alternative and overwrites the previous choice. The variable `COMMAND-alternatives' contains an alist with diff --git a/lisp/so-long.el b/lisp/so-long.el index 65570bf253d..c975384ddb3 100644 --- a/lisp/so-long.el +++ b/lisp/so-long.el @@ -492,7 +492,7 @@ ;; considered internal-use only (with `global-so-long-mode' the interface ;; for enabling or disabling the automated behaviour). FIXME: Establish a ;; way to support the original use-case, or rename to `so-long--enabled'. - "Internal use. Non-nil when any so-long functionality has been used.") + "Internal use. Non-nil when any `so-long' functionality has been used.") (defvar-local so-long--active nil ; internal use "Non-nil when `so-long' mitigations are in effect.") @@ -1100,7 +1100,7 @@ This command calls `so-long' with the selected action as an argument.") ;;;###autoload (defun so-long-commentary () - "View the so-long library's documentation in `outline-mode'." + "View the `so-long' library's documentation in `outline-mode'." (interactive) (let ((buf "*So Long: Commentary*")) (when (buffer-live-p (get-buffer buf)) @@ -1862,14 +1862,14 @@ invoked." ;;;###autoload (defun so-long-enable () - "Enable the so-long library's functionality. + "Enable the `so-long' library's functionality. Equivalent to calling (global-so-long-mode 1)" (interactive) (global-so-long-mode 1)) (defun so-long-disable () - "Disable the so-long library's functionality. + "Disable the `so-long' library's functionality. Equivalent to calling (global-so-long-mode 0)" (interactive) diff --git a/lisp/sort.el b/lisp/sort.el index be373fba99b..d6767ed5098 100644 --- a/lisp/sort.el +++ b/lisp/sort.el @@ -507,7 +507,8 @@ Use \\[untabify] to convert tabs to spaces before sorting." (setq col-start (min col-beg1 col-end1)) (setq col-end (max col-beg1 col-end1)) (if (search-backward "\t" beg1 t) - (error "sort-columns does not work with tabs -- use M-x untabify")) + (error (substitute-command-keys + "sort-columns does not work with tabs -- use \\[untabify]"))) (if (not (or (memq system-type '(windows-nt)) (let ((pos beg1) plist fontified) (catch 'found diff --git a/lisp/subr.el b/lisp/subr.el index 0793cbca5e1..a6434bf28a8 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -22,6 +22,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . +;;; Commentary: + ;;; Code: ;; declare-function's args use &rest, not &optional, for compatibility diff --git a/lisp/tempo.el b/lisp/tempo.el index 25f54af3c9d..b722cc04ca2 100644 --- a/lisp/tempo.el +++ b/lisp/tempo.el @@ -445,7 +445,7 @@ never prompted." ;;; tempo-is-user-element (defun tempo-is-user-element (element) - "Tries all the user-defined element handlers in `tempo-user-elements'." + "Try all the user-defined element handlers in `tempo-user-elements'." ;; Sigh... I need (some list) (catch 'found (mapc (lambda (handler) diff --git a/lisp/term.el b/lisp/term.el index d3d02188573..af930891043 100644 --- a/lisp/term.el +++ b/lisp/term.el @@ -340,7 +340,7 @@ (defvar term-home-marker) ; Marks the "home" position for cursor addressing. (defvar term-saved-home-marker nil "When using alternate sub-buffer, -contains saved term-home-marker from original sub-buffer.") +contains saved `term-home-marker' from original sub-buffer.") (defvar term-start-line-column 0 "(current-column) at start of screen line, or nil if unknown.") (defvar term-current-column 0 "If non-nil, is cache for (current-column).") @@ -377,7 +377,7 @@ are not allowed.") (defvar term-scroll-with-delete nil "If t, forward scrolling should be implemented by delete to top-most line(s); and if nil, scrolling should be implemented -by moving term-home-marker. It is set to t if there is a +by moving `term-home-marker'. It is set to t if there is a \(non-default) scroll-region OR the alternate buffer is used.") (defvar term-pending-delete-marker) ; New user input in line mode ; needs to be deleted, because it gets echoed by the inferior. @@ -669,7 +669,7 @@ Do not change it directly; use `term-set-escape-char' instead.") "Keymap used in Term pager mode.") (defvar term-ptyp t - "True if communications via pty; false if by pipe. Buffer local. + "Non-nil if communications via pty; false if by pipe. Buffer local. This is to work around a bug in Emacs process signaling.") (defvar term-last-input-match "" @@ -1228,8 +1228,7 @@ Entry to this mode runs the hooks on `term-mode-hook'." (process-send-string proc chars)))) (defun term-send-raw () - "Send the last character typed through the terminal-emulator -without any interpretation." + "Send last typed character to the terminal-emulator without any interpretation." (interactive) (let ((keys (this-command-keys))) (term-send-raw-string (string (aref keys (1- (length keys))))))) @@ -1401,8 +1400,8 @@ Called as a buffer-local `read-only-mode-hook' function." (force-mode-line-update)) (defun term-check-proc (buffer) - "True if there is a process associated w/buffer BUFFER, and it -is alive. BUFFER can be either a buffer or the name of one." + "Non-nil if there is a process associated w/buffer BUFFER, and it is alive. +BUFFER can be either a buffer or the name of one." (let ((proc (get-buffer-process buffer))) (and proc (memq (process-status proc) '(run stop open listen connect))))) @@ -1538,7 +1537,7 @@ Using \"emacs\" loses, because bash disables editing if $TERM == emacs.") Some other integer if Bash is new or not in use. Nil if unknown.") (defun term--bash-needs-EMACSp () - "t if Bash is old, nil if it is new or not in use." + "Return t if Bash is old, nil if it is new or not in use." (eq 43 (or term--bash-needs-EMACS-status (setf @@ -2107,17 +2106,17 @@ The values of `term-get-old-input', `term-input-filter-functions', and in the buffer. E.g., If the interpreter is the csh, - term-get-old-input is the default: take the current line, discard any - initial string matching regexp term-prompt-regexp. - term-input-filter-functions monitors input for \"cd\", \"pushd\", and + `term-get-old-input' is the default: take the current line, discard any + initial string matching regexp `term-prompt-regexp'. + `term-input-filter-functions' monitors input for \"cd\", \"pushd\", and \"popd\" commands. When it sees one, it cd's the buffer. - term-input-filter is the default: returns t if the input isn't all white + `term-input-filter' is the default: returns t if the input isn't all white space. If the term is Lucid Common Lisp, - term-get-old-input snarfs the sexp ending at point. - term-input-filter-functions does nothing. - term-input-filter returns nil if the input matches input-filter-regexp, + `term-get-old-input' snarfs the sexp ending at point. + `term-input-filter-functions' does nothing. + `term-input-filter' returns nil if the input matches input-filter-regexp, which matches (1) all whitespace (2) :a, :c, etc. Similarly for Soar, Scheme, etc." @@ -2403,8 +2402,7 @@ Useful if you accidentally suspend the top-level process." (kill-region pmark (point))))) (defun term-delchar-or-maybe-eof (arg) - "Delete ARG characters forward, or send an EOF to process if at end of -buffer." + "Delete ARG characters forward, or send an EOF to process if at end of buffer." (interactive "p") (if (eobp) (process-send-eof) @@ -3171,7 +3169,7 @@ See `term-prompt-regexp'." Set in `pre-command-hook' in char mode by `term-set-goto-process-mark'.") (defun term-set-goto-process-mark () - "Sets `term-goto-process-mark'. + "Set `term-goto-process-mark'. Always set to nil if `term-char-mode-point-at-process-mark' is nil. @@ -3430,7 +3428,7 @@ option is enabled. See `term-set-goto-process-mark'." (t))) (defun term--reset-scroll-region () - "Sets the scroll region to the full height of the terminal." + "Set the scroll region to the full height of the terminal." (term-set-scroll-region 0 (term--last-line))) (defun term-set-scroll-region (top bottom) @@ -3793,7 +3791,7 @@ all pending output has been dealt with.")) (defun term-erase-in-display (kind) "Erase (that is blank out) part of the window. -If KIND is 0, erase from (point) to (point-max); +If KIND is 0, erase from point to point-max; if KIND is 1, erase from home to point; else erase from home to point-max." (term-handle-deferred-scroll) (cond ((eq kind 0) diff --git a/lisp/textmodes/bib-mode.el b/lisp/textmodes/bib-mode.el index e2fd3ecaa42..a429aae7f70 100644 --- a/lisp/textmodes/bib-mode.el +++ b/lisp/textmodes/bib-mode.el @@ -137,7 +137,7 @@ with the cdr.") (defcustom bib-auto-capitalize t - "True to automatically capitalize appropriate fields in Bib mode." + "Non-nil to automatically capitalize appropriate fields in Bib mode." :type 'boolean) (defconst bib-capitalized-fields "%[AETCBIJR]") diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index 9b3211df57a..1d450b50012 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el @@ -1861,7 +1861,7 @@ is itself incorrect, but suspiciously repeated." ;;* flyspell-highlight-duplicate-region ... */ ;;*---------------------------------------------------------------------*/ (defun flyspell-highlight-duplicate-region (beg end poss) - "Set up an overlay on a duplicate misspelled word, in the buffer from BEG to END. + "Set up overlay on duplicate misspelled word, in the buffer from BEG to END. POSS is a list of possible spelling/correction lists, as returned by `ispell-parse-output'." (let ((inhibit-read-only t)) diff --git a/lisp/textmodes/makeinfo.el b/lisp/textmodes/makeinfo.el index 13367a09bcf..6b9b3f3e9de 100644 --- a/lisp/textmodes/makeinfo.el +++ b/lisp/textmodes/makeinfo.el @@ -175,10 +175,9 @@ command to gain use of `next-error'." 'makeinfo-compilation-sentinel-region))))))) (defun makeinfo-next-error (_arg _reset) - "This function is used to disable `next-error' if the user has -used `makeinfo-region'. Since the compilation process is used on -a temporary file in that case, calling `next-error' would give -nonsensical results." + "This is used to disable `next-error' if the user has used `makeinfo-region'. +Since the compilation process is used on a temporary file in that +case, calling `next-error' would give nonsensical results." (error "Use `makeinfo-buffer' to gain use of the `next-error' command")) ;; Actually run makeinfo. COMMAND is the command to run. If diff --git a/lisp/textmodes/mhtml-mode.el b/lisp/textmodes/mhtml-mode.el index 25905385685..936732153ae 100644 --- a/lisp/textmodes/mhtml-mode.el +++ b/lisp/textmodes/mhtml-mode.el @@ -19,6 +19,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . +;;; Commentary: + ;;; Code: (eval-when-compile (require 'cl-lib)) diff --git a/lisp/textmodes/refill.el b/lisp/textmodes/refill.el index 0a0e4cc444c..b2ebbd5f375 100644 --- a/lisp/textmodes/refill.el +++ b/lisp/textmodes/refill.el @@ -153,7 +153,7 @@ regardless of the number of after-change calls from commands doing complex processing.") (defun refill-after-change-function (_beg end _len) - "Function for `after-change-functions' which just sets `refill-doit'." + "Set `refill-doit'. Used by `after-change-functions'." (unless undo-in-progress (setq refill-doit end))) diff --git a/lisp/textmodes/reftex-dcr.el b/lisp/textmodes/reftex-dcr.el index abcf119fb82..ee26d911a5d 100644 --- a/lisp/textmodes/reftex-dcr.el +++ b/lisp/textmodes/reftex-dcr.el @@ -32,14 +32,17 @@ ;;;###autoload (defun reftex-view-crossref (&optional arg auto-how fail-quietly) - "View cross reference of macro at point. Point must be on the KEY -argument. When at a `\\ref' macro, show corresponding `\\label' -definition, also in external documents (`xr'). When on a label, show -a locations where KEY is referenced. Subsequent calls find additional -locations. When on a `\\cite', show the associated `\\bibitem' macro or -the BibTeX database entry. When on a `\\bibitem', show a `\\cite' macro -which uses this KEY. When on an `\\index', show other locations marked -by the same index entry. + "View cross reference of macro at point. + +Point must be on the KEY argument. When at a `\\ref' macro, show +corresponding `\\label' definition, also in external +documents (`xr'). When on a label, show a locations where KEY is +referenced. Subsequent calls find additional locations. When on +a `\\cite', show the associated `\\bibitem' macro or the BibTeX +database entry. When on a `\\bibitem', show a `\\cite' macro +which uses this KEY. When on an `\\index', show other locations +marked by the same index entry. + To define additional cross referencing items, use the option `reftex-view-crossref-extra'. See also `reftex-view-crossref-from-bibtex'. With one or two \\[universal-argument] prefixes, enforce rescanning of the document. diff --git a/lisp/textmodes/reftex-global.el b/lisp/textmodes/reftex-global.el index 3b7518e5c3f..cc8b3244b99 100644 --- a/lisp/textmodes/reftex-global.el +++ b/lisp/textmodes/reftex-global.el @@ -338,17 +338,17 @@ Also checks if buffers visiting the files are in read-only mode." (while (setq file (pop files)) (unless (file-exists-p file) (ding) - (or (y-or-n-p (format "No such file %s. Continue? " file)) + (or (y-or-n-p (format "No such file %s. Continue?" file)) (error "Abort"))) (unless (file-writable-p file) (ding) - (or (y-or-n-p (format "No write access to %s. Continue? " file)) + (or (y-or-n-p (format "No write access to %s. Continue?" file)) (error "Abort"))) (when (and (setq buf (find-buffer-visiting file)) (with-current-buffer buf buffer-read-only)) (ding) - (or (y-or-n-p (format "Buffer %s is read-only. Continue? " + (or (y-or-n-p (format "Buffer %s is read-only. Continue?" (buffer-name buf))) (error "Abort")))))) diff --git a/lisp/textmodes/reftex-index.el b/lisp/textmodes/reftex-index.el index 423c5398dd6..9d9eab4d7b5 100644 --- a/lisp/textmodes/reftex-index.el +++ b/lisp/textmodes/reftex-index.el @@ -934,8 +934,8 @@ When index is restricted, select the previous section as restriction criterion." (t nil)))) (defun reftex-index-analyze-entry (data) - ;; This splits the index context so that key, attribute and visual - ;; values are accessible individually. + "Split index context so that key, attribute and visual +values are accessible individually." (interactive) (let* ((arg (nth 5 data)) (context (nth 2 data)) diff --git a/lisp/textmodes/reftex-parse.el b/lisp/textmodes/reftex-parse.el index 9def10cee05..c521a07f192 100644 --- a/lisp/textmodes/reftex-parse.el +++ b/lisp/textmodes/reftex-parse.el @@ -435,7 +435,8 @@ This function also makes sure the old toc markers do not point anywhere." ;;;###autoload (defun reftex-section-info (file) "Return a section entry for the current match. -Careful: This function expects the match-data to be still in place!" +Careful: This function expects the `match-data' to still be in +place!" (let* ((marker (set-marker (make-marker) (1- (match-beginning 3)))) (macro (reftex-match-string 3)) (prefix (save-match-data @@ -494,7 +495,8 @@ will rescan the entire document." ;;;###autoload (defun reftex-index-info (file) "Return an index entry for the current match. -Careful: This function expects the match-data to be still in place!" +Careful: This function expects the `match-data' to still be in +place!" (catch 'exit (let* ((macro (reftex-match-string 10)) (bom (match-beginning 10)) diff --git a/lisp/textmodes/reftex-vars.el b/lisp/textmodes/reftex-vars.el index 23f2193501d..d57a7678553 100644 --- a/lisp/textmodes/reftex-vars.el +++ b/lisp/textmodes/reftex-vars.el @@ -330,7 +330,8 @@ select the nearest entry with the correct new level." "The maximum level of toc entries which will be included in the TOC. Section headings with a bigger level will be ignored. In RefTeX, chapters are level 1, sections are level 2 etc. -This variable can be changed from within the *toc* buffer with the `t' key." +This variable can be changed from within the *toc* buffer with \ +\\\\[reftex-toc-max-level]." :group 'reftex-table-of-contents-browser :type 'integer) @@ -1208,7 +1209,7 @@ path." :type '(repeat (file))) (defcustom reftex-sort-bibtex-matches 'reverse-year - "Sorting of the entries found in BibTeX databases by reftex-citation. + "Sorting of the entries found in BibTeX databases by `reftex-citation'. Possible values: nil Do not sort entries. `author' Sort entries by author name. @@ -1364,7 +1365,7 @@ should return the string to insert into the buffer." :type '(choice (const nil) function)) (defcustom reftex-select-bib-mode-hook nil - "Mode hook for reftex-select-bib-mode." + "Mode hook for `reftex-select-bib-mode'." :group 'reftex-citation-support :type 'hook) @@ -1840,7 +1841,7 @@ upon the variable `reftex-initialize-temporary-buffers'." (defcustom reftex-initialize-temporary-buffers nil "Non-nil means do initializations even when visiting file temporarily. -When nil, RefTeX may turn off find-file hooks and other stuff to briefly +When nil, RefTeX may turn off `find-file' hooks and other stuff to briefly visit a file. When t, the full default initializations are done (find-file-hook etc.). Instead of t or nil, this variable may also be a list of hook functions to diff --git a/lisp/textmodes/texinfmt.el b/lisp/textmodes/texinfmt.el index 604a67df323..550994cd7b6 100644 --- a/lisp/textmodes/texinfmt.el +++ b/lisp/textmodes/texinfmt.el @@ -932,9 +932,9 @@ commands." "Text of the copyright notice and copying permissions.") (defun texinfo-copying () - "Copy the copyright notice and copying permissions from the Texinfo file, -as indicated by the @copying ... @end copying command; -insert the text with the @insertcopying command." + "Copy the copyright notice and copying permissions from Texinfo file. +This is indicated by the \"@copying ... @end copying\" command; +insert the text with the \"@insertcopying\" command." (let ((beg (progn (beginning-of-line) (point))) (end (progn (re-search-forward "^@end copying[ \t]*\n") (point)))) (setq texinfo-copying-text @@ -944,8 +944,8 @@ insert the text with the @insertcopying command." (delete-region beg end))) (defun texinfo-insertcopying () - "Insert the copyright notice and copying permissions from the Texinfo file, -which are indicated by the @copying ... @end copying command." + "Insert the copyright notice and copying permissions from Texinfo file. +This is indicated by the \"@copying ... @end copying\" command." (insert (concat "\n" texinfo-copying-text))) (put 'begin 'texinfo-format 'texinfo-format-begin) @@ -2546,7 +2546,9 @@ If used within a line, follow `@bullet' with braces." "smalllisp" "\\)") "Regexp specifying end of environments in which @kbd does not put `...' -around argument. (See `texinfo-format-kbd-regexp')") +around argument. + +See `texinfo-format-kbd-regexp'.") (put 'kbd 'texinfo-format 'texinfo-format-kbd) (defun texinfo-format-kbd () diff --git a/lisp/transient.el b/lisp/transient.el index 2be82f56d86..f3d3902a77e 100644 --- a/lisp/transient.el +++ b/lisp/transient.el @@ -1289,8 +1289,8 @@ variable instead.") (defvar transient--exitp nil "Whether to exit the transient.") (defvar transient--showp nil "Whether the transient is show in a popup buffer.") -(defvar transient--helpp nil "Whether help-mode is active.") -(defvar transient--editp nil "Whether edit-mode is active.") +(defvar transient--helpp nil "Whether `help-mode' is active.") +(defvar transient--editp nil "Whether `edit-mode' is active.") (defvar transient--active-infix nil "The active infix awaiting user input.") diff --git a/lisp/wdired.el b/lisp/wdired.el index eafb50cc18a..eb5a6385563 100644 --- a/lisp/wdired.el +++ b/lisp/wdired.el @@ -453,7 +453,7 @@ non-nil means return old filename." (remove-function (local 'revert-buffer-function) #'wdired-revert)) (defun wdired-abort-changes () - "Abort changes and return to dired mode." + "Abort changes and return to `dired-mode'." (interactive) (remove-hook 'before-change-functions #'wdired--before-change-fn t) (let ((inhibit-read-only t)) @@ -689,7 +689,7 @@ Optional arguments are ignored." ;; FIXME: Can't we use the normal mechanism for that? --Stef (if (and (buffer-modified-p) - (not (y-or-n-p "Buffer changed. Discard changes and kill buffer?"))) + (not (y-or-n-p "Buffer changed. Discard changes and kill buffer?"))) (error "Error"))) ;; Added to after-change-functions in wdired-change-to-wdired-mode to diff --git a/lisp/whitespace.el b/lisp/whitespace.el index 59d3249c5de..e193be6cdd2 100644 --- a/lisp/whitespace.el +++ b/lisp/whitespace.el @@ -565,8 +565,8 @@ Used when `whitespace-style' includes the value `space-before-tab'.") (defvar whitespace-indentation 'whitespace-indentation - "Symbol face used to visualize `tab-width' or more SPACEs at beginning of -line. Used when `whitespace-style' includes the value `indentation'.") + "Symbol face used to visualize `tab-width' or more SPACEs at beginning of line. +Used when `whitespace-style' includes the value `indentation'.") (make-obsolete-variable 'whitespace-indentation "use the face instead." "24.4") (defface whitespace-indentation @@ -2353,7 +2353,7 @@ Also refontify when necessary." (defun whitespace-display-vector-p (vec) - "Return true if every character in vector VEC can be displayed." + "Return non-nil if every character in vector VEC can be displayed." (let ((i (length vec))) (when (> i 0) (while (and (>= (setq i (1- i)) 0) diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index 9a34dc8d438..ab358da7e3f 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el @@ -190,7 +190,7 @@ the contents of strings." (buffer-enable-undo)) (defcustom widget-menu-max-size 40 - "Largest number of items allowed in a popup-menu. + "Largest number of items allowed in a popup menu. Larger menus are read through the minibuffer." :group 'widgets :type 'integer) @@ -202,9 +202,8 @@ For a larger number of items, the minibuffer is used." :type 'integer) (defcustom widget-menu-minibuffer-flag nil - "Control how to ask for a choice from the keyboard. -Non-nil means use the minibuffer; -nil means read a single character." + "Non-nil means use the minibuffer; to ask for a choice from the keyboard. +If nil, read a single character." :group 'widgets :type 'boolean) diff --git a/lisp/woman.el b/lisp/woman.el index fe9f8969c3e..1ca4d5e8716 100644 --- a/lisp/woman.el +++ b/lisp/woman.el @@ -1790,7 +1790,7 @@ Argument EVENT is the invoking mouse event." ;; That comment was moved after the symbol `woman-menu' to make ;; find-function-search-for-symbol work. -- rost woman-mode-map - "WoMan Menu" + "WoMan Menu." `("WoMan" ["WoMan..." woman t] ; [NAME CALLBACK ENABLE] "--" @@ -2182,7 +2182,7 @@ To be called on original buffer and any .so insertions." ;; variable. zsoelim is always run as the very first preprocessor. (defvar woman-emulate-tbl nil - "True if WoMan should emulate the tbl preprocessor. + "Non-nil if WoMan should emulate the tbl preprocessor. This applies to text between .TE and .TS directives. Currently set only from \\='\\\" t in the first line of the source file.") -- cgit v1.2.3 From 3478e64c88fe0187f49343ed778d7e9231cf5837 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 30 Sep 2021 20:11:43 +0300 Subject: Bump Emacs version to 29.0.50 * README: * configure.ac: * nt/README.W32: * msdos/sed2v2.inp: * src/msdos.c (internal_terminal_init): * etc/refcards/ru-refcard.tex: * etc/NEWS: Bump Emacs version to 29.0.50. * etc/NEWS.28: New file. * lisp/cus-edit.el (customize-changed-options-previous-release): Update the reference version of Emacs. --- README | 2 +- configure.ac | 2 +- etc/NEWS | 4527 +------------------------------------------ etc/refcards/ru-refcard.tex | 2 +- lisp/cus-edit.el | 2 +- msdos/sed2v2.inp | 2 +- nt/README.W32 | 2 +- src/msdos.c | 2 +- 8 files changed, 22 insertions(+), 4519 deletions(-) (limited to 'lisp/cus-edit.el') diff --git a/README b/README index a1d5e2dcef3..6329a7775e9 100644 --- a/README +++ b/README @@ -2,7 +2,7 @@ Copyright (C) 2001-2021 Free Software Foundation, Inc. See the end of the file for license conditions. -This directory tree holds version 28.0.50 of GNU Emacs, the extensible, +This directory tree holds version 29.0.50 of GNU Emacs, the extensible, customizable, self-documenting real-time display editor. The file INSTALL in this directory says how to build and install GNU diff --git a/configure.ac b/configure.ac index f151dd551dd..c4509a5859b 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ dnl along with GNU Emacs. If not, see . AC_PREREQ(2.65) dnl Note this is parsed by (at least) make-dist and lisp/cedet/ede/emacs.el. -AC_INIT(GNU Emacs, 28.0.50, bug-gnu-emacs@gnu.org, , https://www.gnu.org/software/emacs/) +AC_INIT(GNU Emacs, 29.0.50, bug-gnu-emacs@gnu.org, , https://www.gnu.org/software/emacs/) dnl Set emacs_config_options to the options of 'configure', quoted for the shell, dnl and then quoted again for a C string. Separate options with spaces. diff --git a/etc/NEWS b/etc/NEWS index b9f58306563..d0e41baaeb1 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -6,10 +6,10 @@ See the end of the file for license conditions. Please send Emacs bug reports to 'bug-gnu-emacs@gnu.org'. If possible, use 'M-x report-emacs-bug'. -This file is about changes in Emacs version 28. +This file is about changes in Emacs version 29. See file HISTORY for a list of GNU Emacs versions and release dates. -See files NEWS.27, NEWS.26, ..., NEWS.18, and NEWS.1-17 for changes +See files NEWS.28, NEWS.27, ..., NEWS.18, and NEWS.1-17 for changes in older Emacs versions. You can narrow news to a specific version by calling 'view-emacs-news' @@ -22,4528 +22,31 @@ When you add a new item, use the appropriate mark if you are sure it applies, and please also update docstrings as needed. -* Installation Changes in Emacs 28.1 - -** Emacs now optionally supports native compilation of Lisp files. -To enable this, configure Emacs with the '--with-native-compilation' option. -This requires the libgccjit library to be installed and functional, -and also requires GCC and Binutils to be available when Lisp code is -natively compiled. See the Info node "(elisp) Native Compilation" for -more details. - -If you build Emacs with native compilation, but without zlib, be sure -to configure with the '--without-compress-install' option, so that the -installed *.el files are not compressed; otherwise, you will not be -able to use JIT native compilation of the installed *.el files. - -** The Cairo graphics library is now used by default if present. -'--with-cairo' is now the default, if the appropriate development files -are found by 'configure'. Note that building with Cairo means using -Pango instead of libXFT for font support. Since Pango 1.44 has -removed support for bitmapped fonts, this may require you to adjust -your font settings. - -Note also that 'FontBackend' settings in ".Xdefaults" or -".Xresources", or 'font-backend' frame parameter settings in your init -files, may need to be adjusted, as 'xft' is no longer a valid backend -when using Cairo. Use 'ftcrhb' if your Emacs was built with HarfBuzz -text shaping support, and 'ftcr' otherwise. You can determine this by -checking 'system-configuration-features'. The 'ftcr' backend will -still be available when HarfBuzz is supported, but will not be used by -default. We strongly recommend building with HarBuzz support. 'x' is -still a valid backend. - ---- -** 'configure' now warns about building with libXft support. -libXft is unmaintained, and causes a number of problems with modern -fonts including but not limited to crashes; support for it may be -removed in a future version of Emacs. Please consider using -Cairo + HarfBuzz instead. - ---- -** 'configure' now warns about not using HarfBuzz if using Cairo. -We want to encourage people to use the most modern font features -available, and this is the Cairo graphics library + HarfBuzz for font -shaping, so 'configure' now recommends that combination. - ---- -** Building without double buffering support. -'configure --with-xdbe=no' can now be used to disable double buffering -at build time. - ---- -** Support for building with Motif has been removed. - ---- -** The configure option '--without-makeinfo' has been removed. -This was only ever relevant when building from a repository checkout. -This now requires makeinfo, which is part of the texinfo package. - ---- -** Support for building with '-fcheck-pointer-bounds' has been removed. -GCC has withdrawn the '-fcheck-pointer-bounds' option and support for -its implementation has been removed from the Linux kernel. - ---- -** The ftx font backend driver has been removed. -It was declared obsolete in Emacs 27.1. - ---- -** Emacs no longer supports old OpenBSD systems. -OpenBSD 5.3 and older releases are no longer supported, as they lack -proper pty support that Emacs needs. - - -* Startup Changes in Emacs 28.1 - ---- -** In GTK builds, Emacs now supports startup notification. -This means that Emacs won't steal keyboard focus upon startup -(when started via the Desktop) if the user is typing into another -application. - ---- -** Errors in 'kill-emacs-hook' no longer prevent Emacs from shutting down. -If a function in that hook signals an error in an interactive Emacs, -the user will be prompted on whether to continue. If the user doesn't -answer within five seconds, Emacs will continue shutting down anyway. - -** Emacs now supports loading a Secure Computing filter. -This is supported only on capable GNU/Linux systems. To activate, -invoke Emacs with the '--seccomp=FILE' command-line option. FILE must -name a binary file containing an array of 'struct sock_filter' -structures. Emacs will then install that list of Secure Computing -filters into its own process early during the startup process. You -can use this functionality to put an Emacs process in a sandbox to -avoid security issues when executing untrusted code. See the manual -page for 'seccomp' system call, for details about Secure Computing -filters. - -** Emacs can support 24-bit color TTY without terminfo database. -If your text-mode terminal supports 24-bit true color, but your system -lacks the terminfo database, you can instruct Emacs to support 24-bit -true color by setting 'COLORTERM=truecolor' in the environment. This is -useful on systems such as FreeBSD which ships only with "etc/termcap". - ---- -** File names given on the command line are now be pushed onto history. -The file names will be pushed onto 'file-name-history', like the names -of files visited via 'C-x C-f' and other commands. - - -* Changes in Emacs 28.1 - ---- -** Emacs now supports Unicode Standard version 14.0. - -+++ -** New character script 'emoji' has been created. -Various blocks of codepoints have been split out of the 'symbol' -script into their own 'emoji' script to allow easier specification of -their treatment. Which codepoints are treated as emoji is derived -from the Unicode specifications. Also, Emacs will now use "Noto Color -Emoji" by default for that script. Use: - -(set-fontset-font t 'emoji - '("My New Emoji Font" . "iso10646-1") nil 'prepend) - -to change the font used. - -+++ -** Zero Width Joiner (ZWJ) and emoji sequences are now composed. -Emacs can now compose (almost) all the Unicode-14 ZWJ and emoji -sequences (if a suitable font is installed) so that they are displayed -as single glyphs instead of multiple ones. 'Noto Color Emoji' is one -such suitable font. - -+++ -** Composition of emoji has been improved. -If autocomposition is triggered by an emoji character, then the emoji -font is now used to check if composition can be performed, rather than -the font of the first character of the string being composed. This -allows e.g. - -'Emoji codepoint' + VS-16 - -to be displayed using the emoji font even if 'Emoji codepoint' does -not have emoji presentation by default. - -+++ -** 'glyphless-char-display-control' now applies to Variation Selectors. -VS-1 through VS-16 are now displayed as 'thin-space' by default when -not composed. - -+++ -** New command 'execute-extended-command-for-buffer'. -This new command, bound to 'M-S-x', works like -'execute-extended-command', but limits the set of commands to the -commands that have been determined to be particularly useful with the -current mode. - -+++ -** New user option 'read-extended-command-predicate'. -This user option controls how 'M-x' performs completion of commands when -you type 'TAB'. By default, any command that matches what you have -typed is considered a completion candidate, but you can customize this -option to exclude commands that are not applicable to the current -buffer's major and minor modes, and respect the command's completion -predicate (if any). - -+++ -** Completion on 'M-x' shows key bindings for commands. -When 'suggest-key-bindings' is non-nil (as it is by default), the -completion list popped up by 'M-x' shows the key bindings for all the -commands shown in the list of candidate completions that have a key -binding. - -+++ -** New user option 'completions-detailed'. -When non-nil, some commands like 'describe-symbol' show more detailed -completions with more information in completion prefix and suffix. -The default is nil. - ---- -** 'C-s' in 'M-x' now once again searches over completions. -In Emacs 23, typing 'M-x' ('read-extended-command') and then 'C-s' (to -do an interactive search) would search over possible completions. -This was lost in Emacs 24, but is now back again. - ---- -** User option 'completions-format' supports a new value 'one-column'. - -+++ -** New system for displaying documentation for groups of functions. -This can either be used by saying 'M-x shortdoc-display-group' and -choosing a group, or clicking a button in the "*Help*" buffers when -looking at the doc string of a function that belongs to one of these -groups. - -+++ -** New minor mode 'context-menu-mode' for context menus popped by 'mouse-3'. -When this mode is enabled, clicking 'down-mouse-3' anywhere in the buffer -pops up a menu whose contents depends on surrounding context near the -mouse click. You can change the order of the default sub-menus in the -context menu by customizing the user option 'context-menu-functions'. -You can also invoke the context menu by pressing 'S-' or, -on macOS, by clicking 'C-down-mouse-1'. - -+++ -** A new keymap for buffer actions has been added. -The 'C-x x' keymap now holds keystrokes for various buffer-oriented -commands. The new keystrokes are 'C-x x g' ('revert-buffer-quick'), -'C-x x r' ('rename-buffer'), 'C-x x u' ('rename-uniquely'), 'C-x x n' -('clone-buffer'), 'C-x x i' ('insert-buffer'), 'C-x x t' -('toggle-truncate-lines') and 'C-x x f' ('font-lock-update'). - -+++ -** Modifiers now go outside angle brackets in pretty-printed key bindings. -For example, 'RET' with Control and Meta modifiers is now shown as -'C-M-' instead of ''. Either variant can be used -as input; functions such as 'kbd' and 'read-kbd-macro' accept both -styles as equivalent (they have done so for a long time). - ---- -** 'eval-expression' no longer signals an error on incomplete expressions. -Previously, typing 'M-: ( RET' would result in Emacs saying "End of -file during parsing" and dropping out of the minibuffer. The user -would have to type 'M-: M-p' to edit and redo the expression. Now -Emacs will echo the message and allow the user to continue editing. - -+++ -** 'eval-last-sexp' now handles 'defvar'/'defcustom'/'defface' specially. -This command would previously not redefine values defined by these -forms, but this command has now been changed to work more like -'eval-defun', and reset the values as specified. - ---- -** New user option 'use-short-answers'. -When non-nil, the function 'y-or-n-p' is used instead of -'yes-or-no-p'. This eliminates the need to define an alias that maps -one to another in the init file. The same user option also controls -whether the function 'read-answer' accepts short answers. - -+++ -** New user option 'kill-buffer-delete-auto-save-files'. -If non-nil, killing a buffer that has an auto-save file will prompt -the user for whether that file should be deleted. (Note that -'delete-auto-save-files', if non-nil, was previously documented to -result in deletion of auto-save files when killing a buffer without -unsaved changes, but this has apparently not worked for several -decades, so the documented semantics of this variable has been changed -to match the behavior.) - -+++ -** New user option 'next-error-message-highlight'. -In addition to a fringe arrow, 'next-error' error may now optionally -highlight the current error message in the 'next-error' buffer. -This user option can be also customized to keep highlighting on all -visited errors, so you can have an overview what errors were already visited. - ---- -** New choice 'next-error-quit-window' for 'next-error-found-function'. -When 'next-error-found-function' is customized to 'next-error-quit-window', -then typing the numeric prefix argument 0 before the command 'next-error' -will quit the source window after visiting the next occurrence. - -+++ -** New user option 'file-preserve-symlinks-on-save'. -This controls what Emacs does when saving buffers that visit files via -symbolic links, and 'file-precious-flag' is non-nil. - -+++ -** New user option 'copy-directory-create-symlink'. -If non-nil, will make 'copy-directory' (when used on a symbolic -link) copy the link instead of following the link. The default is -nil, so the default behavior is unchanged. - -+++ -** New user option 'ignored-local-variable-values'. -This is the opposite of 'safe-local-variable-values' -- it's an alist -of variable-value pairs that are to be ignored when reading a -local-variables section of a file. - ---- -** Specific warnings can now be disabled from the warning buffer. -When a warning is displayed to the user, the resulting buffer now has -buttons which allow making permanent changes to the treatment of that -warning. Automatic showing of the warning can be disabled (although -it is still logged to the "*Messages*" buffer), or the warning can be -disabled entirely. - -+++ -** ".dir-locals.el" now supports setting 'auto-mode-alist'. -The new 'auto-mode-alist' specification in ".dir-locals.el" files can -now be used to override the global 'auto-mode-alist' in the current -directory tree. - ---- -** User option 'uniquify-buffer-name-style' can now be a function. -This user option can be one of the predefined styles or a function to -personalize the uniquified buffer name. - ---- -** 'remove-hook' is now an interactive command. - ---- -** 'expand-file-name' now checks for null bytes in filenames. -The function will now check for null bytes in both NAME and -DEFAULT-DIRECTORY arguments, as well as in the 'default-directory' -buffer-local variable, when its value is used. If null bytes are -found, 'expand-file-name' will signal an error. -This means that practically all file-related operations will now check -file names for null bytes, thus avoiding subtle bugs with silently -using only the part of file name up to the first null byte. - ---- -** Frames - -+++ -*** The key prefix 'C-x 5 5' displays next command buffer in a new frame. -It's bound to the command 'other-frame-prefix' that requests the buffer -of the next command to be displayed in a new frame. - -+++ -*** New command 'clone-frame' (bound to 'C-x 5 c'). -This is like 'C-x 5 2', but uses the frame parameters of the current -frame instead of 'default-frame-alist'. - ---- -*** Default values of 'frame-title-format' and 'icon-title-format' have changed. -These variables are used to display the title bar of visible frames -and the title bar of an iconified frame. They now show the name of -the current buffer and the text "GNU Emacs" instead of the value of -'invocation-name'. To get the old behavior back, add the following to -your init file: - - (setq frame-title-format '(multiple-frames "%b" - ("" invocation-name "@" system-name))) - -+++ -*** New frame parameter 'drag-with-tab-line'. -This parameter, similar to 'drag-with-header-line', allows moving frames -by dragging the tab lines of their topmost windows with the mouse. - -+++ -*** New optional behavior of 'delete-other-frames'. -When invoked with a prefix argument, 'delete-other-frames' now -iconifies frames, rather than deleting them. - ---- -*** Commands 'set-frame-width' and 'set-frame-height' now prompt for values. -These commands now prompt for the value via the minibuffer, instead of -requiring the user to specify the value via the prefix argument. - -** Windows - -*** The key prefix 'C-x 4 1' displays next command buffer in the same window. -It's bound to the command 'same-window-prefix' that requests the buffer -of the next command to be displayed in the same window. - -*** The key prefix 'C-x 4 4' displays next command buffer in a new window. -It's bound to the command 'other-window-prefix' that requests the buffer -of the next command to be displayed in a new window. - -+++ -*** New command 'recenter-other-window', bound to 'S-M-C-l'. -Like 'recenter-top-bottom' acting on the other window. - -+++ -*** New user option 'delete-window-choose-selected'. -This allows to choose a window that will be the frame's selected -window after deleting the currently selected one. - -+++ -*** New argument NO-OTHER for some window functions. -'get-lru-window', 'get-mru-window' and 'get-largest-window' now accept a -new optional argument NO-OTHER which, if non-nil, avoids returning a -window whose 'no-other-window' parameter is non-nil. - -+++ -*** New 'display-buffer' function 'display-buffer-use-least-recent-window'. -This is like 'display-buffer-use-some-window', but won't reuse the -current window, and when called repeatedly will try not to reuse a -previously selected window. - -+++ -*** New function 'window-bump-use-time'. -This updates the use time of a window. - -** Minibuffer - -+++ -*** Minibuffer scrolling is now conservative by default. -This is controlled by the new variable 'scroll-minibuffer-conservatively'. -It is t by default; setting it to nil will cause scrolling in the -minibuffer obey the value of 'scroll-conservatively'. - -+++ -*** Improved handling of minibuffers on switching frames. -By default, when you switch to another frame, an active minibuffer now -moves to the newly selected frame. Nevertheless, the effect of what -you type in the minibuffer happens in the frame where the minibuffer -was first activated. An alternative behavior is available by -customizing 'minibuffer-follows-selected-frame' to nil. Here, the -minibuffer stays in the frame where you first opened it, and you must -switch back to this frame to continue or abort its command. The old -behavior, which mixed these two, can be approximated by customizing -'minibuffer-follows-selected-frame' to a value which is neither nil -nor t. - -+++ -*** New user option 'read-minibuffer-restore-windows'. -When customized to nil, it uses 'minibuffer-restore-windows' in -'minibuffer-exit-hook' to remove only the window showing the -"*Completions*" buffer. - ---- -*** New variable 'redisplay-adhoc-scroll-in-resize-mini-windows'. -Customizing it to nil will disable the ad-hoc auto-scrolling of -minibuffer text shown in mini-windows when resizing those windows. -The default heuristics of that scrolling can be counter productive in -some corner cases, though the cure might be worse than the disease. -This said, the effect should be negligible in the vast majority of -cases anyway. - -** Mode Line - -+++ -*** New user option 'mode-line-compact'. -If non-nil, repeating spaces are compressed into a single space. If -'long', this is only done when the mode line is longer than the -current window width (in columns). - -+++ -*** New user options to control format of line/column numbers in the mode line. -'mode-line-position-line-format' is the line number format (when -'line-number-mode' is on), 'mode-line-position-column-format' is -the column number format (when 'column-number-mode' is on), and -'mode-line-position-column-line-format' is the combined format (when -both modes are on). - -** Tab Bars and Tab Lines - -+++ -*** The prefix key 'C-x t t' can be used to display a buffer in a new tab. -Typing 'C-x t t' before a command will cause the buffer shown by that -command to be displayed in a new tab. 'C-x t t" is bound to the -command 'other-tab-prefix'. - -+++ -*** New command 'C-x t C-r' to open file read-only in the other tab. - -*** The tab bar now supports more mouse commands. -Clicking 'mouse-2' closes the tab, 'mouse-3' displays the context menu -with items that operate on the clicked tab. Dragging the tab with -'mouse-1' moves it to another position on the tab bar. Mouse wheel -scrolling switches to the previous/next tab, and holding the Shift key -during scrolling moves the tab to the left/right. - ---- -*** Frame-specific appearance of the tab bar when 'tab-bar-show' is a number. -When 'tab-bar-show' is a number, the tab bar on different frames can -be shown or hidden independently, as determined by the number of tabs -on each frame compared to the numerical value of 'tab-bar-show'. - ---- -*** New command 'toggle-frame-tab-bar'. -It can be used to enable/disable the tab bar on the currently selected -frame regardless of the values of 'tab-bar-mode' and 'tab-bar-show'. -This allows to enable/disable the tab bar independently on different -frames. - ---- -*** New user option 'tab-bar-format' defines a list of tab bar items. -When it contains 'tab-bar-format-global' (possibly appended after -'tab-bar-format-align-right'), then after enabling 'display-time-mode' -(or any other mode that uses 'global-mode-string') it displays time -aligned to the right on the tab bar instead of on the mode line. -When 'tab-bar-format-tabs' is replaced with 'tab-bar-format-tabs-groups', -the tab bar displays tab groups. - ---- -*** New optional key binding for 'tab-last'. -If you customize the user option 'tab-bar-select-tab-modifiers' for -selecting tabs using its index numbers, the '-9' key is -bound to 'tab-last', and switches to the last tab. Here is -any of the modifiers in the list that is the value of -'tab-bar-select-tab-modifiers'. You can also use negative indices, -which count from the last tab: -1 is the last tab, -2 the one before -that, etc. - ---- -*** New command 'tab-duplicate' bound to 'C-x t n'. - ---- -*** 'C-x t N' creates a new tab at the specified absolute position. -The position is provided as prefix arg, and specifies an index that -starts at 1. Negative values count from the end of the tab bar. - ---- -*** 'C-x t M' moves the current tab to the specified absolute position. -The position is provided as prefix arg, whose interpretation is as in -'C-x t N'. - ---- -*** 'C-x t G' assigns a tab to a named group of tabs. -'tab-close-group' closes all tabs that belong to the selected group. -The user option 'tab-bar-new-tab-group' defines the default group of -new tabs. After customizing 'tab-bar-tab-post-change-group-functions' -to 'tab-bar-move-tab-to-group', changing the group of a tab will also -move it closer to other tabs in the same group. - ---- -*** New user option 'tab-bar-tab-name-format-function'. - ---- -*** New user option 'tab-line-tab-name-format-function'. - ---- -*** The tabs in the tab line can now be scrolled using horizontal scroll. -If your mouse or trackpad supports it, you can now scroll tabs when -the mouse pointer is in the tab line by scrolling left or right. - ---- -*** New tab-line faces and options. -The face 'tab-line-tab-special' is used for tabs whose buffers are -special, i.e. buffers that don't visit a file. The face -'tab-line-tab-modified' is used to display modified, file-backed -buffers. The face 'tab-line-tab-inactive-alternate' is used to -display inactive tabs with an alternating background color, making -them easier to distinguish, especially if the face 'tab-line-tab' is -configured to not display with a box; this alternate face is only -applied when the option 'tab-line-tab-face-functions' is so -configured. That option may also be used to customize tab-line faces -in other ways. - -** Mouse wheel - ---- -*** Mouse wheel scrolling now defaults to one line at a time. - ---- -*** Mouse wheel scrolling now works on more parts of frame's display. -When using 'mwheel-mode', the mouse wheel will now scroll also when -the mouse cursor is on the scroll bars, fringes, margins, header line, -and mode line. ('mwheel-mode' is enabled by default on most graphical -displays.) - -+++ -*** Mouse wheel scrolling with Shift modifier now scrolls horizontally. -This works in text buffers and over images. Typing a numeric prefix arg -(e.g. 'M-5') before starting horizontal scrolling changes its step value. -The value is saved in the user option 'mouse-wheel-scroll-amount-horizontal'. - -** Customize - ---- -*** Customize buffers can now be reverted with 'C-x x g'. - ---- -*** Most customize commands now hide obsolete user options. -Obsolete user options are no longer shown in the listings produced by -the commands 'customize', 'customize-group', 'customize-apropos' and -'customize-changed'. - -To customize obsolete user options, use 'customize-option' or -'customize-saved'. - ---- -*** New SVG icons for checkboxes and arrows. -They will be used automatically instead of the old icons. If Emacs is -built without SVG support, the old icons will be used instead. - -** Help - ---- -*** The order things are displayed in the *Help* buffer has been changed. -The indented "administrative" block (containing the "probably -introduced" and "other relevant functions" (and similar things) has -been moved to after the doc string. - -+++ -*** New command 'describe-command' shows help for a command. -This can be used instead of 'describe-function' for interactive -commands and is globally bound to 'C-h x'. - -+++ -*** New command 'describe-keymap' describes keybindings in a keymap. - ---- -*** New command 'apropos-function'. -This works like 'C-u M-x apropos-command' but is more discoverable. - ---- -*** New keybinding 'C-h R' prompts for an Info manual and displays it. - ---- -*** Keybindings in 'help-mode' use the new 'help-key-binding' face. -This face is added by 'substitute-command-keys' to any "\[command]" -substitution. The return value of that function should consequently -be assumed to be a propertized string. - -Note that the new face will also be used in tooltips. When using the -GTK toolkit, this is only true if 'x-gtk-use-system-tooltips' is t. - -+++ -*** New user option 'help-enable-symbol-autoload'. -If non-nil, displaying help for an autoloaded function whose -'autoload' form provides no documentation string will try to load the -file it's from. This will give more extensive help for such -functions. - ---- -*** The 'help-for-help' ('C-h C-h') screen has been redesigned. - -+++ -*** New convenience commands with short keys in the Help buffer. -New command 'help-view-source' ('s') will view the source file (if -any) of the current help topic. New command 'help-goto-info' ('i') -will look up the current symbol (if any) in Info. New command -'help-customize' ('c') will customize the user option or the face -(if any) whose doc string is being shown in the Help buffer. - ---- -*** New user option 'describe-bindings-outline'. -It enables outlines in the output buffer of 'describe-bindings' that -can provide a better overview in a long list of available bindings. - -+++ -*** New command 'lossage-size'. -It allows users to change the maximum number of keystrokes and -commands recorded for the purpose of 'view-lossage'. - -+++ -*** New commands to describe buttons and widgets. -'widget-describe' (on a widget) will pop up a help buffer and give a -description of the properties. Likewise 'button-describe' does the -same for a button. - ---- -*** Improved "find definition" feature of "*Help*" buffers. -Now clicking on the link to find the definition of functions generated -by 'cl-defstruct', or variables generated by 'define-derived-mode', -for example, will go to the exact place where they are defined. - ---- -*** New commands 'apropos-next-symbol' and 'apropos-previous-symbol'. -These new navigation commands are bound to 'n' and 'p' in -'apropos-mode'. - ---- -*** The command 'view-lossage' can now be invoked from the menu bar. -The menu bar "Help" menu now has a "Show Recent Inputs" item under the -"Describe" sub-menu. - ---- -*** Closing the "*Help*" buffer from the toolbar now buries the buffer. -In previous Emacs versions, the "*Help*" buffer was killed instead when -clicking the "X" icon in the tool bar. - ---- -*** 'g' ('revert-buffer') in 'help-mode' no longer requires confirmation. - -** File Locks - -+++ -*** New user option 'lock-file-name-transforms'. -This option allows controlling where lock files are written. It uses -the same syntax as 'auto-save-file-name-transforms'. - -+++ -*** New user option 'remote-file-name-inhibit-locks'. -When non-nil, this option suppresses lock files for remote files. - -+++ -*** New minor mode 'lock-file-mode'. -This command, called interactively, toggles the local value of -'create-lockfiles' in the current buffer. - -** Emacs Server - -+++ -*** New user option 'server-client-instructions'. -When emacsclient connects, Emacs will (by default) output a message -about how to exit the client frame. If 'server-client-instructions' -is set to nil, this message is inhibited. - -+++ -*** New command 'server-edit-abort'. -This command (not bound to any key by default) can be used to abort -an edit instead of marking it as "Done" (which the 'C-x #' command -does). The 'emacsclient' program exits with an abnormal status as -result of this command. - -+++ -*** New desktop integration for connecting to the server. -If your operating system’s desktop environment is -freedesktop.org-compatible (which is true of most GNU/Linux and other -recent Unix-like desktops), you may use the new "Emacs (Client)" -desktop menu entry to open files in an existing Emacs instance rather -than starting a new one. The daemon starts if it is not already -running. - -** Miscellaneous - -+++ -*** New command 'font-lock-update', bound to 'C-x x f'. -This command updates the syntax highlighting in this buffer. - -+++ -*** New command 'memory-report'. -This command opens a new buffer called "*Memory Report*" and gives a -summary of where Emacs is using memory currently. - -+++ -*** New command 'submit-emacs-patch'. -This works like 'report-emacs-bug', but is more geared towards sending -patches to the Emacs issue tracker. - ---- -*** New face 'apropos-button'. -Applies to buttons that indicate a face. - -+++ -*** New face 'font-lock-doc-markup-face'. -Intended for documentation mark-up syntax and tags inside text that -uses 'font-lock-doc-face', with which it should harmonize. It would -typically be used in structured documentation comments in program -source code by language-specific modes, for mark-up conventions like -Haddock, Javadoc or Doxygen. By default this face inherits from -'font-lock-constant-face'. - -+++ -*** New face 'flat-button'. -This is a plain 2D button, but uses the background color instead of -the foreground color. - ---- -*** New face 'shortdoc-heading'. -Applies to headings of shortdoc sections. - ---- -*** New face 'separator-line'. -This is used by 'make-separator-line' (see below). - -+++ -*** 'redisplay-skip-fontification-on-input' helps Emacs keep up with fast input. -This is another attempt to solve the problem of handling high key repeat rate -and other "slow scrolling" situations. It is hoped it behaves better -than 'fast-but-imprecise-scrolling' and 'jit-lock-defer-time'. -It is not enabled by default. - ---- -*** Obsolete aliases are no longer hidden from command completion. -Completion of command names now considers obsolete aliases as -candidates, if they were marked obsolete in the current major version -of Emacs. Invoking a command via an obsolete alias now mentions the -obsolescence fact and shows the new name of the command. - -+++ -*** Support for '(box . SIZE)' 'cursor-type'. -By default, 'box' cursor always has a filled box shape. But if you -specify 'cursor-type' to be '(box . SIZE)', the cursor becomes a hollow -box if the point is on an image larger than SIZE pixels in any -dimension. - -+++ -*** The user can now customize how "default" values are prompted for. -The new utility function 'format-prompt' has been added which uses the -new 'minibuffer-default-prompt-format' user option to format "default" -prompts. This means that prompts that look like "Enter a number -(default 10)" can be customized to look like, for instance, "Enter a -number [10]", or not have the default displayed at all, like "Enter a -number". (This only affects callers that were altered to use -'format-prompt'.) - ---- -*** New help window when Emacs prompts before opening a large file. -Commands like 'find-file' or 'visit-tags-table' ask to visit a file -normally or literally when the file is larger than a certain size (by -default, 9.5 MiB). Press '?' or 'C-h' in that prompt to read more -about the different options to visit a file, how you can disable the -prompt, and how you can tweak the file size threshold. - -+++ -*** Emacs now defaults to UTF-8 instead of ISO-8859-1. -This is only for the default, where the user has set no 'LANG' (or -similar) variable or environment. This change should lead to no -user-visible changes for normal usage. - ---- -*** 'global-display-fill-column-indicator-mode' skips some buffers. -By default, turning on 'global-display-fill-column-indicator-mode' -doesn't turn on 'display-fill-column-indicator-mode' in special-mode -buffers. This can be controlled by customizing the user option -'global-display-fill-column-indicator-modes'. - -+++ -*** 'nobreak-char-display' now also affects all non-ASCII space characters. -Previously, this was limited only to 'NO-BREAK SPACE' and hyphen -characters. Now it also covers the rest of the non-ASCII Unicode -space characters. - -+++ -*** Improved support for terminal emulators that encode the Meta flag. -Some terminal emulators set the 8th bit of Meta characters, and then -encode the resulting character code as if it were non-ASCII character -above codepoint 127. Previously, the only way of using these in Emacs -was to set up the terminal emulator to use the 'ESC' characters to send -Meta characters to Emacs, e.g., send "ESC x" when the user types -'M-x'. You can now avoid the need for this setup of such terminal -emulators by using the new input-meta-mode with the special value -'encoded' with these terminal emulators. - ---- -*** 'auto-composition-mode' can now be selectively disabled on some TTYs. -Some text-mode terminals produce display glitches trying to compose -characters. The 'auto-composition-mode' can now have a string value -that names a terminal type; if the value returned by the 'tty-type' -function compares equal with that string, automatic composition will -be disabled in windows shown on that terminal. The Linux terminal -sets this up by default. - ---- -*** Support for the 'strike-through' face attribute on TTY frames. -If your terminal's termcap or terminfo database entry has the 'smxx' -capability defined, Emacs will now emit the prescribed escape -sequences necessary to render faces with the 'strike-through' -attribute on TTY frames. - ---- -*** TTY menu navigation is now supported in 'xterm-mouse-mode'. -TTY menus support mouse navigation and selection when 'xterm-mouse-mode' -is active. When run on a terminal, clicking on the menu bar with the -mouse now pops up a TTY menu by default instead of running the command -'tmm-menubar'. To restore the old behavior, set the user option -'tty-menu-open-use-tmm' to non-nil. - ---- -*** 'M-x report-emacs-bug' will no longer include "Recent messages" section. -These were taken from the "*Messages*" buffer, and may inadvertently -leak information from the reporting user. - ---- -*** 'C-u M-x dig' will now prompt for a query type to use. - ---- -*** Rudimentary support for the 'st' terminal emulator. -Emacs now supports 256 color display on the 'st' terminal emulator. - -+++ -*** Update IRC-related references to point to Libera.Chat. -The Free Software Foundation and the GNU Project have moved their -official IRC channels from the Freenode network to Libera.Chat. For the -original announcement and the follow-up update, including more details, -see: - -https://lists.gnu.org/archive/html/info-gnu/2021-06/msg00005.html -https://lists.gnu.org/archive/html/info-gnu/2021-06/msg00007.html - -Given the relocation of GNU and FSF's official IRC channels, as well -as #emacs and various other Emacs-themed channels (see the link below) -to Libera.Chat, IRC-related references in the Emacs repository have -now been updated to point to Libera.Chat. - -https://lists.gnu.org/archive/html/info-gnu-emacs/2021-06/msg00000.html - - -* Editing Changes in Emacs 28.1 - -** Input methods - -+++ -*** Emacs now supports "transient" input methods. -A transient input method is enabled for inserting a single character, -and is then automatically disabled. 'C-x \' temporarily enables the -selected transient input method. Use 'C-u C-x \' to select a -transient input method (which can be different from the input method -enabled by 'C-\'). For example, 'C-u C-x \ compose RET' selects the -'compose' input method; then typing 'C-x \ 1 2' will insert the -character '½', and disable the 'compose' input method afterwards. -You can use 'C-x \' in incremental search to insert a single character -to the search string. - ---- -*** New input method 'compose' based on X Multi_key sequences. - ---- -*** New input method 'iso-transl' with the same keys as 'C-x 8'. -After selecting it as a transient input method with 'C-u C-x \ -iso-transl RET', it supports the same key sequences as 'C-x 8', -so e.g. like 'C-x 8 [' inserts a left single quotation mark, -'C-x \ [' does the same. - ---- -*** New user option 'read-char-by-name-sort'. -It defines the sorting order of characters for completion of 'C-x 8 RET TAB' -and can be customized to sort them by codepoints instead of character names. -Additionally, you can group characters by Unicode blocks after customizing -'completions-group' and 'completions-group-sort'. - ---- -*** Improved language transliteration in Malayalam input methods. -Added a new Mozhi scheme. The inapplicable ITRANS scheme is now -deprecated. Errors in the Inscript method were corrected. - ---- -*** New input method 'cham'. -There's also a Cham greeting in "etc/HELLO". - ---- -*** New input methods for Lakota language orthographies. -Two orthographies are represented here, the Suggested Lakota -Orthography and what is known as the White Hat Orthography. Input -methods 'lakota-slo-prefix', 'lakota-slo-postfix', and -'lakota-white-hat-postfix' have been added. There is also a Lakota -greeting in "etc/HELLO". - -+++ -** Standalone 'M-y' allows interactive selection from previous kills. -'M-y' can now be typed after a command that is not a yank command. -When invoked like that, it prompts in the minibuffer for one of the -previous kills, offering completion and minibuffer-history navigation -through previous kills recorded in the kill ring. A similar feature -in Isearch can be invoked if you bind 'C-s M-y' to the command -'isearch-yank-pop'. When the user option 'yank-from-kill-ring-rotate' -is nil the kill ring is not rotated after 'yank-from-kill-ring'. - -+++ -** New user option 'word-wrap-by-category'. -When word-wrap is enabled, and this option is non-nil, that allows -Emacs to break lines after more characters than just whitespace -characters. In particular, this significantly improves word-wrapping -for CJK text mixed with Latin text. - -+++ -** New command 'undo-redo'. -It undoes previous undo commands, but doesn't record itself as an -undoable command. It is bound to 'C-?' and 'C-M-_', the first binding -works well in graphical mode, and the second one is easy to hit on tty. - -For full conventional undo/redo behavior, you can also customize the -user option 'undo-no-redo' to t. - -+++ -** New commands 'copy-matching-lines' and 'kill-matching-lines'. -These commands are similar to the command 'flush-lines', -but add the matching lines to the kill ring as a single string, -including the newlines that separate the lines. - -+++ -** New user option 'kill-transform-function'. -This can be used to transform (and suppress) strings from entering the -kill ring. - -+++ -** 'save-interprogram-paste-before-kill' can now be a number. -In that case, it's interpreted as a limit on the size of the clipboard -data that will be saved to the 'kill-ring' prior to killing text: if -the size of the clipboard data is greater than or equal to the limit, -it will not be saved. - -+++ -** New user option 'tab-first-completion'. -If 'tab-always-indent' is 'complete', this new user option can be used to -further tweak whether to complete or indent. - ---- -** 'indent-tabs-mode' is now a global minor mode instead of just a variable. - ---- -** New choice 'permanent' for 'shift-select-mode'. -When the mark was activated by shifted motion keys, non-shifted motion -keys don't deactivate the mark after customizing 'shift-select-mode' -to 'permanent'. - -+++ -** The "Edit => Clear" menu item now obeys a rectangular region. - -+++ -** New command 'revert-buffer-with-fine-grain'. -Revert a buffer trying to be as non-destructive as possible, -preserving markers, properties and overlays. The new variable -'revert-buffer-with-fine-grain-max-seconds' specifies the maximum -number of seconds that 'revert-buffer-with-fine-grain' should spend -trying to be non-destructive, with a default value of 2 seconds. - -+++ -** New command 'revert-buffer-quick'. -This is bound to 'C-x x g' and is like 'revert-buffer', but prompts -less. - -+++ -** New user option 'revert-buffer-quick-short-answers'. -This controls how the new 'revert-buffer-quick' ('C-x x g') command -prompts. - -+++ -** New user option 'query-about-changed-file'. -If non-nil (the default), Emacs prompts as before when re-visiting a -file that has changed externally after it was visited the first time. -If nil, Emacs does not prompt, but instead shows the buffer with its -contents before the change, and provides instructions how to revert -the buffer. - ---- -** New value 'save-some-buffers-root' of 'save-some-buffers-default-predicate'. -When using this predicate, only buffers under the current project root -will be considered when saving buffers with 'save-some-buffers'. - ---- -** New user option 'save-place-abbreviate-file-names'. -This can simplify sharing the 'save-place-file' file across -different hosts. - ---- -** New user options 'copy-region-blink-delay' and 'delete-pair-blink-delay'. -'copy-region-blink-delay' specifies a delay to indicate the region -copied by 'kill-ring-save'. 'delete-pair-blink-delay' specifies -a delay to show the paired character to delete. - ---- -** 'zap-up-to-char' now uses 'read-char-from-minibuffer'. -This allows navigating through the history of characters that have -been input. This is mostly useful for characters that have complex -input methods where inputting the character again may involve many -keystrokes. - -+++ -** Input history for 'goto-line' can now be made local to every buffer. -In any event, line numbers used with 'goto-line' are kept in their own -history list. This should help make faster the process of finding -line numbers that were previously jumped to. By default, all buffers -share a single history list. To make every buffer have its own -history list, customize the user option 'goto-line-history-local'. - -+++ -** New command 'goto-line-relative' for use in a narrowed buffer. -It moves point to the line relative to the accessible portion of the -narrowed buffer. 'M-g M-g' in Info is rebound to this command. -When 'widen-automatically' is non-nil, 'goto-line' widens the narrowed -buffer to be able to move point to the inaccessible portion. -'goto-line-relative' is bound to 'C-x n g'. - -+++ -** 'got-char' prompts for the character position. -When called interactively, 'goto-char' now offers the position at -point as the default. - -** Autosaving via 'auto-save-visited-mode' can now be inhibited. -Set the variable 'auto-save-visited-mode' buffer-locally to nil to -achieve that. - -+++ -** New command 'kdb-macro-redisplay' to force redisplay in keyboard macros. -This command is bound to 'C-x C-k d'. - ---- -** 'blink-cursor-mode' is now enabled by default regardless of the UI. -It used to be enabled when Emacs is started in GUI mode but not when started -in text mode. The cursor still only actually blinks in GUI frames. - -** 'show-paren-mode' is now enabled by default. -To go back to the previous behavior, customize the user option by the -same name to nil. - -+++ -** New minor mode 'show-paren-local-mode'. -It serves as a local counterpart for 'show-paren-mode', allowing you -to toggle it separately in different buffers. To use it only in -programming modes, for example, add the following to your init file: - -(add-hook 'prog-mode-hook #'show-paren-local-mode) - - -* Changes in Specialized Modes and Packages in Emacs 28.1 - -** Isearch and Replace - -+++ -*** Interactive regular expression search now uses faces for sub-groups. -E.g., 'C-M-s foo-\([0-9]+\)' will now use the 'isearch-group-1' face -on the part of the regexp that matches the sub-expression "[0-9]+". -By default, there are two faces for sub-group highlighting, but you -can define more faces whose names are of the form 'isearch-group-N', -where N are successive numbers above 2. - -This is controlled by the 'search-highlight-submatches' user option. -This feature is available only on terminals that have enough colors to -distinguish between sub-expression highlighting. - -+++ -*** Interactive regular expression replace now uses faces for sub-groups. -Like 'search-highlight-submatches', this is controlled by the new user option -'query-replace-highlight-submatches'. - -+++ -*** New user option 'isearch-wrap-pause' defines how to wrap the search. -There are choices to disable wrapping completely and to wrap immediately. -When wrapping immediately, it consistently handles the numeric arguments -of 'C-s' ('isearch-repeat-forward') and 'C-r' ('isearch-repeat-backward'), -continuing with the remaining count after wrapping. - -+++ -*** New user option 'isearch-repeat-on-direction-change'. -When this option is set, direction changes in Isearch move to another -search match, if there is one, instead of moving point to the other -end of the current match. - -*** New key 'M-s M-.' starts isearch looking for the thing at point. -This key is bound to the new command 'isearch-forward-thing-at-point'. -The new user option 'isearch-forward-thing-at-point' defines -a list of symbols to try to get the "thing" at point. By default, -the first element of the list is 'region' that tries to yank -the currently active region to the search string. - -+++ -*** New user option 'lazy-highlight-no-delay-length'. -Lazy highlighting of matches in Isearch now starts immediately if the -search string is at least this long. 'lazy-highlight-initial-delay' -still applies for shorter search strings, which avoids flicker in the -search buffer due to too many matches being highlighted. - ---- -*** The default 'search-whitespace-regexp' value has changed. -This used to be "\\s-+", which meant that it was mode-dependent whether -newlines were included in the whitespace set. This has now been -changed to only match spaces and tab characters. - -** Dired - -+++ -*** New user option 'dired-kill-when-opening-new-dired-buffer'. -If non-nil, Dired will kill the current buffer when selecting a new -directory to display. - -+++ -*** Behavior change on 'dired-do-chmod'. -As a security precaution, Dired's M command no longer follows symbolic -links. Instead, it changes the symbolic link's own mode; this always -fails on platforms where such modes are immutable. - ---- -*** Behavior change on 'dired-clean-confirm-killing-deleted-buffers'. -Previously, if 'dired-clean-up-buffers-too' was non-nil, and -'dired-clean-confirm-killing-deleted-buffers' was nil, the buffers -wouldn't be killed. This combination will now kill the buffers. - -+++ -*** New user option 'dired-switches-in-mode-line'. -This user option controls how 'ls' switches are displayed in the mode -line, and allows truncating them (to preserve space on the mode line) -or showing them literally, either instead of, or in addition to, -displaying "by name" or "by date" sort order. - -+++ -*** New user option 'dired-compress-directory-default-suffix'. -This user option controls default suffix for compressing a directory. -If it's nil, ".tar.gz" will be used. Refer to -'dired-compress-files-alist' for a list of supported suffixes. - -+++ -*** New user option 'dired-compress-file-default-suffix'. -This user option controls the default suffix for compressing files. -If it's nil, ".gz" will be used. Refer to 'dired-compress-file-alist' -for a list of supported suffixes. - ---- -*** Broken and circular links are shown with the 'dired-broken-symlink' face. - ---- -*** '=' ('dired-diff') will now put all backup files into the 'M-n' history. -When using '=' on a file with backup files, the default file to use -for diffing is the newest backup file. You can now use 'M-n' to quickly -select a different backup file instead. - -+++ -*** New user option 'dired-maybe-use-globstar'. -If set, enables globstar (recursive globbing) in shells that support -this feature, but turn it off by default. This allows producing -directory listings with files matching a wildcard in all the -subdirectories of a given directory. The new variable -'dired-enable-globstar-in-shell' lists which shells can have globstar -enabled, and how to enable it. - -+++ -*** New user option 'dired-copy-dereference'. -If set to non-nil, Dired will dereference symbolic links when copying. -This can be switched off on a per-usage basis by providing -'dired-do-copy' with a 'C-u' prefix. - ---- -*** New user option 'dired-do-revert-buffer'. -Non-nil reverts the destination Dired buffer after performing one -of these operations: 'dired-do-copy', 'dired-do-rename', -'dired-do-symlink', 'dired-do-hardlink'. - -*** New user option 'dired-mark-region'. -This option affects all Dired commands that mark files. When non-nil -and the region is active in Transient Mark mode, then Dired commands -operate only on files in the active region. The values 'file' and -'line' of this user option define the details of marking the file at -the end of the region. - -*** State changing VC operations are supported in Dired. -These operations are supported on files and directories via the new -command 'dired-vc-next-action'. - -+++ -*** 'dired-jump' and 'dired-jump-other-window' moved from 'dired-x' to 'dired'. -The 'dired-jump' and 'dired-jump-other-window' commands have been -moved from the 'dired-x' package to 'dired'. The user option -'dired-bind-jump' no longer has any effect and is now obsolete. -The commands are now bound to 'C-x C-j' and 'C-x 4 C-j' by default. - -To get the old behavior of 'dired-bind-jump' back and unbind the above -keys, add the following to your init file: - -(global-set-key "\C-x\C-j" nil) -(global-set-key "\C-x4\C-j" nil) - ---- -*** 'dired-query' now uses 'read-char-from-minibuffer'. -Using it instead of 'read-char-choice' allows using 'C-x o' -to switch to the help window displayed after typing 'C-h'. - -+++ -** New user option 'isearch-allow-motion'. -When 'isearch-allow-motion' is set, the commands 'beginning-of-buffer', -'end-of-buffer', 'scroll-up-command' and 'scroll-down-command', when -invoked during I-search, move respectively to the first occurrence of -the current search string in the buffer, the last one, the first one -after the current window, and the last one before the current window. -Additionally, users can change the meaning of other motion commands -during I-search by using their 'isearch-motion' property. The -option 'isearch-motion-changes-direction' controls whether the -direction of the search changes after a motion command. - -+++ -** Emacs 28.1 comes with Org v9.5. -See the file ORG-NEWS for user-visible changes in Org. - -** Outline - -+++ -*** New commands to cycle heading visibility. -Typing 'TAB' on a heading line cycles the current section between -"hide all", "subheadings", and "show all" states. Typing 'S-TAB' -anywhere in the buffer cycles the whole buffer between "only top-level -headings", "all headings and subheadings", and "show all" states. - -+++ -*** New user option 'outline-minor-mode-cycle'. -This user option customizes 'outline-minor-mode', with the difference -that 'TAB' and 'S-TAB' on heading lines cycle heading visibility. -Typing 'TAB' on a heading line cycles the current section between -"hide all", "subheadings", and "show all" states. Typing 'S-TAB' on a -heading line cycles the whole buffer between "only top-level -headings", "all headings and subheadings", and "show all" states. - ---- -*** New user option 'outline-minor-mode-highlight'. -This user option customizes 'outline-minor-mode'. It puts -highlighting on heading lines using standard outline faces. This -works well only when there are no conflicts with faces used by the -major mode. - -** Ispell - -+++ -*** 'ispell-comments-and-strings' now accepts START and END arguments. -These arguments default to active region when used interactively. - -+++ -*** New command 'ispell-comment-or-string-at-point'. - ---- -*** New user option 'ispell-help-timeout'. -This controls how long the ispell help (on the '?' key) is displayed. - -** Flyspell mode - -+++ -*** Corrections and actions menu can be optionally bound to 'mouse-3'. -When Flyspell mode highlights a word as misspelled, you can click on -it to display a menu of possible corrections and actions. You can now -easily bind this menu to 'down-mouse-3' (usually the right mouse button) -instead of 'mouse-2' (the default) by enabling 'context-menu-mode'. - ---- -*** The current dictionary is now displayed in the minor mode lighter. -Clicking the dictionary name changes the current dictionary. - -** Package - -*** The new NonGNU ELPA archive is enabled by default alongside GNU ELPA. -Thus, packages on NonGNU ELPA will appear by default in the list shown -by 'list-packages'. - ---- -*** '/ s' ('package-menu-filter-by-status') changed parameter handling. -The command was documented to take a comma-separated list of statuses -to filter by, but instead it used the parameter as a regexp. The -command has been changed so that it now works as documented, and -checks statuses not as a regexp, but instead an exact match from the -comma-separated list. - -+++ -*** New command 'package-browse-url' and keystroke 'w'. - -+++ -*** New commands to filter the package list. -The filter commands are bound to the following keys: - -key binding ---- ------- -/ a package-menu-filter-by-archive -/ d package-menu-filter-by-description -/ k package-menu-filter-by-keyword -/ N package-menu-filter-by-name-or-description -/ n package-menu-filter-by-name -/ s package-menu-filter-by-status -/ v package-menu-filter-by-version -/ m package-menu-filter-marked -/ u package-menu-filter-upgradable -/ / package-menu-filter-clear - -*** Option to automatically native-compile packages upon installation. -Customize the user option 'package-native-compile' to enable automatic -native compilation of packages when they are installed. That option -is nil by default; if set non-nil, and if your Emacs was built with -native-compilation support, each package will be natively compiled -when it is installed, by invoking an asynchronous Emacs subprocess to -run the native-compilation of the package files. (Be sure to leave -Emacs running until these asynchronous subprocesses exit, or else the -native-compilation will be aborted when you exit Emacs.) - ---- -*** Column widths in 'list-packages' display can now be customized. -See the new user options 'package-name-column-width', -'package-version-column-width', 'package-status-column-width', and -'package-archive-column-width'. - -** Info - ---- -*** New user option 'Info-warn-on-index-alternatives-wrap'. -This option affects what happens when using the ',' command after -looking up an entry with 'i' in info buffers. If non-nil (the -default), the ',' command will now display a warning when proceeding -beyond the final index match, and tapping ',' once more will then take -you to the first match. - -** Abbrev mode - -+++ -*** Emacs can now suggest to use an abbrev based on text you type. -A new user option, 'abbrev-suggest', enables the new abbrev suggestion -feature. When enabled, if a user manually types a piece of text that -could have saved enough typing by using an abbrev, a hint will be -displayed in the echo area, mentioning the abbrev that could have been -used instead. - -** Bookmarks - -*** Bookmarks can now be targets for new tabs. -When the bookmark.el library is loaded, a customize choice is added -to 'tab-bar-new-tab-choice' for new tabs to show the bookmark list. - ---- -*** The 'list-bookmarks' menu is now based on 'tabulated-list-mode'. -The interactive bookmark list will now benefit from features in -'tabulated-list-mode' like sorting columns or changing column width. - -Support for the optional "inline" header line, allowing for a header -without using 'header-line-format', has been dropped. Consequently, -the variables 'bookmark-bmenu-use-header-line' and -'bookmark-bmenu-inline-header-height' are now declared obsolete. - ---- -*** New user option 'bookmark-set-fringe-mark'. -If non-nil, setting a bookmark will set a fringe mark on the current -line, and jumping to a bookmark will also set this mark. - ---- -*** New user option 'bookmark-menu-confirm-deletion'. -In Bookmark Menu mode, Emacs by default does not prompt for -confirmation when you type 'x' to execute the deletion of bookmarks -that have been marked for deletion. However, if this new option is -non-nil then Emacs will require confirmation with 'yes-or-no-p' before -deleting. - -** Recentf - ---- -*** The recentf files are no longer backed up. - ---- -*** 'recentf-auto-cleanup' now repeats daily when set to a time string. -When 'recentf-auto-cleanup' is set to a time string, it now repeats -every day, rather than only running once after the mode is turned on. - -** Calc - ---- -*** The behavior when doing forward-delete has been changed. -Previously, using the 'C-d' command would delete the final number in -the input field, no matter where point was. This has been changed to -work more traditionally, with 'C-d' deleting the next character. -Likewise, point isn't moved to the end of the string before inserting -digits. - -+++ -*** Setting the word size to zero disables word clipping. -The word size normally clips the results of certain bit-oriented -operations such as shifts and bitwise XOR. A word size of zero, set -by 'b w', makes the operation have effect on the whole argument values -and the result is not truncated in any way. - ---- -*** The '/' operator now has higher precedence in (La)TeX input mode. -It no longer has lower precedence than '+' and '-'. - ---- -*** Calc now marks its windows dedicated. -The new user option 'calc-make-windows-dedicated' controls this. It -is t by default; set to nil to get back the old behavior. - -** Calendar - -+++ -*** New user option 'calendar-time-zone-style'. -If 'numeric', calendar functions (eg 'calendar-sunrise-sunset') that display -time zones will use a form like "+0100" instead of "CET". - -** Imenu - -+++ -*** New user option 'imenu-max-index-time'. -If creating the imenu index takes longer than specified by this -option (default 5 seconds), imenu indexing is stopped. - -** ido - ---- -*** Switching on 'ido-mode' now also overrides 'ffap-file-finder'. - ---- -*** Killing virtual ido buffers interactively will make them go away. -Previously, killing a virtual ido buffer with 'ido-kill-buffer' didn't -do anything. This has now been changed, and killing virtual buffers -with that command will remove the buffer from recentf. - -** So Long - ---- -*** New 'so-long-predicate' function 'so-long-statistics-excessive-p'. -It efficiently detects the presence of a long line anywhere in the -buffer using 'buffer-line-statistics' (see above). This is now the -default predicate (replacing 'so-long-detected-long-line-p'). - ---- -*** Default values 'so-long-threshold' and 'so-long-max-lines' increased. -The values of these user options have been raised to 10000 bytes and 500 -lines respectively, to reduce the likelihood of false-positives when -'global-so-long-mode' is enabled. The latter value is now only used -by the old predicate, as the new predicate knows the longest line in -the entire buffer. - ---- -*** 'so-long-target-modes' now includes 'fundamental-mode' by default. -This means that 'global-so-long-mode' will also process files which were -not recognised. (This only has an effect if 'set-auto-mode' chooses -'fundamental-mode'; buffers which are simply in 'fundamental-mode' by -default are unaffected.) - ---- -*** New user options to preserve modes and variables. -The new options 'so-long-mode-preserved-minor-modes' and -'so-long-mode-preserved-variables' allow specified mode and variable -states to be maintained if 'so-long-mode' replaces the original major -mode. By default, these new options support 'view-mode'. - -** Grep - -+++ -*** New user option 'grep-match-regexp' matches grep markers to highlight. -Grep emits SGR ANSI escape sequences to color its output. The new -user option 'grep-match-regexp' holds the regular expression to match -the appropriate markers in order to provide highlighting in the source -buffer. The user option can be customized to accommodate other -grep-like tools. - ---- -*** The 'lgrep' command now ignores directories. -On systems where the grep command supports it, directories will be -skipped. - -*** Commands that use 'grep-find' now follow symlinks for command-line args. -This is because the default value of 'grep-find-template' now includes -the 'find' option '-H'. Commands that use that variable, including -indirectly via a call to 'xref-matches-in-directory', might be -affected. In particular, there should be no need anymore to ensure -any directory names on the 'find' command lines end in a slash. -This change is for better compatibility with old versions of non-GNU -'find', such as the one used on macOS. - ---- -*** New utility function 'grep-file-at-point'. -This returns the name of the file at point (if any) in 'grep-mode' -buffers. - -** Shell - ---- -*** New command in 'shell-mode': 'narrow-to-prompt'. -This is bound to 'C-x n d' in 'shell-mode' buffers, and narrows to the -command line under point (and any following output). - ---- -*** New user option 'shell-has-auto-cd'. -If non-nil, 'shell-mode' handles implicit "cd" commands, changing the -directory if the command is a directory. Useful for shells like "zsh" -that has this feature. - -** term-mode - ---- -*** New user option 'term-scroll-snap-to-bottom'. -By default, 'term' and 'ansi-term' will now recenter the buffer so -that the prompt is on the final line in the window. Setting this new -user option to nil inhibits this behavior. - ---- -*** New user option 'term-set-terminal-size' -If non-nil, the 'LINES' and 'COLUMNS' environment variables will be set -based on the current window size. In previous versions of Emacs, this -was always done (and that could lead to odd displays when resizing the -window after starting). This variable defaults to nil. - ---- -*** 'term-mode' now supports "bright" color codes. -"Bright" ANSI color codes are now displayed using the color values -defined in 'term-color-bright-*'. In addition, bold text with regular -ANSI colors can be displayed as "bright" if 'ansi-color-bold-is-bright' -is non-nil. - -** Eshell - ---- -*** 'eshell-hist-ignoredups' can now also be used to mimic "erasedups" in bash. - ---- -*** Environment variable 'INSIDE_EMACS' is now copied to subprocesses. -Its value contains the result of evaluating '(format "%s,eshell" -emacs-version)'. Other package names, like "tramp", could also be included. - ---- -*** Eshell no longer re-initializes its keymap every call. -This allows users to use (define-key eshell-mode-map ...) as usual. -Some modules have their own minor mode now to account for these -changes. - -*** Support for bookmark.el. -The command `bookmark-set' (bound to `C-x r m') is now supported, and -will create a bookmark that opens the current directory in Eshell. - -** Archive mode - ---- -*** Archive Mode can now parse ".squashfs" files. - -*** Can now modify members of 'ar' archives. - -*** Display of summaries is unified between backends. - -*** New user option and command to control displayed columns. -New user option 'archive-hidden-columns' and new command -'archive-hideshow-column' let you control which columns are displayed -and which are kept hidden. - ---- -*** New command bound to 'C': 'archive-copy-file'. -This command extracts the file at point and writes its data to a -file. - -** browse-url - -*** Added support for custom URL handlers. -There is a new variable 'browse-url-default-handlers' and a user -option 'browse-url-handlers' being alists with '(REGEXP-OR-PREDICATE -. FUNCTION)' entries allowing to define different browsing FUNCTIONs -depending on the URL to be browsed. The variable is for default -handlers provided by Emacs itself or external packages, the user -option is for the user (and allows for overriding the default -handlers). - -Formerly, one could do the same by setting -'browse-url-browser-function' to such an alist. This usage is still -supported but deprecated. - -*** Categorization of browsing commands into internal vs. external. -All standard browsing commands such as 'browse-url-firefox', -'browse-url-mail', or 'eww' have been categorized into internal (URL -is browsed in Emacs) or external (an external application is spawned -with the URL). This is done by adding a 'browse-url-browser-kind' -symbol property to the browsing commands. With a new command -'browse-url-with-browser-kind', an URL can explicitly be browsed with -either an internal or external browser. - ---- -*** Support for browsing of remote files. -If a remote file is specified, a local temporary copy of that file is -passed to the browser. - ---- -*** Support for the conkeror browser is now obsolete. - ---- -*** Support for the Mosaic browser has been removed. -This support has been obsolete since 25.1. - -** Completion List Mode - -*** Improved navigation in the "*Completions*" buffer. -New key bindings have been added to 'completion-list-mode': 'n' and -'p' now navigate completions, and 'M-g M-c' switches to the -minibuffer and back to the completion list buffer. - -+++ -** profiler.el -The results displayed by 'profiler-report' now have the usage figures -at the left hand side followed by the function name. This is intended -to make better use of the horizontal space, in particular eliminating -the truncation of function names. There is no way to get the former -layout back. - -** Icomplete - ---- -*** New user option 'icomplete-matches-format'. -This allows controlling the current/total number of matches for the -prompt prefix. - -+++ -*** New minor modes 'icomplete-vertical-mode' and 'fido-vertical-mode'. -These modes modify Icomplete ('M-x icomplete-mode') and Fido ('M-x -fido-mode'), to display completion candidates vertically instead of -horizontally. In Icomplete, completions are rotated and selection -kept at the top. In Fido, completions scroll like a typical dropdown -widget. Both these new minor modes will turn on their non-vertical -counterparts first, if they are not on already. - ---- -*** Default value of 'icomplete-compute-delay' has been changed to 0.15 s. - ---- -*** Default value of 'icomplete-max-delay-chars' has been changed to 2. - ---- -*** Reduced blinking while completing the next completions set. -Icomplete doesn't hide the hint with the previously computed -completions anymore when compute delay is in effect, or the previous -computation has been aborted by input. Instead it shows the previous -completions until the new ones are ready. - ---- -*** Change in meaning of 'icomplete-show-matches-on-no-input'. -Previously, choosing a different completion with commands like 'C-.' -and then hitting 'RET' would choose the default completion. Doing this -will now choose the completion under point instead. Also when this option -is nil, completions are not shown when the minibuffer reads a file name -with initial input as the default directory. - -** Windmove - -+++ -*** New user options to customize windmove keybindings. -These options include 'windmove-default-keybindings', -'windmove-display-default-keybindings', -'windmove-delete-default-keybindings', -'windmove-swap-states-default-keybindings'. - -** Occur mode - -*** New bindings in occur-mode. -The command 'next-error-no-select' is now bound to 'n' and -'previous-error-no-select' is bound to 'p'. - -*** The new command 'recenter-current-error'. -It is bound to 'l' in Occur or compilation buffers, and recenters the -current displayed occurrence/error. - -*** Matches in target buffers are now highlighted as in 'compilation-mode'. -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 -match on the line but can now also be a list of '(BEGIN . END)' pairs -of markers delimiting each match on the line. -This is a fully compatible change to the internal occur-mode -implementation, and code creating their own occur-mode buffers will -work as before. - -** Emacs Lisp mode - ---- -*** The mode-line now indicates whether we're using lexical or dynamic scoping. - -+++ -*** A space between an open paren and a symbol changes the indentation rule. -The presence of a space between an open paren and a symbol now is -taken as a statement by the programmer that this should be indented -as a data list rather than as a piece of code. - -** Lisp Mode - -*** New minor mode 'cl-font-lock-built-in-mode' for 'lisp-mode'. -The mode provides refined highlighting of built-in functions, types, -and variables. - ---- -*** Lisp mode now uses 'common-lisp-indent-function'. -To revert to the previous behavior, -'(setq lisp-indent-function 'lisp-indent-function)' from 'lisp-mode-hook'. - -** Change Logs and VC - -+++ -*** 'vc-revert-show-diff' now has a third possible value: 'kill'. -If this user option is 'kill', then the diff buffer will be killed -after the 'vc-revert' action instead of buried. - -*** More VC commands can be used from non-file buffers. -The relevant commands are those that don't change the VC state. -The non-file buffers which can use VC commands are those that have -their 'default-directory' under VC. - -*** New command 'vc-dir-root' uses the root directory without asking. - ---- -*** New face 'log-view-commit-body'. -This is used when expanding commit messages from 'vc-print-root-log' -and similar commands. - ---- -*** New faces for 'vc-dir' buffers. -Those are: 'vc-dir-header', 'vc-dir-header-value', 'vc-dir-directory', -'vc-dir-file', 'vc-dir-mark-indicator', 'vc-dir-status-warning', -'vc-dir-status-edited', 'vc-dir-status-up-to-date', -'vc-dir-status-ignored'. - ---- -*** The responsible VC backend is now the most specific one. -'vc-responsible-backend' loops over the backends in -'vc-handled-backends' to determine which backend is responsible for a -specific (unregistered) file. Previously, the first matching backend -was chosen, but now the one with the most specific path is chosen (in -case there's a directory handled by one backend inside another). - -*** New commands 'vc-dir-mark-registered-files' (bound to '* r') and -'vc-dir-mark-unregistered-files'. - -*** Support for bookmark.el. -Bookmark locations can refer to VC directory buffers. - ---- -*** New user option 'vc-hg-create-bookmark'. -It controls whether a bookmark or branch will be created when you -invoke 'C-u C-x v s' ('vc-create-tag'). - ---- -*** 'vc-hg' now uses 'hg summary' to populate extra 'vc-dir' headers. - ---- -*** New user option 'vc-git-revision-complete-only-branches'. -If non-nil, only branches and remotes are considered when doing -completion over Git branch names. The default is nil, which causes -tags to be considered as well. - ---- -*** New user option 'vc-git-log-switches'. -String or list of strings specifying switches for Git log under VC. - -** Gnus - -+++ -*** New user option 'gnus-topic-display-predicate'. -This can be used to inhibit the display of some topics completely. - -+++ -*** nnimap now supports the oauth2.el library. - -+++ -*** New Summary buffer sort options for extra headers. -The extra header sort option ('C-c C-s C-x') prompts for a header -and fails if no sort function has been defined. Sorting by -Newsgroups ('C-c C-s C-u') has been pre-defined. - -+++ -*** The '#' command in the Group and Summary buffer now toggles, -instead of sets, the process mark. - -+++ -*** New user option 'gnus-process-mark-toggle'. -If non-nil (the default), the '#' command in the Group and Summary -buffers will toggle, instead of set, the process mark. - - -+++ -*** New user option 'gnus-registry-register-all'. -If non-nil (the default), create registry entries for all messages. -If nil, don't automatically create entries, they must be created -manually. - -+++ -*** New user options to customise the summary line specs "%[" and "%]". -Four new options introduced in customisation group -'gnus-summary-format'. These are 'gnus-sum-opening-bracket', -'gnus-sum-closing-bracket', 'gnus-sum-opening-bracket-adopted', and -'gnus-sum-closing-bracket-adopted'. Their default values are "[", "]", -"<", ">" respectively. These options control the appearance of "%[" -and "%]" specs in the summary line format. "%[" will normally display -the value of 'gnus-sum-opening-bracket', but can also be -'gnus-sum-opening-bracket-adopted' for the adopted articles. "%]" will -normally display the value of 'gnus-sum-closing-bracket', but can also -be 'gnus-sum-closing-bracket-adopted' for the adopted articles. - -+++ -*** New user option 'gnus-paging-select-next'. -This controls what happens when using commands like 'SPC' and 'DEL' to -page the current article. If non-nil (the default), go to the -next/prev article, but if nil, do nothing at the end/start of the article. - -+++ -*** New gnus-search library. -A new unified search syntax which can be used across multiple -supported search engines. Set 'gnus-search-use-parsed-queries' to -non-nil to enable. - -+++ -*** New value for user option 'smiley-style'. -Smileys can now be rendered with emojis instead of small images when -using the new 'emoji' value in 'smiley-style'. - -+++ -*** New user option 'gnus-agent-eagerly-store-articles'. -If non-nil (which is the default), the Gnus Agent will store all read -articles in the Agent cache. - -+++ -*** New user option 'gnus-global-groups'. -Gnus handles private groups differently from public (i.e., NNTP-like) -groups. Most importantly, Gnus doesn't download external images from -mail-like groups. This can be overridden by putting group names in -'gnus-global-groups': Any group present in that list will be treated -like a public group. - -+++ -*** New scoring types for the Date header. -You can now score based on the relative age of an article with the new -'<' and '>' date scoring types. - -+++ -*** User-defined scoring is now possible. -The new type is 'score-fn'. More information in the Gnus manual node -"(gnus) Score File Format". - -+++ -*** New backend 'nnselect'. -The newly added 'nnselect' backend allows creating groups from an -arbitrary list of articles that may come from multiple groups and -servers. These groups generally behave like any other group: they may -be ephemeral or persistent, and allow article marking, moving, -deletion, etc. 'nnselect' groups may be created like any other group, -but there are three convenience functions for the common case of -obtaining the list of articles as a result of a search: -'gnus-group-make-search-group' ('G g') that will prompt for an 'nnir' -search query and create a persistent group for that search; -'gnus-group-read-ephemeral-search-group' ('G G') that will prompt for -an 'nnir' search query and create an ephemeral group for that search; -and 'gnus-summary-make-group-from-search' ('C-c C-p') that will create -a persistent group with the search parameters of a current ephemeral -search group. - -As part of this addition, the user option 'nnir-summary-line-format' -has been removed; its functionality is now available directly in the -'gnus-summary-line-format' specs '%G' and '%g'. The user option -'gnus-refer-thread-use-nnir' has been renamed to -'gnus-refer-thread-use-search'. - -+++ -*** New user option 'gnus-dbus-close-on-sleep'. -On systems with D-Bus support, it is now possible to register a signal -to close all Gnus servers before the system sleeps. - -+++ -*** The key binding of 'gnus-summary-search-article-forward' has changed. -This command was previously on 'M-s' and shadowed the global 'M-s' -search prefix. The command has now been moved to 'M-s M-s'. (For -consistency, the 'M-s M-r' key binding has been added for the -'gnus-summary-search-article-backward' command.) - ---- -*** The value of "all" in the 'large-newsgroup-initial' group parameter changes. -It was previously nil, which didn't work, because nil is -indistinguishable from not being present. The new value for "all" is -the symbol 'all'. - -+++ -*** The name of dependent Gnus sessions has changed from "slave" to "child". -The names of the commands 'gnus-slave', 'gnus-slave-no-server' and -'gnus-slave-unplugged' have changed to 'gnus-child', -'gnus-child-no-server' and 'gnus-child-unplugged' respectively. - -+++ -*** The 'W Q' summary mode command now takes a numerical prefix to -allow adjusting the fill width. - -+++ -*** New variable 'mm-inline-font-lock'. -This variable is supposed to be bound by callers to determine whether -inline MIME parts (that support it) are supposed to be font-locked or -not. - -** Message - ---- -*** Respect 'message-forward-ignored-headers' more. -Previously, this user option would not be consulted if -'message-forward-show-mml' was nil and forwarding as MIME. - -+++ -*** New user option 'message-forward-included-mime-headers'. -This is used when forwarding messages as MIME, but not using MML. - -+++ -*** Message now supports the OpenPGP header. -To generate these headers, add the new function -'message-add-openpgp-header' to 'message-send-hook'. The header will -be generated according to the new 'message-openpgp-header' user -option. - ---- -*** A change to how "Mail-Copies-To: never" is handled. -If a user has specified "Mail-Copies-To: never", and Message was asked -to do a "wide reply", some other arbitrary recipient would end up in -the resulting "To" header, while the remaining recipients would be put -in the "Cc" header. This is somewhat misleading, as it looks like -you're responding to a specific person in particular. This has been -changed so that all the recipients are put in the "To" header in these -instances. - -+++ -*** New command to start Emacs in Message mode to send an email. -Emacs can be defined as a handler for the "x-scheme-handler/mailto" -MIME type with the following command: "emacs -f message-mailto %u". -An "emacs-mail.desktop" file has been included, suitable for -installing in desktop directories like "/usr/share/applications" or -"~/.local/share/applications". -Clicking on a 'mailto:' link in other applications will then open -Emacs with headers filled out according to the link, e.g. -"mailto:larsi@gnus.org?subject=This+is+a+test". If you prefer -emacsclient, use "emacsclient -e '(message-mailto "%u")'" -or "emacsclient-mail.desktop". - ---- -*** Change to default value of 'message-draft-headers' user option. -The 'Date' symbol has been removed from the default value, meaning that -draft or delayed messages will get a date reflecting when the message -was sent. To restore the original behavior of dating a message -from when it is first saved or delayed, add the symbol 'Date' back to -this user option. - -+++ -*** New command to take screenshots. -In Message mode buffers, the 'C-c C-p' ('message-insert-screenshot') -command has been added. It depends on using an external program to -take the actual screenshot, and defaults to "ImageMagick import". - -** Smtpmail - -+++ -*** smtpmail now supports using the oauth2.el library. - -+++ -*** New user option 'smtpmail-store-queue-variables'. -If non-nil, SMTP variables will be stored together with the queued -messages, and will then be used when sending with -'M-x smtpmail-send-queued-mail'. - -+++ -*** Allow direct selection of smtp authentication mechanism. -A server entry retrieved by auth-source can request a desired smtp -authentication mechanism by setting a value for the key 'smtp-auth'. - -** ElDoc - -+++ -*** New user option 'eldoc-echo-area-display-truncation-message'. -If non-nil (the default), eldoc will display a message saying -something like "(Documentation truncated. Use `M-x eldoc-doc-buffer' -to see rest)" when a message has been truncated. If nil, truncated -messages will be marked with just "..." at the end. - -+++ -*** New hook 'eldoc-documentation-functions'. -This hook is intended to be used for registering doc string functions. -These functions don't need to produce the doc string right away, they -may arrange for it to be produced asynchronously. The results of all -doc string functions are accessible to the user through the user -option 'eldoc-documentation-strategy'. - -*** New hook 'eldoc-display-functions'. -This hook is intended to be used for displaying doc strings. The -functions receive the doc string composed according to -'eldoc-documentation-strategy' and are tasked with displaying it to -the user. Examples of such functions would use the echo area, a -separate buffer, or a tooltip. - -+++ -*** New user option 'eldoc-documentation-strategy'. -The built-in choices available for this user option let users compose -the results of 'eldoc-documentation-functions' in various ways, even -if some of those functions are synchronous and some asynchronous. -The user option replaces 'eldoc-documentation-function', which is now -obsolete. - -*** 'eldoc-echo-area-use-multiline-p' is now handled by ElDoc. -The user option 'eldoc-echo-area-use-multiline-p' is now handled -by the ElDoc library itself. Functions in -'eldoc-documentation-functions' don't need to worry about consulting -it when producing a doc string. - -** Tramp - -+++ -*** New connection method "mtp". -It allows accessing media devices like cell phones, tablets or -cameras. - -+++ -*** New connection method "sshfs". -It allows accessing remote files via a file system mounted with -'sshfs'. - -+++ -*** Tramp supports SSH authentication via a hardware security key now. -This requires at least OpenSSH 8.2, and a FIDO U2F compatible -security key, like yubikey, solokey, or nitrokey. - -+++ -*** Trashed remote files are moved to the local trash directory. -All remote files that are trashed are moved to the local trash -directory, except remote encrypted files, which are always deleted. - -+++ -*** New command 'tramp-crypt-add-directory'. -This command marks a remote directory to contain only encrypted files. -See the "(tramp) Keeping files encrypted" node of the Tramp manual for -details. This feature is experimental. - -+++ -*** Support of direct asynchronous process invocation. -When Tramp connection property "direct-async-process" is set to -non-nil for a given connection, 'make-process' and 'start-file-process' -calls are performed directly as in "ssh ... ". This avoids -initialization performance penalties. See the "(tramp) Improving -performance of asynchronous remote processes" node of the Tramp manual -for details, and also for a discussion or restrictions. This feature -is experimental. - -+++ -*** New user option 'tramp-debug-to-file'. -When non-nil, this user option instructs Tramp to mirror the debug -buffer to a file under the "/tmp/" directory. This is useful, if (in -rare cases) Tramp blocks Emacs, and we need further debug information. - -+++ -*** Tramp supports lock files now. -In order to deactivate this, set user option -'remote-file-name-inhibit-locks' to t. - -+++ -*** Writing sensitive data locally requires confirmation. -Writing auto-save, backup or lock files to the local temporary -directory must be confirmed. In order to suppress this confirmation, -set user option 'tramp-allow-unsafe-temporary-files' to t. - -+++ -*** 'make-directory' of a remote directory honors the default file modes. - -** gdb-mi - -*** New user option 'gdb-registers-enable-filter'. -If non-nil, apply a register filter based on -'gdb-registers-filter-pattern-list'. - -+++ -*** gdb-mi can now save and restore window configurations. -Use 'gdb-save-window-configuration' to save window configuration to a -file and 'gdb-load-window-configuration' to load from a file. These -commands can also be accessed through the menu bar under "Gud => -GDB-Windows". 'gdb-default-window-configuration-file', when non-nil, -is loaded when GDB starts up. - -+++ -*** gdb-mi can now restore window configuration after quitting. -Set 'gdb-restore-window-configuration-after-quit' to non-nil and Emacs -will remember the window configuration before GDB started and restore -it after GDB quits. A toggle button is also provided under "Gud => -GDB-Windows" menu item. - -+++ -*** gdb-mi now has a better logic for displaying source buffers. -Now GDB only uses one source window to display source file by default. -Customize 'gdb-max-source-window-count' to use more than one window. -Control source file display by 'gdb-display-source-buffer-action'. - -+++ -*** The default value of 'gdb-mi-decode-strings' is now t. -This means that the default coding-system is now used to decode strings -and source file names from GDB. - -** Compilation mode - ---- -*** New function 'ansi-color-compilation-filter'. -This function is meant to be used in 'compilation-filter-hook'. - ---- -*** New user option 'ansi-color-for-compilation-mode'. -This controls what 'ansi-color-compilation-filter' does. - -*** Regexp matching of messages is now case-sensitive by default. -The variable 'compilation-error-case-fold-search' can be set for -case-insensitive matching of messages when the old behavior is -required, but the recommended solution is to use a correctly matching -regexp instead. - ---- -*** New user option 'compilation-search-all-directories'. -When doing parallel builds, directories and compilation errors may -arrive in the "*compilation*" buffer out-of-order. If this option is -non-nil (the default), Emacs will now search backwards in the buffer -for any directory the file with errors may be in. If nil, this won't -be done (and this restores how this previously worked). - ---- -*** Messages from ShellCheck are now recognized. - ---- -*** Messages from Visual Studio that mention column numbers are now recognized. - -** Hi Lock mode - ---- -*** Matching in 'hi-lock-mode' can be case-sensitive. -The matching is case-sensitive when a regexp contains upper case -characters and 'search-upper-case' is non-nil. 'highlight-phrase' -also uses 'search-whitespace-regexp' to substitute spaces in regexp -search. - ---- -*** The default value of 'hi-lock-highlight-range' was enlarged. -The new default value is 2000000 (2 megabytes). - -** Whitespace mode - -+++ -*** New style 'missing-newline-at-eof'. -If present in 'whitespace-style' (as it is by default), the final -character in the buffer will be highlighted if the buffer doesn't end -with a newline. - ---- -*** The default 'whitespace-enable-predicate' predicate has changed. -It used to check elements in the list version of -'whitespace-global-modes' with 'eq', but now uses 'derived-mode-p'. - -** Texinfo - ---- -*** New user option 'texinfo-texi2dvi-options'. -This is used when invoking 'texi2dvi' from 'texinfo-tex-buffer'. - ---- -*** New commands for moving in and between environments. -An "environment" is something that ends with '@end'. The commands are -'C-c C-c C-f' (next end), 'C-c C-c C-b' (previous end), -'C-c C-c C-n' (next start) and 'C-c C-c C-p' (previous start), as well -as 'C-c .', which will alternate between the start and the end of the -current environment. - -** Rmail - ---- -*** New user option 'rmail-re-abbrevs'. -Its default value matches localized abbreviations of the "reply" -prefix on the Subject line in various languages. - ---- -*** New user option 'shr-offer-extend-specpdl'. -If this is nil, rendering of HTML in the email message body that -requires to enlarge 'max-specpdl-size', the number of Lisp variable -bindings, will be aborted, and Emacs will not ask you whether to -enlarge 'max-specpdl-size' to complete the rendering. The default is -t, which preserves the original behavior. - ---- -*** New user option 'rmail-show-message-set-modified'. -If set non-nil, showing an unseen message will set the Rmail buffer's -modified flag. The default is nil, to preserve the old behavior. - -** CC Mode - -+++ -*** Added support for Doxygen documentation style. -'doxygen' is now a valid 'c-doc-comment-style' which recognises all -comment styles supported by Doxygen (namely '///', '//!', '/** … */' -and '/*! … */'. 'gtkdoc' remains the default for C and C++ modes; to -use 'doxygen' by default one might evaluate: - - (setq-default c-doc-comment-style - '((java-mode . javadoc) - (pike-mode . autodoc) - (c-mode . doxygen) - (c++-mode . doxygen))) - -or use it in a custom 'c-style'. - -+++ -*** Added support to line up '?' and ':' of a ternary operator. -The new 'c-lineup-ternary-bodies' function can be used as a lineup -function to align question mark and colon which are part of a ternary -operator ('?:'). For example: - - return arg % 2 == 0 ? arg / 2 - : (3 * arg + 1); - -To enable, add it to appropriate entries in 'c-offsets-alist', e.g.: - - (c-set-offset 'arglist-cont '(c-lineup-ternary-bodies - c-lineup-gcc-asm-reg)) - (c-set-offset 'arglist-cont-nonempty '(c-lineup-ternary-bodies - c-lineup-gcc-asm-reg - c-lineup-arglist)) - (c-set-offset 'statement-cont '(c-lineup-ternary-bodies +)) - -** Images - ---- -*** You can explicitly specify base_uri for svg images. -':base-uri' image property can be used to explicitly specify base_uri -for embedded images into svg. ':base-uri' is supported for both file -and data svg images. - -+++ -*** 'svg-embed-base-uri-image' added to embed images. -'svg-embed-base-uri-image' can be used to embed images located -relatively to 'file-name-directory' of the ':base-uri' svg image property. -This works much faster then 'svg-embed'. - -+++ -*** New function 'image-cache-size'. -This function returns the size of the current image cache, in bytes. - ---- -*** Animated images stop automatically under high CPU pressure sooner. -Previously, an animated image would stop animating if any single image -took more than two seconds to display. The new algorithm maintains a -decaying average of delays, and if this number gets too high, the -animation is stopped. - -+++ -*** The 'n' and 'p' commands (next/previous image) now respect Dired order. -These commands would previously display the next/previous image in -lexicographic order, but will now find the "parent" Dired buffer and -select the next/previous image file according to how the files are -sorted there. The commands have also been extended to work when the -"parent" buffer is an archive mode (i.e., zip file or the like) or tar -mode buffer. - ---- -*** 'image-converter' is now restricted to formats in 'auto-mode-alist'. -When using external image converters, the external program is queried -for what formats it supports. This list may contain formats that are -problematic in some contexts (like PDFs), so this list is now filtered -based on 'auto-mode-alist'. Only file names that map to 'image-mode' -are now supported. - ---- -*** The background and foreground of images now default to face colors. -When an image doesn't specify a foreground or background color, Emacs -now uses colors from the face used to draw the surrounding text -instead of the frame's default colors. - -To load images with the default frame colors use the ':foreground' and -':background' image attributes, for example: - - (create-image "filename" nil nil - :foreground (face-attribute 'default :foreground) - :background (face-attribute 'default :background)) - -This change only affects image types that support foreground and -background colors or transparency, such as xbm, pbm, svg, png and gif. - -+++ -*** Image smoothing can now be explicitly enabled or disabled. -Smoothing applies a bilinear filter while scaling or rotating an image -to prevent aliasing and other unwanted effects. The new image -property ':transform-smoothing' can be set to t to force smoothing -and nil to disable smoothing. - -The default behavior of smoothing on down-scaling and not smoothing -on up-scaling remains unchanged. - -+++ -*** New user option 'image-transform-smoothing'. -This controls whether to use smoothing or not for an image. Values -include nil (no smoothing), t (do smoothing) or a predicate function -that's called with the image object and should return nil/t. - -+++ -*** SVG images now support user stylesheets. -The ':css' image attribute can be used to override the default CSS -stylesheet for an image. The default sets 'font-family' and -'font-size' to match the current face, so an image with 'height="1em"' -will match the font size in use where it is embedded. - -This feature relies on librsvg 2.48 or above being available. - -+++ -*** Image properties support 'em' sizes. -Size image properties, for example ':height', ':max-height', etc., can -be given a cons of the form '(SIZE . em)', where SIZE is an integer or -float which is multiplied by the font size to calculate the image -size, and 'em' is a symbol. - -** EWW - -+++ -*** New user option 'eww-use-browse-url'. -This is a regexp that can be set to alter how links are followed in eww. - -+++ -*** New user option 'eww-retrieve-command'. -This can be used to download data via an external command. If nil -(the default), then 'url-retrieve' is used. When 'sync', then -'url-retrieve-synchronously' is used. - -+++ -*** New Emacs command line convenience command. -The 'eww-browse' command has been added, which allows you to register -Emacs as a MIME handler for "text/x-uri", and will call 'eww' on the -supplied URL. Usage example: "emacs -f eww-browse https://gnu.org". - -+++ -*** 'eww-download-directory' will now use the XDG location, if defined. -However, if "~/Downloads/" already exists, that will continue to be -used. - ---- -*** The command 'eww-follow-link' now supports custom mailto handlers. -The function that is invoked when clicking on or otherwise following a -'mailto:' link in an EWW buffer can now be customized. For more -information, see the related entry about 'shr-browse-url' above. - ---- -*** Support for bookmark.el. -The command `bookmark-set' (bound to `C-x r m') is now supported, and -will create a bookmark that opens the current URL in EWW. - -** SHR - ---- -*** The command 'shr-browse-url' now supports custom mailto handlers. -Clicking on or otherwise following a 'mailto:' link in a HTML buffer -rendered by SHR previously invoked the command 'browse-url-mailto'. -This is still the case by default, but if you customize -'browse-url-mailto-function' or 'browse-url-handlers' to call some -other function, it will now be called instead of the default. - -+++ -*** New user option 'shr-max-width'. -If this user option is non-nil, and 'shr-width' is nil, then SHR will -use the value of 'shr-max-width' to limit the width of the rendered -HTML. The default is 120 characters, so even if you have very wide -frames, HTML text will be rendered more narrowly, which usually leads -to a more readable text. Customize it to nil to get the previous -behavior of rendering as wide as the 'window-width' allows. If -'shr-width' is non-nil, it overrides this option. - ---- -*** New faces for heading elements. -Those are 'shr-h1', 'shr-h2', 'shr-h3', 'shr-h4', 'shr-h5', 'shr-h6'. - -** Project - -*** New user option 'project-vc-merge-submodules'. - -*** Project commands now have their own history. -Previously used project directories are now suggested by all commands -that prompt for a project directory. - -+++ -*** New prefix keymap 'project-prefix-map'. -Key sequences that invoke project-related commands start with the -prefix 'C-x p'. Type "C-x p C-h" to show the full list. - -+++ -*** New commands 'project-dired', 'project-vc-dir', 'project-shell', -'project-eshell'. These commands run Dired/VC-Dir and Shell/Eshell in -a project's root directory, respectively. - -+++ -*** New command 'project-compile'. -This command runs compilation in the current project's root -directory. - -+++ -*** New command 'project-switch-project'. -This command lets you "switch" to another project and run a project -command chosen from a dispatch menu. - -+++ -*** New commands 'project-shell-command' and 'project-async-shell-command'. -These commands run 'shell-command' and 'async-shell-command' in a -project's root directory, respectively. - -+++ -*** New user option 'project-list-file'. -This specifies the file in which to save the list of known projects. - -+++ -*** New command 'project-remember-projects-under'. -This command can automatically locate and index projects in a -directory and optionally also its subdirectories, storing them in -'project-list-file'. - -+++ -*** New commands 'project-forget-project' and 'project-forget-projects-under'. -These command lets you interactively remove entries from the list of projects -in 'project-list-file'. - -+++ -*** New command 'project-forget-zombie-projects'. -This command detects indexed projects that have since been deleted, -and removes them from the list of known projects in 'project-list-file'. - ---- -*** 'project-find-file' now accepts non-existent file names. -This is to allow easy creation of files inside some nested -sub-directory. - -+++ -*** 'project-find-file' doesn't use the string at point as default input. -Now it's only suggested as part of the "future history". - -+++ -*** New command 'project-find-dir' runs Dired in a directory inside project. - -** Xref - ---- -*** Prefix arg of 'xref-goto-xref' quits the "*xref*" buffer. -So typing 'C-u RET' in the "*xref*" buffer quits its window -before navigating to the selected location. - -+++ -*** New user options to automatically show the first Xref match. -The new user option 'xref-auto-jump-to-first-definition' controls the -behavior of 'xref-find-definitions' and its variants, like -'xref-find-definitions-other-window': if it's t or 'show', the first -match is automatically displayed; if it's 'move', point in the -"*xref*" buffer is automatically moved to the first match without -displaying it. -The new user option 'xref-auto-jump-to-first-xref' changes the -behavior of Xref commands such as 'xref-find-references', -'xref-find-apropos', and 'project-find-regexp', which are expected to -display many matches that the user would like to -visit. 'xref-auto-jump-to-first-xref' changes their behavior much in -the same way as 'xref-auto-jump-to-first-definition' affects the -"find-definitions" commands. - ---- -*** New user options 'xref-search-program' and 'xref-search-program-alist'. -So far 'grep' and 'ripgrep' are supported. 'ripgrep' seems to offer better -performance in certain cases, in particular for case-insensitive -searches. - -+++ -*** New commands 'xref-prev-group' and 'xref-next-group'. -These commands are bound respectively to 'P' and 'N', and navigate to -the first item of the previous or next group in the "*xref*" buffer. - ---- -*** New alternative value for 'xref-show-definitions-function': -'xref-show-definitions-completing-read'. - ---- -*** The two existing alternatives for 'xref-show-definitions-function' -have been renamed to have "proper" public names and documented -('xref-show-definitions-buffer' and -'xref-show-definitions-buffer-at-bottom'). - -+++ -*** New command 'xref-quit-and-pop-marker-stack'. -This command is bound to 'M-,' in "*xref*" buffers. This combination -is easy to press semi-accidentally if the user wants to go back in the -middle of choosing the exact definition to go to, and this should do -TRT. - ---- -*** New value 'project-relative' for 'xref-file-name-display'. -If chosen, file names in "*xref*" buffers will be displayed relative -to the 'project-root' of the current project, when available. - -+++ -*** The 'TAB' key binding in "*xref*" buffers is obsolete. -Use 'C-u RET' instead. The 'TAB' binding in "*xref*" buffers is still -supported, but we plan on removing it in a future version; at that -time, the command 'xref-quit-and-goto-xref' will no longer have a key -binding in 'xref--xref-buffer-mode-map'. - ---- -*** New user option 'etags-xref-prefer-current-file'. -When non-nil, matches for identifiers in the file visited by the -current buffer will be shown first in the "*xref*" buffer. - -+++ -*** The etags Xref backend now honors 'tags-apropos-additional-actions'. -You can customize it to augment the output of 'xref-find-apropos', -like it affected the output of 'tags-apropos', which is obsolete since -Emacs 25.1. - -** Battery - ---- -*** UPower is now the default battery status backend when available. -UPower support via the function 'battery-upower' was added in Emacs -26.1, but was disabled by default. It is now the default value of -'battery-status-function' when the system provides a UPower D-Bus -service. The user options 'battery-upower-device' and -'battery-upower-subscribe' control which power sources to query and -whether to respond to status change notifications in addition to -polling, respectively. - ---- -*** A richer syntax can be used to format battery status information. -The user options 'battery-mode-line-format' and -'battery-echo-area-format' now support the full formatting syntax of -the function 'format-spec' documented under node "(elisp) Custom Format -Strings". The new syntax includes specifiers for padding and -truncation, amongst other things. - -** bug-reference.el - ---- -*** Bug reference mode uses auto-setup. -If 'bug-reference-mode' or 'bug-reference-prog-mode' have been -activated, their respective hook has been run, and both -'bug-reference-bug-regexp' and 'bug-reference-url-format' are still -not set, it tries to guess appropriate values for those two variables. -There are three guessing mechanisms so far: based on version control -information of the current buffer's file, based on -newsgroup/mail-folder name and several news and mail message headers -in Gnus buffers, and based on IRC channel and network in rcirc and ERC -buffers. All the mechanisms are extensible with custom rules, see the -variables 'bug-reference-setup-from-vc-alist', -'bug-reference-setup-from-mail-alist', and -'bug-reference-setup-from-irc-alist'. - -** HTML Mode - ---- -*** A new skeleton for adding relative URLs has been added. -It's bound to the 'C-c C-c f' keystroke, and prompts for a local file -name. - -** Widget - -+++ -*** 'widget-choose' now supports menus in extended format. - ---- -*** The 'editable-list' widget now supports moving items up and down. -You can now move items up and down by deleting and then reinserting -them, using the 'DEL' and 'INS' buttons respectively. This is useful -in Custom buffers, for example, to change the order of the elements in -a list. - -** Diff - ---- -*** New face 'diff-changed-unspecified'. -This is used to highlight "changed" lines (those marked with '!') in -context diffs, when 'diff-use-changed-face' is non-nil. - ---- -*** New 'diff-mode' font locking face 'diff-error'. -This face is used for error messages from 'diff'. - -+++ -*** New command 'diff-refresh-hunk'. -This new command (bound to 'C-c C-l') regenerates the current hunk. - -** thing-at-point - -+++ -*** New 'thing-at-point' target: 'existing-filename'. -This is like 'filename', but is a full path, and is nil if the file -doesn't exist. - -+++ -*** New 'thing-at-point' target: 'string'. -If point is inside a string, it returns that string. - -+++ -*** New variable 'thing-at-point-provider-alist'. -This allows mode-specific alterations to how 'thing-at-point' works. - ---- -*** thing-at-point now respects fields. -'thing-at-point' (and all functions that use it, like -'symbol-at-point') will narrow to the current field (if any) before -trying to identify the thing at point. - -*** New function 'thing-at-mouse'. - -** image-dired - ---- -*** 'image-dired-mouse-toggle-mark' now toggles files in the active region. - -+++ -*** New user option 'image-dired-thumb-visible-marks'. -If non-nil (the default), use 'image-dired-thumb-mark' to say what -images are marked. - ---- -*** New command 'image-dired-delete-marked'. - -** Flymake mode - -+++ -*** New command 'flymake-show-project-diagnostics' -This lists all diagnostics for buffers in the currently active -project. The listing is similar to the one obtained by -'flymake-show-buffer-diagnostics', but adds a column for the -project-relative file name. For backends which support it, -'flymake-show-project-diagnostics' also lists diagnostics for files -that have not yet been visited. - -+++ -*** New user options to customize Flymake's mode-line. -The new user option 'flymake-mode-line-format' is a mix of strings and -symbols like 'flymake-mode-line-title', 'flymake-mode-line-exception' -and 'flymake-mode-line-counters'. The new user option -'flymake-mode-line-counter-format' is a mix of strings and symbols -like 'flymake-mode-line-error-counter', -'flymake-mode-line-warning-counter' and 'flymake-mode-line-note-counter'. - -** Time - ---- -*** 'display-time-world' has been renamed to 'world-clock'. -'world-clock' creates a buffer with an updating time display using -several time zones. It is hoped that the new names are more -discoverable. - -The following commands have been renamed: - - 'display-time-world' to 'world-clock' - 'display-time-world-mode' to 'world-clock-mode' - 'display-time-world-display' to 'world-clock-display' - 'display-time-world-timer' to 'world-clock-update' - -The following user options have been renamed: - - 'display-time-world-list' to 'world-clock-list' - 'display-time-world-time-format' to 'world-clock-time-format' - 'display-time-world-buffer-name' to 'world-clock-buffer-name' - 'display-time-world-timer-enable' to 'world-clock-timer-enable' - 'display-time-world-timer-second' to 'world-clock-timer-second' - -The old names are now obsolete. - ---- -*** 'world-clock-mode' can no longer be turned on interactively. -Use 'world-clock' to turn on that mode. - -** Python mode - ---- -*** New user option 'python-forward-sexp-function'. -This allows the user easier customization of whether to use block-based -navigation or not. - ---- -*** 'python-shell-interpreter' now defaults to python3 on systems with python3. - ---- -*** 'C-c C-r' can now be used on arbitrary regions. -The command previously extended the start of the region to the start -of the line, but will now actually send the marked region, as -documented. - -** Ruby Mode - ---- -*** 'ruby-use-smie' is declared obsolete. -SMIE is now always enabled and 'ruby-use-smie' only controls whether -indentation is done using SMIE or with the old ad-hoc code. - ---- -*** Indentation has changed when 'ruby-align-chained-calls' is non-nil. -This previously used to align subsequent lines with the last sibling, -but it now aligns with the first sibling (which is the preferred style -in Ruby). - -** CPerl Mode - ---- -*** New face 'perl-heredoc', used for heredoc elements. - ---- -*** The command 'cperl-set-style' offers the new value "PBP". -This value customizes Emacs to use the style recommended in Damian -Conway's book "Perl Best Practices" for indentation and formatting -of conditionals. - -** Perl mode - ---- -*** New face 'perl-non-scalar-variable'. -This is used to fontify non-scalar variables. - -** Octave Mode - -+++ -*** Line continuations in double-quoted strings now use a backslash. -Typing 'C-M-j' (bound to 'octave-indent-new-comment-line') now follows -the behavior introduced in Octave 3.8 of using a backslash as a line -continuation marker within double-quoted strings, and an ellipsis -everywhere else. - -+++ -** EasyPG -GPG key servers can now be queried for keys with the -'M-x epa-search-keys' command. Keys can then be added to your -personal key ring. - -** Etags - -+++ -*** Etags now supports the Mercury programming language. -See https://mercurylang.org. - -+++ -*** Etags command line option '--declarations' now has Mercury-specific behavior. -All Mercury declarations are tagged by default. However, for -compatibility with 'etags' support for Prolog, predicates and -functions appearing first in clauses will also be tagged if 'etags' is -invoked with the '--declarations' command-line option. - -** Comint - -+++ -*** Support for OSC escape sequences. -Adding the new 'comint-osc-process-output' to -'comint-output-filter-functions' enables the interpretation of OSC -("Operating System Command") escape sequences in comint buffers. By -default, only OSC 8, for hyperlinks, and OSC 7, for directory -tracking, are acted upon. Adding more entries to -'comint-osc-handlers' allows a customized treatment of further escape -sequences. - -+++ -*** 'comint-delete-output' can now save deleted text in the kill-ring. -Interactively, 'C-u C-c C-o' triggers this new optional behavior. - -** ansi-color.el - ---- -*** Colors are now defined by faces. -ANSI SGR codes now have corresponding faces to describe their -appearance, e.g. 'ansi-color-bold'. - ---- -*** Support for "bright" color codes. -"Bright" ANSI color codes are now displayed when applying ANSI color -filters using the color values defined by the faces -'ansi-color-bright-COLOR'. In addition, bold text with regular ANSI -colors can be displayed as "bright" if 'ansi-color-bold-is-bright' is -non-nil. - -** ERC - ---- -*** NickServ passwords can now be retrieved from auth-source. -The 'erc-use-auth-source-for-nickserv-password' user option enables -querying auth-source for NickServ passwords. To enable this, add the -following to your init file: - - (setq erc-use-auth-source-for-nickserv-password t) - ---- -*** NickServ identification now prompts for password last. -When 'erc-prompt-for-nickserv-password' is non-nil, the user used to -be unconditionally prompted interactively for a password, regardless -of the value of 'erc-nickserv-passwords', which was effectively -ignored (same for the new -'erc-use-auth-source-for-nickserv-password'). This limitation is now -lifted, and the user is interactively prompted last, after the other -identification methods have run. - ---- -*** The '/ignore' command will now ask for a timeout to stop ignoring the user. -Allowed inputs are seconds or ISO8601-like periods like "1h" or "4h30m". - ---- -*** ERC now recognizes 'C-]' for italic text. -Italic text is displayed in the new 'erc-italic-face'. - ---- -*** erc-match.el now supports 'message' highlight type (not including the nick). -The 'erc-current-nick-highlight-type', 'erc-pal-highlight-type', -'erc-fool-highlight-type', 'erc-keyword-highlight-type', and -'erc-dangerous-host-highlight-type' user options now support a -'message' type for highlighting the entire message but not the -sender's nick. - ---- -*** erc-status-sidebar.el is now part of ERC. -The 'erc-status-sidebar' package which provides a HexChat-like -activity overview sidebar for joined IRC channels is now part of ERC. - -+++ -*** erc-tls now supports specifying a TLS client certificate. -The 'erc-tls' function has been updated to allow specifying a TLS -client certificate for authentication, as an alternative to NickServ -password-based authentication. This is referred to as "CertFP" (short -for Certificate Fingerprint) by several IRC networks. See the Info -node "(erc) Connecting" in the ERC manual for more details and -examples on how to specify and use TLS client certificates with -'erc-tls'. - ---- -*** Add 'erc-track-select-mode-line-face' (obsoletes 'erc-track-find-face'). -The 'erc-track-find-face' function of the erc-track module has been -declared obsolete and rewritten as 'erc-track-select-mode-line-face', -with different expected arguments (the current and old faces are now -separated) and clearer documentation. - ---- -*** Add '/opme' and '/deopme' convenience commands. -The new '/opme' convenience command asks ChanServ to set the operator -status for the current nick in the current channel, and '/deopme' -unsets it. - ---- -*** Add '/wii' convenience command for whois with idle time. -The new '/wii' convenience command calls the '/whois' command with the -given nick as both arguments, which is useful for displaying the whois -information for the nick along with idle time, even if the nick is on -a different server than the one the current user is connected to. -Using the given nick itself instead of the server it is connected to -is not standardized, but is widely supported across IRC networks. - -** xwidget-webkit mode - ---- -*** New xwidget commands. -'xwidget-webkit-uri' (return the current URL), 'xwidget-webkit-title' -(return the current title), and 'xwidget-webkit-goto-history' (goto a -point in history). - ---- -*** Pixel-based scrolling. -The 'xwidget-webkit-scroll-up', 'xwidget-webkit-scroll-down' commands -now supports scrolling arbitrary pixel values. It now treats the -optional 2nd argument as the pixel values to scroll. - ---- -*** New commands for scrolling. -The new commands 'xwidget-webkit-scroll-up-line', -'xwidget-webkit-scroll-down-line', 'xwidget-webkit-scroll-forward', -'xwidget-webkit-scroll-backward' can be used to scroll webkit by the -height of lines or width of chars. - ---- -*** New user option 'xwidget-webkit-bookmark-jump-new-session'. -When non-nil, use a new xwidget webkit session after bookmark jump. -Otherwise, it will use 'xwidget-webkit-last-session'. - -** Checkdoc - ---- -*** No longer warns about command substitutions by default. -Checkdoc used to warn about "too many command substitutions" (as in -"\\[foo-command]"), even if you only used ten of them in a docstring. -On modern machines, you can have hundreds or thousands of command -substitutions before it becomes a performance issue, so this warning -is now disabled by default. To re-enable this warning, customize the -user option 'checkdoc-max-keyref-before-warn'. - ---- -*** New user option 'checkdoc-column-zero-backslash-before-paren'. -Checkdoc warns if there is a left parenthesis in column zero of a -documentation string. That warning can now be disabled by customizing -this new user option to nil. This is useful if you don't expect -your code to be edited with an Emacs older than version 27.1. - ---- -*** Now checks the prompt format for 'yes-or-no-p'. -In addition to verifying the format of the prompt for 'y-or-n-p', -checkdoc will now check the format of 'yes-or-no-p'. - ---- -*** New command 'checkdoc-dired'. -This can be used to run checkdoc on files from a Dired buffer. - ---- -*** No longer checks for "A-" modifiers. -Checkdoc recommends usage of command substitutions ("\\[foo-command]") -in favor of writing keybindings like "C-c f". It now no longer warns -about the "A-" modifier as it is not used very much in practice, and -this warning therefore mostly led to false positives. - -** Enriched mode - ---- -*** 'C-a' is by default no longer bound to 'beginning-of-line-text'. -This is so 'C-a' works as in other modes, and in particular holding -Shift while typing 'C-a', i.e. 'C-S-a', will now highlight the text. - -** Gravatar - ---- -*** New user option 'gravatar-service' for host to query for gravatars. -Defaults to 'libravatar', with 'unicornify' and 'gravatar' as options. - -** MH-E mail handler for Emacs - -Functions and variables related to handling junk mail have been -renamed to not associate color with sender quality. - -+++ -*** New names for mh-junk interactive functions. -Function 'mh-junk-whitelist' is renamed 'mh-junk-allowlist'. -Function 'mh-junk-blacklist' is renamed 'mh-junk-blocklist'. - -+++ -*** New binding for 'mh-junk-allowlist'. -The key binding for 'mh-junk-allowlist' is changed from 'J w' to 'J a'. -The old binding is supported but warns that it is obsolete. - -+++ -*** New names for some hooks. -'mh-whitelist-msg-hook' is renamed 'mh-allowlist-msg-hook'. -'mh-blacklist-msg-hook' is renamed 'mh-blocklist-msg-hook'. - -+++ -*** New names for some user options. -User option 'mh-whitelist-preserves-sequences-flag' is renamed -'mh-allowlist-preserves-sequences-flag'. - -+++ -*** New names for some faces. -Face 'mh-folder-blacklisted' is renamed 'mh-folder-blocklisted'. -Face 'mh-folder-whitelisted' is renamed 'mh-folder-allowlisted'. - -** Rcirc - -+++ -*** rcirc now supports SASL authentication. - ---- -*** rcirc connects asynchronously. - ---- -*** Integrate formatting into 'rcirc-send-string'. -The function now accepts a variable number of arguments. - -+++ -*** Deprecate 'defun-rcirc-command' in favour of 'rcirc-define-command'. -The new macro handles multiple and optional arguments. - ---- -*** Add basic IRCv3 support. -This includes support for the capabilities: 'server-time', 'batch', -'message-ids', 'invite-notify', 'multi-prefix' and 'standard-replies'. - ---- -*** Add mouse property support to 'rcirc-track-minor-mode'. - ---- -*** Improve support for IRC markup codes. - ---- -*** Check 'auth-sources' for server passwords. - -+++ -*** Implement repeated reconnection strategy. -See 'rcirc-reconnect-attempts'. - -** MPC - ---- -*** New command 'mpc-goto-playing-song'. -This command, bound to 'o' in any 'mpc-mode' buffer, moves point to -the currently playing song in the "*Songs*" buffer. - ---- -*** New user option 'mpc-cover-image-re'. -If non-nil, it is a regexp that should match a valid cover image. - -** Miscellaneous - ---- -*** 'shell-script-mode' now supports 'outline-minor-mode'. -The outline headings have lines that start with "###". - ---- -*** fileloop will now skip missing files instead of signalling an error. - ---- -*** 'tabulated-list-mode' can now restore original display order. -Many commands (like 'C-x C-b') are derived from 'tabulated-list-mode', -and that mode allows the user to sort on any column. There was -previously no easy way to get back to the original displayed order -after sorting, but giving a -1 numerical prefix to the sorting command -will now restore the original order. - ---- -*** 'M-left' and 'M-right' now move between columns in 'tabulated-list-mode'. - ---- -*** New variable 'hl-line-overlay-priority'. -This can be used to change the priority of the hl-line overlays. - -+++ -*** New command 'mailcap-view-file'. -This command will open a viewer based on the file type, as determined -by "~/.mailcap" and related files and variables. - ---- -*** New user option 'remember-diary-regexp'. - ---- -*** New user option 'remember-text-format-function'. - ---- -*** New user option 'authinfo-hide-elements'. -This can be set to nil to inhibit hiding passwords in ".authinfo" files. - ---- -*** 'hexl-mode' scrolling commands now heed 'next-screen-context-lines'. -Previously, 'hexl-scroll-down' and 'hexl-scroll-up' would scroll -up/down an entire window, but they now work more like the standard -scrolling commands. - ---- -*** New user option 'bibtex-unify-case-function'. -This new option allows the user to customize how case is converted -when unifying entries. - ---- -*** The user option 'bibtex-maintain-sorted-entries' now permits -user-defined sorting schemes. - ---- -*** New user option 'reveal-auto-hide'. -If non-nil (the default), revealed text is automatically hidden when -point leaves the text. If nil, the text is not hidden again. Instead -'M-x reveal-hide-revealed' can be used to hide all the revealed text. - ---- -*** New user option 'ffap-file-name-with-spaces'. -If non-nil, 'find-file-at-point' and friends will try to guess more -expansively to identify a file name with spaces. Default value is -nil. - ---- -*** Two new commands for centering in 'doc-view-mode'. -The new commands 'doc-view-center-page-horizontally' (bound to 'c h') -and 'doc-view-center-page-vertically' (bound to 'c v') center the page -horizontally and vertically, respectively. - ---- -*** 'tempo-define-template' can now re-assign templates to tags. -Previously, assigning a new template to an already defined tag had no -effect. - ---- -*** The width of the buffer-name column in 'list-buffers' is now dynamic. -The width now depends of the width of the window, but will never be -wider than the length of the longest buffer name, except that it will -never be narrower than 19 characters. - -+++ -*** New diary sexp 'diary-offset'. -It offsets another diary sexp by a number of days. This is useful -when for example your organization has a committee meeting two days -after every monthly meeting which takes place on the third Thursday, -or if you would like to attend a virtual meeting scheduled in a -different timezone causing a difference in the date. - ---- -*** The old non-SMIE indentation of 'sh-mode' has been removed. - ---- -*** 'mspools-show' is now autoloaded. - ---- -*** Loading dunnet.el in batch mode doesn't start the game any more. -Instead you need to do "emacs -f dun-batch" to start the game in -batch mode. - - -* New Modes and Packages in Emacs 28.1 - -+++ -** New transient mode 'repeat-mode' to allow shorter key sequences. -You can type 'C-x u u' instead of 'C-x u C-x u' to undo many changes, -'C-x o o' instead of 'C-x o C-x o' to switch several windows, -'C-x { { } } ^ ^ v v' to resize the selected window interactively, -'M-g n n p p' to navigate next-error matches. Any other key exits -transient mode and then is executed normally. 'repeat-exit-key' -defines an additional key to exit mode like 'isearch-exit' ('RET'). -The user option 'repeat-exit-timeout' specifies the number of -seconds of idle time to break the repetition chain automatically. -With 'repeat-keep-prefix' you can keep the prefix arg of the previous -command. For example, this can help to reverse the window navigation -direction with e.g. 'C-x o M-- o o'. Also it can help to set a new -step with e.g. 'C-x { C-5 { { {', which will set the window resizing -step to 5 columns. - ---- -** New themes 'modus-vivendi' and 'modus-operandi'. -These themes are designed to conform with the highest standard for -color-contrast accessibility (WCAG AAA). You can load either of them -using 'M-x customize-themes' or 'load-theme' from your init file. -Consult the Modus Themes Info manual for more information on the user -options they provide. - -** Dictionary mode -This is a mode for searching a RFC 2229 dictionary server. -'dictionary' opens a buffer for starting operations. -'dictionary-search' performs a lookup for a word. It also supports a -'dictionary-tooltip-mode' which performs a lookup of the word under -the mouse in 'dictionary-tooltip-dictionary' (which must be customized -first). - ---- -** Lisp Data mode -The new command 'lisp-data-mode' enables a major mode for buffers -composed of Lisp symbolic expressions that do not form a computer -program. The ".dir-locals.el" file is automatically set to use this -mode, as are other data files produced by Emacs. - -+++ -** New global mode 'global-goto-address-mode'. -This will enable 'goto-address-mode' in all buffers. - -** transient.el -This library implements support for powerful keyboard-driven menus. -Such menus can be used as simple visual command dispatchers. More -complex menus take advantage of infix arguments, which are somewhat -similar to prefix arguments, but are more flexible and discoverable. - -** hierarchy.el -This library can create, query, navigate and display hierarchical -structures. - ---- -** New major mode for displaying the "etc/AUTHORS" file. -This new 'etc-authors-mode' provides font-locking for displaying the -"etc/AUTHORS" file from the Emacs distribution, and not much else. +* Installation Changes in Emacs 29.1 -* Incompatible Editing Changes in Emacs 28.1 - ---- -** 'toggle-truncate-lines' now disables 'visual-line-mode'. -This is for symmetry with 'visual-line-mode', which disables -'truncate-lines'. - ---- -** 'electric-indent-mode' now also indents inside strings and comments. -(This only happens when indentation function also supports this.) - -To recover the previous behavior you can use: - - (add-hook 'electric-indent-functions - (lambda (_) (if (nth 8 (syntax-ppss)) 'no-indent))) - ---- -** The 'M-o' ('facemenu-keymap') global binding has been removed. -To restore the old binding, say something like: - - (require 'facemenu) - (define-key global-map "\M-o" 'facemenu-keymap) - (define-key facemenu-keymap "\es" 'center-line) - (define-key facemenu-keymap "\eS" 'center-paragraph) - -The last two lines are not strictly necessary if you don't care about -having those two commands on the 'M-o' keymap; see the next section. - ---- -** The 'M-o M-s' and 'M-o M-S' global bindings have been removed. -Use 'M-x center-line' and 'M-x center-paragraph' instead. See the -previous section for how to get back the old bindings. Alternatively, -if you only want these two commands to have global bindings they had -before, you can add the following to your init file: - - (define-key global-map "\M-o\M-s" 'center-line) - (define-key global-map "\M-o\M-S" 'center-paragraph) - ---- -** The 'M-o M-o' global binding has been removed. -Use 'M-x font-lock-fontify-block' instead, or the new 'C-x x f' -command, which updates the syntax highlighting in the current buffer. - ---- -** The escape sequence '\e[29~' in Xterm is now mapped to 'menu'. -Xterm sends this sequence for both 'F16' and 'Menu' keys -It used to be mapped to 'print' but we couldn't find a terminal -that uses this sequence for any kind of 'Print' key. -This makes the Menu key (see https://en.wikipedia.org/wiki/Menu_key) -work for 'context-menu-mode' in Xterm. - ---- -** New user option 'xterm-store-paste-on-kill-ring'. -If non-nil (the default), Emacs pushes pasted text onto the kill ring -(if using an xterm-like terminal that supports bracketed paste). -Setting this to nil inhibits that. - ---- -** 'vc-print-branch-log' shows the change log from its root directory. -It previously used to use the default directory. - ---- -** 'project-shell' and 'shell' now use 'pop-to-buffer-same-window'. -This is to keep the same behavior as Eshell. - ---- -** In 'nroff-mode', 'center-line' is no longer bound to a key. -The original key binding was 'M-s', which interfered with I-search, -since the latter uses 'M-s' as a prefix key of the search prefix map. - ---- -** In 'f90-mode', the backslash character ('\') no longer escapes. -For about a decade, the backslash character has no longer had a -special escape syntax in Fortran F90. To get the old behavior back, -say something like: - - (modify-syntax-entry ?\\ "\\" f90-mode-syntax-table) - -+++ -** Setting 'fill-column' to nil is obsolete. -This undocumented use of 'fill-column' is now obsolete. To disable -auto filling, turn off 'auto-fill-mode' instead. - -For instance, you could add something like the following to your init -file: - - (add-hook 'foo-mode-hook (lambda () (auto-fill-mode -1)) +* Startup Changes in Emacs 29.1 -* Incompatible Lisp Changes in Emacs 28.1 - -+++ -** Emacs now prints a backtrace when signaling an error in batch mode. -This makes debugging Emacs Lisp scripts run in batch mode easier. To -get back the old behavior, set the new variable -'backtrace-on-error-noninteractive' to a nil value. - ---- -** Some floating-point numbers are now handled differently by the Lisp reader. -In previous versions of Emacs, numbers with a trailing dot and an exponent -were read as integers and the exponent ignored: 2.e6 was interpreted as the -integer 2. Such numerals are now read as floats with the exponent included: -2.e6 is now read as the floating-point value 2000000.0. -That is, '(read-from-string "1.e3")' => '(1000.0 . 4)' now. - ---- -** 'equal' no longer examines some contents of window configurations. -Instead, it considers window configurations to be equal only if they -are 'eq'. To compare contents, use 'compare-window-configurations' -instead. This change helps fix a bug in 'sxhash-equal', which returned -incorrect hashes for window configurations and some other objects. - -+++ -** The 'lexical-binding' local variable is always enabled. -Previously, if 'enable-local-variables' was nil, a 'lexical-binding' -local variable would not be heeded. This has now changed, and a file -with a 'lexical-binding' cookie is always heeded. To revert to the -old behavior, set 'permanently-enabled-local-variables' to nil. - -+++ -** '&rest' in argument lists must always be followed by a variable name. -Omitting the variable name after '&rest' was previously tolerated in -some cases but not consistently so; it could lead to crashes or -outright wrong results. Since the utility was marginal at best, it is -now an error to omit the variable. - ---- -** 'kill-all-local-variables' has changed how it handles non-symbol hooks. -The function is documented to eliminate all buffer-local bindings -except variables with a 'permanent-local' property, or hooks that -have elements with a 'permanent-local-hook' property. In addition, it -would also keep lambda expressions in hooks sometimes. The latter has -now been changed: The function will now also remove these. - -+++ -** Temporary buffers no longer run certain buffer hooks. -The macros 'with-temp-buffer' and 'with-temp-file' no longer run the -hooks 'kill-buffer-hook', 'kill-buffer-query-functions', and -'buffer-list-update-hook' for the temporary buffers they create. This -avoids slowing them down when a lot of these hooks are defined. - -+++ -** New face 'child-frame-border' and frame parameter 'child-frame-border-width'. -The face and width of child frames borders can now be determined -separately from those of normal frames. To minimize backward -incompatibility, child frames without a 'child-frame-border-width' -parameter will fall back to using 'internal-border-width'. However, -the new 'child-frame-border' face does constitute a breaking change -since child frames' borders no longer use the 'internal-border' face. - ---- -** 'run-at-time' now tries harder to implement the t TIME parameter. -If TIME is t, the timer runs at an integral multiple of REPEAT. -(I.e., if given a REPEAT of 60, it'll run at 08:11:00, 08:12:00, -08:13:00.) However, when a machine goes to sleep (or otherwise didn't -get a time slot to run when the timer was scheduled), the timer would -then fire every 60 seconds after the time the timer was fired. This -has now changed, and the timer code now recomputes the integral -multiple every time it runs, which means that if the laptop wakes at -08:16:43, it'll fire at that time, but then at 08:17:00, 08:18:00... - ---- -** 'parse-partial-sexp' now signals an error if TO is smaller than FROM. -Previously, this would lead to the function interpreting FROM as TO and -vice versa, which would be confusing when passing in OLDSTATE, which -refers to the old state at FROM. - -+++ -** 'global-mode-string' constructs should end with a space. -This was previously not formalized, which led to combinations of modes -displaying data "smushed together" on the mode line. - -+++ -** 'overlays-in' now handles zero-length overlays slightly differently. -Previously, zero-length overlays at the end of the buffer were included -in the result (if the region queried for stopped at that position). -The same was not the case if the buffer had been narrowed to exclude -the real end of the buffer. This has now been changed, and -zero-length overlays at 'point-max' are always included in the results. - ---- -** 'replace-match' now runs modification hooks slightly later. -The function is documented to leave point after the replacement text, -but this was not always the case if a modification hook inserted text -in front of the replaced text -- 'replace-match' would instead leave -point where the end of the inserted text would have been before the -hook ran. 'replace-match' now always leaves point after the -replacement text. - -+++ -** 'completing-read-default' sets completion variables buffer-locally. -'minibuffer-completion-table' and related variables are now set buffer-locally -in the minibuffer instead of being set via a global let-binding. - ---- -** XML serialization functions now reject invalid characters. -Previously, 'xml-print' would produce invalid XML when given a string -with characters that are not valid in XML (see -https://www.w3.org/TR/xml/#charsets). Now it rejects such strings. - ---- -** JSON - ---- -*** JSON number parsing is now stricter. -Numbers with a leading plus sign, leading zeros, or a missing integer -component are now rejected by 'json-read' and friends. This makes -them more compliant with the JSON specification and consistent with -the native JSON parsing functions. - ---- -*** JSON functions support the semantics of RFC 8259. -The JSON functions 'json-serialize', 'json-insert', -'json-parse-string', and 'json-parse-buffer' now implement some of the -semantics of RFC 8259 instead of the earlier RFC 4627. In particular, -these functions now accept top-level JSON values that are neither -arrays nor objects. - ---- -*** Some JSON encoding functions are now obsolete. -The functions 'json-encode-number', 'json-encode-hash-table', -'json-encode-key', and 'json-encode-list' are now obsolete. - -The first two are kept as aliases of 'json-encode', which should be -used instead. Uses of 'json-encode-list' should be changed to call -one of 'json-encode', 'json-encode-alist', 'json-encode-plist', or -'json-encode-array' instead. - -+++ -*** Native JSON functions now signal an error if libjansson is unavailable. -This affects 'json-serialize', 'json-insert', 'json-parse-string', -and 'json-parse-buffer'. This can happen if Emacs was compiled with -libjansson, but the DLL cannot be found and/or loaded by Emacs at run -time. Previously, Emacs would display a message and return nil in -these cases. - -+++ -** The use of positional arguments in 'define-minor-mode' is obsolete. -These were actually rendered obsolete in Emacs 21 but were never -marked as such. - ---- -** 'pcomplete-ignore-case' is now an obsolete alias of 'completion-ignore-case'. - -+++ -** 'completions-annotations' face is not used when the caller puts own face. -This affects the suffix specified by completion 'annotation-function'. - -+++ -** An active minibuffer now has major mode 'minibuffer-mode'. -This is instead of the erroneous 'minibuffer-inactive-mode' it -formerly had. - ---- -** 'make-text-button' no longer modifies text properties of its first argument. -When its first argument is a string, 'make-text-button' no longer -modifies the string's text properties; instead, it uses and returns -a copy of the string. This helps avoid trouble when strings are -shared or constants. - -+++ -** Some properties from completion tables are now preserved. -If 'minibuffer-allow-text-properties' is non-nil, doing completion -over a table of strings with properties will no longer remove all the -properties before returning. This affects things like 'completing-read'. - ---- -** 'dns-query' now consistently uses Lisp integers to represent integers. -Formerly it made an exception for integer components of SOA records, -because SOA serial numbers can exceed fixnum ranges on 32-bit platforms. -Emacs now supports bignums so this old glitch is no longer needed. - -+++ -** The '&define' keyword in an Edebug specification now disables backtracking. -The implementation was buggy, and multiple '&define' forms in an '&or' -form should be exceedingly rare. See the Info node "(elisp) Backtracking" in -the Emacs Lisp reference manual for background. - -+++ -** The error 'ftp-error' belongs also to category 'remote-file-error'. - -+++ -** The WHEN argument of 'make-obsolete' and related functions is mandatory. -The use of those functions without a WHEN argument was marked obsolete -back in Emacs 23.1. The affected functions are: 'make-obsolete', -'define-obsolete-function-alias', 'make-obsolete-variable', -'define-obsolete-variable-alias'. - -+++ -** 'inhibit-nul-byte-detection' is renamed to 'inhibit-null-byte-detection'. - ---- -** Some functions are no longer considered safe by 'unsafep': -'replace-regexp-in-string', 'catch', 'throw', 'error', 'signal' -and 'play-sound-file'. - ---- -** 'sql-*-statement-starters' are no longer user options. -These variables describe facts about the SQL standard and -product-specific additions. There should be no need for users to -customize them. - ---- -** Some locale-related variables have been removed. -The Lisp variables 'previous-system-messages-locale' and -'previous-system-time-locale' have been removed, as they were created -by mistake and were not useful to Lisp code. - ---- -** Function 'lm-maintainer' is replaced with 'lm-maintainers'. -The former is now declared obsolete. - -+++ -** 'facemenu.el' is no longer preloaded. -To use functions/variables from the package, you now have to say -'(require 'facemenu)' or similar. - ---- -** 'facemenu-color-alist' is now obsolete, and is not used. - ---- -** The variable 'keyboard-type' is obsolete and not dynamically scoped any more. - -+++ -** The 'values' variable is now obsolete. -Using it just contributes to the growth of the Emacs memory -footprint. - ---- -** The 'load-dangerous-libraries' variable is now obsolete. -It was used to allow loading Lisp libraries compiled by XEmacs, a -modified version of Emacs which is no longer actively maintained. -This is no longer supported, and setting this variable has no effect. - -+++ -** The macro 'with-displayed-buffer-window' is now obsolete. -Use macro 'with-current-buffer-window' with action alist entry 'body-function'. - ---- -** The rfc2368.el library is now obsolete. -Use rfc6068.el instead. The main difference is that -'rfc2368-parse-mailto-url' and 'rfc2368-unhexify-string' assumed that -the strings were all-ASCII, while 'rfc6068-parse-mailto-url' and -'rfc6068-unhexify-string' parse UTF-8 strings. - ---- -** The inversion.el library is now obsolete. - ---- -** The metamail.el library is now obsolete. - -** Edebug changes - ---- -*** 'get-edebug-spec' is obsolete, replaced by 'edebug-get-spec'. - -+++ -*** The spec operator ':name NAME' is obsolete, use '&name' instead. - -+++ -*** The spec element 'function-form' is obsolete, use 'form' instead. - -+++ -*** New function 'def-edebug-elem-spec' to define Edebug spec elements. -These used to be defined with 'def-edebug-spec' thus conflating the -two name spaces, which lead to name collisions. -The use of 'def-edebug-spec' to define Edebug spec elements is -declared obsolete. - ---- -** The sb-image.el library is now obsolete. -This was a compatibility kludge which is no longer needed. - ---- -** Some libraries obsolete since Emacs 23 have been removed: -ledit.el, lmenu.el, lucid.el and old-whitespace.el. - ---- -** Some functions and variables obsolete since Emacs 23 have been removed: -'GOLD-map', 'advertised-xscheme-send-previous-expression', -'allout-init', 'bookmark-jump-noselect', -'bookmark-read-annotation-text-func', 'buffer-menu-mode-hook', -'c-forward-into-nomenclature', 'char-coding-system-table', -'char-valid-p', 'charset-bytes', 'charset-id', 'charset-list', -'choose-completion-delete-max-match', 'complete-in-turn', -'completion-base-size', 'completion-common-substring', -'crm-minibuffer-complete', 'crm-minibuffer-complete-and-exit', -'crm-minibuffer-completion-help', 'custom-mode', 'custom-mode-hook', -'define-key-rebound-commands', 'define-mode-overload-implementation', -'detect-coding-with-priority', 'dirtrack-debug', -'dirtrack-debug-toggle', 'dynamic-completion-table', -'easy-menu-precalculate-equivalent-keybindings', -'epa-display-verify-result', 'epg-passphrase-callback-function', -'erc-announced-server-name', 'erc-default-coding-system', -'erc-process', 'erc-send-command', 'eshell-report-bug', -'eval-next-after-load', 'exchange-dot-and-mark', 'ffap-bug', -'ffap-submit-bug', 'ffap-version', 'file-cache-mouse-choose-completion', -'forward-point', 'generic-char-p', 'global-highlight-changes', -'hi-lock-face-history', 'hi-lock-regexp-history', -'highlight-changes-active-string', 'highlight-changes-initial-state', -'highlight-changes-passive-string', -'icalendar--datetime-to-noneuropean-date', 'image-mode-maybe', -'imenu-example--name-and-position', 'ispell-aspell-supports-utf8', -'lisp-mode-auto-fill', 'locate-file-completion', 'make-coding-system', -'menu-bar-files-menu', 'minibuffer-local-must-match-filename-map', -'mouse-choose-completion', 'mouse-major-mode-menu', -'mouse-popup-menubar', 'mouse-popup-menubar-stuff', -'newsticker-groups-filename', 'nnir-swish-e-index-file', -'nnmail-fix-eudora-headers', 'non-iso-charset-alist', -'nonascii-insert-offset', 'nonascii-translation-table', -'password-read-and-add', 'pre-abbrev-expand-hook', 'princ-list', -'print-help-return-message', 'process-filter-multibyte-p', -'read-file-name-predicate', 'remember-buffer', 'rmail-highlight-face', -'rmail-message-filter', 'semantic-after-idle-scheduler-reparse-hooks', -'semantic-after-toplevel-bovinate-hook', -'semantic-before-idle-scheduler-reparse-hooks', -'semantic-before-toplevel-bovination-hook', -'semantic-bovinate-from-nonterminal-full', -'semantic-bovinate-region-until-error', 'semantic-bovinate-toplevel', -'semantic-bovination-working-type', -'semantic-decorate-pending-decoration-hooks', -'semantic-edits-incremental-reparse-failed-hooks', -'semantic-eldoc-current-symbol-info', 'semantic-expand-nonterminal', -'semantic-file-token-stream', 'semantic-find-dependency', -'semantic-find-nonterminal', 'semantic-flex', 'semantic-flex-buffer', -'semantic-flex-keyword-get', 'semantic-flex-keyword-p', -'semantic-flex-keyword-put', 'semantic-flex-keywords', -'semantic-flex-list', 'semantic-flex-make-keyword-table', -'semantic-flex-map-keywords', 'semantic-flex-token-end', -'semantic-flex-token-start', 'semantic-flex-token-text', -'semantic-imenu-bucketize-type-parts', -'semantic-imenu-expand-type-parts', 'semantic-imenu-expandable-token', -'semantic-init-db-hooks', 'semantic-init-hooks', -'semantic-init-mode-hooks', 'semantic-java-prototype-nonterminal', -'semantic-nonterminal-abstract', 'semantic-nonterminal-full-name', -'semantic-nonterminal-leaf', 'semantic-nonterminal-protection', -'semantic-something-to-stream', 'semantic-tag-make-assoc-list', -'semantic-token-type-parent', 'semantic-toplevel-bovine-cache', -'semantic-toplevel-bovine-table', 'semanticdb-mode-hooks', -'set-coding-priority', 'set-process-filter-multibyte', -'shadows-compare-text-p', 'shell-dirtrack-toggle', -'speedbar-navigating-speed', 'speedbar-update-speed', 't-mouse-mode', -'term-dynamic-simple-complete', 'tooltip-hook', 'tpu-have-ispell', -'url-generate-unique-filename', 'url-temporary-directory', -'vc-arch-command', 'vc-default-working-revision' (variable), -'vc-mtn-command', 'vc-revert-buffer', 'vc-workfile-version', -'vcursor-toggle-vcursor-map', 'w32-focus-frame', 'w32-select-font', -'wisent-lex-make-token-table'. - ---- -** Some functions and variables obsolete since Emacs 22 have been removed: -'erc-current-network', 'gnus-article-hide-pgp-hook', -'gnus-inews-mark-gcc-as-read', 'gnus-treat-display-xface', -'gnus-treat-strip-pgp', 'nnmail-spool-file'. - ---- -** The obsolete function 'thread-alive-p' has been removed. - ---- -** The variable 'force-new-style-backquotes' has been removed. -This removes the final remaining trace of old-style backquotes. - ---- -** Some obsolete variable and function aliases in dbus.el have been removed. -In Emacs 24.3, the variable 'dbus-event-error-hooks' was renamed to -'dbus-event-error-functions' and the function -'dbus-call-method-non-blocking' was renamed to 'dbus-call-method'. -The old names, which were kept as obsolete aliases of the new names, -have now been removed. - ---- -** 'find-function-source-path' renamed and re-documented. -The 'find-function' command (and various related commands) were -documented to respect 'find-function-source-path', and to search for -objects in files specified by that variable. It's unclear when this -actually changed, but at some point (perhaps decades ago) these -commands started using 'load-history' to determine where symbols had -been defined (which is much faster). The doc strings of all the -affected function has been updated. 'find-function-source-path' was -still being used by 'find-library' and related commands, so the -variable has been renamed to 'find-library-source-path', and -'find-function-source-path' is now an obsolete variable alias. - ---- -** The macro 'vc-call' no longer evaluates its second argument twice. +* Changes in Emacs 29.1 -* Lisp Changes in Emacs 28.1 - -+++ -** The 'interactive' syntax has been extended to allow listing applicable modes. -Forms like '(interactive "p" dired-mode)' can be used to annotate the -commands as being applicable for modes derived from 'dired-mode', -or if the mode is a minor mode, that the current buffer has that -minor mode activated. Note that using this form will create byte code -that is not compatible with byte code in previous Emacs versions. - -+++ -** New forms to declare how completion should happen has been added. -'(declare (completion PREDICATE))' can be used as a general predicate -to say whether the command should be present when completing with -'M-x TAB'. '(declare (modes MODE...))' can be used as a short-hand -way of saying that the command should be present when completing from -buffers in major modes derived from MODE..., or, if it's a minor mode, -whether that minor mode is enabled in the current buffer. - -+++ -** 'define-minor-mode' now takes an ':interactive' argument. -This can be used for specifying which modes this minor mode is meant -for, or to make the new minor mode non-interactive. The default value -is t. - -+++ -** 'define-derived-mode' now takes an ':interactive' argument. -This can be used to control whether the defined mode is a command -or not, and is useful when defining commands that aren't meant to be -used by users directly. - -+++ -** 'define-globalized-minor-mode' now takes a ':predicate' parameter. -This can be used to control which major modes the minor mode should be -used in. - -+++ -** 'condition-case' now allows for a success handler. -It is written as '(:success BODY...)' where BODY is executed -whenever the protected form terminates without error, with the -specified variable bound to the value of the protected form. - -+++ -** New function 'benchmark-call' to measure the execution time of a function. -Additionally, the number of repetitions can be expressed as a minimal duration -in seconds. - -+++ -** The value thrown to the 'exit' label can now be a function. -This is in addition to values t or nil. If the value is a function, -the command loop will call it with zero arguments before returning. - -+++ -** The behavior of 'format-spec' is now closer to that of 'format'. -In order for the two functions to behave more consistently, -'format-spec' now pads and truncates based on string width rather than -length, and also supports format specifications that include a -truncating precision field, such as "%.2a". - ---- -** 'defvar' detects the error of defining a variable currently lexically bound. -Such mixes are always signs that the outer lexical binding was an -error and should have used dynamic binding instead. - ---- -** New variable 'inhibit-mouse-event-check'. -If bound to non-nil, a command with '(interactive "e")' doesn't signal -an error when invoked by input event that is not a mouse click (e.g., -a key sequence). - ---- -** New variable 'redisplay-skip-initial-frame' to enable batch redisplay tests. -Setting it to nil forces the redisplay to do its job even in the -initial frame used in batch mode. - -+++ -** Doc strings can now link to customization groups. -Text like "customization group `whitespace'" will be made into a -button. When clicked, it will open a Custom buffer displaying that -customization group. - -+++ -** Doc strings can now link to man pages. -Text like "man page `chmod(1)'" will be made into a button. When -clicked, it will open a Man mode buffer displaying that man page. - -+++ -** Buffers can now be created with certain hooks disabled. -The functions 'get-buffer-create' and 'generate-new-buffer' accept a -new optional argument INHIBIT-BUFFER-HOOKS. If non-nil, the new -buffer does not run the hooks 'kill-buffer-hook', -'kill-buffer-query-functions', and 'buffer-list-update-hook'. This -avoids slowing down internal or temporary buffers that are never -presented to users or passed on to other applications. - -+++ -** New command 'make-directory-autoloads'. -This does the same as the old command 'update-directory-autoloads', -but has different semantics: Instead of passing in the output file via -the dynamically bound 'generated-autoload-file' variable, the output -file is now a explicit parameter. - ---- -** Dragging a file into Emacs pushes the file name onto 'file-name-history'. - ---- -** The 'easymenu' library is now preloaded. - ---- -** The 'iso-transl' library is now preloaded. -This means that keystrokes like 'Alt-[' are defined by default, -instead of only becoming available after doing (for instance) -'C-x 8 '. - ---- -** ':safe' settings in 'defcustom' are now propagated to the loaddefs files. - -+++ -** New ':type' for 'defcustom' for nonnegative integers. -The new 'natnum' type can be used for options that should be -nonnegative integers. - -+++ -** ERT can now output more verbose test failure reports. -If the 'EMACS_TEST_VERBOSE' environment variable is set, failure -summaries will include the failing condition. - -** Byte compiler changes - -+++ -*** New byte-compiler check for missing dynamic variable declarations. -It is meant as an (experimental) aid for converting Emacs Lisp code -to lexical binding, where dynamic (special) variables bound in one -file can affect code in another. For details, see the manual section -"(elisp) Converting to Lexical Binding". - -+++ -*** 'byte-recompile-directory' can now compile symlinked ".el" files. -This is achieved by giving a non-nil FOLLOW-SYMLINKS parameter. - ---- -*** The byte-compiler now warns about too wide documentation strings. -By default, it will warn if a documentation string is wider than the -largest of 'byte-compile-docstring-max-column' or 'fill-column' -characters. - -+++ -*** 'byte-compile-file' optional argument LOAD is now obsolete. -To load the file after byte-compiling, add a call to 'load' from Lisp -or use 'M-x emacs-lisp-byte-compile-and-load' interactively. - -** Macroexp - ---- -*** New function 'macroexp-file-name' to know the name of the current file. - ---- -*** New function 'macroexp-compiling-p' to know if we're compiling. - ---- -*** New function 'macroexp-warn-and-return' to help emit warnings. -This used to be named 'macroexp--warn-and-return' and has proved useful -and well-behaved enough to lose the "internal" marker. - -** map.el - ---- -*** Alist keys are now consistently compared with 'equal' by default. -Until now, 'map-elt' and 'map-delete' compared alist keys with 'eq' by -default. They now use 'equal' instead, for consistency with -'map-put!' and 'map-contains-key'. - -*** Pcase 'map' pattern added keyword symbols abbreviation. -A pattern like '(map :sym)' binds the map's value for ':sym' to 'sym', -equivalent to '(map (:sym sym))'. - ---- -*** The function 'map-copy' now uses 'copy-alist' on alists. -This is a slightly deeper copy than the previous 'copy-sequence'. - ---- -*** The function 'map-contains-key' now supports plists. - ---- -*** More consistent duplicate key handling in 'map-merge-with'. -Until now, 'map-merge-with' promised to call its function argument -whenever multiple maps contained 'eql' keys. However, this did not -always coincide with the keys that were actually merged, which could -be 'equal' instead. The function argument is now called whenever keys -are merged, for greater consistency with 'map-merge' and 'map-elt'. - -** pcase - -+++ -*** The 'or' pattern now binds the union of the vars of its sub-patterns. -If a variable is not bound by the subpattern that matched, it gets bound -to nil. This was already sometimes the case, but it is now guaranteed. - -+++ -*** The 'pred' pattern can now take the form '(pred (not FUN))'. -This is like '(pred (lambda (x) (not (FUN x))))' but results -in better code. - ---- -*** New function 'pcase-compile-patterns' to write other macros. - -+++ -*** Added 'cl-type' pattern. -The new 'cl-type' pattern compares types using 'cl-typep', which allows -comparing simple types like '(cl-type integer)', as well as forms like -'(cl-type (integer 0 10))'. - -+++ -*** New macro 'pcase-setq'. -This macro is the 'setq' equivalent of 'pcase-let', which allows for -destructuring patterns in a 'setq' form. - -** Edebug - -*** Edebug specification lists can use some new keywords: - -+++ -**** '&interpose SPEC FUN ARGS..' lets FUN control parsing after SPEC. -More specifically, FUN is called with 'HEAD PF ARGS..' where -PF is a parsing function that expects a single argument (the specs to -use) and HEAD is the code that matched SPEC. - -+++ -**** '&error MSG' unconditionally aborts the current edebug instrumentation. - -+++ -**** '&name SPEC FUN' extracts the current name from the code matching SPEC. - -** Dynamic modules changes - -+++ -*** Type aliases for module functions and finalizers. -The module header 'emacs-module.h' now contains type aliases -'emacs_function' and 'emacs_finalizer' for module functions and -finalizers, respectively. - -+++ -*** Module functions can now be made interactive. -Use 'make_interactive' to give a module function an interactive -specification. - -+++ -*** Module functions can now install an optional finalizer. -The finalizer is called when the function object is garbage-collected. -Use 'set_function_finalizer' to set the finalizer and -'get_function_finalizer' to retrieve it. - -+++ -*** Modules can now open a channel to an existing pipe process. -Modules can use the new module function 'open_channel' to do that. -On capable systems, modules can use this functionality to -asynchronously send data back to Emacs. - -+++ -*** A new module API 'make_unibyte_string'. -It can be used to create Lisp strings with arbitrary byte sequences -(a.k.a. "raw bytes"). - -+++ -** Shorthands for Lisp symbols. -Shorthands are a general purpose namespacing system to make Emacs -Lisp's symbol-naming etiquette easier to use. A shorthand is any -symbolic form found in Lisp source that "abbreviates" a symbol's print -name. Among other applications, this feature can be used to avoid -name clashes and namespace pollution by renaming an entire file's -worth of symbols with proper and longer prefixes, without actually -touching the Lisp source. For details, see the manual section -"(elisp) Shorthands". - -+++ -** New function 'string-search'. -This function takes two string parameters and returns the position of -the first instance of the former string in the latter. - -+++ -** New function 'string-replace'. -This function works along the line of 'replace-regexp-in-string', but -it matches on fixed strings instead of regexps, and does not change -the global match state. - -+++ -** New function 'ensure-list'. -This function makes a list of its object if it's not a list already. -If it's already a list, the list is returned as is. - -+++ -** New function 'split-string-shell-command'. -This splits a shell command string into separate components, -respecting quoting with single ('like this') and double ("like this") -quotes, as well as backslash quoting (like\ this). - -+++ -** New function 'string-clean-whitespace'. -This removes whitespace from a string. - -+++ -** New function 'string-fill'. -Word-wrap a string so that no lines are longer that a specific length. - -+++ -** New function 'string-limit'. -Return (up to) a specific substring length. - -+++ -** New function 'string-lines'. -Return a list of strings representing the individual lines in a -string. - -+++ -** New function 'string-pad'. -Pad a string to a specific length. - -+++ -** New function 'string-chop-newline'. -Remove a trailing newline from a string. - -+++ -** New function 'replace-regexp-in-region'. - -+++ -** New function 'replace-string-in-region'. - -+++ -** New function 'file-name-with-extension'. -This function allows a canonical way to set/replace the extension of a -file name. - -+++ -** New function 'file-modes-number-to-symbolic' to convert a numeric -file mode specification into symbolic form. - -+++ -** New function 'file-name-concat'. -This appends file name components to a directory name and returns the -result. - -+++ -** New function 'file-backup-file-names'. -This function returns the list of file names of all the backup files -for the specified file. - -+++ -** New function 'directory-empty-p'. -This predicate tests whether a given file name is an accessible -directory and whether it contains no other directories or files. - -+++ -** New function 'buffer-local-boundp'. -This predicate says whether a symbol is bound in a specific buffer. - -+++ -** New function 'always'. -This is identical to 'ignore', but returns t instead. - -+++ -** New function 'sxhash-equal-including-properties'. -This is identical to 'sxhash-equal' but also accounts for string -properties. - ---- -** New function 'buffer-line-statistics'. -This function returns some statistics about the line lengths in a buffer. - ---- -** New function 'color-values-from-color-spec'. -This can be used to parse RGB color specs in several formats and -convert them to a list '(R G B)' of primary color values. - ---- -** New function 'custom-add-choice'. -This function can be used by modes to add elements to the -'choice' customization type of a variable. - ---- -** New function 'decoded-time-period'. -It interprets a decoded time structure as a period and returns the -equivalent period in seconds. - -+++ -** New function 'dom-print'. - -+++ -** New function 'dom-remove-attribute'. - ---- -** New function 'dns-query-asynchronous'. -It takes the same parameters as 'dns-query', but adds a callback -parameter. - -** New function 'garbage-collect-maybe' to trigger GC early. - ---- -** New function 'get-locale-names'. -This utility function returns a list of names of locales available on -the current system. - -+++ -** New function 'insert-into-buffer'. -This inserts the contents of the current buffer into another buffer. - -+++ -** New function 'json-available-p'. -This predicate returns non-nil if Emacs is built with libjansson -support, and it is available on the current system. - ---- -** New function 'mail-header-parse-addresses-lax'. -This takes a comma-separated string and returns a list of mail/name -pairs. - ---- -** New function 'mail-header-parse-address-lax'. -Parse a string as a mail address-like string. - ---- -** New function 'make-separator-line'. -Make a string appropriate for usage as a visual separator line. - -+++ -** New function 'object-intervals'. -This function returns a copy of the list of intervals (i.e., text -properties) in the object in question (which must either be a string -or a buffer). - -+++ -** New function 'process-lines-ignore-status'. -This is like 'process-lines', but does not signal an error if the -return status is non-zero. 'process-lines-handling-status' has also -been added, and takes a callback to handle the return status. - -+++ -** New function 'require-theme'. -This function is like 'require', but searches 'custom-theme-load-path' -instead of 'load-path'. It can be used by Custom themes to load -supporting Lisp files when 'require' is unsuitable. - -+++ -** New function 'seq-union'. -This function takes two sequences and returns a list of all elements -that appear in either of them, with no two elements that compare equal -appearing in the result. - -+++ -** New function 'syntax-class-to-char'. -This does almost the opposite of 'string-to-syntax' -- it returns the -syntax descriptor (a character) given a raw syntax descriptor (an -integer). - -+++ -** New functions 'null-device' and 'path-separator'. -These functions return the connection local value of the respective -variables. This can be used for remote hosts. - -+++ -** New predicate functions 'length<', 'length>' and 'length='. -Using these functions may be more efficient than using 'length' (if -the length of a (long) list is being computed just to compare this -length to a number). - -+++ -** New macro 'dlet' to dynamically bind variables. - -+++ -** New macro 'with-existing-directory'. -This macro binds 'default-directory' to some other existing directory -if 'default-directory' doesn't exist, and then executes the body forms. - -+++ -** New variable 'current-minibuffer-command'. -This is like 'this-command', but it is bound recursively when entering -the minibuffer. - -+++ -** New variable 'inhibit-interaction' to make user prompts signal an error. -If this is bound to something non-nil, functions like -'read-from-minibuffer', 'read-char' (and related) will signal an -'inhibited-interaction' error. - ---- -** New variable 'indent-line-ignored-functions'. -This allows modes to cycle through a set of indentation functions -appropriate for those modes. - -+++ -** New variable 'print-integers-as-characters' modifies integer printing. -If this variable is non-nil, character syntax is used for printing -numbers when this makes sense, such as '?A' for 65. - -+++ -** New variable 'tty-menu-calls-mouse-position-function'. -This controls whether 'mouse-position-function' is called by functions -that retrieve the mouse position when that happens during TTY menu -handling. Lisp programs that set 'mouse-position-function' should -also set this variable non-nil if they are compatible with the tty -menu handling. - -+++ -** New variables that hold default buffer names for shell output. -The new constants 'shell-command-buffer-name' and -'shell-command-buffer-name-async' store the default buffer names -for the output of, respectively, synchronous and async shell -commands. - ---- -** New variables 'read-char-choice-use-read-key' and 'y-or-n-p-use-read-key'. -When non-nil, then functions 'read-char-choice' and 'y-or-n-p' -(respectively) use the function 'read-key' to read a character instead -of using the minibuffer. - -+++ -** New variable 'global-minor-modes'. -This variable holds a list of currently enabled global minor modes (as -a list of symbols). - -+++ -** New buffer-local variable 'local-minor-modes'. -This permanently buffer-local variable holds a list of currently -enabled non-global minor modes in the current buffer (as a list of -symbols). - -+++ -** New completion function 'affixation-function' to add prefix/suffix. -It accepts a list of completions and should return a list where -each element is a list with three elements: a completion, -a prefix string, and a suffix string. - -+++ -** New completion function 'group-function' for grouping candidates. -It takes two arguments: a completion candidate and a 'transform' flag. - -+++ -** New error symbol 'minibuffer-quit'. -Signaling it has almost the same effect as 'quit' except that it -doesn't cause keyboard macro termination. - -+++ -** New error 'remote-file-error', a subcategory of 'file-error'. -It is signaled if a remote file operation fails due to internal -reasons, and could block Emacs. It does not replace 'file-error' -signals for the usual cases. Timers, process filters and process -functions, which run remote file operations, shall protect themselves -against this error. - -If such an error occurs, please report this as bug via 'M-x report-emacs-bug'. -Until it is solved you could ignore such errors by performing - - (setq debug-ignored-errors (cons 'remote-file-error debug-ignored-errors)) - -+++ -** New macro 'named-let' added to subr-x.el. -It provides Scheme's "named let" looping construct. - ---- -** Emacs now attempts to test for high-rate subprocess output more fairly. -When several subprocesses produce output simultaneously at high rate, -Emacs will now by default attempt to service them all in a round-robin -fashion. Set the new variable 'process-prioritize-lower-fds' to a -non-nil value to get back the old behavior, whereby after reading -from a subprocess, Emacs would check for output of other subprocesses -in a way that is likely to read from the same process again. - -+++ -** 'set-process-buffer' now updates the process mark. -The mark will be set to point to the end of the new buffer. - -+++ -** 'unlock-buffer' displays warnings instead of signaling. -Instead of signaling 'file-error' conditions for file system level -errors, the function now calls 'display-warning' and continues as if -the error did not occur. - -+++ -** 'read-char-from-minibuffer' and 'y-or-n-p' support 'help-form'. -If you bind 'help-form' to a non-nil value while calling these functions, -then pressing 'C-h' ('help-char') causes the function to evaluate 'help-form' -and display the result. - -+++ -** 'read-number' now has its own history variable. -Additionally, the function now accepts a HIST argument which can be -used to specify a custom history variable. - -+++ -** 'set-window-configuration' now takes two optional parameters, -'dont-set-frame' and 'dont-set-miniwindow'. The first of these, when -non-nil, instructs the function not to select the frame recorded in -the configuration. The second prevents the current minibuffer being -replaced by the one stored in the configuration. - ---- -** 'count-windows' now takes an optional parameter ALL-FRAMES. -The semantics are as with 'walk-windows'. - -+++ -** 'truncate-string-ellipsis' now uses '…' by default. -Modes that use 'truncate-string-to-width' with non-nil, non-string -argument ELLIPSIS, will now indicate truncation using '…' when -the selected frame can display it, and using "..." otherwise. - -+++ -** 'string-width' now accepts two optional arguments FROM and TO. -This allows calculating the width of a substring without consing a -new string. - -+++ -** 'directory-files' now takes an additional COUNT parameter. -The parameter makes 'directory-files' return COUNT first file names -from a directory. If MATCH is also given, the function will return -first COUNT file names that match the expression. The same COUNT -parameter has been added to 'directory-files-and-attributes'. - -+++ -** 'count-lines' can now ignore invisible lines. -This is controlled by the optional parameter IGNORE-INVISIBLE-LINES. - ---- -** 'count-words' now crosses field boundaries. -Originally, 'count-words' would stop counting at the first field -boundary it encountered; now it keeps counting all the way to the -region's (or buffer's) end. - -+++ -** File-related APIs can optionally follow symlinks. -The functions 'file-modes', 'set-file-modes', and 'set-file-times' now -have an optional argument specifying whether to follow symbolic links. - -+++ -** 'format-seconds' can now be used for sub-second times. -The new optional "," parameter has been added, and -'(format-seconds "%mm %,1ss" 66.4)' will now result in "1m 6.4s". - -+++ -** 'parse-time-string' can now parse ISO 8601 format strings. -These have a format like "2020-01-15T16:12:21-08:00". - ---- -** 'make-network-process', 'make-serial-process' ':coding' behavior change. -Previously, passing ':coding nil' to either of these functions would -override any non-nil binding for 'coding-system-for-read' and -'coding-system-for-write'. For consistency with 'make-process' and -'make-pipe-process', passing ':coding nil' is now ignored. No code in -Emacs depended on the previous behavior; if you really want the -process' coding-system to be nil, use 'set-process-coding-system' -after the process has been created, or pass in ':coding '(nil nil)'. - -+++ -** 'open-network-stream' now accepts a ':coding' argument. -This allows specifying the coding systems used by a network process -for encoding and decoding without having to bind -'coding-system-for-{read,write}' or call 'set-process-coding-system'. - -+++ -** 'open-network-stream' can now take a ':capability-command' that's a function. -The function is called with the greeting from the server as its only -parameter, and allows sending different TLS capability commands to the -server based on that greeting. - -+++ -** 'open-gnutls-stream' now also accepts a ':coding' argument. - ---- -** 'process-attributes' now works under OpenBSD, too. - -+++ -** 'format-spec' now takes an optional SPLIT parameter. -If non-nil, 'format-spec' will split the resulting string into a list -of strings, based on where the format specs (and expansions) were. - ---- -** 'unload-feature' now also tries to undo additions to buffer-local hooks. - ---- -** 'while-no-input-ignore-events' accepts more special events. -The special events 'dbus-event' and 'file-notify' are now ignored in -'while-no-input' when added to this variable. - ---- -** 'start-process-shell-command' and 'start-file-process-shell-command' -do not support the old calling conventions any longer. - -+++ -** 'yes-or-no-p' and 'y-or-n-p' PROMPT parameter no longer needs trailing space. -In other words, the prompt can now end with "?" instead of "? ". This -has been the case since Emacs 24.4 but was not announced or documented -until now. (Checkdoc has also been updated to accept this convention.) - -+++ -** The 'uniquify' argument in 'auto-save-file-name-transforms' can be a symbol. -If this symbol is one of the members of 'secure-hash-algorithms', -Emacs constructs the nondirectory part of the auto-save file name by -applying that 'secure-hash' to the buffer file name. This avoids any -risk of excessively long file names. - -+++ -** New user option 'process-file-return-signal-string'. -It controls, whether 'process-file' returns a string when a remote -process is interrupted by a signal. - -** EIEIO Changes - -+++ -*** The macro 'oref-default' can now be used with 'setf'. -It is now defined as a generalized variable that can be used with -'setf' to modify the value stored in a given class slot. - ---- -*** 'form' in '(eql form)' specializers in 'cl-defmethod' is now evaluated. -This corresponds to the behavior of defmethod in Common Lisp Object System. -For compatibility, '(eql SYMBOL)' does not evaluate SYMBOL, for now. - -** D-Bus - -+++ -*** Property values can be typed explicitly. -'dbus-register-property' and 'dbus-set-property' accept now optional -type symbols. Both functions propagate D-Bus errors. - -+++ -*** Registered properties can have the new access type ':write'. - -+++ -*** In case of problems, handlers can emit proper D-Bus error messages now. - -+++ -*** D-Bus errors, which have been converted from incoming D-Bus error -messages, contain the error name of that message now. - -+++ -*** D-Bus messages can be monitored with the new command 'dbus-monitor'. - -+++ -*** D-Bus events have changed their internal structure. -They carry now the destination and the error-name of an event. They -also keep the type information of their arguments. Use the -'dbus-event-*' accessor functions. - -** Buttons - -+++ -*** New minor mode 'button-mode'. -This minor mode does nothing else than install 'button-buffer-map' as -a minor mode map (which binds the 'TAB' / 'S-TAB' key bindings to navigate -to buttons), and can be used in any view-mode-like buffer that has -buttons in it. - -+++ -*** New utility function 'button-buttonize'. -This function takes a string and returns a string propertized in a way -that makes it a valid button. - ---- -** 'text-scale-mode' can now adjust font size of the header line. -When the new buffer local variable 'text-scale-remap-header-line' -is non-nil, 'text-scale-adjust' will also scale the text in the header -line when displaying that buffer. - -This is useful for major modes that arrange their display in a tabular -form below the header line. It is enabled by default in -'tabulated-list-mode' and its derived modes. - ---- -** 'ascii' is now a coding system alias for 'us-ascii'. - ---- -** New coding-systems for EBCDIC variants. -New coding-systems 'ibm256', 'ibm273', 'ibm274', 'ibm277', 'ibm278', -'ibm280', 'ibm281', 'ibm284', 'ibm285', 'ibm290', 'ibm297'. These are -variants of the EBCDIC encoding tailored to some European and Japanese -locales. They are also available as aliases 'ebcdic-cp-*' (e.g., -'ebcdic-cp-fi' for the Finnish variant 'ibm278'), and 'cp2xx' (e.g., -'cp278' for 'ibm278'). There are also new charsets 'ibm2xx' to -support these coding-systems. - -+++ -** New 'Bindat type expression' description language. -This new system is provided by the new macro 'bindat-type' and -obsoletes the old data layout specifications. It supports -arbitrary-size integers, recursive types, and more. See the Info node -"(elisp) Byte Packing" in the ELisp manual for more details. - -+++ -** New macro 'with-environment-variables'. -This macro allows setting environment variables temporarily when -executing a form. +* Editing Changes in Emacs 29.1 -* Changes in Emacs 28.1 on Non-Free Operating Systems - -+++ -** On MS-Windows, Emacs can now use the native image API to display images. -Emacs can now use the MS-Windows GDI+ library to load and display -images in JPEG, PNG, GIF and TIFF formats. This support is available -unless Emacs was configured '--without-native-image-api'. - -This feature is experimental, and needs to be turned on to be used. -To turn this on, set the variable 'w32-use-native-image-API' to a -non-nil value. Please report any bugs you find while using the native -image API via 'M-x report-emacs-bug'. - -+++ -** On MS-Windows, Emacs can now toggle the IME. -A new function 'w32-set-ime-open-status' can now be used to disable -and enable the MS-Windows native Input Method Editor (IME) at run -time. A companion function 'w32-get-ime-open-status' returns the -current IME activation status. - --- -** On macOS, 's-' and 's-' are now bound to -'move-beginning-of-line' and 'move-end-of-line' respectively. The commands -to select previous/next frame are still bound to 's-~' and 's-`'. +* Changes in Specialized Modes and Packages in Emacs 29.1 -+++ -** On macOS, Emacs can now load dynamic modules with a ".dylib" suffix. -'module-file-suffix' now has the value ".dylib" on macOS, but the -".so" suffix is supported as well. - ---- -** On macOS, the user option 'make-pointer-invisible' is now honored. - ---- -** On macOS, Xwidget is now supported. -If Emacs was built with xwidget support, you can access the embedded -webkit browser with 'M-x xwidget-webkit-browse-url'. Viewing two -instances of xwidget webkit is not supported. - ---- -*** Downloading files from xwidget-webkit is now supported. -The new user option 'xwidget-webkit-download-dir' says where to download to. - ---- -*** New command 'xwidget-webkit-clone-and-split-below'. -Open a new window below displaying the current URL. + +* New Modes and Packages in Emacs 29.1 ---- -*** New command 'xwidget-webkit-clone-and-split-right'. -Open a new window to the right displaying the current URL. + +* Incompatible Lisp Changes in Emacs 29.1 ---- -*** New user option 'xwidget-webkit-enable-plugins'. -If non-nil, enable plugins in xwidget. (This is only available on -macOS.) + +* Lisp Changes in Emacs 29.1 -+++ -** New macOS Contacts back-end for EUDC. -This backend works on newer versions of macOS and is generally -preferred over the eudcb-mab.el backend. + +* Changes in Emacs 29.1 on Non-Free Operating Systems ---------------------------------------------------------------------- diff --git a/etc/refcards/ru-refcard.tex b/etc/refcards/ru-refcard.tex index 179be0af885..018be36eb46 100644 --- a/etc/refcards/ru-refcard.tex +++ b/etc/refcards/ru-refcard.tex @@ -40,7 +40,7 @@ \newlength{\ColThreeWidth} \setlength{\ColThreeWidth}{25mm} -\newcommand{\versionemacs}[0]{28} % version of Emacs this is for +\newcommand{\versionemacs}[0]{29} % version of Emacs this is for \newcommand{\cyear}[0]{2021} % copyright year \newcommand\shortcopyrightnotice[0]{\vskip 1ex plus 2 fill diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 69baf17f5ee..814003587b8 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -1205,7 +1205,7 @@ Show the buffer in another window, but don't select it." (unless (eq symbol basevar) (message "`%s' is an alias for `%s'" symbol basevar)))) -(defvar customize-changed-options-previous-release "26.3" +(defvar customize-changed-options-previous-release "28.1" "Version for `customize-changed' to refer back to by default.") ;; Packages will update this variable, so make it available. diff --git a/msdos/sed2v2.inp b/msdos/sed2v2.inp index ce45a7c80e9..ef4bc24fe40 100644 --- a/msdos/sed2v2.inp +++ b/msdos/sed2v2.inp @@ -66,7 +66,7 @@ /^#undef PACKAGE_NAME/s/^.*$/#define PACKAGE_NAME ""/ /^#undef PACKAGE_STRING/s/^.*$/#define PACKAGE_STRING ""/ /^#undef PACKAGE_TARNAME/s/^.*$/#define PACKAGE_TARNAME ""/ -/^#undef PACKAGE_VERSION/s/^.*$/#define PACKAGE_VERSION "28.0.50"/ +/^#undef PACKAGE_VERSION/s/^.*$/#define PACKAGE_VERSION "29.0.50"/ /^#undef SYSTEM_TYPE/s/^.*$/#define SYSTEM_TYPE "ms-dos"/ /^#undef HAVE_DECL_GETENV/s/^.*$/#define HAVE_DECL_GETENV 1/ /^#undef SYS_SIGLIST_DECLARED/s/^.*$/#define SYS_SIGLIST_DECLARED 1/ diff --git a/nt/README.W32 b/nt/README.W32 index ed5673334ad..495af0baede 100644 --- a/nt/README.W32 +++ b/nt/README.W32 @@ -1,7 +1,7 @@ Copyright (C) 2001-2021 Free Software Foundation, Inc. See the end of the file for license conditions. - Emacs version 28.0.50 for MS-Windows + Emacs version 29.0.50 for MS-Windows This README file describes how to set up and run a precompiled distribution of the latest version of GNU Emacs for MS-Windows. You diff --git a/src/msdos.c b/src/msdos.c index 5da01c9e7ca..bf058c8aff9 100644 --- a/src/msdos.c +++ b/src/msdos.c @@ -1794,7 +1794,7 @@ internal_terminal_init (void) } Vinitial_window_system = Qpc; - Vwindow_system_version = make_fixnum (28); /* RE Emacs version */ + Vwindow_system_version = make_fixnum (29); /* RE Emacs version */ tty->terminal->type = output_msdos_raw; /* If Emacs was dumped on DOS/V machine, forget the stale VRAM -- cgit v1.2.3 From 66409422214a0a90e1d2a12ef2c4ebf86f2c01a9 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Tue, 5 Oct 2021 03:34:08 +0200 Subject: Use format-prompt for many more prompts * lisp/bookmark.el (bookmark-completing-read): * lisp/calc/calc-prog.el (calc-user-define-formula): * lisp/calc/calc-store.el (calc-permanent-variable): * lisp/calc/calc-units.el (calc-convert-units) (calc-convert-exact-units, calc-convert-temperature): * lisp/cedet/semantic/complete.el (semantic-complete-read-tag-engine): * lisp/cus-edit.el (customize-read-group): * lisp/dired-aux.el (dired-do-chxxx): * lisp/dired-x.el (dired-mark-unmarked-files): * lisp/emacs-lisp/debug.el (cancel-debug-on-entry) (cancel-debug-on-variable-change): * lisp/emacs-lisp/edebug.el (edebug-cancel-on-entry) (edebug-remove-instrumentation): * lisp/epa.el (epa-read-file-name, epa-export-keys): * lisp/faces.el (read-face-name): * lisp/format.el (format-decode-buffer, format-decode-region): * lisp/gnus/gnus-art.el (gnus-read-save-file-name): * lisp/gnus/gnus-util.el (gnus-completing-read): * lisp/gnus/message.el (message-check-news-header-syntax): * lisp/info.el (Info-follow-reference): * lisp/international/mule-diag.el (describe-font) (describe-fontset): * lisp/international/quail.el (quail-show-keyboard-layout): * lisp/language/cyril-util.el (standard-display-cyrillic-translit): * lisp/mail/rmailkwd.el (rmail-read-label): * lisp/mail/rmailmm.el (rmail-mime-save): * lisp/mail/rmailout.el (rmail-output-read-file-name): * lisp/man.el (Man-goto-section, Man-follow-manual-reference): * lisp/menu-bar.el (emacs-index--prompt): * lisp/net/ange-ftp.el (ange-ftp-get-passwd): * lisp/proced.el (proced-send-signal): * lisp/progmodes/cpp.el (cpp-choose-face): * lisp/progmodes/ebrowse.el (ebrowse-set-tree-indentation): * lisp/progmodes/etags.el (visit-tags-table) (visit-tags-table-buffer): * lisp/progmodes/grep.el (grep-read-files): * lisp/progmodes/hideif.el (hide-ifdef-define): * lisp/progmodes/pascal.el (pascal-goto-defun): * lisp/progmodes/prolog.el (prolog-read-predicate): * lisp/progmodes/sql.el (sql-get-login-ext): * lisp/ses.el (ses-define-local-printer): * lisp/textmodes/artist.el (artist-figlet-choose-font): * lisp/textmodes/tex-mode.el (tex-compile): * lisp/vc/diff.el (diff): * lisp/vc/ediff-ptch.el (ediff-prompt-for-patch-file): * lisp/vc/ediff-util.el (ediff-read-file-name): * lisp/vc/pcvs.el (cvs-mode-mark-on-state): * lisp/vc/vc.el (vc-diff-build-argument-list-internal) (vc-revision-other-window, vc-retrieve-tag): * lisp/wid-edit.el: Prefer format-prompt unconditionally. * lisp/org/org-capture.el (org-capture-fill-template): * lisp/org/org-refile.el (org-refile-get-location): * lisp/progmodes/python.el (python-eldoc-at-point): * lisp/progmodes/verilog-mode.el (verilog-surelint-off) (verilog-goto-defun): * lisp/progmodes/xref.el (xref--read-identifier): Prefer format-prompt when it is fboundp. --- lisp/bookmark.el | 7 ++----- lisp/calc/calc-prog.el | 9 ++++----- lisp/calc/calc-store.el | 2 +- lisp/calc/calc-units.el | 39 +++++++++++---------------------------- lisp/cedet/semantic/complete.el | 9 ++++----- lisp/cus-edit.el | 2 +- lisp/dired-aux.el | 8 ++++---- lisp/dired-x.el | 2 +- lisp/emacs-lisp/debug.el | 6 ++++-- lisp/emacs-lisp/edebug.el | 6 ++++-- lisp/epa.el | 6 ++---- lisp/faces.el | 2 +- lisp/format.el | 4 ++-- lisp/gnus/gnus-art.el | 13 ++++++------- lisp/gnus/gnus-util.el | 4 +--- lisp/gnus/message.el | 2 +- lisp/info.el | 9 +++------ lisp/international/mule-diag.el | 4 ++-- lisp/international/quail.el | 2 +- lisp/language/cyril-util.el | 2 +- lisp/mail/rmailkwd.el | 9 +++------ lisp/mail/rmailmm.el | 2 +- lisp/mail/rmailout.el | 5 ++--- lisp/man.el | 4 ++-- lisp/menu-bar.el | 5 +---- lisp/net/ange-ftp.el | 5 +++-- lisp/org/org-capture.el | 11 +++++++---- lisp/org/org-refile.el | 12 +++++++----- lisp/proced.el | 8 ++++---- lisp/progmodes/cpp.el | 7 ++----- lisp/progmodes/ebrowse.el | 6 +++--- lisp/progmodes/etags.el | 4 ++-- lisp/progmodes/grep.el | 8 +++----- lisp/progmodes/hideif.el | 2 +- lisp/progmodes/pascal.el | 4 +--- lisp/progmodes/prolog.el | 7 ++----- lisp/progmodes/python.el | 12 ++++++++---- lisp/progmodes/sql.el | 17 +++++------------ lisp/progmodes/verilog-mode.el | 23 +++++++++++++---------- lisp/progmodes/xref.el | 17 +++++++++++------ lisp/ses.el | 4 +++- lisp/textmodes/artist.el | 5 ++--- lisp/textmodes/tex-mode.el | 2 +- lisp/vc/diff.el | 8 ++++---- lisp/vc/ediff-ptch.el | 14 +++++--------- lisp/vc/ediff-util.el | 6 +----- lisp/vc/pcvs.el | 3 +-- lisp/vc/vc.el | 15 ++++++--------- lisp/wid-edit.el | 2 +- 49 files changed, 161 insertions(+), 204 deletions(-) (limited to 'lisp/cus-edit.el') diff --git a/lisp/bookmark.el b/lisp/bookmark.el index d64966df5af..5c4a9803b39 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el @@ -498,11 +498,8 @@ If DEFAULT is nil then return empty string for empty input." 'string-lessp) (bookmark-all-names))) (let* ((completion-ignore-case bookmark-completion-ignore-case) - (default (unless (equal "" default) default)) - (prompt (concat prompt (if default - (format " (%s): " default) - ": ")))) - (completing-read prompt + (default (unless (equal "" default) default))) + (completing-read (format-prompt prompt default) (lambda (string pred action) (if (eq action 'metadata) '(metadata (category . bookmark)) diff --git a/lisp/calc/calc-prog.el b/lisp/calc/calc-prog.el index f9dd9eb98a9..77adf6b7927 100644 --- a/lisp/calc/calc-prog.el +++ b/lisp/calc/calc-prog.el @@ -205,9 +205,8 @@ (progn (setq cmd-base-default (concat "User-" keyname)) (setq cmd (completing-read - (concat "Define M-x command name (default calc-" - cmd-base-default - "): ") + (format-prompt "Define M-x command name" + (concat "calc-" cmd-base-default)) obarray 'commandp nil (if (and odef (symbolp (cdr odef))) (symbol-name (cdr odef)) @@ -241,8 +240,8 @@ (setq func (concat "calcFunc-" (completing-read - (concat "Define algebraic function name (default " - cmd-base-default "): ") + (format-prompt "Define algebraic function name" + cmd-base-default) (mapcar (lambda (x) (substring x 9)) (all-completions "calcFunc-" obarray)) diff --git a/lisp/calc/calc-store.el b/lisp/calc/calc-store.el index ee29c440fe4..b3968555b62 100644 --- a/lisp/calc/calc-store.el +++ b/lisp/calc/calc-store.el @@ -586,7 +586,7 @@ (defun calc-permanent-variable (&optional var) (interactive) (calc-wrapper - (or var (setq var (calc-read-var-name "Save variable (default all): "))) + (or var (setq var (calc-read-var-name (format-prompt "Save variable" "all")))) (let (calc-pv-pos) (and var (or (and (boundp var) (symbol-value var)) (error "No such variable"))) diff --git a/lisp/calc/calc-units.el b/lisp/calc/calc-units.el index fd6f3a7b67b..f6d749db117 100644 --- a/lisp/calc/calc-units.el +++ b/lisp/calc/calc-units.el @@ -486,18 +486,13 @@ If COMP or STD is non-nil, put that in the units table instead." (setq defunits (math-get-default-units expr)) (unless new-units (setq new-units - (read-string (concat + (read-string (format-prompt (if (and uoldname (not nouold)) (concat "Old units: " uoldname ", new units") "New units") - (if defunits - (concat - " (default " - defunits - "): ") - ": ")))) + defunits))) (if (and (string= new-units "") defunits) @@ -533,14 +528,7 @@ If COMP or STD is non-nil, put that in the units table instead." (let* ((old-units (math-extract-units expr)) (defunits (math-get-default-units expr)) units - (new-units - (read-string (concat "New units" - (if defunits - (concat - " (default " - defunits - "): ") - ": "))))) + (new-units (read-string (format-prompt "New units" defunits)))) (if (and (string= new-units "") defunits) @@ -596,19 +584,14 @@ If COMP or STD is non-nil, put that in the units table instead." (setq expr (math-mul expr uold))) (setq defunits (math-get-default-units expr)) (setq unew (or new-units - (completing-read - (concat - (if uoldname - (concat "Old temperature units: " - uoldname - ", new units") - "New temperature units") - (if defunits - (concat " (default " - defunits - "): ") - ": ")) - tempunits))) + (completing-read (format-prompt + (if uoldname + (concat "Old temperature units: " + uoldname + ", new units") + "New temperature units") + defunits) + tempunits))) (setq unew (math-read-expr (if (string= unew "") defunits unew))) (when (eq (car-safe unew) 'error) (error "Bad format in units expression: %s" (nth 2 unew))) diff --git a/lisp/cedet/semantic/complete.el b/lisp/cedet/semantic/complete.el index 6cfbdd5f03f..375b97a7a5d 100644 --- a/lisp/cedet/semantic/complete.el +++ b/lisp/cedet/semantic/complete.el @@ -224,11 +224,10 @@ HISTORY is a symbol representing a variable to story the history in." ;; @todo - move from () to into the editable area (if (string-match ":" prompt) - (setq prompt (concat - (substring prompt 0 (match-beginning 0)) - " (default " default-as-string ")" - (substring prompt (match-beginning 0)))) - (setq prompt (concat prompt " (" default-as-string "): ")))) + (setq prompt (format-prompt + (substring prompt 0 (match-beginning 0)) + default-as-string)) + (setq prompt (format-prompt prompt default-as-string)))) ;; ;; Perform the Completion ;; diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 814003587b8..34a6db508d5 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -1133,7 +1133,7 @@ for the MODE to customize." (defun customize-read-group () (let ((completion-ignore-case t)) - (completing-read "Customize group (default emacs): " + (completing-read (format-prompt "Customize group" "emacs") obarray (lambda (symbol) (or (and (get symbol 'custom-loads) diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 4b8d2710715..a1c6316d3f7 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -444,10 +444,10 @@ List has a form of (file-name full-file-name (attribute-list))." ((eq op-symbol 'chgrp) (file-attribute-group-id (file-attributes default-file 'string)))))) - (prompt (concat "Change " attribute-name " of %s to" - (if (eq op-symbol 'touch) - " (default now): " - ": "))) + (prompt (format-prompt "Change %s of %%s to" + (when (eq op-symbol 'touch) + "now") + attribute-name)) (new-attribute (dired-mark-read-string prompt nil op-symbol arg files default (cond ((eq op-symbol 'chown) diff --git a/lisp/dired-x.el b/lisp/dired-x.el index 7c6f49f2ae4..7f889a2bfd6 100644 --- a/lisp/dired-x.el +++ b/lisp/dired-x.el @@ -554,7 +554,7 @@ If the region is active in Transient Mark mode, operate only on files in the active region if `dired-mark-region' is non-nil." (interactive (list (read-regexp - "Mark unmarked files matching regexp (default all): " + (format-prompt "Mark unmarked files matching regexp" "all") nil 'dired-regexp-history) nil current-prefix-arg nil)) (let ((dired-marker-char (if unflag-p ?\s dired-marker-char))) diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index 0592db85df4..163528acf6f 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el @@ -701,7 +701,8 @@ To specify a nil argument interactively, exit with an empty minibuffer." (interactive (list (let ((name (completing-read - "Cancel debug on entry to function (default all functions): " + (format-prompt "Cancel debug on entry to function" + "all functions") (mapcar #'symbol-name (debug--function-list)) nil t))) (when name (unless (string= name "") @@ -804,7 +805,8 @@ To specify a nil argument interactively, exit with an empty minibuffer." (interactive (list (let ((name (completing-read - "Cancel debug on set for variable (default all variables): " + (format-prompt "Cancel debug on set for variable" + "all variables") (mapcar #'symbol-name (debug--variable-list)) nil t))) (when name (unless (string= name "") diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index 4f3c05baa98..a38c8bd5ca9 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -3519,7 +3519,8 @@ The removes the effect of `edebug-on-entry'. If FUNCTION is nil, remove `edebug-on-entry' on all functions." (interactive (list (let ((name (completing-read - "Cancel edebug on entry to (default all functions): " + (format-prompt "Cancel edebug on entry to" + "all functions") (let ((functions (edebug--edebug-on-entry-functions))) (unless functions (user-error "No functions have `edebug-on-entry'")) @@ -4548,7 +4549,8 @@ instrumentation for, defaulting to all functions." (user-error "Found no functions to remove instrumentation from")) (let ((name (completing-read - "Remove instrumentation from (default all functions): " + (format-prompt "Remove instrumentation from" + "all functions") functions))) (if (and name (not (equal name ""))) diff --git a/lisp/epa.el b/lisp/epa.el index 57d355cb3e0..e4b89e984d2 100644 --- a/lisp/epa.el +++ b/lisp/epa.el @@ -648,7 +648,7 @@ If SECRET is non-nil, list secret keys instead of public keys." (setq input (file-name-sans-extension (expand-file-name input))) (expand-file-name (read-file-name - (concat "To file (default " (file-name-nondirectory input) ") ") + (format-prompt "To file" (file-name-nondirectory input)) (file-name-directory input) input))) @@ -1236,9 +1236,7 @@ If no one is selected, symmetric encryption will be performed. ") (list keys (expand-file-name (read-file-name - (concat "To file (default " - (file-name-nondirectory default-name) - ") ") + (format-prompt "To file" (file-name-nondirectory default-name)) (file-name-directory default-name) default-name))))) (let ((context (epg-make-context epa-protocol))) diff --git a/lisp/faces.el b/lisp/faces.el index 7b96d938c56..302bfa245ec 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -1100,7 +1100,7 @@ returned. Otherwise, DEFAULT is returned verbatim." ;; prompt. If so, remove it. (setq prompt (replace-regexp-in-string ": ?\\'" "" prompt)) (let ((prompt (if default - (format-message "%s (default `%s'): " prompt default) + (format-prompt prompt default) (format "%s: " prompt))) aliasfaces nonaliasfaces faces) ;; Build up the completion tables. diff --git a/lisp/format.el b/lisp/format.el index 71cf885d417..a2f378efa72 100644 --- a/lisp/format.el +++ b/lisp/format.el @@ -320,7 +320,7 @@ If the format is not specified, attempt a regexp-based guess. Set `buffer-file-format' to the format used, and call any format-specific mode functions." (interactive - (list (format-read "Translate buffer from format (default guess): "))) + (list (format-read (format-prompt "Translate buffer from format" "guess")))) (save-excursion (goto-char (point-min)) (format-decode format (buffer-size) t))) @@ -331,7 +331,7 @@ Arg FORMAT is optional; if omitted the format will be determined by looking for identifying regular expressions at the beginning of the region." (interactive (list (region-beginning) (region-end) - (format-read "Translate region from format (default guess): "))) + (format-read (format-prompt "Translate region from format" "guess")))) (save-excursion (goto-char from) (format-decode format (- to from) nil))) diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 7b6e15d6f87..c2ec3f1f977 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -3933,8 +3933,8 @@ This format is defined by the `gnus-article-time-format' variable." ;; No split name was found. ((null split-name) (read-file-name - (concat prompt " (default " - (file-name-nondirectory default-name) "): ") + (format-prompt prompt + (file-name-nondirectory default-name)) (file-name-directory default-name) default-name)) ;; A single group name is returned. @@ -3943,8 +3943,8 @@ This format is defined by the `gnus-article-time-format' variable." (funcall function split-name headers (symbol-value variable))) (read-file-name - (concat prompt " (default " - (file-name-nondirectory default-name) "): ") + (format-prompt prompt + (file-name-nondirectory default-name)) (file-name-directory default-name) default-name)) ;; A single split name was found @@ -3956,9 +3956,8 @@ This format is defined by the `gnus-article-time-format' variable." (file-name-as-directory name)) ((file-exists-p name) name) (t gnus-article-save-directory)))) - (read-file-name - (concat prompt " (default " name "): ") - dir name))) + (read-file-name (format-prompt prompt name) + dir name))) ;; A list of splits was found. (t (setq split-name (nreverse split-name)) diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index fb285962d6f..5bf2869983e 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el @@ -1310,9 +1310,7 @@ SPEC is a predicate specifier that contains stuff like `or', `and', initial-input history def) "Call `gnus-completing-read-function'." (funcall gnus-completing-read-function - (concat prompt (when def - (concat " (default " def ")")) - ": ") + (format-prompt prompt def) collection require-match initial-input history def)) (defun gnus-emacs-completing-read (prompt collection &optional require-match diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index b08d8c26c9a..7ca43d603ff 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -5349,7 +5349,7 @@ Otherwise, generate and save a value for `canlock-password' first." (zerop (length (setq to (completing-read - "Followups to (default no Followup-To header): " + (format-prompt "Followups to" "no Followup-To header") (mapcar #'list (cons "poster" (message-tokenize-header diff --git a/lisp/info.el b/lisp/info.el index 8c08eaec3c8..41889d6de17 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -2604,12 +2604,9 @@ new buffer." (if (eq (length completions) 1) (setq default (car completions))) (if completions - (let ((input (completing-read (if default - (concat - "Follow reference named (default " - default "): ") - "Follow reference named: ") - completions nil t))) + (let ((input (completing-read (format-prompt "Follow reference named" + default) + completions nil t))) (list (if (equal input "") default input) current-prefix-arg)) diff --git a/lisp/international/mule-diag.el b/lisp/international/mule-diag.el index 862c577bd5d..5cc73e43671 100644 --- a/lisp/international/mule-diag.el +++ b/lisp/international/mule-diag.el @@ -833,7 +833,7 @@ The IGNORED argument is ignored." "Display information about a font whose name is FONTNAME." (interactive (list (completing-read - "Font name (default current choice for ASCII chars): " + (format-prompt "Font name" "current choice for ASCII chars") (and window-system ;; Implied by `window-system'. (fboundp 'x-list-fonts) @@ -1004,7 +1004,7 @@ This shows which font is used for which character(s)." (mapcar 'cdr fontset-alias-alist))) (completion-ignore-case t)) (list (completing-read - "Fontset (default used by the current frame): " + (format-prompt "Fontset" "used by the current frame") fontset-list nil t))))) (if (= (length fontset) 0) (setq fontset (face-attribute 'default :fontset)) diff --git a/lisp/international/quail.el b/lisp/international/quail.el index 50ff307b73a..89ab450aeee 100644 --- a/lisp/international/quail.el +++ b/lisp/international/quail.el @@ -917,7 +917,7 @@ The format of KBD-LAYOUT is the same as `quail-keyboard-layout'." The variable `quail-keyboard-layout-type' holds the currently selected keyboard type." (interactive - (list (completing-read "Keyboard type (default current choice): " + (list (completing-read (format-prompt "Keyboard type" "current choice") quail-keyboard-layout-alist nil t))) (or (and keyboard-type (> (length keyboard-type) 0)) diff --git a/lisp/language/cyril-util.el b/lisp/language/cyril-util.el index 04e681d743d..e404288ddca 100644 --- a/lisp/language/cyril-util.el +++ b/lisp/language/cyril-util.el @@ -60,7 +60,7 @@ If the argument is nil, we return the display table to its standard state." (list (let* ((completion-ignore-case t)) (completing-read - "Cyrillic language (default nil): " + (format-prompt "Cyrillic language" "nil") cyrillic-language-alist nil t nil nil nil)))) (or standard-display-table diff --git a/lisp/mail/rmailkwd.el b/lisp/mail/rmailkwd.el index 58a8eb7a370..d8fcc1c0a99 100644 --- a/lisp/mail/rmailkwd.el +++ b/lisp/mail/rmailkwd.el @@ -74,12 +74,9 @@ according to the choice made, and returns a symbol." (rmail-summary-exists) (and (setq old (rmail-get-keywords)) (mapc #'rmail-make-label (split-string old ", ")))) - (completing-read (concat prompt - (if rmail-last-label - (concat " (default " - (symbol-name rmail-last-label) - "): ") - ": ")) + (completing-read (format-prompt prompt + (and rmail-last-label + (symbol-name rmail-last-label))) rmail-label-obarray nil nil)))) diff --git a/lisp/mail/rmailmm.el b/lisp/mail/rmailmm.el index 99bff66657b..66a1e9a4dbd 100644 --- a/lisp/mail/rmailmm.el +++ b/lisp/mail/rmailmm.el @@ -254,7 +254,7 @@ TRUNCATED is non-nil if the text of this entity was truncated.")) (unless (y-or-n-p "This entity is truncated; save anyway? ") (error "Aborted"))) (setq filename (expand-file-name - (read-file-name (format "Save as (default: %s): " filename) + (read-file-name (format-prompt "Save as" filename) directory (expand-file-name filename directory)) directory)) diff --git a/lisp/mail/rmailout.el b/lisp/mail/rmailout.el index 91f86a234d4..1f5bb2d9f1b 100644 --- a/lisp/mail/rmailout.el +++ b/lisp/mail/rmailout.el @@ -107,9 +107,8 @@ error: %S\n" (read-file (expand-file-name (read-file-name - (concat "Output message to mail file (default " - (file-name-nondirectory default-file) - "): ") + (format-prompt "Output message to mail file" + (file-name-nondirectory default-file)) (file-name-directory default-file) (abbreviate-file-name default-file)) (file-name-directory default-file)))) diff --git a/lisp/man.el b/lisp/man.el index 4ef2deac4f3..2bde1fc7fb2 100644 --- a/lisp/man.el +++ b/lisp/man.el @@ -1786,7 +1786,7 @@ Returns t if section is found, nil otherwise." Man--last-section (car Man--sections))) (completion-ignore-case t) - (prompt (concat "Go to section (default " default "): ")) + (prompt (format-prompt "Go to section" default)) (chosen (completing-read prompt Man--sections nil nil nil nil default))) (list chosen)) @@ -1850,7 +1850,7 @@ Specify which REFERENCE to use; default is based on word at point." (defaults (mapcar 'substring-no-properties (cons default Man--refpages))) - (prompt (concat "Refer to (default " default "): ")) + (prompt (format-prompt "Refer to" default)) (chosen (completing-read prompt Man--refpages nil nil nil nil defaults))) chosen))) diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index b2577c085fc..40a1730637d 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@ -1918,10 +1918,7 @@ key, a click, or a menu-item")) (let* ((default (thing-at-point 'sexp)) (topic (read-from-minibuffer - (format "Subject to look up%s: " - (if default - (format " (default \"%s\")" default) - "")) + (format-prompt "Subject to look up" default) nil nil nil nil default))) (list (if (zerop (length topic)) default diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index 56a1d76d71a..876e138f284 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el @@ -1230,8 +1230,9 @@ only return the directory part of FILE." ;; found another machine with the same user. ;; Try that account. (read-passwd - (format "passwd for %s@%s (default same as %s@%s): " - user host user other) + (format-prompt "passwd for %s@%s" + (format "same as %s@%s" user other) + user host) nil (ange-ftp-lookup-passwd other user)) diff --git a/lisp/org/org-capture.el b/lisp/org/org-capture.el index a9350c58d52..1756b34fc5b 100644 --- a/lisp/org/org-capture.el +++ b/lisp/org/org-capture.el @@ -1815,10 +1815,13 @@ by their respective `org-store-link-plist' properties if present." ;; Load history list for current prompt. (setq org-capture--prompt-history (gethash prompt org-capture--prompt-history-table)) - (push (org-completing-read - (concat (or prompt "Enter string") - (and default (format " [%s]" default)) - ": ") + (push (org-completing-read + ;; `format-prompt' is new in Emacs 28.1. + (if (fboundp 'format-prompt) + (format-prompt (or prompt "Enter string") default) + (concat (or prompt "Enter string") + (and default (format " [%s]" default)) + ": ")) completions nil nil nil 'org-capture--prompt-history default) strings) diff --git a/lisp/org/org-refile.el b/lisp/org/org-refile.el index 678759e10db..73eaad6bf52 100644 --- a/lisp/org/org-refile.el +++ b/lisp/org/org-refile.el @@ -640,11 +640,13 @@ this function appends the default value from org-refile-target-table)) (completion-ignore-case t) cdef - (prompt (concat prompt - (or (and (car org-refile-history) - (concat " (default " (car org-refile-history) ")")) - (and (assoc cbnex tbl) (setq cdef cbnex) - (concat " (default " cbnex ")"))) ": ")) + (prompt (let ((default (or (car org-refile-history) + (and (assoc cbnex tbl) (setq cdef cbnex) + cbnex)))) + ;; `format-prompt' is new in Emacs 28.1. + (if (fboundp 'format-prompt) + (format-prompt prompt default) + (concat prompt " (default " default ": ")))) pa answ parent-target child parent old-hist) (setq old-hist org-refile-history) (setq answ (funcall cfunc prompt tbl nil (not new-nodes) diff --git a/lisp/proced.el b/lisp/proced.el index fec2a29c847..9a8eaf54e78 100644 --- a/lisp/proced.el +++ b/lisp/proced.el @@ -1772,8 +1772,8 @@ supported but discouraged. It will be removed in a future version of Emacs." `(:annotation-function ,(lambda (s) (cdr (assoc s proced-signal-list)))))) (proced-with-processes-buffer process-alist - (list (completing-read (concat "Send signal [" pnum - "] (default TERM): ") + (list (completing-read (format-prompt "Send signal [%s]" + "TERM" pnum) proced-signal-list nil nil nil nil "TERM") process-alist)))) @@ -1797,8 +1797,8 @@ supported but discouraged. It will be removed in a future version of Emacs." `(:annotation-function ,(lambda (s) (cdr (assoc s proced-signal-list)))))) (proced-with-processes-buffer process-alist - (setq signal (completing-read (concat "Send signal [" pnum - "] (default TERM): ") + (setq signal (completing-read (format-prompt "Send signal [%s]" + "TERM" pnum) proced-signal-list nil nil nil nil "TERM")))))) diff --git a/lisp/progmodes/cpp.el b/lisp/progmodes/cpp.el index d800365e66d..baee72b332d 100644 --- a/lisp/progmodes/cpp.el +++ b/lisp/progmodes/cpp.el @@ -702,11 +702,8 @@ BRANCH should be either nil (false branch), t (true branch) or `both'." (x-popup-menu cpp-button-event (list prompt (cons prompt cpp-face-default-list))) (let ((name (car (rassq default cpp-face-default-list)))) - (cdr (assoc (completing-read (if name - (concat prompt - " (default " name "): ") - (concat prompt ": ")) - cpp-face-default-list nil t) + (cdr (assoc (completing-read (format-prompt "%s" name prompt) + cpp-face-default-list nil t) cpp-face-all-list)))) default)) diff --git a/lisp/progmodes/ebrowse.el b/lisp/progmodes/ebrowse.el index ab0329d7eec..6e416d064a8 100644 --- a/lisp/progmodes/ebrowse.el +++ b/lisp/progmodes/ebrowse.el @@ -1330,9 +1330,9 @@ Pop to member buffer if no prefix ARG, to tree buffer otherwise." "Set the indentation width of the tree display." (interactive) (let ((width (string-to-number (read-string - (concat "Indentation (default " - (int-to-string ebrowse--indentation) - "): ") + (format-prompt + "Indentation" + (int-to-string ebrowse--indentation)) nil nil ebrowse--indentation)))) (when (cl-plusp width) (setq-local ebrowse--indentation width) diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index f53b09d9e8c..d2ce813daae 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el @@ -292,7 +292,7 @@ file the tag was in." (or (locate-dominating-file default-directory "TAGS") default-directory))) (list (read-file-name - "Visit tags table (default TAGS): " + (format-prompt "Visit tags table" "TAGS") ;; default to TAGS from default-directory up to root. default-tag-dir (expand-file-name "TAGS" default-tag-dir) @@ -625,7 +625,7 @@ Returns t if it visits a tags table, or nil if there are no more in the list." (car list)) ;; Finally, prompt the user for a file name. (expand-file-name - (read-file-name "Visit tags table (default TAGS): " + (read-file-name (format-prompt "Visit tags table" "TAGS") default-directory "TAGS" t)))))) diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index ec2850737c8..001989e39ad 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -1057,11 +1057,9 @@ REGEXP is used as a string in the prompt." default-extension (car grep-files-history) (car (car grep-files-aliases)))) - (files (completing-read - (concat "Search for \"" regexp - "\" in files matching wildcard" - (if default (concat " (default " default ")")) - ": ") + (files (completing-read + (format-prompt "Search for \"%s\" in files matching wildcard" + default regexp) #'read-file-name-internal nil nil nil 'grep-files-history (delete-dups diff --git a/lisp/progmodes/hideif.el b/lisp/progmodes/hideif.el index a18a67249ae..87732c10489 100644 --- a/lisp/progmodes/hideif.el +++ b/lisp/progmodes/hideif.el @@ -2456,7 +2456,7 @@ This allows #ifdef VAR to be hidden." (t nil)))) (var (read-minibuffer "Define what? " default)) - (val (read-from-minibuffer (format "Set %s to? (default 1): " var) + (val (read-from-minibuffer (format-prompt "Set %s to?" "1" var) nil nil t nil "1"))) (list var val))) (hif-set-var var (or val 1)) diff --git a/lisp/progmodes/pascal.el b/lisp/progmodes/pascal.el index e6e6e40aa19..5938da542ac 100644 --- a/lisp/progmodes/pascal.el +++ b/lisp/progmodes/pascal.el @@ -1357,9 +1357,7 @@ The default is a name found in the buffer around point." default "")) (label ;; Do completion with default. - (completing-read (if (not (string= default "")) - (concat "Label (default " default "): ") - "Label: ") + (completing-read (format-prompt "Label" default) ;; Complete with the defuns found in the ;; current-buffer. (let ((buf (current-buffer))) diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el index 74a023775f8..118117131f4 100644 --- a/lisp/progmodes/prolog.el +++ b/lisp/progmodes/prolog.el @@ -2484,11 +2484,8 @@ Interaction supports completion." (if (eq (try-completion default prolog-info-alist) nil) (setq default nil)) ;; Read the PredSpec from the user - (completing-read - (if (zerop (length default)) - "Help on predicate: " - (concat "Help on predicate (default " default "): ")) - prolog-info-alist nil t nil nil default))) + (completing-read (format-prompt "Help on predicate" default) + prolog-info-alist nil t nil nil default))) (defun prolog-build-info-alist (&optional verbose) "Build an alist of all builtins and library predicates. diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 43ee3c0c152..b1f61c89a41 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -4773,10 +4773,14 @@ Interactively, prompt for symbol." (interactive (let ((symbol (python-eldoc--get-symbol-at-point)) (enable-recursive-minibuffers t)) - (list (read-string (if symbol - (format "Describe symbol (default %s): " symbol) - "Describe symbol: ") - nil nil symbol)))) + (list (read-string + ;; `format-prompt' is new in Emacs 28.1. + (if (fboundp 'format-prompt) + (format-prompt "Describe symbol" symbol) + (if symbol + (format "Describe symbol (default %s): " symbol) + "Describe symbol: ")) + nil nil symbol)))) (message (python-eldoc--get-doc-at-point symbol))) (defun python-describe-at-point (symbol process) diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index 02eccb33012..283c057e522 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el @@ -3219,14 +3219,7 @@ For both `:file' and `:completion', there can also be a symbol (let* ((default (plist-get plist :default)) (last-value (sql-default-value symbol)) - (prompt-def - (if default - (if (string-match "\\(\\):[ \t]*\\'" prompt) - (replace-match (format " (default \"%s\")" default) t t prompt 1) - (replace-regexp-in-string "[ \t]*\\'" - (format " (default \"%s\") " default) - prompt t t)) - prompt)) + (prompt-def (format-prompt prompt default)) (use-dialog-box nil)) (cond ((plist-member plist :file) @@ -3311,7 +3304,7 @@ function like this: (sql-get-login \\='user \\='password \\='database)." (let ((plist (cdr-safe w))) (pcase (or (car-safe w) w) ('user - (sql-get-login-ext 'sql-user "User: " 'sql-user-history plist)) + (sql-get-login-ext 'sql-user "User" 'sql-user-history plist)) ('password (setq-default sql-password @@ -3330,14 +3323,14 @@ function like this: (sql-get-login \\='user \\='password \\='database)." (read-passwd "Password: " nil (sql-default-value 'sql-password))))) ('server - (sql-get-login-ext 'sql-server "Server: " 'sql-server-history plist)) + (sql-get-login-ext 'sql-server "Server" 'sql-server-history plist)) ('database - (sql-get-login-ext 'sql-database "Database: " + (sql-get-login-ext 'sql-database "Database" 'sql-database-history plist)) ('port - (sql-get-login-ext 'sql-port "Port: " + (sql-get-login-ext 'sql-port "Port" nil (append '(:number t) plist))))))) (defun sql-find-sqli-buffer (&optional product connection) diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el index d98230d9a0e..5ef382b91ef 100644 --- a/lisp/progmodes/verilog-mode.el +++ b/lisp/progmodes/verilog-mode.el @@ -5478,8 +5478,11 @@ becomes: (let* ((pop-up-windows t)) (let ((name (expand-file-name (read-file-name - (format "Find this error in: (default %s) " - file) + ;; `format-prompt' is new in Emacs 28.1. + (if (fboundp 'format-prompt) + (format-prompt "Find this error in" file) + (format "Find this error in (default %s): " + file)) nil ;; dir file t)))) (setq buffer @@ -7863,14 +7866,14 @@ If search fails, other files are checked based on (let* ((default (verilog-get-default-symbol)) ;; The following variable is used in verilog-comp-function (verilog-buffer-to-use (current-buffer)) - (label (if (not (string= default "")) - ;; Do completion with default - (completing-read (concat "Goto-Label: (default " - default ") ") - #'verilog-comp-defun nil nil "") - ;; There is no default value. Complete without it - (completing-read "Goto-Label: " - #'verilog-comp-defun nil nil ""))) + (label + (completing-read (cond ((fboundp 'format-prompt) + ;; `format-prompt' is new in Emacs 28.1. + (format-prompt "Goto-Label" default)) + ((not (string= default "")) + (concat "Goto-Label (default " default "): ")) + (t "Goto-Label: ")) + #'verilog-comp-defun nil nil "")) pt) ;; Make sure library paths are correct, in case need to resolve module (verilog-auto-reeval-locals) diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index 267ee16400e..210fc2b1d8b 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -1310,12 +1310,17 @@ definitions." (xref--prompt-p this-command)) (let ((id (completing-read - (if def - (format "%s (default %s): " - (substring prompt 0 (string-match - "[ :]+\\'" prompt)) - def) - prompt) + ;; `format-prompt' is new in Emacs 28.1 + (if (fboundp 'format-prompt) + (format-prompt (substring prompt 0 (string-match + "[ :]+\\'" prompt)) + def) + (if def + (format "%s (default %s): " + (substring prompt 0 (string-match + "[ :]+\\'" prompt)) + def) + prompt)) (xref-backend-identifier-completion-table backend) nil nil nil 'xref--read-identifier-history def))) diff --git a/lisp/ses.el b/lisp/ses.el index ea966295b18..51843eab032 100644 --- a/lisp/ses.el +++ b/lisp/ses.el @@ -3774,7 +3774,9 @@ function is redefined." (setq name (intern name)) (let* ((cur-printer (gethash name ses--local-printer-hashmap)) (default (and cur-printer (ses--locprn-def cur-printer)))) - (setq def (ses-read-printer (format "Enter definition of printer %S" name) + (setq def (ses-read-printer (format-prompt + "Enter definition of printer %S" + default name) default))) (list name def))) diff --git a/lisp/textmodes/artist.el b/lisp/textmodes/artist.el index c42286e5bc3..25f0c35aa5d 100644 --- a/lisp/textmodes/artist.el +++ b/lisp/textmodes/artist.el @@ -2840,9 +2840,8 @@ Returns a list of strings." (if (memq system-type '(windows-nt ms-dos)) (artist-figlet-get-font-list-windows) (artist-figlet-get-font-list))) - (font (completing-read (concat "Select font (default " - artist-figlet-default-font - "): ") + (font (completing-read (format-prompt "Select font" + artist-figlet-default-font) (mapcar (lambda (font) (cons font font)) avail-fonts)))) diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 6fd66b2502f..5fba93c76eb 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -2457,7 +2457,7 @@ Only applies the FSPEC to the args part of FORMAT." (default (tex-compile-default fspec))) (list default-directory (completing-read - (format "Command [%s]: " (tex-summarize-command default)) + (format-prompt "Command" (tex-summarize-command default)) (mapcar (lambda (x) (list (tex-format-cmd (eval (car x) t) fspec))) tex-compile-commands) diff --git a/lisp/vc/diff.el b/lisp/vc/diff.el index 352fa693ffb..4061fedd578 100644 --- a/lisp/vc/diff.el +++ b/lisp/vc/diff.el @@ -96,15 +96,15 @@ Non-interactively, OLD and NEW may each be a file or a buffer." (interactive (let* ((newf (if (and buffer-file-name (file-exists-p buffer-file-name)) (read-file-name - (concat "Diff new file (default " - (file-name-nondirectory buffer-file-name) "): ") + (format-prompt "Diff new file" + (file-name-nondirectory buffer-file-name)) nil buffer-file-name t) (read-file-name "Diff new file: " nil nil t))) (oldf (file-newest-backup newf))) (setq oldf (if (and oldf (file-exists-p oldf)) (read-file-name - (concat "Diff original file (default " - (file-name-nondirectory oldf) "): ") + (format-prompt "Diff original file" + (file-name-nondirectory oldf)) (file-name-directory oldf) oldf t) (read-file-name "Diff original file: " (file-name-directory newf) nil t))) diff --git a/lisp/vc/ediff-ptch.el b/lisp/vc/ediff-ptch.el index 4135e8b4702..7622cf4c196 100644 --- a/lisp/vc/ediff-ptch.el +++ b/lisp/vc/ediff-ptch.el @@ -503,15 +503,11 @@ are two possible targets for this %spatch. However, these files do not exist." patch-file-name) (setq patch-file-name (read-file-name - (format "Patch is in file%s: " - (cond ((and buffer-file-name - (equal (expand-file-name dir) - (file-name-directory buffer-file-name))) - (concat - " (default " - (file-name-nondirectory buffer-file-name) - ")")) - (t ""))) + (format-prompt "Patch is in file" + (and buffer-file-name + (equal (expand-file-name dir) + (file-name-directory buffer-file-name)) + (file-name-nondirectory buffer-file-name))) dir buffer-file-name 'must-match)) (if (file-directory-p patch-file-name) (error "Patch file cannot be a directory: %s" patch-file-name) diff --git a/lisp/vc/ediff-util.el b/lisp/vc/ediff-util.el index 9016d1df5c4..346c3c0a666 100644 --- a/lisp/vc/ediff-util.el +++ b/lisp/vc/ediff-util.el @@ -3103,11 +3103,7 @@ Hit \\[ediff-recenter] to reset the windows afterward." (lambda () (when defaults (setq minibuffer-default defaults))) (read-file-name - (format "%s%s " - prompt - (cond (default-file - (concat " (default " default-file "):")) - (t (concat " (default " default-dir "):")))) + (format-prompt prompt (or default-file default-dir)) default-dir (or default-file default-dir) t ; must match, no-confirm diff --git a/lisp/vc/pcvs.el b/lisp/vc/pcvs.el index bbc81ef195d..8f662e84589 100644 --- a/lisp/vc/pcvs.el +++ b/lisp/vc/pcvs.el @@ -1284,8 +1284,7 @@ marked instead. A directory can never be marked." (intern (upcase (completing-read - (concat - "Mark files in state" (if default (concat " [" default "]")) ": ") + (format-prompt "Mark files in state" default) (mapcar (lambda (x) (list (downcase (symbol-name (car x))))) cvs-states) diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 5b259fcdb33..edc4169465a 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -1863,13 +1863,10 @@ Return t if the buffer had changes, nil otherwise." (vc-working-revision first)))) (when (string= rev1-default "") (setq rev1-default nil)))) ;; construct argument list - (let* ((rev1-prompt (if rev1-default - (concat "Older revision (default " - rev1-default "): ") - "Older revision: ")) - (rev2-prompt (concat "Newer revision (default " - ;; (or rev2-default - "current source): ")) + (let* ((rev1-prompt (format-prompt "Older revision" rev1-default)) + (rev2-prompt (format-prompt "Newer revision" + ;; (or rev2-default + "current source")) (rev1 (vc-read-revision rev1-prompt files backend rev1-default)) (rev2 (vc-read-revision rev2-prompt files backend nil))) ;; rev2-default (when (string= rev1 "") (setq rev1 nil)) @@ -2082,7 +2079,7 @@ If `F.~REV~' already exists, use it instead of checking it out again." (with-current-buffer (or (buffer-base-buffer) (current-buffer)) (vc-ensure-vc-buffer) (list - (vc-read-revision "Revision to visit (default is working revision): " + (vc-read-revision (format-prompt "Revision to visit" "working revision") (list buffer-file-name))))) (set-buffer (or (buffer-base-buffer) (current-buffer))) (vc-ensure-vc-buffer) @@ -2378,7 +2375,7 @@ This function runs the hook `vc-retrieve-tag-hook' when finished." (read-directory-name "Directory: " default-directory nil t)))) (list dir - (vc-read-revision "Tag name to retrieve (default latest revisions): " + (vc-read-revision (format-prompt "Tag name to retrieve" "latest revisions") (list dir) (vc-responsible-backend dir))))) (let* ((backend (vc-responsible-backend dir)) diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index 05606fbfb4a..fb06a95f51c 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el @@ -3325,7 +3325,7 @@ It reads a file name from an editable text field." ;;; (file (file-name-nondirectory value)) ;;; (menu-tag (widget-apply widget :menu-tag-get)) ;;; (must-match (widget-get widget :must-match)) -;;; (answer (read-file-name (concat menu-tag " (default " value "): ") +;;; (answer (read-file-name (format-prompt menu-tag value) ;;; dir nil must-match file))) ;;; (widget-value-set widget (abbreviate-file-name answer)) ;;; (widget-setup) -- cgit v1.2.3