diff options
| author | Glenn Morris | 2019-12-25 07:50:19 -0800 |
|---|---|---|
| committer | Glenn Morris | 2019-12-25 07:50:19 -0800 |
| commit | 43d97f17b812f0e847f64717c57fc4ca48b4ef31 (patch) | |
| tree | 901b26877ee1c270edcd5578f5b447e669c55d28 | |
| parent | b766a9d0a8e31d00b27b1033390b3e71d9e6c8bf (diff) | |
| parent | 91c16acbe2436a77b3841a455378149a3c807375 (diff) | |
| download | emacs-43d97f17b812f0e847f64717c57fc4ca48b4ef31.tar.gz emacs-43d97f17b812f0e847f64717c57fc4ca48b4ef31.zip | |
Merge from origin/emacs-27
91c16acbe2 (origin/emacs-27) Improve doc string of 'files--message'
c3be58a8f5 (emacs-27) Improve vc--add-line, vc--remove-regexp
9ea9ac9a61 Apply the 'xref-group' property properly
| -rw-r--r-- | lisp/files.el | 6 | ||||
| -rw-r--r-- | lisp/progmodes/xref.el | 2 | ||||
| -rw-r--r-- | lisp/vc/vc.el | 20 |
3 files changed, 15 insertions, 13 deletions
diff --git a/lisp/files.el b/lisp/files.el index 503f7fca72a..059fdbbe371 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -2166,9 +2166,9 @@ If that fails, try to open it with `find-file-literally' | |||
| 2166 | (* total-free-memory 1024))))))))) | 2166 | (* total-free-memory 1024))))))))) |
| 2167 | 2167 | ||
| 2168 | (defun files--message (format &rest args) | 2168 | (defun files--message (format &rest args) |
| 2169 | "Like `message', except sometimes don't print to minibuffer. | 2169 | "Like `message', except sometimes don't show the message text. |
| 2170 | If the variable `save-silently' is non-nil, the message is not | 2170 | If the variable `save-silently' is non-nil, the message will not |
| 2171 | displayed on the minibuffer." | 2171 | be visible in the echo area." |
| 2172 | (apply #'message format args) | 2172 | (apply #'message format args) |
| 2173 | (when save-silently (message nil))) | 2173 | (when save-silently (message nil))) |
| 2174 | 2174 | ||
diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index 8d8e7ab208e..13a1600594f 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el | |||
| @@ -814,7 +814,7 @@ GROUP is a string for decoration purposes and XREF is an | |||
| 814 | for line-format = (and max-line-width | 814 | for line-format = (and max-line-width |
| 815 | (format "%%%dd: " max-line-width)) | 815 | (format "%%%dd: " max-line-width)) |
| 816 | do | 816 | do |
| 817 | (xref--insert-propertized '(face xref-file-header 'xref-group t) | 817 | (xref--insert-propertized '(face xref-file-header xref-group t) |
| 818 | group "\n") | 818 | group "\n") |
| 819 | (cl-loop for (xref . more2) on xrefs do | 819 | (cl-loop for (xref . more2) on xrefs do |
| 820 | (with-slots (summary location) xref | 820 | (with-slots (summary location) xref |
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 132278e8230..c5584188b31 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el | |||
| @@ -1460,20 +1460,22 @@ Argument BACKEND is the backend you are using." | |||
| 1460 | ;; Subroutine for `vc-git-ignore' and `vc-hg-ignore'. | 1460 | ;; Subroutine for `vc-git-ignore' and `vc-hg-ignore'. |
| 1461 | (defun vc--add-line (string file) | 1461 | (defun vc--add-line (string file) |
| 1462 | "Add STRING as a line to FILE." | 1462 | "Add STRING as a line to FILE." |
| 1463 | (with-temp-buffer | 1463 | (with-current-buffer (find-file-noselect file) |
| 1464 | (insert-file-contents file) | 1464 | (goto-char (point-min)) |
| 1465 | (unless (re-search-forward (concat "^" (regexp-quote string) "$") nil t) | 1465 | (unless (re-search-forward (concat "^" (regexp-quote string) "$") nil t) |
| 1466 | (goto-char (point-max)) | 1466 | (goto-char (point-max)) |
| 1467 | (insert (concat "\n" string)) | 1467 | (unless (bolp) (insert "\n")) |
| 1468 | (write-region (point-min) (point-max) file)))) | 1468 | (insert string "\n") |
| 1469 | (save-buffer)))) | ||
| 1469 | 1470 | ||
| 1470 | (defun vc--remove-regexp (regexp file) | 1471 | (defun vc--remove-regexp (regexp file) |
| 1471 | "Remove all matching for REGEXP in FILE." | 1472 | "Remove all matching for REGEXP in FILE." |
| 1472 | (with-temp-buffer | 1473 | (if (file-exists-p file) |
| 1473 | (insert-file-contents file) | 1474 | (with-current-buffer (find-file-noselect file) |
| 1474 | (while (re-search-forward regexp nil t) | 1475 | (goto-char (point-min)) |
| 1475 | (replace-match "")) | 1476 | (while (re-search-forward regexp nil t) |
| 1476 | (write-region (point-min) (point-max) file))) | 1477 | (replace-match "")) |
| 1478 | (save-buffer)))) | ||
| 1477 | 1479 | ||
| 1478 | (defun vc-checkout (file &optional rev) | 1480 | (defun vc-checkout (file &optional rev) |
| 1479 | "Retrieve a copy of the revision REV of FILE. | 1481 | "Retrieve a copy of the revision REV of FILE. |