commit d22fe0ec3a321ea222ad2f25c52c7eddea4375df (HEAD, refs/remotes/origin/master) Author: Alan Mackenzie Date: Fri Oct 2 21:21:06 2020 +0000 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. diff --git a/test/data/syntax-comments.txt b/test/data/syntax-comments.txt index e10c1450e4..6f595e4d8d 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 3b3521eaab..56e0338057 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 commit 0ade20f49f80d2d93f596ba9dfa3f1309ad84126 Author: Mattias Engdegård Date: Fri Oct 2 18:50:50 2020 +0200 Calc: fix formatting and parsing Unix time (bug#43759) The number of days from epoch to Jan 1, 1970 that was used in parsing and formatting Unix time was incorrect. The previous fix (in e368697ce36) was incomplete. Reported by Vincent Belaïche. * lisp/calc/calc-forms.el (math-unix-epoch): New constant. (math-format-date-part, math-parse-standard-date, calcFunc-unixtime): Use math-unix-epoch instead of a constant that is sometimes wrong. * test/lisp/calc/calc-tests.el (calc-unix-date): New test. diff --git a/lisp/calc/calc-forms.el b/lisp/calc/calc-forms.el index 6d70126c09..a2f6696866 100644 --- a/lisp/calc/calc-forms.el +++ b/lisp/calc/calc-forms.el @@ -709,6 +709,10 @@ as measured in the number of days before December 31, 1 BC (Gregorian).") "The beginning of the Julian date calendar, as measured in the integer number of days before December 31, 1 BC (Gregorian).") +(defconst math-unix-epoch 719163 + "The beginning of Unix time: days from December 31, 1 BC (Gregorian) +to Jan 1, 1970 AD.") + (defun math-format-date-part (x) (cond ((stringp x) x) @@ -730,7 +734,8 @@ as measured in the integer number of days before December 31, 1 BC (Gregorian)." (math-floor math-fd-date) math-julian-date-beginning-int))) ((eq x 'U) - (math-format-number (nth 1 (math-date-parts math-fd-date 719164)))) + (math-format-number (nth 1 (math-date-parts math-fd-date + math-unix-epoch)))) ((memq x '(IYYY Iww w)) (progn (or math-fd-iso-dt @@ -1173,7 +1178,7 @@ as measured in the integer number of days before December 31, 1 BC (Gregorian)." (setq num (math-match-substring math-pd-str 0) math-pd-str (substring math-pd-str (match-end 0)) num (math-date-to-dt - (math-add 719164 + (math-add math-unix-epoch (math-div (math-read-number num) '(float 864 2)))) hour (nth 3 num) @@ -1434,11 +1439,11 @@ as measured in the integer number of days before December 31, 1 BC (Gregorian)." (defun calcFunc-unixtime (date &optional zone) (if (math-realp date) (progn - (setq date (math-add 719163 (math-div date '(float 864 2)))) + (setq date (math-add math-unix-epoch (math-div date '(float 864 2)))) (list 'date (math-sub date (math-div (calcFunc-tzone zone date) '(float 864 2))))) (if (eq (car date) 'date) - (math-add (nth 1 (math-date-parts (nth 1 date) 719163)) + (math-add (nth 1 (math-date-parts (nth 1 date) math-unix-epoch)) (calcFunc-tzone zone date)) (math-reject-arg date 'datep)))) diff --git a/test/lisp/calc/calc-tests.el b/test/lisp/calc/calc-tests.el index 4dded007f7..0df96a0e2d 100644 --- a/test/lisp/calc/calc-tests.el +++ b/test/lisp/calc/calc-tests.el @@ -534,6 +534,46 @@ An existing calc stack is reused, otherwise a new one is created." ) )) +(ert-deftest calc-unix-date () + (let* ((d-1970-01-01 (math-parse-date "1970-01-01")) + (d-2020-09-07 (math-parse-date "2020-09-07")) + (d-1991-01-09-0600 (math-parse-date "1991-01-09 06:00"))) + ;; calcFunc-unixtime (command "t U") converts a date value to Unix time, + ;; and a number to a date. + (should (equal d-1970-01-01 '(date 719163))) + (should (equal (calcFunc-unixtime d-1970-01-01 0) 0)) + (should (equal (calc-tests--calc-to-number (cadr (calcFunc-unixtime 0 0))) + (cadr d-1970-01-01))) + (should (equal (calcFunc-unixtime d-2020-09-07 0) + (* (- (cadr d-2020-09-07) + (cadr d-1970-01-01)) + 86400))) + (should (equal (calcFunc-unixtime d-1991-01-09-0600 0) + 663400800)) + (should (equal (calc-tests--calc-to-number + (cadr (calcFunc-unixtime 663400800 0))) + 726841.25)) + + (let ((calc-date-format '(U))) + ;; Test parsing Unix time. + (should (equal (calc-tests--calc-to-number + (cadr (math-parse-date "0"))) + 719163)) + (should (equal (calc-tests--calc-to-number + (cadr (math-parse-date "469324800"))) + (+ 719163 (/ 469324800 86400)))) + (should (equal (calc-tests--calc-to-number + (cadr (math-parse-date "663400800"))) + 726841.25)) + + ;; Test formatting Unix time. + (should (equal (math-format-date d-1970-01-01) "0")) + (should (equal (math-format-date d-2020-09-07) + (number-to-string (* (- (cadr d-2020-09-07) + (cadr d-1970-01-01)) + 86400)))) + (should (equal (math-format-date d-1991-01-09-0600) "663400800"))))) + (provide 'calc-tests) ;;; calc-tests.el ends here commit 6a6466031839d5fb4efadbfe2cdbd5ba469dd9c6 Author: Alan Mackenzie Date: Fri Oct 2 17:25:02 2020 +0000 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. diff --git a/test/data/syntax-comments.txt b/test/data/syntax-comments.txt index 74e08b1b65..e10c1450e4 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 4bd8a8519c..3b3521eaab 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 commit 70f8d9a8683a27ac00a2e74c15c0b5b5c6f9bbe2 Merge: 726eb835dd ef7bc1cc80 Author: Glenn Morris Date: Fri Oct 2 09:38:24 2020 -0700 ; Merge from origin/emacs-27 The following commit was skipped: ef7bc1cc80 (origin/emacs-27) Fix electric-buffer-list buffer selection commit 726eb835ddcbc209545f681d7272ebaa13788b33 Merge: bd080957b0 78eacf31e8 Author: Glenn Morris Date: Fri Oct 2 09:38:24 2020 -0700 Merge from origin/emacs-27 78eacf31e8 ; Fix many typos in symbols in docs and comments d5d12707d6 * doc/misc/flymake.texi (Using Flymake): Fix a typo. (Bug... # Conflicts: # lisp/allout.el # lisp/progmodes/ebrowse.el commit bd080957b069e4ed0e31ce5f029a529432524f46 Merge: 223de5f2f5 9b47ae2304 Author: Glenn Morris Date: Fri Oct 2 09:33:53 2020 -0700 ; Merge from origin/emacs-27 The following commits were skipped: 9b47ae2304 Don't error if no GPG signing key configured e274e3f44b 2020-03-29 Michael R. Mauger commit 223de5f2f56ed31dc6a7a5380d8a901c3baa6926 Merge: 81ea24f3d7 41dcbeccf3 Author: Glenn Morris Date: Fri Oct 2 09:33:53 2020 -0700 Merge from origin/emacs-27 41dcbeccf3 Make aliases introduced in previous patch obsolete 4997032c05 Restore some public debugging functions removed in Emacs 27 commit 81ea24f3d71f537797362373e62e70452111165a Merge: 0a769f4832 08bda922b4 Author: Glenn Morris Date: Fri Oct 2 09:33:53 2020 -0700 ; Merge from origin/emacs-27 The following commit was skipped: 08bda922b4 (emacs-27) ; Auto-commit of loaddefs files. commit 0a769f4832d6f8bf208c005a5f00c345d441cb08 Merge: 053d70660b 2af6b3147d Author: Glenn Morris Date: Fri Oct 2 09:33:53 2020 -0700 Merge from origin/emacs-27 2af6b3147d Clarification in Tramp manual 8fbaca7d41 Check Emacs version used for Tramp compilation 90e5549f02 Don't signal an error when saving files on WdebDAV volumes 6f73cc3579 ; * lisp/net/eww.el (eww-search-words): Doc fix. ce0842a165 * lisp/hi-lock.el (hi-lock-find-patterns): Autoload it. (... commit ef7bc1cc80e727aca10957f4101eefa04e47c84c (refs/remotes/origin/emacs-27) Author: Lars Ingebrigtsen Date: Fri Oct 2 08:07:53 2020 +0200 Fix electric-buffer-list buffer selection * lisp/ebuff-menu.el (electric-buffer-list): Ensure that point is restored, which isn't always the case if global-display-line-numbers-mode (bug#43755). This enables selecting buffers again. diff --git a/lisp/ebuff-menu.el b/lisp/ebuff-menu.el index 7285021676..079fce88de 100644 --- a/lisp/ebuff-menu.el +++ b/lisp/ebuff-menu.el @@ -162,6 +162,7 @@ Run hooks in `electric-buffer-menu-mode-hook' on entry. (message ""))) (when select (set-buffer buffer) + (goto-char select) (let ((opoint (point-marker))) (Buffer-menu-execute) (goto-char (point-min)) commit 78eacf31e8fe182801ad1943fac717b75fcf286b Author: Stefan Kangas Date: Wed Sep 23 13:35:55 2020 +0200 ; Fix many typos in symbols in docs and comments diff --git a/lisp/allout.el b/lisp/allout.el index 174f1e3dc2..6a7ecbb1ef 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 1ae3944568..83e7976125 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 f3a5d9cd60..ca9f16ef20 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 e9dd48c8ab..409e35ef90 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 b870624f9a..3e4499cd39 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 560631ae66..48f150de70 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 171a939d4e..9f5dc40ea1 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 7038b91c26..50ddf525ca 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 2cb1f614ce..f6746eb981 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 764354b03b..3c4891b49a 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 7d6be3cf4e..fc8dfe12ca 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 0e1618e010..5e01895b9f 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 41d8fc1a98..490b293777 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 cfde84e19a..3033122437 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 0328c1f12f..adf3906146 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 4d1d9561d4..48c1776648 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 66ef0824d8..e60478c0b2 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 3c07a49420..b2d3bea8aa 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 9834bcf058..c43c468ead 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 d499da7a8d..f1d823d9f0 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 506c888ff6..30edebb4e6 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 fcb6075f94..3f9f1c9980 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 3429d6560b..f255cfc74a 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 cbdd329f3e..6c425b0ea1 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 24a3df1e27..a7657c6855 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 b0e79d4f23..9cf766ee46 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 768e941490..8025060b0e 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 4ea8594a97..963991d641 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 65c0df8f57..4567b14da1 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 3feff803e3..5a2391d627 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 92b7d801c7..c02b095b2e 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 eea04c6378..ebc5038a19 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 e94947bc7f..f84c1b3094 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 9e8a3168fd..7adfb49a85 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 e6ce9a5d76..3c2a8cf39c 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 ad6622714d..f139d645da 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 a6ddce733c..5b8e1dbb6d 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 568f5b9b87..a7502d188e 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 181092ee99..0c564237da 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 bf56a7ee49..e63e4d65fb 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 bb78025933..c84803a3fa 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 bddd1a39fc..1e9e25641d 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 10416ead60..f5af277dc5 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 785b941402..2d47cdc406 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 a04c26d276..7d1f5ef654 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 ace3001781..aade09214c 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 7c688d53fa..656ad3e79b 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 218043f219..b3811afd71 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 364689ccdb..c8b36e205f 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 7a88744540..334e1a72d3 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 9de5ac66c7..ea072ff9dd 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 9f08772ec3..eb07bb4d91 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 cb0494ee91..1e4343cc6b 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 5c4ff83d82..7b75495ad8 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 56d1bdb110..69e5de32bf 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 12164b46ec..fbc71e0ec8 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 41811c9dc0..88c4a0fe17 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 ac56a7732f..11e1f4db79 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 61c2007563..4c9650f556 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 094a1fad8f..899025b4c9 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) commit d5d12707d639261a10726fcca992ba9e538be671 Author: Eli Zaretskii Date: Fri Oct 2 13:57:51 2020 +0300 * doc/misc/flymake.texi (Using Flymake): Fix a typo. (Bug#43758) diff --git a/doc/misc/flymake.texi b/doc/misc/flymake.texi index c7bf99c641..b4757938e9 100644 --- a/doc/misc/flymake.texi +++ b/doc/misc/flymake.texi @@ -103,7 +103,7 @@ should also display a tool-tip with the same information. @code{flymake-goto-next-error} and @code{flymake-goto-prev-error} are commands that allow easy navigation to the next/previous erroneous -regions, respectively. If might be a good idea to map them to @kbd{M-n} +regions, respectively. It might be a good idea to map them to @kbd{M-n} and @kbd{M-p} in @code{flymake-mode}, by adding to your init file: @lisp commit 053d70660bcec9b66834e52c4860b32083da77a0 Author: Stefan Monnier Date: Fri Oct 2 10:34:37 2020 +0000 CC Mode: Convert the handling of c-special-indent-hook to standard usage * lisp/progmodes/cc-styles.el (c-set-style): Use kill-local-variable rather than copying the hook's global value to the local binding. (c-make-styles-buffer-local): Remove redundant make-variable-buffer-local. diff --git a/lisp/progmodes/cc-styles.el b/lisp/progmodes/cc-styles.el index 36be9f6c74..855e467571 100644 --- a/lisp/progmodes/cc-styles.el +++ b/lisp/progmodes/cc-styles.el @@ -395,8 +395,7 @@ a null operation." ;; remain. This is not necessary for c-offsets-alist, since ;; c-get-style-variables contains every valid offset type in the ;; fallback entry. - (setq c-special-indent-hook - (default-value 'c-special-indent-hook))) + (kill-local-variable 'c-special-indent-hook)) (mapc (lambda (elem) (c-set-style-1 elem dont-override)) ;; Need to go through the variables backwards when we @@ -644,7 +643,7 @@ CC Mode by making sure the proper entries are present on (defun c-make-styles-buffer-local (&optional this-buf-only-p) "Make all CC Mode style variables buffer local. -If `this-buf-only-p' is non-nil, the style variables will be made +If THIS-BUF-ONLY-P is non-nil, the style variables will be made buffer local only in the current buffer. Otherwise they'll be made permanently buffer local in any buffer that changes their values. @@ -662,7 +661,6 @@ any reason to call this function directly." ;; Hooks must be handled specially (if this-buf-only-p (if (featurep 'xemacs) (make-local-hook 'c-special-indent-hook)) - (with-no-warnings (make-variable-buffer-local 'c-special-indent-hook)) (setq c-style-variables-are-local-p t)) )) commit 9b47ae23043d952780fc15da6540444ccddd4f58 Author: Robert Pluim Date: Fri Oct 2 10:47:06 2020 +0200 Don't error if no GPG signing key configured * lisp/gnus/mml-sec.el (mml-secure-epg-sign): Partially revert "Make mml-secure-epg-sign bug out if we can't find an identity". It causes signing to fail for people who have not set up mml-secure-{smime,openpgp}-sign-with-sender, which is a regression from Emacs-26 (Bug#40118). In such a situation gpg will use its default key. Do not merge to master. On master Emacs will query the user. diff --git a/lisp/gnus/mml-sec.el b/lisp/gnus/mml-sec.el index 740e1d2b72..8d77916e99 100644 --- a/lisp/gnus/mml-sec.el +++ b/lisp/gnus/mml-sec.el @@ -944,16 +944,6 @@ If no one is selected, symmetric encryption will be performed. " (signer-names (mml-secure-signer-names protocol sender)) (signers (mml-secure-signers context signer-names)) signature micalg) - (unless signers - (let ((maybe-msg - (if mml-secure-smime-sign-with-sender - "." - "; try setting `mml-secure-smime-sign-with-sender'."))) - ;; If `mml-secure-smime-sign-with-sender' is already non-nil - ;; then there's no point advising the user to examine it. If - ;; there are any other variables worth examining, please - ;; improve this error message by having it mention them. - (error "Couldn't find any signer names%s" maybe-msg))) (when (eq 'OpenPGP protocol) (setf (epg-context-armor context) t) (setf (epg-context-textmode context) t) commit 4cb16b6f42ea7ea088fa4134f8fe4ccfec16a56d Author: Mattias Engdegård Date: Wed Sep 30 23:57:27 2020 +0200 Calc: fix business days calculation (bug43677) The calculation of business days was broken in 2012 (probably 310e60d9454fe2 or thereabouts) when the date representation changed epoch so that Jan 1, 1 AD became day number 1 instead of 0. Repair this, along with an unrelated bug that prevented arbitrary holiday weekdays from working. Reported by Aaron Zeng. * lisp/calc/calc-forms.el (math-to-business-day) (math-from-business-day): Correct calculation of weekdays using Calc's current (Rata Die) chronology. Modify loop condition to cope with odd sets of holiday weekdays. * test/lisp/calc/calc-tests.el (calc-business-days): New test. diff --git a/lisp/calc/calc-forms.el b/lisp/calc/calc-forms.el index 5a8f0a38d2..6d70126c09 100644 --- a/lisp/calc/calc-forms.el +++ b/lisp/calc/calc-forms.el @@ -1870,8 +1870,8 @@ and ends on the last Sunday of October at 2 a.m." (and days (= day (car days)) (setq holiday t))) (let* ((weekdays (nth 3 math-holidays-cache)) - (weeks (1- (/ (+ day 6) 7))) - (wkday (- day 1 (* weeks 7)))) + (weeks (/ day 7)) + (wkday (mod day 7))) ; Day of week: 0=Sunday, 6=Saturday (setq delta (+ delta (* weeks (length weekdays)))) (while (and weekdays (< (car weekdays) wkday)) (setq weekdays (cdr weekdays) @@ -1905,14 +1905,15 @@ and ends on the last Sunday of October at 2 a.m." (setq delta (1+ delta))) (setq day (+ day delta))) (let* ((weekdays (nth 3 math-holidays-cache)) - (bweek (- 7 (length weekdays))) - (weeks (1- (/ (+ day (1- bweek)) bweek))) - (wkday (- day 1 (* weeks bweek))) + (bweek (- 7 (length weekdays))) ; Business days in a week, 1..7. + (weeks (/ day bweek)) ; Whole weeks. + (wkday (mod day bweek)) ; Business day in last week, 0..bweek-1 (w 0)) (setq day (+ day (* weeks (length weekdays)))) + ;; Add business days in the last week; `w' is weekday, 0..6. (while (if (memq w weekdays) (setq day (1+ day)) - (> (setq wkday (1- wkday)) 0)) + (>= (setq wkday (1- wkday)) 0)) (setq w (1+ w))) (let ((hours (nth 7 math-holidays-cache))) (if hours diff --git a/test/lisp/calc/calc-tests.el b/test/lisp/calc/calc-tests.el index dce82b6f53..4dded007f7 100644 --- a/test/lisp/calc/calc-tests.el +++ b/test/lisp/calc/calc-tests.el @@ -458,6 +458,82 @@ An existing calc stack is reused, otherwise a new one is created." (calcFunc-choose '(frac -15 2) 3)) (calc-tests--choose -7.5 3)))) +(ert-deftest calc-business-days () + (cl-flet ((m (s) (math-parse-date s)) + (b+ (a b) (calcFunc-badd a b)) + (b- (a b) (calcFunc-bsub a b))) + ;; Sanity check. + (should (equal (m "2020-09-07") '(date 737675))) + + ;; Test with standard business days (Mon-Fri): + (should (equal (b+ (m "2020-09-07") 1) (m "2020-09-08"))) ; Mon->Tue + (should (equal (b+ (m "2020-09-08") 1) (m "2020-09-09"))) ; Tue->Wed + (should (equal (b+ (m "2020-09-09") 1) (m "2020-09-10"))) ; Wed->Thu + (should (equal (b+ (m "2020-09-10") 1) (m "2020-09-11"))) ; Thu->Fri + (should (equal (b+ (m "2020-09-11") 1) (m "2020-09-14"))) ; Fri->Mon + + (should (equal (b+ (m "2020-09-07") 4) (m "2020-09-11"))) ; Mon->Fri + (should (equal (b+ (m "2020-09-07") 6) (m "2020-09-15"))) ; Mon->Tue + + (should (equal (b+ (m "2020-09-12") 1) (m "2020-09-14"))) ; Sat->Mon + (should (equal (b+ (m "2020-09-13") 1) (m "2020-09-14"))) ; Sun->Mon + + (should (equal (b- (m "2020-09-11") 1) (m "2020-09-10"))) ; Fri->Thu + (should (equal (b- (m "2020-09-10") 1) (m "2020-09-09"))) ; Thu->Wed + (should (equal (b- (m "2020-09-09") 1) (m "2020-09-08"))) ; Wed->Tue + (should (equal (b- (m "2020-09-08") 1) (m "2020-09-07"))) ; Tue->Mon + (should (equal (b- (m "2020-09-07") 1) (m "2020-09-04"))) ; Mon->Fri + + (should (equal (b- (m "2020-09-11") 4) (m "2020-09-07"))) ; Fri->Mon + (should (equal (b- (m "2020-09-15") 6) (m "2020-09-07"))) ; Tue->Mon + + (should (equal (b- (m "2020-09-12") 1) (m "2020-09-11"))) ; Sat->Fri + (should (equal (b- (m "2020-09-13") 1) (m "2020-09-11"))) ; Sun->Fri + + ;; Stepping fractional days + (should (equal (b+ (m "2020-09-08 21:00") '(frac 1 2)) + (m "2020-09-09 09:00"))) + (should (equal (b+ (m "2020-09-11 21:00") '(frac 1 2)) + (m "2020-09-14 09:00"))) + (should (equal (b- (m "2020-09-08 21:00") '(frac 1 2)) + (m "2020-09-08 09:00"))) + (should (equal (b- (m "2020-09-14 06:00") '(frac 1 2)) + (m "2020-09-11 18:00"))) + + ;; Test with a couple of extra days off: + (let ((var-Holidays (list 'vec + '(var sat var-sat) '(var sun var-sun) + (m "2020-09-09") (m "2020-09-11")))) + + (should (equal (b+ (m "2020-09-07") 1) (m "2020-09-08"))) ; Mon->Tue + (should (equal (b+ (m "2020-09-08") 1) (m "2020-09-10"))) ; Tue->Thu + (should (equal (b+ (m "2020-09-10") 1) (m "2020-09-14"))) ; Thu->Mon + (should (equal (b+ (m "2020-09-14") 1) (m "2020-09-15"))) ; Mon->Tue + (should (equal (b+ (m "2020-09-15") 1) (m "2020-09-16"))) ; Tue->Wed + + (should (equal (b- (m "2020-09-16") 1) (m "2020-09-15"))) ; Wed->Tue + (should (equal (b- (m "2020-09-15") 1) (m "2020-09-14"))) ; Tue->Mon + (should (equal (b- (m "2020-09-14") 1) (m "2020-09-10"))) ; Mon->Thu + (should (equal (b- (m "2020-09-10") 1) (m "2020-09-08"))) ; Thu->Tue + (should (equal (b- (m "2020-09-08") 1) (m "2020-09-07"))) ; Tue->Mon + ) + + ;; Test with odd non-business weekdays (Tue, Wed, Sat): + (let ((var-Holidays '(vec (var tue var-tue) + (var wed var-wed) + (var sat var-sat)))) + (should (equal (b+ (m "2020-09-07") 1) (m "2020-09-10"))) ; Mon->Thu + (should (equal (b+ (m "2020-09-10") 1) (m "2020-09-11"))) ; Thu->Fri + (should (equal (b+ (m "2020-09-11") 1) (m "2020-09-13"))) ; Fri->Sun + (should (equal (b+ (m "2020-09-13") 1) (m "2020-09-14"))) ; Sun->Mon + + (should (equal (b- (m "2020-09-14") 1) (m "2020-09-13"))) ; Mon->Sun + (should (equal (b- (m "2020-09-13") 1) (m "2020-09-11"))) ; Sun->Fri + (should (equal (b- (m "2020-09-11") 1) (m "2020-09-10"))) ; Fri->Thu + (should (equal (b- (m "2020-09-10") 1) (m "2020-09-07"))) ; Thu->Mon + ) + )) + (provide 'calc-tests) ;;; calc-tests.el ends here commit e274e3f44b07e1cf6186329679ef18ab41eab2f6 Author: Michael R. Mauger Date: Sun Mar 29 20:52:10 2020 -0400 2020-03-29 Michael R. Mauger * lisp/progmodes/sql.el (sql-add-product): Re-correct argument spec. Previous change was due to my mistake; I have resolved back to the prior behavior (Bug#39960). * test/lisp/progmodes/sql-tests.el (sql-test-add-product): Added test to insure I don't make the same mistake again. diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index 400e304ecf..a04c26d276 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el @@ -2740,7 +2740,7 @@ highlighting rules in SQL mode.") nil 'require-match init 'sql-product-history init)))) -(defun sql-add-product (product display &optional plist) +(defun sql-add-product (product display &rest plist) "Add support for a database product in `sql-mode'. Add PRODUCT to `sql-product-alist' which enables `sql-mode' to diff --git a/test/lisp/progmodes/sql-tests.el b/test/lisp/progmodes/sql-tests.el index 65ed76bfb5..91805ab725 100644 --- a/test/lisp/progmodes/sql-tests.el +++ b/test/lisp/progmodes/sql-tests.el @@ -187,7 +187,13 @@ Perform ACTION and validate results" (sql-add-product 'xyz "XyzDb") (should (equal (pp-to-string (assoc 'xyz sql-product-alist)) - "(xyz :name \"XyzDb\")\n")))) + "(xyz :name \"XyzDb\")\n"))) + + (sql-test-product-feature-harness + (sql-add-product 'stu "StuDb" :X 1 :Y "2") + + (should (equal (pp-to-string (assoc 'stu sql-product-alist)) + "(stu :name \"StuDb\" :X 1 :Y \"2\")\n")))) (ert-deftest sql-test-add-existing-product () "Add a product that already exists." commit 41dcbeccf3094b7f00f5650080a3b604dca69717 Author: Lars Ingebrigtsen Date: Thu Oct 1 20:03:58 2020 +0200 Make aliases introduced in previous patch obsolete * lisp/emacs-lisp/debug.el (debugger-toggle-locals): (debug-help-follow): Make reinstated aliases obsolete. diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index 14957eae0f..8cd0bdef64 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el @@ -538,7 +538,8 @@ The environment used is the one when entering the activation frame at point." (let ((str (eval-expression-print-format val))) (if str (princ str t)))))))) -(defalias 'debugger-toggle-locals 'backtrace-toggle-locals) +(define-obsolete-function-alias 'debugger-toggle-locals + 'backtrace-toggle-locals "28.1") (defvar debugger-mode-map @@ -634,7 +635,8 @@ Complete list of commands: (buffer-substring (line-beginning-position 0) (line-end-position 0))))) -(defalias 'debug-help-follow 'backtrace-help-follow-symbol) +(define-obsolete-function-alias 'debug-help-follow + 'backtrace-help-follow-symbol "28.1") ;; When you change this, you may also need to change the number of commit 4997032c05e7929d6f306d5195da7c3accfad79f Author: Gemini Lasswell Date: Thu Oct 1 19:59:58 2020 +0200 Restore some public debugging functions removed in Emacs 27 * lisp/emacs-lisp/backtrace.el (backtrace--to-string): New function. (backtrace-to-string): Use it. Fix whitespace (bug#40728). * lisp/emacs-lisp/debug.el (debugger-insert-backtrace): New function. Mark it as obsolete. (debugger-toggle-locals, debug-help-follow): New aliases. diff --git a/lisp/emacs-lisp/backtrace.el b/lisp/emacs-lisp/backtrace.el index 37dad8db16..5874ba72fc 100644 --- a/lisp/emacs-lisp/backtrace.el +++ b/lisp/emacs-lisp/backtrace.el @@ -922,11 +922,15 @@ Output stream used is value of `standard-output'." (princ (backtrace-to-string (backtrace-get-frames 'backtrace))) nil) -(defun backtrace-to-string(&optional frames) +(defun backtrace-to-string (&optional frames) "Format FRAMES, a list of `backtrace-frame' objects, for output. Return the result as a string. If FRAMES is nil, use all function calls currently active." - (unless frames (setq frames (backtrace-get-frames 'backtrace-to-string))) + (substring-no-properties + (backtrace--to-string + (or frames (backtrace-get-frames 'backtrace-to-string))))) + +(defun backtrace--to-string (frames) (let ((backtrace-fontify nil)) (with-temp-buffer (backtrace-mode) @@ -934,8 +938,7 @@ function calls currently active." backtrace-frames frames backtrace-print-function #'cl-prin1) (backtrace-print) - (substring-no-properties (filter-buffer-substring (point-min) - (point-max)))))) + (filter-buffer-substring (point-min) (point-max))))) (provide 'backtrace) diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index ed28997292..14957eae0f 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el @@ -320,6 +320,17 @@ the debugger will not be entered." (message "Error in debug printer: %S" err) (prin1 obj stream)))) +(make-obsolete 'debugger-insert-backtrace + "use a `backtrace-mode' buffer or `backtrace-to-string'." + "Emacs 27.1") + +(defun debugger-insert-backtrace (frames do-xrefs) + "Format and insert the backtrace FRAMES at point. +Make functions into cross-reference buttons if DO-XREFS is non-nil." + (insert (if do-xrefs + (backtrace--to-string frames) + (backtrace-to-string frames)))) + (defun debugger-setup-buffer (args) "Initialize the `*Backtrace*' buffer for entry to the debugger. That buffer should be current already and in debugger-mode." @@ -527,6 +538,8 @@ The environment used is the one when entering the activation frame at point." (let ((str (eval-expression-print-format val))) (if str (princ str t)))))))) +(defalias 'debugger-toggle-locals 'backtrace-toggle-locals) + (defvar debugger-mode-map (let ((map (make-keymap))) @@ -621,6 +634,8 @@ Complete list of commands: (buffer-substring (line-beginning-position 0) (line-end-position 0))))) +(defalias 'debug-help-follow 'backtrace-help-follow-symbol) + ;; When you change this, you may also need to change the number of ;; frames that the debugger skips. commit 08bda922b4c64e6f8fbf7cfae33aa3ac55b19ee4 Author: Glenn Morris Date: Thu Oct 1 06:11:26 2020 -0700 ; Auto-commit of loaddefs files. diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el index 9febeb96d4..ccb419031d 100644 --- a/lisp/ldefs-boot.el +++ b/lisp/ldefs-boot.el @@ -11854,11 +11854,11 @@ Render FILE using EWW. \(fn FILE)" t nil) (autoload 'eww-search-words "eww" "\ -Search the web for the text between BEG and END. +Search the web for the text in the region. If region is active (and not whitespace), search the web for -the text between BEG and END. Else, prompt the user for a search -string. See the `eww-search-prefix' variable for the search -engine used." t nil) +the text between region beginning and end. Else, prompt the +user for a search string. See the variable `eww-search-prefix' +for the search engine used." t nil) (autoload 'eww-mode "eww" "\ Mode for browsing the web. @@ -16173,6 +16173,9 @@ Interactively added patterns are those normally specified using `highlight-regexp' and `highlight-lines-matching-regexp'; they can be found in variable `hi-lock-interactive-patterns'." t nil) +(autoload 'hi-lock-find-patterns "hi-lock" "\ +Add patterns from the current buffer to the list of hi-lock patterns." t nil) + (if (fboundp 'register-definition-prefixes) (register-definition-prefixes "hi-lock" '("hi-lock-" "turn-on-hi-lock-if-enabled"))) ;;;*** commit 2af6b3147dc0116e481229951d34487f6a9a0748 Author: Michael Albinus Date: Thu Oct 1 14:23:20 2020 +0200 Clarification in Tramp manual * doc/misc/tramp.texi: Harmonize "Git" spelling. (Frequently Asked Questions): Describe Emacs version mismatch. diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index fd3415d1ca..2739098334 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi @@ -383,7 +383,7 @@ After one of the above commands, @file{~/emacs/tramp} will containing the latest version of @value{tramp}. @noindent -To fetch updates from the repository, use git pull: +To fetch updates from the repository, use @code{git pull}: @example @group @@ -1687,9 +1687,9 @@ Integration for LXD containers. A container is accessed via @item magit-tramp @cindex method @option{git} @cindex @option{git} method -Browsing git repositories with @code{magit}. A versioned file is +Browsing Git repositories with @code{magit}. A versioned file is accessed via @file{@trampfn{git,rev@@root-dir,/path/to/file}}. -@samp{rev} is a git revision, and @samp{root-dir} is a virtual host +@samp{rev} is a Git revision, and @samp{root-dir} is a virtual host name for the root directory, specified in @code{magit-tramp-hosts-alist}. @@ -4646,6 +4646,18 @@ path, or somewhere else entirely (including locally). @pxref{Renaming remote files}. +@item +I get a warning @samp{Tramp has been compiled with Emacs a.b, this is Emacs c.d} + +@value{tramp} comes with compatibility code for different Emacs +versions. When you see this warning, you don't use the Emacs built-in +version of @value{tramp}. In case you have installed @value{tramp} +from GNU ELPA, you must delete and reinstall it. +@ifset installchapter +In case you have installed it from its Git repository, @ref{Recompilation}. +@end ifset + + @item How to disable other packages from calling @value{tramp}? commit 8fbaca7d417e35a89e5c47c67d87d2a8bd4b8a1f Author: Michael Albinus Date: Thu Oct 1 12:16:59 2020 +0200 Check Emacs version used for Tramp compilation * lisp/net/tramp-compat.el (tramp-compat-emacs-compiled-version): New defconst. Raise a warning, when it is not equal to the Emacs version. diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el index 3f25afedb9..b7a7cc4f00 100644 --- a/lisp/net/tramp-compat.el +++ b/lisp/net/tramp-compat.el @@ -44,6 +44,14 @@ ;; `temporary-file-directory' as function is introduced with Emacs 26.1. (declare-function tramp-handle-temporary-file-directory "tramp") +(defconst tramp-compat-emacs-compiled-version (eval-when-compile emacs-version) + "The Emacs version used for compilation.") + +(unless (= emacs-major-version + (car (version-to-list tramp-compat-emacs-compiled-version))) + (warn "Tramp has been compiled with Emacs %s, this is Emacs %s" + tramp-compat-emacs-compiled-version emacs-version)) + ;; For not existing functions, obsolete functions, or functions with a ;; changed argument list, there are compiler warnings. We want to ;; avoid them in cases we know what we do. commit 90e5549f027f01c16f6f34e55c33d8a549fb32e7 Author: Eli Zaretskii Date: Tue Sep 29 18:21:23 2020 +0300 Don't signal an error when saving files on WdebDAV volumes * src/w32.c (acl_get_file): If get_file_security raises the ERROR_ACCESS_DENIED error, treat that like unsupported ACLs. diff --git a/src/w32.c b/src/w32.c index 78e75f0937..6fed5ba8d3 100644 --- a/src/w32.c +++ b/src/w32.c @@ -6399,7 +6399,8 @@ acl_get_file (const char *fname, acl_type_t type) { xfree (psd); err = GetLastError (); - if (err == ERROR_NOT_SUPPORTED) + if (err == ERROR_NOT_SUPPORTED + || err == ERROR_ACCESS_DENIED) errno = ENOTSUP; else if (err == ERROR_FILE_NOT_FOUND || err == ERROR_PATH_NOT_FOUND @@ -6417,7 +6418,11 @@ acl_get_file (const char *fname, acl_type_t type) be encoded in the current ANSI codepage. */ || err == ERROR_INVALID_NAME) errno = ENOENT; - else if (err == ERROR_NOT_SUPPORTED) + else if (err == ERROR_NOT_SUPPORTED + /* ERROR_ACCESS_DENIED is what we get for a volume + mounted by WebDAV, which evidently doesn't + support ACLs. */ + || err == ERROR_ACCESS_DENIED) errno = ENOTSUP; else errno = EIO; commit 6f73cc357994c2776ff8cd4f12804ebb20d29efd Author: Eli Zaretskii Date: Tue Sep 29 18:07:44 2020 +0300 ; * lisp/net/eww.el (eww-search-words): Doc fix. diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 568b96f4d5..449618bd67 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -363,11 +363,11 @@ the default EWW buffer." ;;;###autoload (defun eww-search-words () - "Search the web for the text between BEG and END. + "Search the web for the text in the region. If region is active (and not whitespace), search the web for -the text between BEG and END. Else, prompt the user for a search -string. See the `eww-search-prefix' variable for the search -engine used." +the text between region beginning and end. Else, prompt the +user for a search string. See the variable `eww-search-prefix' +for the search engine used." (interactive) (if (use-region-p) (let ((region-string (buffer-substring (region-beginning) (region-end)))) commit ce0842a165d0496e08accd211eab711d7c1c3b87 Author: Eli Zaretskii Date: Mon Sep 28 12:45:28 2020 +0300 * lisp/hi-lock.el (hi-lock-find-patterns): Autoload it. (Bug#43670) diff --git a/lisp/hi-lock.el b/lisp/hi-lock.el index b15731943f..3e7a960bf2 100644 --- a/lisp/hi-lock.el +++ b/lisp/hi-lock.el @@ -773,6 +773,7 @@ REGEXP is highlighted." (font-lock-add-keywords nil hi-lock-file-patterns t) (font-lock-flush))) +;;;###autoload (defun hi-lock-find-patterns () "Add patterns from the current buffer to the list of hi-lock patterns." (interactive)