From 949dd41c31dab69f7a5067bba324c28bb2cfbf8e Mon Sep 17 00:00:00 2001 From: Mattias Engdegård Date: Tue, 27 Jul 2021 17:26:26 +0200 Subject: Fix mistake in switch-case generation of `null` (bug#49746) Reported by Gregor Zattler. * lisp/emacs-lisp/bytecomp.el (byte-compile--cond-switch-prefix): Be more careful in the selection of equality. * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases): Add test case. --- lisp/emacs-lisp/bytecomp.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lisp/emacs-lisp/bytecomp.el') diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index f6150069e81..1b64a06fe42 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -4362,7 +4362,8 @@ Return (TAIL VAR TEST CASES), where: (and (or (eq var switch-var) (not switch-var)) (progn (setq switch-var var) - (setq switch-test 'eq) + (setq switch-test + (byte-compile--common-test switch-test 'eq)) (unless (memq nil keys) (push nil keys) (push (cons (list nil) (or body '(t))) cases)) -- cgit v1.2.3 From c9c1460342a5aadf3819ceb6ee5ac28c14760fce Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Wed, 28 Jul 2021 18:10:59 +0200 Subject: Make byte-recompile-directory less brittle * lisp/emacs-lisp/bytecomp.el (byte-recompile-directory): Don't interpret files named "~" as $HOME (bug#49758). --- lisp/emacs-lisp/bytecomp.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lisp/emacs-lisp/bytecomp.el') diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 1b64a06fe42..a6e7e03cb0a 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -1857,8 +1857,8 @@ also be compiled." (while directories (setq directory (car directories)) (message "Checking %s..." directory) - (dolist (file (directory-files directory)) - (let ((source (expand-file-name file directory))) + (dolist (source (directory-files directory t)) + (let ((file (file-name-nondirectory source))) (if (file-directory-p source) (and (not (member file '("RCS" "CVS"))) (not (eq ?\. (aref file 0))) -- cgit v1.2.3 From 566e29f78ccee4fcf0421576c0306860c8afae0f Mon Sep 17 00:00:00 2001 From: Mattias Engdegård Date: Wed, 28 Jul 2021 21:12:27 +0200 Subject: Single source optimiser entry point Make the optimiser aware of lexical arguments. Otherwise we cannot know for sure whether a variable is lexical or dynamic during traversal. * lisp/emacs-lisp/byte-opt.el (byte-optimize-one-form): New optimiser entry point, replacing the recursive byte-optimize-form. * lisp/emacs-lisp/bytecomp.el (byte-optimize-one-form): Autoload. (byte-compile-keep-pending, byte-compile-top-level): Use byte-optimize-one-form. --- lisp/emacs-lisp/byte-opt.el | 9 ++++++++- lisp/emacs-lisp/bytecomp.el | 6 +++--- 2 files changed, 11 insertions(+), 4 deletions(-) (limited to 'lisp/emacs-lisp/bytecomp.el') diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index ad9f827171a..4117533cda5 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el @@ -652,8 +652,15 @@ Same format as `byte-optimize--lexvars', with shared structure and contents.") (byte-optimize-constant-args form) form)))))) -(defun byte-optimize-form (form &optional for-effect) +(defun byte-optimize-one-form (form &optional for-effect) "The source-level pass of the optimizer." + ;; Make optimiser aware of lexical arguments. + (let ((byte-optimize--lexvars + (mapcar (lambda (v) (list (car v) t)) + byte-compile--lexical-environment))) + (byte-optimize-form form for-effect))) + +(defun byte-optimize-form (form &optional for-effect) (while (progn ;; First, optimize all sub-forms of this one. diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index a6e7e03cb0a..7bd642d2b23 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -192,7 +192,7 @@ otherwise adds \".elc\"." (autoload 'byte-compile-inline-expand "byte-opt") ;; This is the entry point to the lapcode optimizer pass1. -(autoload 'byte-optimize-form "byte-opt") +(autoload 'byte-optimize-one-form "byte-opt") ;; This is the entry point to the lapcode optimizer pass2. (autoload 'byte-optimize-lapcode "byte-opt") @@ -2455,7 +2455,7 @@ list that represents a doc string reference. (defun byte-compile-keep-pending (form &optional handler) (if (memq byte-optimize '(t source)) - (setq form (byte-optimize-form form t))) + (setq form (byte-optimize-one-form form t))) (if handler (let ((byte-compile--for-effect t)) ;; To avoid consing up monstrously large forms at load time, we split @@ -3155,7 +3155,7 @@ for symbols generated by the byte compiler itself." (byte-compile-output nil) (byte-compile-jump-tables nil)) (if (memq byte-optimize '(t source)) - (setq form (byte-optimize-form form byte-compile--for-effect))) + (setq form (byte-optimize-one-form form byte-compile--for-effect))) (while (and (eq (car-safe form) 'progn) (null (cdr (cdr form)))) (setq form (nth 1 form))) ;; Set up things for a lexically-bound function. -- cgit v1.2.3 From 4015fb6e694d2a2593a3db3b65704d783035f46e Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Mon, 23 Aug 2021 02:04:55 +0200 Subject: Improve byte-compile-warnings doc string * lisp/emacs-lisp/bytecomp.el (byte-compile-warnings): Mention 'byte-compile-docstring-max-column'. --- etc/NEWS | 6 ++++-- lisp/emacs-lisp/bytecomp.el | 5 +++-- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'lisp/emacs-lisp/bytecomp.el') diff --git a/etc/NEWS b/etc/NEWS index 3793bc46265..1866ed0d6d0 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -3736,10 +3736,11 @@ file can affect code in another. For details, see the manual section *** '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 80 characters or 'fill-column'. This is controlled by the -new user option 'byte-compile-docstring-max-column'. +largest of 'byte-compile-docstring-max-column' or 'fill-column' +characters. +++ *** 'byte-compile-file' optional argument LOAD is now obsolete. @@ -3788,6 +3789,7 @@ presented to users or passed on to other applications. ** 'start-process-shell-command' and 'start-file-process-shell-command' do not support the old calling conventions any longer. +--- ** Functions operating on local file names now check that the file names don't contain any NUL bytes. This avoids subtle bugs caused by silently using only the part of the file name until the first NUL byte. diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 7bd642d2b23..145cdbaa6ed 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -322,8 +322,9 @@ Elements of the list may be: make-local calls to make-variable-buffer-local that may be incorrect. mapcar mapcar called for effect. constants let-binding of, or assignment to, constants/nonvariables. - docstrings docstrings that are too wide (longer than 80 characters, - or `fill-column', whichever is bigger) + docstrings docstrings that are too wide (longer than + `byte-compile-docstring-max-column' or + `fill-column' characters, whichever is bigger). suspicious constructs that usually don't do what the coder wanted. If the list begins with `not', then the remaining elements specify warnings to -- cgit v1.2.3 From bba48d6ee5d90f326c70cbe8af19dfe6b00651ba Mon Sep 17 00:00:00 2001 From: Mattias Engdegård Date: Thu, 10 Jun 2021 21:27:16 +0200 Subject: More robust optimisation of `ignore` Treat `ignore` as any other function during source-level optimisation, to avoid having its warning-suppression effects cancelled by repeated passes. Instead, define a custom code generation function. * lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): Don't treat `ignore' specially here. (side-effect-free-fns): Don't mark `ignore` as side-effect-free or error-free (although it is), since that would allow the optimiser to elide calls. * lisp/emacs-lisp/bytecomp.el (ignore, byte-compile-ignore): Define and register a code-gen function. --- lisp/emacs-lisp/byte-opt.el | 11 +++-------- lisp/emacs-lisp/bytecomp.el | 6 ++++++ 2 files changed, 9 insertions(+), 8 deletions(-) (limited to 'lisp/emacs-lisp/bytecomp.el') diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index 0c30d83f065..23c5a566cea 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el @@ -562,13 +562,6 @@ Same format as `byte-optimize--lexvars', with shared structure and contents.") `(catch ,(byte-optimize-form tag nil) . ,(byte-optimize-body exps for-effect)))) - (`(ignore . ,exps) - ;; Don't treat the args to `ignore' as being - ;; computed for effect. We want to avoid the warnings - ;; that might occur if they were treated that way. - ;; However, don't actually bother calling `ignore'. - `(progn ,@(mapcar #'byte-optimize-form exps) nil)) - ;; Needed as long as we run byte-optimize-form after cconv. (`(internal-make-closure . ,_) ;; Look up free vars and mark them to be kept, so that they @@ -1419,7 +1412,9 @@ See Info node `(elisp) Integer Basics'." fixnump floatp following-char framep get-largest-window get-lru-window hash-table-p - identity ignore integerp integer-or-marker-p interactive-p + ;; `ignore' isn't here because we don't want calls to it elided; + ;; see `byte-compile-ignore'. + identity integerp integer-or-marker-p interactive-p invocation-directory invocation-name keymapp keywordp list listp diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 145cdbaa6ed..8ea591b5d0e 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -4207,6 +4207,7 @@ discarding." (byte-defop-compiler-1 funcall) (byte-defop-compiler-1 let) (byte-defop-compiler-1 let* byte-compile-let) +(byte-defop-compiler-1 ignore) (defun byte-compile-progn (form) (byte-compile-body-do-effect (cdr form))) @@ -4222,6 +4223,11 @@ discarding." (if ,discard 'byte-goto-if-nil 'byte-goto-if-nil-else-pop)) ,tag)) +(defun byte-compile-ignore (form) + (dolist (arg (cdr form)) + (byte-compile-form arg t)) + (byte-compile-form nil)) + ;; Return the list of items in CONDITION-PARAM that match PRED-LIST. ;; Only return items that are not in ONLY-IF-NOT-PRESENT. (defun byte-compile-find-bound-condition (condition-param -- cgit v1.2.3 From dea67939b65f39b60d8e990745504bd8f9e3be2c Mon Sep 17 00:00:00 2001 From: Arthur Miller Date: Fri, 10 Sep 2021 20:57:19 +0200 Subject: Add support for GCC compiler command-line options * lisp/emacs-lisp/comp.el ('native-comp-compiler-options): New option. * lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Add support for new 'native-comp-compiler-options'. * src/comp.c (Fcomp_native_compiler_options_effective_p): New function. (add_compiler_options): New function. (Fcomp__compile_ctxt_to_file): Call 'add_compiler_options'. --- lisp/emacs-lisp/bytecomp.el | 3 +++ lisp/emacs-lisp/comp.el | 18 ++++++++++++++ src/comp.c | 58 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 79 insertions(+) (limited to 'lisp/emacs-lisp/bytecomp.el') diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 8ea591b5d0e..47b3c82456c 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -2257,6 +2257,9 @@ With argument ARG, insert value in current buffer after the form." (push `(native-comp-speed . ,native-comp-speed) byte-native-qualities) (defvar native-comp-debug) (push `(native-comp-debug . ,native-comp-debug) byte-native-qualities) + (defvar native-comp-compiler-options) + (push `(native-comp-compiler-options . ,native-comp-compiler-options) + byte-native-qualities) (defvar native-comp-driver-options) (push `(native-comp-driver-options . ,native-comp-driver-options) byte-native-qualities) diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index 80a1da5ad8c..92928e4cedb 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -166,6 +166,16 @@ if `confirm-kill-processes' is non-nil." :type 'boolean :version "28.1") +(defcustom native-comp-compiler-options nil + "Command line options passed verbatim to GCC compiler. +Note that not all options are meaningful and some options might even +break your Emacs. Use at own risk. + +Passing these options is only available in libgccjit version 9 +and above." + :type '(repeat string) + :version "28.1") + (defcustom native-comp-driver-options nil "Options passed verbatim to the native compiler's back-end driver. Note that not all options are meaningful; typically only the options @@ -755,6 +765,8 @@ Returns ELT." :documentation "Default speed for this compilation unit.") (debug native-comp-debug :type number :documentation "Default debug level for this compilation unit.") + (compiler-options native-comp-compiler-options :type list + :documentation "Options for the GCC compiler.") (driver-options native-comp-driver-options :type list :documentation "Options for the GCC driver.") (top-level-forms () :type list @@ -1347,6 +1359,8 @@ clashes." byte-native-qualities) (comp-ctxt-debug comp-ctxt) (alist-get 'native-comp-debug byte-native-qualities) + (comp-ctxt-compiler-options comp-ctxt) (alist-get 'native-comp-compiler-options + byte-native-qualities) (comp-ctxt-driver-options comp-ctxt) (alist-get 'native-comp-driver-options byte-native-qualities) (comp-ctxt-top-level-forms comp-ctxt) @@ -3663,6 +3677,8 @@ Prepare every function for final compilation and drive the C back-end." comp-libgccjit-reproducer ,comp-libgccjit-reproducer comp-ctxt ,comp-ctxt native-comp-eln-load-path ',native-comp-eln-load-path + native-comp-compiler-options + ',native-comp-compiler-options native-comp-driver-options ',native-comp-driver-options load-path ',load-path) @@ -3926,6 +3942,8 @@ display a message." comp-libgccjit-reproducer ,comp-libgccjit-reproducer comp-async-compilation t native-comp-eln-load-path ',native-comp-eln-load-path + native-comp-compiler-options + ',native-comp-compiler-options native-comp-driver-options ',native-comp-driver-options load-path ',load-path diff --git a/src/comp.c b/src/comp.c index 7e21331e666..0012860096d 100644 --- a/src/comp.c +++ b/src/comp.c @@ -515,6 +515,7 @@ typedef struct { typedef struct { EMACS_INT speed; EMACS_INT debug; + Lisp_Object compiler_options; Lisp_Object driver_options; gcc_jit_context *ctxt; gcc_jit_type *void_type; @@ -4383,6 +4384,22 @@ DEFUN ("comp-native-driver-options-effective-p", } #pragma GCC diagnostic pop +#pragma GCC diagnostic ignored "-Waddress" +DEFUN ("comp-native-compiler-options-effective-p", + Fcomp_native_compiler_options_effective_p, + Scomp_native_compiler_options_effective_p, + 0, 0, 0, + doc: /* Return t if `comp-native-compiler-options' is effective. */) + (void) +{ +#if defined (LIBGCCJIT_HAVE_gcc_jit_context_add_command_line_option) + if (gcc_jit_context_add_command_line_option) + return Qt; +#endif + return Qnil; +} +#pragma GCC diagnostic pop + static void add_driver_options (void) { @@ -4422,6 +4439,43 @@ add_driver_options (void) #endif } +static void +add_compiler_options (void) +{ + Lisp_Object options = Fsymbol_value (Qnative_comp_compiler_options); + +#if defined (LIBGCCJIT_HAVE_gcc_jit_context_add_command_line_option) + load_gccjit_if_necessary (true); + if (!NILP (Fcomp_native_compiler_options_effective_p ())) + FOR_EACH_TAIL (options) + gcc_jit_context_add_command_line_option (comp.ctxt, + /* FIXME: Need to encode + this, but how? either + ENCODE_FILE or + ENCODE_SYSTEM. */ + SSDATA (XCAR (options))); +#endif + if (CONSP (options)) + xsignal1 (Qnative_compiler_error, + build_string ("Customizing native compiler options" + " via `comp-native-compiler-options' is" + " only available on libgccjit version 9" + " and above.")); + + /* Captured `comp-native-compiler-options' because file-local. */ +#if defined (LIBGCCJIT_HAVE_gcc_jit_context_add_command_line_option) + options = comp.compiler_options; + if (!NILP (Fcomp_native_compiler_options_effective_p ())) + FOR_EACH_TAIL (options) + gcc_jit_context_add_command_line_option (comp.ctxt, + /* FIXME: Need to encode + this, but how? either + ENCODE_FILE or + ENCODE_SYSTEM. */ + SSDATA (XCAR (options))); +#endif +} + DEFUN ("comp--compile-ctxt-to-file", Fcomp__compile_ctxt_to_file, Scomp__compile_ctxt_to_file, 1, 1, 0, @@ -4467,6 +4521,7 @@ DEFUN ("comp--compile-ctxt-to-file", Fcomp__compile_ctxt_to_file, comp.debug = XFIXNUM (CALL1I (comp-ctxt-debug, Vcomp_ctxt)); eassert (comp.debug < INT_MAX); comp.driver_options = CALL1I (comp-ctxt-driver-options, Vcomp_ctxt); + comp.compiler_options = CALL1I (comp-ctxt-compiler-options, Vcomp_ctxt); if (comp.debug) gcc_jit_context_set_bool_option (comp.ctxt, @@ -4541,6 +4596,7 @@ DEFUN ("comp--compile-ctxt-to-file", Fcomp__compile_ctxt_to_file, "-fdisable-tree-isolate-paths"); #endif + add_compiler_options (); add_driver_options (); if (comp.debug > 1) @@ -5248,6 +5304,7 @@ compiled one. */); DEFSYM (Qnative_comp_speed, "native-comp-speed"); DEFSYM (Qnative_comp_debug, "native-comp-debug"); DEFSYM (Qnative_comp_driver_options, "native-comp-driver-options"); + DEFSYM (Qnative_comp_compiler_options, "native-comp-compiler-options"); DEFSYM (Qcomp_libgccjit_reproducer, "comp-libgccjit-reproducer"); /* Limple instruction set. */ @@ -5357,6 +5414,7 @@ compiled one. */); defsubr (&Scomp_el_to_eln_rel_filename); defsubr (&Scomp_el_to_eln_filename); defsubr (&Scomp_native_driver_options_effective_p); + defsubr (&Scomp_native_compiler_options_effective_p); defsubr (&Scomp__install_trampoline); defsubr (&Scomp__init_ctxt); defsubr (&Scomp__release_ctxt); -- cgit v1.2.3 From 25ebb9374bdadf66153727831fc7ff131c8cf299 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Tue, 14 Sep 2021 07:55:56 +0200 Subject: ; More minor docfixes found by checkdoc --- lisp/emacs-lisp/advice.el | 112 +++++++++++++++++++-------------------- lisp/emacs-lisp/bytecomp.el | 8 +-- lisp/emacs-lisp/cconv.el | 2 +- lisp/emacs-lisp/check-declare.el | 6 +-- lisp/emacs-lisp/cl-indent.el | 4 +- lisp/emacs-lisp/copyright.el | 4 +- lisp/emacs-lisp/debug.el | 2 +- lisp/emacs-lisp/disass.el | 4 +- lisp/emacs-lisp/easy-mmode.el | 4 +- lisp/emacs-lisp/eieio-custom.el | 2 +- lisp/emacs-lisp/eldoc.el | 2 +- lisp/emacs-lisp/elp.el | 4 +- lisp/emacs-lisp/ewoc.el | 6 +-- lisp/emacs-lisp/find-func.el | 2 +- lisp/emacs-lisp/generator.el | 6 +-- lisp/emacs-lisp/let-alist.el | 4 +- lisp/emacs-lisp/lisp-mode.el | 2 +- lisp/emacs-lisp/macroexp.el | 8 +-- lisp/emacs-lisp/nadvice.el | 2 +- lisp/emacs-lisp/package-x.el | 2 +- lisp/emacs-lisp/pcase.el | 2 +- lisp/emacs-lisp/shadow.el | 10 ++-- lisp/emacs-lisp/testcover.el | 36 +++++++------ lisp/emacs-lisp/thunk.el | 2 +- lisp/eshell/em-basic.el | 2 +- lisp/eshell/em-glob.el | 4 +- lisp/eshell/em-hist.el | 2 +- lisp/eshell/em-ls.el | 14 ++--- lisp/eshell/em-pred.el | 2 +- lisp/eshell/em-rebind.el | 2 +- lisp/eshell/em-smart.el | 4 +- lisp/eshell/esh-arg.el | 2 +- lisp/eshell/esh-cmd.el | 4 +- lisp/eshell/esh-ext.el | 2 +- lisp/eshell/esh-io.el | 2 +- lisp/eshell/esh-mode.el | 2 +- lisp/eshell/eshell.el | 10 ++-- lisp/gnus/gnus-msg.el | 2 +- lisp/gnus/message.el | 2 +- lisp/info-xref.el | 8 +-- lisp/net/dictionary.el | 12 ++--- lisp/org/ol.el | 2 +- lisp/so-long.el | 2 +- lisp/svg.el | 2 +- lisp/vc/compare-w.el | 2 +- lisp/vc/diff-mode.el | 2 +- lisp/vc/ediff-diff.el | 7 ++- lisp/vc/ediff-help.el | 1 - lisp/vc/ediff-init.el | 14 ++--- lisp/vc/ediff-merg.el | 5 +- lisp/vc/ediff-mult.el | 5 +- lisp/vc/ediff.el | 2 +- lisp/vc/log-edit.el | 4 +- lisp/vc/log-view.el | 2 +- lisp/vc/pcvs.el | 2 +- lisp/vc/vc-annotate.el | 2 +- lisp/vc/vc-bzr.el | 2 +- lisp/vc/vc-dav.el | 2 +- lisp/vc/vc-dir.el | 20 +++---- lisp/vc/vc-dispatcher.el | 9 ++-- lisp/vc/vc-git.el | 2 +- lisp/vc/vc-hg.el | 10 ++-- lisp/vc/vc-hooks.el | 4 +- lisp/vc/vc-rcs.el | 16 +++--- lisp/vc/vc-sccs.el | 6 +-- lisp/vc/vc-src.el | 11 ++-- lisp/vc/vc-svn.el | 2 +- lisp/vc/vc.el | 4 +- lisp/x-dnd.el | 2 +- 69 files changed, 228 insertions(+), 228 deletions(-) (limited to 'lisp/emacs-lisp/bytecomp.el') diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el index 8e8d0e22651..1f276c7f7a3 100644 --- a/lisp/emacs-lisp/advice.el +++ b/lisp/emacs-lisp/advice.el @@ -36,12 +36,12 @@ ;; @ Introduction: ;; =============== ;; This package implements a full-fledged Lisp-style advice mechanism -;; for Emacs Lisp. Advice is a clean and efficient way to modify the +;; for Emacs Lisp. Advice is a clean and efficient way to modify the ;; behavior of Emacs Lisp functions without having to keep personal -;; modified copies of such functions around. A great number of such +;; modified copies of such functions around. A great number of such ;; modifications can be achieved by treating the original function as a ;; black box and specifying a different execution environment for it -;; with a piece of advice. Think of a piece of advice as a kind of fancy +;; with a piece of advice. Think of a piece of advice as a kind of fancy ;; hook that you can attach to any function/macro/subr. ;; @ Highlights: @@ -95,7 +95,7 @@ ;; @ Restrictions: ;; =============== ;; - Advised functions/macros/subrs will only exhibit their advised behavior -;; when they are invoked via their function cell. This means that advice will +;; when they are invoked via their function cell. This means that advice will ;; not work for the following: ;; + advised subrs that are called directly from other subrs or C-code ;; + advised subrs that got replaced with their byte-code during @@ -107,7 +107,7 @@ ;; ========== ;; This package is an extension and generalization of packages such as ;; insert-hooks.el written by Noah S. Friedman, and advise.el written by -;; Raul J. Acevedo. Some ideas used in here come from these packages, +;; Raul J. Acevedo. Some ideas used in here come from these packages, ;; others come from the various Lisp advice mechanisms I've come across ;; so far, and a few are simply mine. @@ -235,10 +235,10 @@ ;; found in the list of before/around/after advices will be used. ;; is a list of symbols that specify further information about the -;; advice. All flags can be specified with unambiguous initial substrings. +;; advice. All flags can be specified with unambiguous initial substrings. ;; `activate': Specifies that the advice information of the advised ;; function should be activated right after this advice has been -;; defined. In forward advices `activate' will be ignored. +;; defined. In forward advices `activate' will be ignored. ;; `protect': Specifies that this advice should be protected against ;; non-local exits and errors in preceding code/advices. ;; `compile': Specifies that the advised function should be byte-compiled. @@ -347,7 +347,7 @@ ;; argument list redefinition given in a piece of advice. While this simple ;; method might be sufficient in many cases, it has the disadvantage that it ;; is not very portable because it hardcodes the argument names into the -;; advice. If the definition of the original function changes the advice +;; advice. If the definition of the original function changes the advice ;; might break even though the code might still be correct. Situations like ;; that arise, for example, if one advises a subr like `eval-region' which ;; gets redefined in a non-advice style into a function by the edebug @@ -443,7 +443,7 @@ ;; of the advised function we need a mapping mechanism that maps this ;; argument list onto that of the original function. Hence SYM and ;; NEWDEF have to be properly mapped onto the &rest variable when the -;; original definition is called. Advice automatically takes care of +;; original definition is called. Advice automatically takes care of ;; that mapping, hence, the advice programmer can specify an argument ;; list without having to know about the exact structure of the ;; original argument list as long as the new argument list takes a @@ -467,7 +467,7 @@ ;; The advised definition will get compiled either if `ad-activate' was called ;; interactively with a prefix argument, or called explicitly with its second ;; argument as t, or, if `ad-default-compilation-action' justifies it according -;; to the current system state. If the advised definition was +;; to the current system state. If the advised definition was ;; constructed during "preactivation" (see below) then that definition will ;; be already compiled because it was constructed during byte-compilation of ;; the file that contained the `defadvice' with the `preactivate' flag. @@ -707,7 +707,7 @@ ;; @@ Adding a piece of advice with `ad-add-advice': ;; ================================================= ;; The non-interactive function `ad-add-advice' can be used to add a piece of -;; advice to some function without using `defadvice'. This is useful if advice +;; advice to some function without using `defadvice'. This is useful if advice ;; has to be added somewhere by a function (also look at `ad-make-advice'). ;; @@ Activation/deactivation advices, file load hooks: @@ -739,7 +739,7 @@ ;; A piece of advice gets defined with `defadvice' and added to the ;; `advice-info' property of a function. ;; - Enablement: -;; Every piece of advice has an enablement flag associated with it. Only +;; Every piece of advice has an enablement flag associated with it. Only ;; enabled advices are considered during construction of an advised ;; definition. ;; - Activation: @@ -808,9 +808,9 @@ ;; argument access text macros to get/set the values of ;; actual arguments at a certain position ;; ad-arg-bindings text macro that returns the actual names, values -;; and types of the arguments as a list of bindings. The +;; and types of the arguments as a list of bindings. The ;; order of the bindings corresponds to the order of the -;; arguments. The individual fields of every binding (name, +;; arguments. The individual fields of every binding (name, ;; value and type) can be accessed with the function ;; `ad-arg-binding-field' (see example above). ;; ad-do-it text macro that identifies the place where the original @@ -839,20 +839,20 @@ ;; use the macro `defadvice' which takes a function name, a list of advice ;; specifiers and a list of body forms as arguments. The first element of ;; the advice specifiers is the class of the advice, the second is its name, -;; the third its position and the rest are some flags. The class of our +;; the third its position and the rest are some flags. The class of our ;; first advice is `before', its name is `fg-add2', its position among the ;; currently defined before advices (none so far) is `first', and the advice -;; will be `activate'ed immediately. Advice names are global symbols, hence, -;; the name space conventions used for function names should be applied. All +;; will be `activate'ed immediately. Advice names are global symbols, hence, +;; the name space conventions used for function names should be applied. All ;; advice names in this tutorial will be prefixed with `fg' for `Foo Games' ;; (because everybody has the right to be inconsistent all the function names ;; used in this tutorial do NOT follow this convention). ;; ;; In the body of an advice we can refer to the argument variables of the -;; original function by name. Here we add 1 to X so the effect of calling +;; original function by name. Here we add 1 to X so the effect of calling ;; `foo' will be to actually add 2. All of the advice definitions below only ;; have one body form for simplicity, but there is no restriction to that -;; extent. Every piece of advice can have a documentation string which will +;; extent. Every piece of advice can have a documentation string which will ;; be combined with the documentation of the original function. ;; ;; (defadvice foo (before fg-add2 first activate) @@ -866,11 +866,11 @@ ;; @@ Specifying the position of an advice: ;; ======================================== ;; Now we define the second before advice which will cancel the effect of -;; the previous advice. This time we specify the position as 0 which is -;; equivalent to `first'. A number can be used to specify the zero-based -;; position of an advice among the list of advices in the same class. This +;; the previous advice. This time we specify the position as 0 which is +;; equivalent to `first'. A number can be used to specify the zero-based +;; position of an advice among the list of advices in the same class. This ;; time we already have one before advice hence the position specification -;; actually has an effect. So, after the following definition the position +;; actually has an effect. So, after the following definition the position ;; of the previous advice will be 1 even though we specified it with `first' ;; above, the reason for this is that the position argument is relative to ;; the currently defined pieces of advice which by now has changed. @@ -886,7 +886,7 @@ ;; @@ Redefining a piece of advice: ;; ================================ ;; Now we define an advice with the same class and same name but with a -;; different position. Defining an advice in a class in which an advice with +;; different position. Defining an advice in a class in which an advice with ;; that name already exists is interpreted as a redefinition of that ;; particular advice, in which case the position argument will be ignored ;; and the previous position of the redefined piece of advice is used. @@ -919,7 +919,7 @@ ;; ================================= ;; We can make a function interactive (or change its interactive behavior) ;; by specifying an interactive form in one of the before or around -;; advices (there could also be body forms in this advice). The particular +;; advices (there could also be body forms in this advice). The particular ;; definition always assigns 5 as an argument to X which gives us 6 as a ;; result when we call foo interactively: ;; @@ -945,13 +945,13 @@ ;; ;; @@ Around advices: ;; ================== -;; Now we'll try some `around' advices. An around advice is a wrapper around -;; the original definition. It can shadow or establish bindings for the +;; Now we'll try some `around' advices. An around advice is a wrapper around +;; the original definition. It can shadow or establish bindings for the ;; original definition, and it can look at and manipulate the value returned -;; by the original function. The position of the special keyword `ad-do-it' -;; specifies where the code of the original function will be executed. The +;; by the original function. The position of the special keyword `ad-do-it' +;; specifies where the code of the original function will be executed. The ;; keyword can appear multiple times which will result in multiple calls of -;; the original function in the resulting advised code. Note, that if we don't +;; the original function in the resulting advised code. Note, that if we don't ;; specify a position argument (i.e., `first', `last' or a number), then ;; `first' (or 0) is the default): ;; @@ -967,7 +967,7 @@ ;; Around advices are assembled like onion skins where the around advice ;; with position 0 is the outermost skin and the advice at the last position ;; is the innermost skin which is directly wrapped around the call of the -;; original definition of the function. Hence, after the next `defadvice' we +;; original definition of the function. Hence, after the next `defadvice' we ;; will first multiply X by 2 then add 1 and then call the original ;; definition (i.e., add 1 again): ;; @@ -984,8 +984,8 @@ ;; ================================= ;; In every `defadvice' so far we have used the flag `activate' to activate ;; the advice immediately after its definition, and that's what we want in -;; most cases. However, if we define multiple pieces of advice for a single -;; function then activating every advice immediately is inefficient. A +;; most cases. However, if we define multiple pieces of advice for a single +;; function then activating every advice immediately is inefficient. A ;; better way to do this is to only activate the last defined advice. ;; For example: ;; @@ -1077,7 +1077,7 @@ ;; neutralize the effect of the advice of one of the packages. ;; ;; The following disables the after advice `fg-times-x' in the function `foo'. -;; All that does is to change a flag for this particular advice. All the +;; All that does is to change a flag for this particular advice. All the ;; other information defining it will be left unchanged (e.g., its relative ;; position in this advice class, etc.). ;; @@ -1094,9 +1094,9 @@ ;; 24 ;; ;; If we want to disable all multiplication advices in `foo' we can use a -;; regular expression that matches the names of such advices. Actually, any +;; regular expression that matches the names of such advices. Actually, any ;; advice name that contains a match for the regular expression will be -;; called a match. A special advice class `any' can be used to consider +;; called a match. A special advice class `any' can be used to consider ;; all advice classes: ;; ;; (ad-disable-advice 'foo 'any "^fg-.*times") @@ -1122,7 +1122,7 @@ ;; 9 ;; ;; The following will activate all currently active advised functions that -;; contain some advice matched by the regular expression. This is a save +;; contain some advice matched by the regular expression. This is a save ;; way to update the activation of advised functions whose advice changed ;; in some way or other without accidentally also activating currently ;; inactive functions: @@ -1136,7 +1136,7 @@ ;; ;; Another use for the dis/enablement mechanism is to define a piece of advice ;; and keep it "dormant" until a particular condition is satisfied, i.e., until -;; then the advice will not be used during activation. The `disable' flag lets +;; then the advice will not be used during activation. The `disable' flag lets ;; one do that with `defadvice': ;; ;; (defadvice foo (before fg-1-more dis) @@ -1165,7 +1165,7 @@ ;; =========== ;; Advised definitions get cached to allow efficient activation/deactivation ;; without having to reconstruct them if nothing in the advice-info of a -;; function has changed. The following idiom can be used to temporarily +;; function has changed. The following idiom can be used to temporarily ;; deactivate functions that have a piece of advice defined by a certain ;; package (we save the old definition to check out caching): ;; @@ -1350,9 +1350,9 @@ ;; @@ Portable argument access: ;; ============================ ;; So far, we always used the actual argument variable names to access an -;; argument in a piece of advice. For many advice applications this is -;; perfectly ok and keeps advices simple. However, it decreases portability -;; of advices because it assumes specific argument variable names. For example, +;; argument in a piece of advice. For many advice applications this is +;; perfectly ok and keeps advices simple. However, it decreases portability +;; of advices because it assumes specific argument variable names. For example, ;; if one advises a subr such as `eval-region' which then gets redefined by ;; some package (e.g., edebug) into a function with different argument names, ;; then a piece of advice written for `eval-region' that was written with @@ -1360,7 +1360,7 @@ ;; ;; Argument access text macros allow one to access arguments of an advised ;; function in a portable way without having to worry about all these -;; possibilities. These macros will be translated into the proper access forms +;; possibilities. These macros will be translated into the proper access forms ;; at activation time, hence, argument access will be as efficient as if ;; the arguments had been used directly in the definition of the advice. ;; @@ -1386,7 +1386,7 @@ ;; (fuu 1 1 1) ;; 6 ;; -;; Now suppose somebody redefines `fuu' with a rest argument. Our advice +;; Now suppose somebody redefines `fuu' with a rest argument. Our advice ;; will still work because we used access macros (note, that automatic ;; advice activation is still in effect, hence, the redefinition of `fuu' ;; will automatically activate all its advice): @@ -1444,9 +1444,9 @@ ;; give it an extra argument that controls the advised code, for example, one ;; might want to make an interactive function sensitive to a prefix argument. ;; For such cases `defadvice' allows the specification of an argument list -;; for the advised function. Similar to the redefinition of interactive +;; for the advised function. Similar to the redefinition of interactive ;; behavior, the first argument list specification found in the list of before/ -;; around/after advices will be used. Of course, the specified argument list +;; around/after advices will be used. Of course, the specified argument list ;; should be downward compatible with the original argument list, otherwise ;; functions that call the advised function with the original argument list ;; in mind will break. @@ -1457,9 +1457,9 @@ ;; fii ;; ;; Now we advise `fii' to use an optional second argument that controls the -;; amount of incrementing. A list following the (optional) position +;; amount of incrementing. A list following the (optional) position ;; argument of the advice will be interpreted as an argument list -;; specification. This means you cannot specify an empty argument list, and +;; specification. This means you cannot specify an empty argument list, and ;; why would you want to anyway? ;; ;; (defadvice fii (before fg-inc-x (x &optional incr) act) @@ -1476,22 +1476,22 @@ ;; @@ Advising interactive subrs: ;; ============================== ;; For the most part there is no difference between advising functions and -;; advising subrs. There is one situation though where one might have to write -;; slightly different advice code for subrs than for functions. This case +;; advising subrs. There is one situation though where one might have to write +;; slightly different advice code for subrs than for functions. This case ;; arises when one wants to access subr arguments in a before/around advice ;; when the arguments were determined by an interactive call to the subr. ;; Advice cannot determine what `interactive' form determines the interactive ;; behavior of the subr, hence, when it calls the original definition in an ;; interactive subr invocation it has to use `call-interactively' to generate -;; the proper interactive behavior. Thus up to that call the arguments of the -;; interactive subr will be nil. For example, the following advice for +;; the proper interactive behavior. Thus up to that call the arguments of the +;; interactive subr will be nil. For example, the following advice for ;; `kill-buffer' will not work in an interactive invocation... ;; ;; (defadvice kill-buffer (before fg-kill-buffer-hook first act preact comp) ;; (my-before-kill-buffer-hook (ad-get-arg 0))) ;; kill-buffer ;; -;; ...because the buffer argument will be nil in that case. The way out of +;; ...because the buffer argument will be nil in that case. The way out of ;; this dilemma is to provide an `interactive' specification that mirrors ;; the interactive behavior of the unadvised subr, for example, the following ;; will do the right thing even when `kill-buffer' is called interactively: @@ -1508,10 +1508,10 @@ ;; For an advised macro instead of evaluating the original definition we ;; use `macroexpand', that is, changing argument values and binding ;; environments by pieces of advice has an affect during macro expansion -;; but not necessarily during evaluation. In particular, any side effects +;; but not necessarily during evaluation. In particular, any side effects ;; of pieces of advice will occur during macro expansion. To also affect ;; the behavior during evaluation time one has to change the value of -;; `ad-return-value' in a piece of after advice. For example: +;; `ad-return-value' in a piece of after advice. For example: ;; ;; (defmacro foom (x) ;; `(list ,x)) @@ -1562,7 +1562,7 @@ ;; because it allows one to influence macro expansion as well as evaluation. ;; In general, advising macros should be a rather rare activity anyway, in ;; particular, because compile-time macro expansion takes away a lot of the -;; flexibility and effectiveness of the advice mechanism. Macros that were +;; flexibility and effectiveness of the advice mechanism. Macros that were ;; compile-time expanded before the advice was activated will of course never ;; exhibit the advised behavior. diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 47b3c82456c..776e84dfebb 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -26,7 +26,7 @@ ;;; Commentary: -;; The Emacs Lisp byte compiler. This crunches lisp source into a sort +;; The Emacs Lisp byte compiler. This crunches Lisp source into a sort ;; of p-code (`lapcode') which takes up less space and can be interpreted ;; faster. [`LAP' == `Lisp Assembly Program'.] ;; The user entry points are byte-compile-file and byte-recompile-directory. @@ -319,7 +319,7 @@ Elements of the list may be: lexical global/dynamic variables lacking a prefix. lexical-dynamic lexically bound variable declared dynamic elsewhere - make-local calls to make-variable-buffer-local that may be incorrect. + make-local calls to `make-variable-buffer-local' that may be incorrect. mapcar mapcar called for effect. constants let-binding of, or assignment to, constants/nonvariables. docstrings docstrings that are too wide (longer than @@ -3562,7 +3562,7 @@ for symbols generated by the byte compiler itself." "Warn if symbol VAR refers to a free variable. VAR must not be lexically bound. If optional argument ASSIGNMENT is non-nil, this is treated as an -assignment (i.e. `setq'). " +assignment (i.e. `setq')." (unless (or (not (byte-compile-warning-enabled-p 'free-vars var)) (boundp var) (memq var byte-compile-bound-variables) @@ -4335,7 +4335,7 @@ that suppresses all warnings during execution of BODY." (and (symbolp obj2) (macroexp-const-p obj1) (cons obj2 (eval obj1))))) (defun byte-compile--common-test (test-1 test-2) - "Most specific common test of `eq', `eql' and `equal'" + "Most specific common test of `eq', `eql' and `equal'." (cond ((or (eq test-1 'equal) (eq test-2 'equal)) 'equal) ((or (eq test-1 'eql) (eq test-2 'eql)) 'eql) (t 'eq))) diff --git a/lisp/emacs-lisp/cconv.el b/lisp/emacs-lisp/cconv.el index 3abbf716875..ba29e4ec85e 100644 --- a/lisp/emacs-lisp/cconv.el +++ b/lisp/emacs-lisp/cconv.el @@ -32,7 +32,7 @@ ;; Here is a brief explanation how this code works. ;; Firstly, we analyze the tree by calling cconv-analyze-form. ;; This function finds all mutated variables, all functions that are suitable -;; for lambda lifting and all variables captured by closure. It passes the tree +;; for lambda lifting and all variables captured by closure. It passes the tree ;; once, returning a list of three lists. ;; ;; Then we calculate the intersection of the first and third lists returned by diff --git a/lisp/emacs-lisp/check-declare.el b/lisp/emacs-lisp/check-declare.el index bec4ad92503..83a9d3ea6ae 100644 --- a/lisp/emacs-lisp/check-declare.el +++ b/lisp/emacs-lisp/check-declare.el @@ -119,7 +119,7 @@ don't know how to recognize (e.g. some macros)." (autoload 'byte-compile-arglist-signature "bytecomp") (defgroup check-declare nil - "Check declare-function statements." + "Check `declare-function' statements." :group 'tools) (defcustom check-declare-ext-errors nil @@ -230,8 +230,8 @@ fset\\|\\(?:cl-\\)?defmethod\\)\\>" type) errlist)) (defun check-declare-sort (alist) - "Sort a list with elements FILE (FNFILE ...). -Returned list has elements FNFILE (FILE ...)." + "Sort list ALIST with elements FILE (FNFILE ...). +Return list with elements FNFILE (FILE ...)." (let (file fnfile rest sort a) (dolist (e alist) (setq file (car e)) diff --git a/lisp/emacs-lisp/cl-indent.el b/lisp/emacs-lisp/cl-indent.el index c88e15d5a8b..9d8aae28441 100644 --- a/lisp/emacs-lisp/cl-indent.el +++ b/lisp/emacs-lisp/cl-indent.el @@ -162,9 +162,9 @@ is set to `defun'.") (error t))) (defun lisp-indent-find-method (symbol &optional no-compat) - "Find the lisp indentation function for SYMBOL. + "Find the Lisp indentation function for SYMBOL. If NO-COMPAT is non-nil, do not retrieve indenters intended for -the standard lisp indent package." +the standard Lisp indent package." (or (and (derived-mode-p 'emacs-lisp-mode) (get symbol 'common-lisp-indent-function-for-elisp)) (get symbol 'common-lisp-indent-function) diff --git a/lisp/emacs-lisp/copyright.el b/lisp/emacs-lisp/copyright.el index d2e4891acee..9da370a725d 100644 --- a/lisp/emacs-lisp/copyright.el +++ b/lisp/emacs-lisp/copyright.el @@ -120,7 +120,7 @@ When this is `function', only ask when called non-interactively." (re-search-forward regexp bound noerror count))) (defun copyright-start-point () - "Return point-min or point-max, depending on `copyright-at-end-flag'." + "Return `point-min' or `point-max', depending on `copyright-at-end-flag'." (if copyright-at-end-flag (point-max) (point-min))) @@ -135,7 +135,7 @@ When this is `function', only ask when called non-interactively." (defun copyright-find-copyright () "Return non-nil if a copyright header suitable for updating is found. The header must match `copyright-regexp' and `copyright-names-regexp', if set. -This function sets the match-data that `copyright-update-year' uses." +This function sets the match data that `copyright-update-year' uses." (widen) (goto-char (copyright-start-point)) ;; In case the regexp is rejected. This is useful because diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index f76ae3fe69f..8da9fb76821 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el @@ -390,7 +390,7 @@ Include the reason for debugger entry from ARGS." (`(set ,buffer) (format "setting %s in buffer %s to %s" symbol buffer (backtrace-print-to-string newval))) - (_ (error "unrecognized watchpoint triggered %S" (cdr args)))) + (_ (error "Unrecognized watchpoint triggered %S" (cdr args)))) ": ") (insert ?\n)) ;; Debugger entered for an error. diff --git a/lisp/emacs-lisp/disass.el b/lisp/emacs-lisp/disass.el index 712fa511707..6c019e7387c 100644 --- a/lisp/emacs-lisp/disass.el +++ b/lisp/emacs-lisp/disass.el @@ -114,7 +114,7 @@ redefine OBJECT if it is a symbol." (if (eq (car-safe obj) 'byte-code) (setq obj `(lambda () ,obj))) (when (consp obj) - (unless (functionp obj) (error "not a function")) + (unless (functionp obj) (error "Not a function")) (if (assq 'byte-code obj) nil (if interactive-p (message (if name @@ -183,7 +183,7 @@ redefine OBJECT if it is a symbol." (defun disassemble-1 (obj indent) - "Prints the byte-code call OBJ in the current buffer. + "Print the byte-code call OBJ in the current buffer. OBJ should be a call to BYTE-CODE generated by the byte compiler." (let (bytes constvec) (if (consp obj) diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index d9b5ea74f6e..dfbae746cc1 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el @@ -32,7 +32,7 @@ ;; natural for the minor-mode end-users. ;; For each mode, easy-mmode defines the following: -;; : The minor mode predicate. A buffer-local variable. +;; : The minor mode predicate. A buffer-local variable. ;; -map : The keymap possibly associated to . ;; see `define-minor-mode' documentation ;; @@ -182,7 +182,7 @@ BODY contains code to execute each time the mode is enabled or disabled. be assigned to PLACE. If you specify a :variable, this function does not define a MODE variable (nor any of the terms used in :variable). -:after-hook A single lisp form which is evaluated after the mode hooks +:after-hook A single Lisp form which is evaluated after the mode hooks have been run. It should not be quoted. For example, you could write diff --git a/lisp/emacs-lisp/eieio-custom.el b/lisp/emacs-lisp/eieio-custom.el index d7d078b2d94..4813ce8c33f 100644 --- a/lisp/emacs-lisp/eieio-custom.el +++ b/lisp/emacs-lisp/eieio-custom.el @@ -333,7 +333,7 @@ Optional argument GROUP is the sub-group of slots to display." (let ((map (make-sparse-keymap))) (set-keymap-parent map widget-keymap) map) - "Keymap for EIEIO Custom mode") + "Keymap for EIEIO Custom mode.") (define-derived-mode eieio-custom-mode fundamental-mode "EIEIO Custom" "Major mode for customizing EIEIO objects. diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el index cec89cf3bc5..21f262adc6e 100644 --- a/lisp/emacs-lisp/eldoc.el +++ b/lisp/emacs-lisp/eldoc.el @@ -437,7 +437,7 @@ return any documentation.") (defvar eldoc-display-functions '(eldoc-display-in-echo-area eldoc-display-in-buffer) "Hook of functions tasked with displaying ElDoc results. -Each function is passed two arguments: DOCS and INTERACTIVE. DOCS +Each function is passed two arguments: DOCS and INTERACTIVE. DOCS is a list (DOC ...) where DOC looks like (STRING :KEY VALUE :KEY2 VALUE2 ...). STRING is a string containing the documentation's text and the remainder of DOC is an optional list of diff --git a/lisp/emacs-lisp/elp.el b/lisp/emacs-lisp/elp.el index c2b026dc822..8c33b7c9948 100644 --- a/lisp/emacs-lisp/elp.el +++ b/lisp/emacs-lisp/elp.el @@ -407,11 +407,11 @@ original definition, use \\[elp-restore-function] or \\[elp-restore-all]." (>= (aref vec1 0) (aref vec2 0))) (defun elp-sort-by-total-time (vec1 vec2) - "Predicate to sort by highest total time spent in function. See `sort'." + "Predicate to sort by highest total time spent in function. See `sort'." (>= (aref vec1 1) (aref vec2 1))) (defun elp-sort-by-average-time (vec1 vec2) - "Predicate to sort by highest average time spent in function. See `sort'." + "Predicate to sort by highest average time spent in function. See `sort'." (>= (aref vec1 2) (aref vec2 2))) (defsubst elp-pack-number (number width) diff --git a/lisp/emacs-lisp/ewoc.el b/lisp/emacs-lisp/ewoc.el index d3ace97945f..ca29b6d8c9b 100644 --- a/lisp/emacs-lisp/ewoc.el +++ b/lisp/emacs-lisp/ewoc.el @@ -55,7 +55,7 @@ ;; ;; Ewoc can be considered as the `view' part of a model-view-controller. ;; -;; A `element' can be any lisp object. When you use the ewoc +;; An `element' can be any Lisp object. When you use the ewoc ;; package you specify a pretty-printer, a function that inserts ;; a printable representation of the element in the buffer. (The ;; pretty-printer should use "insert" and not @@ -67,7 +67,7 @@ ;; fixed when the ewoc is created). The header and the footer ;; are constant strings. They appear before and after the elements. ;; -;; Ewoc does not affect the mode of the buffer in any way. It +;; Ewoc does not affect the mode of the buffer in any way. It ;; merely makes it easy to connect an underlying data representation ;; to the buffer contents. ;; @@ -117,7 +117,7 @@ (unless (eq dll L) L))) (defun ewoc--node-nth (dll n) - "Return the Nth node from the doubly linked list `dll'. + "Return the Nth node from the doubly linked list DLL. N counts from zero. If N is negative, return the -(N+1)th last element. If N is out of range, return nil. Thus, (ewoc--node-nth dll 0) returns the first node, diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el index 7bc3e6b25ff..4bbcf453569 100644 --- a/lisp/emacs-lisp/find-func.el +++ b/lisp/emacs-lisp/find-func.el @@ -765,7 +765,7 @@ See `find-function-on-key'." ;;;###autoload (defun find-function-setup-keys () - "Define some key bindings for the find-function family of functions." + "Define some key bindings for the `find-function' family of functions." (define-key ctl-x-map "F" 'find-function) (define-key ctl-x-4-map "F" 'find-function-other-window) (define-key ctl-x-5-map "F" 'find-function-other-frame) diff --git a/lisp/emacs-lisp/generator.el b/lisp/emacs-lisp/generator.el index 4ae20ba4205..2acf939bed7 100644 --- a/lisp/emacs-lisp/generator.el +++ b/lisp/emacs-lisp/generator.el @@ -467,7 +467,7 @@ DYNAMIC-VAR bound to STATIC-VAR." (guard (cps--special-form-p name)) (guard (not (memq name cps-standard-special-forms)))) name ; Shut up byte compiler - (error "special form %S incorrect or not supported" form)) + (error "Special form %S incorrect or not supported" form)) ;; Process regular function applications with nontrivial ;; parameters, converting them to applications of trivial @@ -633,7 +633,7 @@ modified copy." ;; If we're exiting non-locally (error, quit, ;; etc.) close the iterator. ,(cps--make-close-iterator-form terminal-state))))) - (t (error "unknown iterator operation %S" op)))))) + (t (error "Unknown iterator operation %S" op)))))) ,(when finalizer-symbol '(funcall iterator :stash-finalizer @@ -711,7 +711,7 @@ iterator cannot supply more values." (defun iter-close (iterator) "Terminate an iterator early. -Run any unwind-protect handlers in scope at the point ITERATOR +Run any `unwind-protect' handlers in scope at the point ITERATOR is blocked." (funcall iterator :close nil)) diff --git a/lisp/emacs-lisp/let-alist.el b/lisp/emacs-lisp/let-alist.el index 433b37d7923..2d634b7b037 100644 --- a/lisp/emacs-lisp/let-alist.el +++ b/lisp/emacs-lisp/let-alist.el @@ -57,7 +57,7 @@ ;; .site.contents)) ;; ;; If you nest `let-alist' invocations, the inner one can't access -;; the variables of the outer one. You can, however, access alists +;; the variables of the outer one. You can, however, access alists ;; inside the original alist by using dots inside the symbol, as ;; displayed in the example above by the `.site.contents'. ;; @@ -137,7 +137,7 @@ essentially expands to .site.contents)) If you nest `let-alist' invocations, the inner one can't access -the variables of the outer one. You can, however, access alists +the variables of the outer one. You can, however, access alists inside the original alist by using dots inside the symbol, as displayed in the example above." (declare (indent 1) (debug t)) diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 9bbc7f8bba2..42e943a60df 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -824,7 +824,7 @@ function is `common-lisp-indent-function'." "Return Parse-Partial-Sexp State at POS, defaulting to point. Like `syntax-ppss' but includes the character address of the last complete sexp in the innermost containing list at position -2 (counting from 0). This is important for lisp indentation." +2 (counting from 0). This is important for Lisp indentation." (unless pos (setq pos (point))) (let ((pss (syntax-ppss pos))) (if (nth 9 pss) diff --git a/lisp/emacs-lisp/macroexp.el b/lisp/emacs-lisp/macroexp.el index 61c1ea490f0..1e4fdd126cb 100644 --- a/lisp/emacs-lisp/macroexp.el +++ b/lisp/emacs-lisp/macroexp.el @@ -243,19 +243,19 @@ is executed without being compiled first." (while arglist (cond ((eq (car arglist) '&optional) ;; ok, I'll let this slide because funcall_lambda() does... - ;; (if optionalp (error "multiple &optional keywords in %s" name)) + ;; (if optionalp (error "Multiple &optional keywords in %s" name)) (if restp (error "&optional found after &rest in %s" name)) (if (null (cdr arglist)) - (error "nothing after &optional in %s" name)) + (error "Nothing after &optional in %s" name)) (setq optionalp t)) ((eq (car arglist) '&rest) ;; ...but it is by no stretch of the imagination a reasonable ;; thing that funcall_lambda() allows (&rest x y) and ;; (&rest x &optional y) in arglists. (if (null (cdr arglist)) - (error "nothing after &rest in %s" name)) + (error "Nothing after &rest in %s" name)) (if (cdr (cdr arglist)) - (error "multiple vars after &rest in %s" name)) + (error "Multiple vars after &rest in %s" name)) (setq restp t)) (restp (setq bindings (cons (list (car arglist) diff --git a/lisp/emacs-lisp/nadvice.el b/lisp/emacs-lisp/nadvice.el index 41a9c7242b3..a2a5aaed046 100644 --- a/lisp/emacs-lisp/nadvice.el +++ b/lisp/emacs-lisp/nadvice.el @@ -245,7 +245,7 @@ WHERE is a symbol to select an entry in `advice--where-alist'." (list (advice--remove-function rest function))))))) (defvar advice--buffer-local-function-sample nil - "keeps an example of the special \"run the default value\" functions. + "Keeps an example of the special \"run the default value\" functions. These functions play the same role as t in buffer-local hooks, and to recognize them, we keep a sample here against which to compare. Each instance is different, but `function-equal' will hopefully ignore those differences.") diff --git a/lisp/emacs-lisp/package-x.el b/lisp/emacs-lisp/package-x.el index 2e327d16de4..0175857b7f5 100644 --- a/lisp/emacs-lisp/package-x.el +++ b/lisp/emacs-lisp/package-x.el @@ -34,7 +34,7 @@ ;; (possibly one on a remote machine, accessed via Tramp). ;; Then call M-x package-upload-file, which prompts for a file to -;; upload. Alternatively, M-x package-upload-buffer uploads the +;; upload. Alternatively, M-x package-upload-buffer uploads the ;; current buffer, if it's visiting a package file. ;; Once a package is uploaded, users can access it via the Package diff --git a/lisp/emacs-lisp/pcase.el b/lisp/emacs-lisp/pcase.el index 63b187be02b..c6173c710f7 100644 --- a/lisp/emacs-lisp/pcase.el +++ b/lisp/emacs-lisp/pcase.el @@ -86,7 +86,7 @@ (funcall pf (and me (symbolp me) (edebug-get-spec me)))))) (defun pcase--get-macroexpander (s) - "Return the macroexpander for pcase pattern head S, or nil" + "Return the macroexpander for pcase pattern head S, or nil." (get s 'pcase-macroexpander)) ;;;###autoload diff --git a/lisp/emacs-lisp/shadow.el b/lisp/emacs-lisp/shadow.el index 02f2ad3d816..e2a24e9949c 100644 --- a/lisp/emacs-lisp/shadow.el +++ b/lisp/emacs-lisp/shadow.el @@ -31,13 +31,13 @@ ;; a file with the same name in a later load-path directory. When ;; this is unintentional, it may result in problems that could have ;; been easily avoided. This occurs often (to me) when installing a -;; new version of emacs and something in the site-lisp directory -;; has been updated and added to the emacs distribution. The old -;; version, now outdated, shadows the new one. This is obviously +;; new version of Emacs and something in the site-lisp directory +;; has been updated and added to the Emacs distribution. The old +;; version, now outdated, shadows the new one. This is obviously ;; undesirable. ;; ;; The `list-load-path-shadows' function was run when you installed -;; this version of emacs. To run it by hand in emacs: +;; this version of Emacs. To run it by hand in emacs: ;; ;; M-x list-load-path-shadows ;; @@ -181,7 +181,7 @@ See the documentation for `list-load-path-shadows' for further information." "Keywords to highlight in `load-path-shadows-mode'.") (define-derived-mode load-path-shadows-mode fundamental-mode "LP-Shadows" - "Major mode for load-path shadows buffer." + "Major mode for `load-path' shadows buffer." (setq-local font-lock-defaults '((load-path-shadows-font-lock-keywords))) (setq buffer-undo-list t diff --git a/lisp/emacs-lisp/testcover.el b/lisp/emacs-lisp/testcover.el index e75f15140aa..f5a624bb61b 100644 --- a/lisp/emacs-lisp/testcover.el +++ b/lisp/emacs-lisp/testcover.el @@ -20,7 +20,6 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . - ;;; Commentary: ;; * Use `testcover-start' to instrument a Lisp file for coverage testing. @@ -62,6 +61,8 @@ ;; error if these "potentially" 1-valued forms actually return differing ;; values. +;;; Code: + (eval-when-compile (require 'cl-lib)) (require 'edebug) (provide 'testcover) @@ -80,8 +81,9 @@ (defcustom testcover-constants '(nil t emacs-build-time emacs-version emacs-major-version emacs-minor-version) - "Variables whose values never change. No brown splotch is shown for -these. This list is quite incomplete!" + "Variables whose values never change. +No brown splotch is shown for these. This list is quite +incomplete!" :group 'testcover :type '(repeat variable)) @@ -103,8 +105,8 @@ incomplete! Notes: Nobody ever changes the current global map." (defcustom testcover-noreturn-functions '(error noreturn throw signal) - "Subset of `testcover-1value-functions' -- these never return. We mark -them as having returned nil just before calling them." + "Subset of `testcover-1value-functions' -- these never return. +We mark them as having returned nil just before calling them." :group 'testcover :type '(repeat symbol)) @@ -126,25 +128,26 @@ side-effect-free functions should be here." set set-default set-marker-insertion-type setq setq-default with-current-buffer with-output-to-temp-buffer with-syntax-table with-temp-buffer with-temp-file with-temp-message with-timeout) - "Functions whose return value is the same as their last argument. No -brown splotch is shown for these if the last argument is a constant or a -call to one of the `testcover-1value-functions'. This list is probably -incomplete!" + "Functions whose return value is the same as their last argument. +No brown splotch is shown for these if the last argument is a +constant or a call to one of the `testcover-1value-functions'. +This list is probably incomplete!" :group 'testcover :type '(repeat symbol)) (defcustom testcover-prog1-functions '(prog1 unwind-protect) - "Functions whose return value is the same as their first argument. No -brown splotch is shown for these if the first argument is a constant or a -call to one of the `testcover-1value-functions'." + "Functions whose return value is the same as their first argument. +No brown splotch is shown for these if the first argument is a +constant or a call to one of the `testcover-1value-functions'." :group 'testcover :type '(repeat symbol)) (defcustom testcover-potentially-1value-functions '(add-hook and beep or remove-hook unless when) - "Functions that are potentially 1-valued. No brown splotch if actually -1-valued, no error if actually multi-valued." + "Functions that are potentially 1-valued. +No brown splotch if actually 1-valued, no error if actually +multi-valued." :group 'testcover :type '(repeat symbol)) @@ -164,8 +167,7 @@ call to one of the `testcover-1value-functions'." ;;;========================================================================= (defvar testcover-module-constants nil - "Symbols declared with defconst in the last file processed by -`testcover-start'.") + "Symbols declared with defconst in the last file processed by `testcover-start'.") (defvar testcover-module-1value-functions nil "Symbols declared with defun in the last file processed by @@ -388,7 +390,7 @@ coverage tests. This function creates many overlays." (error nil))) ;Ignore "No such buffer" errors (defun testcover-next-mark () - "Moves point to next line in current buffer that has a splotch." + "Move point to next line in current buffer that has a splotch." (interactive) (goto-char (next-overlay-change (point))) (end-of-line)) diff --git a/lisp/emacs-lisp/thunk.el b/lisp/emacs-lisp/thunk.el index 7e349d22a49..6f2e42af50b 100644 --- a/lisp/emacs-lisp/thunk.el +++ b/lisp/emacs-lisp/thunk.el @@ -30,7 +30,7 @@ ;; forms. ;; ;; Use `thunk-delay' to delay the evaluation of a form (requires -;; lexical-binding), and `thunk-force' to evaluate it. The result of +;; lexical-binding), and `thunk-force' to evaluate it. The result of ;; the evaluation is cached, and only happens once. ;; ;; Here is an example of a form which evaluation is delayed: diff --git a/lisp/eshell/em-basic.el b/lisp/eshell/em-basic.el index 64fc7e7f03b..af5550b11df 100644 --- a/lisp/eshell/em-basic.el +++ b/lisp/eshell/em-basic.el @@ -164,7 +164,7 @@ or `eshell-printn' for display." (set-default-file-modes (- 511 (car (read-from-string (concat "?\\" (number-to-string (car args))))))) - (error "setting umask symbolically is not yet implemented")) + (error "Setting umask symbolically is not yet implemented")) (eshell-print "Warning: umask changed for all new files created by Emacs.\n")) nil)) diff --git a/lisp/eshell/em-glob.el b/lisp/eshell/em-glob.el index e36f2d0c7fe..ba12e43a3c2 100644 --- a/lisp/eshell/em-glob.el +++ b/lisp/eshell/em-glob.el @@ -91,7 +91,7 @@ This option slows down recursive glob processing by quite a bit." (defcustom eshell-error-if-no-glob nil "If non-nil, it is an error for a glob pattern not to match. - This mimics the behavior of zsh if non-nil, but bash if nil." +This mimics the behavior of zsh if non-nil, but bash if nil." :type 'boolean :group 'eshell-glob) @@ -266,7 +266,7 @@ the form: ;; FIXME does this really need to abuse eshell-glob-matches, message-shown? (defun eshell-glob-entries (path globs &optional recurse-p) - "Glob the entries in PATHS, possibly recursing if RECURSE-P is non-nil." + "Glob the entries in PATH, possibly recursing if RECURSE-P is non-nil." (let* ((entries (ignore-errors (file-name-all-completions "" path))) (case-fold-search eshell-glob-case-insensitive) diff --git a/lisp/eshell/em-hist.el b/lisp/eshell/em-hist.el index d82946add00..aa158fa24cc 100644 --- a/lisp/eshell/em-hist.el +++ b/lisp/eshell/em-hist.el @@ -402,7 +402,7 @@ variable `eshell-input-filter' returns non-nil when called on the command. This function is supposed to be called from the minibuffer, presumably -as a minibuffer-exit-hook." +as a `minibuffer-exit-hook'." (eshell-add-input-to-history (buffer-substring (minibuffer-prompt-end) (point-max)))) diff --git a/lisp/eshell/em-ls.el b/lisp/eshell/em-ls.el index 3d7c43b404b..57146bb126d 100644 --- a/lisp/eshell/em-ls.el +++ b/lisp/eshell/em-ls.el @@ -35,10 +35,10 @@ ;;;###autoload (progn (defgroup eshell-ls nil - "This module implements the \"ls\" utility fully in Lisp. If it is -passed any unrecognized command switches, it will revert to the -operating system's version. This version of \"ls\" uses text -properties to colorize its output based on the setting of + "This module implements the \"ls\" utility fully in Lisp. +If it is passed any unrecognized command switches, it will revert +to the operating system's version. This version of \"ls\" uses +text properties to colorize its output based on the setting of `eshell-ls-use-colors'." :tag "Implementation of `ls' in Lisp" :group 'eshell-module)) @@ -476,9 +476,9 @@ name should be displayed as, etc. Think of it as cooking a FILEINFO." fileinfo) (defun eshell-ls-file (fileinfo &optional size-width copy-fileinfo) - "Output FILE in long format. -FILE may be a string, or a cons cell whose car is the filename and -whose cdr is the list of file attributes." + "Output FILEINFO in long format. +FILEINFO may be a string, or a cons cell whose car is the +filename and whose cdr is the list of file attributes." (if (not (cdr fileinfo)) (funcall error-func (format "%s: No such file or directory\n" (car fileinfo))) diff --git a/lisp/eshell/em-pred.el b/lisp/eshell/em-pred.el index def52f42e55..639098a9b9e 100644 --- a/lisp/eshell/em-pred.el +++ b/lisp/eshell/em-pred.el @@ -258,7 +258,7 @@ EXAMPLES: (eshell-pred-mode)) (defun eshell-apply-modifiers (lst predicates modifiers) - "Apply to LIST a series of PREDICATES and MODIFIERS." + "Apply to list LST a series of PREDICATES and MODIFIERS." (let (stringified) (if (stringp lst) (setq lst (list lst) diff --git a/lisp/eshell/em-rebind.el b/lisp/eshell/em-rebind.el index fa61fffaec8..d70444ea109 100644 --- a/lisp/eshell/em-rebind.el +++ b/lisp/eshell/em-rebind.el @@ -168,7 +168,7 @@ This is default behavior of shells like bash." (defun eshell-lock-local-map (&optional arg) "Lock or unlock the current local keymap. -Within a prefix arg, set the local keymap to its normal value, and +With prefix ARG, set the local keymap to its normal value, and lock it at that." (interactive "P") (if (or arg (not eshell-lock-keymap)) diff --git a/lisp/eshell/em-smart.el b/lisp/eshell/em-smart.el index d1c83db188a..dffc8f804b7 100644 --- a/lisp/eshell/em-smart.el +++ b/lisp/eshell/em-smart.el @@ -131,7 +131,7 @@ only if that output can be presented in its entirely in the Eshell window." :group 'eshell-smart) (defcustom eshell-smart-space-goes-to-end t - "If non-nil, space will go to end of buffer when point-max is visible. + "If non-nil, space will go to end of buffer when `point-max' is visible. That is, if a command is running and the user presses SPACE at a time when the end of the buffer is visible, point will go to the end of the buffer and smart-display will be turned off (that is, subsequently @@ -195,7 +195,7 @@ The options are `begin', `after' or `end'." ;; This is called by window-scroll-functions with two arguments. (defun eshell-smart-scroll-window (wind _start) - "Scroll the given Eshell window accordingly." + "Scroll the given Eshell window WIND accordingly." (unless eshell-currently-handling-window (let ((inhibit-point-motion-hooks t) (eshell-currently-handling-window t)) diff --git a/lisp/eshell/esh-arg.el b/lisp/eshell/esh-arg.el index 3cf80e45187..1990c0cfa55 100644 --- a/lisp/eshell/esh-arg.el +++ b/lisp/eshell/esh-arg.el @@ -203,7 +203,7 @@ treated as a literal character." (setq eshell-current-modifiers nil)) (defun eshell-finish-arg (&optional argument) - "Finish the current argument being processed." + "Finish the current ARGUMENT being processed." (if argument (setq eshell-current-argument argument)) (throw 'eshell-arg-done t)) diff --git a/lisp/eshell/esh-cmd.el b/lisp/eshell/esh-cmd.el index 90a8f85665a..1aac95e0b4f 100644 --- a/lisp/eshell/esh-cmd.el +++ b/lisp/eshell/esh-cmd.el @@ -1236,10 +1236,10 @@ or an external command." (eshell-external-command command args)))) (defun eshell-exec-lisp (printer errprint func-or-form args form-p) - "Execute a lisp FUNC-OR-FORM, maybe passing ARGS. + "Execute a Lisp FUNC-OR-FORM, maybe passing ARGS. PRINTER and ERRPRINT are functions to use for printing regular messages, and errors. FORM-P should be non-nil if FUNC-OR-FORM -represent a lisp form; ARGS will be ignored in that case." +represent a Lisp form; ARGS will be ignored in that case." (eshell-condition-case err (let ((result (save-current-buffer diff --git a/lisp/eshell/esh-ext.el b/lisp/eshell/esh-ext.el index 9930e0884cb..fa149dd46e3 100644 --- a/lisp/eshell/esh-ext.el +++ b/lisp/eshell/esh-ext.el @@ -110,7 +110,7 @@ wholly ignored." (autoload 'eshell-parse-command "esh-cmd") (defsubst eshell-invoke-batch-file (&rest args) - "Invoke a .BAT or .CMD file on DOS/Windows systems." + "Invoke a .BAT or .CMD file on MS-DOS/MS-Windows systems." ;; since CMD.EXE can't handle forward slashes in the initial ;; argument... (setcar args (subst-char-in-string ?/ ?\\ (car args))) diff --git a/lisp/eshell/esh-io.el b/lisp/eshell/esh-io.el index 0e98aa0049e..0e6121031dc 100644 --- a/lisp/eshell/esh-io.el +++ b/lisp/eshell/esh-io.el @@ -34,7 +34,7 @@ ;;;_* Redirect to a Buffer or Process ;; ;; Buffers and processes can be named with '#' and -;; '#', respectively. As a shorthand, +;; '#', respectively. As a shorthand, ;; '#' without the explicit "buffer" arg is equivalent to ;; '#'. ;; diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el index f9dbce9770d..a9775b7c568 100644 --- a/lisp/eshell/esh-mode.el +++ b/lisp/eshell/esh-mode.el @@ -499,7 +499,7 @@ and the hook `eshell-exit-hook'." (yank))) (defun eshell-bol () - "Goes to the beginning of line, then skips past the prompt, if any." + "Go to the beginning of line, then skip past the prompt, if any." (interactive) (beginning-of-line) (and eshell-skip-prompt-function diff --git a/lisp/eshell/eshell.el b/lisp/eshell/eshell.el index 101ac860346..35153675faa 100644 --- a/lisp/eshell/eshell.el +++ b/lisp/eshell/eshell.el @@ -33,15 +33,15 @@ ;; @ A high degree of configurability ;; ;; @ The ability to have the same shell on every system Emacs has been -;; ported to. Since Eshell imposes no external requirements, and +;; ported to. Since Eshell imposes no external requirements, and ;; relies upon only the Lisp functions exposed by Emacs, it is quite -;; operating system independent. Several of the common UNIX +;; operating system independent. Several of the common UNIX ;; commands, such as ls, mv, rm, ln, etc., have been implemented in ;; Lisp in order to provide a more consistent work environment. ;; ;; For those who might be using an older version of Eshell, version -;; 2.1 represents an entirely new, module-based architecture. It -;; supports most of the features offered by modern shells. Here is a +;; 2.1 represents an entirely new, module-based architecture. It +;; supports most of the features offered by modern shells. Here is a ;; brief list of some of its more visible features: ;; ;; @ Command argument completion (tcsh, zsh) @@ -136,7 +136,7 @@ ;; errors, such as 'dri' for `dir'. Since executing non-existent ;; programs is rarely the intention of the user, eshell could prompt ;; for the replacement string, and then record that in a database of -;; known misspellings. (Note: The typo at the beginning of this +;; known misspellings. (Note: The typo at the beginning of this ;; paragraph wasn't discovered until two months after I wrote the ;; text; it was not intentional). ;; diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el index ef89e6e9fcb..863b6aa44e4 100644 --- a/lisp/gnus/gnus-msg.el +++ b/lisp/gnus/gnus-msg.el @@ -33,7 +33,7 @@ (require 'gnus-util) (defcustom gnus-post-method 'current - "Preferred method for posting USENET news. + "Preferred method for posting Usenet news. If this variable is `current' (which is the default), Gnus will use the \"current\" select method when posting. If it is `native', Gnus diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index bff1b2a60d9..4a754b98569 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -3841,7 +3841,7 @@ text was killed." "Caesar rotate all letters in the current buffer by 13 places. Used to encode/decode possibly offensive messages (commonly in rec.humor). With prefix arg, specifies the number of places to rotate each letter forward. -Mail and USENET news headers are not rotated unless WIDE is non-nil." +Mail and Usenet news headers are not rotated unless WIDE is non-nil." (interactive (if current-prefix-arg (list (prefix-numeric-value current-prefix-arg)) (list nil)) diff --git a/lisp/info-xref.el b/lisp/info-xref.el index e2e3e30ca21..f791927ee1d 100644 --- a/lisp/info-xref.el +++ b/lisp/info-xref.el @@ -242,18 +242,18 @@ buffer's line and column of point." node t t)) (if (not (string-match "\\`([^)]*)" node)) - (info-xref-output-error "no `(file)' part at start of node: %s\n" node) + (info-xref-output-error "No `(file)' part at start of node: %s\n" node) (let ((file (match-string 0 node))) (if (string-equal "()" file) - (info-xref-output-error "empty filename part: %s" node) + (info-xref-output-error "Empty filename part: %s" node) ;; see if the file exists, if haven't looked before (unless (assoc file info-xref-xfile-alist) (let ((found (info-xref-goto-node-p file))) (push (cons file found) info-xref-xfile-alist) (unless found - (info-xref-output-error "not available to check: %s\n (this reported once per file)" file)))) + (info-xref-output-error "Not available to check: %s\n (this reported once per file)" file)))) ;; if the file exists, try the node (cond ((not (cdr (assoc file info-xref-xfile-alist))) @@ -262,7 +262,7 @@ buffer's line and column of point." (cl-incf info-xref-good)) (t (cl-incf info-xref-bad) - (info-xref-output-error "no such node: %s" node))))))) + (info-xref-output-error "No such node: %s" node))))))) ;;----------------------------------------------------------------------------- diff --git a/lisp/net/dictionary.el b/lisp/net/dictionary.el index 5a6f3b555d2..9353b4d3759 100644 --- a/lisp/net/dictionary.el +++ b/lisp/net/dictionary.el @@ -25,9 +25,9 @@ ;; dictionary allows you to interact with dictionary servers. ;; Use M-x customize-group dictionary to modify user settings. ;; -;; Main functions for interaction are: -;; dictionary - opens a new dictionary buffer -;; dictionary-search - search for the definition of a word +;; Main commands for interaction are: +;; M-x dictionary - opens a new dictionary buffer +;; M-x dictionary-search - search for the definition of a word ;; ;; You can find more information in the README file of the GitHub ;; repository https://github.com/myrkr/dictionary-el @@ -58,11 +58,11 @@ the existing connection." (set-default name value)) (defgroup dictionary nil - "Client for accessing the dictd server based dictionaries" + "Client for accessing the dictd server based dictionaries." :group 'hypermedia) (defgroup dictionary-proxy nil - "Proxy configuration options for the dictionary client" + "Proxy configuration options for the dictionary client." :group 'dictionary) (defcustom dictionary-server @@ -943,7 +943,6 @@ If PATTERN is omitted, it defaults to \"[ \\f\\t\\n\\r\\v]+\"." (defun dictionary-set-dictionary (param &optional more) "Select the dictionary which is the car of PARAM as new default." - (if more (dictionary-display-more-info param) (let ((dictionary (car param))) @@ -1051,7 +1050,6 @@ If PATTERN is omitted, it defaults to \"[ \\f\\t\\n\\r\\v]+\"." (defun dictionary-do-matching (word dictionary strategy function) "Find matches for WORD with STRATEGY in DICTIONARY and display them with FUNCTION." - (message "Lookup matching words for %s in %s using %s" word dictionary strategy) (dictionary-send-command diff --git a/lisp/org/ol.el b/lisp/org/ol.el index 38e2dd6a02c..4b7f2081a8a 100644 --- a/lisp/org/ol.el +++ b/lisp/org/ol.el @@ -444,7 +444,7 @@ negates this setting for the duration of the command." :safe (lambda (val) (or (booleanp val) (integerp val)))) (defcustom org-link-email-description-format "Email %c: %s" - "Format of the description part of a link to an email or usenet message. + "Format of the description part of a link to an email or Usenet message. The following %-escapes will be replaced by corresponding information: %F full \"From\" field diff --git a/lisp/so-long.el b/lisp/so-long.el index 7bf15e85dad..c39c3ecaf3f 100644 --- a/lisp/so-long.el +++ b/lisp/so-long.el @@ -1532,7 +1532,7 @@ This is the `so-long-revert-function' for `so-long-mode'." (interactive) (let ((so-long-original-mode (so-long-original 'major-mode))) (unless so-long-original-mode - (error "Original mode unknown.")) + (error "Original mode unknown")) (funcall so-long-original-mode) ;; Emacs 26+ has already called `hack-local-variables' (during ;; `run-mode-hooks'; provided there was a `buffer-file-name'), but for older diff --git a/lisp/svg.el b/lisp/svg.el index 05accf4f13f..3c7f0550314 100644 --- a/lisp/svg.el +++ b/lisp/svg.el @@ -188,7 +188,7 @@ otherwise. IMAGE-TYPE should be a MIME image type, like "Insert image placed at RELATIVE-FILENAME into the SVG structure. RELATIVE-FILENAME will be searched in `file-name-directory' of the image's `:base-uri' property. If `:base-uri' is not specified for the -image, then embedding won't work. Embedding large images using this +image, then embedding won't work. Embedding large images using this function is much faster than `svg-embed'." (svg--append svg diff --git a/lisp/vc/compare-w.el b/lisp/vc/compare-w.el index 4c1d9eaad55..7c2e125831e 100644 --- a/lisp/vc/compare-w.el +++ b/lisp/vc/compare-w.el @@ -113,7 +113,7 @@ and the value `((4) (4))' for horizontally split windows." :version "22.1") (defcustom compare-windows-highlight t - "Non-nil means compare-windows highlights the differences. + "Non-nil means `compare-windows' highlights the differences. The value t removes highlighting immediately after invoking a command other than `compare-windows'. The value `persistent' leaves all highlighted differences. You can clear diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index eeb32f8fe50..0852f8790e9 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el @@ -1479,7 +1479,7 @@ Supports unified and context diffs as well as (to a lesser extent) normal diffs. When the buffer is read-only, the ESC prefix is not necessary. -If you edit the buffer manually, diff-mode will try to update the hunk +If you edit the buffer manually, `diff-mode' will try to update the hunk headers for you on-the-fly. You can also switch between context diff and unified diff with \\[diff-context->unified], diff --git a/lisp/vc/ediff-diff.el b/lisp/vc/ediff-diff.el index 0965e888f06..0f90bef2c5c 100644 --- a/lisp/vc/ediff-diff.el +++ b/lisp/vc/ediff-diff.el @@ -24,7 +24,6 @@ ;;; Code: - (require 'ediff-init) (require 'ediff-util) @@ -78,14 +77,14 @@ are `-I REGEXP', to ignore changes whose lines match the REGEXP." "Options to pass to `ediff-diff-program'. If Unix diff is used as `ediff-diff-program', then a useful option is `-w', to ignore space. -Options `-c', `-u', and `-i' are not allowed. Case sensitivity can be +Options `-c', `-u', and `-i' are not allowed. Case sensitivity can be toggled interactively using \\[ediff-toggle-ignore-case]. -Do not remove the default options. If you need to change this variable, add new +Do not remove the default options. If you need to change this variable, add new options after the default ones. This variable is not for customizing the look of the differences produced by -the command \\[ediff-show-diff-output]. Use the variable +the command \\[ediff-show-diff-output]. Use the variable `ediff-custom-diff-options' for that." :set #'ediff-set-diff-options :type 'string) diff --git a/lisp/vc/ediff-help.el b/lisp/vc/ediff-help.el index a5bb953b6d4..2f8f596ed17 100644 --- a/lisp/vc/ediff-help.el +++ b/lisp/vc/ediff-help.el @@ -24,7 +24,6 @@ ;;; Code: - ;; Compiler pacifier start (defvar ediff-multiframe) ;; end pacifier diff --git a/lisp/vc/ediff-init.el b/lisp/vc/ediff-init.el index 96fa0633e84..5afc83d9e21 100644 --- a/lisp/vc/ediff-init.el +++ b/lisp/vc/ediff-init.el @@ -248,7 +248,7 @@ It needs to be killed when we quit the session.") ;; Doesn't save the point and mark. ;; This is `with-current-buffer' with the added test for live buffers." (defmacro ediff-with-current-buffer (buffer &rest body) - "Evaluates BODY in BUFFER." + "Evaluate BODY in BUFFER." (declare (indent 1) (debug (form body))) `(if (ediff-buffer-live-p ,buffer) (save-current-buffer @@ -615,7 +615,7 @@ highlighted using ASCII flags." Actually, Ediff restores the scope of visibility that existed at startup.") (defcustom ediff-keep-variants t - "nil means prompt to remove unmodified buffers A/B/C at session end. + "Nil means prompt to remove unmodified buffers A/B/C at session end. Supplying a prefix argument to the quit command `q' temporarily reverses the meaning of this variable." :type 'boolean @@ -680,10 +680,10 @@ shown in brighter colors." (ediff-defvar-local ediff-custom-diff-buffer nil "") ;; Buffer used for diff-style fine differences between regions. (ediff-defvar-local ediff-fine-diff-buffer nil "") -;; Temporary buffer used for computing fine differences. -(defconst ediff-tmp-buffer " *ediff-tmp*" "") -;; Buffer used for messages -(defconst ediff-msg-buffer " *ediff-message*" "") +(defconst ediff-tmp-buffer " *ediff-tmp*" + "Temporary buffer used for computing fine differences.") +(defconst ediff-msg-buffer " *ediff-message*" + "Buffer used for messages.") ;; Buffer containing the output of diff when diff returns errors. (ediff-defvar-local ediff-error-buffer nil "") ;; Buffer to display debug info @@ -835,7 +835,7 @@ this variable represents.") ;; this variable is set to nil, then again to the appropriate face. (defvar ediff-current-diff-face-B 'ediff-current-diff-B "Face for highlighting the selected difference in buffer B. - this variable. Instead, use the customization +DO NOT CHANGE this variable. Instead, use the customization widget to customize the actual face `ediff-current-diff-B' this variable represents.") diff --git a/lisp/vc/ediff-merg.el b/lisp/vc/ediff-merg.el index ad4ef473f84..2bdce9e33c7 100644 --- a/lisp/vc/ediff-merg.el +++ b/lisp/vc/ediff-merg.el @@ -53,7 +53,7 @@ Valid values are the symbols `default-A', `default-B', and `combined'." "Pattern to be used for combining difference regions in buffers A and B. The value must be a list of the form \(STRING1 bufspec1 STRING2 bufspec2 STRING3 bufspec3 STRING4) -where bufspec is the symbol A, B, or Ancestor. For instance, if the value is +where bufspec is the symbol A, B, or Ancestor. For instance, if the value is '(STRING1 A STRING2 Ancestor STRING3 B STRING4) then the combined text will look like this: @@ -63,8 +63,7 @@ STRING2 diff region from the ancestor STRING3 diff region from variant B -STRING4 -" +STRING4" :type '(choice (list string symbol string symbol string) (list string symbol string symbol string symbol string)) :group 'ediff-merge) diff --git a/lisp/vc/ediff-mult.el b/lisp/vc/ediff-mult.el index 8e88b60a0bd..20ff8f9f04d 100644 --- a/lisp/vc/ediff-mult.el +++ b/lisp/vc/ediff-mult.el @@ -47,7 +47,7 @@ ;; explanation of the two nil placeholders in such elements. ;; ;; There is API for extracting the components of the members of the -;; above list. Search for `API for ediff-meta-list' for details. +;; above list. Search for `API for ediff-meta-list' for details. ;; ;; HEADER must be a list of SIX elements (nil or string): ;; (regexp metaobj1 metaobj2 metaobj3 merge-save-buffer @@ -157,8 +157,7 @@ Useful commands (type ? to hide them and free up screen): (define-key map [delete] #'previous-line) (define-key map [backspace] #'previous-line) map) - "The keymap to be installed in the buffer showing differences between -directories.") + "Keymap for buffer showing differences between directories.") ;; Variable specifying the action to take when the use invokes ediff in the ;; meta buffer. This is usually ediff-registry-action or ediff-filegroup-action diff --git a/lisp/vc/ediff.el b/lisp/vc/ediff.el index 3536cbf7381..e884ed8c516 100644 --- a/lisp/vc/ediff.el +++ b/lisp/vc/ediff.el @@ -6,7 +6,7 @@ ;; Created: February 2, 1994 ;; Keywords: comparing, merging, patching, vc, tools, unix ;; Version: 2.81.6 -(defconst ediff-version "2.81.6" "The current version of Ediff") +(defconst ediff-version "2.81.6" "The current version of Ediff.") ;; Yoni Rabkin contacted the maintainer of this ;; file on 20/3/2008, and the maintainer agreed that when a bug is diff --git a/lisp/vc/log-edit.el b/lisp/vc/log-edit.el index 46e9c97eb0a..e0a87ba941c 100644 --- a/lisp/vc/log-edit.el +++ b/lisp/vc/log-edit.el @@ -98,7 +98,7 @@ (defcustom log-edit-confirm 'changed "If non-nil, `log-edit-done' will request confirmation. If `changed', only request confirmation if the list of files has - changed since the beginning of the log-edit session." + changed since the beginning of the `log-edit' session." :group 'log-edit :type '(choice (const changed) (const t) (const nil))) @@ -497,7 +497,7 @@ When done editing the log entry, type \\[log-edit-done], which will trigger the actual commit of the file(s). Several other handy support commands are provided, and the package from which this is used might also provide additional commands (under -the \"C-x v\" prefix for VC commands, for example). +the \\[vc-prefix-map] prefix for VC commands, for example). \\{log-edit-mode-map}" (setq-local font-lock-defaults '(log-edit-font-lock-keywords t)) diff --git a/lisp/vc/log-view.el b/lisp/vc/log-view.el index e8930979b5d..bc66191f333 100644 --- a/lisp/vc/log-view.el +++ b/lisp/vc/log-view.el @@ -156,7 +156,7 @@ :group 'log-view) (easy-menu-define log-view-mode-menu log-view-mode-map - "Log-View Display Menu" + "Log-View Display Menu." '("Log-View" ;; XXX Do we need menu entries for these? ;; ["Quit" quit-window] diff --git a/lisp/vc/pcvs.el b/lisp/vc/pcvs.el index 42f531e4f75..23f0902b38c 100644 --- a/lisp/vc/pcvs.el +++ b/lisp/vc/pcvs.el @@ -247,7 +247,7 @@ If -CVS-MODE!-FUN is provided, it is executed *cvs* being the current buffer (let* ((-cvs-mode!-buf (current-buffer)) (cvsbuf (cond ((cvs-buffer-p) (current-buffer)) ((and cvs-buffer (cvs-buffer-p cvs-buffer)) cvs-buffer) - (t (error "can't find the *cvs* buffer")))) + (t (error "Can't find the *cvs* buffer")))) (-cvs-mode!-wrapper cvs-minor-wrap-function) (-cvs-mode!-cont (lambda () (save-current-buffer diff --git a/lisp/vc/vc-annotate.el b/lisp/vc/vc-annotate.el index 07b2800c2dc..82531f742e4 100644 --- a/lisp/vc/vc-annotate.el +++ b/lisp/vc/vc-annotate.el @@ -277,7 +277,7 @@ cover the range from the oldest annotation to the newest." ;; Menu -- Using easymenu.el (easy-menu-define vc-annotate-mode-menu vc-annotate-mode-map - "VC Annotate Display Menu" + "VC Annotate Display Menu." `("VC-Annotate" ["By Color Map Range" (unless (null vc-annotate-display-mode) (setq vc-annotate-display-mode nil) diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el index 5144b5d0bbb..bfe3293e45a 100644 --- a/lisp/vc/vc-bzr.el +++ b/lisp/vc/vc-bzr.el @@ -634,7 +634,7 @@ Returns nil if unable to find this information." (error "Don't know how to compute the next revision of %s" rev))) (defun vc-bzr-register (files &optional _comment) - "Register FILES under bzr. COMMENT is ignored." + "Register FILES under bzr. COMMENT is ignored." (vc-bzr-command "add" nil 0 files)) ;; Could run `bzr status' in the directory and see if it succeeds, but diff --git a/lisp/vc/vc-dav.el b/lisp/vc/vc-dav.el index 5fd8d8e5036..1785440d538 100644 --- a/lisp/vc/vc-dav.el +++ b/lisp/vc/vc-dav.el @@ -136,7 +136,7 @@ It should return a status of either 0 (no differences found), or ;; This should use url-dav-get-properties with a depth of `1' to get ;; all the properties. (defun vc-dav-dir-state (_url) - "find the version control state of all files in DIR in a fast way." + "Find the version control state of all files in DIR in a fast way." ) (defun vc-dav-responsible-p (_url) diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el index eb8cf8192c1..26cea0001cc 100644 --- a/lisp/vc/vc-dir.el +++ b/lisp/vc/vc-dir.el @@ -1113,33 +1113,33 @@ If it is a file, return the corresponding cons for the file itself." (define-derived-mode vc-dir-mode special-mode "VC dir" "Major mode for VC directory buffers. -Marking/Unmarking key bindings and actions: -m - mark a file/directory +Marking/Unmarking key bindings and actions: \\ +\\[vc-dir-mark] - mark a file/directory - if the region is active, mark all the files in region. Restrictions: - a file cannot be marked if any parent directory is marked - a directory cannot be marked if any child file or directory is marked -u - unmark a file/directory +\\[vc-dir-unmark] - unmark a file/directory - if the region is active, unmark all the files in region. -M - if the cursor is on a file: mark all the files with the same state as +\\[vc-dir-mark-all-files] - if the cursor is on a file: mark all the files with the same state as the current file - if the cursor is on a directory: mark all child files - with a prefix argument: mark all files -U - if the cursor is on a file: unmark all the files with the same state +\\[vc-dir-unmark-all-files] - if the cursor is on a file: unmark all the files with the same state as the current file - if the cursor is on a directory: unmark all child files - with a prefix argument: unmark all files VC commands -VC commands in the `C-x v' prefix can be used. +VC commands in the \\[vc-prefix-map] prefix can be used. VC commands act on the marked entries. If nothing is marked, VC commands act on the current entry. Search & Replace -S - searches the marked files -Q - does a query replace on the marked files -M-s a C-s - does an isearch on the marked files -M-s a C-M-s - does a regexp isearch on the marked files +\\[vc-dir-search] - searches the marked files +\\[vc-dir-query-replace-regexp] - does a query replace on the marked files +\\[vc-dir-isearch] - does an isearch on the marked files +\\[vc-dir-isearch-regexp] - does a regexp isearch on the marked files If nothing is marked, these commands act on the current entry. When a directory is current or marked, the Search & Replace commands act on the child files of that directory that are displayed in diff --git a/lisp/vc/vc-dispatcher.el b/lisp/vc/vc-dispatcher.el index c29458620e9..cd23bcce941 100644 --- a/lisp/vc/vc-dispatcher.el +++ b/lisp/vc/vc-dispatcher.el @@ -104,12 +104,13 @@ ;; will be called with the buffer file name as argument whenever the ;; dispatcher resyncs the buffer. -;; To do: -;; +;;; Code: + +;; TODO: ;; - log buffers need font-locking. -;; ;; General customization + (defcustom vc-logentry-check-hook nil "Normal hook run by `vc-finish-logentry'. Use this to impose your own rules on the entry in addition to any the @@ -662,7 +663,7 @@ contents of the log entry buffer. If COMMENT is a string and INITIAL-CONTENTS is nil, do action immediately as if the user had entered COMMENT. If COMMENT is t, also do action immediately with an empty comment. Remember the file's buffer in `vc-parent-buffer' -\(current one if no file). Puts the log-entry buffer in major-mode +\(current one if no file). Puts the log-entry buffer in major mode MODE, defaulting to `log-edit-mode' if MODE is nil. AFTER-HOOK specifies the local value for `vc-log-after-operation-hook'. BACKEND, if non-nil, specifies a VC backend for the Log Edit buffer." diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 4b309c338a0..ec572e96a57 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -408,7 +408,7 @@ in the order given by `git status'." orig-name) ;; Original name for renames or copies. (defun vc-git-escape-file-name (name) - "Escape a file name if necessary." + "Escape filename NAME if necessary." (if (string-match "[\n\t\"\\]" name) (concat "\"" (mapconcat (lambda (c) diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index 8a9a6b85830..1e8d6738523 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el @@ -271,9 +271,9 @@ If `ask', you will be prompted for a branch type." (defcustom vc-hg-symbolic-revision-styles '(builtin-active-bookmark "{if(bookmarks,sub(' ',',',bookmarks),if(phabdiff,phabdiff,shortest(node,6)))}") - "List of ways to present versions symbolically. The version -that we use is the first one that successfully produces a -non-empty string. + "List of ways to present versions symbolically. +The version that we use is the first one that successfully +produces a non-empty string. Each entry in the list can be either: @@ -811,7 +811,7 @@ if we don't understand a construct, we signal (push c parts) (cond ((eq c ?\\) (setf state 'charclass-backslash)) ((eq c ?\]) (setf state 'normal)))) - (t (error "invalid state"))) + (t (error "Invalid state"))) (setf i (1+ i)))) (unless (eq state 'normal) (signal 'vc-hg-unsupported-syntax (list pcre))) @@ -1151,7 +1151,7 @@ hg binary." (expand-file-name old))) (defun vc-hg-register (files &optional _comment) - "Register FILES under hg. COMMENT is ignored." + "Register FILES under hg. COMMENT is ignored." (vc-hg-command nil 0 files "add")) (defun vc-hg-create-repo () diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el index 4b3c829a2c6..06123106401 100644 --- a/lisp/vc/vc-hooks.el +++ b/lisp/vc/vc-hooks.el @@ -483,7 +483,7 @@ status of this file. Otherwise, the value returned is one of: (vc-call-backend backend 'state file))) (defsubst vc-up-to-date-p (file) - "Convenience function that checks whether `vc-state' of FILE is `up-to-date'." + "Convenience function to check whether `vc-state' of FILE is `up-to-date'." (eq (vc-state file) 'up-to-date)) (defun vc-working-revision (file &optional backend) @@ -627,7 +627,7 @@ Before doing that, check if there are any old backups and get rid of them." (declare-function vc-dir-resynch-file "vc-dir" (&optional fname)) -(defvar vc-dir-buffers nil "List of vc-dir buffers.") +(defvar vc-dir-buffers nil "List of `vc-dir' buffers.") (defun vc-after-save () "Function to be called by `basic-save-buffer' (in files.el)." diff --git a/lisp/vc/vc-rcs.el b/lisp/vc/vc-rcs.el index 0b0c71b1ff9..e38469ba9f0 100644 --- a/lisp/vc/vc-rcs.el +++ b/lisp/vc/vc-rcs.el @@ -242,7 +242,7 @@ When VERSION is given, perform check for that version." (autoload 'vc-switches "vc") (defun vc-rcs-register (files &optional comment) - "Register FILES into the RCS version-control system. + "Register FILES into the RCS version control system. Automatically retrieve a read-only version of the file with keywords expanded. COMMENT can be used to provide an initial description for each FILES. Passes either `vc-rcs-register-switches' or `vc-register-switches' @@ -382,8 +382,9 @@ whether to remove it." (vc-switches 'RCS 'checkout))) (defun vc-rcs-checkout (file &optional rev) - "Retrieve a copy of a saved version of FILE. If FILE is a directory, -attempt the checkout for all registered files beneath it." + "Retrieve a copy of a saved version of FILE. +If FILE is a directory, attempt the checkout for all registered +files beneath it." (if (file-directory-p file) (mapc #'vc-rcs-checkout (vc-expand-dirs (list file) 'RCS)) (let ((file-buffer (get-file-buffer file)) @@ -448,8 +449,8 @@ attempt the checkout for all registered files beneath it." (message "Checking out %s...done" file)))))) (defun vc-rcs-revert (file &optional _contents-done) - "Revert FILE to the version it was based on. If FILE is a directory, -revert all registered files beneath it." + "Revert FILE to the version it was based on. +If FILE is a directory, revert all registered files beneath it." (if (file-directory-p file) (mapc #'vc-rcs-revert (vc-expand-dirs (list file) 'RCS)) (vc-do-command "*vc*" 0 "co" (vc-master-name file) "-f" @@ -516,8 +517,9 @@ Needs RCS 5.6.2 or later for -M." (kill-buffer filename))))) (defun vc-rcs-modify-change-comment (files rev comment) - "Modify the change comments change on FILES on a specified REV. If FILE is a -directory the operation is applied to all registered files beneath it." + "Modify the change comments change on FILES on a specified REV. +If FILE is a directory the operation is applied to all registered +files beneath it." (dolist (file (vc-expand-dirs files 'RCS)) (vc-do-command "*vc*" 0 "rcs" (vc-master-name file) (concat "-m" rev ":" comment)))) diff --git a/lisp/vc/vc-sccs.el b/lisp/vc/vc-sccs.el index 92cce5f13a8..bcbb87eba8e 100644 --- a/lisp/vc/vc-sccs.el +++ b/lisp/vc/vc-sccs.el @@ -191,7 +191,7 @@ Optional string REV is a revision." (autoload 'vc-switches "vc") (defun vc-sccs-register (files &optional comment) - "Register FILES into the SCCS version-control system. + "Register FILES into the SCCS version control system. Automatically retrieve a read-only version of the files with keywords expanded. COMMENT can be used to provide an initial description of FILES. Passes either `vc-sccs-register-switches' or `vc-register-switches' @@ -270,8 +270,8 @@ locked. REV is the revision to check out." (message "Checking out %s...done" file)))) (defun vc-sccs-revert (file &optional _contents-done) - "Revert FILE to the version it was based on. If FILE is a directory, -revert all subfiles." + "Revert FILE to the version it was based on. +If FILE is a directory, revert all subfiles." (if (file-directory-p file) (mapc #'vc-sccs-revert (vc-expand-dirs (list file) 'SCCS)) (vc-sccs-do-command nil 0 "unget" (vc-master-name file)) diff --git a/lisp/vc/vc-src.el b/lisp/vc/vc-src.el index faba5bce2b7..b408b7de760 100644 --- a/lisp/vc/vc-src.el +++ b/lisp/vc/vc-src.el @@ -238,7 +238,7 @@ This function differs from vc-do-command in that it invokes `vc-src-program'." (autoload 'vc-switches "vc") (defun vc-src-register (files &optional _comment) - "Register FILES under src. COMMENT is ignored." + "Register FILES under src. COMMENT is ignored." (vc-src-command nil files "add")) (defun vc-src-responsible-p (file) @@ -268,15 +268,16 @@ REV is the revision to check out into WORKFILE." (vc-src-command nil file "co"))) (defun vc-src-revert (file &optional _contents-done) - "Revert FILE to the version it was based on. If FILE is a directory, -revert all registered files beneath it." + "Revert FILE to the version it was based on. +If FILE is a directory, revert all registered files beneath it." (if (file-directory-p file) (mapc #'vc-src-revert (vc-expand-dirs (list file) 'SRC)) (vc-src-command nil file "co"))) (defun vc-src-modify-change-comment (files rev comment) - "Modify the change comments change on FILES on a specified REV. If FILE is a -directory the operation is applied to all registered files beneath it." + "Modify the change comments change on FILES on a specified REV. +If FILE is a directory the operation is applied to all registered +files beneath it." (dolist (file (vc-expand-dirs files 'SRC)) (vc-src-command nil file "amend" "-m" comment rev))) diff --git a/lisp/vc/vc-svn.el b/lisp/vc/vc-svn.el index 544a6c769fc..e14519cc20e 100644 --- a/lisp/vc/vc-svn.el +++ b/lisp/vc/vc-svn.el @@ -295,7 +295,7 @@ RESULT is a list of conses (FILE . STATE) for directory DIR." (autoload 'vc-switches "vc") (defun vc-svn-register (files &optional _comment) - "Register FILES into the SVN version-control system. + "Register FILES into the SVN version control system. The COMMENT argument is ignored This does an add but not a commit. Passes either `vc-svn-register-switches' or `vc-register-switches' to the SVN command." diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 4fcba65ab4d..512f07d2f63 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -1012,7 +1012,7 @@ responsible for the given file." (error "No VC backend is responsible for %s" file)))) (defun vc-expand-dirs (file-or-dir-list backend) - "Expands directories in a file list specification. + "Expand directories in a file list specification. Within directories, only files already under version control are noticed." (let ((flattened '())) (dolist (node file-or-dir-list) @@ -1152,7 +1152,7 @@ BEWARE: this function may change the current buffer." (memq (vc-state file) '(edited needs-merge conflict)))))) (defun vc-compatible-state (p q) - "Controls which states can be in the same commit." + "Control which states can be in the same commit." (or (eq p q) (and (member p '(edited added removed)) (member q '(edited added removed))))) diff --git a/lisp/x-dnd.el b/lisp/x-dnd.el index 23e8001c013..2819c6163d0 100644 --- a/lisp/x-dnd.el +++ b/lisp/x-dnd.el @@ -377,7 +377,7 @@ Currently XDND, Motif and old KDE 1.x protocols are recognized." ("XdndActionMove" . move) ("XdndActionLink" . link) ("XdndActionAsk" . ask)) - "Mapping from XDND action types to lisp symbols.") + "Mapping from XDND action types to Lisp symbols.") (declare-function x-change-window-property "xfns.c" (prop value &optional frame type format outer-P)) -- cgit v1.2.3 From dd1220b96972d77e5bbe1094586514bae63fe1eb Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Sat, 18 Sep 2021 13:12:41 +0200 Subject: ; More stylistic docfixes in emacs-lisp/*.el found by checkdoc --- lisp/emacs-lisp/advice.el | 4 ++-- lisp/emacs-lisp/autoload.el | 6 +++--- lisp/emacs-lisp/backtrace.el | 2 +- lisp/emacs-lisp/byte-opt.el | 4 ++-- lisp/emacs-lisp/byte-run.el | 10 +++++----- lisp/emacs-lisp/bytecomp.el | 4 ++-- lisp/emacs-lisp/checkdoc.el | 2 +- lisp/emacs-lisp/cl-generic.el | 2 +- lisp/emacs-lisp/comp.el | 2 +- lisp/emacs-lisp/debug.el | 14 +++++++------- lisp/emacs-lisp/derived.el | 2 +- lisp/emacs-lisp/edebug.el | 4 ++-- lisp/emacs-lisp/eieio-base.el | 2 +- lisp/emacs-lisp/elint.el | 2 +- lisp/emacs-lisp/ert.el | 4 ++-- lisp/emacs-lisp/ewoc.el | 2 +- lisp/emacs-lisp/generator.el | 2 +- lisp/emacs-lisp/lisp-mode.el | 2 +- lisp/emacs-lisp/nadvice.el | 2 +- lisp/emacs-lisp/testcover.el | 2 +- 20 files changed, 37 insertions(+), 37 deletions(-) (limited to 'lisp/emacs-lisp/bytecomp.el') diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el index 1f276c7f7a3..15e413e0e8f 100644 --- a/lisp/emacs-lisp/advice.el +++ b/lisp/emacs-lisp/advice.el @@ -1033,7 +1033,7 @@ ;; ;; To make sure a certain piece of advice gets executed even if some error or ;; non-local exit occurred in any preceding code, we can protect it by using -;; the `protect' keyword. (if any of the around advices is protected then the +;; the `protect' keyword (if any of the around advices is protected then the ;; whole around advice onion will be protected): ;; ;; (defadvice foo (after fg-cleanup prot act) @@ -3105,7 +3105,7 @@ The syntax of `defadvice' is as follows: FUNCTION ::= Name of the function to be advised. CLASS ::= `before' | `around' | `after' | `activation' | `deactivation'. NAME ::= Non-nil symbol that names this piece of advice. -POSITION ::= `first' | `last' | NUMBER. Optional, defaults to `first', +POSITION ::= `first' | `last' | NUMBER. Optional, defaults to `first', see also `ad-add-advice'. ARGLIST ::= An optional argument list to be used for the advised function instead of the argument list of the original. The first one found in diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index e9a20634af8..38512e04e75 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el @@ -25,7 +25,7 @@ ;; This code helps GNU Emacs maintainers keep the loaddefs.el file up to ;; date. It interprets magic cookies of the form ";;;###autoload" in -;; lisp source files in various useful ways. To learn more, read the +;; Lisp source files in various useful ways. To learn more, read the ;; source; if you're going to use this, you'd better be able to. ;;; Code: @@ -432,8 +432,8 @@ FILE's name." file) (defun autoload-insert-section-header (outbuf autoloads load-name file time) - "Insert the section-header line, -which lists the file name and which functions are in it, etc." + "Insert the section-header line. +This lists the file name and which functions are in it, etc." ;; (cl-assert ;Make sure we don't insert it in the middle of another section. ;; (save-excursion ;; (or (not (re-search-backward diff --git a/lisp/emacs-lisp/backtrace.el b/lisp/emacs-lisp/backtrace.el index ea70baa9532..a5721aa3193 100644 --- a/lisp/emacs-lisp/backtrace.el +++ b/lisp/emacs-lisp/backtrace.el @@ -868,7 +868,7 @@ commands. \\{backtrace-mode-map} A mode which inherits from Backtrace mode, or a command which -creates a backtrace-mode buffer, should usually do the following: +creates a `backtrace-mode' buffer, should usually do the following: - Set `backtrace-revert-hook', if the buffer contents need to be specially recomputed prior to `revert-buffer'. diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index 966ef266b9a..c15814afa00 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el @@ -202,7 +202,7 @@ (intern (substring (symbol-name arg) 5)) arg) (if (integerp (setq c (car arg))) - (error "non-symbolic byte-op %s" c)) + (error "Non-symbolic byte-op %s" c)) (if (eq c 'TAG) (setq c arg) (setq a (cond ((memq c byte-goto-ops) @@ -1753,7 +1753,7 @@ See Info node `(elisp) Integer Basics'." (setq tags (delq tmp tags)) (setq rest (cdr rest)))) (setq rest (cdr rest)))) - (if tags (error "optimizer error: missed tags %s" tags)) + (if tags (error "Optimizer error: missed tags %s" tags)) ;; Remove addrs, lap = ( [ (op . arg) | (TAG tagno) ]* ) (mapcar (lambda (elt) (if (numberp elt) diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el index 6d698ffb6f0..35c80e524cf 100644 --- a/lisp/emacs-lisp/byte-run.el +++ b/lisp/emacs-lisp/byte-run.el @@ -529,11 +529,11 @@ is enabled." (list 'quote (eval (cons 'progn body) lexical-binding))) (defmacro eval-and-compile (&rest body) - "Like `progn', but evaluates the body at compile time and at -load time. In interpreted code, this is entirely equivalent to -`progn', except that the value of the expression may be (but is -not necessarily) computed at load time if eager macro expansion -is enabled." + "Like `progn', but evaluates the body at compile time and at load time. +In interpreted code, this is entirely equivalent to `progn', +except that the value of the expression may be (but is not +necessarily) computed at load time if eager macro expansion is +enabled." (declare (debug (&rest def-form)) (indent 0)) ;; When the byte-compiler expands code, this macro is not used, so we're ;; either about to run `body' (plain interpretation) or we're doing eager diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 776e84dfebb..8a730618ecd 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -915,7 +915,7 @@ CONST2 may be evaluated multiple times." ,bytes ,pc)) (defun byte-compile-lapcode (lap) - "Turns lapcode into bytecode. The lapcode is destroyed." + "Turn lapcode into bytecode. The lapcode is destroyed." ;; Lapcode modifications: changes the ID of a tag to be the tag's PC. (let ((pc 0) ; Program counter op off ; Operation & offset @@ -1899,7 +1899,7 @@ also be compiled." "Non-nil to prevent byte-compiling of Emacs Lisp code. This is normally set in local file variables at the end of the elisp file: -\;; Local Variables:\n;; no-byte-compile: t\n;; End: ") ;Backslash for compile-main. +\;; Local Variables:\n;; no-byte-compile: t\n;; End:") ;Backslash for compile-main. ;;;###autoload(put 'no-byte-compile 'safe-local-variable 'booleanp) (defun byte-recompile-file (filename &optional force arg load) diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index 3ed489f32e8..9a37941313e 100644 --- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el @@ -2081,7 +2081,7 @@ If the offending word is in a piece of quoted text, then it is skipped." (not (thing-at-point-looking-at help-xref-url-regexp))) (if (checkdoc-autofix-ask-replace - b e (format "Text %s should be capitalized. Fix? " + b e (format "Text %s should be capitalized. Fix?" text) (capitalize text) t) nil diff --git a/lisp/emacs-lisp/cl-generic.el b/lisp/emacs-lisp/cl-generic.el index 4a69df15bc8..1640975b84f 100644 --- a/lisp/emacs-lisp/cl-generic.el +++ b/lisp/emacs-lisp/cl-generic.el @@ -960,7 +960,7 @@ Can only be used from within the lexical body of a primary or around method." ;;; Add support for describe-function (defun cl--generic-search-method (met-name) - "For `find-function-regexp-alist'. Searches for a cl-defmethod. + "For `find-function-regexp-alist'. Search for a `cl-defmethod'. MET-NAME is as returned by `cl--generic-load-hist-format'." (let ((base-re (concat "(\\(?:cl-\\)?defmethod[ \t]+" (regexp-quote (format "%s" (car met-name))) diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index bb135457e20..ab36b8aa907 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -3804,7 +3804,7 @@ Return the trampoline if found or nil otherwise." ;;;###autoload (defun comp-clean-up-stale-eln (file) - "Given FILE remove all its *.eln files in `native-comp-eln-load-path' + "Given FILE remove all its *.eln files in `native-comp-eln-load-path'. sharing the original source filename (including FILE)." (when (string-match (rx "-" (group-n 1 (1+ hex)) "-" (1+ hex) ".eln" eos) file) diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index 8da9fb76821..0592db85df4 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el @@ -119,7 +119,7 @@ This is to optimize `debugger-make-xrefs'.") (defvar debugger-jumping-flag nil "Non-nil means that `debug-on-entry' is disabled. This variable is used by `debugger-jump', `debugger-step-through', -and `debugger-reenable' to temporarily disable debug-on-entry.") +and `debugger-reenable' to temporarily disable `debug-on-entry'.") (defvar inhibit-trace) ;Not yet implemented. @@ -128,7 +128,7 @@ and `debugger-reenable' to temporarily disable debug-on-entry.") It is a list expected to take the form (CAUSE . REST) where CAUSE can be: - debug: called for entry to a flagged function. -- t: called because of debug-on-next-call. +- t: called because of `debug-on-next-call'. - lambda: same thing but via `funcall'. - exit: called because of exit of a flagged function. - error: called because of `debug-on-error'.") @@ -335,7 +335,7 @@ Make functions into cross-reference buttons if DO-XREFS is non-nil." (defun debugger-setup-buffer (args) "Initialize the `*Backtrace*' buffer for entry to the debugger. -That buffer should be current already and in debugger-mode." +That buffer should be current already and in `debugger-mode'." (setq backtrace-frames (nthcdr ;; Remove debug--implement-debug-on-entry and the ;; advice's `apply' frame. @@ -454,7 +454,7 @@ will be used, such as in a debug on exit from a frame." (exit-recursive-edit)) (defun debugger-jump () - "Continue to exit from this frame, with all debug-on-entry suspended." + "Continue to exit from this frame, with all `debug-on-entry' suspended." (interactive) (debugger-frame) (setq debugger-jumping-flag t) @@ -464,7 +464,7 @@ will be used, such as in a debug on exit from a frame." (exit-recursive-edit)) (defun debugger-reenable () - "Turn all debug-on-entry functions back on. + "Turn all `debug-on-entry' functions back on. This function is put on `post-command-hook' by `debugger-jump' and removes itself from that hook." (setq debugger-jumping-flag nil) @@ -695,7 +695,7 @@ Redefining FUNCTION also cancels it." ;;;###autoload (defun cancel-debug-on-entry (&optional function) "Undo effect of \\[debug-on-entry] on FUNCTION. -If FUNCTION is nil, cancel debug-on-entry for all functions. +If FUNCTION is nil, cancel `debug-on-entry' for all functions. When called interactively, prompt for FUNCTION in the minibuffer. To specify a nil argument interactively, exit with an empty minibuffer." (interactive @@ -798,7 +798,7 @@ another symbol also cancels it." ;;;###autoload (defun cancel-debug-on-variable-change (&optional variable) "Undo effect of \\[debug-on-variable-change] on VARIABLE. -If VARIABLE is nil, cancel debug-on-variable-change for all variables. +If VARIABLE is nil, cancel `debug-on-variable-change' for all variables. When called interactively, prompt for VARIABLE in the minibuffer. To specify a nil argument interactively, exit with an empty minibuffer." (interactive diff --git a/lisp/emacs-lisp/derived.el b/lisp/emacs-lisp/derived.el index 43d6dfd3c81..5e9644d823c 100644 --- a/lisp/emacs-lisp/derived.el +++ b/lisp/emacs-lisp/derived.el @@ -139,7 +139,7 @@ KEYWORD-ARGS: A nil value means to simply use the same abbrev-table as the parent. :after-hook FORM - A single lisp form which is evaluated after the mode + A single Lisp form which is evaluated after the mode hooks have been run. It should not be quoted. :interactive BOOLEAN Whether the derived mode should be `interactive' or not. diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index 7def9ff96a7..4f3c05baa98 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -3571,7 +3571,7 @@ This is useful for exiting even if `unwind-protect' code may be executed." (defun edebug-set-initial-mode () "Set the initial execution mode of Edebug. The mode is requested via the key that would be used to set the mode in -edebug-mode." +`edebug-mode'." (interactive) (let* ((old-mode edebug-initial-mode) (key (read-key-sequence @@ -4468,7 +4468,7 @@ With prefix argument, make it a temporary breakpoint." 'read-expression-history))))))) (edebug-modify-breakpoint t condition arg)) -(easy-menu-define edebug-menu edebug-mode-map "Edebug menus" edebug-mode-menus) +(easy-menu-define edebug-menu edebug-mode-map "Edebug menus." edebug-mode-menus) ;;; Finalize Loading diff --git a/lisp/emacs-lisp/eieio-base.el b/lisp/emacs-lisp/eieio-base.el index ec7c899bddc..5414c32c340 100644 --- a/lisp/emacs-lisp/eieio-base.el +++ b/lisp/emacs-lisp/eieio-base.el @@ -252,7 +252,7 @@ This is used with the `object-write' method.") :documentation "Saving this object should make backup files. Setting to nil will mean no backups are made.")) - "This special class enables persistence through save files + "This special class enables persistence through save files. Use the `object-write' method to write this object to disk. The save format is Emacs Lisp code which calls the constructor for the saved object. For this reason, only slots which do not have an `:initarg' diff --git a/lisp/emacs-lisp/elint.el b/lisp/emacs-lisp/elint.el index 0fba5938f3d..32b2cbdb45a 100644 --- a/lisp/emacs-lisp/elint.el +++ b/lisp/emacs-lisp/elint.el @@ -1035,7 +1035,7 @@ Insert HEADER followed by a blank line if non-nil." (sit-for 0))) (defun elint-set-mode-line (&optional on) - "Set the mode-line-process of the Elint log buffer." + "Set the `mode-line-process' of the Elint log buffer." (with-current-buffer (elint-get-log-buffer) (and (eq major-mode 'compilation-mode) (setq mode-line-process diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el index 92acfe7246f..d4d8510064a 100644 --- a/lisp/emacs-lisp/ert.el +++ b/lisp/emacs-lisp/ert.el @@ -1958,9 +1958,9 @@ non-nil, returns the face for expected results.." nil) (defun ert--results-font-lock-function (enabledp) - "Redraw the ERT results buffer after font-lock-mode was switched on or off. + "Redraw the ERT results buffer after `font-lock-mode' was switched on or off. -ENABLEDP is true if font-lock-mode is switched on, false +ENABLEDP is true if `font-lock-mode' is switched on, false otherwise." (ert--results-update-ewoc-hf ert--results-ewoc ert--results-stats) (ewoc-refresh ert--results-ewoc) diff --git a/lisp/emacs-lisp/ewoc.el b/lisp/emacs-lisp/ewoc.el index ca29b6d8c9b..68f94edafd9 100644 --- a/lisp/emacs-lisp/ewoc.el +++ b/lisp/emacs-lisp/ewoc.el @@ -147,7 +147,7 @@ and (ewoc--node-nth dll -1) returns the last node." buffer pretty-printer header footer dll last-node hf-pp) (defmacro ewoc--set-buffer-bind-dll-let* (ewoc varlist &rest forms) - "Execute FORMS with ewoc--buffer selected as current buffer, + "Execute FORMS with `ewoc--buffer' selected as current buffer, `dll' bound to the dll, and VARLIST bound as in a let*. `dll' will be bound when VARLIST is initialized, but the current buffer will *not* have been changed. diff --git a/lisp/emacs-lisp/generator.el b/lisp/emacs-lisp/generator.el index 2acf939bed7..7801fc90706 100644 --- a/lisp/emacs-lisp/generator.el +++ b/lisp/emacs-lisp/generator.el @@ -668,7 +668,7 @@ sub-iterator function returns via `iter-end-of-sequence'." (iter-close ,valsym))))) (defmacro iter-defun (name arglist &rest body) - "Creates a generator NAME. + "Create a generator NAME. When called as a function, NAME returns an iterator value that encapsulates the state of a computation that produces a sequence of values. Callers can retrieve each value using `iter-next'." diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index b3b1efc8d2d..eac3c03cd1e 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -627,7 +627,7 @@ Value for `adaptive-fill-function'." ;; encouraged to use 'lisp-data-mode' instead. (defun lisp-mode-variables (&optional lisp-syntax keywords-case-insensitive elisp) - "Common initialization routine for lisp modes. + "Common initialization routine for Lisp modes. The LISP-SYNTAX argument is used by code in inf-lisp.el and is \(uselessly) passed from pp.el, chistory.el, gnus-kill.el and score-mode.el. KEYWORDS-CASE-INSENSITIVE non-nil means that for diff --git a/lisp/emacs-lisp/nadvice.el b/lisp/emacs-lisp/nadvice.el index a2a5aaed046..8fc2986ab41 100644 --- a/lisp/emacs-lisp/nadvice.el +++ b/lisp/emacs-lisp/nadvice.el @@ -160,7 +160,7 @@ Each element has the form (WHERE BYTECODE STACK) where: (t (eval spec)))) (defun advice--interactive-form (function) - ;; Like `interactive-form' but tries to avoid autoloading functions. + "Like `interactive-form' but tries to avoid autoloading functions." (when (commandp function) (if (not (and (symbolp function) (autoloadp (indirect-function function)))) (interactive-form function) diff --git a/lisp/emacs-lisp/testcover.el b/lisp/emacs-lisp/testcover.el index f5a624bb61b..cdd966e51c0 100644 --- a/lisp/emacs-lisp/testcover.el +++ b/lisp/emacs-lisp/testcover.el @@ -333,7 +333,7 @@ vectors as well as conses." ;;;========================================================================= (defun testcover-mark (def) - "Marks one DEF (a function or macro symbol) to highlight its contained forms + "Mark one DEF (a function or macro symbol) to highlight its contained forms that did not get completely tested during coverage tests. A marking with the face `testcover-nohits' (default = red) indicates that the form was never evaluated. A marking using the `testcover-1value' face -- cgit v1.2.3 From 83e3d8d8795c8162490a83f5d1a9d14763b8694f Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 18 Sep 2021 14:56:55 +0300 Subject: Improve doc strings of a recent commit * lisp/emacs-lisp/generator.el (iter-defun): * lisp/emacs-lisp/comp.el (comp-clean-up-stale-eln): * lisp/emacs-lisp/bytecomp.el (byte-compile-lapcode): * lisp/emacs-lisp/autoload.el (autoload-insert-section-header): Include description of arguments in the doc string's first line. --- lisp/emacs-lisp/autoload.el | 6 ++++-- lisp/emacs-lisp/bytecomp.el | 2 +- lisp/emacs-lisp/comp.el | 5 +++-- lisp/emacs-lisp/generator.el | 2 +- 4 files changed, 9 insertions(+), 6 deletions(-) (limited to 'lisp/emacs-lisp/bytecomp.el') diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index 38512e04e75..f620cdbb335 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el @@ -432,8 +432,10 @@ FILE's name." file) (defun autoload-insert-section-header (outbuf autoloads load-name file time) - "Insert the section-header line. -This lists the file name and which functions are in it, etc." + "Insert into buffer OUTBUF the section-header line for FILE. +The header line lists the file name, its \"load name\", its autoloads, +and the time the FILE was last updated (the time is inserted only +if `autoload-timestamps' is non-nil, otherwise a fixed fake time is inserted)." ;; (cl-assert ;Make sure we don't insert it in the middle of another section. ;; (save-excursion ;; (or (not (re-search-backward diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 8a730618ecd..614aa856f6a 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -915,7 +915,7 @@ CONST2 may be evaluated multiple times." ,bytes ,pc)) (defun byte-compile-lapcode (lap) - "Turn lapcode into bytecode. The lapcode is destroyed." + "Turn lapcode LAP into bytecode. The lapcode is destroyed." ;; Lapcode modifications: changes the ID of a tag to be the tag's PC. (let ((pc 0) ; Program counter op off ; Operation & offset diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index ab36b8aa907..31cae734ccc 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -3804,8 +3804,9 @@ Return the trampoline if found or nil otherwise." ;;;###autoload (defun comp-clean-up-stale-eln (file) - "Given FILE remove all its *.eln files in `native-comp-eln-load-path'. -sharing the original source filename (including FILE)." + "Remove all FILE*.eln* files found in `native-comp-eln-load-path'. +The files to be removed are those produced from the original source +filename (including FILE)." (when (string-match (rx "-" (group-n 1 (1+ hex)) "-" (1+ hex) ".eln" eos) file) (cl-loop diff --git a/lisp/emacs-lisp/generator.el b/lisp/emacs-lisp/generator.el index 7801fc90706..2075ac472d1 100644 --- a/lisp/emacs-lisp/generator.el +++ b/lisp/emacs-lisp/generator.el @@ -668,7 +668,7 @@ sub-iterator function returns via `iter-end-of-sequence'." (iter-close ,valsym))))) (defmacro iter-defun (name arglist &rest body) - "Create a generator NAME. + "Create a generator NAME that accepts ARGLIST as its arguments. When called as a function, NAME returns an iterator value that encapsulates the state of a computation that produces a sequence of values. Callers can retrieve each value using `iter-next'." -- cgit v1.2.3 From 85e9e5f616fb0fd0819a04006d6d2a0fb6d93ad7 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Tue, 21 Sep 2021 22:11:43 +0200 Subject: Don't quote nil and t in doc strings and comments * test/src/minibuf-tests.el (test-try-completion-ignore-case): * test/lisp/url/url-auth-tests.el (url-auth-test-digest-auth-retrieve-cache): * test/lisp/subr-tests.el (subr-tests-add-hook-depth): * test/lisp/so-long-tests/so-long-tests.el (so-long-tests-invisible-buffer-function): * test/lisp/emacs-lisp/tabulated-list-test.el (tabulated-list-sort): * src/xfaces.c: * src/process.c (Finterrupt_process): (syms_of_process): * src/minibuf.c (Fread_from_minibuffer): (Fcompleting_read): (syms_of_minibuf): * src/dispnew.c (syms_of_display): * src/data.c: * lisp/so-long.el (so-long--hack-local-variables): * lisp/progmodes/elisp-mode.el (elisp--xref-find-definitions): (elisp--xref-find-definitions): * lisp/org/ox-html.el (org-html-htmlize-output-type): * lisp/org/org-agenda.el (org-agenda-do-in-region): * lisp/net/tramp.el: * lisp/minibuffer.el (set-minibuffer-message): * lisp/isearch.el (isearch-wrap-pause): (isearch-repeat-on-direction-change): * lisp/emacs-lisp/timer.el (timer): * lisp/emacs-lisp/package.el (package-read-archive-contents): * lisp/emacs-lisp/faceup.el (faceup-next-property-change): * lisp/emacs-lisp/comp.el (comp-func): * lisp/emacs-lisp/comp-cstr.el (comp-cstr-empty-p): * lisp/emacs-lisp/cl-macs.el (cl-do): (cl-do*): (cl--self-tco): * lisp/emacs-lisp/bytecomp.el (byte-compile-unresolved-functions): (byte-compile-cond-jump-table): Don't quote t and nil. --- lisp/emacs-lisp/bytecomp.el | 6 +++--- lisp/emacs-lisp/cl-macs.el | 6 +++--- lisp/emacs-lisp/comp-cstr.el | 2 +- lisp/emacs-lisp/comp.el | 4 ++-- lisp/emacs-lisp/faceup.el | 2 +- lisp/emacs-lisp/package.el | 2 +- lisp/emacs-lisp/timer.el | 2 +- lisp/isearch.el | 8 ++++---- lisp/minibuffer.el | 2 +- lisp/net/tramp.el | 2 +- lisp/org/org-agenda.el | 2 +- lisp/org/ox-html.el | 2 +- lisp/progmodes/elisp-mode.el | 4 ++-- lisp/so-long.el | 2 +- src/data.c | 2 +- src/dispnew.c | 2 +- src/minibuf.c | 9 ++++----- src/process.c | 4 ++-- src/xfaces.c | 4 ++-- test/lisp/emacs-lisp/tabulated-list-test.el | 2 +- test/lisp/so-long-tests/so-long-tests.el | 2 +- test/lisp/subr-tests.el | 4 ++-- test/lisp/url/url-auth-tests.el | 2 +- test/src/minibuf-tests.el | 2 +- 24 files changed, 39 insertions(+), 40 deletions(-) (limited to 'lisp/emacs-lisp/bytecomp.el') diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 614aa856f6a..be74195778b 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -551,7 +551,7 @@ has the form (autoload . FILENAME).") "Alist of undefined functions to which calls have been compiled. Each element in the list has the form (FUNCTION POSITION . CALLS) where CALLS is a list whose elements are integers (indicating the -number of arguments passed in the function call) or the constant `t' +number of arguments passed in the function call) or the constant t if the function is called indirectly. This variable is only significant whilst compiling an entire buffer. Used for warnings when a function is not known to be defined or is later @@ -4417,7 +4417,7 @@ Return (TAIL VAR TEST CASES), where: (cases (nth 2 switch)) jump-table test-objects body tag default-tag) ;; TODO: Once :linear-search is implemented for `make-hash-table' - ;; set it to `t' for cond forms with a small number of cases. + ;; set it to t for cond forms with a small number of cases. (let ((nvalues (apply #'+ (mapcar (lambda (case) (length (car case))) cases)))) (setq jump-table (make-hash-table @@ -4446,7 +4446,7 @@ Return (TAIL VAR TEST CASES), where: (byte-compile-out 'byte-switch) ;; When the opcode argument is `byte-goto', `byte-compile-goto' sets - ;; `byte-compile-depth' to `nil'. However, we need `byte-compile-depth' + ;; `byte-compile-depth' to nil. However, we need `byte-compile-depth' ;; to be non-nil for generating tags for all cases. Since ;; `byte-compile-depth' will increase by at most 1 after compiling ;; all of the clause (which is further enforced by cl-assert below) diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index 16308b3a595..6d6482c3497 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -1762,7 +1762,7 @@ Once the END-TEST becomes true, the RESULT forms are evaluated (with the VARs still bound to their values) to produce the result returned by `cl-do'. -Note that the entire loop is enclosed in an implicit `nil' block, so +Note that the entire loop is enclosed in an implicit nil block, so that you can use `cl-return' to exit at any time. Also note that END-TEST is checked before evaluating BODY. If END-TEST @@ -1791,7 +1791,7 @@ Once the END-TEST becomes true, the RESULT forms are evaluated (with the VARs still bound to their values) to produce the result returned by `cl-do*'. -Note that the entire loop is enclosed in an implicit `nil' block, so +Note that the entire loop is enclosed in an implicit nil block, so that you can use `cl-return' to exit at any time. Also note that END-TEST is checked before evaluating BODY. If END-TEST @@ -2071,7 +2071,7 @@ Like `cl-flet' but the definitions can refer to previous ones. ;; even handle mutually recursive functions. (letrec ((done nil) ;; Non-nil if some TCO happened. - ;; This var always holds the value `nil' until (just before) we + ;; This var always holds the value nil until (just before) we ;; exit the loop. (retvar (make-symbol "retval")) (ofargs (mapcar (lambda (s) (if (memq s cl--lambda-list-keywords) s diff --git a/lisp/emacs-lisp/comp-cstr.el b/lisp/emacs-lisp/comp-cstr.el index 6a3f6046d1c..5518cdb4c90 100644 --- a/lisp/emacs-lisp/comp-cstr.el +++ b/lisp/emacs-lisp/comp-cstr.el @@ -134,7 +134,7 @@ Integer values are handled in the `range' slot.") :neg (neg cstr)))) (defsubst comp-cstr-empty-p (cstr) - "Return t if CSTR is equivalent to the `nil' type specifier or nil otherwise." + "Return t if CSTR is equivalent to the nil type specifier or nil otherwise." (with-comp-cstr-accessors (and (null (typeset cstr)) (null (valset cstr)) diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index 31cae734ccc..4060fc97d04 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -901,8 +901,8 @@ non local exit (ends with an `unreachable' insn).")) (lap () :type list :documentation "LAP assembly representation.") (ssa-status nil :type symbol - :documentation "SSA status either: 'nil', 'dirty' or 't'. -Once in SSA form this *must* be set to 'dirty' every time the topology of the + :documentation "SSA status either: nil, `dirty' or t. +Once in SSA form this *must* be set to `dirty' every time the topology of the CFG is mutated by a pass.") (frame-size nil :type integer) (vframe-size 0 :type integer) diff --git a/lisp/emacs-lisp/faceup.el b/lisp/emacs-lisp/faceup.el index 162c39634ed..629029aabc5 100644 --- a/lisp/emacs-lisp/faceup.el +++ b/lisp/emacs-lisp/faceup.el @@ -795,7 +795,7 @@ See `faceup-properties' for a list of tracked properties." nil (if (and (null pos) (faceup-has-any-text-property (point-min))) - ;; `pos' is `nil' and the character at `point-min' contains a + ;; `pos' is nil and the character at `point-min' contains a ;; tracked property, return `point-min'. (point-min) (unless pos diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index a0829f118d8..a204966644e 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -1586,7 +1586,7 @@ If the archive version is too new, signal an error." (if package (package--add-to-archive-contents package archive) (lwarn '(package refresh) :warning - "Ignoring `nil' package on `%s' package archive" archive)))))) + "Ignoring nil package on `%s' package archive" archive)))))) (defvar package--old-archive-priorities nil "Store currently used `package-archive-priorities'. diff --git a/lisp/emacs-lisp/timer.el b/lisp/emacs-lisp/timer.el index 44d70cde6bc..382f6bb1fa3 100644 --- a/lisp/emacs-lisp/timer.el +++ b/lisp/emacs-lisp/timer.el @@ -49,7 +49,7 @@ function args ;What to do when triggered. idle-delay ;If non-nil, this is an idle-timer. psecs - ;; A timer may be created with `t' as the TIME, which means that we + ;; A timer may be created with t as the TIME, which means that we ;; want to run at specific integral multiples of `repeat-delay'. We ;; then have to recompute this (because the machine may have gone to ;; sleep, etc). diff --git a/lisp/isearch.el b/lisp/isearch.el index af6217b7ca9..952caa7ac22 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -176,11 +176,11 @@ command history." (defcustom isearch-wrap-pause t "Define the behavior of wrapping when there are no more matches. -When `t' (by default), signal an error when no more matches are found. +When t (by default), signal an error when no more matches are found. Then after repeating the search, wrap with `isearch-wrap-function'. When `no', wrap immediately after reaching the last match. When `no-ding', wrap immediately without flashing the screen. -When `nil', never wrap, just stop at the last match." +When nil, never wrap, just stop at the last match." :type '(choice (const :tag "Pause before wrapping" t) (const :tag "No pause before wrapping" no) (const :tag "No pause and no flashing" no-ding) @@ -189,9 +189,9 @@ When `nil', never wrap, just stop at the last match." (defcustom isearch-repeat-on-direction-change nil "Whether a direction change should move to another match. -When `nil', the default, a direction change moves point to the other +When nil, the default, a direction change moves point to the other end of the current search match. -When `t', a direction change moves to another search match, if there +When t, a direction change moves to another search match, if there is one." :type '(choice (const :tag "Remain on the same match" nil) (const :tag "Move to another match" t)) diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 7b82e120f19..1e1a6f852e8 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -848,7 +848,7 @@ via `set-message-function'." (run-with-timer minibuffer-message-clear-timeout nil #'clear-minibuffer-message))) - ;; Return `t' telling the caller that the message + ;; Return t telling the caller that the message ;; was handled specially by this function. t)))) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 22ddfdb8e8f..2804b4d37d0 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -183,7 +183,7 @@ See the variable `tramp-encoding-shell' for more information." :version "24.1" :type '(choice (const nil) string)) -;; Since Emacs 26.1, `system-name' can return `nil' at build time if +;; Since Emacs 26.1, `system-name' can return nil at build time if ;; Emacs is compiled with "--no-build-details". We do expect it to be ;; a string. (Bug#44481) (defconst tramp-system-name (or (system-name) "") diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el index 489e6c7f3e9..23c62809a2b 100644 --- a/lisp/org/org-agenda.el +++ b/lisp/org/org-agenda.el @@ -8842,7 +8842,7 @@ Point is in the buffer where the item originated.") (defun org-agenda-do-in-region (beg end cmd &optional arg force-arg delete) "Between region BEG and END, call agenda command CMD. -When optional argument ARG is non-nil or FORCE-ARG is `t', pass +When optional argument ARG is non-nil or FORCE-ARG is t, pass ARG to CMD. When optional argument DELETE is non-nil, assume CMD deletes the agenda entry and don't move to the next entry." (save-excursion diff --git a/lisp/org/ox-html.el b/lisp/org/ox-html.el index 03145e35c53..d8932996ebe 100644 --- a/lisp/org/ox-html.el +++ b/lisp/org/ox-html.el @@ -874,7 +874,7 @@ link's path." (defcustom org-html-htmlize-output-type 'inline-css "Output type to be used by htmlize when formatting code snippets. Choices are `css' to export the CSS selectors only,`inline-css' -to export the CSS attribute values inline in the HTML or `nil' to +to export the CSS attribute values inline in the HTML or nil to export plain text. We use as default `inline-css', in order to make the resulting HTML self-containing. diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index d082db5f02f..ce45de7f6cf 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -990,7 +990,7 @@ namespace but with lower confidence." ;; First call to find-lisp-object-file-name for an object ;; defined in C; the doc strings from the C source have ;; not been loaded yet. Second call will return "src/*.c" - ;; in file; handled by 't' case below. + ;; in file; handled by t case below. (push (elisp--xref-make-xref nil symbol (help-C-file-name (symbol-function symbol) 'subr)) xrefs)) ((and (setq doc (documentation symbol t)) @@ -1034,7 +1034,7 @@ namespace but with lower confidence." specializers)) (file (find-lisp-object-file-name met-name 'cl-defmethod))) (dolist (item specializers) - ;; default method has all 't' in specializers + ;; Default method has all t in specializers. (setq non-default (or non-default (not (equal t item))))) (when (and file diff --git a/lisp/so-long.el b/lisp/so-long.el index e271ff6be3c..65570bf253d 100644 --- a/lisp/so-long.el +++ b/lisp/so-long.el @@ -1686,7 +1686,7 @@ File-local header comments are currently an exception, and are processed by `so-long--check-header-modes' (see which for details)." ;; The first arg to `hack-local-variables' is HANDLE-MODE since Emacs 26.1, ;; and MODE-ONLY in earlier versions. In either case we are interested in - ;; whether it has the value `t'. + ;; whether it has the value t. (let ((retval (apply orig-fun handle-mode args))) (and (eq handle-mode t) retval ; A file-local mode was set. diff --git a/src/data.c b/src/data.c index 27b642df286..0d3376f0903 100644 --- a/src/data.c +++ b/src/data.c @@ -681,7 +681,7 @@ global value outside of any lexical scope. */) /* It has been previously suggested to make this function an alias for symbol-function, but upon discussion at Bug#23957, there is a risk breaking backward compatibility, as some users of fboundp may - expect `t' in particular, rather than any true value. */ + expect t in particular, rather than any true value. */ DEFUN ("fboundp", Ffboundp, Sfboundp, 1, 1, 0, doc: /* Return t if SYMBOL's function definition is not void. */) (Lisp_Object symbol) diff --git a/src/dispnew.c b/src/dispnew.c index 0c313199173..69c2023fdf3 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -6704,7 +6704,7 @@ See `buffer-display-table' for more information. */); DEFVAR_LISP ("tab-bar-position", Vtab_bar_position, doc: /* Specify on which side from the tool bar the tab bar shall be. -Possible values are `t' (below the tool bar), `nil' (above the tool bar). +Possible values are t (below the tool bar), nil (above the tool bar). This option affects only builds where the tool bar is not external. */); pdumper_do_now_and_after_load (syms_of_display_for_pdumper); diff --git a/src/minibuf.c b/src/minibuf.c index a4219d2a63f..4b72d3e896b 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -1292,8 +1292,8 @@ Fifth arg HIST, if non-nil, specifies a history list and optionally HISTPOS is the initial position for use by the minibuffer history commands. For consistency, you should also specify that element of the history as the value of INITIAL-CONTENTS. Positions are counted - starting from 1 at the beginning of the list. If HIST is the symbol - `t', history is not recorded. + starting from 1 at the beginning of the list. If HIST is t, history + is not recorded. If `history-add-new-input' is non-nil (the default), the result will be added to the history list using `add-to-history'. @@ -2037,8 +2037,7 @@ HIST, if non-nil, specifies a history list and optionally the initial (This is the only case in which you should use INITIAL-INPUT instead of DEF.) Positions are counted starting from 1 at the beginning of the list. The variable `history-length' controls the maximum length - of a history list. If HIST is the symbol `t', history is not - recorded. + of a history list. If HIST is t, history is not recorded. DEF, if non-nil, is the default value or the list of default values. @@ -2486,7 +2485,7 @@ is added with (set minibuffer-history-variable (cons STRING (symbol-value minibuffer-history-variable))) - If the variable is the symbol `t', no history is recorded. */); + If the variable is t, no history is recorded. */); XSETFASTINT (Vminibuffer_history_variable, 0); DEFVAR_LISP ("minibuffer-history-position", Vminibuffer_history_position, diff --git a/src/process.c b/src/process.c index bfca165fcad..58347a154a3 100644 --- a/src/process.c +++ b/src/process.c @@ -6887,7 +6887,7 @@ If CURRENT-GROUP is `lambda', and if the shell owns the terminal, don't send the signal. This function calls the functions of `interrupt-process-functions' in -the order of the list, until one of them returns non-`nil'. */) +the order of the list, until one of them returns non-nil. */) (Lisp_Object process, Lisp_Object current_group) { return CALLN (Frun_hook_with_args_until_success, Qinterrupt_process_functions, @@ -8514,7 +8514,7 @@ thus favoring processes with lower descriptors. */); doc: /* List of functions to be called for `interrupt-process'. The arguments of the functions are the same as for `interrupt-process'. These functions are called in the order of the list, until one of them -returns non-`nil'. */); +returns non-nil. */); Vinterrupt_process_functions = list1 (Qinternal_default_interrupt_process); DEFVAR_LISP ("internal--daemon-sockname", Vinternal__daemon_sockname, diff --git a/src/xfaces.c b/src/xfaces.c index c5b7a568aeb..5e63e87d751 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -2420,11 +2420,11 @@ evaluate_face_filter (Lisp_Object filter, struct window *w, /* Determine whether FACE_REF is a "filter" face specification (case #4 in merge_face_ref). If it is, evaluate the filter, and if the filter matches, return the filtered face spec. If the filter does - not match, return `nil'. If FACE_REF is not a filtered face + not match, return nil. If FACE_REF is not a filtered face specification, return FACE_REF. On error, set *OK to false, having logged an error message if - ERR_MSGS is true, and return `nil'. Otherwise, *OK is not touched. + ERR_MSGS is true, and return nil. Otherwise, *OK is not touched. W is either NULL or a window used to evaluate filters. If W is NULL, no window-based face specification filter matches. diff --git a/test/lisp/emacs-lisp/tabulated-list-test.el b/test/lisp/emacs-lisp/tabulated-list-test.el index db1ce312586..679afda3948 100644 --- a/test/lisp/emacs-lisp/tabulated-list-test.el +++ b/test/lisp/emacs-lisp/tabulated-list-test.el @@ -96,7 +96,7 @@ (should (equal (get-text-property (point) 'tabulated-list-column-name) "name-2")) (tabulated-list-sort) - ;; Check a `t' as the sorting predicate. + ;; Check a t as the sorting predicate. (should (string= text (buffer-substring-no-properties (point-min) (point-max)))) ;; Invert. (tabulated-list-sort 1) diff --git a/test/lisp/so-long-tests/so-long-tests.el b/test/lisp/so-long-tests/so-long-tests.el index 8e4597c946c..7eee345aadd 100644 --- a/test/lisp/so-long-tests/so-long-tests.el +++ b/test/lisp/so-long-tests/so-long-tests.el @@ -229,7 +229,7 @@ ((obsolete run-window-configuration-change-hook)) (run-window-configuration-change-hook))))) (so-long-tests-assert-and-revert 'so-long-mode)) - ;; `so-long-invisible-buffer-function' is `nil'. + ;; `so-long-invisible-buffer-function' is nil. (with-temp-buffer (insert "#!emacs\n") (normal-mode) diff --git a/test/lisp/subr-tests.el b/test/lisp/subr-tests.el index 0c3661a296f..695da10408e 100644 --- a/test/lisp/subr-tests.el +++ b/test/lisp/subr-tests.el @@ -492,11 +492,11 @@ See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=19350." (should (equal subr-tests--hook '(f5 f2 f1 f4 f3))) (add-hook 'subr-tests--hook 'f6) (should (equal subr-tests--hook '(f5 f6 f2 f1 f4 f3))) - ;; Make sure `t' is equivalent to 90. + ;; Make sure t is equivalent to 90. (add-hook 'subr-tests--hook 'f7 90) (add-hook 'subr-tests--hook 'f8 t) (should (equal subr-tests--hook '(f5 f6 f2 f1 f4 f3 f7 f8))) - ;; Make sure `nil' is equivalent to 0. + ;; Make sure nil is equivalent to 0. (add-hook 'subr-tests--hook 'f9 0) (add-hook 'subr-tests--hook 'f10) (should (equal subr-tests--hook '(f5 f10 f9 f6 f2 f1 f4 f3 f7 f8))) diff --git a/test/lisp/url/url-auth-tests.el b/test/lisp/url/url-auth-tests.el index ff30f100250..05ccfc0d12a 100644 --- a/test/lisp/url/url-auth-tests.el +++ b/test/lisp/url/url-auth-tests.el @@ -154,7 +154,7 @@ Essential is how realms and paths are matched." auth) (dolist (row (list - ;; If :expected-user is `nil' it indicates + ;; If :expected-user is nil it indicates ;; authentication information shouldn't be found. ;; non-existent server diff --git a/test/src/minibuf-tests.el b/test/src/minibuf-tests.el index c55611eb84b..feea1c112bf 100644 --- a/test/src/minibuf-tests.el +++ b/test/src/minibuf-tests.el @@ -406,7 +406,7 @@ (should (equal (try-completion "bar" '("bArfoo" "barbaz")) (try-completion "bar" '("barbaz" "bArfoo")))) ;; bug#11339 - (should (equal (try-completion "baz" '("baz" "bAz")) "baz")) ;And not `t'! + (should (equal (try-completion "baz" '("baz" "bAz")) "baz")) ;And not t! (should (equal (try-completion "baz" '("bAz" "baz")) (try-completion "baz" '("baz" "bAz")))))) -- cgit v1.2.3 From ed02b88bbae18caad650d76876940ffb58cab554 Mon Sep 17 00:00:00 2001 From: Mattias Engdegård Date: Thu, 23 Sep 2021 12:43:41 +0200 Subject: Renege on anonymous &rest (bug#50268, bug#50720) Allowing &rest without a variable name following turned out not to be very useful, and it never worked properly. Disallow it. * lisp/emacs-lisp/bytecomp.el (byte-compile-check-lambda-list): * src/eval.c (funcall_lambda): Signal error for &rest without variable name. * doc/lispref/functions.texi (Argument List): Adjust manual. * etc/NEWS (file): Announce. * test/src/eval-tests.el (eval-tests--bugs-24912-and-24913): Extend test, also checking with and without lexical binding. (eval-tests-accept-empty-optional-rest): Reduce to... (eval-tests-accept-empty-optional): ...this, again checking with and without lexical binding. --- doc/lispref/functions.texi | 2 +- etc/NEWS | 7 ++++++ lisp/emacs-lisp/bytecomp.el | 2 ++ src/eval.c | 9 ++++--- test/src/eval-tests.el | 57 ++++++++++++++++++++++++++------------------- 5 files changed, 49 insertions(+), 28 deletions(-) (limited to 'lisp/emacs-lisp/bytecomp.el') diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi index 77d1465c876..c856557c3cb 100644 --- a/doc/lispref/functions.texi +++ b/doc/lispref/functions.texi @@ -378,7 +378,7 @@ keyword @code{&rest} before one final argument. @group (@var{required-vars}@dots{} @r{[}&optional @r{[}@var{optional-vars}@dots{}@r{]}@r{]} - @r{[}&rest @r{[}@var{rest-var}@r{]}@r{]}) + @r{[}&rest @var{rest-var}@r{]}) @end group @end example diff --git a/etc/NEWS b/etc/NEWS index f211a98678c..61780a3a19e 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -3273,6 +3273,13 @@ 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 diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index be74195778b..d7da7a2149a 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -2930,6 +2930,8 @@ If FORM is a lambda or a macro, byte-compile it as a function." (macroexp--const-symbol-p arg t)) (error "Invalid lambda variable %s" arg)) ((eq arg '&rest) + (unless (cdr list) + (error "&rest without variable name")) (when (cddr list) (error "Garbage following &rest VAR in lambda-list")) (when (memq (cadr list) '(&optional &rest)) diff --git a/src/eval.c b/src/eval.c index 2bb7cfe6002..66d34808f82 100644 --- a/src/eval.c +++ b/src/eval.c @@ -3245,6 +3245,7 @@ funcall_lambda (Lisp_Object fun, ptrdiff_t nargs, emacs_abort (); i = optional = rest = 0; + bool previous_rest = false; for (; CONSP (syms_left); syms_left = XCDR (syms_left)) { maybe_quit (); @@ -3255,13 +3256,14 @@ funcall_lambda (Lisp_Object fun, ptrdiff_t nargs, if (EQ (next, Qand_rest)) { - if (rest) + if (rest || previous_rest) xsignal1 (Qinvalid_function, fun); rest = 1; + previous_rest = true; } else if (EQ (next, Qand_optional)) { - if (optional || rest) + if (optional || rest || previous_rest) xsignal1 (Qinvalid_function, fun); optional = 1; } @@ -3287,10 +3289,11 @@ funcall_lambda (Lisp_Object fun, ptrdiff_t nargs, else /* Dynamically bind NEXT. */ specbind (next, arg); + previous_rest = false; } } - if (!NILP (syms_left)) + if (!NILP (syms_left) || previous_rest) xsignal1 (Qinvalid_function, fun); else if (i < nargs) xsignal2 (Qwrong_number_of_arguments, fun, make_fixnum (nargs)); diff --git a/test/src/eval-tests.el b/test/src/eval-tests.el index b2b7dfefda5..3c3e7033419 100644 --- a/test/src/eval-tests.el +++ b/test/src/eval-tests.el @@ -39,31 +39,40 @@ (ert-deftest eval-tests--bugs-24912-and-24913 () "Check that Emacs doesn't accept weird argument lists. Bug#24912 and Bug#24913." - (dolist (args '((&rest &optional) - (&rest a &optional) (&rest &optional a) - (&optional &optional) (&optional &optional a) - (&optional a &optional b) - (&rest &rest) (&rest &rest a) - (&rest a &rest b))) - (should-error (eval `(funcall (lambda ,args)) t) :type 'invalid-function) - (should-error (byte-compile-check-lambda-list args)) - (let ((byte-compile-debug t)) - (ert-info ((format "bytecomp: args = %S" args)) - (should-error (eval `(byte-compile (lambda ,args)) t)))))) - -(ert-deftest eval-tests-accept-empty-optional-rest () - "Check that Emacs accepts empty &optional and &rest arglists. + (dolist (lb '(t false)) + (ert-info ((prin1-to-string lb) :prefix "lexical-binding: ") + (let ((lexical-binding lb)) + (dolist (args '((&rest &optional) + (&rest a &optional) (&rest &optional a) + (&optional &optional) (&optional &optional a) + (&optional a &optional b) + (&rest &rest) (&rest &rest a) + (&rest a &rest b) + (&rest) (&optional &rest) + )) + (ert-info ((prin1-to-string args) :prefix "args: ") + (should-error + (eval `(funcall (lambda ,args)) lb) :type 'invalid-function) + (should-error (byte-compile-check-lambda-list args)) + (let ((byte-compile-debug t)) + (should-error (eval `(byte-compile (lambda ,args)) lb))))))))) + +(ert-deftest eval-tests-accept-empty-optional () + "Check that Emacs accepts empty &optional arglists. Bug#24912." - (dolist (args '((&optional) (&rest) (&optional &rest) - (&optional &rest a) (&optional a &rest))) - (let ((fun `(lambda ,args 'ok))) - (ert-info ("eval") - (should (eq (funcall (eval fun t)) 'ok))) - (ert-info ("byte comp check") - (byte-compile-check-lambda-list args)) - (ert-info ("bytecomp") - (let ((byte-compile-debug t)) - (should (eq (funcall (byte-compile fun)) 'ok))))))) + (dolist (lb '(t false)) + (ert-info ((prin1-to-string lb) :prefix "lexical-binding: ") + (let ((lexical-binding lb)) + (dolist (args '((&optional) (&optional &rest a))) + (ert-info ((prin1-to-string args) :prefix "args: ") + (let ((fun `(lambda ,args 'ok))) + (ert-info ("eval") + (should (eq (funcall (eval fun lb)) 'ok))) + (ert-info ("byte comp check") + (byte-compile-check-lambda-list args)) + (ert-info ("bytecomp") + (let ((byte-compile-debug t)) + (should (eq (funcall (byte-compile fun)) 'ok))))))))))) (dolist (form '(let let*)) -- cgit v1.2.3 From f3a6fe2c7d5943dcf241700aaf5c10c485217f60 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Fri, 24 Sep 2021 17:45:37 +0200 Subject: Avoid false positives in bytecomp docstring width warning * lisp/emacs-lisp/bytecomp.el (byte-compile--wide-docstring-p): Ignore more function argument lists. * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests-byte-compile--wide-docstring-p): New test. --- lisp/emacs-lisp/bytecomp.el | 12 ++++++++++-- test/lisp/emacs-lisp/bytecomp-tests.el | 24 ++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 2 deletions(-) (limited to 'lisp/emacs-lisp/bytecomp.el') diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index d7da7a2149a..fc5b092f7dd 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -1649,14 +1649,22 @@ URLs." (replace-regexp-in-string (rx (or ;; Ignore some URLs. - (seq "http" (? "s") "://" (* anychar)) + (seq "http" (? "s") "://" (* nonl)) ;; Ignore these `substitute-command-keys' substitutions. (seq "\\" (or "=" (seq "<" (* (not ">")) ">") (seq "{" (* (not "}")) "}"))) ;; Ignore the function signature that's stashed at the end of ;; the doc string (in some circumstances). - (seq bol "(fn (" (* nonl)))) + (seq bol "(" (+ (any word "-/:[]&")) + ;; One or more arguments. + (+ " " (or + ;; Arguments. + (+ (or (syntax symbol) + (any word "-/:[]&=().?^\\#'"))) + ;; Argument that is a list. + (seq "(" (* (not ")")) ")"))) + ")"))) "" ;; Heuristic: assume these substitutions are of some length N. (replace-regexp-in-string diff --git a/test/lisp/emacs-lisp/bytecomp-tests.el b/test/lisp/emacs-lisp/bytecomp-tests.el index d56c60b1f1d..707f597fd46 100644 --- a/test/lisp/emacs-lisp/bytecomp-tests.el +++ b/test/lisp/emacs-lisp/bytecomp-tests.el @@ -1470,6 +1470,30 @@ compiled correctly." (load-file (concat file "c")) (should (equal (bc-test-alpha-f 'a) '(nil a))))) +(ert-deftest bytecomp-tests-byte-compile--wide-docstring-p/func-arg-list () + (should-not (byte-compile--wide-docstring-p "\ +\(dbus-register-property BUS SERVICE PATH INTERFACE PROPERTY ACCESS \ +[TYPE] VALUE &optional EMITS-SIGNAL DONT-REGISTER-SERVICE)" fill-column)) + (should-not (byte-compile--wide-docstring-p "\ +(fn CMD FLAGS FIS &key (BUF (cvs-temp-buffer)) DONT-CHANGE-DISC CVSARGS \ +POSTPROC)" fill-column)) + ;; Bug#49007 + (should-not (byte-compile--wide-docstring-p "\ +(fn (THIS rudel-protocol-backend) TRANSPORT \ +INFO INFO-CALLBACK &optional PROGRESS-CALLBACK)" fill-column)) + (should-not (byte-compile--wide-docstring-p "\ +\(fn NAME () [DOCSTRING] [:expected-result RESULT-TYPE] \ +[:tags \\='(TAG...)] BODY...)" fill-column)) + (should-not (byte-compile--wide-docstring-p "\ +(make-soap-xs-element &key NAME NAMESPACE-TAG ID TYPE^ OPTIONAL\? MULTIPLE\? \ +REFERENCE SUBSTITUTION-GROUP ALTERNATIVES IS-GROUP)" fill-column)) + (should-not (byte-compile--wide-docstring-p "\ +(fn NAME FIXTURE INPUT &key SKIP-PAIR-STRING EXPECTED-STRING \ +EXPECTED-POINT BINDINGS (MODES \\='\\='(ruby-mode js-mode python-mode)) \ +(TEST-IN-COMMENTS t) (TEST-IN-STRINGS t) (TEST-IN-CODE t) \ +(FIXTURE-FN \\='#\\='electric-pair-mode))" fill-column))) + + ;; Local Variables: ;; no-byte-compile: t ;; End: -- cgit v1.2.3 From c51b1c02db636ac66402432ed9416f80a4a9b2b5 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Fri, 24 Sep 2021 19:10:46 +0200 Subject: Warn about overly long docstring in lambda * lisp/emacs-lisp/bytecomp.el (byte-compile-docstring-length-warn): Warn about overly long docstring in lambda. (Bug#44858) (byte-compile--wide-docstring-p): Improve comment. * test/lisp/emacs-lisp/bytecomp-tests.el ("warn-wide-docstring-defun.el"): Update to test for the above new warning. --- lisp/emacs-lisp/bytecomp.el | 22 ++++++++-------------- test/lisp/emacs-lisp/bytecomp-tests.el | 3 +-- 2 files changed, 9 insertions(+), 16 deletions(-) (limited to 'lisp/emacs-lisp/bytecomp.el') diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index fc5b092f7dd..0856626b7bb 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -1666,7 +1666,10 @@ URLs." (seq "(" (* (not ")")) ")"))) ")"))) "" - ;; Heuristic: assume these substitutions are of some length N. + ;; Heuristic: We can't reliably do `subsititute-command-keys' + ;; substitutions, since the value of a keymap in general can't be + ;; known at compile time. So instead, we assume that these + ;; substitutions are of some length N. (replace-regexp-in-string (rx "\\" (or (seq "[" (* (not "]")) "]"))) (make-string byte-compile--wide-docstring-substitution-len ?x) @@ -1686,13 +1689,6 @@ value, it will override this variable." "Warn if documentation string of FORM is too wide. It is too wide if it has any lines longer than the largest of `fill-column' and `byte-compile-docstring-max-column'." - ;; This has some limitations that it would be nice to fix: - ;; 1. We don't try to handle defuns. It is somewhat tricky to get - ;; it right since `defun' is a macro. Also, some macros - ;; themselves produce defuns (e.g. `define-derived-mode'). - ;; 2. We assume that any `subsititute-command-keys' command replacement has a - ;; given length. We can't reliably do these replacements, since the value - ;; of the keymaps in general can't be known at compile time. (when (byte-compile-warning-enabled-p 'docstrings) (let ((col (max byte-compile-docstring-max-column fill-column)) kind name docs) @@ -1703,12 +1699,10 @@ It is too wide if it has any lines longer than the largest of (setq kind (nth 0 form)) (setq name (nth 1 form)) (setq docs (nth 3 form))) - ;; Here is how one could add lambda's here: - ;; ('lambda - ;; (setq kind "") ; can't be "function", unfortunately - ;; (setq docs (and (stringp (nth 2 form)) - ;; (nth 2 form)))) - ) + ('lambda + (setq kind "") ; can't be "function", unfortunately + (setq docs (and (stringp (nth 2 form)) + (nth 2 form))))) (when (and (consp name) (eq (car name) 'quote)) (setq name (cadr name))) (setq name (if name (format " `%s'" name) "")) diff --git a/test/lisp/emacs-lisp/bytecomp-tests.el b/test/lisp/emacs-lisp/bytecomp-tests.el index 707f597fd46..14df39bfd77 100644 --- a/test/lisp/emacs-lisp/bytecomp-tests.el +++ b/test/lisp/emacs-lisp/bytecomp-tests.el @@ -937,10 +937,9 @@ byte-compiled. Run with dynamic binding." "warn-wide-docstring-define-obsolete-variable-alias.el" "defvaralias .foo. docstring wider than .* characters") -;; TODO: We don't yet issue warnings for defuns. (bytecomp--define-warning-file-test "warn-wide-docstring-defun.el" - "wider than .* characters" 'reverse) + "wider than .* characters") (bytecomp--define-warning-file-test "warn-wide-docstring-defvar.el" -- cgit v1.2.3 From 0a7bab689c4a113dd295c9db55d8e76a34d5f9e1 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Mon, 27 Sep 2021 23:56:55 +0200 Subject: ; Minor stylistic fixes found by checkdoc --- lisp/allout-widgets.el | 2 +- lisp/allout.el | 10 +++++----- lisp/calc/calc-prog.el | 2 +- lisp/cedet/semantic/wisent/python.el | 6 +++--- lisp/cedet/srecode/dictionary.el | 2 +- lisp/dired-aux.el | 2 +- lisp/emacs-lisp/autoload.el | 10 +++++----- lisp/emacs-lisp/avl-tree.el | 3 +-- lisp/emacs-lisp/byte-run.el | 3 ++- lisp/emacs-lisp/bytecomp.el | 6 +++--- lisp/emacs-lisp/cl-extra.el | 2 +- lisp/emacs-lisp/ert.el | 2 +- lisp/emacs-lisp/ewoc.el | 4 ++-- lisp/emacs-lisp/lisp-mode.el | 4 ++-- lisp/emacs-lisp/smie.el | 2 +- lisp/emacs-lisp/tabulated-list.el | 2 +- lisp/emacs-lisp/timer.el | 19 +++++++++++++------ lisp/emulation/viper-cmd.el | 2 +- lisp/files.el | 6 +++--- lisp/format.el | 2 +- lisp/gnus/gnus-srvr.el | 4 ++-- lisp/gnus/gnus-start.el | 2 +- lisp/gnus/mml-sec.el | 6 +++--- lisp/gnus/nnrss.el | 2 +- lisp/hilit-chg.el | 2 +- lisp/ibuf-ext.el | 2 +- lisp/international/ccl.el | 6 +++--- lisp/mail/feedmail.el | 2 +- lisp/net/ange-ftp.el | 2 +- lisp/net/soap-client.el | 4 ++-- lisp/net/soap-inspect.el | 2 +- lisp/obsolete/cust-print.el | 10 +++++----- lisp/obsolete/landmark.el | 12 ++++++------ lisp/obsolete/tls.el | 4 ++-- lisp/obsolete/vip.el | 14 +++++++------- lisp/printing.el | 2 +- lisp/progmodes/cc-cmds.el | 13 ++++++------- lisp/progmodes/cc-mode.el | 2 +- lisp/progmodes/cc-vars.el | 2 +- lisp/progmodes/cperl-mode.el | 6 +++--- lisp/progmodes/ebnf-dtd.el | 2 +- lisp/progmodes/idlw-shell.el | 5 +++-- lisp/progmodes/idlwave.el | 5 ++--- lisp/progmodes/opascal.el | 6 +++--- lisp/progmodes/prolog.el | 4 ++-- lisp/progmodes/sh-script.el | 2 +- lisp/progmodes/sql.el | 4 ++-- lisp/progmodes/verilog-mode.el | 4 ++-- lisp/progmodes/vhdl-mode.el | 19 +++++++++---------- lisp/progmodes/xscheme.el | 2 +- lisp/ps-print.el | 2 +- lisp/textmodes/reftex-global.el | 2 +- lisp/textmodes/reftex-ref.el | 2 +- lisp/textmodes/texnfo-upd.el | 4 ++-- lisp/vc/ediff-mult.el | 2 +- lisp/vc/ediff-util.el | 2 +- lisp/vc/log-edit.el | 2 +- 57 files changed, 132 insertions(+), 127 deletions(-) (limited to 'lisp/emacs-lisp/bytecomp.el') diff --git a/lisp/allout-widgets.el b/lisp/allout-widgets.el index 668e7b91e86..f18d4888543 100644 --- a/lisp/allout-widgets.el +++ b/lisp/allout-widgets.el @@ -880,7 +880,7 @@ encompassing condition-case." ;; reraise the error, or one concerning this function if unexpected: (if (equal mode 'error) (apply #'signal args) - (error "%s: unexpected mode, %s %s" this mode args)))) + (error "%s: Unexpected mode, %s %s" this mode args)))) ;;;_ > allout-widgets-changes-exceed-threshold-p () (defun allout-widgets-adjusting-message (message) "Post MESSAGE when pending are likely to make a big enough delay. diff --git a/lisp/allout.el b/lisp/allout.el index c123e8ded4c..5102ee73412 100644 --- a/lisp/allout.el +++ b/lisp/allout.el @@ -823,12 +823,12 @@ such topics are encrypted.)" :group 'allout-encryption) (make-variable-buffer-local 'allout-encrypt-unencrypted-on-saves) (defvar allout-auto-save-temporarily-disabled nil - "True while topic encryption is pending and auto-saving was active. + "Non-nil while topic encryption is pending and auto-saving was active. The value of `buffer-saved-size' at the time of decryption is used, for restoring when all encryptions are established.") (defvar-local allout-just-did-undo nil - "True just after undo commands, until allout-post-command-business.") + "Non-nil just after undo commands, until allout-post-command-business.") ;;;_ + Developer ;;;_ = allout-developer group @@ -3190,7 +3190,7 @@ Set by `allout-pre-command-business', to support allout addons in coordinating with allout activity.") ;;;_ = allout-this-command-hid-text (defvar-local allout-this-command-hid-text nil - "True if the most recent allout-mode command hid any text.") + "Non-nil if the most recent `allout-mode' command hid any text.") ;;;_ > allout-post-command-business () (defun allout-post-command-business () "Outline `post-command-hook' function. @@ -4787,7 +4787,7 @@ Useful for coherently exposing to a random point in a hidden region." (setq bag-it (1+ bag-it)) (if (> bag-it 1) (error "allout-show-to-offshoot: %s" - "Stumped by aberrant nesting."))) + "Stumped by aberrant nesting"))) (if (> bag-it 0) (setq bag-it 0)) (allout-show-children) (goto-char orig-pref))) @@ -5402,7 +5402,7 @@ Defaults: ;; Specified but not a buffer -- get it: (let ((got (get-buffer frombuf))) (if (not got) - (error "allout-process-exposed: source buffer %s not found." + (error "allout-process-exposed: Source buffer %s not found" frombuf) (setq frombuf got)))) ;; not specified -- default it: diff --git a/lisp/calc/calc-prog.el b/lisp/calc/calc-prog.el index f9dd9eb98a9..3492b6d831b 100644 --- a/lisp/calc/calc-prog.el +++ b/lisp/calc/calc-prog.el @@ -124,7 +124,7 @@ (or (memq (car-safe (car-safe place)) '(error xxxerror)) (setq place (aref (nth 2 (nth 2 (symbol-function 'calc-do))) 27))) (or (memq (car (car place)) '(error xxxerror)) - (error "foo")) + (error "Foo")) (setcar (car place) 'xxxerror)) (error (error "The calc-do function has been modified; unable to patch")))) diff --git a/lisp/cedet/semantic/wisent/python.el b/lisp/cedet/semantic/wisent/python.el index fb878dde712..2eeade66467 100644 --- a/lisp/cedet/semantic/wisent/python.el +++ b/lisp/cedet/semantic/wisent/python.el @@ -118,9 +118,9 @@ curly braces." ;; look-ahead assertions.) (when (and (= (- end start) 2) (looking-at "\"\\{3\\}\\|'\\{3\\}")) - (error "unterminated syntax")) + (error "Unterminated syntax")) (goto-char end)) - (error "unterminated syntax"))) + (error "Unterminated syntax"))) (defun wisent-python-forward-balanced-expression () "Move point to the end of the balanced expression at point. @@ -145,7 +145,7 @@ triple-quoted string syntax." ;; delimiter (backquote) characters, line continuation, and end ;; of comment characters (AKA newline characters in Python). ((zerop (skip-syntax-forward "-w_.$\\>")) - (error "can't figure out how to go forward from here")))) + (error "Can't figure out how to go forward from here")))) ;; Skip closing character. As a last resort this should raise an ;; error if we hit EOB before we find our closing character.. (forward-char 1))) diff --git a/lisp/cedet/srecode/dictionary.el b/lisp/cedet/srecode/dictionary.el index d6dfc58411e..e47a09fd846 100644 --- a/lisp/cedet/srecode/dictionary.el +++ b/lisp/cedet/srecode/dictionary.el @@ -364,7 +364,7 @@ values but STATE is nil." ;; Value is some other object; create a compound value. (t (unless state - (error "Cannot insert compound values without state.")) + (error "Cannot insert compound values without state")) (srecode-dictionary-set-value dict name diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 4b8d2710715..32375ac5253 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -2736,7 +2736,7 @@ This function takes some pains to conform to `ls -lR' output." ;; Check that it is valid to insert DIRNAME with SWITCHES. ;; Signal an error if invalid (e.g. user typed `i' on `..'). (or (file-in-directory-p dirname (expand-file-name default-directory)) - (error "%s: not in this directory tree" dirname)) + (error "%s: Not in this directory tree" dirname)) (let ((real-switches (or switches dired-subdir-switches))) (when real-switches (let (case-fold-search) diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index f620cdbb335..aaacba2c8e5 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el @@ -462,7 +462,7 @@ if `autoload-timestamps' is non-nil, otherwise a fixed fake time is inserted)." (insert "\n" generate-autoload-section-continuation)))))) (defun autoload-find-file (file) - "Fetch file and put it in a temp buffer. Return the buffer." + "Fetch FILE and put it in a temp buffer. Return the buffer." ;; It is faster to avoid visiting the file. (setq file (expand-file-name file)) (with-current-buffer (get-buffer-create " *autoload-file*") @@ -482,10 +482,10 @@ if `autoload-timestamps' is non-nil, otherwise a fixed fake time is inserted)." "File local variable to prevent scanning this file for autoload cookies.") (defun autoload-file-load-name (file outfile) - "Compute the name that will be used to load FILE." - ;; OUTFILE should be the name of the global loaddefs.el file, which - ;; is expected to be at the root directory of the files we're - ;; scanning for autoloads and will be in the `load-path'. + "Compute the name that will be used to load FILE. +OUTFILE should be the name of the global loaddefs.el file, which +is expected to be at the root directory of the files we are +scanning for autoloads and will be in the `load-path'." (let* ((name (file-relative-name file (file-name-directory outfile))) (names '()) (dir (file-name-directory outfile))) diff --git a/lisp/emacs-lisp/avl-tree.el b/lisp/emacs-lisp/avl-tree.el index 4382985eb85..3f803107a17 100644 --- a/lisp/emacs-lisp/avl-tree.el +++ b/lisp/emacs-lisp/avl-tree.el @@ -330,8 +330,7 @@ inserted data." data))) (if (or (funcall cmpfun newdata data) (funcall cmpfun data newdata)) - (error "avl-tree-enter:\ - updated data does not match existing data")) + (error "avl-tree-enter: Updated data does not match existing data")) (setf (avl-tree--node-data br) newdata) (cons nil newdata)) ; return value )))) diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el index 35c80e524cf..da86fa5cecf 100644 --- a/lisp/emacs-lisp/byte-run.el +++ b/lisp/emacs-lisp/byte-run.el @@ -422,7 +422,8 @@ was first made obsolete, for example a date or a release number." &optional docstring) "Set OBSOLETE-NAME's function definition to CURRENT-NAME and mark it obsolete. -\(define-obsolete-function-alias \\='old-fun \\='new-fun \"28.1\" \"old-fun's doc.\") +\(define-obsolete-function-alias \\='old-fun \\='new-fun \"28.1\" \ +\"old-fun's doc.\") is equivalent to the following two lines of code: diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 0856626b7bb..3f050d1b799 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -1082,7 +1082,7 @@ If STR is something like \"Buffer foo.el\", return # (defconst emacs-lisp-compilation-parse-errors-filename-function #'emacs-lisp-compilation-file-name-or-buffer "The value for `compilation-parse-errors-filename-function' for when -we go into emacs-lisp-compilation-mode.") +we go into `emacs-lisp-compilation-mode'.") (defcustom emacs-lisp-compilation-search-path '(nil) "Directories to search for files named in byte-compile error messages. @@ -2810,8 +2810,8 @@ not to take responsibility for the actual compilation of the code." t))))) (defun byte-compile-output-as-comment (exp quoted) - "Print Lisp object EXP in the output file, inside a comment, -and return the file (byte) position it will have. + "Print Lisp object EXP in the output file, inside a comment. +Return the file (byte) position it will have. If QUOTED is non-nil, print with quoting; otherwise, print without quoting." (with-current-buffer byte-compile--outbuffer (let ((position (point))) diff --git a/lisp/emacs-lisp/cl-extra.el b/lisp/emacs-lisp/cl-extra.el index 0ed75475097..499d26b737b 100644 --- a/lisp/emacs-lisp/cl-extra.el +++ b/lisp/emacs-lisp/cl-extra.el @@ -336,7 +336,7 @@ non-nil value. ;;;###autoload (defun cl-isqrt (x) - "Return the integer square root of the (integer) argument." + "Return the integer square root of the (integer) argument X." (if (and (integerp x) (> x 0)) (let ((g (ash 2 (/ (logb x) 2))) g2) diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el index 72fe19461f7..98cb1fd1cf6 100644 --- a/lisp/emacs-lisp/ert.el +++ b/lisp/emacs-lisp/ert.el @@ -262,7 +262,7 @@ DATA is displayed to the user and should state the reason for skipping." ;; See Bug#24402 for why this exists (defun ert--should-signal-hook (error-symbol data) "Stupid hack to stop `condition-case' from catching ert signals. -It should only be stopped when ran from inside ert--run-test-internal." +It should only be stopped when ran from inside `ert--run-test-internal'." (when (and (not (symbolp debugger)) ; only run on anonymous debugger (memq error-symbol '(ert-test-failed ert-test-skipped))) (funcall debugger 'error (cons error-symbol data)))) diff --git a/lisp/emacs-lisp/ewoc.el b/lisp/emacs-lisp/ewoc.el index 68f94edafd9..8636dc92a1c 100644 --- a/lisp/emacs-lisp/ewoc.el +++ b/lisp/emacs-lisp/ewoc.el @@ -49,7 +49,7 @@ ;; ;; Ewoc is a package that implements a connection between an ;; dll (a doubly linked list) and the contents of a buffer. -;; Possible uses are dired (have all files in a list, and show them), +;; Possible uses are Dired (have all files in a list, and show them), ;; buffer-list, kom-prioritize (in the LysKOM elisp client) and ;; others. pcl-cvs.el and vc.el use ewoc.el. ;; @@ -381,7 +381,7 @@ arguments will be passed to MAP-FUNCTION." (defun ewoc-filter (ewoc predicate &rest args) "Remove all elements in EWOC for which PREDICATE returns nil. -Note that the buffer for EWOC will be current-buffer when PREDICATE +Note that the buffer for EWOC will be the current buffer when PREDICATE is called. PREDICATE must restore the current buffer before it returns if it changes it. The PREDICATE is called with the element as its first argument. If any diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index eac3c03cd1e..fc7a7362cd7 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -556,7 +556,7 @@ This will generate compile-time constants from BINDINGS." "Gaudy highlighting from Emacs Lisp mode used in Backtrace mode.") (defun lisp-string-in-doc-position-p (listbeg startpos) - "Return true if a doc string may occur at STARTPOS inside a list. + "Return non-nil if a doc string may occur at STARTPOS inside a list. LISTBEG is the position of the start of the innermost list containing STARTPOS." (let* ((firstsym (and listbeg @@ -589,7 +589,7 @@ containing STARTPOS." (= (point) startpos)))))) (defun lisp-string-after-doc-keyword-p (listbeg startpos) - "Return true if `:documentation' symbol ends at STARTPOS inside a list. + "Return non-nil if `:documentation' symbol ends at STARTPOS inside a list. LISTBEG is the position of the start of the innermost list containing STARTPOS." (and listbeg ; We are inside a Lisp form. diff --git a/lisp/emacs-lisp/smie.el b/lisp/emacs-lisp/smie.el index d775f152b36..8e14faea3a4 100644 --- a/lisp/emacs-lisp/smie.el +++ b/lisp/emacs-lisp/smie.el @@ -1302,7 +1302,7 @@ Only meaningful when called from within `smie-rules-function'." (let ((tok (funcall smie-forward-token-function))) (unless tok (with-demoted-errors - (error "smie-rule-separator: can't skip token %s" + (error "smie-rule-separator: Can't skip token %s" smie--token)))) (skip-chars-forward " ") (unless (eolp) (point))))) diff --git a/lisp/emacs-lisp/tabulated-list.el b/lisp/emacs-lisp/tabulated-list.el index 5210b2be5e0..0ae355e5917 100644 --- a/lisp/emacs-lisp/tabulated-list.el +++ b/lisp/emacs-lisp/tabulated-list.el @@ -256,7 +256,7 @@ Populated by `tabulated-list-init-header'.") (defvar tabulated-list--header-overlay nil) (defun tabulated-list-line-number-width () - "Return the width taken by display-line-numbers in the current buffer." + "Return the width taken by `display-line-numbers' in the current buffer." ;; line-number-display-width returns the value for the selected ;; window, which might not be the window in which the current buffer ;; is displayed. diff --git a/lisp/emacs-lisp/timer.el b/lisp/emacs-lisp/timer.el index 382f6bb1fa3..1ef4931b7be 100644 --- a/lisp/emacs-lisp/timer.el +++ b/lisp/emacs-lisp/timer.el @@ -125,9 +125,12 @@ of SECS seconds since the epoch. SECS may be a fraction." (time-convert (cons (- more-ticks (% more-ticks trunc-s-ticks)) hz))))) (defun timer-relative-time (time secs &optional usecs psecs) - "Advance TIME by SECS seconds and optionally USECS microseconds -and PSECS picoseconds. SECS may be either an integer or a -floating point number." + "Advance TIME by SECS seconds. + +Optionally also advance it by USECS microseconds and PSECS +picoseconds. + +SECS may be either an integer or a floating point number." (let ((delta secs)) (if (or usecs psecs) (setq delta (time-add delta (list 0 0 (or usecs 0) (or psecs 0))))) @@ -138,9 +141,13 @@ floating point number." (time-less-p (timer--time t1) (timer--time t2))) (defun timer-inc-time (timer secs &optional usecs psecs) - "Increment the time set in TIMER by SECS seconds, USECS microseconds, -and PSECS picoseconds. SECS may be a fraction. If USECS or PSECS are -omitted, they are treated as zero." + "Increment the time set in TIMER by SECS seconds. + +Optionally also increment it by USECS microseconds, and PSECS +picoseconds. If USECS or PSECS are omitted, they are treated as +zero. + +SECS may be a fraction." (setf (timer--time timer) (timer-relative-time (timer--time timer) secs usecs psecs))) diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el index 3fcc14c99d7..9f3d515bc6d 100644 --- a/lisp/emulation/viper-cmd.el +++ b/lisp/emulation/viper-cmd.el @@ -3767,7 +3767,7 @@ Null string will repeat previous search." (define-key viper-vi-basic-map (cond ((characterp viper-buffer-search-char) (char-to-string viper-buffer-search-char)) - (t (error "viper-buffer-search-char: wrong value type, %S" + (t (error "viper-buffer-search-char: Wrong value type, %S" viper-buffer-search-char))) #'viper-command-argument) (aset viper-exec-array viper-buffer-search-char #'viper-exec-buffer-search) diff --git a/lisp/files.el b/lisp/files.el index 19b88e6621d..64c69e685c8 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -5597,7 +5597,7 @@ Before and after saving the buffer, this function runs (if (not (file-directory-p dir)) (if (file-exists-p dir) (error "%s is not a directory" dir) - (error "%s: no such directory" dir)) + (error "%s: No such directory" dir)) (if (not (file-exists-p buffer-file-name)) (error "Directory %s write-protected" dir) (if (yes-or-no-p @@ -7948,7 +7948,7 @@ for the specified category of users." ((= char ?g) #o2070) ((= char ?o) #o1007) ((= char ?a) #o7777) - (t (error "%c: bad `who' character" char)))) + (t (error "%c: Bad `who' character" char)))) (defun file-modes-char-to-right (char &optional from) "Convert CHAR to a numeric value of mode bits. @@ -7971,7 +7971,7 @@ If CHAR is in [Xugo], the value is taken from FROM (or 0 if omitted)." (+ gright (/ gright #o10) (* gright #o10)))) ((= char ?o) (let ((oright (logand #o1007 from))) (+ oright (* oright #o10) (* oright #o100)))) - (t (error "%c: bad right character" char)))) + (t (error "%c: Bad right character" char)))) (defun file-modes-rights-to-number (rights who-mask &optional from) "Convert a symbolic mode string specification to an equivalent number. diff --git a/lisp/format.el b/lisp/format.el index 71cf885d417..6c0ba11641e 100644 --- a/lisp/format.el +++ b/lisp/format.el @@ -519,7 +519,7 @@ the value of `foo'." (cdr list) (let ((p list)) (while (not (eq (cdr p) cons)) - (if (null p) (error "format-delq-cons: not an element")) + (if (null p) (error "format-delq-cons: Not an element")) (setq p (cdr p))) ;; Now (cdr p) is the cons to delete (setcdr p (cdr cons)) diff --git a/lisp/gnus/gnus-srvr.el b/lisp/gnus/gnus-srvr.el index 115efa9805e..5f2fc463330 100644 --- a/lisp/gnus/gnus-srvr.el +++ b/lisp/gnus/gnus-srvr.el @@ -570,7 +570,7 @@ The following commands are available: (when (assoc to gnus-server-alist) (error "%s already exists" to)) (unless (gnus-server-to-method from) - (error "%s: no such server" from)) + (error "%s: No such server" from)) (let ((to-entry (cons from (copy-tree (gnus-server-to-method from))))) (setcar to-entry to) @@ -1128,7 +1128,7 @@ Requesting compaction of %s... (this may take a long time)" (customize-set-variable 'gnus-cloud-method server) ;; Note we can't use `Custom-save' here. (when (gnus-yes-or-no-p - (format "The new cloud host server is %S now. Save it? " server)) + (format "The new cloud host server is `%S' now. Save it?" server)) (customize-save-variable 'gnus-cloud-method server))) (when (gnus-yes-or-no-p (format "Upload Cloud data to %S now? " server)) (gnus-message 1 "Uploading all data to Emacs Cloud server %S" server) diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el index e32cfc0d61a..c7be958edd1 100644 --- a/lisp/gnus/gnus-start.el +++ b/lisp/gnus/gnus-start.el @@ -2934,7 +2934,7 @@ SPECIFIC-VARIABLES, or those in `gnus-variable-list'." (nreverse olist))) (defun gnus-gnus-to-newsrc-format (&optional foreign-ok) - (interactive (list (gnus-y-or-n-p "write foreign groups too? "))) + (interactive (list (gnus-y-or-n-p "Write foreign groups too?"))) ;; Generate and save the .newsrc file. (with-current-buffer (create-file-buffer gnus-current-startup-file) (let ((standard-output (current-buffer)) diff --git a/lisp/gnus/mml-sec.el b/lisp/gnus/mml-sec.el index b49793509fc..f72d76ac02b 100644 --- a/lisp/gnus/mml-sec.el +++ b/lisp/gnus/mml-sec.el @@ -238,7 +238,7 @@ You can also customize or set `mml-signencrypt-style-alist' instead." (goto-char (match-end 0)) (apply #'mml-insert-tag 'part (cons (if sign 'sign 'encrypt) (cons method tags)))) - (t (error "The message is corrupted. No mail header separator")))))) + (t (error "The message is corrupted. No mail header separator")))))) (defvar mml-secure-method (if (equal mml-default-encrypt-method mml-default-sign-method) @@ -328,7 +328,7 @@ either an error is raised or not." (unless (yes-or-no-p "Message for encryption contains Bcc header.\ This may give away all Bcc'ed identities to all recipients.\ Are you sure that this is safe?\ - (Customize `mml-secure-safe-bcc-list' to avoid this warning.) ") + (Customize `mml-secure-safe-bcc-list' to avoid this warning.)") (error "Aborted")))))))) ;; defuns that add the proper <#secure ...> tag to the top of the message body @@ -352,7 +352,7 @@ either an error is raised or not." (apply #'mml-insert-tag 'secure 'method method 'mode mode tags))) (t (error - "The message is corrupted. No mail header separator")))) + "The message is corrupted. No mail header separator")))) (when (eql insert-loc (point)) (forward-line 1)))) diff --git a/lisp/gnus/nnrss.el b/lisp/gnus/nnrss.el index 97c9f18a602..0ac57e9e171 100644 --- a/lisp/gnus/nnrss.el +++ b/lisp/gnus/nnrss.el @@ -715,7 +715,7 @@ Read the file and attempt to subscribe to each Feed in the file." (when (and xmlurl (not (string-match "\\`[\t ]*\\'" xmlurl)) (prog1 - (y-or-n-p (format "Subscribe to %s " xmlurl)) + (y-or-n-p (format "Subscribe to %s?" xmlurl)) (message ""))) (condition-case err (progn diff --git a/lisp/hilit-chg.el b/lisp/hilit-chg.el index 8919e982383..d9fab6b8753 100644 --- a/lisp/hilit-chg.el +++ b/lisp/hilit-chg.el @@ -444,7 +444,7 @@ This is the opposite of `hilit-chg-hide-changes'." ;; We set the change property so we can tell this is one ;; of our overlays (so we don't delete someone else's). (overlay-put ov 'hilit-chg t)) - (error "hilit-chg-make-ov: no face for prop: %s" prop)))) + (error "hilit-chg-make-ov: No face for prop: %s" prop)))) (defun hilit-chg-hide-changes (&optional beg end) "Remove face information for Highlight Changes mode. diff --git a/lisp/ibuf-ext.el b/lisp/ibuf-ext.el index 7c95baf8cd9..5b69a878e21 100644 --- a/lisp/ibuf-ext.el +++ b/lisp/ibuf-ext.el @@ -1210,7 +1210,7 @@ Interactively, prompt for NAME, and use the current filters." (_ (let ((type (assq (car qualifier) ibuffer-filtering-alist))) (unless qualifier - (error "Ibuffer: bad qualifier %s" qualifier)) + (error "Ibuffer: Bad qualifier %s" qualifier)) (concat " [" (cadr type) ": " (format "%s]" (cdr qualifier))))))) (defun ibuffer-list-buffer-modes (&optional include-parents) diff --git a/lisp/international/ccl.el b/lisp/international/ccl.el index 9be4d1ee955..629cd4c2879 100644 --- a/lisp/international/ccl.el +++ b/lisp/international/ccl.el @@ -510,7 +510,7 @@ If READ-FLAG is non-nil, this statement has the form (arg (nth 2 condition))) (ccl-check-register rrr cmd) (or (integerp op) - (error "CCL: invalid operator: %s" (nth 1 condition))) + (error "CCL: Invalid operator: %s" (nth 1 condition))) (if (integerp arg) (progn (ccl-embed-code (if read-flag 'read-jump-cond-expr-const @@ -862,7 +862,7 @@ is a list of CCL-BLOCKs." rrr RRR 0) (ccl-embed-symbol Rrr 'translation-hash-table-id)) (t - (error "CCL: non-constant table: %s" cmd) + (error "CCL: Non-constant table: %s" cmd) ;; not implemented: (ccl-check-register Rrr cmd) (ccl-embed-extended-command 'lookup-int rrr RRR 0)))) @@ -882,7 +882,7 @@ is a list of CCL-BLOCKs." rrr RRR 0) (ccl-embed-symbol Rrr 'translation-hash-table-id)) (t - (error "CCL: non-constant table: %s" cmd) + (error "CCL: Non-constant table: %s" cmd) ;; not implemented: (ccl-check-register Rrr cmd) (ccl-embed-extended-command 'lookup-char rrr RRR 0)))) diff --git a/lisp/mail/feedmail.el b/lisp/mail/feedmail.el index 608062fba4e..fe686cb6f86 100644 --- a/lisp/mail/feedmail.el +++ b/lisp/mail/feedmail.el @@ -2020,7 +2020,7 @@ backup file names and the like)." ;; if can't find EOH, this is no message! (unless (feedmail-find-eoh t) (feedmail-say-chatter "Skipping %s; no mail-header-separator" maybe-file) - (error "FQM: you should never see this message")) + (error "FQM: You should never see this message")) (feedmail-say-debug "Prepping %s" maybe-file) ;; the catch is a way out for users to voluntarily skip sending a message (catch 'skip-me-q (funcall feedmail-queue-runner-message-sender arg)) diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index 56a1d76d71a..2585833e1d4 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el @@ -4723,7 +4723,7 @@ NEWNAME should be the name to give the new compressed or uncompressed file.") ;; by using the ftp chmod command. (defun ange-ftp-call-chmod (args) (if (< (length args) 2) - (error "ange-ftp-call-chmod: missing mode and/or filename: %s" args)) + (error "ange-ftp-call-chmod: Missing mode and/or filename: %s" args)) (let ((mode (car args)) (rest (cdr args))) (if (equal "--" (car rest)) diff --git a/lisp/net/soap-client.el b/lisp/net/soap-client.el index 6e10b5c4e30..b4aed279819 100644 --- a/lisp/net/soap-client.el +++ b/lisp/net/soap-client.el @@ -860,7 +860,7 @@ contains a reference, retrieve the type of the reference." (if complex-type (setq type (soap-xs-parse-complex-type (car complex-type))) ;; else - (error "Soap-xs-parse-element: missing type or ref")))))) + (error "soap-xs-parse-element: Missing type or ref")))))) (make-soap-xs-element :name name ;; Use the full namespace name for now, we will @@ -2874,7 +2874,7 @@ decode function to perform the actual decoding." (unless wtype ;; The node has type info encoded in it, but we don't know how to ;; decode it... - (error "Soap-decode-array: node has unknown type: %s" type))) + (error "soap-decode-array: Node has unknown type: %s" type))) (dolist (e contents) (when (consp e) (push (if wtype diff --git a/lisp/net/soap-inspect.el b/lisp/net/soap-inspect.el index 5207ca8ff19..eca338eb22d 100644 --- a/lisp/net/soap-inspect.el +++ b/lisp/net/soap-inspect.el @@ -220,7 +220,7 @@ to its sub elements. If ELEMENT is the WSDL document itself, the entire WSDL can be inspected." (let ((inspect (get (soap-type-of element) 'soap-inspect))) (unless inspect - (error "Soap-inspect: no inspector for element")) + (error "soap-inspect: No inspector for element")) (with-current-buffer (get-buffer-create "*soap-inspect*") (setq buffer-read-only t) diff --git a/lisp/obsolete/cust-print.el b/lisp/obsolete/cust-print.el index 01fcd38199c..897b4015889 100644 --- a/lisp/obsolete/cust-print.el +++ b/lisp/obsolete/cust-print.el @@ -643,11 +643,11 @@ See `custom-format' for the details." (let ((print-circle t)) (or (equal (prin1-to-string circ-list) "#1=(a b [1 2 #1# 4] #1# e f)") - (error "circular object with array printing"))) + (error "Circular object with array printing"))) (let ((print-circle t)) (or (equal (prin1-to-string dotted-circ-list) "#1=(a b c . #1#)") - (error "circular object with array printing"))) + (error "Circular object with array printing"))) (let* ((print-circle t) (x (list 'p 'q)) @@ -655,16 +655,16 @@ See `custom-format' for the details." (setcdr (cdr (cdr (cdr y))) (cdr y)) (or (equal (prin1-to-string y) "((a b) . #1=(#2=(p q) foo #2# . #1#))" ) - (error "circular list example from CL manual"))) + (error "Circular list example from CL manual"))) (let ((print-circle nil)) ;; cl-packages.el is required to print uninterned symbols like #:FOO. ;; (require 'cl-packages) (or (equal (prin1-to-string circ-sym) "(#:FOO #:FOO)") - (error "uninterned symbols in list"))) + (error "Uninterned symbols in list"))) (let ((print-circle t)) (or (equal (prin1-to-string circ-sym) "(#1=FOO #1#)") - (error "circular uninterned symbols in list"))) + (error "Circular uninterned symbols in list"))) (uninstall-custom-print) ) diff --git a/lisp/obsolete/landmark.el b/lisp/obsolete/landmark.el index 83e7649a69c..16c41c76ad2 100644 --- a/lisp/obsolete/landmark.el +++ b/lisp/obsolete/landmark.el @@ -757,9 +757,9 @@ If the game is finished, this command requests for another game." (let ((square (landmark-point-square)) score) (cond ((null square) - (error "Your point is not on a square. Retry!")) + (error "Your point is not on a square. Retry!")) ((not (zerop (aref landmark-board square))) - (error "Your point is not on a free square. Retry!")) + (error "Your point is not on a free square. Retry!")) (t (setq score (aref landmark-score-table square)) (landmark-play-move square 1) @@ -823,14 +823,14 @@ If the game is finished, this command requests for another game." (defun landmark-prompt-for-other-game () "Ask for another game, and start it." (if (y-or-n-p "Another game? ") - (if (y-or-n-p "Retain learned weights ") + (if (y-or-n-p "Retain learned weights?") (landmark 2) (landmark 1)) (message "Chicken!"))) (defun landmark-offer-a-draw () "Offer a draw and return t if Human accepted it." - (or (y-or-n-p "I offer you a draw. Do you accept it? ") + (or (y-or-n-p "I offer you a draw. Do you accept it?") (not (setq landmark-human-refused-draw t)))) @@ -1512,9 +1512,9 @@ If the game is finished, this command requests for another game." (t (let ((square (landmark-point-square))) (cond ((null square) - (error "Your point is not on a square. Retry!")) + (error "Your point is not on a square. Retry!")) ((not (zerop (aref landmark-board square))) - (error "Your point is not on a free square. Retry!")) + (error "Your point is not on a free square. Retry!")) (t (progn (landmark-plot-square square 1) diff --git a/lisp/obsolete/tls.el b/lisp/obsolete/tls.el index 5cba18d7897..ff01008613b 100644 --- a/lisp/obsolete/tls.el +++ b/lisp/obsolete/tls.el @@ -260,14 +260,14 @@ Fourth arg PORT is an integer specifying a port to connect to." NOT trusted." host)) (not (yes-or-no-p (format-message "\ -The certificate presented by `%s' is NOT trusted. Accept anyway? " host))))) +The certificate presented by `%s' is NOT trusted. Accept anyway?" host))))) (and tls-hostmismatch (save-excursion (goto-char (point-min)) (re-search-forward tls-hostmismatch nil t)) (not (yes-or-no-p (format "Host name in certificate doesn't \ -match `%s'. Connect anyway? " host)))))) +match `%s'. Connect anyway?" host)))))) (setq done nil) (delete-process process)) ;; Delete all the informational messages that could confuse diff --git a/lisp/obsolete/vip.el b/lisp/obsolete/vip.el index 16906b68a67..2fa8c951531 100644 --- a/lisp/obsolete/vip.el +++ b/lisp/obsolete/vip.el @@ -615,11 +615,11 @@ obtained so far, and COM is the command part obtained so far." (cond ((null arg) nil) ((consp arg) (car arg)) ((numberp arg) arg) - (t (error "strange arg"))) + (t (error "Strange arg"))) (cond ((null arg) nil) ((consp arg) (cdr arg)) ((numberp arg) nil) - (t (error "strange arg")))) + (t (error "Strange arg")))) (quit (setq vip-use-register nil) (signal 'quit nil)))) @@ -2248,7 +2248,7 @@ a token has type \(command, address, end-mark) and value." (setq ex-token-type "end-mark") (setq ex-token "goto")) (t - (error "invalid token"))))) + (error "Invalid token"))))) (defun vip-ex (&optional string) "ex commands within VIP." @@ -2333,7 +2333,7 @@ a token has type \(command, address, end-mark) and value." (cond ((looking-at "[a-z]") (vip-get-ex-com-subr) (if (string= ex-token-type "non-command") - (error "%s: not an editor command" ex-token))) + (error "%s: Not an editor command" ex-token))) ((looking-at "[!=><&~]") (setq ex-token (char-to-string (following-char))) (forward-char 1)) @@ -2378,7 +2378,7 @@ a token has type \(command, address, end-mark) and value." (progn (setq ex-flag t) (setq cont nil)) - (error "address expected"))) + (error "Address expected"))) ((string= ex-token-type "end-mark") (setq cont nil)) ((string= ex-token-type "whole") @@ -2568,7 +2568,7 @@ a token has type \(command, address, end-mark) and value." (string= ex-token "insert") (string= ex-token "open") ) - (error "%s: no such command from VIP" ex-token)) + (error "%s: No such command from VIP" ex-token)) ((or (string= ex-token "abbreviate") (string= ex-token "list") (string= ex-token "next") @@ -2581,7 +2581,7 @@ a token has type \(command, address, end-mark) and value." (string= ex-token "xit") (string= ex-token "z") ) - (error "%s: not implemented in VIP" ex-token)) + (error "%s: Not implemented in VIP" ex-token)) (t (error "%s: Not an editor command" ex-token)))) (defun ex-goto () diff --git a/lisp/printing.el b/lisp/printing.el index fb718f9aa62..dfa5a6ef761 100644 --- a/lisp/printing.el +++ b/lisp/printing.el @@ -5133,7 +5133,7 @@ If menu binding was not done, calls `pr-menu-bind'." (and (eq (symbol-value infile-sym) t) (set infile-sym (pr-ps-infile-preprint prompt))) (or (symbol-value infile-sym) - (error "%s: input PostScript file name is missing" prompt)) + (error "%s: Input PostScript file name is missing" prompt)) ;; output file (and (eq (symbol-value outfile-sym) t) (set outfile-sym (and current-prefix-arg diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el index d40433a9b0d..a9a52636b78 100644 --- a/lisp/progmodes/cc-cmds.el +++ b/lisp/progmodes/cc-cmds.el @@ -64,7 +64,6 @@ point is used to decide where the old indentation is on a lines that is otherwise empty (ignoring any line continuation backslash), but that's not done if IGNORE-POINT-POS is non-nil. Returns the amount of indentation change \(in columns)." - (let ((line-cont-backslash (save-excursion (end-of-line) (eq (char-before) ?\\))) @@ -2058,9 +2057,9 @@ the open-parenthesis that starts a defun; see `beginning-of-defun'." (= arg 0)))) (defun c-defun-name-1 () - "Return the name of the current defun, at the current narrowing, -or nil if there isn't one. \"Defun\" here means a function, or -other top level construct with a brace block." + "Return name of current defun, at current narrowing, or nil if there isn't one. +\"Defun\" here means a function, or other top level construct +with a brace block." (c-save-buffer-state (beginning-of-defun-function end-of-defun-function where pos decl0 decl type-pos tag-pos case-fold-search) @@ -3655,9 +3654,9 @@ continuation backslashes, unless `c-auto-align-backslashes' is nil." (set-marker here nil)))) (defun c-indent-region (start end &optional quiet) - "Indent syntactically every line whose first char is between START -and END inclusive. If the optional argument QUIET is non-nil then no -syntactic errors are reported, even if `c-report-syntactic-errors' is + "Indent syntactically lines whose first char is between START and END inclusive. +If the optional argument QUIET is non-nil then no syntactic +errors are reported, even if `c-report-syntactic-errors' is non-nil." (save-excursion (goto-char end) diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 8b302414496..c9b7a95df60 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el @@ -1402,7 +1402,7 @@ Note that the style variables are always made local to the buffer." (memq (char-after) c-string-delims)) (c-clear-syn-tab (point))))) (c-clear-syn-tab (point))) - (t (c-benign-error "c-remove-string-fences: wrong position"))))) + (t (c-benign-error "c-remove-string-fences: Wrong position"))))) (defun c-before-change-check-unbalanced-strings (beg end) ;; If BEG or END is inside an unbalanced string, remove the syntax-table diff --git a/lisp/progmodes/cc-vars.el b/lisp/progmodes/cc-vars.el index 8869c565737..d843c783ed0 100644 --- a/lisp/progmodes/cc-vars.el +++ b/lisp/progmodes/cc-vars.el @@ -1770,7 +1770,7 @@ variables.") ; all XEmacsen. ((null c-macro-names-with-semicolon) nil) - (t (error "c-make-macro-with-semi-re: invalid \ + (t (error "c-make-macro-with-semi-re: Invalid \ c-macro-names-with-semicolon: %s" c-macro-names-with-semicolon)))))) diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index c371a84b9d2..1afeb60ac5f 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -507,9 +507,9 @@ Currently used with `cperl-check-syntax' only." :group 'cperl-help-system) (defcustom cperl-indent-region-fix-constructs 1 - "Amount of space to insert between `}' and `else' or `elsif' -in `cperl-indent-region'. Set to nil to leave as is. Values other -than 1 and nil will probably not work." + "Amount of space to insert between `}' and `else' or `elsif'. +Used by `cperl-indent-region'. Set to nil to leave as is. +Values other than 1 and nil will probably not work." :type '(choice (const nil) (const 1)) :group 'cperl-indentation-details) diff --git a/lisp/progmodes/ebnf-dtd.el b/lisp/progmodes/ebnf-dtd.el index 9185711848c..d4bfdaa9957 100644 --- a/lisp/progmodes/ebnf-dtd.el +++ b/lisp/progmodes/ebnf-dtd.el @@ -62,7 +62,7 @@ ;; ;; Document authors are encouraged to avoid "compatibility characters", as ;; defined in section 6.8 of [Unicode] (see also D21 in section 3.6 of -;; [Unicode3]). The characters defined in the following ranges are also +;; [Unicode3]). The characters defined in the following ranges are also ;; discouraged. They are either control characters or permanently undefined ;; Unicode characters: ;; diff --git a/lisp/progmodes/idlw-shell.el b/lisp/progmodes/idlw-shell.el index fc3d603f066..5a31ad35087 100644 --- a/lisp/progmodes/idlw-shell.el +++ b/lisp/progmodes/idlw-shell.el @@ -105,8 +105,9 @@ process buffer." :type 'regexp) (defcustom idlwave-shell-process-name "idl" - "Name to be associated with the IDL process. The buffer for the -process output is made by surrounding this name with `*'s." + "Name to be associated with the IDL process. +The buffer for the process output is made by surrounding this +name with `*'s." :group 'idlwave-shell-general-setup :type 'string) diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el index 4224e47d16d..9aaabd8a0e1 100644 --- a/lisp/progmodes/idlwave.el +++ b/lisp/progmodes/idlwave.el @@ -245,7 +245,7 @@ would yield: :type 'boolean) (defcustom idlwave-indent-parens-nested nil - "Non-nil means, indent continuation lines with parens by nesting + "Non-nil means indent continuation lines with parens by nesting lines at consecutively deeper levels." :group 'idlwave-code-formatting :type 'boolean) @@ -7286,8 +7286,7 @@ The list is cached in `idlwave-class-info' for faster access." inherits)) (if (> (cdr cl) 999) (error - "Class scan: inheritance depth exceeded. Circular inheritance?") - )) + "Class scan: inheritance depth exceeded. Circular inheritance?"))) (setq all-inherits (nreverse rtn)) (nconc info (list (cons 'all-inherits all-inherits))) all-inherits)))))) diff --git a/lisp/progmodes/opascal.el b/lisp/progmodes/opascal.el index e55b09d8fcf..495c77bbd90 100644 --- a/lisp/progmodes/opascal.el +++ b/lisp/progmodes/opascal.el @@ -1540,7 +1540,7 @@ If no extension is specified, .pas is assumed. Creates a buffer for the unit." (defun opascal-find-current-def () "Find the definition of the identifier under the current point." (interactive) - (error "opascal-find-current-def: not implemented yet")) + (error "opascal-find-current-def: Not implemented yet")) (defun opascal-find-current-xdef () "Find the definition of the identifier under the current point, searching @@ -1548,13 +1548,13 @@ in external units if necessary (as listed in the current unit's use clause). The set of directories to search for a unit is specified by the global variable `opascal-search-path'." (interactive) - (error "opascal-find-current-xdef: not implemented yet")) + (error "opascal-find-current-xdef: Not implemented yet")) (defun opascal-find-current-body () "Find the body of the identifier under the current point, assuming it is a routine." (interactive) - (error "opascal-find-current-body: not implemented yet")) + (error "opascal-find-current-body: Not implemented yet")) (defun opascal-fill-comment () "Fill the text of the current comment, according to `fill-column'. diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el index 74a023775f8..59004e413eb 100644 --- a/lisp/progmodes/prolog.el +++ b/lisp/progmodes/prolog.el @@ -512,7 +512,7 @@ to automatically indent if-then-else constructs." :type 'boolean) (defcustom prolog-electric-colon-flag nil - "Makes `:' electric (inserts `:-' on a new line). + "Non-nil means make `:' electric (inserts `:-' on a new line). If non-nil, pressing `:' at the end of a line that starts in the first column (i.e., clause heads) inserts ` :-' and newline." :version "24.1" @@ -520,7 +520,7 @@ the first column (i.e., clause heads) inserts ` :-' and newline." :type 'boolean) (defcustom prolog-electric-dash-flag nil - "Makes `-' electric (inserts a `-->' on a new line). + "Non-nil means make `-' electric (inserts a `-->' on a new line). If non-nil, pressing `-' at the end of a line that starts in the first column (i.e., DCG heads) inserts ` -->' and newline." :version "24.1" diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 3b6774aa14c..0dd9f2b4fa2 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -2522,7 +2522,7 @@ overwritten if sh-styles-alist nil t))) (let ((sl (assoc name sh-styles-alist))) (if (null sl) - (error "sh-load-style - style %s not known" name) + (error "sh-load-style: Style %s not known" name) (dolist (var (cdr sl)) (set (car var) (cdr var)))))) diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index 02eccb33012..5dfbf87e452 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el @@ -3976,13 +3976,13 @@ for each match." (cond ((numberp c) (match-string c)) ((stringp c) (match-substitute-replacement c)) - (t (error "sql-redirect-value: unknown REGEXP-GROUPS value - %s" c)))) + (t (error "sql-redirect-value: Unknown REGEXP-GROUPS value - %s" c)))) regexp-groups)) ;; String is specified; return replacement string ((stringp regexp-groups) (match-substitute-replacement regexp-groups)) (t - (error "sql-redirect-value: unknown REGEXP-GROUPS value - %s" + (error "sql-redirect-value: Unknown REGEXP-GROUPS value - %s" regexp-groups))) results))) diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el index d98230d9a0e..52c34d9fbc6 100644 --- a/lisp/progmodes/verilog-mode.el +++ b/lisp/progmodes/verilog-mode.el @@ -87,7 +87,7 @@ ;; ;; If you want to customize Verilog mode to fit your needs better, ;; you may add the below lines (the values of the variables presented -;; here are the defaults). Note also that if you use an Emacs that +;; here are the defaults). Note also that if you use an Emacs that ;; supports custom, it's probably better to use the custom menu to ;; edit these. If working as a member of a large team these settings ;; should be common across all users (in a site-start file), or set @@ -4827,7 +4827,7 @@ Limit search to point LIM." ((match-end 1) ; [ (setq colon (1+ colon)) (if (>= colon 0) - (error "%s: unbalanced [" (verilog-point-text)))) + (error "%s: Unbalanced [" (verilog-point-text)))) ((match-end 2) ; ] (setq colon (1- colon))) diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el index fc0d406f73c..3a9185b334f 100644 --- a/lisp/progmodes/vhdl-mode.el +++ b/lisp/progmodes/vhdl-mode.el @@ -5917,16 +5917,16 @@ Skip backwards if DIRECTION is negative, skip forward otherwise." ;; Functions to help finding the correct indentation column: (defun vhdl-first-word (point) - "If the keyword at POINT is at boi, then return (current-column) at -that point, else nil." + "If the keyword at POINT is at boi, return (current-column) at that point. +Otherwise return nil." (save-excursion (and (goto-char point) (eq (point) (vhdl-point 'boi)) (current-column)))) (defun vhdl-last-word (point) - "If the keyword at POINT is at eoi, then return (current-column) at -that point, else nil." + "If keyword at POINT is at eoi, then return (current-column) at that point. +Otherwise, return nil." (save-excursion (and (goto-char point) (save-excursion (or (eq (progn (forward-sexp) (point)) @@ -6266,13 +6266,11 @@ of an identifier that just happens to contain an \"end\" keyword." (defconst vhdl-statement-fwd-re "\\b\\(if\\|for\\|while\\|loop\\)\\b\\([^_]\\|\\'\\)" - "A regular expression for searching forward that matches all known -\"statement\" keywords.") + "Regexp for searching forward that matches all known \"statement\" keywords.") (defconst vhdl-statement-bwd-re "\\b\\(if\\|for\\|while\\|loop\\)\\b[^_]" - "A regular expression for searching backward that matches all known -\"statement\" keywords.") + "Regexp for searching backward that matches all known \"statement\" keywords.") (defun vhdl-statement-p (&optional _lim) "Return t if we are looking at a real \"statement\" keyword. @@ -6723,8 +6721,9 @@ search, and an argument indicating an interactive call." vhdl-begin-bwd-re "\\|" vhdl-statement-bwd-re)) (defun vhdl-beginning-of-statement-1 (&optional lim) - "Move to the start of the current statement, or the previous -statement if already at the beginning of one." + "Move to the start of the current statement. +If already at the beginning of a statement, move to the start of +the previous statement instead." (let ((lim (or lim (point-min))) (here (point)) (pos (point)) diff --git a/lisp/progmodes/xscheme.el b/lisp/progmodes/xscheme.el index 1874f2698ae..26ffe33b83e 100644 --- a/lisp/progmodes/xscheme.el +++ b/lisp/progmodes/xscheme.el @@ -562,7 +562,7 @@ The strings are concatenated and terminated by a newline." (defun xscheme-yank (&optional arg) "Insert the most recent expression at point. -With just C-U as argument, same but put point in front (and mark at end). +With just \\[universal-argument] as argument, same but put point in front (and mark at end). With argument n, reinsert the nth most recently sent expression. See also the commands \\[xscheme-yank-pop] and \\[xscheme-yank-push]." (interactive "*P") diff --git a/lisp/ps-print.el b/lisp/ps-print.el index 1f4ed4e44d7..b1d03fda1d4 100644 --- a/lisp/ps-print.el +++ b/lisp/ps-print.el @@ -3878,7 +3878,7 @@ Note: No major/minor-mode is activated and no local variables are evaluated for (with-temp-buffer (insert-file-contents filename) (buffer-string)) - (error "ps-print PostScript prologue `%s' file was not found" + (error "ps-print: PostScript prologue `%s' file was not found" filename)))) diff --git a/lisp/textmodes/reftex-global.el b/lisp/textmodes/reftex-global.el index cc8b3244b99..b90c21339cc 100644 --- a/lisp/textmodes/reftex-global.el +++ b/lisp/textmodes/reftex-global.el @@ -348,7 +348,7 @@ Also checks if buffers visiting the files are in read-only mode." (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-ref.el b/lisp/textmodes/reftex-ref.el index a5d83c34d67..15d86b359cc 100644 --- a/lisp/textmodes/reftex-ref.el +++ b/lisp/textmodes/reftex-ref.el @@ -230,7 +230,7 @@ This function is controlled by the settings of reftex-insert-label-flags." (symbol-value reftex-docstruct-symbol))) (ding) (if (y-or-n-p - (format-message "Label `%s' exists. Use anyway? " label)) + (format-message "Label `%s' exists. Use anyway?" label)) (setq valid t))) ;; Label is ok diff --git a/lisp/textmodes/texnfo-upd.el b/lisp/textmodes/texnfo-upd.el index 843bbb2bca7..6862da60464 100644 --- a/lisp/textmodes/texnfo-upd.el +++ b/lisp/textmodes/texnfo-upd.el @@ -1508,7 +1508,7 @@ will be at some level higher in the Texinfo file. The fourth argument 'normal 'no-pointer)) (t - (error "texinfo-find-pointer: lack proper arguments"))))) + (error "texinfo-find-pointer: Lack proper arguments"))))) (defun texinfo-pointer-name (kind) "Return the node name preceding the section command. @@ -1676,7 +1676,7 @@ or `Up' pointer." 'normal 'no-pointer)) (t - (error "texinfo-sequential-find-pointer: lack proper arguments"))))) + (error "texinfo-sequential-find-pointer: Lack proper arguments"))))) ;;; Inserting `@node' lines diff --git a/lisp/vc/ediff-mult.el b/lisp/vc/ediff-mult.el index fa26b0b32f9..bec0ec01208 100644 --- a/lisp/vc/ediff-mult.el +++ b/lisp/vc/ediff-mult.el @@ -1677,7 +1677,7 @@ With prefix arg UNHIDE, unhide instead." (setq custom-diff-buf ediff-custom-diff-buffer))))) (or (ediff-buffer-live-p meta-diff-buff) - (user-error "Ediff: something wrong--killed multiple diff's buffer")) + (user-error "Ediff: Something wrong--killed multiple diff's buffer")) (cond ((ediff-buffer-live-p custom-diff-buf) ;; for live session buffers we do them first because the user may diff --git a/lisp/vc/ediff-util.el b/lisp/vc/ediff-util.el index 9016d1df5c4..7c36291eea1 100644 --- a/lisp/vc/ediff-util.el +++ b/lisp/vc/ediff-util.el @@ -3220,7 +3220,7 @@ Hit \\[ediff-recenter] to reset the windows afterward." (if (buffer-modified-p) ;; If buffer is not obsolete and is modified, offer to save (if (yes-or-no-p - (format "Buffer %s has been modified. Save it in file %s? " + (format "Buffer %s has been modified. Save it in file %s?" (buffer-name) buffer-file-name)) (condition-case nil diff --git a/lisp/vc/log-edit.el b/lisp/vc/log-edit.el index e0a87ba941c..4d151d555cc 100644 --- a/lisp/vc/log-edit.el +++ b/lisp/vc/log-edit.el @@ -891,7 +891,7 @@ name or time." Actually, the narrowed region doesn't include the date line. A \"page\" in a ChangeLog file is the area between two dates." (or (eq major-mode 'change-log-mode) - (error "log-edit-narrow-changelog: current buffer isn't a ChangeLog")) + (error "log-edit-narrow-changelog: Current buffer isn't a ChangeLog")) (goto-char (point-min)) -- cgit v1.2.3 From 913a7d30a33f7faa1a98e7dffd10159b1d2a6b97 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Wed, 13 Oct 2021 19:00:25 +0200 Subject: Allow inhibiting `not-unused' warnings * lisp/emacs-lisp/bytecomp.el (byte-compile-warning-types): Allow inhibiting the `not-unused' warning (bug#31641). (There has been some discussion about removing the `not-unused' warning, but it's still in there, so making it possible to inhibit it seems like the right thing to do.) * lisp/emacs-lisp/cconv.el (cconv--analyze-use): Don't warn about `not-unused'. --- lisp/emacs-lisp/bytecomp.el | 3 ++- lisp/emacs-lisp/cconv.el | 7 +++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'lisp/emacs-lisp/bytecomp.el') diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 3f050d1b799..471a0b623ad 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -299,7 +299,7 @@ The information is logged to `byte-compile-log-buffer'." '(redefine callargs free-vars unresolved obsolete noruntime interactive-only make-local mapcar constants suspicious lexical lexical-dynamic - docstrings) + docstrings not-unused) "The list of warning types used when `byte-compile-warnings' is t.") (defcustom byte-compile-warnings t "List of warnings that the byte-compiler should issue (t for all). @@ -321,6 +321,7 @@ Elements of the list may be: lexically bound variable declared dynamic elsewhere make-local calls to `make-variable-buffer-local' that may be incorrect. mapcar mapcar called for effect. + not-unused warning about using variables with symbol names starting with _. constants let-binding of, or assignment to, constants/nonvariables. docstrings docstrings that are too wide (longer than `byte-compile-docstring-max-column' or diff --git a/lisp/emacs-lisp/cconv.el b/lisp/emacs-lisp/cconv.el index 0a6b04b4c1f..03e109f2508 100644 --- a/lisp/emacs-lisp/cconv.el +++ b/lisp/emacs-lisp/cconv.el @@ -608,10 +608,9 @@ FORM is the parent form that binds this var." (`((,(and var (guard (eq ?_ (aref (symbol-name var) 0)))) . ,_) ,_ ,_ ,_ ,_) ;; FIXME: Convert this warning to use `macroexp--warn-wrap' - ;; so as to give better position information and obey - ;; `byte-compile-warnings'. - (byte-compile-warn - "%s `%S' not left unused" varkind var)) + ;; so as to give better position information. + (when (byte-compile-warning-enabled-p 'not-unused var) + (byte-compile-warn "%s `%S' not left unused" varkind var))) ((and (let (or 'let* 'let) (car form)) `((,var) ;; (or `(,var nil) : Too many false positives: bug#47080 t nil ,_ ,_)) -- cgit v1.2.3