commit 2ea1265f55d722d83fcae6ea087d059113cf6679 (HEAD, refs/remotes/origin/master) Author: João Távora Date: Sat May 2 00:10:51 2020 +0100 Properly fix embarassing missing paren typo in jsonrpc.el Paul Eggert had fixed it in practice, but the missing paren was meant to close a previous with-current-buffer. * lisp/jsonrpc.el (initialize-instance): Put parenthesis in right spot. (Version): Bump to 1.0.11 diff --git a/lisp/jsonrpc.el b/lisp/jsonrpc.el index 696a2daa28..6cf41311a1 100644 --- a/lisp/jsonrpc.el +++ b/lisp/jsonrpc.el @@ -5,7 +5,7 @@ ;; Author: João Távora ;; Keywords: processes, languages, extensions ;; Package-Requires: ((emacs "25.2")) -;; Version: 1.0.10 +;; Version: 1.0.11 ;; This is an Elpa :core package. Don't use functionality that is not ;; compatible with Emacs 25.2. @@ -398,7 +398,7 @@ connection object, called when the process dies .") (ignore-errors (kill-buffer hidden-name)) (rename-buffer hidden-name) (process-put proc 'jsonrpc-stderr (current-buffer)) - (read-only-mode t)) + (read-only-mode t))) (setf (jsonrpc--process conn) proc) (set-process-buffer proc (get-buffer-create (format " *%s output*" name))) (set-process-filter proc #'jsonrpc--process-filter) @@ -407,7 +407,7 @@ connection object, called when the process dies .") (buffer-disable-undo) (set-marker (process-mark proc) (point-min)) (let ((inhibit-read-only t)) (erase-buffer) (read-only-mode t))) - (process-put proc 'jsonrpc-connection conn)))) + (process-put proc 'jsonrpc-connection conn))) (cl-defmethod jsonrpc-connection-send ((connection jsonrpc-process-connection) &rest args commit c59e878439833d89998e03134ee9060f9c449fd9 Author: Michael Heerdegen Date: Fri May 1 02:08:17 2020 +0200 Inhibit modification hooks when saving eieio-persistent's * lisp/emacs-lisp/eieio-base.el (eieio-persistent-save): Bind inhibit-modification-hooks -> t. diff --git a/lisp/emacs-lisp/eieio-base.el b/lisp/emacs-lisp/eieio-base.el index 2cb1f614ce..010a2b673e 100644 --- a/lisp/emacs-lisp/eieio-base.el +++ b/lisp/emacs-lisp/eieio-base.el @@ -473,7 +473,8 @@ instance." (let* ((cfn (or file (oref this file))) (default-directory (file-name-directory cfn))) (cl-letf ((standard-output (current-buffer)) - ((oref this file) ;FIXME: Why change it? + (inhibit-modification-hooks t) + ((oref this file) ;FIXME: Why change it? (if file ;; FIXME: Makes a name relative to (oref this file), ;; whereas I think it should be relative to cfn. commit 145aab0672ae259736ee9230f8e0ff4effa5f4fd Author: Michal Nazarewicz Date: Sun Apr 26 19:30:41 2020 +0100 cc-mode: add support for Doxygen documentation style * lisp/progmodes/cc-fonts.el (doxygen-font-lock-doc-comments, doxygen-font-lock-keywords): New constants defining Doxygen comment style support. * lisp/progmodes/cc-vars.el (c-doc-comment-style): Updated docstring to mention now-supported Doxygen mode. diff --git a/etc/NEWS b/etc/NEWS index 8fc2311159..753b7a7fd3 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -198,7 +198,6 @@ like cell phones, tablets or cameras. Previously, assigning a new template to an already defined tag had no effect. - ** map.el *** Pcase 'map' pattern added keyword symbols abbreviation. @@ -288,6 +287,21 @@ prefix on the Subject line in various languages. These new navigation commands are bound to 'n' and 'p' in 'apropos-mode'. +** cc-mode + +*** Added support for Doxygen documentation style. +‘doxygen’ is now valid ‘c-doc-comment-style’ which recognises all +comment styles supported by Doxygen (namely ‘///’, ‘//!’, ‘/** … */’ +and ‘/*! … */’. ‘gtkdoc’ remains the default for C and C++ modes; to +use ‘doxygen’ by default one might evaluate: + + (setq-default c-doc-comment-style + '((java-mode . javadoc) + (pike-mode . autodoc) + (c-mode . doxygen) + (c++-mode . doxygen))) + +or use it in a custom ‘c-style’. * New Modes and Packages in Emacs 28.1 diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el index 2cbbc66c14..9ea08a4624 100644 --- a/lisp/progmodes/cc-fonts.el +++ b/lisp/progmodes/cc-fonts.el @@ -3016,6 +3016,84 @@ need for `pike-font-lock-extra-types'.") (c-font-lock-doc-comments "/[*/]!" limit autodoc-font-lock-doc-comments))))) +;; Doxygen + +(defconst doxygen-font-lock-doc-comments + ;; TODO: Handle @code, @verbatim, @dot, @f etc. better by not highlighting + ;; text inside of those commands. Something smarter than just regexes may be + ;; needed to do that efficiently. + `((,(concat + ;; Make sure that the special character has not been escaped. E.g. in + ;; ‘\@foo’ only ‘\@’ is a command (similarly for other characters like + ;; ‘\\foo’, ‘\#%\".|\\\\]" ; single-character escapes + "\\|::\\|---?" ; \:: \-- \--- + "\\)" + ;; HTML tags and entities: + "\\|" + "\\|&\\(?:\\sw+\\|#[0-9]+\\|#x[0-9a-fA-F]+\\);" + "\\)") + 1 ,c-doc-markup-face-name prepend nil) + ;; Commands inside of strings are not commands so override highlighting with + ;; string face. This also affects HTML attribute values if they are + ;; surrounded with double quotes which may or may not be considered a good + ;; thing. + ("\\(?:^\\|[^\\@]\\)\\(\"[^\"[:cntrl:]]+\"\\)" + 1 font-lock-string-face prepend nil) + ;; HTML comments inside of the Doxygen comments. + ("\\(?:^\\|[^\\@]\\)\\(\\)" + 1 font-lock-comment-face prepend nil) + ;; Autolinking. Doxygen auto-links anything that is a class name but we have + ;; no hope of matching those. We are, however, able to match functions and + ;; members using explicit scoped syntax. For functions, we can also find + ;; them by noticing argument-list. Note that Doxygen accepts ‘::’ as well + ;; as ‘#’ as scope operators. + (,(let* ((ref "[\\@]ref\\s-+") + (ref-opt (concat "\\(?:" ref "\\)?")) + (id "[a-zA-Z_][a-zA-Z_0-9]*") + (args "\\(?:()\\|([^()]*)\\)") + (scope "\\(?:#\\|::\\)")) + (concat + "\\(?:^\\|[^\\@/%:]\\)\\(?:" + ref-opt "\\(?1:" scope "?" "\\(?:" id scope "\\)+" "~?" id "\\)" + "\\|" ref-opt "\\(?1:" scope "~?" id "\\)" + "\\|" ref-opt "\\(?1:" scope "?" "~?" id "\\)" args + "\\|" ref "\\(?1:" "~?" id "\\)" + "\\|" ref-opt "\\(?1:~[A-Z][a-zA-Z0-9_]+\\)" + "\\)")) + 1 font-lock-function-name-face prepend nil) + ;; Match URLs and emails. This has two purposes. First of all, Doxygen + ;; autolinks URLs. Second of all, ‘@bar’ in ‘foo@bar.baz’ has been matched + ;; above as a command; try and overwrite it. + (,(let* ((host "[A-Za-z0-9]\\(?:[A-Za-z0-9-]\\{0,61\\}[A-Za-z0-9]\\)") + (fqdn (concat "\\(?:" host "\\.\\)+" host)) + (comp "[!-(*--/-=?-~]+") + (path (concat "/\\(?:" comp "[.]+" "\\)*" comp))) + (concat "\\(?:mailto:\\)?[a-zA-0_.]+@" fqdn + "\\|https?://" fqdn "\\(?:" path "\\)?")) + 0 font-lock-keyword-face prepend nil))) + +(defconst doxygen-font-lock-keywords + `((,(lambda (limit) + (c-font-lock-doc-comments "/\\(?:/[/!]\\|\\*[\\*!]\\)" + limit doxygen-font-lock-doc-comments))))) + ;; 2006-07-10: awk-font-lock-keywords has been moved back to cc-awk.el. (cc-provide 'cc-fonts) diff --git a/lisp/progmodes/cc-vars.el b/lisp/progmodes/cc-vars.el index 3995b21185..b885f6ae1d 100644 --- a/lisp/progmodes/cc-vars.el +++ b/lisp/progmodes/cc-vars.el @@ -576,6 +576,7 @@ comment styles: javadoc -- Javadoc style for \"/** ... */\" comments (default in Java mode). autodoc -- Pike autodoc style for \"//! ...\" comments (default in Pike mode). gtkdoc -- GtkDoc style for \"/** ... **/\" comments (default in C and C++ modes). + doxygen -- Doxygen style. The value may also be a list of doc comment styles, in which case all of them are recognized simultaneously (presumably with markup cues commit 4b6c2bcecfe84585bae9fdfecbd87a48291793a5 Author: Paul Eggert Date: Fri May 1 10:50:03 2020 -0700 * lisp/jsonrpc.el (initialize-instance): Fix closing-paren typo. diff --git a/lisp/jsonrpc.el b/lisp/jsonrpc.el index 69ee94159d..696a2daa28 100644 --- a/lisp/jsonrpc.el +++ b/lisp/jsonrpc.el @@ -407,7 +407,7 @@ connection object, called when the process dies .") (buffer-disable-undo) (set-marker (process-mark proc) (point-min)) (let ((inhibit-read-only t)) (erase-buffer) (read-only-mode t))) - (process-put proc 'jsonrpc-connection conn))) + (process-put proc 'jsonrpc-connection conn)))) (cl-defmethod jsonrpc-connection-send ((connection jsonrpc-process-connection) &rest args commit b23daca20788ab6b54362c5bdb0470887de106fb Author: João Távora Date: Fri May 1 13:24:56 2020 +0100 Consolidate lisp/jsonrpc.el logging in single events buffer For inferior processes having useful stderr, it is no longer cumbersome to switch between different buffers to correlate error messages with transport-level JSONRPC messages. The existing stderr and stdout buffers can still be found hidden away from the normal buffer list. An original idea of Tobias Rittweiler . * lisp/jsonrpc.el (initialize-instance jsonrpc-process-connection): Setup after-change functions stderr buffer. Hide stderr and stdout buffers. (jsonrpc--log-event): Don't output extra newline. Tweak log format. (Version): Bump to 1.0.10 diff --git a/lisp/jsonrpc.el b/lisp/jsonrpc.el index 65c0df8f57..69ee94159d 100644 --- a/lisp/jsonrpc.el +++ b/lisp/jsonrpc.el @@ -5,7 +5,7 @@ ;; Author: João Távora ;; Keywords: processes, languages, extensions ;; Package-Requires: ((emacs "25.2")) -;; Version: 1.0.9 +;; Version: 1.0.10 ;; This is an Elpa :core package. Don't use functionality that is not ;; compatible with Emacs 25.2. @@ -364,21 +364,49 @@ connection object, called when the process dies .") (cl-defmethod initialize-instance ((conn jsonrpc-process-connection) slots) (cl-call-next-method) - (let* ((proc (plist-get slots :process)) - (proc (if (functionp proc) (funcall proc) proc)) - (buffer (get-buffer-create (format "*%s output*" (process-name proc)))) - (stderr (get-buffer-create (format "*%s stderr*" (process-name proc))))) + (cl-destructuring-bind (&key ((:process proc)) name &allow-other-keys) slots + ;; FIXME: notice the undocumented bad coupling in the buffer name. + ;; The client making the process _must_ use a buffer named exactly + ;; like this property when calling `make-process'. If there were + ;; a `set-process-stderr' like there is `set-process-buffer' we + ;; wouldn't need this and could use a pipe with a process filter + ;; instead of `after-change-functions'. Alternatively, we need a + ;; new initarg (but maybe not a slot). + (with-current-buffer (get-buffer-create (format "*%s stderr*" name)) + (let ((inhibit-read-only t) + (hidden-name (concat " " (buffer-name)))) + (erase-buffer) + (buffer-disable-undo) + (add-hook + 'after-change-functions + (lambda (beg _end _pre-change-len) + (cl-loop initially (goto-char beg) + do (forward-line) + when (bolp) + for line = (buffer-substring + (line-beginning-position 0) + (line-end-position 0)) + do (with-current-buffer (jsonrpc-events-buffer conn) + (goto-char (point-max)) + (let ((inhibit-read-only t)) + (insert (format "[stderr] %s\n" line)))) + until (eobp))) + nil t) + ;; If we are correctly coupled to the client, it should pick up + ;; the current buffer immediately. + (setq proc (if (functionp proc) (funcall proc) proc)) + (ignore-errors (kill-buffer hidden-name)) + (rename-buffer hidden-name) + (process-put proc 'jsonrpc-stderr (current-buffer)) + (read-only-mode t)) (setf (jsonrpc--process conn) proc) - (set-process-buffer proc buffer) - (process-put proc 'jsonrpc-stderr stderr) + (set-process-buffer proc (get-buffer-create (format " *%s output*" name))) (set-process-filter proc #'jsonrpc--process-filter) (set-process-sentinel proc #'jsonrpc--process-sentinel) (with-current-buffer (process-buffer proc) (buffer-disable-undo) (set-marker (process-mark proc) (point-min)) - (let ((inhibit-read-only t)) (erase-buffer) (read-only-mode t) proc)) - (with-current-buffer stderr - (buffer-disable-undo)) + (let ((inhibit-read-only t)) (erase-buffer) (read-only-mode t))) (process-put proc 'jsonrpc-connection conn))) (cl-defmethod jsonrpc-connection-send ((connection jsonrpc-process-connection) @@ -682,7 +710,7 @@ originated." (format "-%s" subtype))))) (goto-char (point-max)) (prog1 - (let ((msg (format "%s%s%s %s:\n%s\n" + (let ((msg (format "[%s]%s%s %s:\n%s" type (if id (format " (id:%s)" id) "") (if error " ERROR" "") commit 2a8784129daf270d0a20ce3531e488de51de7520 Author: Basil L. Contovounesios Date: Fri May 1 14:44:56 2020 +0100 ; Fix recent additions with lisp-data-mode * lisp/bookmark.el (bookmark-insert-file-format-version-stamp) (save-place-alist-to-file): Delimit file-local variables on the -*- line with semicolons. * lisp/files.el (auto-mode-alist): Use shy regexp group. diff --git a/lisp/bookmark.el b/lisp/bookmark.el index f2384973e9..0fa77ed322 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el @@ -736,7 +736,7 @@ CODING is the symbol of the coding-system in which the file is encoded." (insert (format ";;;; Emacs Bookmark Format Version %d\ -;;;; -*- coding: %S mode: lisp-data -*-\n" +;;;; -*- coding: %S; mode: lisp-data -*-\n" bookmark-file-format-version (coding-system-base coding))) (insert ";;; This format is meant to be slightly human-readable;\n" ";;; nevertheless, you probably don't want to edit it.\n" diff --git a/lisp/files.el b/lisp/files.el index 56d4679ad7..c34fe00388 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -2657,9 +2657,9 @@ since only a single case-insensitive search through the alist is made." ("\\.ltx\\'" . latex-mode) ("\\.dtx\\'" . doctex-mode) ("\\.org\\'" . org-mode) - ;; .dir-locals.el is not really elisp. Could use the + ;; .dir-locals.el is not really Elisp. Could use the ;; `dir-locals-file' constant if it weren't defined below. - ("\\.dir-locals\\(-2\\)?\\.el\\'" . lisp-data-mode) + ("\\.dir-locals\\(?:-2\\)?\\.el\\'" . lisp-data-mode) ("eww-bookmarks\\'" . lisp-data-mode) ("tramp\\'" . lisp-data-mode) ("places\\'" . lisp-data-mode) diff --git a/lisp/saveplace.el b/lisp/saveplace.el index f78639db24..46738ab03d 100644 --- a/lisp/saveplace.el +++ b/lisp/saveplace.el @@ -248,8 +248,8 @@ may have changed) back to `save-place-alist'." (delete-region (point-min) (point-max)) (when save-place-forget-unreadable-files (save-place-forget-unreadable-files)) - (insert (format ";;; -*- coding: %s mode: lisp-data -*-\n" - (symbol-name coding-system-for-write))) + (insert (format ";;; -*- coding: %s; mode: lisp-data -*-\n" + coding-system-for-write)) (let ((print-length nil) (print-level nil)) (pp save-place-alist (current-buffer))) commit 9f3f1692767779a243a32d82f20eb8ffa5369920 Author: Glenn Morris Date: Fri May 1 06:27:00 2020 -0700 ; Auto-commit of loaddefs files. diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el index e1f238c7d8..d49c752384 100644 --- a/lisp/ldefs-boot.el +++ b/lisp/ldefs-boot.el @@ -1076,7 +1076,7 @@ search for matches for any two (or more) of those words. With \\[universal-argument] prefix, or if `apropos-do-all' is non-nil, consider all symbols (if they match PATTERN). -Returns list of symbols and documentation found. +Return list of symbols and documentation found. \(fn PATTERN &optional DO-ALL)" t nil) @@ -4743,6 +4743,34 @@ and runs the normal hook `command-history-hook'." t nil) (if (fboundp 'register-definition-prefixes) (register-definition-prefixes "cl-extra" '("cl-"))) +;;;*** + +;;;### (autoloads nil "cl-font-lock" "progmodes/cl-font-lock.el" +;;;;;; (0 0 0 0)) +;;; Generated autoloads from progmodes/cl-font-lock.el + +(defvar cl-font-lock-built-in-mode nil "\ +Non-nil if Cl-Font-Lock-Built-In mode is enabled. +See the `cl-font-lock-built-in-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 `cl-font-lock-built-in-mode'.") + +(custom-autoload 'cl-font-lock-built-in-mode "cl-font-lock" nil) + +(autoload 'cl-font-lock-built-in-mode "cl-font-lock" "\ +Highlight built-in functions, variables, and types in `lisp-mode'. + +If called interactively, enable Cl-Font-Lock-Built-In mode if ARG is +positive, and disable it if ARG is zero or negative. If called from +Lisp, also enable the mode if ARG is omitted or nil, and toggle it if +ARG is `toggle'; disable the mode otherwise. + +\(fn &optional ARG)" t nil) + +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "cl-font-lock" '("cl-font-lock-"))) + ;;;*** ;;;### (autoloads nil "cl-generic" "emacs-lisp/cl-generic.el" (0 @@ -12751,6 +12779,13 @@ Interactively, prompt for LIBRARY using the one at or near point. \(fn LIBRARY)" t nil) +(autoload 'read-library-name "find-func" "\ +Read and return a library name, defaulting to the one near point. + +A library name is the filename of an Emacs Lisp library located +in a directory under `load-path' (or `find-function-source-path', +if non-nil)." nil nil) + (autoload 'find-library-other-window "find-func" "\ Find the Emacs Lisp source of LIBRARY in another window. @@ -12918,7 +12953,7 @@ Find directly the variable at point in the other window." t nil) (autoload 'find-function-setup-keys "find-func" "\ Define some key bindings for the find-function family of functions." nil nil) -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "find-func" '("find-" "read-library-name"))) +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "find-func" '("find-"))) ;;;*** @@ -15360,9 +15395,13 @@ arguments as NAME. DO is a function as defined in `gv-get'. \(fn SYMBOL NAME ARGS HANDLER &optional FIX)" nil nil) -(or (assq 'gv-expander defun-declarations-alist) (let ((x `(gv-expander ,(apply-partially #'gv--defun-declaration 'gv-expander)))) (push x macro-declarations-alist) (push x defun-declarations-alist))) +(defsubst gv--expander-defun-declaration (&rest args) (apply #'gv--defun-declaration 'gv-expander args)) + +(defsubst gv--setter-defun-declaration (&rest args) (apply #'gv--defun-declaration 'gv-setter args)) + +(or (assq 'gv-expander defun-declarations-alist) (let ((x (list 'gv-expander #'gv--expander-defun-declaration))) (push x macro-declarations-alist) (push x defun-declarations-alist))) -(or (assq 'gv-setter defun-declarations-alist) (push `(gv-setter ,(apply-partially #'gv--defun-declaration 'gv-setter)) defun-declarations-alist)) +(or (assq 'gv-setter defun-declarations-alist) (push (list 'gv-setter #'gv--setter-defun-declaration) defun-declarations-alist)) (autoload 'gv-define-setter "gv" "\ Define a setter method for generalized variable NAME. @@ -16100,6 +16139,9 @@ of text in those lines. Interactively, prompt for REGEXP using `read-regexp', then FACE. Use the global history list for FACE. +If REGEXP contains upper case characters (excluding those preceded by `\\') +and `search-upper-case' is non-nil, the matching is case-sensitive. + Use Font lock mode, if enabled, to highlight REGEXP. Otherwise, use overlays for highlighting. If overlays are used, the highlighting will not update as you type. @@ -16115,11 +16157,18 @@ Use the global history list for FACE. Limit face setting to the corresponding SUBEXP (interactively, the prefix argument) of REGEXP. If SUBEXP is omitted or nil, the entire REGEXP is highlighted. +LIGHTER is a human-readable string that can be used to select +a regexp to unhighlight by its name instead of selecting a possibly +complex regexp or closure. + +If REGEXP contains upper case characters (excluding those preceded by `\\') +and `search-upper-case' is non-nil, the matching is case-sensitive. + Use Font lock mode, if enabled, to highlight REGEXP. Otherwise, use overlays for highlighting. If overlays are used, the highlighting will not update as you type. -\(fn REGEXP &optional FACE SUBEXP)" t nil) +\(fn REGEXP &optional FACE SUBEXP LIGHTER)" t nil) (defalias 'highlight-phrase 'hi-lock-face-phrase-buffer) @@ -16128,9 +16177,9 @@ Set face of each match of phrase REGEXP to FACE. Interactively, prompt for REGEXP using `read-regexp', then FACE. Use the global history list for FACE. -When called interactively, replace whitespace in user-provided -regexp with arbitrary whitespace, and make initial lower-case -letters case-insensitive, before highlighting with `hi-lock-set-pattern'. +If REGEXP contains upper case characters (excluding those preceded by `\\') +and `search-upper-case' is non-nil, the matching is case-sensitive. +Also set `search-spaces-regexp' to the value of `search-whitespace-regexp'. Use Font lock mode, if enabled, to highlight REGEXP. Otherwise, use overlays for highlighting. If overlays are used, the @@ -16146,6 +16195,9 @@ Uses the next face from `hi-lock-face-defaults' without prompting, unless you use a prefix argument. Uses `find-tag-default-as-symbol-regexp' to retrieve the symbol at point. +If REGEXP contains upper case characters (excluding those preceded by `\\') +and `search-upper-case' is non-nil, the matching is case-sensitive. + This uses Font lock mode if it is enabled; otherwise it uses overlays, in which case the highlighting will not update as you type." t nil) @@ -18821,8 +18873,8 @@ Check comments and strings in the current buffer for spelling errors." t nil) Check the current buffer for spelling errors interactively." t nil) (autoload 'ispell-buffer-with-debug "ispell" "\ -`ispell-buffer' with some output sent to `ispell-debug-buffer' buffer. -If APPEND is non-n il, append the info to previous buffer if exists. +`ispell-buffer' with some output sent to `ispell-debug-buffer'. +If APPEND is non-nil, don't erase previous debugging output. \(fn &optional APPEND)" t nil) @@ -21853,7 +21905,7 @@ unless the display width of STR is equal to or less than the display width of ELLIPSIS. If it is non-nil and not a string, then ELLIPSIS defaults to `truncate-string-ellipsis'. -If ELLIPSIS-TEXT-PROPERTY in non-nil, a too-long string will not +If ELLIPSIS-TEXT-PROPERTY is non-nil, a too-long string will not be truncated, but instead the elided parts will be covered by a `display' text property showing the ellipsis. @@ -22162,6 +22214,10 @@ values: `ssl' -- Equivalent to `tls'. `shell' -- A shell connection. +:coding is a symbol or a cons used to specify the coding systems +used to decode and encode the data which the process reads and +writes. See `make-network-process' for details. + :return-list specifies this function's return value. If omitted or nil, return a process object. A non-nil means to return (PROC . PROPS), where PROC is a process object and PROPS @@ -30984,7 +31040,8 @@ as start and end positions), and with `string<' otherwise. \(fn REVERSE NEXTRECFUN ENDRECFUN &optional STARTKEYFUN ENDKEYFUN PREDICATE)" nil nil) (autoload 'sort-lines "sort" "\ -Sort lines in region alphabetically; argument means descending order. +Sort lines in region alphabetically; REVERSE non-nil means descending order. +Interactively, REVERSE is the prefix argument, and BEG and END are the region. Called from a program, there are three arguments: REVERSE (non-nil means reverse order), BEG and END (region to sort). The variable `sort-fold-case' determines whether alphabetic case affects @@ -32064,6 +32121,11 @@ The variable list SPEC is the same as in `if-let'. (function-put 'when-let 'lisp-indent-function '1) +(autoload 'string-truncate-left "subr-x" "\ +Truncate STRING to LENGTH, replacing initial surplus with \"...\". + +\(fn STRING LENGTH)" nil nil) + (if (fboundp 'register-definition-prefixes) (register-definition-prefixes "subr-x" '("and-let*" "hash-table-" "if-let" "internal--" "replace-region-contents" "string-" "thread-" "when-let*"))) ;;;*** @@ -34460,7 +34522,9 @@ You can call this function to add internal values in the trace buffer. (autoload 'trace-function-foreground "trace" "\ Trace calls to function FUNCTION. With a prefix argument, also prompt for the trace buffer (default -`trace-buffer'), and a Lisp expression CONTEXT. +`trace-buffer'), and a Lisp expression CONTEXT. When called from +Lisp, CONTEXT should be a function of no arguments which returns +a value to insert into BUFFER during the trace. Tracing a function causes every call to that function to insert into BUFFER Lisp-style trace messages that display the function's commit a4c07bc8c8201a620c4365c1d0d2cb814cc677a9 Author: Alan Mackenzie Date: Fri May 1 12:23:15 2020 +0000 Protect non-selected face spec components in custimize-face. Fixes bug #40866 * lisp/cus-edit.el (custom-face-save): If the current face widget is only displaying part of the face spec, temporarily set it to "display" the whole spec around the call to custom-face-mark-to-save. diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index d3d17fda7a..1ec2708550 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -3824,7 +3824,17 @@ Optional EVENT is the location for the menu." (defun custom-face-save (widget) "Save the face edited by WIDGET." - (custom-face-mark-to-save widget) + (let ((form (widget-get widget :custom-form))) + (if (memq form '(all lisp)) + (custom-face-mark-to-save widget) + ;; The user is working on only a selected terminal type; + ;; make sure we save the entire spec to `custom-file'. (Bug #40866) + (custom-face-edit-all widget) + (custom-face-mark-to-save widget) + (if (eq form 'selected) + (custom-face-edit-selected widget) + ;; `form' is edit or mismatch; can't happen. + (widget-put widget :custom-form form)))) (custom-save-all) (custom-face-state-set-and-redraw widget)) commit 43fded12d544ab68f493142debc5b3e437317f35 Author: João Távora Date: Sat Apr 18 02:46:04 2020 +0100 Add lisp-data-mode for editing non-code Lisp data Fixes: bug#40573 The new mode can be used stand-alone or inherited from by modes intended to edit programs. The existing emacs-lisp-mode and lisp-mode are examples. Thanks to Juri Linkov and Basil L. Contovounesios for researching some data files in Emacs that can be automatically set to use the new mode. * lisp/files.el (auto-mode-alist): Add entry for ".dir-locals" and ".dir-locals-2" * lisp/emacs-lisp/lisp-mode.el: (lisp-data-mode): New major mode. (lisp-mode): Inherit from lisp-data-mode. Set special lisp-mode stuff here. * lisp/progmodes/elisp-mode.el (emacs-lisp-mode): Inherit from lisp-data-mode. * lisp/bookmark.el (bookmark-insert-file-format-version-stamp): Use lisp-data-mode. * lisp/saveplace.el (save-place-alist-to-file): Use lisp-data-mode. * lisp/net/eww.el (eww-write-bookmarks): Use lisp-data-mode. * lisp/net/nsm.el (nsm-write-settings): Use lisp-data-mode. * lisp/net/tramp-cache.el (tramp-dump-connection-properties): Use lisp-data-mode. * etc/NEWS: Mention lisp-data-mode. * doc/lispref/modes.texi (Example Major Modes): Update example. diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index fc68ee1b32..eaee56f0a3 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi @@ -1352,19 +1352,11 @@ illustrate how these modes are written. @end smallexample The three modes for Lisp share much of their code. For instance, -each calls the following function to set various variables: - -@smallexample -@group -(defun lisp-mode-variables (&optional syntax keywords-case-insensitive elisp) - (when syntax - (set-syntax-table lisp-mode-syntax-table)) - @dots{} -@end group -@end smallexample +Lisp mode and Emacs Lisp mode inherit from Lisp Data mode and Lisp +Interaction Mode inherits from Emacs Lisp mode. @noindent -Amongst other things, this function sets up the @code{comment-start} +Amongst other things, Lisp Data mode sets up the @code{comment-start} variable to handle Lisp comments: @smallexample @@ -1414,7 +1406,7 @@ Finally, here is the major mode command for Lisp mode: @smallexample @group -(define-derived-mode lisp-mode prog-mode "Lisp" +(define-derived-mode lisp-mode lisp-data-mode "Lisp" "Major mode for editing Lisp code for Lisps other than GNU Emacs Lisp. Commands: Delete converts tabs to spaces as it moves back. @@ -1425,7 +1417,6 @@ Note that `run-lisp' may be used either to start an inferior Lisp job or to switch back to an existing one." @end group @group - (lisp-mode-variables nil t) (setq-local find-tag-default-function 'lisp-find-tag-default) (setq-local comment-start-skip "\\(\\(^\\|[^\\\n]\\)\\(\\\\\\\\\\)*\\)\\(;+\\|#|\\) *") diff --git a/etc/NEWS b/etc/NEWS index c4911726a8..8fc2311159 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -291,6 +291,12 @@ These new navigation commands are bound to 'n' and 'p' in * New Modes and Packages in Emacs 28.1 +*** Lisp Data mode +The new command 'lisp-data-mode' enables a major mode for buffers +composed of Lisp symbolic expressions that do not form a computer +program. The '.dir-locals.el' file is automatically set to use this +mode, as are other data files produced by Emacs. + * Incompatible Editing Changes in Emacs 28.1 diff --git a/lisp/bookmark.el b/lisp/bookmark.el index 720ad18c16..f2384973e9 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el @@ -734,8 +734,10 @@ CODING is the symbol of the coding-system in which the file is encoded." (if (memq (coding-system-base coding) '(undecided prefer-utf-8)) (setq coding 'utf-8-emacs)) (insert - (format ";;;; Emacs Bookmark Format Version %d ;;;; -*- coding: %S -*-\n" - bookmark-file-format-version (coding-system-base coding))) + (format + ";;;; Emacs Bookmark Format Version %d\ +;;;; -*- coding: %S mode: lisp-data -*-\n" + bookmark-file-format-version (coding-system-base coding))) (insert ";;; This format is meant to be slightly human-readable;\n" ";;; nevertheless, you probably don't want to edit it.\n" ";;; " diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 98c44161ad..7098a41f27 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -611,6 +611,8 @@ Value for `adaptive-fill-function'." ;; a single docstring. Let's fix it here. (if (looking-at "\\s-+\"[^\n\"]+\"\\s-*$") "")) +;; Maybe this should be discouraged/obsoleted and users should be +;; encouraged to use `lisp-data-mode` instead. (defun lisp-mode-variables (&optional lisp-syntax keywords-case-insensitive elisp) "Common initialization routine for lisp modes. @@ -658,6 +660,14 @@ font-lock keywords will not be case sensitive." (setq-local electric-pair-skip-whitespace 'chomp) (setq-local electric-pair-open-newline-between-pairs nil)) +;;;###autoload +(define-derived-mode lisp-data-mode prog-mode "Lisp-Data" + "Major mode for buffers holding data written in Lisp syntax." + :group 'lisp + (lisp-mode-variables t t nil) + (setq-local electric-quote-string t) + (setq imenu-case-fold-search nil)) + (defun lisp-outline-level () "Lisp mode `outline-level' function." (let ((len (- (match-end 0) (match-beginning 0)))) @@ -737,7 +747,7 @@ font-lock keywords will not be case sensitive." "Keymap for ordinary Lisp mode. All commands in `lisp-mode-shared-map' are inherited by this map.") -(define-derived-mode lisp-mode prog-mode "Lisp" +(define-derived-mode lisp-mode lisp-data-mode "Lisp" "Major mode for editing Lisp code for Lisps other than GNU Emacs Lisp. Commands: Delete converts tabs to spaces as it moves back. @@ -746,7 +756,6 @@ Blank lines separate paragraphs. Semicolons start comments. \\{lisp-mode-map} Note that `run-lisp' may be used either to start an inferior Lisp job or to switch back to an existing one." - (lisp-mode-variables nil t) (setq-local lisp-indent-function 'common-lisp-indent-function) (setq-local find-tag-default-function 'lisp-find-tag-default) (setq-local comment-start-skip diff --git a/lisp/files.el b/lisp/files.el index fa72e51c49..56d4679ad7 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -2657,6 +2657,13 @@ since only a single case-insensitive search through the alist is made." ("\\.ltx\\'" . latex-mode) ("\\.dtx\\'" . doctex-mode) ("\\.org\\'" . org-mode) + ;; .dir-locals.el is not really elisp. Could use the + ;; `dir-locals-file' constant if it weren't defined below. + ("\\.dir-locals\\(-2\\)?\\.el\\'" . lisp-data-mode) + ("eww-bookmarks\\'" . lisp-data-mode) + ("tramp\\'" . lisp-data-mode) + ("places\\'" . lisp-data-mode) + ("\\.emacs-places\\'" . lisp-data-mode) ("\\.el\\'" . emacs-lisp-mode) ("Project\\.ede\\'" . emacs-lisp-mode) ("\\.\\(scm\\|stk\\|ss\\|sch\\)\\'" . scheme-mode) diff --git a/lisp/net/eww.el b/lisp/net/eww.el index c83884fd25..a4544023f6 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -1733,7 +1733,7 @@ If CHARSET is nil then use UTF-8." (defun eww-write-bookmarks () (with-temp-file (expand-file-name "eww-bookmarks" eww-bookmarks-directory) - (insert ";; Auto-generated file; don't edit\n") + (insert ";; Auto-generated file; don't edit -*- mode: lisp-data -*-\n") (pp eww-bookmarks (current-buffer)))) (defun eww-read-bookmarks () diff --git a/lisp/net/nsm.el b/lisp/net/nsm.el index 2d36c5e257..cc22427e6d 100644 --- a/lisp/net/nsm.el +++ b/lisp/net/nsm.el @@ -964,6 +964,7 @@ protocol." (defun nsm-write-settings () (with-temp-file nsm-settings-file + (insert ";;;; -*- mode: lisp-data -*-\n") (insert "(\n") (dolist (setting nsm-permanent-host-settings) (insert " ") diff --git a/lisp/net/tramp-cache.el b/lisp/net/tramp-cache.el index 09e30f000f..6d87ce297b 100644 --- a/lisp/net/tramp-cache.el +++ b/lisp/net/tramp-cache.el @@ -472,7 +472,7 @@ used to cache connection properties of the local machine." ;; Dump it. (with-temp-file tramp-persistency-file-name (insert - ";; -*- emacs-lisp -*-" + ";; -*- lisp-data -*-" ;; `time-stamp-string' might not exist in all Emacs flavors. (condition-case nil (progn diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index f85fd771ca..b737134f90 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -250,7 +250,7 @@ Comments in the form will be lost." map)) ;;;###autoload -(define-derived-mode emacs-lisp-mode prog-mode +(define-derived-mode emacs-lisp-mode lisp-data-mode `("ELisp" (lexical-binding (:propertize "/l" help-echo "Using lexical-binding mode") @@ -268,35 +268,26 @@ Blank lines separate paragraphs. Semicolons start comments. \\{emacs-lisp-mode-map}" :group 'lisp (defvar project-vc-external-roots-function) - (lisp-mode-variables nil nil 'elisp) + (setcar font-lock-defaults + '(lisp-el-font-lock-keywords + lisp-el-font-lock-keywords-1 + lisp-el-font-lock-keywords-2)) + (setf (nth 2 font-lock-defaults) nil) (add-hook 'after-load-functions #'elisp--font-lock-flush-elisp-buffers) (if (boundp 'electric-pair-text-pairs) (setq-local electric-pair-text-pairs (append '((?\` . ?\') (?\‘ . ?\’)) electric-pair-text-pairs)) (add-hook 'electric-pair-mode-hook #'emacs-lisp-set-electric-text-pairs)) - (setq-local electric-quote-string t) - (setq imenu-case-fold-search nil) (add-hook 'eldoc-documentation-functions #'elisp-eldoc-documentation-function nil t) (add-hook 'xref-backend-functions #'elisp--xref-backend nil t) (setq-local project-vc-external-roots-function #'elisp-load-path-roots) (add-hook 'completion-at-point-functions #'elisp-completion-at-point nil 'local) - ;; .dir-locals.el and lock files will cause the byte-compiler and - ;; checkdoc emit spurious warnings, because they don't follow the - ;; conventions of Emacs Lisp sources. Until we have a better fix, - ;; like teaching elisp-mode about files that only hold data - ;; structures, we disable the ELisp Flymake backend for these files. - (unless - (let* ((bfname (buffer-file-name)) - (fname (and (stringp bfname) (file-name-nondirectory bfname)))) - (and (stringp fname) - (or (string-match "\\`\\.#" fname) - (string-equal dir-locals-file fname)))) - (add-hook 'flymake-diagnostic-functions #'elisp-flymake-checkdoc nil t) - (add-hook 'flymake-diagnostic-functions - #'elisp-flymake-byte-compile nil t))) + (add-hook 'flymake-diagnostic-functions #'elisp-flymake-checkdoc nil t) + (add-hook 'flymake-diagnostic-functions + #'elisp-flymake-byte-compile nil t)) ;; Font-locking support. diff --git a/lisp/saveplace.el b/lisp/saveplace.el index fa0e181bb1..f78639db24 100644 --- a/lisp/saveplace.el +++ b/lisp/saveplace.el @@ -248,7 +248,7 @@ may have changed) back to `save-place-alist'." (delete-region (point-min) (point-max)) (when save-place-forget-unreadable-files (save-place-forget-unreadable-files)) - (insert (format ";;; -*- coding: %s -*-\n" + (insert (format ";;; -*- coding: %s mode: lisp-data -*-\n" (symbol-name coding-system-for-write))) (let ((print-length nil) (print-level nil)) commit 7fa3e754cb7af37b0c50f253e7dec2acd0275a8a Author: Stefan Kangas Date: Fri May 1 13:02:38 2020 +0200 Use lexical-binding in most remaining tests * test/lisp/comint-tests.el: * test/lisp/custom-resources/custom--test-theme.el: * test/lisp/dabbrev-tests.el: * test/lisp/emulation/viper-tests.el: * test/lisp/erc/erc-track-tests.el: * test/lisp/gnus/gnus-tests.el: * test/lisp/imenu-tests.el: * test/lisp/info-xref-tests.el: * test/lisp/jit-lock-tests.el: * test/lisp/json-tests.el: * test/lisp/man-tests.el: * test/lisp/replace-tests.el: * test/lisp/shadowfile-tests.el: * test/lisp/subr-tests.el: * test/lisp/thingatpt-tests.el: * test/lisp/xml-tests.el: Use lexical-binding. * test/lisp/man-tests.el (man-tests-filter-strings): * test/lisp/shadowfile-tests.el (shadow-test00-clusters) (shadow-test01-sites, shadow-test06-literal-groups) (shadow-test07-regexp-groups, shadow-test09-shadow-copy-files): Silence byte-compiler. diff --git a/test/lisp/comint-tests.el b/test/lisp/comint-tests.el index 9c27a92d2b..132fe875f7 100644 --- a/test/lisp/comint-tests.el +++ b/test/lisp/comint-tests.el @@ -1,4 +1,4 @@ -;;; comint-testsuite.el +;;; comint-tests.el -*- lexical-binding:t -*- ;; Copyright (C) 2010-2020 Free Software Foundation, Inc. diff --git a/test/lisp/custom-resources/custom--test-theme.el b/test/lisp/custom-resources/custom--test-theme.el index da9121e0a0..4ced98a50b 100644 --- a/test/lisp/custom-resources/custom--test-theme.el +++ b/test/lisp/custom-resources/custom--test-theme.el @@ -1,3 +1,5 @@ +;;; custom--test-theme.el -- A test theme. -*- lexical-binding:t -*- + (deftheme custom--test "A test theme.") diff --git a/test/lisp/dabbrev-tests.el b/test/lisp/dabbrev-tests.el index 0a2f67e91c..06c5c0655a 100644 --- a/test/lisp/dabbrev-tests.el +++ b/test/lisp/dabbrev-tests.el @@ -1,4 +1,4 @@ -;;; dabbrev-tests.el --- Test suite for dabbrev. +;;; dabbrev-tests.el --- Test suite for dabbrev. -*- lexical-binding:t -*- ;; Copyright (C) 2016-2020 Free Software Foundation, Inc. diff --git a/test/lisp/emulation/viper-tests.el b/test/lisp/emulation/viper-tests.el index 33f85e5125..b981938fe1 100644 --- a/test/lisp/emulation/viper-tests.el +++ b/test/lisp/emulation/viper-tests.el @@ -1,4 +1,4 @@ -;;; viper-tests.el --- tests for viper. +;;; viper-tests.el --- tests for viper. -*- lexical-binding:t -*- ;; Copyright (C) 2016-2020 Free Software Foundation, Inc. diff --git a/test/lisp/erc/erc-track-tests.el b/test/lisp/erc/erc-track-tests.el index b0ed4bbcb6..7e924c2234 100644 --- a/test/lisp/erc/erc-track-tests.el +++ b/test/lisp/erc/erc-track-tests.el @@ -1,4 +1,4 @@ -;;; erc-track-tests.el --- Tests for erc-track. +;;; erc-track-tests.el --- Tests for erc-track. -*- lexical-binding:t -*- ;; Copyright (C) 2016-2020 Free Software Foundation, Inc. diff --git a/test/lisp/gnus/gnus-tests.el b/test/lisp/gnus/gnus-tests.el index d18b3fbed0..fb1b204f04 100644 --- a/test/lisp/gnus/gnus-tests.el +++ b/test/lisp/gnus/gnus-tests.el @@ -1,4 +1,4 @@ -;;; gnus-tests.el --- Wrapper for the Gnus tests +;;; gnus-tests.el --- Wrapper for the Gnus tests -*- lexical-binding:t -*- ;; Copyright (C) 2011-2020 Free Software Foundation, Inc. diff --git a/test/lisp/imenu-tests.el b/test/lisp/imenu-tests.el index 684a856fe0..5dbeb882e0 100644 --- a/test/lisp/imenu-tests.el +++ b/test/lisp/imenu-tests.el @@ -1,4 +1,4 @@ -;;; imenu-tests.el --- Test suite for imenu. +;;; imenu-tests.el --- Test suite for imenu. -*- lexical-binding:t -*- ;; Copyright (C) 2013-2020 Free Software Foundation, Inc. diff --git a/test/lisp/info-xref-tests.el b/test/lisp/info-xref-tests.el index 128b3f25ca..940aa7d8ad 100644 --- a/test/lisp/info-xref-tests.el +++ b/test/lisp/info-xref-tests.el @@ -1,4 +1,4 @@ -;;; info-xref.el --- tests for info-xref.el +;;; info-xref.el --- tests for info-xref.el -*- lexical-binding:t -*- ;; Copyright (C) 2013-2020 Free Software Foundation, Inc. diff --git a/test/lisp/jit-lock-tests.el b/test/lisp/jit-lock-tests.el index 445716c14b..dfa74cf35e 100644 --- a/test/lisp/jit-lock-tests.el +++ b/test/lisp/jit-lock-tests.el @@ -1,4 +1,4 @@ -;;; jit-lock-tests.el --- tests for jit-lock +;;; jit-lock-tests.el --- tests for jit-lock -*- lexical-binding:t -*- ;; Copyright (C) 2016-2020 Free Software Foundation, Inc. diff --git a/test/lisp/json-tests.el b/test/lisp/json-tests.el index 05837e83f9..ac9706a8ae 100644 --- a/test/lisp/json-tests.el +++ b/test/lisp/json-tests.el @@ -1,4 +1,4 @@ -;;; json-tests.el --- Test suite for json.el +;;; json-tests.el --- Test suite for json.el -*- lexical-binding:t -*- ;; Copyright (C) 2015-2020 Free Software Foundation, Inc. diff --git a/test/lisp/man-tests.el b/test/lisp/man-tests.el index fba4d748ce..8267d8e4f6 100644 --- a/test/lisp/man-tests.el +++ b/test/lisp/man-tests.el @@ -1,4 +1,4 @@ -;;; man-tests.el --- Test suite for man. +;;; man-tests.el --- Test suite for man. -*- lexical-binding:t -*- ;; Copyright (C) 2013-2020 Free Software Foundation, Inc. @@ -114,7 +114,7 @@ in the cdr of the element.") (dolist (test man-tests-parse-man-k-tests) (should (man-tests-parse-man-k-test-case test)))) -(defun man-tests-filter-strings (buffer strings) +(defun man-tests-filter-strings (_buffer strings) "Run `Man-bgproc-filter' on each of STRINGS. The formatted result will be inserted into BUFFER." (let ((proc (start-process "dummy man-tests proc" (current-buffer) "cat"))) diff --git a/test/lisp/replace-tests.el b/test/lisp/replace-tests.el index af765fbe3f..f5cff92d54 100644 --- a/test/lisp/replace-tests.el +++ b/test/lisp/replace-tests.el @@ -1,4 +1,4 @@ -;;; replace-tests.el --- tests for replace.el. +;;; replace-tests.el --- tests for replace.el. -*- lexical-binding:t -*- ;; Copyright (C) 2010-2020 Free Software Foundation, Inc. diff --git a/test/lisp/shadowfile-tests.el b/test/lisp/shadowfile-tests.el index ed23e06474..03c62de1fd 100644 --- a/test/lisp/shadowfile-tests.el +++ b/test/lisp/shadowfile-tests.el @@ -1,4 +1,4 @@ -;;; shadowfile-tests.el --- Tests of shadowfile +;;; shadowfile-tests.el --- Tests of shadowfile -*- lexical-binding:t -*- ;; Copyright (C) 2018-2020 Free Software Foundation, Inc. @@ -138,9 +138,9 @@ guaranteed by the originator of a cluster definition." ;; We must mock `read-from-minibuffer' and `read-string', in ;; order to avoid interactive arguments. (cl-letf* (((symbol-function #'read-from-minibuffer) - (lambda (&rest args) (pop mocked-input))) + (lambda (&rest _args) (pop mocked-input))) ((symbol-function #'read-string) - (lambda (&rest args) (pop mocked-input)))) + (lambda (&rest _args) (pop mocked-input)))) ;; Cleanup & initialize. (shadow--tests-cleanup) @@ -255,9 +255,9 @@ guaranteed by the originator of a cluster definition." ;; We must mock `read-from-minibuffer' and `read-string', in ;; order to avoid interactive arguments. (cl-letf* (((symbol-function #'read-from-minibuffer) - (lambda (&rest args) (pop mocked-input))) + (lambda (&rest _args) (pop mocked-input))) ((symbol-function #'read-string) - (lambda (&rest args) (pop mocked-input)))) + (lambda (&rest _args) (pop mocked-input)))) ;; Cleanup & initialize. (shadow--tests-cleanup) @@ -608,9 +608,9 @@ guaranteed by the originator of a cluster definition." ;; We must mock `read-from-minibuffer' and `read-string', in ;; order to avoid interactive arguments. (cl-letf* (((symbol-function #'read-from-minibuffer) - (lambda (&rest args) (pop mocked-input))) + (lambda (&rest _args) (pop mocked-input))) ((symbol-function #'read-string) - (lambda (&rest args) (pop mocked-input)))) + (lambda (&rest _args) (pop mocked-input)))) ;; Cleanup & initialize. (shadow--tests-cleanup) @@ -669,9 +669,9 @@ guaranteed by the originator of a cluster definition." ;; We must mock `read-from-minibuffer' and `read-string', in ;; order to avoid interactive arguments. (cl-letf* (((symbol-function #'read-from-minibuffer) - (lambda (&rest args) (pop mocked-input))) + (lambda (&rest _args) (pop mocked-input))) ((symbol-function #'read-string) - (lambda (&rest args) (pop mocked-input)))) + (lambda (&rest _args) (pop mocked-input)))) ;; Cleanup & initialize. (shadow--tests-cleanup) @@ -923,7 +923,7 @@ guaranteed by the originator of a cluster definition." ;; action. (add-function :before (symbol-function #'write-region) - (lambda (&rest args) + (lambda (&rest _args) (when (and (buffer-file-name) mocked-input) (should (equal (buffer-file-name) (pop mocked-input))))) '((name . "write-region-mock"))) diff --git a/test/lisp/subr-tests.el b/test/lisp/subr-tests.el index a583d57d2e..e2761a96f8 100644 --- a/test/lisp/subr-tests.el +++ b/test/lisp/subr-tests.el @@ -1,4 +1,4 @@ -;;; subr-tests.el --- Tests for subr.el +;;; subr-tests.el --- Tests for subr.el -*- lexical-binding:t -*- ;; Copyright (C) 2015-2020 Free Software Foundation, Inc. diff --git a/test/lisp/thingatpt-tests.el b/test/lisp/thingatpt-tests.el index 4edf75edba..f02aeaeef6 100644 --- a/test/lisp/thingatpt-tests.el +++ b/test/lisp/thingatpt-tests.el @@ -1,4 +1,4 @@ -;;; thingatpt.el --- tests for thing-at-point. +;;; thingatpt.el --- tests for thing-at-point. -*- lexical-binding:t -*- ;; Copyright (C) 2013-2020 Free Software Foundation, Inc. diff --git a/test/lisp/xml-tests.el b/test/lisp/xml-tests.el index 895b68f79a..57e685cd34 100644 --- a/test/lisp/xml-tests.el +++ b/test/lisp/xml-tests.el @@ -1,4 +1,4 @@ -;;; xml-parse-tests.el --- Test suite for XML parsing. +;;; xml-parse-tests.el --- Test suite for XML parsing. -*- lexical-binding:t -*- ;; Copyright (C) 2012-2020 Free Software Foundation, Inc.