From a190a446ee2be283dbd48351af507d7c64b1af9e Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 30 Sep 2020 17:33:58 +0300 Subject: Fix 'move-to-column' when invisible text follows a TAB * src/indent.c (scan_for_column): Accept 2 more arguments, and report through them the position corresponding to PREVCOL. All callers changed. (Fmove_to_column): Use the prev_col's position to test for a TAB instead of assuming that the TAB is just before point (which is false when there's invisible text around). (Bug#43587) * test/src/indent-tests.el: New file. --- test/src/indent-tests.el | 59 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 test/src/indent-tests.el (limited to 'test/src') diff --git a/test/src/indent-tests.el b/test/src/indent-tests.el new file mode 100644 index 00000000000..7d1a6ce6dc3 --- /dev/null +++ b/test/src/indent-tests.el @@ -0,0 +1,59 @@ +;;; indent-tests.el --- tests for src/indent.c -*- lexical-binding:t -*- + +;; Copyright (C) 2020 Free Software Foundation, Inc. + +;; This file is part of GNU Emacs. + +;; This program is free software: you can redistribute it and/or +;; modify it under the terms of the GNU General Public License as +;; published by the Free Software Foundation, either version 3 of the +;; License, or (at your option) any later version. +;; +;; This program is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see `https://www.gnu.org/licenses/'. + +;;; Commentary: + +;;; Code: + +(ert-deftest indent-tests-move-to-column-invis-1tab () + "Test `move-to-column' when a TAB is followed by invisible text." + (should + (string= + (with-temp-buffer + (insert "\tLine starting with INVISIBLE text after TAB\n") + (add-text-properties 2 21 '(invisible t)) + (goto-char (point-min)) + (move-to-column 7 t) + (buffer-substring-no-properties 1 8)) + " "))) + +(ert-deftest indent-tests-move-to-column-invis-2tabs () + "Test `move-to-column' when 2 TABs are followed by invisible text." + (should + (string= + (with-temp-buffer + (insert "\t\tLine starting with INVISIBLE text after TAB\n") + (add-text-properties 3 22 '(invisible t)) + (goto-char (point-min)) + (move-to-column 12 t) + (buffer-substring-no-properties 1 11)) + "\t \tLine"))) + +(ert-deftest indent-tests-move-to-column-invis-between-tabs () + "Test `move-to-column' when 2 TABs are mixed with invisible text." + (should + (string= + (with-temp-buffer + (insert "\txxx\tLine starting with INVISIBLE text after TAB\n") + (add-text-properties 6 25 '(invisible t)) + (add-text-properties 2 5 '(invisible t)) + (goto-char (point-min)) + (move-to-column 12 t) + (buffer-substring-no-properties 1 14)) + "\txxx \tLine"))) -- cgit v1.3 From da591df90ae95a6bc34f43b1594fc58a91967304 Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Thu, 1 Oct 2020 20:35:40 +0000 Subject: Enhance syntax-tests.el to test some comment character handling. * test/src/syntax-tests: Add a new section testing some aspects of comment handling in syntax.c. This needs further enhancement. It uses .... * test/data/syntax-comments.txt: A new test file. --- test/data/syntax-comments.txt | 66 +++++++++++++++ test/src/syntax-tests.el | 190 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 256 insertions(+) create mode 100644 test/data/syntax-comments.txt (limited to 'test/src') diff --git a/test/data/syntax-comments.txt b/test/data/syntax-comments.txt new file mode 100644 index 00000000000..74e08b1b65b --- /dev/null +++ b/test/data/syntax-comments.txt @@ -0,0 +1,66 @@ +/* This file is a test file for tests of the comment handling in src/syntax.c. + This includes the testing of comments which figure in parse-partial-sexp + and scan-lists. */ + +/* Straight C comments */ +1/* comment */1 +2/**/2 +3// comment +3 +4// +4 +5/*/5 +6*/6 +7/* \*/7 +8*/8 +9/* \\*/9 +10*/10 +11// \ +12 +11 +13// \\ +14 +13 +15/* /*/15 + + +/* Straight Pascal comments (not nested) */ +20}20 +21{ Comment }21 +22{}22 +23{ +}23 +24{ +25{25 +}24 +26{ \}26 + + +/* Straight Lisp comments (not nested) */ +30 +30 +31; Comment +31 +32;;;;;;;;; +32 +33; \ +33 + +/* Comments within lists */ +50{ /* comment */ }50 +51{ /**/ }51 +52{ // comment +}52 +53{ // +}53 +54{ // +}54 +55{/* */}55 +56{ /* \*/ }56 +57*/57 +58}58 + +Local Variables: +mode: fundamental +eval: (set-syntax-table (make-syntax-table)) +End: diff --git a/test/src/syntax-tests.el b/test/src/syntax-tests.el index 65c56b3b29d..4bd8a8519c0 100644 --- a/test/src/syntax-tests.el +++ b/test/src/syntax-tests.el @@ -82,4 +82,194 @@ also has open paren syntax (see Bug#24870)." (should (equal (parse-partial-sexp pointC pointX nil nil ppsC) ppsX))))) + +;;; Commentary: +;; The next bit tests the handling of comments in syntax.c, in +;; particular the function `forward-comment'. + +;; It is intended to enhance this bit to test nested comments and also +;; the interaction of `parse-partial-sexp' and `scan-lists' with +;; comments (2020-10-01). + +;; This bit uses the data file test/data/syntax-comments.txt. + +(defun syntax-comments-point (n forw) + "Return the buffer offset corresponding to the \"label\" N. +N is a decimal number which appears in the data file, usually +twice, as \"labels\". It can also be a negative number or zero. +FORW is t when we're using the label at BOL, nil for the one at EOL. + +If the label N doesn't exist in the current buffer, an exception +is thrown. + +When FORW is t and N positive, we return the position after the +first occurrence of label N at BOL in the data file. With FORW +nil, we return the position before the last occurrence of the +label at EOL in the data file. + +When N is negative, we return instead the position of the end of +line that the -N label is on. When it is zero, we return POINT." + (if (zerop n) + (point) + (let ((str (format "%d" (abs n)))) + (save-excursion + (if forw + (progn + (goto-char (point-min)) + (re-search-forward + (concat "^\\(" str "\\)\\([^0-9\n]\\|$\\)")) + (if (< n 0) + (progn (end-of-line) (point)) + (match-end 1))) + (goto-char (point-max)) + (re-search-backward + (concat "\\(^\\|[^0-9]\\)\\(" str "\\)$")) + (if (< n 0) + (progn (end-of-line) (point)) + (match-beginning 2))))))) + +(eval-and-compile + (defvar syntax-comments-section)) + +(defmacro syntax-comments (-type- -dir- res start &optional stop) + "Create an ERT test to test (forward-comment 1/-1). +The test uses a fixed name data file, which it visits. It calls +entry and exit functions to set up and tear down syntax entries +for comment characters. The test is given a name based on the +global variable `syntax-comments-section', the direction of +movement and the value of START. + +-TYPE- (unquoted) is a symbol from whose name the entry and exit +function names are derived by appending \"-in\" and \"-out\". + +-DIR- (unquoted) is `forward' or `backward', the direction +`forward-comment' is attempted. + +RES, t or nil, is the expected result from `forward-comment'. + +START and STOP are decimal numbers corresponding to labels in the +data file marking the start and expected stop positions. See +`syntax-comments-point' for a precise specification. If STOP is +missing or nil, the value of START is assumed for it." + (declare (debug t)) + (let ((forw + (cond + ((eq -dir- 'forward) t) + ((eq -dir- 'backward) nil) + (t (error "Invalid -dir- argument \"%s\" to `syntax-comments'" -dir-)))) + (start-str (format "%d" (abs start))) + (type -type-) + ) + `(ert-deftest ,(intern (concat "syntax-comments-" + syntax-comments-section + (if forw "-f" "-b") start-str)) + () + (with-current-buffer + (find-file + ,(expand-file-name "data/syntax-comments.txt" + (getenv "EMACS_TEST_DIRECTORY"))) + (,(intern (concat (symbol-name type) "-in"))) + (goto-char (syntax-comments-point ,start ,forw)) + (let ((stop (syntax-comments-point ,(or stop start) ,(not forw)))) + (should (eq (forward-comment ,(if forw 1 -1)) ,res)) + (should (eq (point) stop))) + (,(intern (concat (symbol-name type) "-out"))))))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; "Pascal" style comments - single character delimiters, the closing +;; delimiter not being newline. +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +(defun {-in () + (setq comment-end-can-be-escaped nil) + (modify-syntax-entry ?{ "<") + (modify-syntax-entry ?} ">")) +(defun {-out () + (modify-syntax-entry ?{ "(}") + (modify-syntax-entry ?} "){")) +(eval-and-compile + (setq syntax-comments-section "pascal")) + +(syntax-comments { forward nil 20 0) +(syntax-comments { backward nil 20 0) +(syntax-comments { forward t 21) +(syntax-comments { backward t 21) +(syntax-comments { forward t 22) +(syntax-comments { backward t 22) + +(syntax-comments { forward t 23) +(syntax-comments { backward t 23) +(syntax-comments { forward t 24) +(syntax-comments { backward t 24) +(syntax-comments { forward t 26) +(syntax-comments { backward t 26) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; "Lisp" style comments - single character opening delimiters on line +;; comments. +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +(defun \;-in () + (setq comment-end-can-be-escaped nil) + (modify-syntax-entry ?\n ">") + (modify-syntax-entry ?\; "<")) +(defun \;-out () + (modify-syntax-entry ?\n " ") + (modify-syntax-entry ?\; ".")) +(eval-and-compile + (setq syntax-comments-section "lisp")) + +(syntax-comments \; backward nil 30 30) +(syntax-comments \; forward t 31) +(syntax-comments \; backward t 31) +(syntax-comments \; forward t 32) +(syntax-comments \; backward t 32) +(syntax-comments \; forward t 33) +(syntax-comments \; backward t 33) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Emacs 27 "C" style comments - `comment-end-can-be-escaped' is non-nil. +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +(defun /*-in () + (setq comment-end-can-be-escaped t) + (modify-syntax-entry ?/ ". 124b") + (modify-syntax-entry ?* ". 23") + (modify-syntax-entry ?\n "> b")) +(defun /*-out () + (setq comment-end-can-be-escaped nil) + (modify-syntax-entry ?/ ".") + (modify-syntax-entry ?* ".") + (modify-syntax-entry ?\n " ")) +(eval-and-compile + (setq syntax-comments-section "c")) + +(syntax-comments /* forward t 1) +(syntax-comments /* backward t 1) +(syntax-comments /* forward t 2) +(syntax-comments /* backward t 2) +(syntax-comments /* forward t 3) +(syntax-comments /* backward t 3) + +(syntax-comments /* forward t 4) +(syntax-comments /* backward t 4) +(syntax-comments /* forward t 5 6) +(syntax-comments /* backward nil 5 0) +(syntax-comments /* forward nil 6 0) +(syntax-comments /* backward t 6 5) + +(syntax-comments /* forward t 7 8) +(syntax-comments /* backward nil 7 0) +(syntax-comments /* forward nil 8 0) +(syntax-comments /* backward t 8 7) +(syntax-comments /* forward t 9) +(syntax-comments /* backward t 9) + +(syntax-comments /* forward nil 10 0) +(syntax-comments /* backward nil 10 0) +(syntax-comments /* forward t 11) +(syntax-comments /* backward t 11) + +(syntax-comments /* forward t 13 14) +(syntax-comments /* backward nil 13 -14) +(syntax-comments /* forward t 15) +(syntax-comments /* backward t 15) + ;;; syntax-tests.el ends here -- cgit v1.3 From 78eacf31e8fe182801ad1943fac717b75fcf286b Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Wed, 23 Sep 2020 13:35:55 +0200 Subject: ; Fix many typos in symbols in docs and comments --- lisp/allout.el | 8 ++++---- lisp/calendar/calendar.el | 2 +- lisp/calendar/timeclock.el | 2 +- lisp/cedet/ede/autoconf-edit.el | 2 +- lisp/cedet/ede/detect.el | 2 +- lisp/color.el | 2 +- lisp/doc-view.el | 2 +- lisp/electric.el | 2 +- lisp/emacs-lisp/eieio-base.el | 2 +- lisp/emacs-lisp/ert.el | 4 ++-- lisp/emacs-lisp/package.el | 2 +- lisp/emacs-lisp/re-builder.el | 4 ++-- lisp/erc/erc-track.el | 2 +- lisp/erc/erc.el | 4 ++-- lisp/eshell/esh-util.el | 2 +- lisp/faces.el | 2 +- lisp/ffap.el | 2 +- lisp/filecache.el | 2 +- lisp/filesets.el | 2 +- lisp/follow.el | 4 ++-- lisp/font-lock.el | 2 +- lisp/forms.el | 2 +- lisp/gnus/gnus-util.el | 2 +- lisp/gnus/message.el | 2 +- lisp/gnus/nndiary.el | 2 +- lisp/gnus/nnmaildir.el | 2 +- lisp/image-dired.el | 4 ++-- lisp/image.el | 2 +- lisp/jsonrpc.el | 6 +++--- lisp/mail/rmail.el | 2 +- lisp/mh-e/mh-compat.el | 2 +- lisp/mh-e/mh-junk.el | 2 +- lisp/net/nsm.el | 2 +- lisp/net/tramp-sh.el | 2 +- lisp/notifications.el | 2 +- lisp/org/ol-bibtex.el | 2 +- lisp/org/org-num.el | 2 +- lisp/org/org.el | 2 +- lisp/printing.el | 2 +- lisp/progmodes/antlr-mode.el | 2 +- lisp/progmodes/ebrowse.el | 2 +- lisp/progmodes/flymake-cc.el | 2 +- lisp/progmodes/hideif.el | 2 +- lisp/progmodes/python.el | 14 ++++++++------ lisp/progmodes/sql.el | 4 ++-- lisp/ps-print.el | 2 +- lisp/ps-samp.el | 2 +- lisp/ses.el | 2 +- lisp/startup.el | 2 +- lisp/strokes.el | 6 +++--- lisp/tempo.el | 4 ++-- lisp/textmodes/artist.el | 9 +++++---- lisp/vc/pcvs.el | 3 +-- lisp/window.el | 2 +- test/lisp/electric-tests.el | 3 ++- test/lisp/emacs-lisp/backtrace-tests.el | 2 +- test/lisp/emacs-lisp/edebug-tests.el | 2 +- test/lisp/files-tests.el | 4 ++-- test/lisp/mail/uudecode-tests.el | 4 ++-- test/src/coding-tests.el | 2 +- 60 files changed, 88 insertions(+), 85 deletions(-) (limited to 'test/src') diff --git a/lisp/allout.el b/lisp/allout.el index 174f1e3dc21..6a7ecbb1ef1 100644 --- a/lisp/allout.el +++ b/lisp/allout.el @@ -247,7 +247,7 @@ prevails." "Allout-mode functions bound to keys without any added prefix. This is in contrast to the majority of allout-mode bindings on -`allout-prefixed-bindings', whose bindings are created with a +`allout-prefixed-keybindings', whose bindings are created with a preceding command key. Use vector format for the keys: @@ -1536,7 +1536,7 @@ topic prefix. Entries must be symbols that are bound to the desired regexp values. Encryptions that result in matches will be retried, up to -`allout-encryption-ciphertext-rejection-limit' times, after which +`allout-encryption-ciphertext-rejection-ceiling' times, after which an error is raised.") (make-variable-buffer-local 'allout-encryption-ciphertext-rejection-regexps) @@ -4785,7 +4785,7 @@ this function." This is a way to give restricted peek at a concealed locality without the expense of exposing its context, but can leave the outline with aberrant -exposure. `allout-show-offshoot' should be used after the peek to rectify +exposure. `allout-show-to-offshoot' should be used after the peek to rectify the exposure." (interactive) @@ -6883,7 +6883,7 @@ To ignore intangibility, bind `inhibit-point-motion-hooks' to t." (allout-tests-obliterate-variable 'allout-tests-locally-true) (allout-do-resumptions)) ) -;;;_ % Run unit tests if `allout-run-unit-tests-after-load' is true: +;;;_ % Run unit tests if `allout-run-unit-tests-on-load' is true: (when allout-run-unit-tests-on-load (allout-run-unit-tests)) diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index 1ae39445680..83e7976125f 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el @@ -1088,7 +1088,7 @@ calendar." "Name of buffer used for sunrise/sunset times.") (defconst calendar-hebrew-yahrzeit-buffer "*Yahrzeits*" - "Name of the buffer used by `list-yahrzeit-dates'.") + "Name of the buffer used by `calendar-hebrew-list-yahrzeits'.") (defmacro calendar-increment-month (mon yr n &optional nmonths) "Increment the variables MON and YR by N months. diff --git a/lisp/calendar/timeclock.el b/lisp/calendar/timeclock.el index f3a5d9cd60d..ca9f16ef20b 100644 --- a/lisp/calendar/timeclock.el +++ b/lisp/calendar/timeclock.el @@ -553,7 +553,7 @@ relative only to the time worked today, and not to past time." OLD-DEFAULT hours are set for every day that has no number indicated." (interactive "P") (if old-default (setq old-default (prefix-numeric-value old-default)) - (error "`timelog-make-hours-explicit' requires an explicit argument")) + (error "`timeclock-make-hours-explicit' requires an explicit argument")) (let ((extant-timelog (find-buffer-visiting timeclock-file)) current-date) (with-current-buffer (find-file-noselect timeclock-file t) diff --git a/lisp/cedet/ede/autoconf-edit.el b/lisp/cedet/ede/autoconf-edit.el index e9dd48c8ab5..409e35ef900 100644 --- a/lisp/cedet/ede/autoconf-edit.el +++ b/lisp/cedet/ede/autoconf-edit.el @@ -215,7 +215,7 @@ the ordering list `autoconf-preferred-macro-order'." (defun autoconf-insert-new-macro (macro &optional param) "Add a call to MACRO in the current autoconf file. Deals with macro order. See `autoconf-preferred-macro-order' and -`autoconf-multi-macros'. +`autoconf-multiple-macros'. Optional argument PARAM is the parameter to pass to the macro as one string." (cond ((member macro autoconf-multiple-macros) ;; This occurs multiple times diff --git a/lisp/cedet/ede/detect.el b/lisp/cedet/ede/detect.el index b870624f9a1..3e4499cd39e 100644 --- a/lisp/cedet/ede/detect.el +++ b/lisp/cedet/ede/detect.el @@ -25,7 +25,7 @@ ;; ;; Detection comes in multiple forms: ;; -;; `ede-detect-scan-directory-for-project' - +;; `ede--detect-scan-directory-for-project' - ;; Scan for a project via the file system. ;; `ede-detect-directory-for-project' - ;; Check our file cache for a project. If that fails, use diff --git a/lisp/color.el b/lisp/color.el index 560631ae66d..48f150de70c 100644 --- a/lisp/color.el +++ b/lisp/color.el @@ -50,7 +50,7 @@ numbers, (RED GREEN BLUE), each between 0.0 and 1.0 inclusive. Optional argument FRAME specifies the frame where the color is to be displayed. If FRAME is omitted or nil, use the selected frame. If FRAME cannot display COLOR, return nil." - ;; `colors-values' maximum value is either 65535 or 65280 depending on the + ;; `color-values' maximum value is either 65535 or 65280 depending on the ;; display system. So we use a white conversion to get the max value. (let ((valmax (float (car (color-values "#ffffffffffff"))))) (mapcar (lambda (x) (/ x valmax)) (color-values color frame)))) diff --git a/lisp/doc-view.el b/lisp/doc-view.el index 171a939d4ec..9f5dc40ea16 100644 --- a/lisp/doc-view.el +++ b/lisp/doc-view.el @@ -511,7 +511,7 @@ Typically \"page-%s.png\".") ;; Toggle between text and image display or editing (define-key map (kbd "C-c C-c") 'doc-view-toggle-display) map) - "Keymap used by `doc-minor-view-mode'.") + "Keymap used by `doc-view-minor-mode'.") ;;;; Navigation Commands diff --git a/lisp/electric.el b/lisp/electric.el index 7038b91c26d..50ddf525ca4 100644 --- a/lisp/electric.el +++ b/lisp/electric.el @@ -424,7 +424,7 @@ If multiple rules match, only first one is executed.") ;; ;; FIXME: when `newline'ing, we exceptionally ;; prevent a specific behavior of - ;; `eletric-pair-mode', that of opening an extra + ;; `electric-pair-mode', that of opening an extra ;; newline between newly inserted matching paris. ;; In theory that behavior should be provided by ;; `electric-layout-mode' instead, which should be diff --git a/lisp/emacs-lisp/eieio-base.el b/lisp/emacs-lisp/eieio-base.el index 2cb1f614ce3..f6746eb981f 100644 --- a/lisp/emacs-lisp/eieio-base.el +++ b/lisp/emacs-lisp/eieio-base.el @@ -201,7 +201,7 @@ This is used with the `object-write' method.") "Saving this object should make backup files. Setting to nil will mean no backups are made.")) "This special class enables persistence through save files -Use the `object-save' method to write this object to disk. The save +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' specified will not be saved." diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el index 764354b03b7..3c4891b49ae 100644 --- a/lisp/emacs-lisp/ert.el +++ b/lisp/emacs-lisp/ert.el @@ -729,7 +729,7 @@ run. ARGS are the arguments to `debugger'." ;; This means we have to limit `print-level' and ;; `print-length' when printing result objects. That ;; might not be worth while when we can also use - ;; `ert-results-rerun-test-debugging-errors-at-point', + ;; `ert-results-rerun-test-at-point-debugging-errors', ;; (i.e., when running interactively) but having the ;; backtrace ready for printing is important for batch ;; use. @@ -951,7 +951,7 @@ Selectors that do not, such as (member ...), just return the set implied by them without checking whether it is really contained in UNIVERSE." ;; This code needs to match the cases in - ;; `ert-insert-human-readable-selector'. + ;; `ert--insert-human-readable-selector'. (pcase-exhaustive selector ('nil nil) ('t (pcase-exhaustive universe diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 7d6be3cf4e2..fc8dfe12ca2 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -3593,7 +3593,7 @@ This is used for `tabulated-list-format' in `package-menu-mode'." (string< a b)))) (defun package-menu--populate-new-package-list () - "Decide which packages are new in `package-archives-contents'. + "Decide which packages are new in `package-archive-contents'. Store this list in `package-menu--new-package-list'." ;; Find which packages are new. (when package-menu--old-archive-contents diff --git a/lisp/emacs-lisp/re-builder.el b/lisp/emacs-lisp/re-builder.el index 0e1618e010a..5e01895b9fc 100644 --- a/lisp/emacs-lisp/re-builder.el +++ b/lisp/emacs-lisp/re-builder.el @@ -301,7 +301,7 @@ Except for Lisp syntax this is the same as `reb-regexp'.") "Keymap used by the RE Builder for the subexpression mode.") (defun reb-mode-common () - "Setup functions common to functions `reb-mode' and `reb-mode-lisp'." + "Setup functions common to functions `reb-mode' and `reb-lisp-mode'." (setq reb-mode-string "" reb-valid-string "" @@ -513,7 +513,7 @@ If SUBEXP is non-nil mark only the corresponding sub-expressions." (reb-update-overlays subexp)) (defun reb-auto-update (_beg _end _lenold &optional force) - "Called from `after-update-functions' to update the display. + "Called from `after-change-functions' to update the display. BEG, END and LENOLD are passed in from the hook. An actual update is only done if the regexp has changed or if the optional fourth argument FORCE is non-nil." diff --git a/lisp/erc/erc-track.el b/lisp/erc/erc-track.el index 41d8fc1a98f..490b2937771 100644 --- a/lisp/erc/erc-track.el +++ b/lisp/erc/erc-track.el @@ -864,7 +864,7 @@ is in `erc-mode'." (defvar erc-track-last-non-erc-buffer nil "Stores the name of the last buffer you were in before activating -`erc-track-switch-buffers'.") +`erc-track-switch-buffer'.") (defun erc-track-sort-by-activest () "Sort erc-modified-channels-alist by activity. diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index cfde84e19aa..3033122437a 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -4969,7 +4969,7 @@ information if it is not already present in the user or channel lists. If, and only if, changes are made, or the user is added, -`erc-channel-members-updated-hook' is run, and t is returned. +`erc-channel-members-changed-hook' is run, and t is returned. See also: `erc-update-user' and `erc-update-channel-member'." (let* (changed user-changed @@ -6002,7 +6002,7 @@ Sets the buffer local variables: - `erc-session-connector' - `erc-session-server' - `erc-session-port' -- `erc-session-full-name' +- `erc-session-user-full-name' - `erc-server-current-nick'" (setq erc-session-connector erc-server-connect-function erc-session-server (erc-compute-server server) diff --git a/lisp/eshell/esh-util.el b/lisp/eshell/esh-util.el index 0328c1f12fa..adf39061468 100644 --- a/lisp/eshell/esh-util.el +++ b/lisp/eshell/esh-util.el @@ -547,7 +547,7 @@ list." string))) (defun eshell-directory-files-and-attributes (dir &optional full match nosort id-format) - "Make sure to use the handler for `directory-file-and-attributes'." + "Make sure to use the handler for `directory-files-and-attributes'." (let* ((dir (expand-file-name dir))) (if (string-equal (file-remote-p dir 'method) "ftp") (let ((files (directory-files dir full match nosort))) diff --git a/lisp/faces.el b/lisp/faces.el index 4d1d9561d49..48c1776648f 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -1773,7 +1773,7 @@ If FRAME is nil, that stands for the selected frame." (defun defined-colors-with-face-attributes (&optional frame) "Return a list of colors supported for a particular frame. See `defined-colors' for arguments and return value. In contrast -to `define-colors' the elements of the returned list are color +to `defined-colors' the elements of the returned list are color strings with text properties, that make the color names render with the color they represent as background color." (mapcar diff --git a/lisp/ffap.el b/lisp/ffap.el index 66ef0824d8a..e60478c0b26 100644 --- a/lisp/ffap.el +++ b/lisp/ffap.el @@ -172,7 +172,7 @@ well-formed, such as \"user@host\" or \"\"." :version "25.2") ; nil -> t (defcustom ffap-ftp-default-user "anonymous" - "User name in FTP file names generated by `ffap-host-to-path'. + "User name in FTP file names generated by `ffap-host-to-filename'. Note this name may be omitted if it equals the default \(either `efs-default-user' or `ange-ftp-default-user')." :type 'string diff --git a/lisp/filecache.el b/lisp/filecache.el index 3c07a494206..b2d3bea8aaf 100644 --- a/lisp/filecache.el +++ b/lisp/filecache.el @@ -46,7 +46,7 @@ ;; * `file-cache-add-file-list': Adds a list of files to the cache ;; ;; The following functions use the regular expressions in -;; `file-cache-delete-regexps' to eliminate unwanted files: +;; `file-cache-filter-regexps' to eliminate unwanted files: ;; ;; * `file-cache-add-directory': Adds the files in a directory to the ;; cache. You can also specify a regular expression to match the files diff --git a/lisp/filesets.el b/lisp/filesets.el index 9834bcf0587..c43c468ead3 100644 --- a/lisp/filesets.el +++ b/lisp/filesets.el @@ -52,7 +52,7 @@ ;; BTW, if you close a fileset, files, which have been changed, will ;; be silently saved. Change this behavior by setting -;; `filesets-save-buffer-fn'. +;; `filesets-save-buffer-function'. ;;; Supported modes for inclusion groups (`filesets-ingroup-patterns'): ;; - Elisp diff --git a/lisp/follow.el b/lisp/follow.el index d499da7a8dc..f1d823d9f03 100644 --- a/lisp/follow.el +++ b/lisp/follow.el @@ -113,7 +113,7 @@ ;; whatever you would like to do. These functions are then added to ;; a hook. ;; -;; The keymap `follow-key-map' contains key bindings activated by +;; The keymap `follow-mode-map' contains key bindings activated by ;; `follow-mode'. ;; ;; Example: @@ -356,7 +356,7 @@ property `follow-mode-use-cache' to non-nil.") Used by `follow-window-size-change'.") (defvar follow-windows-start-end-cache nil - "Cache used by `follow-window-start-end'.") + "Cache used by `follow-window-start' and `follow-window-end'.") (defvar follow-fixed-window nil "If non-nil, the current window must not be scrolled. diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 506c888ff64..30edebb4e68 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -821,7 +821,7 @@ happens, so the major mode can be corrected." ;; `font-lock-keywords-alist'. (when top-cell (dolist (keyword-list-how-pair (cdr top-cell)) - ;; `keywords-list-how-pair' is a cons with a list of + ;; `keyword-list-how-pair' is a cons with a list of ;; keywords in the car top-cell and the original how ;; argument in the cdr top-cell. (setcar keyword-list-how-pair diff --git a/lisp/forms.el b/lisp/forms.el index fcb6075f94b..3f9f1c9980f 100644 --- a/lisp/forms.el +++ b/lisp/forms.el @@ -286,7 +286,7 @@ ;; record. ;; ;; `write-file-functions' is defined to save the actual data file -;; instead of the buffer data, `revert-file-hook' is defined to +;; instead of the buffer data, `revert-buffer-function' is defined to ;; revert a forms to original. ;;; Code: diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index 3429d6560b7..f255cfc74a0 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el @@ -1379,7 +1379,7 @@ SPEC is a predicate specifier that contains stuff like `or', `and', (autoload 'ido-completing-read "ido") (defun gnus-ido-completing-read (prompt collection &optional require-match initial-input history def) - "Call `ido-completing-read-function'." + "Call `ido-completing-read'." (ido-completing-read prompt collection nil require-match initial-input history def)) diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index cbdd329f3ec..6c425b0ea16 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -8019,7 +8019,7 @@ See `gmm-tool-bar-from-list' for the format of the list." (library image &optional path no-error)) (defun message-make-tool-bar (&optional force) - "Make a message mode tool bar from `message-tool-bar-list'. + "Make a message mode tool bar from `message-tool-bar'. When FORCE, rebuild the tool bar." (when (and (boundp 'tool-bar-mode) tool-bar-mode diff --git a/lisp/gnus/nndiary.el b/lisp/gnus/nndiary.el index 24a3df1e27a..a7657c68556 100644 --- a/lisp/gnus/nndiary.el +++ b/lisp/gnus/nndiary.el @@ -178,7 +178,7 @@ The hook functions will be called with the full group name as argument." (define-obsolete-variable-alias 'nndiary-request-update-info-hooks 'nndiary-request-update-info-functions "24.3") (defcustom nndiary-request-update-info-functions nil - "Hook run after `nndiary-request-update-info-group' is executed. + "Hook run after `nndiary-request-update-info' is executed. The hook functions will be called with the full group name as argument." :group 'nndiary :type 'hook) diff --git a/lisp/gnus/nnmaildir.el b/lisp/gnus/nnmaildir.el index b0e79d4f238..9cf766ee465 100644 --- a/lisp/gnus/nnmaildir.el +++ b/lisp/gnus/nnmaildir.el @@ -1761,7 +1761,7 @@ This variable is set by `nnmaildir-request-article'.") nnmaildir--cur-server nil) ;; This slightly obscure invocation of `alist-get' removes SERVER from - ;; `nnmaildir-servers'. + ;; `nnmaildir--servers'. (setf (alist-get (nnmaildir--srv-address server) nnmaildir--servers server 'remove #'equal) server)) diff --git a/lisp/image-dired.el b/lisp/image-dired.el index 768e941490d..8025060b0ea 100644 --- a/lisp/image-dired.el +++ b/lisp/image-dired.el @@ -65,7 +65,7 @@ ;; * For non-lossy rotation of JPEG images, the JpegTRAN program is ;; needed. ;; -;; * For `image-dired-get-exif-data' and `image-dired-write-exif-data' to work, +;; * For `image-dired-get-exif-data' and `image-dired-set-exif-data' to work, ;; the command line tool `exiftool' is needed. It can be found here: ;; http://www.sno.phy.queensu.ca/~phil/exiftool/. These two functions ;; are, among other things, used for writing comments to image files @@ -310,7 +310,7 @@ temporary file name (typically generated by pnqnq)." :group 'image-dired) (defcustom image-dired-cmd-optipng-options '("-o5" "%t") - "Arguments passed to `image-dired-optipng-program'. + "Arguments passed to `image-dired-cmd-optipng-program'. Available format specifiers are described in `image-dired-cmd-create-thumbnail-options'." :version "26.1" diff --git a/lisp/image.el b/lisp/image.el index 4ea8594a974..963991d6418 100644 --- a/lisp/image.el +++ b/lisp/image.el @@ -840,7 +840,7 @@ multiplication factor for the current value." N=0 refers to the initial animation frame. COUNT is the total number of frames in the animation. TIME-ELAPSED is the total time that has elapsed since -`image-animate-start' was called. +`image-animate' was called. LIMIT determines when to stop. If t, loop forever. If nil, stop after displaying the last animation frame. Otherwise, stop after LIMIT seconds have elapsed. diff --git a/lisp/jsonrpc.el b/lisp/jsonrpc.el index 65c0df8f57c..4567b14da11 100644 --- a/lisp/jsonrpc.el +++ b/lisp/jsonrpc.el @@ -240,8 +240,8 @@ JSON object. The caller can expect SUCCESS-FN or ERROR-FN to be called with a JSONRPC `:result' or `:error' object, respectively. If this doesn't happen after TIMEOUT seconds (defaults to -`jsonrpc-request-timeout'), the caller can expect TIMEOUT-FN to be -called with no arguments. The default values of SUCCESS-FN, +`jrpc-default-request-timeout'), the caller can expect TIMEOUT-FN +to be called with no arguments. The default values of SUCCESS-FN, ERROR-FN and TIMEOUT-FN simply log the events into `jsonrpc-events-buffer'. @@ -606,7 +606,7 @@ TIMEOUT is nil)." (if (jsonrpc-connection-ready-p connection deferred) ;; Server is ready, we jump below and send it immediately. (remhash (list deferred buf) (jsonrpc--deferred-actions connection)) - ;; Otherwise, save in `eglot--deferred-actions' and exit non-locally + ;; Otherwise, save in `jsonrpc--deferred-actions' and exit non-locally (unless old-id (jsonrpc--debug connection `(:deferring ,method :id ,id :params ,params))) diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 3feff803e3e..5a2391d6272 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -2809,7 +2809,7 @@ The current mail message becomes the message displayed." (with-current-buffer rmail-view-buffer ;; We give the view buffer a buffer-local value of ;; rmail-header-style based on the binding in effect when - ;; this function is called; `rmail-toggle-headers' can + ;; this function is called; `rmail-toggle-header' can ;; inspect this value to determine how to toggle. (set (make-local-variable 'rmail-header-style) header-style) ;; In case viewing the previous message sets the paragraph diff --git a/lisp/mh-e/mh-compat.el b/lisp/mh-e/mh-compat.el index 92b7d801c7b..c02b095b2ea 100644 --- a/lisp/mh-e/mh-compat.el +++ b/lisp/mh-e/mh-compat.el @@ -134,7 +134,7 @@ introduced in Emacs 22." (defmacro mh-face-background (face &optional frame inherit) "Return the background color name of face, or nil if unspecified. -See documentation for `back-foreground' for a description of the +See documentation for `face-background' for a description of the arguments FACE, FRAME, and INHERIT. This macro is used by Emacs versions that lack an INHERIT argument, introduced in Emacs 22." diff --git a/lisp/mh-e/mh-junk.el b/lisp/mh-e/mh-junk.el index eea04c63783..ebc5038a194 100644 --- a/lisp/mh-e/mh-junk.el +++ b/lisp/mh-e/mh-junk.el @@ -58,7 +58,7 @@ program, see: (defun mh-blacklist-a-msg (message) "Blacklist MESSAGE. If MESSAGE is nil then the message at point is blacklisted. -The hook `mh-blacklisted-msg-hook' is called after you mark a message +The hook `mh-blacklist-msg-hook' is called after you mark a message for blacklisting." (save-excursion (if (numberp message) diff --git a/lisp/net/nsm.el b/lisp/net/nsm.el index e94947bc7f1..f84c1b3094f 100644 --- a/lisp/net/nsm.el +++ b/lisp/net/nsm.el @@ -164,7 +164,7 @@ STATUS SETTINGS. HOST is the host domain, PORT is a TCP port number, STATUS is the peer status returned by `gnutls-peer-status', and SETTINGS is the persistent and session settings for the host HOST. Please refer to the contents of -`nsm-setting-file' for details. If a problem is found, the check +`nsm-settings-file' for details. If a problem is found, the check function is required to return an error message, and nil otherwise. diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 9e8a3168fd7..7adfb49a858 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -753,7 +753,7 @@ for($i = 0; $i < $n; $i++) $stat[1]); } printf(\")\\n\");' \"$1\" \"$2\" 2>/dev/null" - "Perl script implementing `directory-files-attributes' as Lisp `read'able + "Perl script implementing `directory-files-and-attributes' as Lisp `read'able output. Escape sequence %s is replaced with name of Perl binary. This string is passed to `format', so percent characters need to be doubled.") diff --git a/lisp/notifications.el b/lisp/notifications.el index e6ce9a5d76d..3c2a8cf39c0 100644 --- a/lisp/notifications.el +++ b/lisp/notifications.el @@ -108,7 +108,7 @@ (setq notifications-on-action-object nil))))) (defun notifications-on-closed-signal (id &optional reason) - "Dispatch signals to callback functions from `notifications-on-closed-map'." + "Dispatch signals to callback functions from `notifications-on-close-map'." ;; notification-daemon prior 0.4.0 does not send a reason. So we ;; make it optional, and assume `undefined' as default. (let* ((bus (dbus-event-bus-name last-input-event)) diff --git a/lisp/org/ol-bibtex.el b/lisp/org/ol-bibtex.el index ad6622714dd..f139d645dad 100644 --- a/lisp/org/ol-bibtex.el +++ b/lisp/org/ol-bibtex.el @@ -318,7 +318,7 @@ is non-nil." "Controls whether inherited tags are converted to bibtex keywords. It is relevant only if `org-bibtex-tags-are-keywords' is non-nil. Tag inheritance itself is controlled by `org-use-tag-inheritance' -and `org-exclude-tags-from-inheritance'." +and `org-tags-exclude-from-inheritance'." :group 'org-bibtex :version "26.1" :package-version '(Org . "8.3") diff --git a/lisp/org/org-num.el b/lisp/org/org-num.el index a6ddce733c8..5b8e1dbb6d1 100644 --- a/lisp/org/org-num.el +++ b/lisp/org/org-num.el @@ -131,7 +131,7 @@ For example, add \"ARCHIVE\" to this list to avoid numbering archived sub-trees. Tag in this list prevent numbering the whole sub-tree, -irrespective to `org-use-tags-inheritance', or other means to +irrespective to `org-use-tag-inheritance', or other means to control tag inheritance." :group 'org-appearance :package-version '(Org . "9.3") diff --git a/lisp/org/org.el b/lisp/org/org.el index 568f5b9b873..a7502d188e2 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el @@ -2059,7 +2059,7 @@ taken from the (otherwise obsolete) variable `org-todo-interpretation'." (choice :tag "Interpretation" ;;Quick and dirty way to see - ;;`org-todo-interpretations'. This takes the + ;;`org-todo-interpretation'. This takes the ;;place of item arguments :convert-widget (lambda (widget) diff --git a/lisp/printing.el b/lisp/printing.el index 181092ee999..0c564237da6 100644 --- a/lisp/printing.el +++ b/lisp/printing.el @@ -4721,7 +4721,7 @@ Each element has the form: (MENU-PART . NUMBER-OF-ITEMS) -See `pr-visible-entry-alist'.") +See `pr-visible-entry-list'.") (defun pr-menu-index (entry index) diff --git a/lisp/progmodes/antlr-mode.el b/lisp/progmodes/antlr-mode.el index bf56a7ee49e..e63e4d65fb5 100644 --- a/lisp/progmodes/antlr-mode.el +++ b/lisp/progmodes/antlr-mode.el @@ -1875,7 +1875,7 @@ cell where the two values determine the area inside the braces." (defun antlr-option-spec (level option specs existsp) "Return version correct option value specification. Return specification for option OPTION of kind level LEVEL. SPECS -should correspond to the VALUE-SPEC... in `antlr-option-alists'. +should correspond to the VALUE-SPEC... in `antlr-options-alists'. EXISTSP determines whether the option already exists." (let (value) (while (and specs (>= antlr-tool-version (caar specs))) diff --git a/lisp/progmodes/ebrowse.el b/lisp/progmodes/ebrowse.el index bb780259333..c84803a3fab 100644 --- a/lisp/progmodes/ebrowse.el +++ b/lisp/progmodes/ebrowse.el @@ -3616,7 +3616,7 @@ completion." ;;; Tags query replace & search (defvar ebrowse-tags-loop-form () - "Form for `ebrowse-loop-continue'. + "Form for `ebrowse-tags-loop-continue'. Evaluated for each file in the tree. If it returns nil, proceed with the next file.") diff --git a/lisp/progmodes/flymake-cc.el b/lisp/progmodes/flymake-cc.el index bddd1a39fc2..1e9e25641d5 100644 --- a/lisp/progmodes/flymake-cc.el +++ b/lisp/progmodes/flymake-cc.el @@ -86,7 +86,7 @@ SOURCE." (cond ((derived-mode-p 'c++-mode) "c++") (t "c"))))) -(defvar-local flymake-cc--proc nil "Internal variable for `flymake-gcc'") +(defvar-local flymake-cc--proc nil "Internal variable for `flymake-cc'") ;; forward declare this to shoosh compiler (instead of requiring ;; flymake-proc) diff --git a/lisp/progmodes/hideif.el b/lisp/progmodes/hideif.el index 10416ead603..f5af277dc5e 100644 --- a/lisp/progmodes/hideif.el +++ b/lisp/progmodes/hideif.el @@ -250,7 +250,7 @@ Effective only if `hide-ifdef-expand-reinclusion-protection' is t." (defvar hide-ifdef-env-backup nil "This variable is a backup of the previously cleared `hide-ifdef-env'. -This backup prevents any accidental clearance of `hide-fidef-env' by +This backup prevents any accidental clearance of `hide-ifdef-env' by `hif-clear-all-ifdef-defined'.") (defvar hif-outside-read-only nil diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 785b941402a..2d47cdc4068 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -2095,7 +2095,7 @@ virtualenv." :group 'python) (defcustom python-shell-setup-codes nil - "List of code run by `python-shell-send-setup-codes'." + "List of code run by `python-shell-send-setup-code'." :type '(repeat symbol) :group 'python) @@ -2383,9 +2383,11 @@ regexps: `python-shell-prompt-regexp', (defun python-shell-prompt-set-calculated-regexps () "Detect and set input and output prompt regexps. -Build and set the values for `python-shell-input-prompt-regexp' -and `python-shell-output-prompt-regexp' using the values from -`python-shell-prompt-regexp', `python-shell-prompt-block-regexp', +Build and set the values for +`python-shell--prompt-calculated-input-regexp' and +`python-shell--prompt-calculated-output-regexp' using the values +from `python-shell-prompt-regexp', +`python-shell-prompt-block-regexp', `python-shell-prompt-pdb-regexp', `python-shell-prompt-output-regexp', `python-shell-prompt-input-regexps', @@ -2447,7 +2449,7 @@ of `python-shell-buffer-name'." (defun python-shell-internal-get-process-name () "Calculate the appropriate process name for Internal Python process. -The name is calculated from `python-shell-global-buffer-name' and +The name is calculated from `python-shell-buffer-name' and the `buffer-name'." (format "%s[%s]" python-shell-internal-buffer-name (buffer-name))) @@ -4718,7 +4720,7 @@ customize how labels are formatted." (defun python-imenu-create-flat-index (&optional alist prefix) "Return flat outline of the current Python buffer for Imenu. Optional argument ALIST is the tree to be flattened; when nil -`python-imenu-build-index' is used with +`python-imenu-create-index' is used with `python-imenu-format-parent-item-jump-label-function' `python-imenu-format-parent-item-label-function' `python-imenu-format-item-label-function' set to diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index a04c26d2764..7d1f5ef6544 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el @@ -2866,8 +2866,8 @@ See `sql-product-alist' for a list of products and supported features." The KEYWORDS-ONLY flag is passed to font-lock to specify whether only keywords should be highlighted and syntactic highlighting -skipped. The IMENU flag indicates whether `imenu-mode' should -also be configured." +skipped. The IMENU flag indicates whether `imenu' should also be +configured." (let ;; Get the product-specific syntax-alist. diff --git a/lisp/ps-print.el b/lisp/ps-print.el index ace30017814..aade09214c0 100644 --- a/lisp/ps-print.el +++ b/lisp/ps-print.el @@ -2198,7 +2198,7 @@ The values for `ps-line-number-start': `ps-line-number-step' inclusive. * If `ps-line-number-step' is set to `zebra', must be between 1 and the - value of `ps-zebra-strip-height' inclusive. Use this combination if you + value of `ps-zebra-stripe-height' inclusive. Use this combination if you wish that line number be relative to zebra stripes." :type '(integer :tag "Start Step Interval") :version "20" diff --git a/lisp/ps-samp.el b/lisp/ps-samp.el index 7c688d53fa9..656ad3e79b8 100644 --- a/lisp/ps-samp.el +++ b/lisp/ps-samp.el @@ -57,7 +57,7 @@ (interactive) (ps-print-message-from-summary 'rmail-summary-buffer "RMAIL")) -;; Used in `ps-rmail-print-article-from-summary', +;; Used in `ps-rmail-print-message-from-summary', ;; `ps-gnus-print-article-from-summary' and `ps-vm-print-message-from-summary'. (defun ps-print-message-from-summary (summary-buffer summary-default) (let ((ps-buf (or (and (boundp summary-buffer) diff --git a/lisp/ses.el b/lisp/ses.el index 218043f2192..b3811afd71a 100644 --- a/lisp/ses.el +++ b/lisp/ses.el @@ -395,7 +395,7 @@ left-justification of the result. Set to error-signal if `ses-call-printer' encountered an error during printing. Otherwise nil.") (defvar ses-start-time nil - "Time when current operation started. Used by `ses-time-check' to decide + "Time when current operation started. Used by `ses--time-check' to decide when to emit a progress message.") diff --git a/lisp/startup.el b/lisp/startup.el index 364689ccdbf..c8b36e205fd 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -1509,7 +1509,7 @@ Consider using a subdirectory instead, e.g.: %s" (defun x-apply-session-resources () "Apply X resources which specify initial values for Emacs variables. This is called from a window-system initialization function, such -as `x-initialize-window-system' for X, either at startup (prior +as `window-system-initialization' for X, either at startup (prior to reading the init file), or afterwards when the user first opens a graphical frame. diff --git a/lisp/strokes.el b/lisp/strokes.el index 7a88744540b..334e1a72d38 100644 --- a/lisp/strokes.el +++ b/lisp/strokes.el @@ -102,7 +102,7 @@ ;; The default value (9) should be fine for most decent computers. ;; NOTE: This variable should not be set to a number less than 3. -;; `strokes-display-strokes-buffer' will allow you to hide the strokes +;; `strokes-use-strokes-buffer' will allow you to hide the strokes ;; buffer when doing simple strokes. This is a speedup for slow ;; computers as well as people who don't want to see their strokes. @@ -579,7 +579,7 @@ The grid is a square whose dimension is [0,GRID-RESOLUTION)." (defun strokes-fill-stroke (unfilled-stroke &optional force) "Fill in missing grid locations in the list of UNFILLED-STROKE. -If FORCE is non-nil, then fill the stroke even if it's `stroke-click'. +If FORCE is non-nil, then fill the stroke even if it's `strokes-click-p'. NOTE: This is where the global variable `strokes-last-stroke' is set." (setq strokes-last-stroke ; this is global (if (and (strokes-click-p unfilled-stroke) @@ -1629,7 +1629,7 @@ Optional FORCE non-nil will ignore the buffer's read-only status." ;; The comment below is what I'd have to do if I wanted to ;; deal with random newlines in the midst of the compressed ;; strings. If I do this, I'll also have to change - ;; `strokes-xpm-to-compress-string' to deal with the newline, + ;; `strokes-xpm-to-compressed-string' to deal with the newline, ;; and possibly other whitespace stuff. YUCK! ;; (while (re-search-forward "\\+/\\(\\w\\|\\)+/" nil t nil (get-buffer buffer)) (while (with-current-buffer buffer diff --git a/lisp/tempo.el b/lisp/tempo.el index 9de5ac66c7d..ea072ff9dd7 100644 --- a/lisp/tempo.el +++ b/lisp/tempo.el @@ -540,7 +540,7 @@ and insert the results." ;;; tempo-forward-mark (defun tempo-forward-mark () - "Jump to the next mark in `tempo-forward-mark-list'." + "Jump to the next mark in `tempo-marks'." (interactive) (let ((next-mark (catch 'found (mapc @@ -558,7 +558,7 @@ and insert the results." ;;; tempo-backward-mark (defun tempo-backward-mark () - "Jump to the previous mark in `tempo-back-mark-list'." + "Jump to the previous mark in `tempo-marks'." (interactive) (let ((prev-mark (catch 'found (let (last) diff --git a/lisp/textmodes/artist.el b/lisp/textmodes/artist.el index 9f08772ec30..eb07bb4d910 100644 --- a/lisp/textmodes/artist.el +++ b/lisp/textmodes/artist.el @@ -598,7 +598,7 @@ This variable is initialized by the `artist-make-prev-next-op-alist' function.") (define-key map "\C-c\C-a\C-b" 'artist-submit-bug-report) (define-key map [menu-bar artist] (cons "Artist" artist-menu-map)) map) - "Keymap for `artist-minor-mode'.") + "Keymap for `artist-mode'.") (defvar artist-replacement-table (make-vector 256 0) "Replacement table for `artist-replace-char'.") @@ -1963,7 +1963,8 @@ Return a list (RETURN-CODE STDOUT STDERR)." (defsubst artist-get-char-at-xy (x y) "Return the character found at column X, row Y. -Also updates the variables `artist-draw-min-y' and `artist-draw-max-y'." +Also updates the variables `artist-draw-region-min-y' and +`artist-draw-region-max-y'." (artist-move-to-xy x y) (let ((curr-y (artist-current-line))) (setq artist-draw-region-min-y (min curr-y artist-draw-region-min-y)) @@ -5594,8 +5595,8 @@ The event, EV, is the mouse event." ;; - artist-key-set-point-xxx for setting a point in the ;; mode, to be called from `artist-key-set-point-common'. ;; -;; - artist-key-do-continuously-xxx to be called from -;; `artist-key-do-continuously-common' whenever the user +;; - artist-key-do-continously-xxx to be called from +;; `artist-key-do-continously-common' whenever the user ;; moves around. ;; ;; As for the artist-mouse-draw-xxx, these two functions must diff --git a/lisp/vc/pcvs.el b/lisp/vc/pcvs.el index cb0494ee91c..1e4343cc6be 100644 --- a/lisp/vc/pcvs.el +++ b/lisp/vc/pcvs.el @@ -1624,8 +1624,7 @@ With prefix argument, prompt for cvs flags." (defun-cvs-mode (cvs-mode-diff . DOUBLE) (flags) "Diff the selected files against the repository. This command compares the files in your working area against the -revision which they are based upon. -See also `cvs-diff-ignore-marks'." +revision which they are based upon." (interactive (list (cvs-add-branch-prefix (cvs-add-secondary-branch-prefix diff --git a/lisp/window.el b/lisp/window.el index 5c4ff83d82d..7b75495ad84 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -5404,7 +5404,7 @@ frame. The selected window is not changed by this function." (set-window-parameter (window-parent new) 'window-side window-side)))) ((eq window-combination-resize 'atom) - ;; Make sure `window--check-frame' won't destroy an existing + ;; Make sure `window--check' won't destroy an existing ;; atomic window in case the new window gets nested inside. (unless (window-parameter window 'window-atom) (set-window-parameter window 'window-atom t)) diff --git a/test/lisp/electric-tests.el b/test/lisp/electric-tests.el index 56d1bdb110e..69e5de32bfb 100644 --- a/test/lisp/electric-tests.el +++ b/test/lisp/electric-tests.el @@ -867,7 +867,8 @@ baz\"\"" (should (equal (buffer-string) "int main () {\n \n}")))) (ert-deftest electric-layout-control-reindentation () - "Same as `e-l-int-main-kernel-style', but checking Bug#35254." + "Same as `emacs-lisp-int-main-kernel-style', but checking +Bug#35254." (ert-with-test-buffer () (plainer-c-mode) (electric-layout-local-mode 1) diff --git a/test/lisp/emacs-lisp/backtrace-tests.el b/test/lisp/emacs-lisp/backtrace-tests.el index 12164b46ec3..fbc71e0ec86 100644 --- a/test/lisp/emacs-lisp/backtrace-tests.el +++ b/test/lisp/emacs-lisp/backtrace-tests.el @@ -41,7 +41,7 @@ (backtrace-mode) (setq backtrace-frames (backtrace-get-frames)) (let ((this-index)) - ;; Discard all past `backtrace-tests-make-backtrace'. + ;; Discard all past `backtrace-tests--make-backtrace'. (dotimes (index (length backtrace-frames)) (when (eq (backtrace-frame-fun (nth index backtrace-frames)) 'backtrace-tests--make-backtrace) diff --git a/test/lisp/emacs-lisp/edebug-tests.el b/test/lisp/emacs-lisp/edebug-tests.el index 41811c9dc07..88c4a0fe175 100644 --- a/test/lisp/emacs-lisp/edebug-tests.el +++ b/test/lisp/emacs-lisp/edebug-tests.el @@ -210,7 +210,7 @@ All other elements will be nil." (defvar edebug-tests-thunks nil "List containing thunks to run after each command in a keyboard macro.") (defvar edebug-tests-kbd-macro-index nil - "Index into `edebug-tests-run-unpacked-kbd-macro's current keyboard macro.") + "Index into `edebug-tests-run-kbd-macro's current keyboard macro.") (defun edebug-tests-run-macro (kbdmac &rest thunks) "Run a keyboard macro and execute a thunk after each command in it. diff --git a/test/lisp/files-tests.el b/test/lisp/files-tests.el index ac56a7732f2..11e1f4db794 100644 --- a/test/lisp/files-tests.el +++ b/test/lisp/files-tests.el @@ -960,7 +960,7 @@ unquoted file names." (let ((linkname (expand-file-name "link" nospecial-dir))) (should-error (make-symbolic-link tmpfile linkname)))))))) -;; See `files-tests--file-name-non-special--subprocess'. +;; See `files-tests-file-name-non-special--subprocess'. ;; (ert-deftest files-tests-file-name-non-special-process-file ()) (ert-deftest files-tests-file-name-non-special-rename-file () @@ -1104,7 +1104,7 @@ unquoted file names." (files-tests--with-temp-non-special-and-file-name-handler (tmpfile nospecial) (should (equal (vc-registered nospecial) (vc-registered tmpfile))))) -;; See test `files-tests--file-name-non-special--buffers'. +;; See test `files-tests-file-name-non-special--buffers'. ;; (ert-deftest files-tests-file-name-non-special-verify-visited-file-modtime ()) (ert-deftest files-tests-file-name-non-special-write-region () diff --git a/test/lisp/mail/uudecode-tests.el b/test/lisp/mail/uudecode-tests.el index 61c20075633..4c9650f556c 100644 --- a/test/lisp/mail/uudecode-tests.el +++ b/test/lisp/mail/uudecode-tests.el @@ -43,12 +43,12 @@ (uudecode-tests-read-file (expand-file-name "uuencoded.txt" uudecode-tests-data-dir)) "Uuencoded data for bookmark-tests.el -Same as `bookmark-tests-decoded-str' but uuencoded.") +Same as `uudecode-tests-decoded-str' but uuencoded.") (defvar uudecode-tests-decoded-str (uudecode-tests-read-file (expand-file-name "uudecoded.txt" uudecode-tests-data-dir)) "Plain text data for bookmark-tests.el -Same as `bookmark-tests-encoded-str' but plain text.") +Same as `uudecode-tests-encoded-str' but plain text.") (ert-deftest uudecode-tests-decode-region-internal () ;; Write to buffer diff --git a/test/src/coding-tests.el b/test/src/coding-tests.el index 094a1fad8fa..899025b4c91 100644 --- a/test/src/coding-tests.el +++ b/test/src/coding-tests.el @@ -143,7 +143,7 @@ ;; Optional 5th arg TRANSLATOR is a function to translate the original ;; file contents to match with the expected result of decoding. For ;; instance, when a file of dos eol-type is read by unix eol-type, -;; `decode-test-lf-to-crlf' must be specified. +;; `coding-tests-lf-to-crlf' must be specified. (defun coding-tests (content-type write-coding read-coding detected-coding &optional translator) -- cgit v1.3 From 6a6466031839d5fb4efadbfe2cdbd5ba469dd9c6 Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Fri, 2 Oct 2020 17:25:02 +0000 Subject: Enhance syntax-tests.el to test comments in scan-lists This now tests the interface between scan_lists and the comment functions. * test/src/syntax-tests.el (syntax-br-comments): New macro. ({-in, ;-in, /*-in): Set parse-sexp-ignore-comments to t. (top level): Add 15 tests for comments inside brace lists. * test/data/syntax-comments.txt (top level): Amend some test fragments. --- test/data/syntax-comments.txt | 29 ++++++++------- test/src/syntax-tests.el | 85 ++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 95 insertions(+), 19 deletions(-) (limited to 'test/src') diff --git a/test/data/syntax-comments.txt b/test/data/syntax-comments.txt index 74e08b1b65b..e10c1450e46 100644 --- a/test/data/syntax-comments.txt +++ b/test/data/syntax-comments.txt @@ -23,6 +23,21 @@ 13 15/* /*/15 +/* C Comments within lists */ +59}59 +50{ /* comment */ }50 +51{ /**/ }51 +52{ // comment +}52 +53{ // +}53 +54{ // \ +}54 +55{/* */}55 +56{ /* \*/ }56 +57*/57 +58}58 + /* Straight Pascal comments (not nested) */ 20}20 @@ -46,20 +61,6 @@ 33; \ 33 -/* Comments within lists */ -50{ /* comment */ }50 -51{ /**/ }51 -52{ // comment -}52 -53{ // -}53 -54{ // -}54 -55{/* */}55 -56{ /* \*/ }56 -57*/57 -58}58 - Local Variables: mode: fundamental eval: (set-syntax-table (make-syntax-table)) diff --git a/test/src/syntax-tests.el b/test/src/syntax-tests.el index 4bd8a8519c0..3b3521eaab0 100644 --- a/test/src/syntax-tests.el +++ b/test/src/syntax-tests.el @@ -85,11 +85,11 @@ also has open paren syntax (see Bug#24870)." ;;; Commentary: ;; The next bit tests the handling of comments in syntax.c, in -;; particular the function `forward-comment'. +;; particular the functions `forward-comment' and `scan-lists' (in so +;; far as it relates to comments). ;; It is intended to enhance this bit to test nested comments and also -;; the interaction of `parse-partial-sexp' and `scan-lists' with -;; comments (2020-10-01). +;; the interaction of `parse-partial-sexp' with comments (2020-10-01). ;; This bit uses the data file test/data/syntax-comments.txt. @@ -158,8 +158,7 @@ missing or nil, the value of START is assumed for it." ((eq -dir- 'backward) nil) (t (error "Invalid -dir- argument \"%s\" to `syntax-comments'" -dir-)))) (start-str (format "%d" (abs start))) - (type -type-) - ) + (type -type-)) `(ert-deftest ,(intern (concat "syntax-comments-" syntax-comments-section (if forw "-f" "-b") start-str)) @@ -175,11 +174,66 @@ missing or nil, the value of START is assumed for it." (should (eq (point) stop))) (,(intern (concat (symbol-name type) "-out"))))))) +(defmacro syntax-br-comments (-type- -dir- res -start- &optional stop) + "Create an ERT test to test (scan-lists 1/-1 0). +This is to test the interface between scan-lists and the internal +comment routines in syntax.c. + +The test uses a fixed name data file, which it visits. It calls +entry and exit functions to set up and tear down syntax entries +for comment and paren characters. The test is given a name based +on the global variable `syntax-comments-section', the direction +of movement and the value of -START-. + +-TYPE- (unquoted) is a symbol from whose name the entry and exit +function names are derived by appending \"-in\" and \"-out\". + +-DIR- (unquoted) is `forward' or `backward', the direction +`scan-lists' is attempted. + +RES is t if `scan-lists' is expected to return, nil if it is +expected to raise a `scan-error' exception. + +-START- and STOP are decimal numbers corresponding to labels in the +data file marking the start and expected stop positions. See +`syntax-comments-point' for a precise specification. If STOP is +missing or nil, the value of -START- is assumed for it." + (declare (debug t)) + (let* ((forw + (cond + ((eq -dir- 'forward) t) + ((eq -dir- 'backward) nil) + (t (error "Invalid -dir- argument \"%s\" to `syntax-comments'" -dir-)))) + (start -start-) + (start-str (format "%d" (abs start))) + (type -type-)) + `(ert-deftest ,(intern (concat "syntax-br-comments-" + syntax-comments-section + (if forw "-f" "-b") start-str)) + () + (with-current-buffer + (find-file + ,(expand-file-name "data/syntax-comments.txt" + (getenv "EMACS_TEST_DIRECTORY"))) + (,(intern (concat (symbol-name type) "-in"))) + (let ((start-pos (syntax-comments-point ,start ,forw)) + ,@(if res + `((stop-pos (syntax-comments-point + ,(or stop start) ,(not forw)))))) + ,(if res + `(should + (eq (scan-lists start-pos ,(if forw 1 -1) 0) + stop-pos)) + `(should-error (scan-lists start-pos ,(if forw 1 -1) 0) + :type 'scan-error))) + (,(intern (concat (symbol-name type) "-out"))))))) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; "Pascal" style comments - single character delimiters, the closing ;; delimiter not being newline. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun {-in () + (setq parse-sexp-ignore-comments t) (setq comment-end-can-be-escaped nil) (modify-syntax-entry ?{ "<") (modify-syntax-entry ?} ">")) @@ -208,6 +262,7 @@ missing or nil, the value of START is assumed for it." ;; comments. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun \;-in () + (setq parse-sexp-ignore-comments t) (setq comment-end-can-be-escaped nil) (modify-syntax-entry ?\n ">") (modify-syntax-entry ?\; "<")) @@ -229,6 +284,7 @@ missing or nil, the value of START is assumed for it." ;; Emacs 27 "C" style comments - `comment-end-can-be-escaped' is non-nil. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun /*-in () + (setq parse-sexp-ignore-comments t) (setq comment-end-can-be-escaped t) (modify-syntax-entry ?/ ". 124b") (modify-syntax-entry ?* ". 23") @@ -272,4 +328,23 @@ missing or nil, the value of START is assumed for it." (syntax-comments /* forward t 15) (syntax-comments /* backward t 15) +;; Emacs 27 "C" style comments inside brace lists. +(syntax-br-comments /* forward t 50) +(syntax-br-comments /* backward t 50) +(syntax-br-comments /* forward t 51) +(syntax-br-comments /* backward t 51) +(syntax-br-comments /* forward t 52) +(syntax-br-comments /* backward t 52) + +(syntax-br-comments /* forward t 53) +(syntax-br-comments /* backward t 53) +(syntax-br-comments /* forward t 54 20) +(syntax-br-comments /* backward t 54) +(syntax-br-comments /* forward t 55) +(syntax-br-comments /* backward t 55) + +(syntax-br-comments /* forward t 56 58) +(syntax-br-comments /* backward t 58 56) +(syntax-br-comments /* backward nil 59) + ;;; syntax-tests.el ends here -- cgit v1.3 From d22fe0ec3a321ea222ad2f25c52c7eddea4375df Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Fri, 2 Oct 2020 21:21:06 +0000 Subject: Enhance syntax-tests.el to test comments in parse-partial-sexp This now tests the interface between parse-partial-sexp and the low level comment function in syntax.c * test/src/syntax-tests.el (syntax-comments-midpoint): New function. (syntax-pps-comments): New macro. (top level): Two new syntax-br-comments tests and five new syntax-pps-comments tests. * test/data/syntax-comments.txt (top level): Amend some test fragments and add some more. --- test/data/syntax-comments.txt | 13 +++--- test/src/syntax-tests.el | 92 +++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 95 insertions(+), 10 deletions(-) (limited to 'test/src') diff --git a/test/data/syntax-comments.txt b/test/data/syntax-comments.txt index e10c1450e46..6f595e4d8dc 100644 --- a/test/data/syntax-comments.txt +++ b/test/data/syntax-comments.txt @@ -25,18 +25,19 @@ /* C Comments within lists */ 59}59 -50{ /* comment */ }50 +50{ /*70 comment */71 }50 51{ /**/ }51 -52{ // comment -}52 +52{ //72 comment +73}52 53{ // }53 -54{ // \ +54{ //74 \ }54 55{/* */}55 -56{ /* \*/ }56 -57*/57 +56{ /*76 \*/ }56 +57*/77 58}58 +60{ /*78 \\*/79}60 /* Straight Pascal comments (not nested) */ diff --git a/test/src/syntax-tests.el b/test/src/syntax-tests.el index 3b3521eaab0..56e03380579 100644 --- a/test/src/syntax-tests.el +++ b/test/src/syntax-tests.el @@ -85,11 +85,11 @@ also has open paren syntax (see Bug#24870)." ;;; Commentary: ;; The next bit tests the handling of comments in syntax.c, in -;; particular the functions `forward-comment' and `scan-lists' (in so -;; far as it relates to comments). +;; particular the functions `forward-comment' and `scan-lists' and +;; `parse-partial-sexp' (in so far as they relate to comments). -;; It is intended to enhance this bit to test nested comments and also -;; the interaction of `parse-partial-sexp' with comments (2020-10-01). +;; It is intended to enhance this bit to test nested comments +;; (2020-10-01). ;; This bit uses the data file test/data/syntax-comments.txt. @@ -128,6 +128,23 @@ line that the -N label is on. When it is zero, we return POINT." (progn (end-of-line) (point)) (match-beginning 2))))))) +(defun syntax-comments-midpoint (n) + "Return the buffer offset corresponding to the \"label\" N. +N is a positive decimal number which should appear in the buffer +exactly once. The label need not be at the beginning or end of a +line. + +The return value is the position just before the label. + +If the label N doesn't exist in the current buffer, an exception +is thrown." + (let ((str (format "%d" n))) + (save-excursion + (goto-char (point-min)) + (re-search-forward + (concat "\\(^\\|[^0-9]\\)\\(" str "\\)\\([^0-9\n]\\|$\\)")) + (match-beginning 2)))) + (eval-and-compile (defvar syntax-comments-section)) @@ -228,6 +245,64 @@ missing or nil, the value of -START- is assumed for it." :type 'scan-error))) (,(intern (concat (symbol-name type) "-out"))))))) +(defmacro syntax-pps-comments (-type- -start- open close &optional -stop-) + "Create an ERT test to test `parse-partial-sexp' with comments. +This is to test the interface between `parse-partial-sexp' and +the internal comment routines in syntax.c. + +The test uses a fixed name data file, which it visits. It calls +entry and exit functions to set up and tear down syntax entries +for comment and paren characters. The test is given a name based +on the global variable `syntax-comments-section', and the value +of -START-. + +The generated test calls `parse-partial-sexp' three times, the +first two with COMMENTSTOP set to `syntax-table' so as to stop +after the start and end of the comment. The third call is +expected to stop at the brace/paren matching the one where the +test started. + +-TYPE- (unquoted) is a symbol from whose name the entry and exit +function names are derived by appending \"-in\" and \"-out\". + +-START- and -STOP- are decimal numbers corresponding to labels in +the data file marking the start and expected stop positions. See +`syntax-comments-point' for a precise specification. If -STOP- +is missing or nil, the value of -START- is assumed for it. + +OPEN and CLOSE are decimal numbers corresponding to labels in the +data file marking just after the comment opener and closer where +the `parse-partial-sexp's are expected to stop. See +`syntax-comments-midpoint' for a precise specification." + (declare (debug t)) + (let* ((type -type-) + (start -start-) + (start-str (format "%d" start)) + (stop (or -stop- start))) + `(ert-deftest ,(intern (concat "syntax-pps-comments-" + syntax-comments-section + "-" start-str)) + () + (with-current-buffer + (find-file + ,(expand-file-name "data/syntax-comments.txt" + (getenv "EMACS_TEST_DIRECTORY"))) + (,(intern (concat (symbol-name type) "-in"))) + (let ((start-pos (syntax-comments-point ,start t)) + (open-pos (syntax-comments-midpoint ,open)) + (close-pos (syntax-comments-midpoint ,close)) + (stop-pos (syntax-comments-point ,stop nil)) + s) + (setq s (parse-partial-sexp + start-pos (point-max) 0 nil nil 'syntax-table)) + (should (eq (point) open-pos)) + (setq s (parse-partial-sexp + (point) (point-max) 0 nil s 'syntax-table)) + (should (eq (point) close-pos)) + (setq s (parse-partial-sexp (point) (point-max) 0 nil s)) + (should (eq (point) stop-pos))) + (,(intern (concat (symbol-name type) "-out"))))))) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; "Pascal" style comments - single character delimiters, the closing ;; delimiter not being newline. @@ -346,5 +421,14 @@ missing or nil, the value of -START- is assumed for it." (syntax-br-comments /* forward t 56 58) (syntax-br-comments /* backward t 58 56) (syntax-br-comments /* backward nil 59) +(syntax-br-comments /* forward t 60) +(syntax-br-comments /* backward t 60) + +;; Emacs 27 "C" style comments parsed by `parse-partial-sexp'. +(syntax-pps-comments /* 50 70 71) +(syntax-pps-comments /* 52 72 73) +(syntax-pps-comments /* 54 74 55 20) +(syntax-pps-comments /* 56 76 77 58) +(syntax-pps-comments /* 60 78 79) ;;; syntax-tests.el ends here -- cgit v1.3 From d6a2754348f57883036c0f35f0a880b7817e6bc1 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Fri, 2 Oct 2020 18:02:51 +0200 Subject: ; Fix more typos --- doc/lispref/tips.texi | 2 +- doc/misc/edt.texi | 2 +- doc/misc/emacs-mime.texi | 2 +- doc/misc/gnus.texi | 2 +- etc/compilation.txt | 2 +- lisp/cedet/srecode/fields.el | 2 +- lisp/completion.el | 2 +- lisp/find-file.el | 4 ++-- lisp/international/characters.el | 2 +- lisp/menu-bar.el | 2 +- lisp/progmodes/perl-mode.el | 2 +- m4/pkg.m4 | 2 +- src/w16select.c | 2 +- src/w32select.c | 2 +- test/lisp/net/dbus-tests.el | 2 +- test/lisp/progmodes/python-tests.el | 4 ++-- test/manual/cedet/tests/testnsp.cpp | 2 +- test/src/regex-resources/BOOST.tests | 4 ++-- 18 files changed, 21 insertions(+), 21 deletions(-) (limited to 'test/src') diff --git a/doc/lispref/tips.texi b/doc/lispref/tips.texi index 1826e8f7b42..aaef85897e8 100644 --- a/doc/lispref/tips.texi +++ b/doc/lispref/tips.texi @@ -960,7 +960,7 @@ Using multiple top-level code sections has the advantage that it avoids introducing an additional nesting level but it also means that the section named @samp{Code} does not contain all the code, which is awkward. To avoid that, you should put no code at all inside that -section; that way it can be considered a seperator instead of a +section; that way it can be considered a separator instead of a section heading. Finally, we recommend that you don't end headings with a colon or any diff --git a/doc/misc/edt.texi b/doc/misc/edt.texi index aeb5a261e49..b0200b47456 100644 --- a/doc/misc/edt.texi +++ b/doc/misc/edt.texi @@ -841,7 +841,7 @@ keys, as well. (For example, some people use it to bind the VT200 seldom used back-tick key (@samp{`}) to the function @samp{ESC-prefix} so it will behave like an @key{ESC} key.) The second function, @code{edt-bind-gold-key}, is used to bind emacs commands to gold key -sequences involving alpha-numeric keys, special character keys, and +sequences involving alphanumeric keys, special character keys, and control keys. The third function, @code{edt-bind-function-key}, is terminal dependent diff --git a/doc/misc/emacs-mime.texi b/doc/misc/emacs-mime.texi index 9180b4ec205..316a1baf576 100644 --- a/doc/misc/emacs-mime.texi +++ b/doc/misc/emacs-mime.texi @@ -476,7 +476,7 @@ to launch any external programs, set this variable to @code{nil} or @vindex mm-inline-font-lock If non-@code{nil}, inlined parts that support font locking (for instance, patches or code snippets) will be font-locked. This may be -overriden by callers that have their own ways of enabling/inhibiting +overridden by callers that have their own ways of enabling/inhibiting font locking. @end table diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index a1c8b327f26..ee20d28ce66 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi @@ -29422,7 +29422,7 @@ collection of @acronym{NOV} lines. @item @acronym{NOV} @cindex @acronym{NOV} @acronym{NOV} stands for News OverView, which is a type of news server -header which provide datas containing the condensed header information +header which provide data containing the condensed header information of articles. They are produced by the server itself; in the @code{nntp} back end Gnus uses the ones that the @acronym{NNTP} server makes, but Gnus makes them by itself for some backends (in particular, @code{nnml}). diff --git a/etc/compilation.txt b/etc/compilation.txt index df0b82ebc92..7e406389d44 100644 --- a/etc/compilation.txt +++ b/etc/compilation.txt @@ -153,7 +153,7 @@ Failing Scenarios: cucumber foo/cucumber.feature:6 # Scenario: assertion false (Test::Unit) cucumber foo/cucumber.feature:9 # Scenario: assertion false (RSpec) cucumber foo/cucumber.feature:12 # Scenario: backtrace in step definition -cucumber foo/cucumber.feature:15 # Scenario: deeep backtrace in step definition +cucumber foo/cucumber.feature:15 # Scenario: deep backtrace in step definition 5 scenarios (4 failed, 1 undefined) 5 steps (4 failed, 1 undefined) diff --git a/lisp/cedet/srecode/fields.el b/lisp/cedet/srecode/fields.el index e46c5820c55..87c7c684dab 100644 --- a/lisp/cedet/srecode/fields.el +++ b/lisp/cedet/srecode/fields.el @@ -164,7 +164,7 @@ Has virtual :start and :end initializers.") (cl-defmethod srecode-overlaid-text ((olaid srecode-overlaid) &optional set-to) "Return the text under OLAID. -If SET-TO is a string, then replace the text of OLAID wit SET-TO." +If SET-TO is a string, then replace the text of OLAID with SET-TO." (let* ((ol (oref olaid overlay)) (start (overlay-start ol))) (if (not (stringp set-to)) diff --git a/lisp/completion.el b/lisp/completion.el index e4a004f1908..8a4c1676145 100644 --- a/lisp/completion.el +++ b/lisp/completion.el @@ -2041,7 +2041,7 @@ Patched to remove the most recent completion." ;; All common separators (eg. space "(" ")" """) characters go through a ;; function to add new words to the list of words to complete from. -;; If the character before this was an alpha-numeric then this adds the +;; If the character before this was an alphanumeric then this adds the ;; symbol before point to the completion list (using ADD-COMPLETION). (defvar completion-separator-chars diff --git a/lisp/find-file.el b/lisp/find-file.el index 7e0127da5f2..84d02cb4a26 100644 --- a/lisp/find-file.el +++ b/lisp/find-file.el @@ -109,8 +109,8 @@ ;; file. ;; CREDITS: -;; Many thanks go to TUSC Computer Systems Pty Ltd for providing an environ- -;; ment that made the development of this package possible. +;; Many thanks go to TUSC Computer Systems Pty Ltd for providing an +;; environment that made the development of this package possible. ;; ;; Many thanks also go to all those who provided valuable feedback throughout ;; the development of this package: diff --git a/lisp/international/characters.el b/lisp/international/characters.el index b7656d9c1a7..0b6920cf180 100644 --- a/lisp/international/characters.el +++ b/lisp/international/characters.el @@ -60,7 +60,7 @@ Vietnamese") ;; For each group (row) of 2-byte character sets. (define-category ?A "2-byte alnum -Alpha-numeric characters of 2-byte character sets") +Alphanumeric characters of 2-byte character sets") (define-category ?C "2-byte han Chinese (Han) characters of 2-byte character sets") (define-category ?G "2-byte Greek diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index d3e434aec90..1b3e102cfa7 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@ -671,7 +671,7 @@ PROPS are additional properties." &rest body) "Define a menu-bar toggle command. See `menu-bar-make-toggle-command', for which this is a -compatability wrapper. BODY is passed in as SETTING-SEXP in that macro." +compatibility wrapper. BODY is passed in as SETTING-SEXP in that macro." (declare (obsolete menu-bar-make-toggle-command "28.1")) `(menu-bar-make-toggle-command ,command ,variable ,item-name ,message ,help ,(and body diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index 127b24cb890..7265aeee45d 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el @@ -258,7 +258,7 @@ ;; (or some similar separator), or by one of the special keywords ;; corresponding to builtin functions that can take their first arg ;; without parentheses. Of course, that presume we're looking at the - ;; *opening* slash. We can afford to mis-match the closing ones + ;; *opening* slash. We can afford to mismatch the closing ones ;; here, because they will be re-treated separately later in ;; perl-font-lock-special-syntactic-constructs. ((concat perl--syntax-exp-intro-regexp "\\(/\\)") diff --git a/m4/pkg.m4 b/m4/pkg.m4 index 13a88901786..f9075e56c87 100644 --- a/m4/pkg.m4 +++ b/m4/pkg.m4 @@ -86,7 +86,7 @@ dnl Check to see whether a particular set of modules exists. Similar to dnl PKG_CHECK_MODULES(), but does not set variables or print errors. dnl dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) -dnl only at the first occurence in configure.ac, so if the first place +dnl only at the first occurrence in configure.ac, so if the first place dnl it's called might be skipped (such as if it is within an "if", you dnl have to call PKG_CHECK_EXISTS manually AC_DEFUN([PKG_CHECK_EXISTS], diff --git a/src/w16select.c b/src/w16select.c index 5a68162e25c..b56ced4f2e5 100644 --- a/src/w16select.c +++ b/src/w16select.c @@ -224,7 +224,7 @@ set_clipboard_data (unsigned Format, void *Data, unsigned Size, int Raw) if (!Raw) { - /* avoid using strchr because it recomputes the length everytime */ + /* avoid using strchr because it recomputes the length every time */ while ((dp = memchr (dp, '\n', Size - (dp - dstart))) != 0) { truelen++; diff --git a/src/w32select.c b/src/w32select.c index 9a4b43bc69a..4e5bd6a00f0 100644 --- a/src/w32select.c +++ b/src/w32select.c @@ -956,7 +956,7 @@ DEFUN ("w32-get-clipboard-data", Fw32_get_clipboard_data, truelen = nbytes; dst = src; - /* avoid using strchr because it recomputes the length everytime */ + /* avoid using strchr because it recomputes the length every time */ while ((dst = memchr (dst, '\r', nbytes - (dst - src))) != NULL) { if (dst[1] == '\n') /* safe because of trailing '\0' */ diff --git a/test/lisp/net/dbus-tests.el b/test/lisp/net/dbus-tests.el index 759cd102892..7ebef5d2609 100644 --- a/test/lisp/net/dbus-tests.el +++ b/test/lisp/net/dbus-tests.el @@ -316,7 +316,7 @@ (dbus-check-arguments :session dbus--test-service :double "string") :type 'wrong-type-argument) - ;; `:unix-fd'. UNIX file descriptors are transfered out-of-band. + ;; `:unix-fd'. UNIX file descriptors are transferred out-of-band. ;; We do not support this, and so we cannot do much testing here for ;; `:unix-fd' being an argument (which is an index to the file ;; descriptor in the array of file descriptors that accompany the diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el index 6b3e63653be..bc77443ff4f 100644 --- a/test/lisp/progmodes/python-tests.el +++ b/test/lisp/progmodes/python-tests.el @@ -339,7 +339,7 @@ def func(arg): # I don't do much return arg # This comment is badly indented because the user forced so. - # At this line python.el wont dedent, user is always right. + # At this line python.el won't dedent, user is always right. comment_wins_over_ender = True @@ -358,7 +358,7 @@ comment_wins_over_ender = True ;; The return keyword do make indentation lose a level... (should (= (python-indent-calculate-indentation) 0)) ;; ...but the current indentation was forced by the user. - (python-tests-look-at "# At this line python.el wont dedent") + (python-tests-look-at "# At this line python.el won't dedent") (should (eq (car (python-indent-context)) :after-comment)) (should (= (python-indent-calculate-indentation) 4)) ;; Should behave the same for blank lines: potentially a comment. diff --git a/test/manual/cedet/tests/testnsp.cpp b/test/manual/cedet/tests/testnsp.cpp index fce707bf20b..b72a44c8ca8 100644 --- a/test/manual/cedet/tests/testnsp.cpp +++ b/test/manual/cedet/tests/testnsp.cpp @@ -93,7 +93,7 @@ void foo(void) { ; // #4# ( "Mumble" "get" ) } -// What happens if a type your looking for is scoped withing a type, +// What happens if a type your looking for is scoped within a type, // but you are one level into the completion so the originating scope // excludes the type of the variable you are completing through? // Thanks Martin Stein for this nice example. diff --git a/test/src/regex-resources/BOOST.tests b/test/src/regex-resources/BOOST.tests index 98fd3b6abf3..756fa00486b 100644 --- a/test/src/regex-resources/BOOST.tests +++ b/test/src/regex-resources/BOOST.tests @@ -93,7 +93,7 @@ aa\) ! . \0 0 1 ; -; now move on to the repetion ops, +; now move on to the repetition ops, ; starting with operator * - match_default normal REG_EXTENDED a* b 0 0 @@ -275,7 +275,7 @@ a(b*)c\1d abbcbbbd -1 -1 ^(.)\1 abc -1 -1 a([bc])\1d abcdabbd 4 8 5 6 ; strictly speaking this is at best ambiguous, at worst wrong, this is what most -; re implimentations will match though. +; re implementations will match though. a(([bc])\2)*d abbccd 0 6 3 5 3 4 a(([bc])\2)*d abbcbd -1 -1 -- cgit v1.3