summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2023-04-15 13:02:04 -0400
committerEli Zaretskii <eliz@gnu.org>2023-04-15 13:02:04 -0400
commit7191318b716debaca15b56ebf7b13f5a1b07b0f9 (patch)
tree010209f880a0076436ef0140ef11883dddd88ad9 /lisp
parentfebf4467bde3a7d90265f826f7e450a5c0f6ca46 (diff)
parent864a4dc236395e441aafd23b9cbca099afdc5324 (diff)
downloademacs-7191318b716debaca15b56ebf7b13f5a1b07b0f9.tar.gz
Merge from origin/emacs-29
864a4dc2363 Fix compilation of w32.c with old MinGW system headers a22eb9ae0f9 ruby-add-log-current-method: Reduce the use of 'nreverse' 17d803d0a75 Fix detection of WebP images by their signature 43290391ce2 ; Eglot: make version parseable by version-to-list 6e6e8b5c974 Add more documentation for the keys of `package-vc-select... 7972b76c2c7 ; vc-checkout: Wrap var lookup in 'bound-and-true-p' e9fef1d70ff vc-checkout: Try to use the vc-dir's backend first 372e024accd ; Fix wallpaper-tests on XFCE 7055fd8e43e Improve documentation related to 'ispell-complete-word' 61fd017abde * configure.ac: Add -lbsd on Haiku. 05971c4d9a4 Add menu to 'c-ts-mode' and 'c++-ts-mode' # Conflicts: # lisp/progmodes/eglot.el # lisp/progmodes/ruby-mode.el
Diffstat (limited to 'lisp')
-rw-r--r--lisp/emacs-lisp/package-vc.el30
-rw-r--r--lisp/image.el2
-rw-r--r--lisp/progmodes/c-ts-mode.el33
-rw-r--r--lisp/progmodes/ruby-mode.el4
-rw-r--r--lisp/textmodes/ispell.el17
-rw-r--r--lisp/vc/vc.el2
6 files changed, 54 insertions, 34 deletions
diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el
index ddc7ec4679b..a72bb084d31 100644
--- a/lisp/emacs-lisp/package-vc.el
+++ b/lisp/emacs-lisp/package-vc.el
@@ -147,32 +147,9 @@ is a symbol designating the package and SPEC is one of:
- nil, if any package version can be installed;
- a version string, if that specific revision is to be installed;
-- a property list, describing a package specification. Valid
- key/value pairs are
-
- `:url' (string)
- The URL of the repository used to fetch the package source.
-
- `:branch' (string)
- If given, the name of the branch to checkout after cloning the directory.
-
- `:lisp-dir' (string)
- The repository-relative name of the directory to use for loading the Lisp
- sources. If not given, the value defaults to the root directory
- of the repository.
-
- `:main-file' (string)
- The main file of the project, relevant to gather package metadata.
- If not given, the assumed default is the package name with \".el\"
- appended to it.
-
- `:vc-backend' (symbol)
- A symbol of the VC backend to use for cloning the package. The
- value ought to be a member of `vc-handled-backends'. If omitted,
- `vc-clone' will fall back onto the archive default or on
- `package-vc-default-backend'.
-
- All other keys are ignored.
+- a property list, describing a package specification. For more
+ details, please consult the subsection \"Specifying Package
+ Sources\" in the Info node `(emacs)Fetching Package Sources'.
This user option will be automatically updated to store package
specifications for packages that are not specified in any
@@ -186,6 +163,7 @@ archive."
(:branch string)
(:lisp-dir string)
(:main-file string)
+ (:doc string)
(:vc-backend symbol)))))
:version "29.1")
diff --git a/lisp/image.el b/lisp/image.el
index a32ff1a35bb..08190cf86bc 100644
--- a/lisp/image.el
+++ b/lisp/image.el
@@ -51,7 +51,7 @@ static \\(unsigned \\)?char \\1_bits" . xbm)
("\\`\\(?:MM\0\\*\\|II\\*\0\\)" . tiff)
("\\`[\t\n\r ]*%!PS" . postscript)
("\\`\xff\xd8" . jpeg) ; used to be (image-jpeg-p . jpeg)
- ("\\`RIFF....WEBPVP8" . webp)
+ ("\\`RIFF[^z-a][^z-a][^z-a][^z-a]WEBPVP8" . webp)
(,(let* ((incomment-re "\\(?:[^-]\\|-[^-]\\)")
(comment-re (concat "\\(?:!--" incomment-re "*-->[ \t\r\n]*<\\)")))
(concat "\\(?:<\\?xml[ \t\r\n]+[^>]*>\\)?[ \t\r\n]*<"
diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el
index 600650aadc1..5a38d714e5a 100644
--- a/lisp/progmodes/c-ts-mode.el
+++ b/lisp/progmodes/c-ts-mode.el
@@ -1070,6 +1070,39 @@ recommended to enable `electric-pair-mode' with this mode."
(treesit-major-mode-setup)))
+(easy-menu-define c-ts-mode-menu (list c-ts-mode-map c++-ts-mode-map)
+ "Menu for `c-ts-mode' and `c++-ts-mode'."
+ '("C/C++"
+ ["Comment Out Region" comment-region
+ :enable mark-active
+ :help "Comment out the region between the mark and point"]
+ ["Uncomment Region" (comment-region (region-beginning)
+ (region-end) '(4))
+ :enable mark-active
+ :help "Uncomment the region between the mark and point"]
+ ["Indent Top-level Expression" c-ts-mode-indent-defun
+ :help "Indent/reindent top-level function, class, etc."]
+ ["Indent Line or Region" indent-for-tab-command
+ :help "Indent current line or region, or insert a tab"]
+ ["Forward Expression" forward-sexp
+ :help "Move forward across one balanced expression"]
+ ["Backward Expression" backward-sexp
+ :help "Move back across one balanced expression"]
+ "--"
+ ("Style..."
+ ["Set Indentation Style..." c-ts-mode-set-style
+ :help "Set C/C++ indentation style for current buffer"]
+ ["Show Current Indentation Style" (message "Indentation Style: %s"
+ c-ts-mode-indent-style)
+ :help "Show the name of the C/C++ indentation style for current buffer"]
+ ["Set Comment Style" c-ts-mode-toggle-comment-style
+ :help "Toglle C/C++ comment style between block and line comments"])
+ "--"
+ ("Toggle..."
+ ["SubWord Mode" subword-mode
+ :style toggle :selected subword-mode
+ :help "Toggle sub-word movement and editing mode"])))
+
;; We could alternatively use parsers, but if this works well, I don't
;; see the need to change. This is copied verbatim from cc-guess.el.
(defconst c-ts-mode--c-or-c++-regexp
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el
index d2c4da794ac..e441ffbbfe3 100644
--- a/lisp/progmodes/ruby-mode.el
+++ b/lisp/progmodes/ruby-mode.el
@@ -1904,13 +1904,13 @@ See `add-log-current-defun-function'."
(progn
(unless (string-equal "self" (car mn)) ; def self.foo
;; def C.foo
- (let ((ml (nreverse mlist)))
+ (let ((ml (reverse mlist)))
;; If the method name references one of the
;; containing modules, drop the more nested ones.
(while ml
(if (string-equal (car ml) (car mn))
(setq mlist (nreverse (cdr ml)) ml nil))
- (or (setq ml (cdr ml)) (nreverse mlist))))
+ (setq ml (cdr ml))))
(if mlist
(setcdr (last mlist) (butlast mn))
(setq mlist (butlast mn))))
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index bb2bcfd8052..97c4ce9f32d 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -214,12 +214,14 @@ Must be greater than 1."
((file-readable-p "/usr/share/lib/dict/words")
"/usr/share/lib/dict/words")
((file-readable-p "/sys/dict") "/sys/dict"))
- "Alternate plain word-list dictionary for spelling help."
+ "Alternate plain word-list dictionary for spelling help.
+This is also used by `ispell-lookup-words' and `ispell-complete-word'."
:type '(choice file (const :tag "None" nil)))
(defcustom ispell-complete-word-dict nil
"Plain word-list dictionary used for word completion if
-different from `ispell-alternate-dictionary'."
+different from `ispell-alternate-dictionary'.
+This is also used by `ispell-lookup-words' and `ispell-complete-word'."
:type '(choice file (const :tag "None" nil)))
(defcustom ispell-message-dictionary-alist nil
@@ -2510,7 +2512,9 @@ Otherwise the variable `ispell-grep-command' contains the command
Optional second argument contains the dictionary to use; the default is
`ispell-alternate-dictionary', overridden by `ispell-complete-word-dict'
-if defined."
+if defined. If none of LOOKUP-DICT, `ispell-alternate-dictionary',
+and `ispell-complete-word-dict' name an existing word-list file,
+this function signals an error."
;; We don't use the filter for this function, rather the result is written
;; into a buffer. Hence there is no need to save the filter values.
(if (null lookup-dict)
@@ -3685,7 +3689,12 @@ If APPEND is non-nil, don't erase previous debugging output."
If optional INTERIOR-FRAG is non-nil, then the word may be a character
sequence inside of a word.
-Standard ispell choices are then available."
+Standard ispell choices are then available.
+
+This command uses a word-list file specified
+by `ispell-alternate-dictionary' or by `ispell-complete-word-dict';
+if none of those name an existing word-list file, this command
+signals an error."
;; FIXME: completion-at-point-function.
(interactive "P")
(let ((case-fold-search-val case-fold-search)
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 90905edb887..32b0d5d7556 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -1594,7 +1594,7 @@ After check-out, runs the normal hook `vc-checkout-hook'."
(vc-call make-version-backups-p file)
(vc-up-to-date-p file)
(vc-make-version-backup file))
- (let ((backend (vc-backend file)))
+ (let ((backend (or (bound-and-true-p vc-dir-backend) (vc-backend file))))
(with-vc-properties (list file)
(condition-case err
(vc-call-backend backend 'checkout file rev)