commit a789d8a3a08879521b8630e7131cea039520e3de (HEAD, refs/remotes/origin/master) Author: Juri Linkov Date: Fri Apr 2 11:25:05 2021 +0300 * lisp/progmodes/xref.el: Change xref-file-name-display and xref-match face. * lisp/progmodes/xref.el (xref-file-name-display): Change the default value to 'project-relative' (bug#47012). (xref-match): Inherit from 'match'. diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index ea52befec5..cada1f1109 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -103,7 +103,7 @@ This is typically the filename.") ;;;; Commonly needed location classes are defined here: -(defcustom xref-file-name-display 'abs +(defcustom xref-file-name-display 'project-relative "Style of file name display in *xref* buffers. If the value is the symbol `abs', the default, show the file names @@ -521,7 +521,7 @@ If SELECT is non-nil, select the target window." "Face for displaying line numbers in the xref buffer." :version "27.1") -(defface xref-match '((t :inherit highlight)) +(defface xref-match '((t :inherit match)) "Face used to highlight matches in the xref buffer." :version "27.1") commit 4798dc0c51381f36cd45160640c4f55a7792750b Author: Dmitry Gutov Date: Fri Apr 2 01:24:57 2021 +0300 Fix C-u project-find-regexp's default dir * lisp/progmodes/project.el (project-find-regexp): Default read-directory-name to the current default-directory when called with C-u (bug#47012). diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 4101962f06..3dd11118ea 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -732,13 +732,14 @@ requires quoting, e.g. `\\[quoted-insert]'." (interactive (list (project--read-regexp))) (require 'xref) (require 'grep) - (let* ((pr (project-current t)) + (let* ((caller-dir default-directory) + (pr (project-current t)) (default-directory (project-root pr)) (files (if (not current-prefix-arg) (project-files pr) (let ((dir (read-directory-name "Base directory: " - nil default-directory t))) + caller-dir nil t))) (project--files-in-directory dir nil (grep-read-files regexp)))))) commit 0c8ea6be09d4f88ec345c0d55d8edb672cdfd653 Author: Stefan Monnier Date: Thu Apr 1 18:16:52 2021 -0400 * lisp/progmodes/cfengine.el: Use lexical-binding diff --git a/lisp/progmodes/cfengine.el b/lisp/progmodes/cfengine.el index 472788d18e..4649e50654 100644 --- a/lisp/progmodes/cfengine.el +++ b/lisp/progmodes/cfengine.el @@ -1,4 +1,4 @@ -;;; cfengine.el --- mode for editing Cfengine files +;;; cfengine.el --- mode for editing Cfengine files -*- lexical-binding: t; -*- ;; Copyright (C) 2001-2021 Free Software Foundation, Inc. @@ -1440,7 +1440,7 @@ to the action header." (cfengine3-mode) (cfengine2-mode))) -(defalias 'cfengine-mode 'cfengine3-mode) +(defalias 'cfengine-mode #'cfengine3-mode) (provide 'cfengine3) (provide 'cfengine) commit cf1ac9d830ed03b3b0ce3a88988c81ffa34de13f Author: Stefan Monnier Date: Thu Apr 1 17:23:55 2021 -0400 * lisp/progmodes/dcl-mode.el: Clarify what is meant by DCL diff --git a/lisp/progmodes/dcl-mode.el b/lisp/progmodes/dcl-mode.el index 7107ae6ea1..ed024f2434 100644 --- a/lisp/progmodes/dcl-mode.el +++ b/lisp/progmodes/dcl-mode.el @@ -23,9 +23,11 @@ ;;; Commentary: -;; DCL mode is a package for editing DCL command files. It helps you -;; indent lines, add leading `$' and trailing `-', move around in the -;; code and insert lexical functions. +;; DCL mode is a package for editing +;; [DCL](https://en.wikipedia.org/wiki/DIGITAL_Command_Language) +;; command files. +;; It helps you indent lines, add leading `$' and trailing `-', move +;; around in the code and insert lexical functions. ;; ;; Type `C-h m' when you are editing a .COM file to get more ;; information about this mode. commit e5b8d071e0066a2bab28744f21d58ac422793381 Author: Stefan Kangas Date: Thu Apr 1 22:04:21 2021 +0200 Remove redundant #' before lambda in {mail,net,url}/*.el * lisp/mail/mail-extr.el: * lisp/mail/rmail.el (rmail-start-mail): * lisp/net/gnutls.el (gnutls-boot-parameters): * lisp/net/imap.el (imap-starttls-open): * lisp/net/pop3.el (pop3-list): * lisp/url/url-cookie.el (url-cookie-save-interval): * lisp/url/url-history.el (url-history-save-interval) (url-history-track): * lisp/url/url-mailto.el (url-mailto): Remove redundant #' before lambda. diff --git a/lisp/mail/mail-extr.el b/lisp/mail/mail-extr.el index 7fbdfefc46..88fb086685 100644 --- a/lisp/mail/mail-extr.el +++ b/lisp/mail/mail-extr.el @@ -2236,13 +2236,13 @@ place. It affects how `mail-extract-address-components' works." ;(let ((all nil)) -; (mapatoms #'(lambda (x) +; (mapatoms (lambda (x) ; (if (and (boundp x) ; (string-match "^mail-extr-" (symbol-name x))) ; (setq all (cons x all))))) ; (setq all (sort all #'string-lessp)) ; (cons 'setq -; (apply 'nconc (mapcar #'(lambda (x) +; (apply 'nconc (mapcar (lambda (x) ; (list x (symbol-value x))) ; all)))) diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index c7960f8504..455ae7feef 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -3671,9 +3671,9 @@ If BUFFER is not swapped, yank out of its message viewer buffer." (push (cons "cc" cc) other-headers) (push (cons "in-reply-to" in-reply-to) other-headers) (setq other-headers - (mapcar #'(lambda (elt) - (cons (car elt) (if (stringp (cdr elt)) - (rfc2047-decode-string (cdr elt))))) + (mapcar (lambda (elt) + (cons (car elt) (if (stringp (cdr elt)) + (rfc2047-decode-string (cdr elt))))) other-headers)) (if (stringp to) (setq to (rfc2047-decode-string to))) (if (stringp in-reply-to) diff --git a/lisp/net/gnutls.el b/lisp/net/gnutls.el index 683abaaa04..43dd9dc15c 100644 --- a/lisp/net/gnutls.el +++ b/lisp/net/gnutls.el @@ -336,8 +336,8 @@ defaults to GNUTLS_VERIFY_ALLOW_X509_V1_CA_CRT." t) ;; if a list, look for hostname matches ((listp gnutls-verify-error) - (cadr (cl-find-if #'(lambda (x) - (string-match (car x) hostname)) + (cadr (cl-find-if (lambda (x) + (string-match (car x) hostname)) gnutls-verify-error))) ;; else it's nil (t nil)))) diff --git a/lisp/net/imap.el b/lisp/net/imap.el index 052ef29295..d29584e55b 100644 --- a/lisp/net/imap.el +++ b/lisp/net/imap.el @@ -737,9 +737,9 @@ sure of changing the value of `foo'." :end-of-command "\r\n" :success "^1 OK " :starttls-function - #'(lambda (capabilities) - (when (string-match-p "STARTTLS" capabilities) - "1 STARTTLS\r\n")))) + (lambda (capabilities) + (when (string-match-p "STARTTLS" capabilities) + "1 STARTTLS\r\n")))) done) (when process (imap-log buffer) diff --git a/lisp/net/pop3.el b/lisp/net/pop3.el index dcac36f2a4..cb49f75c81 100644 --- a/lisp/net/pop3.el +++ b/lisp/net/pop3.el @@ -725,9 +725,9 @@ Otherwise, return the size of the message-id MSG." (setq pop3-read-point (point-marker)) (goto-char (match-beginning 0)) (setq end (point-marker)) - (mapcar #'(lambda (s) (let ((split (split-string s " "))) - (cons (string-to-number (nth 0 split)) - (string-to-number (nth 1 split))))) + (mapcar (lambda (s) (let ((split (split-string s " "))) + (cons (string-to-number (nth 0 split)) + (string-to-number (nth 1 split))))) (split-string (buffer-substring start end) "\r\n" t))))))) (defun pop3-retr (process msg crashbuf) diff --git a/lisp/url/url-cookie.el b/lisp/url/url-cookie.el index 27f4f88cb8..60388df255 100644 --- a/lisp/url/url-cookie.el +++ b/lisp/url/url-cookie.el @@ -358,10 +358,10 @@ i.e. 1970-1-1) are loaded as expiring one year from now instead." Default is 1 hour. Note that if you change this variable outside of the `customize' interface after `url-do-setup' has been run, you need to run the `url-cookie-setup-save-timer' function manually." - :set #'(lambda (var val) - (set-default var val) - (if (bound-and-true-p url-setup-done) - (url-cookie-setup-save-timer))) + :set (lambda (var val) + (set-default var val) + (if (bound-and-true-p url-setup-done) + (url-cookie-setup-save-timer))) :type 'integer :group 'url-cookie) diff --git a/lisp/url/url-history.el b/lisp/url/url-history.el index 10238a4660..5dd1f09913 100644 --- a/lisp/url/url-history.el +++ b/lisp/url/url-history.el @@ -38,10 +38,10 @@ If non-nil, the URL package will keep track of all the URLs visited. If set to t, then the list is saved to disk at the end of each Emacs session." - :set #'(lambda (var val) - (set-default var val) - (and (bound-and-true-p url-setup-done) - (url-history-setup-save-timer))) + :set (lambda (var val) + (set-default var val) + (and (bound-and-true-p url-setup-done) + (url-history-setup-save-timer))) :type '(choice (const :tag "off" nil) (const :tag "on" t) (other :tag "within session" session)) @@ -59,10 +59,10 @@ is parsed at startup and used to provide URL completion." Default is 1 hour. Note that if you change this variable outside of the `customize' interface after `url-do-setup' has been run, you need to run the `url-history-setup-save-timer' function manually." - :set #'(lambda (var val) - (set-default var val) - (if (bound-and-true-p url-setup-done) - (url-history-setup-save-timer))) + :set (lambda (var val) + (set-default var val) + (if (bound-and-true-p url-setup-done) + (url-history-setup-save-timer))) :type 'integer :group 'url-history) diff --git a/lisp/url/url-mailto.el b/lisp/url/url-mailto.el index 72884c07cc..c6901d9920 100644 --- a/lisp/url/url-mailto.el +++ b/lisp/url/url-mailto.el @@ -104,8 +104,8 @@ (or (search-forward (concat "\n" mail-header-separator "\n") nil t) (goto-char (point-max))) (insert (mapconcat - #'(lambda (string) - (replace-regexp-in-string "\r\n" "\n" string)) + (lambda (string) + (replace-regexp-in-string "\r\n" "\n" string)) (cdar args) "\n"))) (url-mail-goto-field (caar args)) ;; (setq func (intern-soft (concat "mail-" (caar args)))) commit a5125f98b8e977abfcef74ddd7720ccb63328560 Author: Stefan Kangas Date: Thu Apr 1 19:57:05 2021 +0200 ; Remove spurious comment in last commit diff --git a/test/lisp/progmodes/executable-tests.el b/test/lisp/progmodes/executable-tests.el index e353191201..4f0fa699f7 100644 --- a/test/lisp/progmodes/executable-tests.el +++ b/test/lisp/progmodes/executable-tests.el @@ -19,9 +19,6 @@ ;;; Commentary: -;; This file is part of ERT, the Emacs Lisp Regression Testing tool. -;; See ert.el or the texinfo manual for more details. - ;;; Code: (require 'ert) commit 33f00364cf86d90c37b958ee4676ea7f581fff99 Author: Stefan Kangas Date: Thu Apr 1 19:55:32 2021 +0200 Use lexical-binding in executable.el and add tests * lisp/progmodes/executable.el: Use lexical-binding. * test/lisp/progmodes/executable-tests.el: New file. diff --git a/lisp/progmodes/executable.el b/lisp/progmodes/executable.el index 85e9b4bb88..0d8b09c33c 100644 --- a/lisp/progmodes/executable.el +++ b/lisp/progmodes/executable.el @@ -1,4 +1,4 @@ -;;; executable.el --- base functionality for executable interpreter scripts +;;; executable.el --- base functionality for executable interpreter scripts -*- lexical-binding: t -*- ;; Copyright (C) 1994-1996, 2000-2021 Free Software Foundation, Inc. diff --git a/test/lisp/progmodes/executable-tests.el b/test/lisp/progmodes/executable-tests.el new file mode 100644 index 0000000000..e353191201 --- /dev/null +++ b/test/lisp/progmodes/executable-tests.el @@ -0,0 +1,54 @@ +;;; executable-tests.el --- Tests for executable.el -*- lexical-binding:t -*- + +;; Copyright (C) 2021 Free Software Foundation, Inc. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This file is part of ERT, the Emacs Lisp Regression Testing tool. +;; See ert.el or the texinfo manual for more details. + +;;; Code: + +(require 'ert) +(require 'executable) + +(ert-deftest executable-tests-set-magic () + (with-temp-buffer + (insert "#!/foo/bar") + (executable-set-magic "/bin/bash" nil t t) + (should (equal (buffer-string) "#!/bin/bash")))) + +(ert-deftest executable-tests-set-magic/with-argument () + (with-temp-buffer + (insert "#!/foo/bar") + (executable-set-magic "/bin/bash" "--norc" t t) + (should (equal (buffer-string) "#!/bin/bash --norc")))) + +(ert-deftest executable-tests-set-magic/executable-insert-nil () + (let ((executable-insert nil)) + (with-temp-buffer + (insert "#!/foo/bar") + (executable-set-magic "/bin/bash" nil t nil) + (should (equal (buffer-string) "#!/foo/bar")))) + (let ((executable-insert nil)) + (with-temp-buffer + (insert "#!/foo/bar") + (executable-set-magic "/bin/bash" nil t t) + (should (equal (buffer-string) "#!/bin/bash"))))) + +;;; executable-tests.el ends here commit 4a538c4861370d629920b66a7cdcbb78ecb13830 Author: Stefan Kangas Date: Thu Apr 1 16:24:12 2021 +0200 Remove redundant #' before lambda in progmodes/*.el * lisp/progmodes/cc-styles.el (c-set-offset): * lisp/progmodes/ebnf-yac.el (ebnf-yac-token-table): * lisp/progmodes/ebnf2ps.el (ebnf-format-float, ebnf-map-name): * lisp/progmodes/grep.el (lgrep, rgrep-default-command): * lisp/progmodes/inf-lisp.el: * lisp/progmodes/octave.el (octave-lookfor): * lisp/progmodes/python.el (python-pdbtrack-tracking-finish): Remove redundant #' before lambda. diff --git a/lisp/progmodes/cc-styles.el b/lisp/progmodes/cc-styles.el index aec259f1b3..29cbe54c3b 100644 --- a/lisp/progmodes/cc-styles.el +++ b/lisp/progmodes/cc-styles.el @@ -476,8 +476,8 @@ and exists only for compatibility reasons." (if current-prefix-arg " or add" "") ": ") (mapcar - #'(lambda (langelem) - (cons (format "%s" (car langelem)) nil)) + (lambda (langelem) + (cons (format "%s" (car langelem)) nil)) (get 'c-offsets-alist 'c-stylevar-fallback)) nil (not current-prefix-arg) ;; initial contents tries to be the last element diff --git a/lisp/progmodes/ebnf-yac.el b/lisp/progmodes/ebnf-yac.el index 5abf1debb1..816cc432d1 100644 --- a/lisp/progmodes/ebnf-yac.el +++ b/lisp/progmodes/ebnf-yac.el @@ -271,13 +271,13 @@ (let ((table (make-vector 256 'error))) ;; upper & lower case letters: (mapc - #'(lambda (char) - (aset table char 'non-terminal)) + (lambda (char) + (aset table char 'non-terminal)) "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz") ;; printable characters: (mapc - #'(lambda (char) - (aset table char 'character)) + (lambda (char) + (aset table char 'character)) "!#$&()*+-.0123456789=?@[\\]^_`~") ;; Override space characters: (aset table ?\n 'space) ; [NL] linefeed diff --git a/lisp/progmodes/ebnf2ps.el b/lisp/progmodes/ebnf2ps.el index 7092d2c1d1..a00440d898 100644 --- a/lisp/progmodes/ebnf2ps.el +++ b/lisp/progmodes/ebnf2ps.el @@ -4398,8 +4398,8 @@ end (defun ebnf-format-float (&rest floats) (mapconcat - #'(lambda (float) - (format ebnf-format-float float)) + (lambda (float) + (format ebnf-format-float float)) floats " ")) @@ -4959,8 +4959,8 @@ killed after process termination." (defvar ebnf-map-name (let ((map (make-vector 256 ?\_))) - (mapc #'(lambda (char) - (aset map char char)) + (mapc (lambda (char) + (aset map char char)) (concat "#$%&+-.0123456789=?@~" "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "abcdefghijklmnopqrstuvwxyz")) diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 8c9a1b53b1..e9fbcbbfcd 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -1134,13 +1134,13 @@ command before it's run." (and grep-find-ignored-files (concat " --exclude=" (mapconcat - #'(lambda (ignore) - (cond ((stringp ignore) - (shell-quote-argument ignore)) - ((consp ignore) - (and (funcall (car ignore) dir) - (shell-quote-argument - (cdr ignore)))))) + (lambda (ignore) + (cond ((stringp ignore) + (shell-quote-argument ignore)) + ((consp ignore) + (and (funcall (car ignore) dir) + (shell-quote-argument + (cdr ignore)))))) grep-find-ignored-files " --exclude="))) (and (eq grep-use-directories-skip t) @@ -1274,13 +1274,13 @@ command before it's run." ;; we should use shell-quote-argument here " -name " (mapconcat - #'(lambda (ignore) - (cond ((stringp ignore) - (shell-quote-argument ignore)) - ((consp ignore) - (and (funcall (car ignore) dir) - (shell-quote-argument - (cdr ignore)))))) + (lambda (ignore) + (cond ((stringp ignore) + (shell-quote-argument ignore)) + ((consp ignore) + (and (funcall (car ignore) dir) + (shell-quote-argument + (cdr ignore)))))) grep-find-ignored-files " -o -name ") " " diff --git a/lisp/progmodes/inf-lisp.el b/lisp/progmodes/inf-lisp.el index 1ee54673d7..0a72ae96bb 100644 --- a/lisp/progmodes/inf-lisp.el +++ b/lisp/progmodes/inf-lisp.el @@ -442,7 +442,7 @@ With argument, positions cursor at end of buffer." ;;; (let ((name-start (point))) ;;; (forward-sexp 1) ;;; (process-send-string "inferior-lisp" -;;; (format "(compile '%s #'(lambda " +;;; (format "(compile '%s (lambda " ;;; (buffer-substring name-start ;;; (point))))) ;;; (let ((body-start (point))) diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el index 196f2de344..a1a5192ee1 100644 --- a/lisp/progmodes/octave.el +++ b/lisp/progmodes/octave.el @@ -1769,8 +1769,8 @@ sentence." (insert "\nRetry with ") (insert-text-button "'-all'" 'follow-link t - 'action #'(lambda (_b) - (octave-lookfor str '-all))) + 'action (lambda (_b) + (octave-lookfor str '-all))) (insert ".\n")) (octave-help-mode))))) diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index afb96974b1..e5c15d148f 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -241,8 +241,8 @@ ;; 2) Add the following hook in your .emacs: ;; (add-hook 'python-mode-hook -;; #'(lambda () -;; (define-key python-mode-map "\C-m" 'newline-and-indent))) +;; (lambda () +;; (define-key python-mode-map "\C-m" 'newline-and-indent))) ;; I'd recommend the first one since you'll get the same behavior for ;; all modes out-of-the-box. @@ -3976,8 +3976,8 @@ Returns the tracked buffer." "Finish tracking." (python-pdbtrack-unset-tracked-buffer) (when python-pdbtrack-kill-buffers - (mapc #'(lambda (buffer) - (ignore-errors (kill-buffer buffer))) + (mapc (lambda (buffer) + (ignore-errors (kill-buffer buffer))) python-pdbtrack-buffers-to-kill)) (setq python-pdbtrack-buffers-to-kill nil)) commit 8129998deb54c3621dd715c79694725c74630e67 Author: Stefan Kangas Date: Thu Apr 1 15:23:01 2021 +0200 Remove redundant #' before lambda in international/*.el * lisp/international/characters.el: (use-cjk-char-width-table, update-glyphless-char-display): * lisp/international/fontset.el (build-default-fontset-data) (generate-fontset-menu): * lisp/international/latin1-disp.el (latin1-display-reset): * lisp/international/mule-cmds.el (select-safe-coding-system-interactively): * lisp/international/mule-diag.el (sort-listed-character-sets) (font-show-log): * lisp/international/mule.el (char-displayable-p): * lisp/international/quail.el (quail-keyboard-layout-type) (quail-update-translation, quail-find-key): * lisp/international/titdic-cnv.el (tsang-quick-converter) (ziranma-converter): Remove redundant #' before lambda. diff --git a/lisp/international/characters.el b/lisp/international/characters.el index c643f66cbb..97bf31acfc 100644 --- a/lisp/international/characters.el +++ b/lisp/international/characters.el @@ -484,9 +484,9 @@ with L, LRE, or LRO Unicode bidi character type.") (progn (modify-syntax-entry chars syntax) (modify-category-entry chars category)) - (mapc #'(lambda (x) - (modify-syntax-entry x syntax) - (modify-category-entry x category)) + (mapc (lambda (x) + (modify-syntax-entry x syntax) + (modify-category-entry x category)) chars))))) ;; Bidi categories @@ -1390,8 +1390,8 @@ with L, LRE, or LRO Unicode bidi character type.") (dolist (charset-info (nthcdr 2 slot)) (let ((charset (car charset-info))) (dolist (code-range (cdr charset-info)) - (map-charset-chars #'(lambda (range _arg) - (set-char-table-range table range 2)) + (map-charset-chars (lambda (range _arg) + (set-char-table-range table range 2)) charset nil (car code-range) (cdr code-range))))) (optimize-char-table table) @@ -1417,8 +1417,8 @@ Setup char-width-table appropriate for non-CJK language environment." (require 'charscript)) (map-charset-chars - #'(lambda (range _ignore) - (set-char-table-range char-script-table range 'tibetan)) + (lambda (range _ignore) + (set-char-table-range char-script-table range 'tibetan)) 'tibetan) @@ -1426,14 +1426,14 @@ Setup char-width-table appropriate for non-CJK language environment." (when (setq unicode-category-table (unicode-property-table-internal 'general-category)) - (map-char-table #'(lambda (key val) - (if val - (cond ((or (and (/= (aref (symbol-name val) 0) ?M) - (/= (aref (symbol-name val) 0) ?C)) - (eq val 'Zs)) - (modify-category-entry key ?.)) - ((eq val 'Mn) - (modify-category-entry key ?^))))) + (map-char-table (lambda (key val) + (if val + (cond ((or (and (/= (aref (symbol-name val) 0) ?M) + (/= (aref (symbol-name val) 0) ?C)) + (eq val 'Zs)) + (modify-category-entry key ?.)) + ((eq val 'Mn) + (modify-category-entry key ?^))))) unicode-category-table)) (optimize-char-table (standard-category-table)) @@ -1524,21 +1524,21 @@ option `glyphless-char-display'." ((eq target 'format-control) (when unicode-category-table (map-char-table - #'(lambda (char category) - (if (eq category 'Cf) - (let ((this-method method) - from to) - (if (consp char) - (setq from (car char) to (cdr char)) - (setq from char to char)) - (while (<= from to) - (when (/= from #xAD) - (if (eq method 'acronym) - (setq this-method - (aref char-acronym-table from))) - (set-char-table-range glyphless-char-display - from this-method)) - (setq from (1+ from)))))) + (lambda (char category) + (if (eq category 'Cf) + (let ((this-method method) + from to) + (if (consp char) + (setq from (car char) to (cdr char)) + (setq from char to char)) + (while (<= from to) + (when (/= from #xAD) + (if (eq method 'acronym) + (setq this-method + (aref char-acronym-table from))) + (set-char-table-range glyphless-char-display + from this-method)) + (setq from (1+ from)))))) unicode-category-table))) ((eq target 'no-font) (set-char-table-extra-slot glyphless-char-display 0 method)) diff --git a/lisp/international/fontset.el b/lisp/international/fontset.el index 8f0f263dcc..3deaff9677 100644 --- a/lisp/international/fontset.el +++ b/lisp/international/fontset.el @@ -497,37 +497,37 @@ (:registry "iso10646-1")))) (cjk-table (make-char-table nil)) (script-coverage - #'(lambda (script) - (let ((coverage)) - (map-char-table - #'(lambda (range val) - (when (eq val script) - (if (consp range) - (setq range (cons (car range) (cdr range)))) - (push range coverage))) - char-script-table) - coverage))) + (lambda (script) + (let ((coverage)) + (map-char-table + (lambda (range val) + (when (eq val script) + (if (consp range) + (setq range (cons (car range) (cdr range)))) + (push range coverage))) + char-script-table) + coverage))) (data (list (vconcat (mapcar 'car cjk)))) (i 0)) (dolist (elt cjk) (let ((mask (ash 1 i))) (map-charset-chars - #'(lambda (range _arg) - (let ((from (car range)) (to (cdr range))) - (if (< to #x110000) - (while (<= from to) - (or (memq (aref char-script-table from) - '(kana hangul han cjk-misc)) - (aset cjk-table from - (logior (or (aref cjk-table from) 0) mask))) - (setq from (1+ from)))))) + (lambda (range _arg) + (let ((from (car range)) (to (cdr range))) + (if (< to #x110000) + (while (<= from to) + (or (memq (aref char-script-table from) + '(kana hangul han cjk-misc)) + (aset cjk-table from + (logior (or (aref cjk-table from) 0) mask))) + (setq from (1+ from)))))) (nth 1 elt) nil (nth 2 elt) (nth 3 elt))) (setq i (1+ i))) (map-char-table - #'(lambda (range val) - (if (consp range) - (setq range (cons (car range) (cdr range)))) - (push (cons range val) data)) + (lambda (range val) + (if (consp range) + (setq range (cons (car range) (cdr range)))) + (push (cons range val) data)) cjk-table) (dolist (script scripts) (dolist (range (funcall script-coverage (car script))) @@ -1227,7 +1227,7 @@ Done when `mouse-set-font' is called." (string-match "fontset-auto[0-9]+$" fontset) (push (list (fontset-plain-name fontset) fontset) l))) (cons "Fontset" - (sort l #'(lambda (x y) (string< (car x) (car y))))))) + (sort l (lambda (x y) (string< (car x) (car y))))))) (declare-function query-fontset "fontset.c" (pattern &optional regexpp)) diff --git a/lisp/international/latin1-disp.el b/lisp/international/latin1-disp.el index 4b6ef9833e..b3d6a635b1 100644 --- a/lisp/international/latin1-disp.el +++ b/lisp/international/latin1-disp.el @@ -186,8 +186,8 @@ character set." 'arabic-iso8859-6 (car (remq 'ascii (get-language-info language 'charset)))))) - (map-charset-chars #'(lambda (range _arg) - (standard-display-default (car range) (cdr range))) + (map-charset-chars (lambda (range _arg) + (standard-display-default (car range) (cdr range))) charset)) (sit-for 0)) diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index bf0df6f971..578d97bcc0 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -679,18 +679,18 @@ DEFAULT is the coding system to use by default in the query." ;; ((CODING (POS . CHAR) (POS . CHAR) ...) ...) (if unsafe (setq unsafe - (mapcar #'(lambda (coding) - (cons coding - (if (stringp from) - (mapcar #'(lambda (pos) - (cons pos (aref from pos))) - (unencodable-char-position - 0 (length from) coding - 11 from)) - (mapcar #'(lambda (pos) - (cons pos (char-after pos))) - (unencodable-char-position - from to coding 11))))) + (mapcar (lambda (coding) + (cons coding + (if (stringp from) + (mapcar (lambda (pos) + (cons pos (aref from pos))) + (unencodable-char-position + 0 (length from) coding + 11 from)) + (mapcar (lambda (pos) + (cons pos (char-after pos))) + (unencodable-char-position + from to coding 11))))) unsafe))) (setq codings (sanitize-coding-system-list codings)) @@ -744,19 +744,19 @@ e.g., for sending an email message.\n ") (insert (format " %s cannot encode these:" (car coding))) (let ((i 0) (func1 - #'(lambda (bufname pos) - (when (buffer-live-p (get-buffer bufname)) - (pop-to-buffer bufname) - (goto-char pos)))) + (lambda (bufname pos) + (when (buffer-live-p (get-buffer bufname)) + (pop-to-buffer bufname) + (goto-char pos)))) (func2 - #'(lambda (bufname pos coding) - (when (buffer-live-p (get-buffer bufname)) - (pop-to-buffer bufname) - (if (< (point) pos) - (goto-char pos) - (forward-char 1) - (search-unencodable-char coding) - (forward-char -1)))))) + (lambda (bufname pos coding) + (when (buffer-live-p (get-buffer bufname)) + (pop-to-buffer bufname) + (if (< (point) pos) + (goto-char pos) + (forward-char 1) + (search-unencodable-char coding) + (forward-char -1)))))) (dolist (elt (cdr coding)) (insert " ") (if (stringp from) diff --git a/lisp/international/mule-diag.el b/lisp/international/mule-diag.el index a0063c8dbb..2d3cd25b4a 100644 --- a/lisp/international/mule-diag.el +++ b/lisp/international/mule-diag.el @@ -45,8 +45,8 @@ (define-button-type 'sort-listed-character-sets 'help-echo (purecopy "mouse-2, RET: sort on this column") 'face 'bold - 'action #'(lambda (button) - (sort-listed-character-sets (button-get button 'sort-key)))) + 'action (lambda (button) + (sort-listed-character-sets (button-get button 'sort-key)))) (define-button-type 'list-charset-chars :supertype 'help-xref @@ -1172,12 +1172,12 @@ The default is 20. If LIMIT is negative, do not limit the listing." (if (or (vectorp elt) (listp elt)) (let ((i 0)) (catch 'tag - (mapc #'(lambda (x) - (setq i (1+ i)) - (when (= i limit) - (insert " ...\n") - (throw 'tag nil)) - (insert (format " %s\n" x))) + (mapc (lambda (x) + (setq i (1+ i)) + (when (= i limit) + (insert " ...\n") + (throw 'tag nil)) + (insert (format " %s\n" x))) elt))) (insert (format " %s\n" elt))))))) diff --git a/lisp/international/mule.el b/lisp/international/mule.el index 83cbb44c4d..a6fccff3c9 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el @@ -490,27 +490,27 @@ per-character basis, this may not be accurate." (cond ((listp cs-list) (catch 'tag - (mapc #'(lambda (charset) - (if (encode-char char charset) - (throw 'tag charset))) + (mapc (lambda (charset) + (if (encode-char char charset) + (throw 'tag charset))) cs-list) nil)) ((eq cs-list 'iso-2022) (catch 'tag2 - (mapc #'(lambda (charset) - (if (and (plist-get (charset-plist charset) - :iso-final-char) - (encode-char char charset)) - (throw 'tag2 charset))) + (mapc (lambda (charset) + (if (and (plist-get (charset-plist charset) + :iso-final-char) + (encode-char char charset)) + (throw 'tag2 charset))) charset-list) nil)) ((eq cs-list 'emacs-mule) (catch 'tag3 - (mapc #'(lambda (charset) - (if (and (plist-get (charset-plist charset) - :emacs-mule-id) - (encode-char char charset)) - (throw 'tag3 charset))) + (mapc (lambda (charset) + (if (and (plist-get (charset-plist charset) + :emacs-mule-id) + (encode-char char charset)) + (throw 'tag3 charset))) charset-list) nil))))))))))) diff --git a/lisp/international/quail.el b/lisp/international/quail.el index 87a905045d..fff06deee8 100644 --- a/lisp/international/quail.el +++ b/lisp/international/quail.el @@ -728,9 +728,9 @@ Available types are listed in the variable `quail-keyboard-layout-alist'." :type (cons 'choice (mapcar (lambda (elt) (list 'const (car elt))) quail-keyboard-layout-alist)) - :set #'(lambda (symbol value) - (quail-update-keyboard-layout value) - (set symbol value))) + :set (lambda (symbol value) + (quail-update-keyboard-layout value) + (set symbol value))) ;;;###autoload (defun quail-set-keyboard-layout (kbd-type) @@ -1571,12 +1571,12 @@ with more keys." (let (char) (if (stringp quail-current-str) (catch 'tag - (mapc #'(lambda (ch) - (when (/= (unibyte-char-to-multibyte - (multibyte-char-to-unibyte ch)) - ch) - (setq char ch) - (throw 'tag nil))) + (mapc (lambda (ch) + (when (/= (unibyte-char-to-multibyte + (multibyte-char-to-unibyte ch)) + ch) + (setq char ch) + (throw 'tag nil))) quail-current-str)) (if (/= (unibyte-char-to-multibyte (multibyte-char-to-unibyte quail-current-str)) @@ -2827,19 +2827,19 @@ If CHAR is an ASCII character and can be input by typing itself, return t." (key-list nil)) (if (consp decode-map) (let ((str (string char))) - (mapc #'(lambda (elt) - (if (string= str (car elt)) - (setq key-list (cons (cdr elt) key-list)))) + (mapc (lambda (elt) + (if (string= str (car elt)) + (setq key-list (cons (cdr elt) key-list)))) (cdr decode-map))) (let ((key-head (aref decode-map char))) (if (stringp key-head) (setq key-list (quail-find-key1 (quail-lookup-key key-head nil t) key-head char nil)) - (mapc #'(lambda (elt) - (setq key-list - (quail-find-key1 - (quail-lookup-key elt nil t) elt char key-list))) + (mapc (lambda (elt) + (setq key-list + (quail-find-key1 + (quail-lookup-key elt nil t) elt char key-list))) key-head)))) (or key-list (and (< char 128) diff --git a/lisp/international/titdic-cnv.el b/lisp/international/titdic-cnv.el index 64d6644376..ccb4c8390b 100644 --- a/lisp/international/titdic-cnv.el +++ b/lisp/international/titdic-cnv.el @@ -781,7 +781,7 @@ To get complete usage, invoke \"emacs -batch -f batch-titdic-convert -h\"." (if val (setq trans (concat val trans))) (puthash key trans table) (forward-line 1))) - (maphash #'(lambda (key val) (setq dic (cons (cons key val) dic))) + (maphash (lambda (key val) (setq dic (cons (cons key val) dic))) table))) (setq dic (sort dic (lambda (x y) (string< (car x ) (car y))))) (dolist (elt dic) @@ -931,18 +931,18 @@ method `chinese-tonepy' with which you must specify tones by digits (if val (setq trans (vconcat val trans))) (puthash key trans table) (forward-line 1)) - (maphash #'(lambda (key trans) - (let ((len (length trans)) - i) - (if (and (= len 1) (= (length (aref trans 0)) 1)) - (setq trans (aref trans 0)) - (setq i 0) - (while (and (< i len) - (= (length (aref trans i)) 1)) - (setq i (1+ i))) - (if (= i len) - (setq trans (mapconcat #'identity trans ""))))) - (setq dic (cons (cons key trans) dic))) + (maphash (lambda (key trans) + (let ((len (length trans)) + i) + (if (and (= len 1) (= (length (aref trans 0)) 1)) + (setq trans (aref trans 0)) + (setq i 0) + (while (and (< i len) + (= (length (aref trans i)) 1)) + (setq i (1+ i))) + (if (= i len) + (setq trans (mapconcat #'identity trans ""))))) + (setq dic (cons (cons key trans) dic))) table))) (setq dic (sort dic (lambda (x y) (string< (car x) (car y))))) (goto-char (point-max)) commit 84519cdbda3fdb2351a95fe9e70d1ee74d982081 Author: Glenn Morris Date: Thu Apr 1 06:26:57 2021 -0700 ; Auto-commit of loaddefs files. diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el index c9210c6251..412751bf45 100644 --- a/lisp/ldefs-boot.el +++ b/lisp/ldefs-boot.el @@ -477,31 +477,31 @@ With value nil, inhibit any automatic allout-mode activation.") (custom-autoload 'allout-auto-activation "allout" nil) -(put 'allout-use-hanging-indents 'safe-local-variable 'booleanp) +(put 'allout-use-hanging-indents 'safe-local-variable #'booleanp) (put 'allout-reindent-bodies 'safe-local-variable (lambda (x) (memq x '(nil t text force)))) -(put 'allout-show-bodies 'safe-local-variable 'booleanp) +(put 'allout-show-bodies 'safe-local-variable #'booleanp) -(put 'allout-header-prefix 'safe-local-variable 'stringp) +(put 'allout-header-prefix 'safe-local-variable #'stringp) -(put 'allout-primary-bullet 'safe-local-variable 'stringp) +(put 'allout-primary-bullet 'safe-local-variable #'stringp) -(put 'allout-plain-bullets-string 'safe-local-variable 'stringp) +(put 'allout-plain-bullets-string 'safe-local-variable #'stringp) -(put 'allout-distinctive-bullets-string 'safe-local-variable 'stringp) +(put 'allout-distinctive-bullets-string 'safe-local-variable #'stringp) (put 'allout-use-mode-specific-leader 'safe-local-variable (lambda (x) (or (memq x '(t nil allout-mode-leaders comment-start)) (stringp x)))) -(put 'allout-old-style-prefixes 'safe-local-variable 'booleanp) +(put 'allout-old-style-prefixes 'safe-local-variable #'booleanp) -(put 'allout-stylish-prefixes 'safe-local-variable 'booleanp) +(put 'allout-stylish-prefixes 'safe-local-variable #'booleanp) -(put 'allout-numbered-bullet 'safe-local-variable 'string-or-null-p) +(put 'allout-numbered-bullet 'safe-local-variable #'string-or-null-p) -(put 'allout-file-xref-bullet 'safe-local-variable 'string-or-null-p) +(put 'allout-file-xref-bullet 'safe-local-variable #'string-or-null-p) -(put 'allout-presentation-padding 'safe-local-variable 'integerp) +(put 'allout-presentation-padding 'safe-local-variable #'integerp) (put 'allout-layout 'safe-local-variable (lambda (x) (or (numberp x) (listp x) (memq x '(: * + -))))) @@ -784,7 +784,7 @@ OPEN: A TOPIC that is not CLOSED, though its OFFSPRING or BODY may be. \(fn &optional ARG)" t nil) -(defalias 'outlinify-sticky 'outlineify-sticky) +(defalias 'outlinify-sticky #'outlineify-sticky) (autoload 'outlineify-sticky "allout" "\ Activate outline mode and establish file var so it is started subsequently. @@ -827,7 +827,7 @@ See `allout-widgets-mode' for allout widgets mode features.") (custom-autoload 'allout-widgets-auto-activation "allout-widgets" nil) -(put 'allout-widgets-mode-inhibit 'safe-local-variable 'booleanp) +(put 'allout-widgets-mode-inhibit 'safe-local-variable #'booleanp) (autoload 'allout-widgets-mode "allout-widgets" "\ Toggle Allout Widgets mode. @@ -1161,11 +1161,11 @@ Returns list of symbols and documentation found. (autoload 'archive-mode "arc-mode" "\ Major mode for viewing an archive file in a dired-like way. You can move around using the usual cursor motion commands. -Letters no longer insert themselves. -Type `e' to pull a file out of the archive and into its own buffer; +Letters no longer insert themselves.\\ +Type \\[archive-extract] to pull a file out of the archive and into its own buffer; or click mouse-2 on the file's line in the archive mode buffer. -If you edit a sub-file of this archive (as with the `e' command) and +If you edit a sub-file of this archive (as with the \\[archive-extract] command) and save it, the contents of that buffer will be saved back into the archive. @@ -1539,7 +1539,7 @@ ENTRY is the name of a password-store entry. The key used to retrieve the password is the symbol `secret'. The convention used as the format for a password-store file is -the following (see http://www.passwordstore.org/#organization): +the following (see https://www.passwordstore.org/#organization): secret key1: value1 @@ -1995,6 +1995,20 @@ seconds. ;;;;;; 0 0)) ;;; Generated autoloads from emacs-lisp/benchmark.el +(autoload 'benchmark-call "benchmark" "\ +Measure the run time of calling FUNC a number REPETITIONS of times. +The result is a list (TIME GC GCTIME) +where TIME is the total time it took, in seconds. +GCTIME is the amount of time that was spent in the GC +and GC is the number of times the GC was called. + +REPETITIONS can also be a floating point number, in which case it +specifies a minimum number of seconds that the benchmark execution +should take. In that case the return value is prepended with the +number of repetitions actually used. + +\(fn FUNC &optional REPETITIONS)" nil nil) + (autoload 'benchmark-run "benchmark" "\ Time execution of FORMS. If REPETITIONS is supplied as a number, run FORMS that many times, @@ -2024,6 +2038,8 @@ Interactively, REPETITIONS is taken from the prefix arg, and the command prompts for the form to benchmark. For non-interactive use see also `benchmark-run' and `benchmark-run-compiled'. +FORM can also be a function in which case we measure the time it takes +to call it without any argument. \(fn REPETITIONS FORM)" t nil) @@ -2035,7 +2051,7 @@ The return value is the value of the final form in BODY. (function-put 'benchmark-progn 'lisp-indent-function '0) -(register-definition-prefixes "benchmark" '("benchmark-elapse")) +(register-definition-prefixes "benchmark" '("benchmark-")) ;;;*** @@ -4794,7 +4810,7 @@ element to judge if that element should be excluded from the list. The buffer is left in Command History mode." t nil) (autoload 'command-history "chistory" "\ -Examine commands from `command-history' in a buffer. +Examine commands from variable `command-history' in a buffer. The number of commands listed is controlled by `list-command-history-max'. The command history is filtered by `list-command-history-filter' if non-nil. Use \\\\[command-history-repeat] to repeat the command on the current line. @@ -4892,8 +4908,12 @@ all methods of NAME have to use the same set of arguments for dispatch. Each dispatch argument and TYPE are specified in ARGS where the corresponding formal argument appears as (VAR TYPE) rather than just VAR. -The optional second argument QUALIFIER is a specifier that -modifies how the method is combined with other methods, including: +The optional EXTRA element, on the form `:extra STRING', allows +you to add more methods for the same specializers and qualifiers. +These are distinguished by STRING. + +The optional argument QUALIFIER is a specifier that modifies how +the method is combined with other methods, including: :before - Method will be called before the primary :after - Method will be called after the primary :around - Method will be called around everything else @@ -4910,9 +4930,9 @@ method to be applicable. The set of acceptable TYPEs (also called \"specializers\") is defined \(and can be extended) by the various methods of `cl-generic-generalizers'. -\(fn NAME [QUALIFIER] ARGS &rest [DOCSTRING] BODY)" nil t) +\(fn NAME [EXTRA] [QUALIFIER] ARGS &rest [DOCSTRING] BODY)" nil t) -(function-put 'cl-defmethod 'doc-string-elt '3) +(function-put 'cl-defmethod 'doc-string-elt 'cl--defmethod-doc-pos) (function-put 'cl-defmethod 'lisp-indent-function 'defun) @@ -6769,6 +6789,8 @@ If the HANDLER returns a `dbus-error', it is propagated as return message. \(fn EVENT)" t nil) +(function-put 'dbus-handle-event 'completion-predicate #'ignore) + (autoload 'dbus-monitor "dbus" "\ Invoke `dbus-register-monitor' interactively, and switch to the buffer. BUS is either a Lisp keyword, `:system' or `:session', or a @@ -10614,7 +10636,7 @@ be invoked for the values of the other parameters. \(fn &key (SERVER (erc-compute-server)) (PORT (erc-compute-port)) (NICK (erc-compute-nick)) PASSWORD (FULL-NAME (erc-compute-full-name)))" t nil) -(defalias 'erc-select 'erc) +(defalias 'erc-select #'erc) (autoload 'erc-tls "erc" "\ Interactively select TLS connection parameters and run ERC. @@ -10737,7 +10759,7 @@ and how to display message. \(fn SELECTOR &optional OUTPUT-BUFFER-NAME MESSAGE-FN)" t nil) -(defalias 'ert 'ert-run-tests-interactively) +(defalias 'ert #'ert-run-tests-interactively) (autoload 'ert-describe-test "ert" "\ Display the documentation for TEST-OR-TEST-NAME (a symbol or ert-test). @@ -11946,6 +11968,13 @@ Besides the choice of face, it is the same as `buffer-face-mode'. (register-definition-prefixes "face-remap" '("buffer-face-mode-" "face-" "internal-lisp-face-attributes" "text-scale-")) +;;;*** + +;;;### (autoloads nil "facemenu" "facemenu.el" (0 0 0 0)) +;;; Generated autoloads from facemenu.el + +(register-definition-prefixes "facemenu" '("facemenu-" "list-colors-")) + ;;;*** ;;;### (autoloads nil "faceup" "emacs-lisp/faceup.el" (0 0 0 0)) @@ -12212,6 +12241,8 @@ Otherwise, signal a `file-notify-error'. \(fn OBJECT)" t nil) +(function-put 'file-notify-handle-event 'completion-predicate #'ignore) + (register-definition-prefixes "filenotify" '("file-notify-")) ;;;*** @@ -12711,7 +12742,6 @@ Change the filter on a `find-lisp-find-dired' buffer to REGEXP. ;;;### (autoloads nil "finder" "finder.el" (0 0 0 0)) ;;; Generated autoloads from finder.el -(push (purecopy '(finder 1 0)) package--builtin-versions) (autoload 'finder-list-keywords "finder" "\ Display descriptions of the keywords in the Finder buffer." t nil) @@ -12780,7 +12810,7 @@ lines. (autoload 'flymake-log "flymake" "\ Log, at level LEVEL, the message MSG formatted with ARGS. LEVEL is passed to `display-warning', which is used to display -the warning. If this form is included in a byte-compiled file, +the warning. If this form is included in a file, the generated warning contains an indication of the file that generated it. @@ -14390,15 +14420,15 @@ If FORCE is non-nil, replace the old ones. Minor mode for providing mailing-list commands. If called interactively, toggle `Gnus-Mailing-List mode'. If the -prefix argument is positive, enable the mode, and if it is zero -or negative, disable the mode. +prefix argument is positive, enable the mode, and if it is zero or +negative, disable the mode. -If called from Lisp, toggle the mode if ARG is `toggle'. Enable -the mode if ARG is nil, omitted, or is a positive number. -Disable the mode if ARG is a negative number. +If called from Lisp, toggle the mode if ARG is `toggle'. Enable the +mode if ARG is nil, omitted, or is a positive number. Disable the +mode if ARG is a negative number. -The mode's hook is called both when the mode is enabled and when -it is disabled. +The mode's hook is called both when the mode is enabled and when it is +disabled. \\{gnus-mailing-list-mode-map} @@ -16840,7 +16870,7 @@ buffers which are visiting a file. (autoload 'ibuffer "ibuffer" "\ Begin using Ibuffer to edit a list of buffers. -Type `h' after entering ibuffer for more information. +Type \\\\[describe-mode] after entering ibuffer for more information. All arguments are optional. OTHER-WINDOW-P says to use another window. @@ -17126,7 +17156,7 @@ The main features of this mode are Use \\[idlwave-fill-paragraph] to refill a paragraph inside a comment. The indentation of the second line of the paragraph relative to the first will be retained. Use - \\[idlwave-auto-fill-mode] to toggle auto-fill mode for these + \\[auto-fill-mode] to toggle auto-fill mode for these comments. When the variable `idlwave-fill-comment-line-only' is nil, code can also be auto-filled and auto-indented. @@ -18592,25 +18622,6 @@ See Info node `(elisp)Defining Functions' for more details. (register-definition-prefixes "inline" '("inline-")) -;;;*** - -;;;### (autoloads nil "inversion" "cedet/inversion.el" (0 0 0 0)) -;;; Generated autoloads from cedet/inversion.el -(push (purecopy '(inversion 1 3)) package--builtin-versions) - -(autoload 'inversion-require-emacs "inversion" "\ -Declare that you need either EMACS-VER, XEMACS-VER or SXEMACS-ver. -Only checks one based on which kind of Emacs is being run. - -This function is obsolete; do this instead: - (when (version<= \"28.1\" emacs-version) ...) - -\(fn EMACS-VER XEMACS-VER SXEMACS-VER)" nil nil) - -(make-obsolete 'inversion-require-emacs 'nil '"28.1") - -(register-definition-prefixes "inversion" '("inversion-")) - ;;;*** ;;;### (autoloads nil "isearch-x" "international/isearch-x.el" (0 @@ -19540,13 +19551,13 @@ A major mode to edit GNU ld script files ;;;;;; (0 0 0 0)) ;;; Generated autoloads from textmodes/less-css-mode.el -(put 'less-css-compile-at-save 'safe-local-variable 'booleanp) +(put 'less-css-compile-at-save 'safe-local-variable #'booleanp) (put 'less-css-lessc-options 'safe-local-variable t) -(put 'less-css-output-directory 'safe-local-variable 'stringp) +(put 'less-css-output-directory 'safe-local-variable #'stringp) -(put 'less-css-input-file-name 'safe-local-variable 'stringp) +(put 'less-css-input-file-name 'safe-local-variable #'stringp) (add-to-list 'auto-mode-alist '("\\.less\\'" . less-css-mode)) (autoload 'less-css-mode "less-css-mode" "\ @@ -20535,7 +20546,7 @@ Default bookmark handler for Man buffers. ;;;### (autoloads nil "map" "emacs-lisp/map.el" (0 0 0 0)) ;;; Generated autoloads from emacs-lisp/map.el -(push (purecopy '(map 2 1)) package--builtin-versions) +(push (purecopy '(map 3 0)) package--builtin-versions) (register-definition-prefixes "map" '("map-")) @@ -22087,6 +22098,32 @@ QUALITY can be: ;;;### (autoloads nil "mwheel" "mwheel.el" (0 0 0 0)) ;;; Generated autoloads from mwheel.el +(defcustom mouse-wheel-mode t "\ +Non-nil if Mouse-Wheel mode is enabled. +See the `mouse-wheel-mode' command +for a description of this minor mode. +Setting this variable directly does not take effect; +either customize it (see the info node `Easy Customization') +or call the function `mouse-wheel-mode'." :set #'custom-set-minor-mode :initialize 'custom-initialize-delay :group 'mouse :type 'boolean) + +(custom-autoload 'mouse-wheel-mode "mwheel" nil) + +(autoload 'mouse-wheel-mode "mwheel" "\ +Toggle mouse wheel support (Mouse Wheel mode). + +If called interactively, toggle `Mouse-Wheel mode'. If the prefix +argument is positive, enable the mode, and if it is zero or negative, +disable the mode. + +If called from Lisp, toggle the mode if ARG is `toggle'. Enable the +mode if ARG is nil, omitted, or is a positive number. Disable the +mode if ARG is a negative number. + +The mode's hook is called both when the mode is enabled and when it is +disabled. + +\(fn &optional ARG)" t nil) + (register-definition-prefixes "mwheel" '("mouse-wheel-" "mwheel-")) ;;;*** @@ -22347,7 +22384,7 @@ gnutls-boot (as returned by `gnutls-boot-parameters'). \(fn NAME BUFFER HOST SERVICE &rest PARAMETERS)" nil nil) -(defalias 'open-protocol-stream 'open-network-stream) +(define-obsolete-function-alias 'open-protocol-stream #'open-network-stream "26.1") (register-definition-prefixes "network-stream" '("network-stream-")) @@ -24041,6 +24078,8 @@ Turning on outline mode calls the value of `text-mode-hook' and then of `outline-mode-hook', if they are non-nil. \(fn)" t nil) +(put 'outline-minor-mode-cycle 'safe-local-variable 'booleanp) +(put 'outline-minor-mode-highlight 'safe-local-variable 'booleanp) (autoload 'outline-minor-mode "outline" "\ Toggle Outline minor mode. @@ -24186,7 +24225,11 @@ directory. (autoload 'package-install-selected-packages "package" "\ Ensure packages in `package-selected-packages' are installed. -If some packages are not installed propose to install them." t nil) +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. + +\(fn &optional NOCONFIRM)" t nil) (autoload 'package-reinstall "package" "\ Reinstall package PKG. @@ -25898,6 +25941,13 @@ Save the result in `project-list-file' if the list of projects has changed. \(fn PR)" nil nil) +(autoload 'project-remove-known-project "project" "\ +Remove directory PROJECT-ROOT from the project list. +PROJECT-ROOT is the root directory of a known project listed in +the project list. + +\(fn PROJECT-ROOT)" t nil) + (autoload 'project-known-project-roots "project" "\ Return the list of root directories of all known projects." nil nil) @@ -25906,19 +25956,6 @@ Execute an extended command in project root." t nil) (function-put 'project-execute-extended-command 'interactive-only 'command-execute) -(defvar project-switch-commands '((project-find-file "Find file") (project-find-regexp "Find regexp") (project-dired "Dired") (project-vc-dir "VC-Dir") (project-eshell "Eshell")) "\ -Alist mapping commands to descriptions. -Used by `project-switch-project' to construct a dispatch menu of -commands available upon \"switching\" to another project. - -Each element is of the form (COMMAND LABEL &optional KEY) where -COMMAND is the command to run when KEY is pressed. LABEL is used -to distinguish the menu entries in the dispatch menu. If KEY is -absent, COMMAND must be bound in `project-prefix-map', and the -key is looked up in that map.") - -(custom-autoload 'project-switch-commands "project" t) - (autoload 'project-switch-project "project" "\ \"Switch\" to another project by running an Emacs command. The available commands are presented as a dispatch menu @@ -26495,7 +26532,7 @@ Add one translation rule, KEY to TRANSLATION, in the current Quail package. KEY is a string meaning a sequence of keystrokes to be translated. TRANSLATION is a character, a string, a vector, a Quail map, a function, or a cons. -It it is a character, it is the sole translation of KEY. +If it is a character, it is the sole translation of KEY. If it is a string, each character is a candidate for the translation. If it is a vector, each element (string or character) is a candidate for the translation. @@ -28351,24 +28388,7 @@ For more details, see Info node `(elisp) Extending Rx'. (function-put 'rx-define 'lisp-indent-function 'defun) -(autoload 'rx--pcase-macroexpander "rx" "\ -A pattern that matches strings against `rx' REGEXPS in sexp form. -REGEXPS are interpreted as in `rx'. The pattern matches any -string that is a match for REGEXPS, as if by `string-match'. - -In addition to the usual `rx' syntax, REGEXPS can contain the -following constructs: - - (let REF RX...) binds the symbol REF to a submatch that matches - the regular expressions RX. REF is bound in - CODE to the string of the submatch or nil, but - can also be used in `backref'. - (backref REF) matches whatever the submatch REF matched. - REF can be a number, as usual, or a name - introduced by a previous (let REF ...) - construct. - -\(fn &rest REGEXPS)" nil nil) +(eval-and-compile (defun rx--pcase-macroexpander (&rest regexps) "A pattern that matches strings against `rx' REGEXPS in sexp form.\nREGEXPS are interpreted as in `rx'. The pattern matches any\nstring that is a match for REGEXPS, as if by `string-match'.\n\nIn addition to the usual `rx' syntax, REGEXPS can contain the\nfollowing constructs:\n\n (let REF RX...) binds the symbol REF to a submatch that matches\n the regular expressions RX. REF is bound in\n CODE to the string of the submatch or nil, but\n can also be used in `backref'.\n (backref REF) matches whatever the submatch REF matched.\n REF can be a number, as usual, or a name\n introduced by a previous (let REF ...)\n construct." (let* ((rx--pcase-vars nil) (regexp (rx--to-expr (rx--pcase-transform (cons 'seq regexps)))) (nvars (length rx--pcase-vars))) `(and (pred stringp) ,(if (zerop nvars) `(pred (string-match ,regexp)) `(app (lambda (s) (and (string-match ,regexp s) ,(rx--reduce-right (lambda (a b) `(cons ,a ,b)) (mapcar (lambda (i) `(match-string ,i s)) (number-sequence 1 nvars))))) ,(list '\` (rx--reduce-right #'cons (mapcar (lambda (name) (list '\, name)) (reverse rx--pcase-vars)))))))))) (define-symbol-prop 'rx--pcase-macroexpander 'edebug-form-spec 'nil) @@ -28861,14 +28881,6 @@ Major mode for editing Bovine grammars. (register-definition-prefixes "semantic/grammar" '("semantic-")) -;;;*** - -;;;### (autoloads nil "semantic/grammar-wy" "cedet/semantic/grammar-wy.el" -;;;;;; (0 0 0 0)) -;;; Generated autoloads from cedet/semantic/grammar-wy.el - -(register-definition-prefixes "semantic/grammar-wy" '("semantic-grammar-wy--")) - ;;;*** ;;;### (autoloads nil "semantic/java" "cedet/semantic/java.el" (0 @@ -29500,7 +29512,7 @@ or Edit/Text Properties/Face commands. Pages can have named points and can link other points to them with see also somename. In the same way see also URL where URL is a filename relative to current -directory, or absolute as in `http://www.cs.indiana.edu/elisp/w3/docs.html'. +directory, or absolute as in `https://www.cs.indiana.edu/elisp/w3/docs.html'. Images in many formats can be inlined with . @@ -31249,7 +31261,7 @@ Major-mode for writing SRecode macros. \(fn)" t nil) -(defalias 'srt-mode 'srecode-template-mode) +(defalias 'srt-mode #'srecode-template-mode) (register-definition-prefixes "srecode/srt-mode" '("semantic-" "srecode-")) @@ -31811,7 +31823,7 @@ Move the point under the table as shown below. +--------------+------+--------------------------------+ -!- -Type M-x table-insert-row instead of \\[table-insert-row-column]. \\[table-insert-row-column] does not work +Type \\[table-insert-row] instead of \\[table-insert-row-column]. \\[table-insert-row-column] does not work when the point is outside of the table. This insertion at outside of the table effectively appends a row at the end. @@ -32108,11 +32120,11 @@ HTML: URL `https://www.w3.org' LaTeX: - URL `http://www.maths.tcd.ie/~dwilkins/LaTeXPrimer/Tables.html' + URL `https://www.maths.tcd.ie/~dwilkins/LaTeXPrimer/Tables.html' CALS (DocBook DTD): - URL `http://www.oasis-open.org/html/a502.htm' - URL `http://www.oreilly.com/catalog/docbook/chapter/book/table.html#AEN114751' + URL `https://www.oasis-open.org/html/a502.htm' + URL `https://www.oreilly.com/catalog/docbook/chapter/book/table.html#AEN114751' \(fn LANGUAGE &optional DEST-BUFFER CAPTION)" t nil) @@ -32320,12 +32332,12 @@ Connect to the Emacs talk group from the current X display or tty frame." t nil) (autoload 'tar-mode "tar-mode" "\ Major mode for viewing a tar file as a dired-like listing of its contents. You can move around using the usual cursor motion commands. -Letters no longer insert themselves. -Type `e' to pull a file out of the tar file and into its own buffer; +Letters no longer insert themselves.\\ +Type \\[tar-extract] to pull a file out of the tar file and into its own buffer; or click mouse-2 on the file's line in the Tar mode buffer. -Type `c' to copy an entry from the tar file into another file on disk. +Type \\[tar-copy] to copy an entry from the tar file into another file on disk. -If you edit a sub-file of this archive (as with the `e' command) and +If you edit a sub-file of this archive (as with the \\[tar-extract] command) and save it with \\[save-buffer], the contents of that buffer will be saved back into the tar-file buffer; in this way you can edit a file inside of a tar archive without extracting it and re-archiving it. @@ -32679,11 +32691,11 @@ says which mode to use. \(fn)" t nil) -(defalias 'TeX-mode 'tex-mode) +(defalias 'TeX-mode #'tex-mode) -(defalias 'plain-TeX-mode 'plain-tex-mode) +(defalias 'plain-TeX-mode #'plain-tex-mode) -(defalias 'LaTeX-mode 'latex-mode) +(defalias 'LaTeX-mode #'latex-mode) (autoload 'plain-tex-mode "tex-mode" "\ Major mode for editing files of input for plain TeX. @@ -33339,7 +33351,11 @@ point. \(fn &optional FORMAT HERE)" t nil) (autoload 'emacs-init-time "time" "\ -Return a string giving the duration of the Emacs initialization." t nil) +Return a string giving the duration of the Emacs initialization. +FORMAT is a string to format the result, using `format'. If nil, +the default format \"%f seconds\" is used. + +\(fn &optional FORMAT)" t nil) (register-definition-prefixes "time" '("display-time-" "legacy-style-world-list" "time--display-world-list" "world-clock-" "zoneinfo-style-world-list")) @@ -34023,6 +34039,13 @@ Add archive file name handler to `file-name-handler-alist'." (when tramp-archive (register-definition-prefixes "tramp-ftp" '("tramp-")) +;;;*** + +;;;### (autoloads nil "tramp-fuse" "net/tramp-fuse.el" (0 0 0 0)) +;;; Generated autoloads from net/tramp-fuse.el + +(register-definition-prefixes "tramp-fuse" '("tramp-fuse-")) + ;;;*** ;;;### (autoloads nil "tramp-gvfs" "net/tramp-gvfs.el" (0 0 0 0)) @@ -34060,6 +34083,13 @@ Add archive file name handler to `file-name-handler-alist'." (when tramp-archive (register-definition-prefixes "tramp-smb" '("tramp-smb-")) +;;;*** + +;;;### (autoloads nil "tramp-sshfs" "net/tramp-sshfs.el" (0 0 0 0)) +;;; Generated autoloads from net/tramp-sshfs.el + +(register-definition-prefixes "tramp-sshfs" '("tramp-sshfs-")) + ;;;*** ;;;### (autoloads nil "tramp-sudoedit" "net/tramp-sudoedit.el" (0 @@ -34134,8 +34164,8 @@ resumed later. ;;;;;; 0 0)) ;;; Generated autoloads from textmodes/two-column.el (autoload '2C-command "two-column" () t 'keymap) - (global-set-key "\C-x6" '2C-command) - (global-set-key [f2] '2C-command) + (global-set-key "\C-x6" #'2C-command) + (global-set-key [f2] #'2C-command) (autoload '2C-two-columns "two-column" "\ Split current window vertically for two-column editing. @@ -35240,7 +35270,12 @@ The buffer in question is current when this function is called. \(fn FILENAME)" nil nil) -(register-definition-prefixes "userlock" '("ask-user-about-" "file-" "userlock--check-content-unchanged")) +(autoload 'userlock--handle-unlock-error "userlock" "\ +Report an ERROR that occurred while unlocking a file. + +\(fn ERROR)" nil nil) + +(register-definition-prefixes "userlock" '("ask-user-about-" "file-" "userlock--")) ;;;*** @@ -36027,7 +36062,7 @@ Key bindings: ;;;### (autoloads nil "verilog-mode" "progmodes/verilog-mode.el" ;;;;;; (0 0 0 0)) ;;; Generated autoloads from progmodes/verilog-mode.el -(push (purecopy '(verilog-mode 2021 2 2 263931197)) package--builtin-versions) +(push (purecopy '(verilog-mode 2021 3 30 243771231)) package--builtin-versions) (autoload 'verilog-mode "verilog-mode" "\ Major mode for editing Verilog code. @@ -36782,7 +36817,7 @@ Don't change this variable directly, you must change it by one of the functions that enable or disable view mode.") (autoload 'kill-buffer-if-not-modified "view" "\ -Like `kill-buffer', but does nothing if the buffer is modified. +Like `kill-buffer', but does nothing if buffer BUF is modified. \(fn BUF)" nil nil) @@ -36848,7 +36883,7 @@ file: Users may suspend viewing in order to modify the buffer. Exiting View mode will then discard the user's edits. Setting EXIT-ACTION to `kill-buffer-if-not-modified' avoids this. -This function does not enable View mode if the buffer's major-mode +This function does not enable View mode if the buffer's major mode has a `special' mode-class, because such modes usually have their own View-like bindings. @@ -36870,7 +36905,7 @@ Optional argument EXIT-ACTION is either nil or a function with buffer as argument. This function is called when finished viewing buffer. Use this argument instead of explicitly setting `view-exit-action'. -This function does not enable View mode if the buffer's major-mode +This function does not enable View mode if the buffer's major mode has a `special' mode-class, because such modes usually have their own View-like bindings. @@ -36892,7 +36927,7 @@ Optional argument EXIT-ACTION is either nil or a function with buffer as argument. This function is called when finished viewing buffer. Use this argument instead of explicitly setting `view-exit-action'. -This function does not enable View mode if the buffer's major-mode +This function does not enable View mode if the buffer's major mode has a `special' mode-class, because such modes usually have their own View-like bindings. @@ -38341,15 +38376,15 @@ Zone out, completely." t nil) ;;;;;; "cedet/semantic/db-typecache.el" "cedet/semantic/db.el" "cedet/semantic/debug.el" ;;;;;; "cedet/semantic/decorate/include.el" "cedet/semantic/decorate/mode.el" ;;;;;; "cedet/semantic/dep.el" "cedet/semantic/doc.el" "cedet/semantic/edit.el" -;;;;;; "cedet/semantic/find.el" "cedet/semantic/format.el" "cedet/semantic/html.el" -;;;;;; "cedet/semantic/ia-sb.el" "cedet/semantic/ia.el" "cedet/semantic/idle.el" -;;;;;; "cedet/semantic/imenu.el" "cedet/semantic/lex-spp.el" "cedet/semantic/lex.el" -;;;;;; "cedet/semantic/mru-bookmark.el" "cedet/semantic/scope.el" -;;;;;; "cedet/semantic/senator.el" "cedet/semantic/sort.el" "cedet/semantic/symref.el" -;;;;;; "cedet/semantic/symref/cscope.el" "cedet/semantic/symref/global.el" -;;;;;; "cedet/semantic/symref/grep.el" "cedet/semantic/symref/idutils.el" -;;;;;; "cedet/semantic/symref/list.el" "cedet/semantic/tag-file.el" -;;;;;; "cedet/semantic/tag-ls.el" "cedet/semantic/tag-write.el" +;;;;;; "cedet/semantic/find.el" "cedet/semantic/format.el" "cedet/semantic/grammar-wy.el" +;;;;;; "cedet/semantic/html.el" "cedet/semantic/ia-sb.el" "cedet/semantic/ia.el" +;;;;;; "cedet/semantic/idle.el" "cedet/semantic/imenu.el" "cedet/semantic/lex-spp.el" +;;;;;; "cedet/semantic/lex.el" "cedet/semantic/mru-bookmark.el" +;;;;;; "cedet/semantic/scope.el" "cedet/semantic/senator.el" "cedet/semantic/sort.el" +;;;;;; "cedet/semantic/symref.el" "cedet/semantic/symref/cscope.el" +;;;;;; "cedet/semantic/symref/global.el" "cedet/semantic/symref/grep.el" +;;;;;; "cedet/semantic/symref/idutils.el" "cedet/semantic/symref/list.el" +;;;;;; "cedet/semantic/tag-file.el" "cedet/semantic/tag-ls.el" "cedet/semantic/tag-write.el" ;;;;;; "cedet/semantic/tag.el" "cedet/semantic/texi.el" "cedet/semantic/util-modes.el" ;;;;;; "cedet/semantic/wisent/java-tags.el" "cedet/semantic/wisent/javascript.el" ;;;;;; "cedet/semantic/wisent/javat-wy.el" "cedet/semantic/wisent/js-wy.el" @@ -38381,7 +38416,7 @@ Zone out, completely." t nil) ;;;;;; "eshell/em-ls.el" "eshell/em-pred.el" "eshell/em-prompt.el" ;;;;;; "eshell/em-rebind.el" "eshell/em-script.el" "eshell/em-smart.el" ;;;;;; "eshell/em-term.el" "eshell/em-tramp.el" "eshell/em-unix.el" -;;;;;; "eshell/em-xtra.el" "facemenu.el" "faces.el" "files.el" "font-core.el" +;;;;;; "eshell/em-xtra.el" "faces.el" "files.el" "font-core.el" ;;;;;; "font-lock.el" "format.el" "frame.el" "help.el" "hfy-cmap.el" ;;;;;; "ibuf-ext.el" "indent.el" "international/characters.el" "international/charprop.el" ;;;;;; "international/charscript.el" "international/cp51932.el" commit 5bf7c6ce4eb9fb9d35d960636266a5cc36b648c0 Author: Eli Zaretskii Date: Thu Apr 1 15:59:28 2021 +0300 GNUmakefile: Fix last change. diff --git a/GNUmakefile b/GNUmakefile index c8d4832aab..0e01b808a0 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -50,8 +50,8 @@ help: @echo "make distclean -- delete all build and configuration files," @echo " leave only files included in source distribution" @echo "make maintainer-clean -- delete almost everything that can be regenerated" - @echo "make extraclean -- like maintainer-clean, and also all generated files," - @echo " backup files and autosave files" + @echo "make extraclean -- like maintainer-clean, and also delete all generated" + @echo " files, backup files and autosave files" @echo "make bootstrap -- delete all compiled files to force a new bootstrap" @echo " from a clean slate, then build in the normal way" @echo "make uninstall -- remove files installed by 'make install'" commit 12d2fd6037a87241f0966427f5788eb939c37c53 Author: Eli Zaretskii Date: Thu Apr 1 15:57:55 2021 +0300 Fix 'extraclean' targets * GNUmakefile: Add description of 'extraclean'. * Makefile.in (extraclean_dirs): Add lwlib. * lwlib/Makefile.in (clean mostlyclean extraclean): Add 'extraclean' target. * lisp/Makefile.in (extraclean): Remove ${loaddefs}, not just ${LOADDEFS}. Delete all backup and autosave files. diff --git a/GNUmakefile b/GNUmakefile index f27163840b..c8d4832aab 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -50,6 +50,8 @@ help: @echo "make distclean -- delete all build and configuration files," @echo " leave only files included in source distribution" @echo "make maintainer-clean -- delete almost everything that can be regenerated" + @echo "make extraclean -- like maintainer-clean, and also all generated files," + @echo " backup files and autosave files" @echo "make bootstrap -- delete all compiled files to force a new bootstrap" @echo " from a clean slate, then build in the normal way" @echo "make uninstall -- remove files installed by 'make install'" diff --git a/Makefile.in b/Makefile.in index 4fa7c9ed5f..f3ba50c55e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -923,7 +923,7 @@ maintainer-clean: bootstrap-clean $(maintainer_clean_dirs:=_maintainer-clean) ### Note that we abuse this in some subdirectories (eg leim), ### to delete some generated files that are slow to rebuild. extraclean_dirs = ${NTDIR} lib-src src leim \ - admin/charsets admin/grammars admin/unidata lisp lib + admin/charsets admin/grammars admin/unidata lisp lib lwlib $(foreach dir,$(extraclean_dirs),$(eval $(call submake_template,$(dir),extraclean))) diff --git a/lisp/Makefile.in b/lisp/Makefile.in index 8ea2841558..d62c2cfbbe 100644 --- a/lisp/Makefile.in +++ b/lisp/Makefile.in @@ -449,8 +449,10 @@ maintainer-clean: distclean bootstrap-clean rm -f TAGS extraclean: bootstrap-clean distclean - -for file in $(LOADDEFS); do rm -f $${file}~; done + -for file in $(loaddefs); do rm -f $${file}~; done -rm -f $(lisp)/loaddefs.el~ + -find $(lisp) -name '*~' $(FIND_DELETE) + -find $(lisp) -name '#*' $(FIND_DELETE) .PHONY: check-declare diff --git a/lwlib/Makefile.in b/lwlib/Makefile.in index fb0ae0e1c2..ce77789db8 100644 --- a/lwlib/Makefile.in +++ b/lwlib/Makefile.in @@ -93,9 +93,9 @@ globals_h = ../src/globals.h $(globals_h): $(MAKE) -C ../src globals.h -.PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean +.PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean extraclean -clean mostlyclean: +clean mostlyclean extraclean: rm -f ./*.o liblw.a \#* $(DEPDIR)/* distclean: clean commit 4582c96828d6386ab6a6a6b2a7147a810c8ba474 Author: Stefan Kangas Date: Thu Apr 1 11:07:06 2021 +0200 Use lexical-binding in epg-config.el and add tests * lisp/epg-config.el: Use lexical-binding. (epg-find-configuration): Improve error message. * test/lisp/epg-config-tests.el: New file. diff --git a/lisp/epg-config.el b/lisp/epg-config.el index 59d097c91f..d32c8c897c 100644 --- a/lisp/epg-config.el +++ b/lisp/epg-config.el @@ -1,4 +1,4 @@ -;;; epg-config.el --- configuration of the EasyPG Library +;;; epg-config.el --- configuration of the EasyPG Library -*- lexical-binding: t -*- ;; Copyright (C) 2006-2021 Free Software Foundation, Inc. @@ -21,6 +21,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . +;;; Commentary: + ;;; Code: ;;; Prelude @@ -157,7 +159,7 @@ version requirement is met." (setq program-alist epg-config--program-alist)) (let ((entry (assq protocol program-alist))) (unless entry - (error "Unknown protocol %S" protocol)) + (error "Unknown protocol `%S'" protocol)) (cl-destructuring-bind (symbol . alist) (cdr entry) (let ((constructor diff --git a/test/lisp/epg-config-tests.el b/test/lisp/epg-config-tests.el new file mode 100644 index 0000000000..fba61e573c --- /dev/null +++ b/test/lisp/epg-config-tests.el @@ -0,0 +1,47 @@ +;;; epg-config-tests.el --- Test suite for epg.el -*- lexical-binding: t -*- + +;; Copyright (C) 2021 Free Software Foundation, Inc. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;;; Code: + +(require 'ert) +(require 'epg-config) + +(ert-deftest epg-config-test-epg-find-configuration () + (skip-unless (executable-find "gpg2")) + (should (assq 'version (epg-find-configuration 'OpenPGP)))) + +(ert-deftest epg-config-test-epg-find-configuration/unknown-protocol () + (should-error (epg-find-configuration 'does-not-exist))) + +(ert-deftest epg-config-test-epg-check-configuration () + (should (epg-check-configuration '((version . "1.0")) "0.9")) + (should (epg-check-configuration '((version . "1.0")) "1.0")) + (should-error (epg-check-configuration '((version . "1.0")) "1.1")) + (should-error (epg-check-configuration '((version . "1.0")) 'foo)) + (should-error (epg-check-configuration '((version . "1.0")) "foo"))) + +(ert-deftest epg-config-test-epg-required-version-p () + (skip-unless (executable-find "gpg2")) + (should (epg-required-version-p 'OpenPGP "1.0"))) + +(provide 'epg-config-tests) + +;;; epg-config-tests.el ends here