summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorStephen Leake <stephen_leake@stephe-leake.org>2019-07-30 11:03:15 -0700
committerStephen Leake <stephen_leake@stephe-leake.org>2019-07-30 11:03:15 -0700
commit01739625704aaaea6831cef459a4a53171689513 (patch)
treeef9f324b3fa6696647c6e637e436ee6160155b92 /lisp/emacs-lisp
parent056cbcb7a959463290bc91c19b909cbf3eb47d0a (diff)
parent9b480db6732c6d2e886838f112d9bd46fc8989bf (diff)
downloademacs-01739625704aaaea6831cef459a4a53171689513.tar.gz
emacs-01739625704aaaea6831cef459a4a53171689513.tar.bz2
emacs-01739625704aaaea6831cef459a4a53171689513.zip
Merge commit '9b480db6732c6d2e886838f112d9bd46fc8989bf'
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/autoload.el5
-rw-r--r--lisp/emacs-lisp/bytecomp.el17
-rw-r--r--lisp/emacs-lisp/cl-lib.el14
-rw-r--r--lisp/emacs-lisp/cl-macs.el24
-rw-r--r--lisp/emacs-lisp/derived.el44
-rw-r--r--lisp/emacs-lisp/edebug.el12
-rw-r--r--lisp/emacs-lisp/ert.el13
-rw-r--r--lisp/emacs-lisp/let-alist.el2
-rw-r--r--lisp/emacs-lisp/package-x.el1
-rw-r--r--lisp/emacs-lisp/package.el120
-rw-r--r--lisp/emacs-lisp/testcover.el16
-rw-r--r--lisp/emacs-lisp/timer.el7
12 files changed, 161 insertions, 114 deletions
diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el
index fa2c6cdd039..541b22e3eea 100644
--- a/lisp/emacs-lisp/autoload.el
+++ b/lisp/emacs-lisp/autoload.el
@@ -1125,7 +1125,10 @@ write its autoloads into the specified file instead."
;; Elements remaining in FILES have no existing autoload sections yet.
(let ((no-autoloads-time (or last-time '(0 0 0 0)))
(progress (make-progress-reporter
- (byte-compile-info-string "Scraping files for autoloads")
+ (byte-compile-info-string
+ (concat "Scraping files for "
+ (file-relative-name
+ generated-autoload-file)))
0 (length files) nil 10))
(file-count 0)
file-time)
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 125344b779b..6dcd4c6846a 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -2780,7 +2780,11 @@ If FORM is a lambda or a macro, byte-compile it as a function."
(setq fun (byte-compile-top-level fun nil 'eval))
(if macro (push 'macro fun))
(if (symbolp form)
- (fset form fun)
+ ;; byte-compile-top-level returns an *expression* equivalent to the
+ ;; `fun' expression, so we need to evaluate it, tho normally
+ ;; this is not needed because the expression is just a constant
+ ;; byte-code object, which is self-evaluating.
+ (fset form (eval fun t))
fun)))))))
(defun byte-compile-sexp (sexp)
@@ -2982,7 +2986,6 @@ for symbols generated by the byte compiler itself."
lexenv reserved-csts)
;; OUTPUT-TYPE advises about how form is expected to be used:
;; 'eval or nil -> a single form,
- ;; 'progn or t -> a list of forms,
;; 'lambda -> body of a lambda,
;; 'file -> used at file-level.
(let ((byte-compile--for-effect for-effect)
@@ -3013,6 +3016,7 @@ for symbols generated by the byte compiler itself."
(byte-compile-out-toplevel byte-compile--for-effect output-type)))
(defun byte-compile-out-toplevel (&optional for-effect output-type)
+ ;; OUTPUT-TYPE can be like that of `byte-compile-top-level'.
(if for-effect
;; The stack is empty. Push a value to be returned from (byte-code ..).
(if (eq (car (car byte-compile-output)) 'byte-discard)
@@ -3041,12 +3045,8 @@ for symbols generated by the byte compiler itself."
;; Note that even (quote foo) must be parsed just as any subr by the
;; interpreter, so quote should be compiled into byte-code in some contexts.
;; What to leave uncompiled:
- ;; lambda -> never. we used to leave it uncompiled if the body was
- ;; a single atom, but that causes confusion if the docstring
- ;; uses the (file . pos) syntax. Besides, now that we have
- ;; the Lisp_Compiled type, the compiled form is faster.
+ ;; lambda -> never. The compiled form is always faster.
;; eval -> atom, quote or (function atom atom atom)
- ;; progn -> as <<same-as-eval>> or (progn <<same-as-eval>> atom)
;; file -> as progn, but takes both quotes and atoms, and longer forms.
(let (rest
(maycall (not (eq output-type 'lambda))) ; t if we may make a funcall.
@@ -3076,8 +3076,9 @@ for symbols generated by the byte compiler itself."
(null (nthcdr 3 rest))
(setq tmp (get (car (car rest)) 'byte-opcode-invert))
(or (null (cdr rest))
- (and (memq output-type '(file progn t))
+ (and (eq output-type 'file)
(cdr (cdr rest))
+ (eql (length body) (cdr (car rest))) ;bug#34757
(eq (car (nth 1 rest)) 'byte-discard)
(progn (setq rest (cdr rest)) t))))
(setq maycall nil) ; Only allow one real function call.
diff --git a/lisp/emacs-lisp/cl-lib.el b/lisp/emacs-lisp/cl-lib.el
index f014f8e0104..7b22fa8483a 100644
--- a/lisp/emacs-lisp/cl-lib.el
+++ b/lisp/emacs-lisp/cl-lib.el
@@ -189,12 +189,16 @@ that the containing function should return.
\(fn &rest VALUES)")
-(cl--defalias 'cl-values-list #'identity
+(defun cl-values-list (list)
"Return multiple values, Common Lisp style, taken from a list.
-LIST specifies the list of values
-that the containing function should return.
-
-\(fn LIST)")
+LIST specifies the list of values that the containing function
+should return.
+
+Note that Emacs Lisp doesn't really support multiple values, so
+all this function does is return LIST."
+ (unless (listp list)
+ (signal 'wrong-type-argument list))
+ list)
(defsubst cl-multiple-value-list (expression)
"Return a list of the multiple values produced by EXPRESSION.
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index 4347b4b71bf..1ae72666244 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -695,8 +695,11 @@ its argument list allows full Common Lisp conventions."
"Bind the variables in ARGS to the result of EXPR and execute BODY."
(declare (indent 2)
(debug (&define cl-macro-list1 def-form cl-declarations def-body)))
- (let* ((cl--bind-lets nil) (cl--bind-forms nil)
- (cl--bind-defs nil) (cl--bind-block 'cl-none) (cl--bind-enquote nil))
+ (let* ((cl--bind-lets nil)
+ (cl--bind-forms nil)
+ (cl--bind-defs nil)
+ (cl--bind-block args)
+ (cl--bind-enquote nil))
(cl--do-arglist (or args '(&aux)) expr)
(macroexp-let* (nreverse cl--bind-lets)
(macroexp-progn (append (nreverse cl--bind-forms) body)))))
@@ -2719,8 +2722,10 @@ node `(cl)Structures' for the description of the options.
Each SLOT may instead take the form (SNAME SDEFAULT SOPTIONS...), where
SDEFAULT is the default value of that slot and SOPTIONS are keyword-value
pairs for that slot.
-Currently, only one keyword is supported, `:read-only'. If this has a
-non-nil value, that slot cannot be set via `setf'.
+Supported keywords for slots are:
+- `:read-only': If this has a non-nil value, that slot cannot be set via `setf'.
+- `:documentation': this is a docstring describing the slot.
+- `:type': the type of the field; currently unused.
\(fn NAME &optional DOCSTRING &rest SLOTS)"
(declare (doc-string 2) (indent 1)
@@ -2899,14 +2904,17 @@ non-nil value, that slot cannot be set via `setf'.
defaults))
(if (assq slot descp)
(error "Duplicate slots named %s in %s" slot name))
- (let ((accessor (intern (format "%s%s" conc-name slot))))
+ (let ((accessor (intern (format "%s%s" conc-name slot)))
+ (default-value (pop desc))
+ (doc (plist-get desc :documentation)))
(push slot slots)
- (push (pop desc) defaults)
+ (push default-value defaults)
;; The arg "cl-x" is referenced by name in eg pred-form
;; and pred-check, so changing it is not straightforward.
(push `(,defsym ,accessor (cl-x)
- ,(format "Access slot \"%s\" of `%s' struct CL-X."
- slot name)
+ ,(format "Access slot \"%s\" of `%s' struct CL-X.%s"
+ slot name
+ (if doc (concat "\n" doc) ""))
(declare (side-effect-free t))
,@(and pred-check
(list `(or ,pred-check
diff --git a/lisp/emacs-lisp/derived.el b/lisp/emacs-lisp/derived.el
index 6db0584b987..a6578e33086 100644
--- a/lisp/emacs-lisp/derived.el
+++ b/lisp/emacs-lisp/derived.el
@@ -113,9 +113,9 @@
;;;###autoload
(defmacro define-derived-mode (child parent name &optional docstring &rest body)
- "Create a new mode as a variant of an existing mode.
+ "Create a new mode CHILD which is a variant of an existing mode PARENT.
-The arguments to this command are as follow:
+The arguments are as follows:
CHILD: the name of the command for the derived mode.
PARENT: the name of the command for the parent mode (e.g. `text-mode')
@@ -123,24 +123,28 @@ PARENT: the name of the command for the parent mode (e.g. `text-mode')
NAME: a string which will appear in the status line (e.g. \"Hypertext\")
DOCSTRING: an optional documentation string--if you do not supply one,
the function will attempt to invent something useful.
+KEYWORD-ARGS:
+ optional arguments in the form of pairs of keyword and value.
+ The following keyword arguments are currently supported:
+
+ :group GROUP
+ Declare the customization group that corresponds
+ to this mode. The command `customize-mode' uses this.
+ :syntax-table TABLE
+ Use TABLE instead of the default (CHILD-syntax-table).
+ A nil value means to simply use the same syntax-table
+ as the parent.
+ :abbrev-table TABLE
+ Use TABLE instead of the default (CHILD-abbrev-table).
+ A nil value means to simply use the same abbrev-table
+ as the parent.
+ :after-hook FORM
+ A single lisp form which is evaluated after the mode
+ hooks have been run. It should not be quoted.
+
BODY: forms to execute just before running the
hooks for the new mode. Do not use `interactive' here.
-BODY can start with a bunch of keyword arguments. The following keyword
- arguments are currently understood:
-:group GROUP
- Declare the customization group that corresponds to this mode.
- The command `customize-mode' uses this.
-:syntax-table TABLE
- Use TABLE instead of the default (CHILD-syntax-table).
- A nil value means to simply use the same syntax-table as the parent.
-:abbrev-table TABLE
- Use TABLE instead of the default (CHILD-abbrev-table).
- A nil value means to simply use the same abbrev-table as the parent.
-:after-hook FORM
- A single lisp form which is evaluated after the mode hooks have been
- run. It should not be quoted.
-
Here is how you could define LaTeX-Thesis mode as a variant of LaTeX mode:
(define-derived-mode LaTeX-thesis-mode LaTeX-mode \"LaTeX-Thesis\")
@@ -149,7 +153,7 @@ You could then make new key bindings for `LaTeX-thesis-mode-map'
without changing regular LaTeX mode. In this example, BODY is empty,
and DOCSTRING is generated by default.
-On a more complicated level, the following command uses `sgml-mode' as
+As a more complex example, the following command uses `sgml-mode' as
the parent, and then sets the variable `case-fold-search' to nil:
(define-derived-mode article-mode sgml-mode \"Article\"
@@ -162,7 +166,9 @@ been generated automatically, with a reference to the keymap.
The new mode runs the hook constructed by the function
`derived-mode-hook-name'.
-See Info node `(elisp)Derived Modes' for more details."
+See Info node `(elisp)Derived Modes' for more details.
+
+\(fn CHILD PARENT NAME [DOCSTRING] [KEYWORD-ARGS...] &rest BODY)"
(declare (debug (&define name symbolp sexp [&optional stringp]
[&rest keywordp sexp] def-body))
(doc-string 4)
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el
index ab5553b4e83..c898da3d39f 100644
--- a/lisp/emacs-lisp/edebug.el
+++ b/lisp/emacs-lisp/edebug.el
@@ -41,7 +41,7 @@
;; See the Emacs Lisp Reference Manual for more details.
;; If you wish to change the default edebug global command prefix, change:
-;; (setq edebug-global-prefix "\C-xX")
+;; (setq global-edebug-prefix "\C-xX")
;; Edebug was written by
;; Daniel LaLiberte
@@ -1428,7 +1428,7 @@ contains a circular object."
;; Create initial coverage vector.
;; Only need one per expression, but it is simpler to use stop points.
(put name 'edebug-coverage
- (make-vector (length edebug-offset-list) 'unknown)))
+ (make-vector (length edebug-offset-list) 'edebug-unknown)))
(defun edebug-form (cursor)
@@ -2470,12 +2470,12 @@ See `edebug-behavior-alist' for implementations.")
(defun edebug--update-coverage (after-index value)
(let ((old-result (aref edebug-coverage after-index)))
(cond
- ((eq 'ok-coverage old-result))
- ((eq 'unknown old-result)
+ ((eq 'edebug-ok-coverage old-result))
+ ((eq 'edebug-unknown old-result)
(aset edebug-coverage after-index value))
;; Test if a different result.
((not (eq value old-result))
- (aset edebug-coverage after-index 'ok-coverage)))))
+ (aset edebug-coverage after-index 'edebug-ok-coverage)))))
;; Dynamically declared unbound variables.
@@ -4204,7 +4204,7 @@ reinstrument it."
(max 0 (- col (- (point) start-of-count-line))) ?\s)
(if (and (< 0 count)
(not (memq coverage
- '(unknown ok-coverage))))
+ '(edebug-unknown edebug-ok-coverage))))
"=" "")
(if (= count last-count) "" (int-to-string count))
" ")
diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el
index c90c06d0849..da241e6304f 100644
--- a/lisp/emacs-lisp/ert.el
+++ b/lisp/emacs-lisp/ert.el
@@ -1351,15 +1351,13 @@ Returns the stats object."
(let ((unexpected (ert-stats-completed-unexpected stats))
(skipped (ert-stats-skipped stats))
(expected-failures (ert--stats-failed-expected stats)))
- (message "\n%sRan %s tests, %s results as expected%s%s (%s, %f sec)%s\n"
+ (message "\n%sRan %s tests, %s results as expected, %s unexpected%s (%s, %f sec)%s\n"
(if (not abortedp)
""
"Aborted: ")
(ert-stats-total stats)
(ert-stats-completed-expected stats)
- (if (zerop unexpected)
- ""
- (format ", %s unexpected" unexpected))
+ unexpected
(if (zerop skipped)
""
(format ", %s skipped" skipped))
@@ -1505,9 +1503,10 @@ Ran \\([0-9]+\\) tests, \\([0-9]+\\) results as expected\
(setq nrun (+ nrun (string-to-number (match-string 2)))
nexpected (+ nexpected (string-to-number (match-string 3))))
(when (match-string 4)
- (push logfile unexpected)
- (setq nunexpected (+ nunexpected
- (string-to-number (match-string 4)))))
+ (let ((n (string-to-number (match-string 4))))
+ (unless (zerop n)
+ (push logfile unexpected)
+ (setq nunexpected (+ nunexpected n)))))
(when (match-string 5)
(push logfile skipped)
(setq nskipped (+ nskipped
diff --git a/lisp/emacs-lisp/let-alist.el b/lisp/emacs-lisp/let-alist.el
index dc54342eab6..a9bb31113b9 100644
--- a/lisp/emacs-lisp/let-alist.el
+++ b/lisp/emacs-lisp/let-alist.el
@@ -75,6 +75,8 @@ symbol, and each cdr is the same symbol without the `.'."
;; Return the cons cell inside a list, so it can be appended
;; with other results in the clause below.
(list (cons data (intern (replace-match "" nil nil name)))))))
+ ((vectorp data)
+ (apply #'nconc (mapcar #'let-alist--deep-dot-search data)))
((not (consp data)) nil)
((eq (car data) 'let-alist)
;; For nested ‘let-alist’ forms, ignore symbols appearing in the
diff --git a/lisp/emacs-lisp/package-x.el b/lisp/emacs-lisp/package-x.el
index 1486aeb3738..a84c63d8711 100644
--- a/lisp/emacs-lisp/package-x.el
+++ b/lisp/emacs-lisp/package-x.el
@@ -281,6 +281,7 @@ destination, prompt for one."
(let ((pkg-desc (package-buffer-info)))
(package-upload-buffer-internal pkg-desc "el")))))
+;;;###autoload
(defun package-upload-file (file)
"Upload the Emacs Lisp package FILE to the package archive.
Interactively, prompt for FILE. The package is considered a
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 53fa15d4199..e7e0bd11247 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -151,6 +151,7 @@
(require 'tabulated-list)
(require 'macroexp)
(require 'url-handlers)
+(require 'browse-url)
(defgroup package nil
"Manager for Emacs Lisp packages."
@@ -331,15 +332,13 @@ default directory."
:risky t
:version "26.1")
-(defcustom package-check-signature
- (if (and (require 'epg-config)
- (epg-find-configuration 'OpenPGP))
- 'allow-unsigned)
+(defcustom package-check-signature 'allow-unsigned
"Non-nil means to check package signatures when installing.
More specifically the value can be:
- nil: package signatures are ignored.
-- `allow-unsigned': install a package even if it is unsigned,
- but if it is signed and we have the key for it, verify the signature.
+- `allow-unsigned': install a package even if it is unsigned, but
+ if it is signed, we have the key for it, and OpenGPG is
+ installed, verify the signature.
- t: accept a package only if it comes with at least one verified signature.
- `all': same as t, except when the package has several signatures,
in which case we verify all the signatures.
@@ -353,6 +352,18 @@ contents of the archive."
:risky t
:version "27.1")
+(defun package-check-signature ()
+ "Check whether we have a usable OpenPGP configuration.
+If true, and `package-check-signature' is `allow-unsigned',
+return `allow-unsigned', otherwise return the value of
+`package-check-signature'."
+ (if (eq package-check-signature 'allow-unsigned)
+ (progn
+ (require 'epg-config)
+ (and (epg-find-configuration 'OpenPGP)
+ 'allow-unsigned))
+ package-check-signature))
+
(defcustom package-unsigned-archives nil
"List of archives where we do not check for package signatures."
:type '(repeat (string :tag "Archive name"))
@@ -1279,15 +1290,15 @@ errors."
(dolist (sig (epg-context-result-for context 'verify))
(if (eq (epg-signature-status sig) 'good)
(push sig good-signatures)
- ;; If package-check-signature is allow-unsigned, don't
+ ;; If `package-check-signature' is allow-unsigned, don't
;; signal error when we can't verify signature because of
;; missing public key. Other errors are still treated as
;; fatal (bug#17625).
- (unless (and (eq package-check-signature 'allow-unsigned)
+ (unless (and (eq (package-check-signature) 'allow-unsigned)
(eq (epg-signature-status sig) 'no-pubkey))
(setq had-fatal-error t))))
(when (or (null good-signatures)
- (and (eq package-check-signature 'all)
+ (and (eq (package-check-signature) 'all)
had-fatal-error))
(package--display-verify-error context sig-file)
(signal 'bad-signature (list sig-file)))
@@ -1318,7 +1329,7 @@ else, even if an error is signaled."
:async async :noerror t
;; Connection error is assumed to mean "no sig-file".
:error-form (let ((allow-unsigned
- (eq package-check-signature 'allow-unsigned)))
+ (eq (package-check-signature) 'allow-unsigned)))
(when (and callback allow-unsigned)
(funcall callback nil))
(when unwind (funcall unwind))
@@ -1602,7 +1613,7 @@ similar to an entry in `package-alist'. Save the cached copy to
(local-file (expand-file-name file dir)))
(when (listp (read content))
(make-directory dir t)
- (if (or (not package-check-signature)
+ (if (or (not (package-check-signature))
(member name package-unsigned-archives))
;; If we don't care about the signature, save the file and
;; we're done.
@@ -1654,7 +1665,7 @@ downloads in the background."
(let ((default-keyring (expand-file-name "package-keyring.gpg"
data-directory))
(inhibit-message (or inhibit-message async)))
- (when (and package-check-signature (file-exists-p default-keyring))
+ (when (and (package-check-signature) (file-exists-p default-keyring))
(condition-case-unless-debug error
(package-import-keyring default-keyring)
(error (message "Cannot import default keyring: %S" (cdr error))))))
@@ -1901,7 +1912,7 @@ if all the in-between dependencies are also in PACKAGE-LIST."
(file (concat (package-desc-full-name pkg-desc)
(package-desc-suffix pkg-desc))))
(package--with-response-buffer location :file file
- (if (or (not package-check-signature)
+ (if (or (not (package-check-signature))
(member (package-desc-archive pkg-desc)
package-unsigned-archives))
;; If we don't care about the signature, unpack and we're
@@ -2494,44 +2505,47 @@ The description is read from the installed package files."
(insert "\n")
- (if built-in
- ;; For built-in packages, get the description from the
- ;; Commentary header.
- (let ((fn (locate-file (format "%s.el" name) load-path
- load-file-rep-suffixes))
- (opoint (point)))
- (insert (or (lm-commentary fn) ""))
- (save-excursion
- (goto-char opoint)
- (when (re-search-forward "^;;; Commentary:\n" nil t)
- (replace-match ""))
- (while (re-search-forward "^\\(;+ ?\\)" nil t)
- (replace-match ""))))
-
- (if (package-installed-p desc)
- ;; For installed packages, get the description from the
- ;; installed files.
- (insert (package--get-description desc))
-
- ;; For non-built-in, non-installed packages, get description from
- ;; the archive.
- (let* ((basename (format "%s-readme.txt" name))
- readme-string)
-
- (package--with-response-buffer (package-archive-base desc)
- :file basename :noerror t
+ (let ((start-of-description (point)))
+ (if built-in
+ ;; For built-in packages, get the description from the
+ ;; Commentary header.
+ (let ((fn (locate-file (format "%s.el" name) load-path
+ load-file-rep-suffixes))
+ (opoint (point)))
+ (insert (or (lm-commentary fn) ""))
(save-excursion
- (goto-char (point-max))
- (unless (bolp)
- (insert ?\n)))
- (cl-assert (not enable-multibyte-characters))
- (setq readme-string
- ;; The readme.txt files are defined to contain utf-8 text.
- (decode-coding-region (point-min) (point-max) 'utf-8 t))
- t)
- (insert (or readme-string
- "This package does not provide a description.")))
- ))))
+ (goto-char opoint)
+ (when (re-search-forward "^;;; Commentary:\n" nil t)
+ (replace-match ""))
+ (while (re-search-forward "^\\(;+ ?\\)" nil t)
+ (replace-match ""))))
+
+ (if (package-installed-p desc)
+ ;; For installed packages, get the description from the
+ ;; installed files.
+ (insert (package--get-description desc))
+
+ ;; For non-built-in, non-installed packages, get description from
+ ;; the archive.
+ (let* ((basename (format "%s-readme.txt" name))
+ readme-string)
+
+ (package--with-response-buffer (package-archive-base desc)
+ :file basename :noerror t
+ (save-excursion
+ (goto-char (point-max))
+ (unless (bolp)
+ (insert ?\n)))
+ (cl-assert (not enable-multibyte-characters))
+ (setq readme-string
+ ;; The readme.txt files are defined to contain utf-8 text.
+ (decode-coding-region (point-min) (point-max) 'utf-8 t))
+ t)
+ (insert (or readme-string
+ "This package does not provide a description.")))))
+ ;; Make URLs in the description into links.
+ (goto-char start-of-description)
+ (browse-url-add-buttons))))
(defun package-install-button-action (button)
(let ((pkg-desc (button-get button 'package-desc)))
@@ -3533,10 +3547,16 @@ shown."
(defun package-menu-filter (keyword)
"Filter the *Packages* buffer.
Show only those items that relate to the specified KEYWORD.
+
KEYWORD can be a string or a list of strings. If it is a list, a
package will be displayed if it matches any of the keywords.
Interactively, it is a list of strings separated by commas.
+KEYWORD can also be used to filter by status or archive name by
+using keywords like \"arc:gnu\" and \"status:available\".
+Statuses available include \"incompat\", \"available\",
+\"built-in\" and \"installed\".
+
To restore the full package list, type `q'."
(interactive
(list (completing-read-multiple
diff --git a/lisp/emacs-lisp/testcover.el b/lisp/emacs-lisp/testcover.el
index 1b94aa80e5f..20851805f5c 100644
--- a/lisp/emacs-lisp/testcover.el
+++ b/lisp/emacs-lisp/testcover.el
@@ -246,7 +246,7 @@ BEFORE-INDEX is the form's index into the code-coverage vector."
(let ((before-entry (aref testcover-vector before-index)))
(when (eq (car-safe before-entry) 'noreturn)
(let* ((after-index (cdr before-entry)))
- (aset testcover-vector after-index 'ok-coverage)))))
+ (aset testcover-vector after-index 'edebug-ok-coverage)))))
(defun testcover-after (_before-index after-index value)
"Update code coverage with the result of a form's evaluation.
@@ -254,10 +254,10 @@ AFTER-INDEX is the form's index into the code-coverage
vector. Return VALUE."
(let ((old-result (aref testcover-vector after-index)))
(cond
- ((eq 'unknown old-result)
+ ((eq 'edebug-unknown old-result)
(aset testcover-vector after-index (testcover--copy-object value)))
((eq 'maybe old-result)
- (aset testcover-vector after-index 'ok-coverage))
+ (aset testcover-vector after-index 'edebug-ok-coverage))
((eq '1value old-result)
(aset testcover-vector after-index
(cons old-result (testcover--copy-object value))))
@@ -271,7 +271,7 @@ vector. Return VALUE."
((not (condition-case ()
(equal value old-result)
(circular-list nil)))
- (aset testcover-vector after-index 'ok-coverage))))
+ (aset testcover-vector after-index 'edebug-ok-coverage))))
value)
;; Add these behaviors to Edebug.
@@ -356,13 +356,13 @@ eliminated by adding more test cases."
(while (> len 0)
(setq len (1- len)
data (aref coverage len))
- (when (and (not (eq data 'ok-coverage))
+ (when (and (not (eq data 'edebug-ok-coverage))
(not (memq (car-safe data)
'(1value maybe noreturn)))
(setq j (+ def-mark (aref points len))))
(setq ov (make-overlay (1- j) j))
(overlay-put ov 'face
- (if (memq data '(unknown maybe 1value))
+ (if (memq data '(edebug-unknown maybe 1value))
'testcover-nohits
'testcover-1value))))
(set-buffer-modified-p changed))))
@@ -410,7 +410,7 @@ coverage tests. This function creates many overlays."
;; identified and treated correctly.
;;
;; The code coverage vector entries for the beginnings of forms will
-;; be changed to `ok-coverage.', except for the beginnings of forms
+;; be changed to `edebug-ok-coverage.', except for the beginnings of forms
;; which should never return, which will be changed to
;; (noreturn . AFTER-INDEX) so that testcover-before can set the entry
;; for the end of the form just before it is executed.
@@ -513,7 +513,7 @@ where BEFORE-FORM is bound to either (edebug-before BEFORE-ID) or
form to be treated accordingly."
(let (val)
(unless (eql before-form 0)
- (aset testcover-vector before-id 'ok-coverage))
+ (aset testcover-vector before-id 'edebug-ok-coverage))
(setq val (testcover-analyze-coverage-wrapped-form wrapped-form))
(when (or (eq wrapper '1value) val)
diff --git a/lisp/emacs-lisp/timer.el b/lisp/emacs-lisp/timer.el
index 22ccc35103a..400f00a85b5 100644
--- a/lisp/emacs-lisp/timer.el
+++ b/lisp/emacs-lisp/timer.el
@@ -375,8 +375,11 @@ This function returns a timer object which you can use in
(now (decode-time)))
(if (>= hhmm 0)
(setq time
- (encode-time 0 (% hhmm 100) (/ hhmm 100) (nth 3 now)
- (nth 4 now) (nth 5 now) (nth 8 now)))))))
+ (encode-time 0 (% hhmm 100) (/ hhmm 100)
+ (decoded-time-day now)
+ (decoded-time-month now)
+ (decoded-time-year now)
+ (decoded-time-zone now)))))))
(or (consp time)
(error "Invalid time format"))