summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/byte-opt.el4
-rw-r--r--lisp/emacs-lisp/bytecomp.el4
-rw-r--r--lisp/emacs-lisp/comp.el3
-rw-r--r--lisp/emacs-lisp/cond-star.el2
-rw-r--r--lisp/emacs-lisp/easy-mmode.el4
-rw-r--r--lisp/emacs-lisp/lisp-mode.el17
-rw-r--r--lisp/emacs-lisp/map-ynp.el37
-rw-r--r--lisp/emacs-lisp/package.el30
8 files changed, 62 insertions, 39 deletions
diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el
index 0a89a33cbc3..d63051e8bca 100644
--- a/lisp/emacs-lisp/byte-opt.el
+++ b/lisp/emacs-lisp/byte-opt.el
@@ -1789,6 +1789,8 @@ See Info node `(elisp) Integer Basics'."
tool-bar-pixel-width window-system
;; fringe.c
fringe-bitmaps-at-pos
+ ;; json.c
+ json-serialize json-parse-string
;; keyboard.c
posn-at-point posn-at-x-y
;; keymap.c
@@ -1979,6 +1981,8 @@ See Info node `(elisp) Integer Basics'."
length> member memq memql nth nthcdr proper-list-p rassoc rassq
safe-length string-bytes string-distance string-equal string-lessp
string-search string-version-lessp take value<
+ ;; json.c
+ json-serialize json-parse-string
;; search.c
regexp-quote
;; syntax.c
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index f058fc48cc7..07eb4690fce 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -6049,8 +6049,8 @@ and corresponding effects."
:buffer :host :service :type :family :local :remote :coding
:nowait :noquery :stop :filter :filter-multibyte :sentinel
:log :plist :tls-parameters :server :broadcast :dontroute
- :keepalive :linger :oobinline :priority :reuseaddr :bindtodevice
- :use-external-socket)
+ :keepalive :linger :oobinline :priority :reuseaddr :nodelay
+ :bindtodevice :use-external-socket)
'(:name :service))))
(provide 'byte-compile)
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index da351e99d91..2966ed255ac 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -3667,7 +3667,7 @@ the compilation was successful return the compiled function."
"Native compile if necessary all the .el files present in DIRECTORY.
Each .el file is native-compiled if the corresponding .eln file is not
found in any directory mentioned in `native-comp-eln-load-path'.
-The search within DIRECTORY is perfomed recursively."
+The search within DIRECTORY is performed recursively."
(mapc (lambda (file)
(unless (comp-lookup-eln file)
(native-compile file)))
@@ -3739,6 +3739,7 @@ variable \"NATIVE_DISABLED\" is set, only byte compile."
(comp--write-bytecode-file eln-file)
(setq command-line-args-left (cdr command-line-args-left)))))
+;;;###autoload
(defun native-compile-prune-cache ()
"Remove .eln files that aren't applicable to the current Emacs invocation."
(interactive)
diff --git a/lisp/emacs-lisp/cond-star.el b/lisp/emacs-lisp/cond-star.el
index 0e4718f088d..7ba6bf369b0 100644
--- a/lisp/emacs-lisp/cond-star.el
+++ b/lisp/emacs-lisp/cond-star.el
@@ -22,7 +22,7 @@
;;; Commentary:
-;; This library implements `cond*', an alternative to 'pcase'.
+;; This library implements `cond*', an alternative to `pcase'.
;; Here is the list of functions the generated code is known to call:
;; car, cdr, car-safe, cdr-safe, nth, nthcdr, null, eq, equal, eql, =,
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el
index db00e929ea9..9c429828b13 100644
--- a/lisp/emacs-lisp/easy-mmode.el
+++ b/lisp/emacs-lisp/easy-mmode.el
@@ -764,7 +764,7 @@ CSS contains a list of syntax specifications of the form (CHAR . SYNTAX)."
;;;
(defun easy-mmode--prev (re name count &optional endfun narrowfun)
- "Go to the COUNT'th previous occurence of RE.
+ "Go to the COUNT'th previous occurrence of RE.
If none, error with NAME.
@@ -788,7 +788,7 @@ ENDFUN and NARROWFUN are treated like in `easy-mmode-define-navigation'."
(when re-narrow (funcall narrowfun)))))
(defun easy-mmode--next (re name count &optional endfun narrowfun)
- "Go to the next COUNT'th occurence of RE.
+ "Go to the next COUNT'th occurrence of RE.
If none, error with NAME.
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index 220bb5175ea..d0c32d238bc 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -308,7 +308,7 @@ This will generate compile-time constants from BINDINGS."
(buffer-substring-no-properties
beg0 end0)))))
(buffer-substring-no-properties (1+ beg0) end0))
- `(face ,font-lock-warning-face
+ '(face font-lock-warning-face
help-echo "This \\ has no effect"))))
(defun lisp--match-confusable-symbol-character (limit)
@@ -490,14 +490,17 @@ This will generate compile-time constants from BINDINGS."
(2 font-lock-constant-face nil t))
;; Words inside \\[], \\<>, \\{} or \\`' tend to be for
;; `substitute-command-keys'.
- (,(rx "\\\\" (or (seq "[" (group-n 1 lisp-mode-symbol) "]")
+ (,(rx "\\\\" (or (seq "["
+ (group-n 1 (seq lisp-mode-symbol (not "\\"))) "]")
(seq "`" (group-n 1
;; allow multiple words, e.g. "C-x a"
lisp-mode-symbol (* " " lisp-mode-symbol))
"'")))
(1 font-lock-constant-face prepend))
- (,(rx "\\\\" (or (seq "<" (group-n 1 lisp-mode-symbol) ">")
- (seq "{" (group-n 1 lisp-mode-symbol) "}")))
+ (,(rx "\\\\" (or (seq "<"
+ (group-n 1 (seq lisp-mode-symbol (not "\\"))) ">")
+ (seq "{"
+ (group-n 1 (seq lisp-mode-symbol (not "\\"))) "}")))
(1 font-lock-variable-name-face prepend))
;; Ineffective backslashes (typically in need of doubling).
("\\(\\\\\\)\\([^\"\\]\\)"
@@ -657,9 +660,9 @@ Lisp font lock syntactic face function."
(let ((listbeg (nth 1 state)))
(if (or (lisp-string-in-doc-position-p listbeg startpos)
(lisp-string-after-doc-keyword-p listbeg startpos))
- font-lock-doc-face
- font-lock-string-face))))
- font-lock-comment-face))
+ 'font-lock-doc-face
+ 'font-lock-string-face))))
+ 'font-lock-comment-face))
(defun lisp-adaptive-fill ()
"Return fill prefix found at point.
diff --git a/lisp/emacs-lisp/map-ynp.el b/lisp/emacs-lisp/map-ynp.el
index 7b135c54a15..8ba88972a89 100644
--- a/lisp/emacs-lisp/map-ynp.el
+++ b/lisp/emacs-lisp/map-ynp.el
@@ -135,8 +135,10 @@ The function's value is the number of actions taken."
mouse-event last-nonmenu-event))
(setq user-keys (if action-alist
(concat (mapconcat (lambda (elt)
- (key-description
- (vector (car elt))))
+ (substitute-command-keys
+ (format "\\`%s'"
+ (key-description
+ (vector (car elt))))))
action-alist ", ")
" ")
"")
@@ -165,10 +167,13 @@ The function's value is the number of actions taken."
'quit))
;; Prompt in the echo area.
(let ((cursor-in-echo-area (not no-cursor-in-echo-area)))
- (message (apply 'propertize "%s(y, n, !, ., q, %sor %s) "
- minibuffer-prompt-properties)
- prompt user-keys
- (key-description (vector help-char)))
+ (message (substitute-command-keys
+ (format
+ (apply #'propertize
+ "%s(\\`y', \\`n', \\`!', \\`.', \\`q', %sor \\`%s') "
+ minibuffer-prompt-properties)
+ prompt user-keys
+ (key-description (vector help-char)))))
(if minibuffer-auto-raise
(raise-frame (window-frame (minibuffer-window))))
(unwind-protect
@@ -184,12 +189,14 @@ The function's value is the number of actions taken."
(when (fboundp 'set-text-conversion-style)
(set-text-conversion-style text-conversion-style)))
;; Show the answer to the question.
- (message "%s(y, n, !, ., q, %sor %s) %s"
- prompt user-keys
- (key-description (vector help-char))
- (if (equal char -1)
- "[end-of-keyboard-macro]"
- (single-key-description char))))
+ (message (substitute-command-keys
+ (format
+ "%s(\\`y', \\`n', \\`!', \\`.', \\`q', %sor \\`%s') %s"
+ prompt user-keys
+ (key-description (vector help-char))
+ (if (equal char -1)
+ "[end-of-keyboard-macro]"
+ (single-key-description char))))))
(setq def (lookup-key map (vector char))))
(cond ((eq def 'exit)
(setq next (lambda () nil)))
@@ -264,8 +271,10 @@ Type \\`SPC' or \\`y' to %s the current %s;
(funcall try-again))
(t
;; Random char.
- (message "Type %s for help."
- (key-description (vector help-char)))
+ (message (substitute-command-keys
+ (format
+ "Type \\`%s' for help"
+ (key-description (vector help-char)))))
(beep)
(sit-for 1)
(funcall try-again))))
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index af07ba44e28..5f785071ea3 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -2438,9 +2438,10 @@ directory."
(defun package-install-selected-packages (&optional noconfirm)
"Ensure packages in `package-selected-packages' are installed.
If some packages are not installed, propose to install them.
-If optional argument NOCONFIRM is non-nil, don't ask for
-confirmation to install packages."
- (interactive)
+
+If optional argument NOCONFIRM is non-nil, or when invoked with a prefix
+argument, don't ask for confirmation to install packages."
+ (interactive "P")
(package--archives-initialize)
;; We don't need to populate `package-selected-packages' before
;; using here, because the outcome is the same either way (nothing
@@ -2616,26 +2617,31 @@ are invalid due to changed byte-code, macros or the like."
(package-recompile pkg-desc))))
;;;###autoload
-(defun package-autoremove ()
+(defun package-autoremove (&optional noconfirm)
"Remove packages that are no longer needed.
Packages that are no more needed by other packages in
`package-selected-packages' and their dependencies
-will be deleted."
- (interactive)
+will be deleted.
+
+If optional argument NOCONFIRM is non-nil, or when invoked with a prefix
+argument, don't ask for confirmation to install packages."
+ (interactive "P")
;; If `package-selected-packages' is nil, it would make no sense to
;; try to populate it here, because then `package-autoremove' will
;; do absolutely nothing.
- (when (or package-selected-packages
+ (when (or noconfirm
+ package-selected-packages
(yes-or-no-p
(format-message
"`package-selected-packages' is empty! Really remove ALL packages? ")))
(let ((removable (package--removable-packages)))
(if removable
- (when (y-or-n-p
- (format "Packages to delete: %d (%s), proceed? "
- (length removable)
- (mapconcat #'symbol-name removable " ")))
+ (when (or noconfirm
+ (y-or-n-p
+ (format "Packages to delete: %d (%s), proceed? "
+ (length removable)
+ (mapconcat #'symbol-name removable " "))))
(mapc (lambda (p)
(package-delete (cadr (assq p package-alist)) t))
removable))
@@ -2858,7 +2864,7 @@ Helper function for `describe-package'."
'action #'package-delete-button-action
'package-desc desc)))
(incompatible-reason
- (insert (propertize "Incompatible" 'font-lock-face font-lock-warning-face)
+ (insert (propertize "Incompatible" 'font-lock-face 'font-lock-warning-face)
" because it depends on ")
(if (stringp incompatible-reason)
(insert "Emacs " incompatible-reason ".")