From 251dea693a4e5d1c33257ab3402734a8067049ec Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sun, 7 Mar 2021 19:00:47 -0500 Subject: * lisp/emacs-lisp/bytecomp.el: Warn about unprefixed vars in `boundp` (byte-compile--check-prefixed-var): New fun, extracted from `byte-compile--declare-var`. (byte-compile--declare-var): Use it. (byte-compile-maybe-guarded): Use it as well. --- lisp/emacs-lisp/bytecomp.el | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'lisp/emacs-lisp') diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 4e00fe6121e..74eb5b0377f 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -2497,12 +2497,14 @@ list that represents a doc string reference. (put 'defvar 'byte-hunk-handler 'byte-compile-file-form-defvar) (put 'defconst 'byte-hunk-handler 'byte-compile-file-form-defvar) -(defun byte-compile--declare-var (sym) +(defun byte-compile--check-prefixed-var (sym) (when (and (symbolp sym) (not (string-match "[-*/:$]" (symbol-name sym))) (byte-compile-warning-enabled-p 'lexical sym)) - (byte-compile-warn "global/dynamic var `%s' lacks a prefix" - sym)) + (byte-compile-warn "global/dynamic var `%s' lacks a prefix" sym))) + +(defun byte-compile--declare-var (sym) + (byte-compile--check-prefixed-var sym) (when (memq sym byte-compile-lexical-variables) (setq byte-compile-lexical-variables (delq sym byte-compile-lexical-variables)) @@ -4184,9 +4186,15 @@ that suppresses all warnings during execution of BODY." byte-compile-unresolved-functions)) (bound-list (byte-compile-find-bound-condition ,condition '(boundp default-boundp local-variable-p))) + (new-bound-list + ;; (seq-difference byte-compile-bound-variables)) + (delq nil (mapcar (lambda (s) + (if (memq s byte-compile-bound-variables) nil s)) + bound-list))) ;; Maybe add to the bound list. (byte-compile-bound-variables - (append bound-list byte-compile-bound-variables))) + (append new-bound-list byte-compile-bound-variables))) + (mapc #'byte-compile--check-prefixed-var new-bound-list) (unwind-protect ;; If things not being bound at all is ok, so must them being ;; obsolete. Note that we add to the existing lists since Tramp -- cgit v1.2.3 From 0e4a2dca836b52740ead29d5ff6436d938d17a78 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Mon, 8 Mar 2021 05:09:27 +0100 Subject: Normalize version specifiers for make-obsolete and friends * lisp/auth-source.el (auth-source-forget-user-or-password) (auth-source-user-or-password, auth-source-hide-passwords): * lisp/calendar/icalendar.el (icalendar--datetime-to-noneuropean-date): * lisp/cedet/semantic/db-el.el (semanticdb-elisp-sym-function-arglist): * lisp/emacs-lisp/debug.el (debugger-insert-backtrace): * lisp/obsolete/nnir.el (nnir-swish-e-index-file): * lisp/obsolete/starttls.el (starttls-any-program-available): Normalize version specifiers for make-obsolete and friends. --- lisp/auth-source.el | 6 +++--- lisp/calendar/icalendar.el | 2 +- lisp/cedet/semantic/db-el.el | 6 +++--- lisp/emacs-lisp/debug.el | 2 +- lisp/obsolete/nnir.el | 2 +- lisp/obsolete/starttls.el | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) (limited to 'lisp/emacs-lisp') diff --git a/lisp/auth-source.el b/lisp/auth-source.el index 14cae8a52c7..2516b4b9fae 100644 --- a/lisp/auth-source.el +++ b/lisp/auth-source.el @@ -162,7 +162,7 @@ let-binding." (defvar auth-source-creation-prompts nil "Default prompts for token values. Usually let-bound.") -(make-obsolete 'auth-source-hide-passwords nil "Emacs 24.1") +(make-obsolete 'auth-source-hide-passwords nil "24.1") (defcustom auth-source-save-behavior 'ask "If set, auth-source will respect it for save behavior." @@ -2307,9 +2307,9 @@ See `auth-source-search' for details on SPEC." ;; deprecate the old interface (make-obsolete 'auth-source-user-or-password - 'auth-source-search "Emacs 24.1") + 'auth-source-search "24.1") (make-obsolete 'auth-source-forget-user-or-password - 'auth-source-forget "Emacs 24.1") + 'auth-source-forget "24.1") (defun auth-source-user-or-password (mode host port &optional username create-missing delete-existing) diff --git a/lisp/calendar/icalendar.el b/lisp/calendar/icalendar.el index dafdd418d0d..0b6ff560424 100644 --- a/lisp/calendar/icalendar.el +++ b/lisp/calendar/icalendar.el @@ -774,7 +774,7 @@ American format: \"month day year\"." nil)) (define-obsolete-function-alias 'icalendar--datetime-to-noneuropean-date - 'icalendar--datetime-to-american-date "icalendar 0.19") + 'icalendar--datetime-to-american-date "23.1") (defun icalendar--datetime-to-european-date (datetime &optional separator) "Convert the decoded DATETIME to European format. diff --git a/lisp/cedet/semantic/db-el.el b/lisp/cedet/semantic/db-el.el index 4699e722c1a..de84b978026 100644 --- a/lisp/cedet/semantic/db-el.el +++ b/lisp/cedet/semantic/db-el.el @@ -195,9 +195,6 @@ If Emacs cannot resolve this symbol to a particular file, then return nil." (when tab (cons tab match)))))) (autoload 'help-function-arglist "help-fns") -(defalias 'semanticdb-elisp-sym-function-arglist 'help-function-arglist) -(make-obsolete 'semanticdb-elisp-sym-function-arglist - 'help-function-arglist "CEDET 1.1") (defun semanticdb-elisp-sym->tag (sym &optional toktype) "Convert SYM into a semantic tag. @@ -347,6 +344,9 @@ Return a list of tags." ) taglst)))) +(define-obsolete-function-alias 'semanticdb-elisp-sym-function-arglist + #'help-function-arglist "24.3") + (provide 'semantic/db-el) ;;; semantic/db-el.el ends here diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index d9da0db4551..b2d54c77feb 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el @@ -321,7 +321,7 @@ the debugger will not be entered." (make-obsolete 'debugger-insert-backtrace "use a `backtrace-mode' buffer or `backtrace-to-string'." - "Emacs 27.1") + "27.1") (defun debugger-insert-backtrace (frames do-xrefs) "Format and insert the backtrace FRAMES at point. diff --git a/lisp/obsolete/nnir.el b/lisp/obsolete/nnir.el index 337d83ccca1..7d7e88184c4 100644 --- a/lisp/obsolete/nnir.el +++ b/lisp/obsolete/nnir.el @@ -279,7 +279,7 @@ that it is for swish++, not Namazu." ;; `nnir-swish-e-additional-switches' (make-obsolete-variable 'nnir-swish-e-index-file - 'nnir-swish-e-index-files "Emacs 23.1") + 'nnir-swish-e-index-files "23.1") (defcustom nnir-swish-e-index-file (expand-file-name "~/Mail/index.swish-e") "Index file for swish-e. diff --git a/lisp/obsolete/starttls.el b/lisp/obsolete/starttls.el index 0ca486324fd..926248db9af 100644 --- a/lisp/obsolete/starttls.el +++ b/lisp/obsolete/starttls.el @@ -288,7 +288,7 @@ GnuTLS requires a port number." starttls-program)))) (define-obsolete-function-alias 'starttls-any-program-available - #'starttls-available-p "2011-08-02") + #'starttls-available-p "24.1") (provide 'starttls) -- cgit v1.2.3 From a01166562cec3f97e722b627cf5db8ef49338cde Mon Sep 17 00:00:00 2001 From: Mauro Aranda Date: Mon, 8 Mar 2021 08:11:38 -0300 Subject: Make checkdoc--next-docstring use the doc-string-elt property This follows from a fix for Bug#46918 and a discussion to use doc-string-elt: https://lists.gnu.org/archive/html/emacs-devel/2021-03/msg00232.html * lisp/emacs-lisp/checkdoc.el (checkdoc--next-docstring): Check for a non-nil doc-string-elt property, instead of hard-coding the supported symbols. Use that property to position point at the doc-string. --- lisp/emacs-lisp/checkdoc.el | 33 +++++++++------------------------ 1 file changed, 9 insertions(+), 24 deletions(-) (limited to 'lisp/emacs-lisp') diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index 213ab43184f..ee2e77480d5 100644 --- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el @@ -931,35 +931,20 @@ don't move point." ;; Don't bug out if the file is empty (or a ;; definition ends prematurely. (end-of-file))) - (`(,(or 'defun 'defvar 'defcustom 'defmacro 'defconst 'defsubst 'defadvice - 'cl-defun 'cl-defgeneric 'cl-defmacro) + (`(,(and (pred symbolp) def + (let (and doc (guard doc)) (function-get def 'doc-string-elt))) ,(pred symbolp) ;; Require an initializer, i.e. ignore single-argument `defvar' ;; forms, which never have a doc string. ,_ . ,_) (down-list) - ;; Skip over function or macro name, symbol to be defined, and - ;; initializer or argument list. - (forward-sexp 3) - (skip-chars-forward " \n\t") - t) - (`(,'cl-defmethod - ,(pred symbolp) - . ,rest) - (down-list) - (forward-sexp (pcase (car rest) - ;; No qualifier, so skip like we would have skipped in - ;; the first clause of the outer `pcase'. - ((pred listp) 3) - (':extra - ;; Skip the :extra qualifier together with its string too. - ;; Skip any additional qualifier. - (if (memq (nth 2 rest) '(:around :before :after)) - 6 - 5)) - ;; Skip :before, :after or :around qualifier too. - ((or ':around ':before ':after) - 4))) + ;; Skip over function or macro name. + (forward-sexp 1) + ;; And now skip until the docstring. + (forward-sexp (1- ; We already skipped the function or macro name. + (cond + ((numberp doc) doc) + ((functionp doc) (funcall doc))))) (skip-chars-forward " \n\t") t))) -- cgit v1.2.3 From f4452bb8140cb7485be0a529afc91476becb5d91 Mon Sep 17 00:00:00 2001 From: Philipp Stephani Date: Mon, 8 Mar 2021 14:30:24 +0100 Subject: Fix structure of condition object in nested 'ert-fail'. See the test 'ert-test-fail' for the expected structure. * lisp/emacs-lisp/ert.el (ert--should-signal-hook): Condition list should be (SYMBOL . DATA), not (SYMBOL DATA). * test/lisp/emacs-lisp/ert-tests.el (ert-test-fail-inside-should): Fix unit test. --- lisp/emacs-lisp/ert.el | 2 +- test/lisp/emacs-lisp/ert-tests.el | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'lisp/emacs-lisp') diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el index 155b6a9d4e6..d22b2397745 100644 --- a/lisp/emacs-lisp/ert.el +++ b/lisp/emacs-lisp/ert.el @@ -261,7 +261,7 @@ DATA is displayed to the user and should state the reason for skipping." 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 (list error-symbol data)))) + (funcall debugger 'error (cons error-symbol data)))) (defun ert--special-operator-p (thing) "Return non-nil if THING is a symbol naming a special operator." diff --git a/test/lisp/emacs-lisp/ert-tests.el b/test/lisp/emacs-lisp/ert-tests.el index bdacb0832b3..5c9696105e9 100644 --- a/test/lisp/emacs-lisp/ert-tests.el +++ b/test/lisp/emacs-lisp/ert-tests.el @@ -814,7 +814,7 @@ This macro is used to test if macroexpansion in `should' works." :body (lambda () (should (integerp (ert-fail "Boo")))))))) (should (ert-test-failed-p result)) (should (equal (ert-test-failed-condition result) - '(ert-test-failed ("Boo")))))) + '(ert-test-failed "Boo"))))) (provide 'ert-tests) -- cgit v1.2.3 From 7561c01380aa3347901eeddd2d0a466cb29ebbd8 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 9 Mar 2021 11:04:03 -0500 Subject: * lisp/emacs-lisp/cconv.el: Don't confuse a string for a docstring (cconv--convert-funcbody): Check there's something after a docstring. * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-string-vs-docstring): New corresponding test. --- lisp/emacs-lisp/cconv.el | 5 +++-- test/lisp/emacs-lisp/bytecomp-tests.el | 5 +++++ 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'lisp/emacs-lisp') diff --git a/lisp/emacs-lisp/cconv.el b/lisp/emacs-lisp/cconv.el index bd0a3e87e64..68e930fa3f5 100644 --- a/lisp/emacs-lisp/cconv.el +++ b/lisp/emacs-lisp/cconv.el @@ -295,8 +295,9 @@ of converted forms." (if wrappers (let ((special-forms '())) ;; Keep special forms at the beginning of the body. - (while (or (stringp (car funcbody)) ;docstring. - (memq (car-safe (car funcbody)) '(interactive declare))) + (while (or (and (cdr funcbody) (stringp (car funcbody))) ;docstring. + (memq (car-safe (car funcbody)) + '(interactive declare :documentation))) (push (pop funcbody) special-forms)) (let ((body (macroexp-progn funcbody))) (dolist (wrapper wrappers) (setq body (funcall wrapper body))) diff --git a/test/lisp/emacs-lisp/bytecomp-tests.el b/test/lisp/emacs-lisp/bytecomp-tests.el index 03c267ccd0f..5147cd26883 100644 --- a/test/lisp/emacs-lisp/bytecomp-tests.el +++ b/test/lisp/emacs-lisp/bytecomp-tests.el @@ -1222,6 +1222,11 @@ compiled correctly." (byte-compile 'counter) (should (equal (counter) 1)))))) +(ert-deftest bytecomp-string-vs-docstring () + ;; Don't confuse a string return value for a docstring. + (let ((lexical-binding t)) + (should (equal (funcall (byte-compile '(lambda (x) "foo")) 'dummy) "foo")))) + ;; Local Variables: ;; no-byte-compile: t ;; End: -- cgit v1.2.3 From dc2688acb30afe747e874a0737cdfc07bd1efa3b Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Wed, 10 Mar 2021 04:34:01 +0100 Subject: Do mode tagging in ert.el --- lisp/emacs-lisp/ert.el | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'lisp/emacs-lisp') diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el index d22b2397745..f7f53eaa700 100644 --- a/lisp/emacs-lisp/ert.el +++ b/lisp/emacs-lisp/ert.el @@ -2083,6 +2083,7 @@ and how to display message." (define-derived-mode ert-results-mode special-mode "ERT-Results" "Major mode for viewing results of ERT test runs." + :interactive nil (setq-local revert-buffer-function (lambda (&rest _) (ert-results-rerun-all-tests)))) @@ -2178,7 +2179,7 @@ To be used in the ERT results buffer." "Move point to the next test. To be used in the ERT results buffer." - (interactive) + (interactive nil ert-results-mode) (ert--results-move (ewoc-locate ert--results-ewoc) 'ewoc-next "No tests below")) @@ -2186,7 +2187,7 @@ To be used in the ERT results buffer." "Move point to the previous test. To be used in the ERT results buffer." - (interactive) + (interactive nil ert-results-mode) (ert--results-move (ewoc-locate ert--results-ewoc) 'ewoc-prev "No tests above")) @@ -2219,7 +2220,7 @@ user-error is signaled with the message ERROR-MESSAGE." "Find the definition of the test at point in another window. To be used in the ERT results buffer." - (interactive) + (interactive nil ert-results-mode) (let ((name (ert-test-at-point))) (unless name (user-error "No test at point")) @@ -2253,7 +2254,7 @@ To be used in the ERT results buffer." ;; the summary apparently needs to be easily accessible from the ;; error log, and perhaps it would be better to have it in a ;; separate buffer to keep it visible. - (interactive) + (interactive nil ert-results-mode) (let ((ewoc ert--results-ewoc) (progress-bar-begin ert--results-progress-bar-button-begin)) (cond ((ert--results-test-node-or-null-at-point) @@ -2370,7 +2371,7 @@ definition." "Re-run all tests, using the same selector. To be used in the ERT results buffer." - (interactive) + (interactive nil ert-results-mode) (cl-assert (eql major-mode 'ert-results-mode)) (let ((selector (ert--stats-selector ert--results-stats))) (ert-run-tests-interactively selector (buffer-name)))) @@ -2379,7 +2380,7 @@ To be used in the ERT results buffer." "Re-run the test at point. To be used in the ERT results buffer." - (interactive) + (interactive nil ert-results-mode) (cl-destructuring-bind (test redefinition-state) (ert--results-test-at-point-allow-redefinition) (when (null test) @@ -2414,7 +2415,7 @@ To be used in the ERT results buffer." "Re-run the test at point with `ert-debug-on-error' bound to t. To be used in the ERT results buffer." - (interactive) + (interactive nil ert-results-mode) (let ((ert-debug-on-error t)) (ert-results-rerun-test-at-point))) @@ -2422,7 +2423,7 @@ To be used in the ERT results buffer." "Display the backtrace for the test at point. To be used in the ERT results buffer." - (interactive) + (interactive nil ert-results-mode) (let* ((test (ert--results-test-at-point-no-redefinition t)) (stats ert--results-stats) (pos (ert--stats-test-pos stats test)) @@ -2449,7 +2450,7 @@ To be used in the ERT results buffer." "Display the part of the *Messages* buffer generated during the test at point. To be used in the ERT results buffer." - (interactive) + (interactive nil ert-results-mode) (let* ((test (ert--results-test-at-point-no-redefinition t)) (stats ert--results-stats) (pos (ert--stats-test-pos stats test)) @@ -2470,7 +2471,7 @@ To be used in the ERT results buffer." "Display the list of `should' forms executed during the test at point. To be used in the ERT results buffer." - (interactive) + (interactive nil ert-results-mode) (let* ((test (ert--results-test-at-point-no-redefinition t)) (stats ert--results-stats) (pos (ert--stats-test-pos stats test)) @@ -2506,7 +2507,7 @@ To be used in the ERT results buffer." "Toggle how much of the condition to print for the test at point. To be used in the ERT results buffer." - (interactive) + (interactive nil ert-results-mode) (let* ((ewoc ert--results-ewoc) (node (ert--results-test-node-at-point)) (entry (ewoc-data node))) @@ -2518,7 +2519,7 @@ To be used in the ERT results buffer." "Display test timings for the last run. To be used in the ERT results buffer." - (interactive) + (interactive nil ert-results-mode) (let* ((stats ert--results-stats) (buffer (get-buffer-create "*ERT timings*")) (data (cl-loop for test across (ert--stats-tests stats) @@ -2597,7 +2598,7 @@ To be used in the ERT results buffer." "Display the documentation of the test at point. To be used in the ERT results buffer." - (interactive) + (interactive nil ert-results-mode) (ert-describe-test (ert--results-test-at-point-no-redefinition t))) -- cgit v1.2.3 From 4cb52200cb67d3cd1aa77717d12d4b88845e1755 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Wed, 10 Mar 2021 04:34:53 +0100 Subject: Fix duplicate ":" in ert-find-test-other-window prompt * lisp/emacs-lisp/ert.el (ert-find-test-other-window): Don't insert duplicate ":" in prompt. --- lisp/emacs-lisp/ert.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp/emacs-lisp') diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el index f7f53eaa700..e91ec0af443 100644 --- a/lisp/emacs-lisp/ert.el +++ b/lisp/emacs-lisp/ert.el @@ -1633,7 +1633,7 @@ default (if any)." (defun ert-find-test-other-window (test-name) "Find, in another window, the definition of TEST-NAME." - (interactive (list (ert-read-test-name-at-point "Find test definition: "))) + (interactive (list (ert-read-test-name-at-point "Find test definition"))) (find-function-do-it test-name 'ert--test 'switch-to-buffer-other-window)) (defun ert-delete-test (test-name) -- cgit v1.2.3 From 7add3309035394340b9d75d12c7e5412a3c96690 Mon Sep 17 00:00:00 2001 From: Mattias EngdegÄrd Date: Wed, 10 Mar 2021 14:08:41 +0100 Subject: Mark string predicates side-effect-free * lisp/emacs-lisp/byte-opt.el (side-effect-free-fns): Add string>, string-greaterp, string-empty-p, string-prefix-p, string-suffix-p and string-blank-p, all recently marked pure. --- lisp/emacs-lisp/byte-opt.el | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lisp/emacs-lisp') diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index b3325816c5c..db8d825cfec 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el @@ -1327,6 +1327,8 @@ Same format as `byte-optimize--lexvars', with shared structure and contents.") radians-to-degrees rassq rassoc read-from-string regexp-opt regexp-quote region-beginning region-end reverse round sin sqrt string string< string= string-equal string-lessp + string> string-greaterp string-empty-p + string-prefix-p string-suffix-p string-blank-p string-search string-to-char string-to-number string-to-syntax substring sxhash sxhash-equal sxhash-eq sxhash-eql -- cgit v1.2.3 From 4b47eb32c6a45ac9f4d4895c1a6dd6db441baafb Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Wed, 10 Mar 2021 15:52:36 +0100 Subject: Fix byte-compilation warning in benchmark-run * lisp/emacs-lisp/benchmark.el (benchmark-run): Avoid a byte-compilation warning about an empty let body (bug#46819). --- lisp/emacs-lisp/benchmark.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lisp/emacs-lisp') diff --git a/lisp/emacs-lisp/benchmark.el b/lisp/emacs-lisp/benchmark.el index 14bc2817390..2a3efbe5a1b 100644 --- a/lisp/emacs-lisp/benchmark.el +++ b/lisp/emacs-lisp/benchmark.el @@ -62,7 +62,8 @@ See also `benchmark-run-compiled'." ;; Take account of the loop overhead. `(- (benchmark-elapse (dotimes (,i ,repetitions) ,@forms)) - (benchmark-elapse (dotimes (,i ,repetitions)))) + (benchmark-elapse (dotimes (,i ,repetitions) + nil))) `(benchmark-elapse ,@forms)) (- gcs-done ,gcs) (- gc-elapsed ,gc))))) -- cgit v1.2.3 From e13c30132a81ca2087f7d1a3adc5f6feab84ea2e Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 11 Mar 2021 13:01:59 -0500 Subject: * lisp/emacs-lisp/cconv.el (cconv--analyze-use): Warn never-initialized vars (byte-compile-not-lexical-var-p): Remove Emacs<24 compatibility. --- lisp/emacs-lisp/cconv.el | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'lisp/emacs-lisp') diff --git a/lisp/emacs-lisp/cconv.el b/lisp/emacs-lisp/cconv.el index 68e930fa3f5..ca641a2ef0c 100644 --- a/lisp/emacs-lisp/cconv.el +++ b/lisp/emacs-lisp/cconv.el @@ -585,9 +585,6 @@ places where they originally did not directly appear." (_ (or (cdr (assq form env)) form)))) -(unless (fboundp 'byte-compile-not-lexical-var-p) - ;; Only used to test the code in non-lexbind Emacs. - (defalias 'byte-compile-not-lexical-var-p 'boundp)) (defvar byte-compile-lexical-variables) (defun cconv--analyze-use (vardata form varkind) @@ -603,7 +600,13 @@ FORM is the parent form that binds this var." ;; FIXME: Convert this warning to use `macroexp--warn-wrap' ;; so as to give better position information. (byte-compile-warn - "%s `%S' not left unused" varkind var))) + "%s `%S' not left unused" varkind var)) + ((and (let (or 'let* 'let) (car form)) + `(,(or `(,var) `(,var nil)) t nil ,_ ,_)) + ;; FIXME: Convert this warning to use `macroexp--warn-wrap' + ;; so as to give better position information. + (unless (not (intern-soft var)) + (byte-compile-warn "Variable `%S' left uninitialized" var)))) (pcase vardata (`(,binder nil ,_ ,_ nil) (push (cons (cons binder form) :unused) cconv-var-classification)) @@ -784,7 +787,7 @@ This function does not return anything but instead fills the (let ((dv (assq form env))) ; dv = declared and visible (when dv (setf (nth 1 dv) t)))))) -(define-obsolete-function-alias 'cconv-analyse-form 'cconv-analyze-form "25.1") +(define-obsolete-function-alias 'cconv-analyse-form #'cconv-analyze-form "25.1") (provide 'cconv) ;;; cconv.el ends here -- cgit v1.2.3 From b21f6193fe1b92382bf7efbd9d44eba0613f3168 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 11 Mar 2021 13:29:14 -0500 Subject: * lisp: Remove yet more always-nil variables * lisp/align.el (align-region): Remove always-nil variable `group-c`. * lisp/ido.el (ido-make-prompt): Remove always-nil variable `prefix`. * lisp/xdg.el (xdg-mime-collect-associations): Remove always-nil variable `end`. * lisp/calc/calc-yank.el (calc-edit): Remove always-nil variable `flag`. * lisp/calendar/todo-mode.el (todo-edit-item--header): Remove always-nil variable `dayname`. (todo-show-categories-table): Remove always-nil variable `sortkey`. * lisp/emacs-lisp/checkdoc.el (checkdoc-ispell-docstring-engine): Remove always-nil variable `err`. * lisp/emacs-lisp/tcover-ses.el: Remove always-nil variable `pause`. * lisp/eshell/em-ls.el (eshell-ls-files): Remove always-nil variable `ignore`. * lisp/net/ange-ftp.el (ange-ftp-copy-file-internal): Remove always-nil variable `temp2`. * lisp/progmodes/cperl-mode.el (cperl-tags-hier-init): Remove always-nil variables `l1`, `l2`, `l3`. (cperl-tags-treeify): Remove always-nil variable `l1`. * lisp/progmodes/ebrowse.el (ebrowse-tags-read-member+class-name): Remove always-nil variable `class`. * lisp/textmodes/artist.el (artist-draw-ellipse-with-0-height): Remove always-nil variable `fill-info`. * lisp/textmodes/flyspell.el (flyspell-emacs-popup): Remove always-nil variable `show-affix-info`. * lisp/textmodes/rst.el (rst-Ado): Remove always-nil variable `char`. * lisp/vc/vc.el (vc-diff-build-argument-list-internal): Remove always-nil variable `rev2-default`. --- lisp/align.el | 4 ++-- lisp/calc/calc-yank.el | 5 +++-- lisp/calendar/todo-mode.el | 8 ++++---- lisp/emacs-lisp/checkdoc.el | 6 +++--- lisp/emacs-lisp/tcover-ses.el | 4 ++-- lisp/eshell/em-ls.el | 6 +++--- lisp/ido.el | 4 ++-- lisp/net/ange-ftp.el | 4 ++-- lisp/progmodes/cperl-mode.el | 8 ++++---- lisp/progmodes/ebrowse.el | 4 ++-- lisp/textmodes/artist.el | 4 ++-- lisp/textmodes/flyspell.el | 4 ++-- lisp/textmodes/rst.el | 2 +- lisp/vc/vc.el | 7 ++++--- lisp/xdg.el | 4 ++-- 15 files changed, 38 insertions(+), 36 deletions(-) (limited to 'lisp/emacs-lisp') diff --git a/lisp/align.el b/lisp/align.el index 1a1d3dd7ec1..7ae067f8c53 100644 --- a/lisp/align.el +++ b/lisp/align.el @@ -1310,7 +1310,7 @@ aligner would have dealt with are." (thissep (if rulesep (cdr rulesep) separate)) same (eol 0) search-start - groups group-c + groups ;; group-c spacing spacing-c tab-stop tab-stop-c repeat repeat-c @@ -1434,7 +1434,7 @@ aligner would have dealt with are." ;; lookup the `group' attribute the first time ;; that we need it - (unless group-c + (unless nil ;; group-c (setq groups (or (cdr (assq 'group rule)) 1)) (unless (listp groups) (setq groups (list groups))) diff --git a/lisp/calc/calc-yank.el b/lisp/calc/calc-yank.el index e5f05236f3a..762adbd407e 100644 --- a/lisp/calc/calc-yank.el +++ b/lisp/calc/calc-yank.el @@ -639,7 +639,7 @@ Interactively, reads the register using `register-read-with-preview'." (calc-slow-wrapper (when (eq n 0) (setq n (calc-stack-size))) - (let* ((flag nil) + (let* (;; (flag nil) (allow-ret (> n 1)) (list (math-showing-full-precision (mapcar (if (> n 1) @@ -651,7 +651,8 @@ Interactively, reads the register using `register-read-with-preview'." (if (> n 0) (calc-top-list n) (calc-top-list 1 (- n))))))) - (calc--edit-mode (lambda () (calc-finish-stack-edit (or flag n))) allow-ret) + (calc--edit-mode (lambda () (calc-finish-stack-edit n)) ;; (or flag n) + allow-ret) (while list (insert (car list) "\n") (setq list (cdr list))))) diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el index 0daa1530109..dab468d0c1d 100644 --- a/lisp/calendar/todo-mode.el +++ b/lisp/calendar/todo-mode.el @@ -2279,7 +2279,7 @@ made in the number or names of categories." (inc (prefix-numeric-value inc)) (buffer-read-only nil) ndate ntime - year monthname month day dayname) + year monthname month day) ;; dayname (when marked (todo--user-error-if-marked-done-item)) (save-excursion (or (and marked (goto-char (point-min))) (todo-item-start)) @@ -2437,7 +2437,7 @@ made in the number or names of categories." (monthname monthname) (month month) (day day) - (dayname dayname)) + (dayname nil)) ;; dayname (mapconcat #'eval calendar-date-display-form ""))))) (when ndate (replace-match ndate nil nil nil 1)) ;; Add new time string to the header, if it was supplied. @@ -3450,8 +3450,8 @@ containing only archived items, provided user option are shown in `todo-archived-only' face." (interactive) (todo-display-categories) - (let (sortkey) - (todo-update-categories-display sortkey))) + ;; (let (sortkey) + (todo-update-categories-display nil)) ;; sortkey (defun todo-next-button (n) "Move point to the Nth next button in the table of categories." diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index ee2e77480d5..62851660c66 100644 --- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el @@ -2134,8 +2134,8 @@ buffer, otherwise stop after the first error." (user-error "No spellchecker installed: check the variable `ispell-program-name'")) (save-excursion (skip-chars-forward "^a-zA-Z") - (let (word sym case-fold-search err word-beginning word-end) - (while (and (not err) (< (point) end)) + (let (word sym case-fold-search word-beginning word-end) ;; err + (while (and (< (point) end)) ;; (not err) (if (save-excursion (forward-char -1) (looking-at "[('`]")) ;; Skip lists describing meta-syntax, or bound variables (forward-sexp 1) @@ -2167,7 +2167,7 @@ buffer, otherwise stop after the first error." (sit-for 0) (message "Continuing...")))))))) (skip-chars-forward "^a-zA-Z")) - err)))) + nil)))) ;; err ;;; Rogue space checking engine ;; diff --git a/lisp/emacs-lisp/tcover-ses.el b/lisp/emacs-lisp/tcover-ses.el index 12b0dcfff95..d9db1d3cdc9 100644 --- a/lisp/emacs-lisp/tcover-ses.el +++ b/lisp/emacs-lisp/tcover-ses.el @@ -32,8 +32,8 @@ ;;;Here are some macros that exercise SES. Set `pause' to t if you want the ;;;macros to pause after each step. -(let* ((pause nil) - (x (if pause "\^Xq" "")) +(let* (;; (pause nil) + (x (if nil "\^Xq" "")) ;; pause (y "\^X\^Fses-test.ses\r\^[<")) ;;Fiddle with the existing spreadsheet (fset 'ses-exercise-example diff --git a/lisp/eshell/em-ls.el b/lisp/eshell/em-ls.el index e942ae26928..3d7c43b404b 100644 --- a/lisp/eshell/em-ls.el +++ b/lisp/eshell/em-ls.el @@ -680,12 +680,12 @@ Each member of FILES is either a string or a cons cell of the form (let ((f files) last-f display-files - ignore) + ) ;; ignore (while f (if (cdar f) (setq last-f f f (cdr f)) - (unless ignore + (unless nil ;; ignore (funcall error-func (format "%s: No such file or directory\n" (caar f)))) (if (eq f files) @@ -698,7 +698,7 @@ Each member of FILES is either a string or a cons cell of the form (setcar f (cadr f)) (setcdr f (cddr f)))))) (if (not show-size) - (setq display-files (mapcar 'eshell-ls-annotate files)) + (setq display-files (mapcar #'eshell-ls-annotate files)) (dolist (file files) (let* ((str (eshell-ls-printable-size (file-attribute-size (cdr file)) t)) (len (length str))) diff --git a/lisp/ido.el b/lisp/ido.el index 3ed0d952f36..93629046801 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -1746,7 +1746,7 @@ is enabled then some keybindings are changed in the keymap." ido-max-file-prompt-width)) (literal (and (boundp 'ido-find-literal) ido-find-literal "(literal) ")) (vc-off (and ido-saved-vc-hb (not vc-handled-backends) "[-VC] ")) - (prefix nil) + ;; (prefix nil) (rule ido-rewrite-file-prompt-rules)) (let ((case-fold-search nil)) (while rule @@ -1762,7 +1762,7 @@ is enabled then some keybindings are changed in the keymap." ; (if ido-process-ignore-lists "" "&") (or literal "") (or vc-off "") - (or prefix "") + ;; (or prefix "") (let ((l (length dirname))) (if (and max-width (> max-width 0) (> l max-width)) (let* ((s (substring dirname (- max-width))) diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index d27eeab82b1..86b5d449872 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el @@ -3716,7 +3716,7 @@ so return the size on the remote host exactly. See RFC 3659." (binary (or (ange-ftp-binary-file filename) (ange-ftp-binary-file newname))) temp1 - temp2) + ) ;; temp2 ;; check to see if we can overwrite (if (or (not ok-if-already-exists) @@ -3750,7 +3750,7 @@ so return the size on the remote host exactly. See RFC 3659." filename newname binary msg f-parsed f-host f-user f-name f-abbr t-parsed t-host t-user t-name t-abbr - temp1 temp2 cont nowait) + temp1 nil cont nowait) ;; temp2 nowait)) ;; filename wasn't remote. newname must be remote. call the diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index 649eff19cf4..734797b3ad2 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -6701,9 +6701,9 @@ One may build such TAGS files from CPerl mode menu." (or (nthcdr 2 elt) ;; Only in one file (setcdr elt (cdr (nth 1 elt)))))) - to l1 l2 l3) + to) ;; l1 l2 l3 ;; (setq cperl-hierarchy '(() () ())) ; Would write into '() later! - (setq cperl-hierarchy (list l1 l2 l3)) + (setq cperl-hierarchy (list () () ())) ;; (list l1 l2 l3) (or tags-table-list (call-interactively 'visit-tags-table)) (mapc @@ -6749,7 +6749,7 @@ One may build such TAGS files from CPerl mode menu." "\\)\\(::\\)?")) (packages (cdr (nth 1 to))) (methods (cdr (nth 2 to))) - l1 head cons1 cons2 ord writeto recurse + head cons1 cons2 ord writeto recurse ;; l1 root-packages root-functions (move-deeper (lambda (elt) @@ -6769,7 +6769,7 @@ One may build such TAGS files from CPerl mode menu." (setq root-functions (cons elt root-functions))) (t (setq root-packages (cons elt root-packages))))))) - (setcdr to l1) ; Init to dynamic space + (setcdr to nil) ;; l1 ; Init to dynamic space (setq writeto to) (setq ord 1) (mapc move-deeper packages) diff --git a/lisp/progmodes/ebrowse.el b/lisp/progmodes/ebrowse.el index 40bdaad574f..cafdb3b8289 100644 --- a/lisp/progmodes/ebrowse.el +++ b/lisp/progmodes/ebrowse.el @@ -3184,8 +3184,8 @@ MEMBER-NAME is the name of the member found." (let* ((start (point)) (name (progn (skip-chars-forward "a-zA-Z0-9_") (buffer-substring start (point)))) - class) - (list class name)))) + ) ;; class + (list nil name)))) ;; class (defun ebrowse-tags-choose-class (_tree header name initial-class-name) diff --git a/lisp/textmodes/artist.el b/lisp/textmodes/artist.el index 9a886d23971..3d081220910 100644 --- a/lisp/textmodes/artist.el +++ b/lisp/textmodes/artist.el @@ -3466,7 +3466,7 @@ The Y-RADIUS must be 0, but the X-RADIUS must not be 0." (line-char (if artist-line-char-set artist-line-char ?-)) (i 0) (point-list nil) - (fill-info nil) + ;; (fill-info nil) (shape-info (make-vector 2 0))) (while (< i width) (let* ((line-x (+ left-edge i)) @@ -3479,7 +3479,7 @@ The Y-RADIUS must be 0, but the X-RADIUS must not be 0." (setq point-list (append point-list (list new-coord))) (setq i (1+ i)))) (aset shape-info 0 point-list) - (aset shape-info 1 fill-info) + (aset shape-info 1 nil) ;; fill-info (artist-make-2point-object (artist-make-endpoint x1 y1) (artist-make-endpoint x-radius y-radius) shape-info))) diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index 83dba7177ab..a48b3457aa2 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el @@ -2293,8 +2293,8 @@ If OPOINT is non-nil, restore point there after adjusting it for replacement." corrects) '())) (affix (car (cdr (cdr (cdr poss))))) - show-affix-info - (base-menu (let ((save (if (and (consp affix) show-affix-info) + ;; show-affix-info + (base-menu (let ((save (if nil ;; (and (consp affix) show-affix-info) (list (list (concat "Save affix: " (car affix)) 'save) diff --git a/lisp/textmodes/rst.el b/lisp/textmodes/rst.el index c51285d3de6..ce156370d57 100644 --- a/lisp/textmodes/rst.el +++ b/lisp/textmodes/rst.el @@ -616,7 +616,7 @@ After interpretation of ARGS the results are concatenated as for (:constructor rst-Ado-new-transition (&aux - (char nil) + ;; (char nil) (-style 'transition))) ;; Construct a simple section header. (:constructor diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index b926c3819dd..95126fac100 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -1832,7 +1832,7 @@ Return t if the buffer had changes, nil otherwise." (backend (car vc-fileset)) (first (car files)) (rev1-default nil) - (rev2-default nil)) + ) ;; (rev2-default nil) (cond ;; someday we may be able to do revision completion on non-singleton ;; filesets, but not yet. @@ -1856,9 +1856,10 @@ Return t if the buffer had changes, nil otherwise." rev1-default "): ") "Older revision: ")) (rev2-prompt (concat "Newer revision (default " - (or rev2-default "current source") "): ")) + ;; (or rev2-default + "current source): ")) (rev1 (vc-read-revision rev1-prompt files backend rev1-default)) - (rev2 (vc-read-revision rev2-prompt files backend rev2-default))) + (rev2 (vc-read-revision rev2-prompt files backend nil))) ;; rev2-default (when (string= rev1 "") (setq rev1 nil)) (when (string= rev2 "") (setq rev2 nil)) (list files rev1 rev2)))) diff --git a/lisp/xdg.el b/lisp/xdg.el index 0f0df53d27e..11039499ea9 100644 --- a/lisp/xdg.el +++ b/lisp/xdg.el @@ -256,8 +256,8 @@ which is expected to be ordered by priority as in (when (file-readable-p f) (insert-file-contents-literally f nil nil nil t) (goto-char (point-min)) - (let (end) - (while (not (or (eobp) end)) + (let () ;; end + (while (not (or (eobp))) ;; end (if (= (following-char) ?\[) (progn (setq sec (char-after (1+ (point)))) (forward-line)) -- cgit v1.2.3 From d0125959d775fc8868b3c4cec78c4120eb67d643 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Fri, 12 Mar 2021 00:41:50 +0100 Subject: Make byte-compiled uses of `define-minor-mode' more compatible * lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Be more defensive about accessing minor mode variables. --- lisp/emacs-lisp/easy-mmode.el | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'lisp/emacs-lisp') diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index 4a9e58083b0..addb58cdbbe 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el @@ -332,12 +332,20 @@ or call the function `%s'.")))) t))) ;; Keep minor modes list up to date. ,@(if globalp - `((setq global-minor-modes (delq ',modefun global-minor-modes)) + ;; When running this byte-compiled code in earlier + ;; Emacs versions, these variables may not be defined + ;; there. So check defensively, even if they're + ;; always defined in Emacs 28 and up. + `((when (boundp 'global-minor-modes) + (setq global-minor-modes + (delq ',modefun global-minor-modes)) + (when ,getter + (push ',modefun global-minor-modes)))) + ;; Ditto check. + `((when (boundp 'local-minor-modes) + (setq local-minor-modes (delq ',modefun local-minor-modes)) (when ,getter - (push ',modefun global-minor-modes))) - `((setq local-minor-modes (delq ',modefun local-minor-modes)) - (when ,getter - (push ',modefun local-minor-modes)))) + (push ',modefun local-minor-modes))))) ,@body ;; The on/off hooks are here for backward compatibility only. (run-hooks ',hook (if ,getter ',hook-on ',hook-off)) -- cgit v1.2.3 From 7109307c1a62fb3ab781989d495bacd3c2b15a2e Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 11 Mar 2021 21:47:10 -0500 Subject: * lisp/emacs-lisp/syntax.el (syntax-propertize-rules): Use `macroexp-let2` This also silences the recently introduced compilation warning. --- lisp/emacs-lisp/syntax.el | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'lisp/emacs-lisp') diff --git a/lisp/emacs-lisp/syntax.el b/lisp/emacs-lisp/syntax.el index bee2f9639e7..6d5b04b83bb 100644 --- a/lisp/emacs-lisp/syntax.el +++ b/lisp/emacs-lisp/syntax.el @@ -290,12 +290,13 @@ all RULES in total." ',(string-to-syntax (nth 1 action))) ,@(nthcdr 2 action)) `((let ((mb (match-beginning ,gn)) - (me (match-end ,gn)) - (syntax ,(nth 1 action))) - (if syntax - (put-text-property - mb me 'syntax-table syntax)) - ,@(nthcdr 2 action))))) + (me (match-end ,gn))) + ,(macroexp-let2 nil syntax (nth 1 action) + `(progn + (if ,syntax + (put-text-property + mb me 'syntax-table ,syntax)) + ,@(nthcdr 2 action))))))) (t `((let ((mb (match-beginning ,gn)) (me (match-end ,gn)) -- cgit v1.2.3 From 009bc7c9d8bd0074a78ebef73102f600a514172c Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 11 Mar 2021 22:27:41 -0500 Subject: * lisp/emacs-lisp/cconv.el (cconv--analyze-use): Tune down the warning Don't warn for always-nil bindings if the binding is made explicit. Fixes bug#47080. --- lisp/emacs-lisp/cconv.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lisp/emacs-lisp') diff --git a/lisp/emacs-lisp/cconv.el b/lisp/emacs-lisp/cconv.el index ca641a2ef0c..cfb0168a6e5 100644 --- a/lisp/emacs-lisp/cconv.el +++ b/lisp/emacs-lisp/cconv.el @@ -602,7 +602,8 @@ FORM is the parent form that binds this var." (byte-compile-warn "%s `%S' not left unused" varkind var)) ((and (let (or 'let* 'let) (car form)) - `(,(or `(,var) `(,var nil)) t nil ,_ ,_)) + `(,`(,var) ;; (or `(,var nil) : Too many false positives: bug#47080 + t nil ,_ ,_)) ;; FIXME: Convert this warning to use `macroexp--warn-wrap' ;; so as to give better position information. (unless (not (intern-soft var)) -- cgit v1.2.3 From ba6ae500f19b7791a81005b0af54ca8354ebffcc Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 11 Mar 2021 22:31:39 -0500 Subject: * lisp/emacs-lisp/cconv.el (cconv--analyze-use): Simplify (doh!) --- lisp/emacs-lisp/cconv.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp/emacs-lisp') diff --git a/lisp/emacs-lisp/cconv.el b/lisp/emacs-lisp/cconv.el index cfb0168a6e5..afaa13a8695 100644 --- a/lisp/emacs-lisp/cconv.el +++ b/lisp/emacs-lisp/cconv.el @@ -602,7 +602,7 @@ FORM is the parent form that binds this 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 + `((,var) ;; (or `(,var nil) : Too many false positives: bug#47080 t nil ,_ ,_)) ;; FIXME: Convert this warning to use `macroexp--warn-wrap' ;; so as to give better position information. -- cgit v1.2.3 From a0854f939ce3a1de2c8cbc5e38b106a8df4480f6 Mon Sep 17 00:00:00 2001 From: Mattias EngdegÄrd Date: Fri, 12 Mar 2021 12:11:17 +0100 Subject: ; Fix typos in doc strings --- lisp/calculator.el | 2 +- lisp/cedet/semantic/grammar.el | 2 +- lisp/emacs-lisp/edebug.el | 2 +- lisp/emulation/cua-rect.el | 2 +- lisp/international/quail.el | 2 +- lisp/jit-lock.el | 2 +- lisp/mail/smtpmail.el | 2 +- lisp/net/dictionary.el | 2 +- lisp/obsolete/iswitchb.el | 2 +- lisp/org/ol.el | 2 +- lisp/org/org-tempo.el | 2 +- lisp/org/org.el | 2 +- lisp/textmodes/reftex-vars.el | 2 +- test/lisp/kmacro-tests.el | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) (limited to 'lisp/emacs-lisp') diff --git a/lisp/calculator.el b/lisp/calculator.el index 00883989b29..6dd8d9a7ec1 100644 --- a/lisp/calculator.el +++ b/lisp/calculator.el @@ -291,7 +291,7 @@ user-defined operators, use `calculator-user-operators' instead.") 5. The function's precedence -- should be in the range of 1 (lowest) to 9 (highest) (optional, defaults to 1); -It it possible have a unary prefix version of a binary operator if it +It is possible have a unary prefix version of a binary operator if it comes later in this list. If the list begins with the symbol `nobind', then no key binding will take place -- this is only used for predefined keys. diff --git a/lisp/cedet/semantic/grammar.el b/lisp/cedet/semantic/grammar.el index ca7c273febc..8d8faac9c49 100644 --- a/lisp/cedet/semantic/grammar.el +++ b/lisp/cedet/semantic/grammar.el @@ -1740,7 +1740,7 @@ If it is a macro name, return a description of the associated expander function parameter list. If it is a function name, return a description of this function parameter list. -It it is a variable name, return a brief (one-line) documentation +If it is a variable name, return a brief (one-line) documentation string for the variable. If a default description of the current context can be obtained, return it. diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index 6f3c7d66881..f1455ffe73b 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -3508,7 +3508,7 @@ canceled the first time the function is entered." (defun edebug-cancel-on-entry (function) "Cause Edebug to not stop when FUNCTION is called. -The removes the effect of `edebug-on-entry'. If FUNCTION is is +The removes the effect of `edebug-on-entry'. If FUNCTION is nil, remove `edebug-on-entry' on all functions." (interactive (list (let ((name (completing-read diff --git a/lisp/emulation/cua-rect.el b/lisp/emulation/cua-rect.el index e66050b7136..0039092fd6e 100644 --- a/lisp/emulation/cua-rect.el +++ b/lisp/emulation/cua-rect.el @@ -46,7 +46,7 @@ A cua-rectangle definition is a vector used for all actions in TOP is the upper-left corner point. -BOTTOM is the point at the end of line after the the lower-right +BOTTOM is the point at the end of line after the lower-right corner point. LEFT and RIGHT are column numbers. diff --git a/lisp/international/quail.el b/lisp/international/quail.el index f52747084b2..87a905045d4 100644 --- a/lisp/international/quail.el +++ b/lisp/international/quail.el @@ -1075,7 +1075,7 @@ The installed decode map can be referred by the function `quail-decode-map'." KEY is a string meaning a sequence of keystrokes to be translated. TRANSLATION is a character, a string, a vector, a Quail map, a function, or a cons. -It it is a character, it is the sole translation of KEY. +If it is a character, it is the sole translation of KEY. If it is a string, each character is a candidate for the translation. If it is a vector, each element (string or character) is a candidate for the translation. diff --git a/lisp/jit-lock.el b/lisp/jit-lock.el index d169e40b817..a1287926eb9 100644 --- a/lisp/jit-lock.el +++ b/lisp/jit-lock.el @@ -105,7 +105,7 @@ This means those subsequent lines are refontified to reflect their new syntactic context, after `jit-lock-context-time' seconds. If any other value, e.g., `syntax-driven', it means refontification of subsequent lines to reflect their new syntactic context may or may not -occur after `jit-lock-context-time', depending on the the font-lock +occur after `jit-lock-context-time', depending on the font-lock definitions of the buffer. Specifically, if `font-lock-keywords-only' is nil in a buffer, which generally means the syntactic fontification is done using the buffer mode's syntax table, the syntactic diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el index 5c7ffd99897..ac5e8c3b6fb 100644 --- a/lisp/mail/smtpmail.el +++ b/lisp/mail/smtpmail.el @@ -186,7 +186,7 @@ mean \"try again\"." (defvar smtpmail-auth-supported '(cram-md5 plain login) "List of supported SMTP AUTH mechanisms. The list is in preference order. -Every element should have a matching `cl-defmethod' for +Every element should have a matching `cl-defmethod' for `smtpmail-try-auth-method'.") (defvar smtpmail-mail-address nil diff --git a/lisp/net/dictionary.el b/lisp/net/dictionary.el index 5148a66724b..5938b8146ef 100644 --- a/lisp/net/dictionary.el +++ b/lisp/net/dictionary.el @@ -829,7 +829,7 @@ The DICTIONARY is only used for decoding the bytes to display the DESCRIPTION." (defun dictionary-display-word-definition (reply word dictionary) "Insert the definition in REPLY for the current WORD from DICTIONARY. It will replace links which are found in the REPLY and replace -them with buttons to perform a a new search." +them with buttons to perform a new search." (let ((start (point))) (insert (dictionary-decode-charset reply dictionary)) (insert "\n\n") diff --git a/lisp/obsolete/iswitchb.el b/lisp/obsolete/iswitchb.el index a9bc6ef0711..7ffee762eb2 100644 --- a/lisp/obsolete/iswitchb.el +++ b/lisp/obsolete/iswitchb.el @@ -313,7 +313,7 @@ Possible values: `otherwindow' Show new buffer in another window (same frame) `display' Display buffer in another window without switching to it `otherframe' Show new buffer in another frame -`maybe-frame' If a buffer is visible in another frame, prompt to ask if you +`maybe-frame' If a buffer is visible in another frame, prompt to ask if you want to see the buffer in the same window of the current frame or in the other frame. `always-frame' If a buffer is visible in another frame, raise that diff --git a/lisp/org/ol.el b/lisp/org/ol.el index 9ed6ab954ef..38e2dd6a02c 100644 --- a/lisp/org/ol.el +++ b/lisp/org/ol.el @@ -591,7 +591,7 @@ handle this as a special case. When the function does handle the link, it must return a non-nil value. If it decides that it is not responsible for this link, it must return -nil to indicate that that Org can continue with other options like +nil to indicate that Org can continue with other options like exact and fuzzy text search.") diff --git a/lisp/org/org-tempo.el b/lisp/org/org-tempo.el index 36b8614fe1c..c121b8e7aca 100644 --- a/lisp/org/org-tempo.el +++ b/lisp/org/org-tempo.el @@ -65,7 +65,7 @@ just like `org-structure-template-alist'. The tempo snippet \" \\cite[Chapter 1]{Jones} \\cite[see][]{Jones} -> \\cite[see][]{Jones} \\cite[see][Chapter 1]{Jones} -> \\cite{Jones} -Is is possible that other packages have other conventions about which +It is possible that other packages have other conventions about which optional argument is interpreted how - that is why this cleaning up can be turned off." :group 'reftex-citation-support diff --git a/test/lisp/kmacro-tests.el b/test/lisp/kmacro-tests.el index c8910720763..8736f7fd2dc 100644 --- a/test/lisp/kmacro-tests.el +++ b/test/lisp/kmacro-tests.el @@ -519,7 +519,7 @@ This is a regression test for: Bug#3412, Bug#11817." (should (eq saved-binding (key-binding "\C-a"))))) (kmacro-tests-deftest kmacro-tests-name-or-bind-to-key-when-no-macro () - "Bind to key, symbol or register fails when when no macro exists." + "Bind to key, symbol or register fails when no macro exists." (should-error (kmacro-bind-to-key nil)) (should-error (kmacro-name-last-macro 'kmacro-tests-symbol-for-test)) (should-error (kmacro-to-register))) -- cgit v1.2.3