+++
** New system for displaying documentation for groups of functions.
This can either be used by saying 'M-x shortdoc-display-group' and
-choosing a group, or clicking a button in the *Help* buffers when
+choosing a group, or clicking a button in the "*Help*" buffers when
looking at the doc string of a function that belongs to one of these
groups.
freenode IRC network for years now. Occurrences of "irc.freenode.net"
have been replaced with "chat.freenode.net" throughout Emacs.
++++
+** New functions 'null-device' and 'path-separator'.
+These functions return the connection local value of the respective
+variables. This can be used for remote hosts.
+
\f
* Editing Changes in Emacs 28.1
When a warning is displayed to the user, the resulting buffer now has
buttons which allow making permanent changes to the treatment of that
warning. Automatic showing of the warning can be disabled (although
-it is still logged to the *Messages* buffer), or the warning can be
+it is still logged to the "*Messages*" buffer), or the warning can be
disabled entirely.
** mspool.el
** Gnus
+++
-*** New gnus-search library
+*** New gnus-search library.
A new unified search syntax which can be used across multiple
supported search engines. Set 'gnus-search-use-parsed-queries' to
non-nil to enable.
+++
-*** New value for user option 'smiley-style'
+*** New value for user option 'smiley-style'.
Smileys can now be rendered with emojis instead of small images when
using the new 'emoji' value in 'smiley-style'.
*** Most customize commands now hide obsolete user options.
Obsolete user options are no longer shown in the listings produced by
-the commands `customize', `customize-group', `customize-apropos' and
-`customize-changed-options'.
+the commands 'customize', 'customize-group', 'customize-apropos' and
+'customize-changed-options'.
-To customize obsolete user options, use `customize-option' or
-`customize-saved'.
+To customize obsolete user options, use 'customize-option' or
+'customize-saved'.
** Edebug
Control source file display by 'gdb-display-source-buffer-action'.
+++
-*** The default value of gdb-mi-decode-strings is now t.
+*** The default value of 'gdb-mi-decode-strings' is now t.
This means that the default coding-system is now used to decode strings
and source file names from GDB.
** xref
---
-*** Prefix arg of 'xref-goto-xref' quits the *xref* buffer.
-So typing 'C-u RET' in the *xref* buffer quits its window
+*** Prefix arg of 'xref-goto-xref' quits the "*xref*" buffer.
+So typing 'C-u RET' in the "*xref*" buffer quits its window
before navigating to the selected location.
** json.el
---
*** New user option 'compilation-search-all-directories'.
When doing parallel builds, directories and compilation errors may
-arrive in the *compilation* buffer out-of-order. If this variable is
+arrive in the "*compilation*" buffer out-of-order. If this variable is
non-nil (the default), Emacs will now search backwards in the buffer
for any directory the file with errors may be in. If nil, this won't
be done (and this restores how this previously worked).
--
** On macOS, 's-<left>' and 's-<right>' are now bound to
-'move-beginning-of-line' and 'move-end-of-line' respectively. The commands
+'move-beginning-of-line' and 'move-end-of-line' respectively. The commands
to select previous/next frame are still bound to 's-~' and 's-`'.
\f
:help "Kill the currently running grep process"))
(define-key map [menu-bar grep compilation-separator2] '("----"))
(define-key map [menu-bar grep compilation-compile]
- '(menu-item "Compile..." compile
- :help "Compile the program including the current buffer. Default: run `make'"))
+ '(menu-item
+ "Compile..." compile
+ :help
+ "Compile the program including the current buffer. Default: run `make'"))
(define-key map [menu-bar grep compilation-rgrep]
'(menu-item "Recursive grep..." rgrep
:help "User-friendly recursive grep in directory tree"))
'(menu-item "Grep via Find..." grep-find
:help "Run grep via find, with user-specified args"))
(define-key map [menu-bar grep compilation-grep]
- '(menu-item "Another grep..." grep
- :help "Run grep, with user-specified args, and collect output in a buffer."))
+ '(menu-item
+ "Another grep..." grep
+ :help
+ "Run grep, with user-specified args, and collect output in a buffer."))
(define-key map [menu-bar grep compilation-recompile]
'(menu-item "Repeat grep" recompile
:help "Run grep again"))
(define-key map [menu-bar grep compilation-separator1] '("----"))
(define-key map [menu-bar grep compilation-first-error]
- '(menu-item "First Match" first-error
- :help "Restart at the first match, visit corresponding location"))
+ '(menu-item
+ "First Match" first-error
+ :help "Restart at the first match, visit corresponding location"))
(define-key map [menu-bar grep compilation-previous-error]
'(menu-item "Previous Match" previous-error
:help "Visit the previous match and corresponding location"))
(when grep-highlight-matches
(let* ((beg (match-end 0))
(end (save-excursion (goto-char beg) (line-end-position)))
- (mbeg (text-property-any beg end 'font-lock-face grep-match-face)))
+ (mbeg
+ (text-property-any beg end 'font-lock-face grep-match-face)))
(when mbeg
(- mbeg beg)))))
.
(when grep-highlight-matches
(let* ((beg (match-end 0))
(end (save-excursion (goto-char beg) (line-end-position)))
- (mbeg (text-property-any beg end 'font-lock-face grep-match-face))
- (mend (and mbeg (next-single-property-change mbeg 'font-lock-face nil end))))
+ (mbeg
+ (text-property-any beg end 'font-lock-face grep-match-face))
+ (mend
+ (and mbeg (next-single-property-change
+ mbeg 'font-lock-face nil end))))
(when mend
(- mend beg))))))
nil nil
(error nil))
(or result 0))))
+(defun grep-hello-file ()
+ (let ((result
+ (if (file-remote-p default-directory)
+ (make-temp-file (file-name-as-directory (temporary-file-directory)))
+ (expand-file-name "HELLO" data-directory))))
+ (when (file-remote-p result)
+ (write-region "Copyright\n" nil result))
+ result))
+
;;;###autoload
(defun grep-compute-defaults ()
"Compute the defaults for the `grep' command.
(unless (or (not grep-use-null-device) (eq grep-use-null-device t))
(setq grep-use-null-device
(with-temp-buffer
- (let ((hello-file (expand-file-name "HELLO" data-directory)))
- (not
- (and (if grep-command
- ;; `grep-command' is already set, so
- ;; use that for testing.
- (grep-probe grep-command
- `(nil t nil "^Copyright" ,hello-file)
- #'call-process-shell-command)
- ;; otherwise use `grep-program'
- (grep-probe grep-program
- `(nil t nil "-nH" "^Copyright" ,hello-file)))
- (progn
- (goto-char (point-min))
- (looking-at
- (concat (regexp-quote hello-file)
- ":[0-9]+:Copyright")))))))))
+ (let ((hello-file (grep-hello-file)))
+ (prog1
+ (not
+ (and (if grep-command
+ ;; `grep-command' is already set, so
+ ;; use that for testing.
+ (grep-probe
+ grep-command
+ `(nil t nil "^Copyright"
+ ,(file-local-name hello-file))
+ #'process-file-shell-command)
+ ;; otherwise use `grep-program'
+ (grep-probe
+ grep-program
+ `(nil t nil "-nH" "^Copyright"
+ ,(file-local-name hello-file))))
+ (progn
+ (goto-char (point-min))
+ (looking-at
+ (concat (regexp-quote (file-local-name hello-file))
+ ":[0-9]+:Copyright")))))
+ (when (file-remote-p hello-file) (delete-file hello-file)))))))
(when (eq grep-use-null-filename-separator 'auto-detect)
(setq grep-use-null-filename-separator
(with-temp-buffer
- (let* ((hello-file (expand-file-name "HELLO" data-directory))
- (args `("--null" "-ne" "^Copyright" ,hello-file)))
+ (let* ((hello-file (grep-hello-file))
+ (args `("--null" "-ne" "^Copyright"
+ ,(file-local-name hello-file))))
(if grep-use-null-device
- (setq args (append args (list null-device)))
+ (setq args (append args (list (null-device))))
(push "-H" args))
- (and (grep-probe grep-program `(nil t nil ,@args))
- (progn
- (goto-char (point-min))
- (looking-at
- (concat (regexp-quote hello-file)
- "\0[0-9]+:Copyright"))))))))
+ (prog1
+ (and (grep-probe grep-program `(nil t nil ,@args))
+ (progn
+ (goto-char (point-min))
+ (looking-at
+ (concat (regexp-quote (file-local-name hello-file))
+ "\0[0-9]+:Copyright"))))
+ (when (file-remote-p hello-file) (delete-file hello-file)))))))
(when (eq grep-highlight-matches 'auto-detect)
(setq grep-highlight-matches
(concat (if grep-use-null-device "-n" "-nH")
(if grep-use-null-filename-separator " --null")
(when (grep-probe grep-program
- `(nil nil nil "-e" "foo" ,null-device)
+ `(nil nil nil "-e" "foo" ,(null-device))
nil 1)
" -e"))))
(unless grep-command
(format "%s %s %s " grep-program
(or
(and grep-highlight-matches
- (grep-probe grep-program
- `(nil nil nil "--color" "x" ,null-device)
- nil 1)
+ (grep-probe
+ grep-program
+ `(nil nil nil "--color" "x" ,(null-device))
+ nil 1)
(if (eq grep-highlight-matches 'always)
"--color=always" "--color"))
"")
- grep-options)))
+ grep-options)))
(unless grep-template
(setq grep-template
(format "%s <X> <C> %s <R> <F>" grep-program grep-options)))
(setq grep-find-use-xargs
(cond
((grep-probe find-program
- `(nil nil nil ,null-device "-exec" "echo"
+ `(nil nil nil ,(null-device) "-exec" "echo"
"{}" "+"))
'exec-plus)
((and
- (grep-probe find-program `(nil nil nil ,null-device "-print0"))
+ (grep-probe
+ find-program `(nil nil nil ,(null-device) "-print0"))
(grep-probe xargs-program '(nil nil nil "-0" "echo")))
'gnu)
(t
(let ((cmd0 (format "%s . -type f -exec %s"
find-program grep-command))
(null (if grep-use-null-device
- (format "%s " null-device)
+ (format "%s " (null-device))
"")))
(cons
(if (eq grep-find-use-xargs 'exec-plus)
(format "%s %s%s +" cmd0 null quot-braces)
- (format "%s %s %s%s" cmd0 quot-braces null quot-scolon))
+ (format "%s %s %s%s"
+ cmd0 quot-braces null quot-scolon))
(1+ (length cmd0)))))
(t
(format "%s . -type f -print | \"%s\" %s"
(let ((gcmd (format "%s <C> %s <R>"
grep-program grep-options))
(null (if grep-use-null-device
- (format "%s " null-device)
+ (format "%s " (null-device))
"")))
(cond ((eq grep-find-use-xargs 'gnu)
(format "%s <D> <X> -type f <F> -print0 | \"%s\" -0 %s"
(let ((tag-default (shell-quote-argument (grep-tag-default)))
;; This a regexp to match single shell arguments.
;; Could someone please add comments explaining it?
- (sh-arg-re "\\(\\(?:\"\\(?:[^\"]\\|\\\\\"\\)+\"\\|'[^']+'\\|[^\"' \t\n]\\)+\\)")
+ (sh-arg-re
+ "\\(\\(?:\"\\(?:[^\"]\\|\\\\\"\\)+\"\\|'[^']+'\\|[^\"' \t\n]\\)+\\)")
(grep-default (or (car grep-history) grep-command)))
;; In the default command, find the arg that specifies the pattern.
(when (or (string-match
(grep--save-buffers)
;; Setting process-setup-function makes exit-message-function work
;; even when async processes aren't supported.
- (compilation-start (if (and grep-use-null-device null-device)
- (concat command-args " " null-device)
+ (compilation-start (if (and grep-use-null-device null-device (null-device))
+ (concat command-args " " (null-device))
command-args)
#'grep-mode))
'(("<C>" . (mapconcat #'identity opts " "))
("<D>" . (or dir "."))
("<F>" . files)
- ("<N>" . null-device)
+ ("<N>" . (null-device))
("<X>" . excl)
("<R>" . (shell-quote-argument (or regexp ""))))
"List of substitutions performed by `grep-expand-template'.
#'read-file-name-internal
nil nil nil 'grep-files-history
(delete-dups
- (delq nil (append (list default default-alias default-extension)
- (mapcar #'car grep-files-aliases)))))))
+ (delq nil
+ (append (list default default-alias default-extension)
+ (mapcar #'car grep-files-aliases)))))))
(and files
(or (cdr (assoc files grep-files-aliases))
files))))
(if (string= command grep-command)
(setq command nil))
(setq dir (file-name-as-directory (expand-file-name dir)))
- (unless (or (not grep-use-directories-skip) (eq grep-use-directories-skip t))
+ (unless (or (not grep-use-directories-skip)
+ (eq grep-use-directories-skip t))
(setq grep-use-directories-skip
(grep-probe grep-program
`(nil nil nil "--directories=skip" "foo"
- ,null-device)
+ ,(null-device))
nil 1)))
(setq command (grep-expand-template
grep-template
;; Setting process-setup-function makes exit-message-function work
;; even when async processes aren't supported.
(grep--save-buffers)
- (compilation-start (if (and grep-use-null-device null-device)
- (concat command " " null-device)
- command)
- 'grep-mode))
+ (compilation-start
+ (if (and grep-use-null-device null-device (null-device))
+ (concat command " " (null-device))
+ command)
+ 'grep-mode))
;; Set default-directory if we started lgrep in the *grep* buffer.
(if (eq next-error-last-buffer (current-buffer))
(setq default-directory dir))))))