commit be67cc276a95a97a329fa633fef686ba06c8e6d2 (HEAD, refs/remotes/origin/master) Merge: 91a578ac9fe 96af584af6c Author: Stefan Kangas Date: Sun Dec 4 06:31:24 2022 +0100 Merge from origin/emacs-29 96af584af6c Fix comment-start-skip in tree-sitter modes (bug#59690) 520a4e12f8e ; * lisp/treesit.el (treesit-end-of-defun): Guard against... 2c4d92d30f6 ; * lisp/subr.el (posn-col-row): Revert inadvertent change. 6fb9a03cbdf ; Remove debugging leftover message c5ba47c889e Speed up Unicode normalisation tests by a factor of 5 afa4fcb95b4 Fix "C-h k" when clicking on another frame f6e2f30f394 ; Fix typos bd58dcedfb9 Fix and expand tests broken by commit 2772ebe366 of 2022-... a0dd9fdebe3 ; Add cross-reference to string-equal docstring 11c3c54d8ad Fix handling of relative directories in "--init-directory... 401f76cc3d6 Make sure 'user-emacs-directory' ends in a slash commit 91a578ac9fea539a74840e93663a267e1a210881 Merge: 395f9d83f26 641ef36403b Author: Stefan Kangas Date: Sun Dec 4 06:31:24 2022 +0100 ; Merge from origin/emacs-29 The following commits were skipped: 641ef36403b Fix gud-minor-mode-menu 3623d5c195d Revert "Make easy-mmode-defmap obsolete and adjust only c... commit 395f9d83f2648dd11d64a6c8bd885efbbca8dfba Merge: 1c901386518 17d40c163e0 Author: Stefan Kangas Date: Sun Dec 4 06:31:24 2022 +0100 Merge from origin/emacs-29 17d40c163e0 vc-git-print-log: Don't assume vc-git-log-switches is a list commit 96af584af6c8ea50f9cf871db9ffca91040fb85d (refs/remotes/origin/emacs-29) Author: Yuan Fu Date: Fri Dec 2 17:03:21 2022 -0800 Fix comment-start-skip in tree-sitter modes (bug#59690) * lisp/progmodes/c-ts-mode.el (c-ts-mode) (c++-ts-mode) * lisp/progmodes/csharp-mode.el (csharp-ts-mode) * lisp/progmodes/java-ts-mode.el (java-ts-mode) * lisp/progmodes/js.el (js-ts-mode) * lisp/progmodes/typescript-ts-mode.el (tsx-ts-mode): Remove the group from the regexp. diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el index fcabb5beac8..a8189a0f3da 100644 --- a/lisp/progmodes/c-ts-mode.el +++ b/lisp/progmodes/c-ts-mode.el @@ -566,7 +566,8 @@ c-ts-mode ;; Comments. (setq-local comment-start "/* ") (setq-local comment-end " */") - (setq-local comment-start-skip (rx (group "/" (or (+ "/") (+ "*"))) + (setq-local comment-start-skip (rx (or (seq "/" (+ "/")) + (seq "/" (+ "*"))) (* (syntax whitespace)))) (setq-local comment-end-skip (rx (* (syntax whitespace)) @@ -596,7 +597,8 @@ c++-ts-mode ;; Comments. (setq-local comment-start "// ") (setq-local comment-end "") - (setq-local comment-start-skip (rx (group "/" (or (+ "/") (+ "*"))) + (setq-local comment-start-skip (rx (or (seq "/" (+ "/")) + (seq "/" (+ "*"))) (* (syntax whitespace)))) (setq-local comment-end-skip (rx (* (syntax whitespace)) diff --git a/lisp/progmodes/csharp-mode.el b/lisp/progmodes/csharp-mode.el index 3da3079f089..054dabfed07 100644 --- a/lisp/progmodes/csharp-mode.el +++ b/lisp/progmodes/csharp-mode.el @@ -900,7 +900,8 @@ csharp-ts-mode ;; Comments. (setq-local comment-start "// ") (setq-local comment-end "") - (setq-local comment-start-skip (rx (group "/" (or (+ "/") (+ "*"))) + (setq-local comment-start-skip (rx (or (seq "/" (+ "/")) + (seq "/" (+ "*"))) (* (syntax whitespace)))) (setq-local comment-end-skip (rx (* (syntax whitespace)) diff --git a/lisp/progmodes/java-ts-mode.el b/lisp/progmodes/java-ts-mode.el index cf2482bb6ee..2c42505ac94 100644 --- a/lisp/progmodes/java-ts-mode.el +++ b/lisp/progmodes/java-ts-mode.el @@ -301,7 +301,8 @@ java-ts-mode ;; Comments. (setq-local comment-start "// ") (setq-local comment-end "") - (setq-local comment-start-skip (rx (group "/" (or (+ "/") (+ "*"))) + (setq-local comment-start-skip (rx (or (seq "/" (+ "/")) + (seq "/" (+ "*"))) (* (syntax whitespace)))) (setq-local comment-end-skip (rx (* (syntax whitespace)) diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index ad1fe62d429..389096147ac 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -3849,7 +3849,8 @@ js-ts-mode ;; Comment. (setq-local comment-start "// ") (setq-local comment-end "") - (setq-local comment-start-skip (rx (group "/" (or (+ "/") (+ "*"))) + (setq-local comment-start-skip (rx (or (seq "/" (+ "/")) + (seq "/" (+ "*"))) (* (syntax whitespace)))) (setq-local comment-end-skip (rx (* (syntax whitespace)) diff --git a/lisp/progmodes/typescript-ts-mode.el b/lisp/progmodes/typescript-ts-mode.el index e09bacdcb1b..48ac1169fe8 100644 --- a/lisp/progmodes/typescript-ts-mode.el +++ b/lisp/progmodes/typescript-ts-mode.el @@ -362,7 +362,9 @@ tsx-ts-mode ;; Comments. (setq-local comment-start "// ") (setq-local comment-end "") - (setq-local comment-start-skip "\\(?://+\\|/\\*+\\)\\s *") + (setq-local comment-start-skip (rx (or (seq "/" (+ "/")) + (seq "/" (+ "*"))) + (* (syntax whitespace)))) (setq-local comment-end-skip (rx (* (syntax whitespace)) (group (or (syntax comment-end) commit 520a4e12f8e6e42d0c66cc6b3cf3be05c411fe6f Author: Yuan Fu Date: Thu Dec 1 21:19:14 2022 -0800 ; * lisp/treesit.el (treesit-end-of-defun): Guard against nil value. diff --git a/lisp/treesit.el b/lisp/treesit.el index 0de0e283c3b..f3c03daf7e0 100644 --- a/lisp/treesit.el +++ b/lisp/treesit.el @@ -1614,7 +1614,12 @@ treesit-end-of-defun (let* ((node (treesit-search-forward (treesit-node-at (point)) treesit-defun-type-regexp t t)) (top (treesit--defun-maybe-top-level node))) - (goto-char (treesit-node-end top)))) + ;; Technically `end-of-defun' should only call this function when + ;; point is at the beginning of a defun, so TOP should always be + ;; non-nil, but things happen, and we want to be safe, so check + ;; for TOP anyway. + (when top + (goto-char (treesit-node-end top))))) ;;; Activating tree-sitter commit 2c4d92d30f65860604e4a240edbc109198cfb767 Author: Eli Zaretskii Date: Sat Dec 3 22:09:16 2022 +0200 ; * lisp/subr.el (posn-col-row): Revert inadvertent change. diff --git a/lisp/subr.el b/lisp/subr.el index dc219a49a74..21f43092d42 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1729,7 +1729,7 @@ posn-col-row ((eq area 'horizontal-scroll-bar) (cons (scroll-bar-scale pair (window-width window)) 0)) (t - (if (and (windowp frame-or-window) use-window) + (if use-window (cons (/ (car pair) (window-font-width window)) (/ (cdr pair) (window-font-height window))) ;; FIXME: This should take line-spacing properties on commit 6fb9a03cbdf9e497a78374c6c7cf3222e8e215dd Author: Eli Zaretskii Date: Sat Dec 3 22:06:34 2022 +0200 ; Remove debugging leftover message * lisp/emacs-lisp/comp.el (comp--native-compile): Remove unnecessary call to 'message'. (Bug#59766) diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index 46abca417b2..7b562aaa53d 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -4115,7 +4115,6 @@ comp--native-compile comp-ctxt (comp-ctxt-output comp-ctxt) (file-exists-p (comp-ctxt-output comp-ctxt))) - (message "Deleting %s" (comp-ctxt-output comp-ctxt)) (delete-file (comp-ctxt-output comp-ctxt)))))))) (defun native-compile-async-skip-p (file load selector) commit c5ba47c889e3b853d3cc4f7a3ac840a12336dd5f Author: Mattias EngdegÄrd Date: Sat Dec 3 19:19:28 2022 +0100 Speed up Unicode normalisation tests by a factor of 5 After this change, ucs-normalize-tests are still very slow but somewhat less disastrously so (from 100 to 20 min on this machine). * test/lisp/international/ucs-normalize-tests.el (ucs-normalize-tests--normalization-equal-p) (ucs-normalize-tests--normalization-chareq-p) (ucs-normalize-tests--rule1-holds-p) (ucs-normalize-tests--rule2-holds-p) (ucs-normalize-tests--part1-rule2): Run only over the Unicode code space. Hoist `with-current-buffer` to reduce overhead. diff --git a/test/lisp/international/ucs-normalize-tests.el b/test/lisp/international/ucs-normalize-tests.el index 9e359d5022f..8d7ac5eb8b1 100644 --- a/test/lisp/international/ucs-normalize-tests.el +++ b/test/lisp/international/ucs-normalize-tests.el @@ -59,7 +59,7 @@ ucs-normalize-tests--normalization-equal-p (NFD . ucs-normalize-NFD-region) (NFKC . ucs-normalize-NFKC-region) (NFKD . ucs-normalize-NFKD-region)))) - `(with-current-buffer ucs-normalize-tests--norm-buf + `(progn (erase-buffer) (insert ,str) (,(cdr (assq norm norm-alist)) (point-min) (point-max)) @@ -74,7 +74,7 @@ ucs-normalize-tests--normalization-chareq-p (NFD . ucs-normalize-NFD-region) (NFKC . ucs-normalize-NFKC-region) (NFKD . ucs-normalize-NFKD-region)))) - `(with-current-buffer ucs-normalize-tests--norm-buf + `(progn (erase-buffer) (insert ,char) (,(cdr (assq norm norm-alist)) (point-min) (point-max)) @@ -90,36 +90,37 @@ ucs-normalize-tests--rule1-holds-p ;; See `ucs-normalize-tests--rule2-holds-p'. (aset ucs-normalize-tests--chars-part1 (aref source 0) 1)) - (and - ;; c2 == toNFC(c1) == toNFC(c2) == toNFC(c3) - (ucs-normalize-tests--normalization-equal-p NFC source nfc) - (ucs-normalize-tests--normalization-equal-p NFC nfc nfc) - (ucs-normalize-tests--normalization-equal-p NFC nfd nfc) - ;; c4 == toNFC(c4) == toNFC(c5) - (ucs-normalize-tests--normalization-equal-p NFC nfkc nfkc) - (ucs-normalize-tests--normalization-equal-p NFC nfkd nfkc) - - ;; c3 == toNFD(c1) == toNFD(c2) == toNFD(c3) - (ucs-normalize-tests--normalization-equal-p NFD source nfd) - (ucs-normalize-tests--normalization-equal-p NFD nfc nfd) - (ucs-normalize-tests--normalization-equal-p NFD nfd nfd) - ;; c5 == toNFD(c4) == toNFD(c5) - (ucs-normalize-tests--normalization-equal-p NFD nfkc nfkd) - (ucs-normalize-tests--normalization-equal-p NFD nfkd nfkd) - - ;; c4 == toNFKC(c1) == toNFKC(c2) == toNFKC(c3) == toNFKC(c4) == toNFKC(c5) - (ucs-normalize-tests--normalization-equal-p NFKC source nfkc) - (ucs-normalize-tests--normalization-equal-p NFKC nfc nfkc) - (ucs-normalize-tests--normalization-equal-p NFKC nfd nfkc) - (ucs-normalize-tests--normalization-equal-p NFKC nfkc nfkc) - (ucs-normalize-tests--normalization-equal-p NFKC nfkd nfkc) - - ;; c5 == toNFKD(c1) == toNFKD(c2) == toNFKD(c3) == toNFKD(c4) == toNFKD(c5) - (ucs-normalize-tests--normalization-equal-p NFKD source nfkd) - (ucs-normalize-tests--normalization-equal-p NFKD nfc nfkd) - (ucs-normalize-tests--normalization-equal-p NFKD nfd nfkd) - (ucs-normalize-tests--normalization-equal-p NFKD nfkc nfkd) - (ucs-normalize-tests--normalization-equal-p NFKD nfkd nfkd))) + (with-current-buffer ucs-normalize-tests--norm-buf + (and + ;; c2 == toNFC(c1) == toNFC(c2) == toNFC(c3) + (ucs-normalize-tests--normalization-equal-p NFC source nfc) + (ucs-normalize-tests--normalization-equal-p NFC nfc nfc) + (ucs-normalize-tests--normalization-equal-p NFC nfd nfc) + ;; c4 == toNFC(c4) == toNFC(c5) + (ucs-normalize-tests--normalization-equal-p NFC nfkc nfkc) + (ucs-normalize-tests--normalization-equal-p NFC nfkd nfkc) + + ;; c3 == toNFD(c1) == toNFD(c2) == toNFD(c3) + (ucs-normalize-tests--normalization-equal-p NFD source nfd) + (ucs-normalize-tests--normalization-equal-p NFD nfc nfd) + (ucs-normalize-tests--normalization-equal-p NFD nfd nfd) + ;; c5 == toNFD(c4) == toNFD(c5) + (ucs-normalize-tests--normalization-equal-p NFD nfkc nfkd) + (ucs-normalize-tests--normalization-equal-p NFD nfkd nfkd) + + ;; c4 == toNFKC(c1) == toNFKC(c2) == toNFKC(c3) == toNFKC(c4) == toNFKC(c5) + (ucs-normalize-tests--normalization-equal-p NFKC source nfkc) + (ucs-normalize-tests--normalization-equal-p NFKC nfc nfkc) + (ucs-normalize-tests--normalization-equal-p NFKC nfd nfkc) + (ucs-normalize-tests--normalization-equal-p NFKC nfkc nfkc) + (ucs-normalize-tests--normalization-equal-p NFKC nfkd nfkc) + + ;; c5 == toNFKD(c1) == toNFKD(c2) == toNFKD(c3) == toNFKD(c4) == toNFKD(c5) + (ucs-normalize-tests--normalization-equal-p NFKD source nfkd) + (ucs-normalize-tests--normalization-equal-p NFKD nfc nfkd) + (ucs-normalize-tests--normalization-equal-p NFKD nfd nfkd) + (ucs-normalize-tests--normalization-equal-p NFKD nfkc nfkd) + (ucs-normalize-tests--normalization-equal-p NFKD nfkd nfkd)))) (defsubst ucs-normalize-tests--rule2-holds-p (X) "Check 2nd conformance rule. @@ -127,7 +128,9 @@ ucs-normalize-tests--rule2-holds-p is not specifically listed in Part 1, the following invariants must be true for all conformant implementations: - X == toNFC(X) == toNFD(X) == toNFKC(X) == toNFKD(X)" + X == toNFC(X) == toNFD(X) == toNFKC(X) == toNFKD(X) + +Must be called with `ucs-normalize-tests--norm-buf' as current buffer." (and (ucs-normalize-tests--normalization-chareq-p NFC X X) (ucs-normalize-tests--normalization-chareq-p NFD X X) (ucs-normalize-tests--normalization-chareq-p NFKC X X) @@ -230,20 +233,23 @@ ucs-normalize-tests--part2-rule1-failed-lines (defun ucs-normalize-tests--part1-rule2 (chars-part1) (let ((reporter (make-progress-reporter "UCS Normalize Test Part1, rule 2" - 0 (max-char))) - (failed-chars nil)) - (map-char-table - (lambda (char-range listed-in-part) - (unless (eq listed-in-part 1) - (if (characterp char-range) - (progn (unless (ucs-normalize-tests--rule2-holds-p char-range) - (push char-range failed-chars)) - (progress-reporter-update reporter char-range)) - (cl-loop for char from (car char-range) to (cdr char-range) - unless (ucs-normalize-tests--rule2-holds-p char) - do (push char failed-chars) - do (progress-reporter-update reporter char))))) - chars-part1) + 0 (max-char t))) + (failed-chars nil) + (unicode-max (max-char t))) + (with-current-buffer ucs-normalize-tests--norm-buf + (map-char-table + (lambda (char-range listed-in-part) + (unless (eq listed-in-part 1) + (if (characterp char-range) + (progn (unless (ucs-normalize-tests--rule2-holds-p char-range) + (push char-range failed-chars)) + (progress-reporter-update reporter char-range)) + (cl-loop for char from (car char-range) to (min (cdr char-range) + unicode-max) + unless (ucs-normalize-tests--rule2-holds-p char) + do (push char failed-chars) + do (progress-reporter-update reporter char))))) + chars-part1)) (progress-reporter-done reporter) failed-chars)) commit afa4fcb95b4c698ffe94031f344f1f47aa6b2acf Author: Eli Zaretskii Date: Sat Dec 3 21:43:36 2022 +0200 Fix "C-h k" when clicking on another frame * lisp/help.el (help--analyze-key): Don't barf if the key sequence includes a switch-frame event. (Bug#59785) diff --git a/lisp/help.el b/lisp/help.el index 8e1b325141e..b709062cb27 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -861,11 +861,13 @@ help--analyze-key (mouse-msg (if (or (memq 'click modifiers) (memq 'down modifiers) (memq 'drag modifiers)) " at that spot" "")) + (click-pos (event-end event)) ;; Use `posn-set-point' to handle the case when a menu item ;; is selected from the context menu that should describe KEY ;; at the position of mouse click that opened the context menu. - ;; When no mouse was involved, don't use `posn-set-point'. - (defn (if buffer + ;; When no mouse was involved, or the event doesn't provide a + ;; valid position, don't use `posn-set-point'. + (defn (if (or buffer (not (consp click-pos))) (key-binding key t) (save-excursion (posn-set-point (event-end event)) (key-binding key t))))) diff --git a/lisp/subr.el b/lisp/subr.el index 21f43092d42..dc219a49a74 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1729,7 +1729,7 @@ posn-col-row ((eq area 'horizontal-scroll-bar) (cons (scroll-bar-scale pair (window-width window)) 0)) (t - (if use-window + (if (and (windowp frame-or-window) use-window) (cons (/ (car pair) (window-font-width window)) (/ (cdr pair) (window-font-height window))) ;; FIXME: This should take line-spacing properties on commit f6e2f30f394a270c2eca9a9a14be46876d2a86e5 Author: Stefan Kangas Date: Sat Dec 3 15:31:07 2022 +0100 ; Fix typos diff --git a/lisp/cedet/semantic/bovine/c.el b/lisp/cedet/semantic/bovine/c.el index 5e08413a96d..c8470e08cb8 100644 --- a/lisp/cedet/semantic/bovine/c.el +++ b/lisp/cedet/semantic/bovine/c.el @@ -1578,7 +1578,7 @@ semantic-format-tag-uml-prototype c-mode (token &optional parent color) "Return an UML string describing TOKEN for C and C++. Optional PARENT and COLOR as specified with -`semantic-abbreviate-tag-default'." +`semantic-format-tag-abbreviate-default'." ;; If we have special template things, append. (concat (semantic-format-tag-uml-prototype-default token parent color) (semantic-c-template-string token parent color))) diff --git a/lisp/cedet/semantic/db.el b/lisp/cedet/semantic/db.el index ff62f53d3cf..08e03bf7158 100644 --- a/lisp/cedet/semantic/db.el +++ b/lisp/cedet/semantic/db.el @@ -351,7 +351,7 @@ semanticdb-project-database ;; the tables without using the accessor. :accessor semanticdb-get-database-tables :protection :protected - :documentation "List of `semantic-db-table' objects.")) + :documentation "List of `semanticdb-table' objects.")) "Database of file tables.") (cl-defmethod semanticdb-full-filename ((obj semanticdb-table)) diff --git a/lisp/cedet/semantic/format.el b/lisp/cedet/semantic/format.el index 80e7f1117a2..3d9476d685f 100644 --- a/lisp/cedet/semantic/format.el +++ b/lisp/cedet/semantic/format.el @@ -123,7 +123,7 @@ semantic--format-colorize-text (defun semantic--format-colorize-merge-text (precoloredtext face-class) "Apply onto PRECOLOREDTEXT a color associated with FACE-CLASS. -FACE-CLASS is a tag type found in `semantic-formatface-alist'. +FACE-CLASS is a tag type found in `semantic-format-face-alist'. See that variable for details on adding new types." (let ((face (cdr-safe (assoc face-class semantic-format-face-alist))) (newtext (concat precoloredtext))) diff --git a/lisp/cedet/semantic/ia.el b/lisp/cedet/semantic/ia.el index 2172085d6b9..da884b9d16d 100644 --- a/lisp/cedet/semantic/ia.el +++ b/lisp/cedet/semantic/ia.el @@ -457,7 +457,7 @@ semantic-ia-describe-class ;; it. The simple `semanticdb-find-tag-by-...' are simple, and ;; you need to pass it the exact name you want. ;; - ;; The analyzer function `semantic-analyze-tag-name' will take + ;; The analyzer function `semantic-analyze-find-tag' will take ;; more complex names, such as the cpp symbol foo::bar::baz, ;; and break it up, and dive through the namespaces. (let ((class (semantic-analyze-find-tag typename))) diff --git a/lisp/cedet/semantic/idle.el b/lisp/cedet/semantic/idle.el index e53dd9104ad..8ab115d717e 100644 --- a/lisp/cedet/semantic/idle.el +++ b/lisp/cedet/semantic/idle.el @@ -347,7 +347,7 @@ semantic-idle-work-core-handler "Core handler for idle work processing of long running tasks. Visits Semantic controlled buffers, and makes sure all needed include files have been parsed, and that the typecache is up to date. -Uses `semantic-idle-work-for-on-buffer' to do the work." +Uses `semantic-idle-work-for-one-buffer' to do the work." (let* ((errbuf nil) (interrupted diff --git a/lisp/cedet/semantic/lex-spp.el b/lisp/cedet/semantic/lex-spp.el index b66e5c19cb2..390c13ec98b 100644 --- a/lisp/cedet/semantic/lex-spp.el +++ b/lisp/cedet/semantic/lex-spp.el @@ -1256,7 +1256,7 @@ define-lex-spp-include-analyzer REGEXP is a regular expression for the analyzer to match. See `define-lex-regex-analyzer' for more on regexp. TOKIDX is an index into REGEXP for which a new lexical token -of type `spp-macro-include' is to be created. +of type `spp-system-include' is to be created. VALFORM are forms that return the name of the thing being included, and the type of include. The return value should be of the form: (NAME . TYPE) diff --git a/lisp/cedet/semantic/lex.el b/lisp/cedet/semantic/lex.el index b3c9e96538c..264b2027711 100644 --- a/lisp/cedet/semantic/lex.el +++ b/lisp/cedet/semantic/lex.el @@ -1436,9 +1436,9 @@ semantic-lex-ignore-comments (define-lex semantic-comment-lexer "A simple lexical analyzer that handles comments. -This lexer will only return comment tokens. It is the default lexer -used by `semantic-find-doc-snarf-comment' to snarf up the comment at -point." +This lexer will only return comment tokens. It is the default +lexer used by `semantic-doc-snarf-comment-for-tag' to snarf up +the comment at point." semantic-lex-ignore-whitespace semantic-lex-ignore-newline semantic-lex-comments diff --git a/lisp/cedet/semantic/sort.el b/lisp/cedet/semantic/sort.el index 756b949c0d1..e02abe98765 100644 --- a/lisp/cedet/semantic/sort.el +++ b/lisp/cedet/semantic/sort.el @@ -474,7 +474,7 @@ semantic-tag-external-member-p the name of TAG. If this function is overridden, use -`semantic-tag-external-member-children-p-default' to also +`semantic-tag-external-member-children-default' to also include the default behavior, and merely extend your own." ) diff --git a/lisp/cedet/semantic/symref.el b/lisp/cedet/semantic/symref.el index 16bbacc428e..2ad95fb5a05 100644 --- a/lisp/cedet/semantic/symref.el +++ b/lisp/cedet/semantic/symref.el @@ -388,7 +388,8 @@ semantic-symref-result :type list :documentation "The list of tags with hits in them. -Use the `semantic-symref-hit-tags' method to get this list.") +Use the `semantic-symref-hit-to-tag-via-buffer' method to get +this list.") ) "The results from a symbol reference search.") diff --git a/lisp/speedbar.el b/lisp/speedbar.el index 515f7d5d750..7a279bdaa0e 100644 --- a/lisp/speedbar.el +++ b/lisp/speedbar.el @@ -349,7 +349,7 @@ speedbar-default-position (defcustom speedbar-sort-tags nil "If non-nil, sort tags in the speedbar display. *Obsolete*. -Use `semantic-tag-hierarchy-method' instead." +Use `speedbar-tag-hierarchy-method' instead." :group 'speedbar :type 'boolean) commit 1c9013865183f0ea21218602917b5c16ecef465d Author: Po Lu Date: Sat Dec 3 21:05:05 2022 +0800 Improve performance of other_frames and XTfullscreen_hook * src/frame.c (other_frames): * src/xterm.c (XTfullscreen_hook, x_check_fullscreen) (x_set_window_size_1): Avoid extraneous calls to x_sync. diff --git a/src/frame.c b/src/frame.c index 05106a6c759..7d902dabd4f 100644 --- a/src/frame.c +++ b/src/frame.c @@ -1892,12 +1892,61 @@ other_frames (struct frame *f, bool invisible, bool force) if (f != f1) { + /* The following code is defined out because it is + responsible for a performance drop under X connections + over a network, and its purpose is unclear. XSync does + not handle events (or call any callbacks defined by + Emacs), and as such it should not note any "recent change + in visibility". + + When writing new code, please try as hard as possible to + avoid calls that require a roundtrip to the X server. + When such calls are inevitable, use the XCB library to + handle multiple consecutive requests with a data reply in + a more asynchronous fashion. The following code + demonstrates why: + + rc = XGetWindowProperty (dpyinfo->display, window, ... + status = XGrabKeyboard (dpyinfo->display, ... + + here, `XGetWindowProperty' will wait for a reply from the + X server before returning, and thus allowing Emacs to + make the XGrabKeyboard request, which in itself also + requires waiting a reply. When XCB is available, this + code could be written: + +#ifdef HAVE_XCB + xcb_get_property_cookie_t cookie1; + xcb_get_property_reply_t *reply1; + xcb_grab_keyboard_cookie_t cookie2; + xcb_grab_keyboard_reply_t *reply2; + + cookie1 = xcb_get_property (dpyinfo->xcb_connection, window, ... + cookie2 = xcb_grab_keyboard (dpyinfo->xcb_connection, ... + reply1 = xcb_get_property_reply (dpyinfo->xcb_connection, + cookie1); + reply2 = xcb_grab_keyboard_reply (dpyinfo->xcb_connection, + cookie2); +#endif + + In this code, the GetProperty and GrabKeyboard requests + are made simultaneously, and replies are then obtained + from the server at once, avoiding the extraneous + roundtrip to the X server after the call to + `XGetWindowProperty'. + + However, please keep an alternative implementation + available for use when Emacs is built without XCB. */ + +#if 0 /* Verify that we can still talk to the frame's X window, and note any recent change in visibility. */ #ifdef HAVE_X_WINDOWS if (FRAME_WINDOW_P (f1)) x_sync (f1); #endif +#endif + if (!FRAME_TOOLTIP_P (f1) /* Tooltips and child frames count neither for invisibility nor for deletions. */ diff --git a/src/xterm.c b/src/xterm.c index c775f199857..37b907ee9d2 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -27202,13 +27202,12 @@ do_ewmh_fullscreen (struct frame *f) static void XTfullscreen_hook (struct frame *f) { - if (FRAME_VISIBLE_P (f)) - { - block_input (); - x_check_fullscreen (f); - x_sync (f); - unblock_input (); - } + if (!FRAME_VISIBLE_P (f)) + return; + + block_input (); + x_check_fullscreen (f); + unblock_input (); } @@ -27302,10 +27301,7 @@ x_check_fullscreen (struct frame *f) if (FRAME_VISIBLE_P (f)) x_wait_for_event (f, ConfigureNotify); else - { - change_frame_size (f, width, height, false, true, false); - x_sync (f); - } + change_frame_size (f, width, height, false, true, false); } /* `x_net_wm_state' might have reset the fullscreen frame parameter, @@ -27519,8 +27515,6 @@ x_set_window_size_1 (struct frame *f, bool change_gravity, adjust_frame_size (f, FRAME_PIXEL_TO_TEXT_WIDTH (f, width), FRAME_PIXEL_TO_TEXT_HEIGHT (f, height), 5, 0, Qx_set_window_size_1); - - x_sync (f); } } commit bd58dcedfb95d25b8d9832fa7ca386d75e35d4ce Author: Juanma Barranquero Date: Sat Dec 3 12:01:10 2022 +0100 Fix and expand tests broken by commit 2772ebe366 of 2022-11-28 * test/lisp/emacs-lisp/comp-tests.el (with-test-native-compile-prune-cache) (test-native-compile-prune-cache) (test-native-compile-prune-cache/delete-only-eln) (test-native-compile-prune-cache/dont-delete-in-parent-of-cache): Check that the last directory in `native-comp-eln-load-path' is not affected by `native-compile-prune-cache'. diff --git a/test/lisp/emacs-lisp/comp-tests.el b/test/lisp/emacs-lisp/comp-tests.el index 082b641fe30..418c7296948 100644 --- a/test/lisp/emacs-lisp/comp-tests.el +++ b/test/lisp/emacs-lisp/comp-tests.el @@ -31,25 +31,30 @@ native-comp-eln-load-path (defmacro with-test-native-compile-prune-cache (&rest body) (declare (indent 0) (debug t)) `(ert-with-temp-directory testdir - (setq testdir (expand-file-name "eln-cache" testdir)) - (make-directory testdir) - (let* ((c1 (expand-file-name "29.0.50-cur" testdir)) - (c2 (expand-file-name "29.0.50-old" testdir)) - (native-comp-eln-load-path (list testdir)) - (comp-native-version-dir "29.0.50-cur")) - (dolist (d (list c1 c2)) - (make-directory d) - (with-temp-file (expand-file-name "some.eln" d) (insert "foo")) - (with-temp-file (expand-file-name "some.eln.tmp" d) (insert "foo"))) - ,@body))) + (let ((usr-cache (expand-file-name "eln-usr-cache" testdir)) + (sys-cache (expand-file-name "eln-sys-cache" testdir))) + (make-directory usr-cache) + (make-directory sys-cache) + (let* ((c1 (expand-file-name "29.0.50-cur" usr-cache)) + (c2 (expand-file-name "29.0.50-old" usr-cache)) + (s1 (expand-file-name "29.0.50-cur" sys-cache)) + (s2 (expand-file-name "preloaded" s1)) + (native-comp-eln-load-path (list usr-cache sys-cache)) + (comp-native-version-dir "29.0.50-cur")) + (dolist (d (list c1 c2 s1 s2)) + (make-directory d) + (with-temp-file (expand-file-name "some.eln" d) (insert "foo")) + (with-temp-file (expand-file-name "some.eln.tmp" d) (insert "foo"))) + ,@body)))) (ert-deftest test-native-compile-prune-cache () (skip-unless (featurep 'native-compile)) (with-test-native-compile-prune-cache (native-compile-prune-cache) - (should (file-directory-p c1)) - (should (file-regular-p (expand-file-name "some.eln" c1))) - (should (file-regular-p (expand-file-name "some.eln.tmp" c1))) + (dolist (d (list c1 s1 s2)) + (should (file-directory-p d)) + (should (file-regular-p (expand-file-name "some.eln" d))) + (should (file-regular-p (expand-file-name "some.eln.tmp" d)))) (should-not (file-directory-p c2)) (should-not (file-regular-p (expand-file-name "some.eln" c2))) (should-not (file-regular-p (expand-file-name "some.eln.tmp" c2))))) @@ -57,21 +62,23 @@ test-native-compile-prune-cache (ert-deftest test-native-compile-prune-cache/delete-only-eln () (skip-unless (featurep 'native-compile)) (with-test-native-compile-prune-cache - (with-temp-file (expand-file-name "keep1.txt" c1) (insert "foo")) - (with-temp-file (expand-file-name "keep2.txt" c2) (insert "foo")) + (dolist (d (list c1 c2 s1 s2)) + (with-temp-file (expand-file-name "keep.txt" d) (insert "foo"))) (native-compile-prune-cache) - (should (file-regular-p (expand-file-name "keep1.txt" c1))) - (should (file-regular-p (expand-file-name "keep2.txt" c2))))) + (dolist (d (list c1 c2 s1 s2)) + (should (file-regular-p (expand-file-name "keep.txt" d)))))) (ert-deftest test-native-compile-prune-cache/dont-delete-in-parent-of-cache () (skip-unless (featurep 'native-compile)) (with-test-native-compile-prune-cache - (let ((f1 (expand-file-name "../some.eln" testdir)) - (f2 (expand-file-name "some.eln" testdir))) - (with-temp-file f1 (insert "foo")) - (with-temp-file f2 (insert "foo")) + (let ((f1 (expand-file-name "../some.eln" usr-cache)) + (f2 (expand-file-name "some.eln" usr-cache)) + (f3 (expand-file-name "../some.eln" sys-cache)) + (f4 (expand-file-name "some.eln" sys-cache))) + (dolist (f (list f1 f2 f3 f4)) + (with-temp-file f (insert "foo"))) (native-compile-prune-cache) - (should (file-regular-p f1)) - (should (file-regular-p f2))))) + (dolist (f (list f1 f2 f3 f4)) + (should (file-regular-p f)))))) ;;; comp-tests.el ends here commit a0dd9fdebe3baaccdbda428df428f696ee38356d Author: Stefan Kangas Date: Sat Dec 3 11:29:37 2022 +0100 ; Add cross-reference to string-equal docstring * lisp/subr.el (string-equal-ignore-case): * src/fns.c (Fstring_equal): Doc fix; add cross-references. diff --git a/lisp/subr.el b/lisp/subr.el index 15662162798..21f43092d42 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -5437,7 +5437,9 @@ replace-regexp-in-string (defsubst string-equal-ignore-case (string1 string2) "Compare STRING1 and STRING2 case-insensitively. Upper-case and lower-case letters are treated as equal. -Unibyte strings are converted to multibyte for comparison." +Unibyte strings are converted to multibyte for comparison. + +See also `string-equal'." (declare (pure t) (side-effect-free t)) (eq t (compare-strings string1 0 nil string2 0 nil t))) diff --git a/src/fns.c b/src/fns.c index 7cc6d00afef..d8744c1a4de 100644 --- a/src/fns.c +++ b/src/fns.c @@ -334,7 +334,9 @@ DEFUN ("string-distance", Fstring_distance, Sstring_distance, 2, 3, 0, DEFUN ("string-equal", Fstring_equal, Sstring_equal, 2, 2, 0, doc: /* Return t if two strings have identical contents. Case is significant, but text properties are ignored. -Symbols are also allowed; their print names are used instead. */) +Symbols are also allowed; their print names are used instead. + +See also `string-equal-ignore-case'. */) (register Lisp_Object s1, Lisp_Object s2) { if (SYMBOLP (s1)) commit 11c3c54d8ade69003f441918b607f073e6fa39f1 Author: Eli Zaretskii Date: Sat Dec 3 12:21:00 2022 +0200 Fix handling of relative directories in "--init-directory=DIR" * lisp/startup.el (command-line): Interpret non-absolute file names in '--init-directory' relative to the directory from which Emacs is started. (Bug#59795) diff --git a/lisp/startup.el b/lisp/startup.el index d985d57d3c7..6270de2ace6 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -1261,7 +1261,9 @@ command-line (setq user-emacs-directory (or argval (pop args)) user-emacs-directory (if (stringp user-emacs-directory) (file-name-as-directory - user-emacs-directory) + (expand-file-name + user-emacs-directory + command-line-default-directory)) user-emacs-directory) argval nil)) ((member argi '("-u" "-user")) commit 401f76cc3d6210dd546bbb22f2ae60d529e59fbe Author: Eli Zaretskii Date: Sat Dec 3 12:03:13 2022 +0200 Make sure 'user-emacs-directory' ends in a slash * lisp/startup.el (command-line): Make sure 'user-emacs-directory' has the form of a directory. diff --git a/lisp/startup.el b/lisp/startup.el index 5e0a47d3f8f..d985d57d3c7 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -1259,6 +1259,10 @@ command-line (setq init-file-user nil)) ((member argi '("-init-directory")) (setq user-emacs-directory (or argval (pop args)) + user-emacs-directory (if (stringp user-emacs-directory) + (file-name-as-directory + user-emacs-directory) + user-emacs-directory) argval nil)) ((member argi '("-u" "-user")) (setq init-file-user (or argval (pop args)) commit 641ef36403b2d485bb4f500a7a6de33b6da7642c Author: Eli Zaretskii Date: Sat Dec 3 11:32:00 2022 +0200 Fix gud-minor-mode-menu * lisp/emacs-lisp/easy-mmode.el (define-minor-mode) (easy-mmode-define-keymap): Don't declare obsolete, since we are still using it in gud.el. (Bug#59769) (Bug#59605) Do not merge to master. diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index 8de4d8a9c2d..2df390ecbeb 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el @@ -417,8 +417,6 @@ define-minor-mode `(defvar ,keymap-sym (let ((m ,keymap)) (cond ((keymapp m) m) - ;; FIXME: `easy-mmode-define-keymap' is obsolete, - ;; so this form should also be obsolete somehow. ((listp m) (with-suppressed-warnings ((obsolete easy-mmode-define-keymap)) @@ -684,7 +682,6 @@ easy-mmode-define-keymap :group Ignored. :suppress Non-nil to call `suppress-keymap' on keymap, `nodigits' to suppress digits as prefix arguments." - (declare (obsolete define-keymap "29.1")) (let (inherit dense suppress) (while args (let ((key (pop args)) commit 3623d5c195dba3a663380e6a40fac3ea5b1cb491 Author: Eli Zaretskii Date: Sat Dec 3 11:16:41 2022 +0200 Revert "Make easy-mmode-defmap obsolete and adjust only caller" This reverts commit 8bb5c1bfec0929f2ba419e1c503f5acc01c336c2. That commit lost too many useful features in the GUD menus and caused several bugs, the last of them bug#59769. Do not merge to master. diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index 7d54a84687b..8de4d8a9c2d 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el @@ -725,7 +725,9 @@ easy-mmode-defmap the constant's documentation. This macro is deprecated; use `defvar-keymap' instead." - (declare (doc-string 3) (indent 1) (obsolete defvar-keymap "29.1")) + ;; FIXME: Declare obsolete in favor of `defvar-keymap'. It is still + ;; used for `gud-menu-map' and `gud-minor-mode-map', so fix that first. + (declare (doc-string 3) (indent 1)) `(defconst ,m (easy-mmode-define-keymap ,bs nil (if (boundp ',m) ,m) ,(cons 'list args)) ,doc)) diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 6ffcf497b93..143fa8c6798 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -159,96 +159,143 @@ gud-stop-subjob (t (comint-interrupt-subjob))))) -(defvar-keymap gud-mode-map - ;; Will inherit from comint-mode via define-derived-mode. - :doc "`gud-mode' keymap.") +(easy-mmode-defmap gud-menu-map + '(([help] "Info (debugger)" . gud-goto-info) + ([tooltips] menu-item "Show GUD tooltips" gud-tooltip-mode + :enable (and (not emacs-basic-display) + (display-graphic-p) + (fboundp 'x-show-tip)) + :visible (memq gud-minor-mode + '(gdbmi guiler dbx sdb xdb pdb)) + :button (:toggle . gud-tooltip-mode)) + ([refresh] "Refresh" . gud-refresh) + ([run] menu-item "Run" gud-run + :enable (not gud-running) + :visible (or (memq gud-minor-mode '(gdb dbx jdb)) + (and (eq gud-minor-mode 'gdbmi) + (or (not (gdb-show-run-p)) + (bound-and-true-p + gdb-active-process))))) + ([go] . (menu-item (if (bound-and-true-p gdb-active-process) + "Continue" "Run") + gud-go + :visible (and (eq gud-minor-mode 'gdbmi) + (gdb-show-run-p)))) + ([stop] menu-item "Stop" gud-stop-subjob + :visible (or (not (memq gud-minor-mode '(gdbmi pdb))) + (and (eq gud-minor-mode 'gdbmi) + (gdb-show-stop-p)))) + ([until] menu-item "Continue to selection" gud-until + :enable (not gud-running) + :visible (and (memq gud-minor-mode '(gdbmi gdb perldb)) + (gud-tool-bar-item-visible-no-fringe))) + ([remove] menu-item "Remove Breakpoint" gud-remove + :enable (not gud-running) + :visible (gud-tool-bar-item-visible-no-fringe)) + ([tbreak] menu-item "Temporary Breakpoint" gud-tbreak + :enable (not gud-running) + :visible (memq gud-minor-mode + '(gdbmi gdb sdb xdb))) + ([break] menu-item "Set Breakpoint" gud-break + :enable (not gud-running) + :visible (gud-tool-bar-item-visible-no-fringe)) + ([up] menu-item "Up Stack" gud-up + :enable (not gud-running) + :visible (memq gud-minor-mode + '(gdbmi gdb guiler dbx xdb jdb pdb))) + ([down] menu-item "Down Stack" gud-down + :enable (not gud-running) + :visible (memq gud-minor-mode + '(gdbmi gdb guiler dbx xdb jdb pdb))) + ([pp] menu-item "Print S-expression" gud-pp + :enable (and (not gud-running) + (bound-and-true-p gdb-active-process)) + :visible (and (string-equal + (buffer-local-value + 'gud-target-name gud-comint-buffer) + "emacs") + (eq gud-minor-mode 'gdbmi))) + ([print*] . (menu-item (if (eq gud-minor-mode 'jdb) + "Dump object" + "Print Dereference") + gud-pstar + :enable (not gud-running) + :visible (memq gud-minor-mode '(gdbmi gdb jdb)))) + ([print] menu-item "Print Expression" gud-print + :enable (not gud-running)) + ([watch] menu-item "Watch Expression" gud-watch + :enable (not gud-running) + :visible (eq gud-minor-mode 'gdbmi)) + ([finish] menu-item "Finish Function" gud-finish + :enable (not gud-running) + :visible (memq gud-minor-mode + '(gdbmi gdb guiler xdb jdb pdb))) + ([stepi] menu-item "Step Instruction" gud-stepi + :enable (not gud-running) + :visible (memq gud-minor-mode '(gdbmi gdb dbx))) + ([nexti] menu-item "Next Instruction" gud-nexti + :enable (not gud-running) + :visible (memq gud-minor-mode '(gdbmi gdb dbx))) + ([step] menu-item "Step Line" gud-step + :enable (not gud-running)) + ([next] menu-item "Next Line" gud-next + :enable (not gud-running)) + ([cont] menu-item "Continue" gud-cont + :enable (not gud-running) + :visible (not (eq gud-minor-mode 'gdbmi)))) + "Menu for `gud-mode'." + :name "Gud") + +(easy-mmode-defmap gud-minor-mode-map + (append + `(([menu-bar debug] . ("Gud" . ,gud-menu-map))) + ;; Get tool bar like functionality from the menu bar on a text only + ;; terminal. + (unless window-system + `(([menu-bar down] + . (,(propertize "down" 'face 'font-lock-doc-face) . gud-down)) + ([menu-bar up] + . (,(propertize "up" 'face 'font-lock-doc-face) . gud-up)) + ([menu-bar finish] + . (,(propertize "finish" 'face 'font-lock-doc-face) . gud-finish)) + ([menu-bar step] + . (,(propertize "step" 'face 'font-lock-doc-face) . gud-step)) + ([menu-bar next] + . (,(propertize "next" 'face 'font-lock-doc-face) . gud-next)) + ([menu-bar until] menu-item + ,(propertize "until" 'face 'font-lock-doc-face) gud-until + :visible (memq gud-minor-mode '(gdbmi gdb perldb))) + ([menu-bar cont] menu-item + ,(propertize "cont" 'face 'font-lock-doc-face) gud-cont + :visible (not (eq gud-minor-mode 'gdbmi))) + ([menu-bar run] menu-item + ,(propertize "run" 'face 'font-lock-doc-face) gud-run + :visible (memq gud-minor-mode '(gdbmi gdb dbx jdb))) + ([menu-bar go] menu-item + ,(propertize " go " 'face 'font-lock-doc-face) gud-go + :visible (and (eq gud-minor-mode 'gdbmi) + (gdb-show-run-p))) + ([menu-bar stop] menu-item + ,(propertize "stop" 'face 'font-lock-doc-face) gud-stop-subjob + :visible (or (and (eq gud-minor-mode 'gdbmi) + (gdb-show-stop-p)) + (not (eq gud-minor-mode 'gdbmi)))) + ([menu-bar print] + . (,(propertize "print" 'face 'font-lock-doc-face) . gud-print)) + ([menu-bar tools] . undefined) + ([menu-bar buffer] . undefined) + ([menu-bar options] . undefined) + ([menu-bar edit] . undefined) + ([menu-bar file] . undefined)))) + "Map used in visited files.") -(defvar-keymap gud-minor-mode-map - :parent gud-mode-map) +(setf (alist-get 'gud-minor-mode minor-mode-map-alist) + gud-minor-mode-map) -(easy-menu-define gud-menu-map gud-mode-map - "Menu for `gud-mode'." - '("Gud" - ["Continue" gud-cont - :enable (not gud-running) - :visible (not (eq gud-minor-mode 'gdbmi))] - ["Next Line" gud-next - :enable (not gud-running)] - ["Step Line" gud-step - :enable (not gud-running)] - ["Next Instruction" gud-nexti - :enable (not gud-running) - :visible (memq gud-minor-mode '(gdbmi gdb dbx))] - ["Step Instruction" gud-stepi - :enable (not gud-running) - :visible (memq gud-minor-mode '(gdbmi gdb dbx))] - ["Finish Function" gud-finish - :enable (not gud-running) - :visible (memq gud-minor-mode '(gdbmi gdb guiler xdb jdb pdb))] - ["Watch Expression" gud-watch - :enable (not gud-running) - :visible (eq gud-minor-mode 'gdbmi)] - ["Print Expression" gud-print - :enable (not gud-running)] - ["Dump object-Derefenrece" gud-pstar - :label (if (eq gud-minor-mode 'jdb) - "Dump object" - "Print Dereference") - :enable (not gud-running) - :visible (memq gud-minor-mode '(gdbmi gdb jdb))] - ["Print S-expression" gud-pp - :enable (and (not gud-running) - (bound-and-true-p gdb-active-process)) - :visible (and (string-equal - (buffer-local-value - 'gud-target-name gud-comint-buffer) - "emacs") - (eq gud-minor-mode 'gdbmi))] - ["Down Stack" gud-down - :enable (not gud-running) - :visible (memq gud-minor-mode '(gdbmi gdb guiler dbx xdb jdb pdb))] - ["Up Stack" gud-up - :enable (not gud-running) - :visible (memq gud-minor-mode - '(gdbmi gdb guiler dbx xdb jdb pdb))] - ["Set Breakpoint" gud-break - :enable (not gud-running) - :visible (gud-tool-bar-item-visible-no-fringe)] - ["Temporary Breakpoint" gud-tbreak - :enable (not gud-running) - :visible (memq gud-minor-mode '(gdbmi gdb sdb xdb))] - ["Remove Breakpoint" gud-remove - :enable (not gud-running) - :visible (gud-tool-bar-item-visible-no-fringe)] - ["Continue to selection" gud-until - :enable (not gud-running) - :visible (and (memq gud-minor-mode '(gdbmi gdb perldb)) - (gud-tool-bar-item-visible-no-fringe))] - ["Stop" gud-stop-subjob - :visible (or (not (memq gud-minor-mode '(gdbmi pdb))) - (and (eq gud-minor-mode 'gdbmi) - (gdb-show-stop-p)))] - ["Continue-Run" gud-go - :label (if (bound-and-true-p gdb-active-process) - "Continue" "Run") - :visible (and (eq gud-minor-mode 'gdbmi) - (gdb-show-run-p))] - ["Run" gud-run - :enable (not gud-running) - :visible (or (memq gud-minor-mode '(gdb dbx jdb)) - (and (eq gud-minor-mode 'gdbmi) - (or (not (gdb-show-run-p)) - (bound-and-true-p - gdb-active-process))))] - ["Refresh" gud-refresh] - ["Show GUD tooltips" gud-tooltip-mode - :enable (and (not emacs-basic-display) - (display-graphic-p) - (fboundp 'x-show-tip)) - :visible (memq gud-minor-mode - '(gdbmi guiler dbx sdb xdb pdb)) - :button (:toggle . gud-tooltip-mode)] - ["Info (debugger)" gud-goto-info])) +(defvar gud-mode-map + ;; Will inherit from comint-mode via define-derived-mode. + (make-sparse-keymap) + "`gud-mode' keymap.") (setf (alist-get 'gud-minor-mode minor-mode-map-alist) gud-minor-mode-map) commit 17d40c163e088e25152aedcfb18d733cc8e54756 Author: Sean Whitton Date: Fri Dec 2 23:42:10 2022 -0700 vc-git-print-log: Don't assume vc-git-log-switches is a list * lisp/vc/vc-git.el (vc-git-print-log): Call ensure-list on vc-git-log-switches to handle the case where it's a singular string. diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index a1ff03144bc..38e9d5f9c91 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -1325,7 +1325,7 @@ vc-git-print-log ,(format "--pretty=tformat:%s" (car vc-git-root-log-format)) "--abbrev-commit")) - vc-git-log-switches + (ensure-list vc-git-log-switches) (when (numberp limit) (list "-n" (format "%s" limit))) (when start-revision