diff options
| author | Tim Landscheidt | 2024-03-12 00:21:06 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2024-03-14 12:40:26 +0200 |
| commit | 6d1c1fca0aa7c5a1ff0254af3f89a34d5309ea0d (patch) | |
| tree | 080f8471734648e1815544049d57176453fa4566 /lisp | |
| parent | 3807f380b3334205bfcbba88003ff96507c86fc4 (diff) | |
| download | emacs-6d1c1fca0aa7c5a1ff0254af3f89a34d5309ea0d.tar.gz emacs-6d1c1fca0aa7c5a1ff0254af3f89a34d5309ea0d.zip | |
; Simplify (with-current-buffer (get-buffer ...) ...)
There's no need to call 'get-buffer', since 'with-current-buffer'
does that internally.
* lisp/calendar/todo-mode.el (todo-merge-category):
* lisp/comint.el (comint-dynamic-list-completions):
* lisp/emacs-lisp/checkdoc.el (checkdoc-error):
* lisp/emacs-lisp/debug.el (debug, debugger-record-expression):
* lisp/emacs-lisp/eieio-opt.el (eieio-browse):
* lisp/emacs-lisp/re-builder.el (reb-restart-font-lock):
* lisp/erc/erc-dcc.el (erc-dcc-do-LIST-command):
* lisp/eshell/em-unix.el (eshell-poor-mans-grep):
* lisp/gnus/gnus-group.el (gnus-add-mark):
* lisp/net/eww.el (eww-next-bookmark, eww-previous-bookmark):
* lisp/net/sieve.el (sieve-upload):
* lisp/net/tramp-cmds.el (tramp-cleanup-some-buffers):
* lisp/obsolete/quickurl.el (quickurl-list-populate-buffer):
* lisp/org/ob-calc.el: (org-babel-execute:calc):
* lisp/org/org-agenda.el (org-agenda-use-sticky-p):
* lisp/pcomplete.el (pcomplete-show-completions):
* lisp/progmodes/bug-reference.el
(bug-reference--try-setup-gnus-article):
* lisp/progmodes/idlw-help.el
(idlwave-highlight-linked-completions):
* lisp/progmodes/verilog-mode.el (verilog-preprocess):
* lisp/replace.el (occur-1):
* lisp/term.el (term-dynamic-list-completions):
* lisp/time.el (world-clock-update):
* lisp/url/url-cache.el (url-store-in-cache):
* lisp/vc/vc-cvs.el (vc-cvs-merge, vc-cvs-merge-news):
* lisp/vc/vc-rcs.el (vc-rcs-system-release):
* lisp/vc/vc-svn.el (vc-svn-merge, vc-svn-merge-news):
* test/lisp/calendar/icalendar-tests.el
(icalendar-tests--get-error-string-for-export):
* test/lisp/erc/erc-dcc-tests.el
(pcomplete/erc-mode/DCC--get-1flag)
(pcomplete/erc-mode/DCC--get-2flags)
(pcomplete/erc-mode/DCC--get-2flags-reverse):
* test/lisp/erc/erc-networks-tests.el
(erc-networks--rename-server-buffer--existing--noreuse):
* test/lisp/erc/erc-scenarios-services-misc.el
(erc-scenarios-services-misc--reconnect-retry-nick):
* test/lisp/erc/erc-tests.el (erc--refresh-prompt):
Replace (with-current-buffer (get-buffer ...) ...) with
(with-current-buffer ...).
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/calendar/todo-mode.el | 8 | ||||
| -rw-r--r-- | lisp/comint.el | 2 | ||||
| -rw-r--r-- | lisp/emacs-lisp/checkdoc.el | 2 | ||||
| -rw-r--r-- | lisp/emacs-lisp/debug.el | 4 | ||||
| -rw-r--r-- | lisp/emacs-lisp/eieio-opt.el | 2 | ||||
| -rw-r--r-- | lisp/emacs-lisp/re-builder.el | 2 | ||||
| -rw-r--r-- | lisp/erc/erc-dcc.el | 2 | ||||
| -rw-r--r-- | lisp/eshell/em-unix.el | 2 | ||||
| -rw-r--r-- | lisp/gnus/gnus-group.el | 2 | ||||
| -rw-r--r-- | lisp/net/eww.el | 4 | ||||
| -rw-r--r-- | lisp/net/sieve.el | 2 | ||||
| -rw-r--r-- | lisp/net/tramp-cmds.el | 2 | ||||
| -rw-r--r-- | lisp/obsolete/quickurl.el | 2 | ||||
| -rw-r--r-- | lisp/org/ob-calc.el | 2 | ||||
| -rw-r--r-- | lisp/org/org-agenda.el | 2 | ||||
| -rw-r--r-- | lisp/pcomplete.el | 2 | ||||
| -rw-r--r-- | lisp/progmodes/bug-reference.el | 2 | ||||
| -rw-r--r-- | lisp/progmodes/idlw-help.el | 2 | ||||
| -rw-r--r-- | lisp/progmodes/verilog-mode.el | 2 | ||||
| -rw-r--r-- | lisp/replace.el | 2 | ||||
| -rw-r--r-- | lisp/term.el | 2 | ||||
| -rw-r--r-- | lisp/time.el | 2 | ||||
| -rw-r--r-- | lisp/url/url-cache.el | 2 | ||||
| -rw-r--r-- | lisp/vc/vc-cvs.el | 4 | ||||
| -rw-r--r-- | lisp/vc/vc-rcs.el | 2 | ||||
| -rw-r--r-- | lisp/vc/vc-svn.el | 4 |
26 files changed, 33 insertions, 33 deletions
diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el index f2ee94ec8f7..12287299a7f 100644 --- a/lisp/calendar/todo-mode.el +++ b/lisp/calendar/todo-mode.el | |||
| @@ -1612,7 +1612,7 @@ archive file and the source category is deleted." | |||
| 1612 | (garchive (concat (file-name-sans-extension gfile) ".toda")) | 1612 | (garchive (concat (file-name-sans-extension gfile) ".toda")) |
| 1613 | (archived-count (todo-get-count 'archived)) | 1613 | (archived-count (todo-get-count 'archived)) |
| 1614 | here) | 1614 | here) |
| 1615 | (with-current-buffer (get-buffer (find-file-noselect tfile)) | 1615 | (with-current-buffer (find-file-noselect tfile) |
| 1616 | (widen) | 1616 | (widen) |
| 1617 | (let* ((inhibit-read-only t) | 1617 | (let* ((inhibit-read-only t) |
| 1618 | (cbeg (progn | 1618 | (cbeg (progn |
| @@ -1638,7 +1638,7 @@ archive file and the source category is deleted." | |||
| 1638 | (todo-count (todo-get-count 'todo cat)) | 1638 | (todo-count (todo-get-count 'todo cat)) |
| 1639 | (done-count (todo-get-count 'done cat))) | 1639 | (done-count (todo-get-count 'done cat))) |
| 1640 | ;; Merge into goal todo category. | 1640 | ;; Merge into goal todo category. |
| 1641 | (with-current-buffer (get-buffer (find-file-noselect gfile)) | 1641 | (with-current-buffer (find-file-noselect gfile) |
| 1642 | (unless (derived-mode-p 'todo-mode) (todo-mode)) | 1642 | (unless (derived-mode-p 'todo-mode) (todo-mode)) |
| 1643 | (widen) | 1643 | (widen) |
| 1644 | (goto-char (point-min)) | 1644 | (goto-char (point-min)) |
| @@ -1677,7 +1677,7 @@ archive file and the source category is deleted." | |||
| 1677 | (mapc (lambda (m) (set-marker m nil)) | 1677 | (mapc (lambda (m) (set-marker m nil)) |
| 1678 | (list cbeg tbeg dbeg tend cend)))) | 1678 | (list cbeg tbeg dbeg tend cend)))) |
| 1679 | (when (> archived-count 0) | 1679 | (when (> archived-count 0) |
| 1680 | (with-current-buffer (get-buffer (find-file-noselect tarchive)) | 1680 | (with-current-buffer (find-file-noselect tarchive) |
| 1681 | (widen) | 1681 | (widen) |
| 1682 | (goto-char (point-min)) | 1682 | (goto-char (point-min)) |
| 1683 | (let* ((inhibit-read-only t) | 1683 | (let* ((inhibit-read-only t) |
| @@ -1697,7 +1697,7 @@ archive file and the source category is deleted." | |||
| 1697 | (forward-line) | 1697 | (forward-line) |
| 1698 | (buffer-substring-no-properties (point) cend)))) | 1698 | (buffer-substring-no-properties (point) cend)))) |
| 1699 | ;; Merge into goal archive category, if it exists, else create it. | 1699 | ;; Merge into goal archive category, if it exists, else create it. |
| 1700 | (with-current-buffer (get-buffer (find-file-noselect garchive)) | 1700 | (with-current-buffer (find-file-noselect garchive) |
| 1701 | (let ((gbeg (when (re-search-forward | 1701 | (let ((gbeg (when (re-search-forward |
| 1702 | (concat "^" (regexp-quote | 1702 | (concat "^" (regexp-quote |
| 1703 | (concat todo-category-beg goal)) | 1703 | (concat todo-category-beg goal)) |
diff --git a/lisp/comint.el b/lisp/comint.el index 655ff30469c..a8fe095e99c 100644 --- a/lisp/comint.el +++ b/lisp/comint.el | |||
| @@ -3510,7 +3510,7 @@ the completions." | |||
| 3510 | 3510 | ||
| 3511 | ;; Read the next key, to process SPC. | 3511 | ;; Read the next key, to process SPC. |
| 3512 | (let (key first) | 3512 | (let (key first) |
| 3513 | (if (with-current-buffer (get-buffer "*Completions*") | 3513 | (if (with-current-buffer "*Completions*" |
| 3514 | (setq-local comint-displayed-dynamic-completions | 3514 | (setq-local comint-displayed-dynamic-completions |
| 3515 | completions) | 3515 | completions) |
| 3516 | (setq key (read-key-sequence nil) | 3516 | (setq key (read-key-sequence nil) |
diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index 02c11cae573..c22dfb2eb26 100644 --- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el | |||
| @@ -2794,7 +2794,7 @@ function called to create the messages." | |||
| 2794 | ": " msg))) | 2794 | ": " msg))) |
| 2795 | (if (string= checkdoc-diagnostic-buffer "*warn*") | 2795 | (if (string= checkdoc-diagnostic-buffer "*warn*") |
| 2796 | (warn (apply #'concat text)) | 2796 | (warn (apply #'concat text)) |
| 2797 | (with-current-buffer (get-buffer checkdoc-diagnostic-buffer) | 2797 | (with-current-buffer checkdoc-diagnostic-buffer |
| 2798 | (let ((inhibit-read-only t) | 2798 | (let ((inhibit-read-only t) |
| 2799 | (pt (point-max))) | 2799 | (pt (point-max))) |
| 2800 | (goto-char pt) | 2800 | (goto-char pt) |
diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index 506b73f6fa2..60d14d11970 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el | |||
| @@ -200,7 +200,7 @@ the debugger will not be entered." | |||
| 200 | (let (debugger-value | 200 | (let (debugger-value |
| 201 | (debugger-previous-state | 201 | (debugger-previous-state |
| 202 | (if (get-buffer "*Backtrace*") | 202 | (if (get-buffer "*Backtrace*") |
| 203 | (with-current-buffer (get-buffer "*Backtrace*") | 203 | (with-current-buffer "*Backtrace*" |
| 204 | (debugger--save-buffer-state)))) | 204 | (debugger--save-buffer-state)))) |
| 205 | (debugger-args args) | 205 | (debugger-args args) |
| 206 | (debugger-buffer (get-buffer-create "*Backtrace*")) | 206 | (debugger-buffer (get-buffer-create "*Backtrace*")) |
| @@ -651,7 +651,7 @@ Complete list of commands: | |||
| 651 | (princ (debugger-eval-expression exp)) | 651 | (princ (debugger-eval-expression exp)) |
| 652 | (terpri)) | 652 | (terpri)) |
| 653 | 653 | ||
| 654 | (with-current-buffer (get-buffer debugger-record-buffer) | 654 | (with-current-buffer debugger-record-buffer |
| 655 | (message "%s" | 655 | (message "%s" |
| 656 | (buffer-substring (line-beginning-position 0) | 656 | (buffer-substring (line-beginning-position 0) |
| 657 | (line-end-position 0))))) | 657 | (line-end-position 0))))) |
diff --git a/lisp/emacs-lisp/eieio-opt.el b/lisp/emacs-lisp/eieio-opt.el index 893f8cd7e7f..bf6be1690e4 100644 --- a/lisp/emacs-lisp/eieio-opt.el +++ b/lisp/emacs-lisp/eieio-opt.el | |||
| @@ -50,7 +50,7 @@ variable `eieio-default-superclass'." | |||
| 50 | (if (not root-class) (setq root-class 'eieio-default-superclass)) | 50 | (if (not root-class) (setq root-class 'eieio-default-superclass)) |
| 51 | (cl-check-type root-class class) | 51 | (cl-check-type root-class class) |
| 52 | (display-buffer (get-buffer-create "*EIEIO OBJECT BROWSE*") t) | 52 | (display-buffer (get-buffer-create "*EIEIO OBJECT BROWSE*") t) |
| 53 | (with-current-buffer (get-buffer "*EIEIO OBJECT BROWSE*") | 53 | (with-current-buffer "*EIEIO OBJECT BROWSE*" |
| 54 | (erase-buffer) | 54 | (erase-buffer) |
| 55 | (goto-char 0) | 55 | (goto-char 0) |
| 56 | (eieio-browse-tree root-class "" "") | 56 | (eieio-browse-tree root-class "" "") |
diff --git a/lisp/emacs-lisp/re-builder.el b/lisp/emacs-lisp/re-builder.el index 0a47cca0231..c5307f70d08 100644 --- a/lisp/emacs-lisp/re-builder.el +++ b/lisp/emacs-lisp/re-builder.el | |||
| @@ -825,7 +825,7 @@ If SUBEXP is non-nil mark only the corresponding sub-expressions." | |||
| 825 | 825 | ||
| 826 | (defun reb-restart-font-lock () | 826 | (defun reb-restart-font-lock () |
| 827 | "Restart `font-lock-mode' to fit current regexp format." | 827 | "Restart `font-lock-mode' to fit current regexp format." |
| 828 | (with-current-buffer (get-buffer reb-buffer) | 828 | (with-current-buffer reb-buffer |
| 829 | (let ((font-lock-is-on font-lock-mode)) | 829 | (let ((font-lock-is-on font-lock-mode)) |
| 830 | (font-lock-mode -1) | 830 | (font-lock-mode -1) |
| 831 | (kill-local-variable 'font-lock-set-defaults) | 831 | (kill-local-variable 'font-lock-set-defaults) |
diff --git a/lisp/erc/erc-dcc.el b/lisp/erc/erc-dcc.el index 522973a0156..b8e16df755b 100644 --- a/lisp/erc/erc-dcc.el +++ b/lisp/erc/erc-dcc.el | |||
| @@ -619,7 +619,7 @@ It lists the current state of `erc-dcc-list' in an easy to read manner." | |||
| 619 | (buffer-live-p (get-buffer (plist-get elt :file))) | 619 | (buffer-live-p (get-buffer (plist-get elt :file))) |
| 620 | (plist-member elt :size)) | 620 | (plist-member elt :size)) |
| 621 | (let ((byte-count (with-current-buffer | 621 | (let ((byte-count (with-current-buffer |
| 622 | (get-buffer (plist-get elt :file)) | 622 | (plist-get elt :file) |
| 623 | (+ (buffer-size) 0.0 | 623 | (+ (buffer-size) 0.0 |
| 624 | erc-dcc-byte-count)))) | 624 | erc-dcc-byte-count)))) |
| 625 | (format " (%d%%)" | 625 | (format " (%d%%)" |
diff --git a/lisp/eshell/em-unix.el b/lisp/eshell/em-unix.el index 23028576f45..751f13cc715 100644 --- a/lisp/eshell/em-unix.el +++ b/lisp/eshell/em-unix.el | |||
| @@ -789,7 +789,7 @@ available..." | |||
| 789 | (ignore-errors | 789 | (ignore-errors |
| 790 | (occur (car args)))) | 790 | (occur (car args)))) |
| 791 | (if (get-buffer "*Occur*") | 791 | (if (get-buffer "*Occur*") |
| 792 | (with-current-buffer (get-buffer "*Occur*") | 792 | (with-current-buffer "*Occur*" |
| 793 | (setq string (buffer-string)) | 793 | (setq string (buffer-string)) |
| 794 | (kill-buffer (current-buffer))))) | 794 | (kill-buffer (current-buffer))))) |
| 795 | (if string (insert string)) | 795 | (if string (insert string)) |
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index d562d052d82..71bfaa639fa 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el | |||
| @@ -4638,7 +4638,7 @@ and the second element is the address." | |||
| 4638 | "Mark ARTICLE in GROUP with MARK, whether the group is displayed or not." | 4638 | "Mark ARTICLE in GROUP with MARK, whether the group is displayed or not." |
| 4639 | (let ((buffer (gnus-summary-buffer-name group))) | 4639 | (let ((buffer (gnus-summary-buffer-name group))) |
| 4640 | (if (gnus-buffer-live-p buffer) | 4640 | (if (gnus-buffer-live-p buffer) |
| 4641 | (with-current-buffer (get-buffer buffer) | 4641 | (with-current-buffer buffer |
| 4642 | (gnus-summary-add-mark article mark)) | 4642 | (gnus-summary-add-mark article mark)) |
| 4643 | (gnus-add-marked-articles group (cdr (assq mark gnus-article-mark-lists)) | 4643 | (gnus-add-marked-articles group (cdr (assq mark gnus-article-mark-lists)) |
| 4644 | (list article))))) | 4644 | (list article))))) |
diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 2936bc8f099..54847bdf396 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el | |||
| @@ -2267,7 +2267,7 @@ If ERROR-OUT, signal user-error if there are no bookmarks." | |||
| 2267 | (setq first t) | 2267 | (setq first t) |
| 2268 | (eww-read-bookmarks t) | 2268 | (eww-read-bookmarks t) |
| 2269 | (eww-bookmark-prepare)) | 2269 | (eww-bookmark-prepare)) |
| 2270 | (with-current-buffer (get-buffer "*eww bookmarks*") | 2270 | (with-current-buffer "*eww bookmarks*" |
| 2271 | (when (and (not first) | 2271 | (when (and (not first) |
| 2272 | (not (eobp))) | 2272 | (not (eobp))) |
| 2273 | (forward-line 1)) | 2273 | (forward-line 1)) |
| @@ -2286,7 +2286,7 @@ If ERROR-OUT, signal user-error if there are no bookmarks." | |||
| 2286 | (setq first t) | 2286 | (setq first t) |
| 2287 | (eww-read-bookmarks t) | 2287 | (eww-read-bookmarks t) |
| 2288 | (eww-bookmark-prepare)) | 2288 | (eww-bookmark-prepare)) |
| 2289 | (with-current-buffer (get-buffer "*eww bookmarks*") | 2289 | (with-current-buffer "*eww bookmarks*" |
| 2290 | (if first | 2290 | (if first |
| 2291 | (goto-char (point-max)) | 2291 | (goto-char (point-max)) |
| 2292 | (beginning-of-line)) | 2292 | (beginning-of-line)) |
diff --git a/lisp/net/sieve.el b/lisp/net/sieve.el index fddc6e21bcc..a6ba556e7ae 100644 --- a/lisp/net/sieve.el +++ b/lisp/net/sieve.el | |||
| @@ -354,7 +354,7 @@ Used to bracket operations which move point in the sieve-buffer." | |||
| 354 | (let ((script (buffer-string)) | 354 | (let ((script (buffer-string)) |
| 355 | (script-name (file-name-sans-extension (buffer-name))) | 355 | (script-name (file-name-sans-extension (buffer-name))) |
| 356 | err) | 356 | err) |
| 357 | (with-current-buffer (get-buffer sieve-buffer) | 357 | (with-current-buffer sieve-buffer |
| 358 | (setq err (sieve-manage-putscript | 358 | (setq err (sieve-manage-putscript |
| 359 | (or name sieve-buffer-script-name script-name) | 359 | (or name sieve-buffer-script-name script-name) |
| 360 | script sieve-manage-buffer)) | 360 | script sieve-manage-buffer)) |
diff --git a/lisp/net/tramp-cmds.el b/lisp/net/tramp-cmds.el index a545a8e7273..d3af7a009ec 100644 --- a/lisp/net/tramp-cmds.el +++ b/lisp/net/tramp-cmds.el | |||
| @@ -281,7 +281,7 @@ non-nil." | |||
| 281 | ;; Remove all buffers with a remote default-directory which fit the hook. | 281 | ;; Remove all buffers with a remote default-directory which fit the hook. |
| 282 | (dolist (name (tramp-list-remote-buffers)) | 282 | (dolist (name (tramp-list-remote-buffers)) |
| 283 | (and (buffer-live-p (get-buffer name)) | 283 | (and (buffer-live-p (get-buffer name)) |
| 284 | (with-current-buffer (get-buffer name) | 284 | (with-current-buffer name |
| 285 | (run-hook-with-args-until-success 'tramp-cleanup-some-buffers-hook)) | 285 | (run-hook-with-args-until-success 'tramp-cleanup-some-buffers-hook)) |
| 286 | (kill-buffer name)))) | 286 | (kill-buffer name)))) |
| 287 | 287 | ||
diff --git a/lisp/obsolete/quickurl.el b/lisp/obsolete/quickurl.el index 7393bebdce1..7da51a8a4a8 100644 --- a/lisp/obsolete/quickurl.el +++ b/lisp/obsolete/quickurl.el | |||
| @@ -447,7 +447,7 @@ The key bindings for `quickurl-list-mode' are: | |||
| 447 | 447 | ||
| 448 | (defun quickurl-list-populate-buffer () | 448 | (defun quickurl-list-populate-buffer () |
| 449 | "Populate the `quickurl-list' buffer." | 449 | "Populate the `quickurl-list' buffer." |
| 450 | (with-current-buffer (get-buffer quickurl-list-buffer-name) | 450 | (with-current-buffer quickurl-list-buffer-name |
| 451 | (let* ((sizes (or (cl-loop for url in quickurl-urls | 451 | (let* ((sizes (or (cl-loop for url in quickurl-urls |
| 452 | collect (length (quickurl-url-description url))) | 452 | collect (length (quickurl-url-description url))) |
| 453 | (list 20))) | 453 | (list 20))) |
diff --git a/lisp/org/ob-calc.el b/lisp/org/ob-calc.el index d335aab7499..f834f05cb6d 100644 --- a/lisp/org/ob-calc.el +++ b/lisp/org/ob-calc.el | |||
| @@ -93,7 +93,7 @@ | |||
| 93 | (mapcar #'org-trim | 93 | (mapcar #'org-trim |
| 94 | (split-string (org-babel-expand-body:calc body params) "[\n\r]")))) | 94 | (split-string (org-babel-expand-body:calc body params) "[\n\r]")))) |
| 95 | (save-excursion | 95 | (save-excursion |
| 96 | (with-current-buffer (get-buffer "*Calculator*") | 96 | (with-current-buffer "*Calculator*" |
| 97 | (prog1 | 97 | (prog1 |
| 98 | (calc-eval (calc-top 1)) | 98 | (calc-eval (calc-top 1)) |
| 99 | (calc-pop 1))))) | 99 | (calc-pop 1))))) |
diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el index f8195a053bc..06249ed48fa 100644 --- a/lisp/org/org-agenda.el +++ b/lisp/org/org-agenda.el | |||
| @@ -3883,7 +3883,7 @@ generating a new one." | |||
| 3883 | ;; buffer found | 3883 | ;; buffer found |
| 3884 | (get-buffer org-agenda-buffer-name) | 3884 | (get-buffer org-agenda-buffer-name) |
| 3885 | ;; C-u parameter is same as last call | 3885 | ;; C-u parameter is same as last call |
| 3886 | (with-current-buffer (get-buffer org-agenda-buffer-name) | 3886 | (with-current-buffer org-agenda-buffer-name |
| 3887 | (and | 3887 | (and |
| 3888 | (equal current-prefix-arg | 3888 | (equal current-prefix-arg |
| 3889 | org-agenda-last-prefix-arg) | 3889 | org-agenda-last-prefix-arg) |
diff --git a/lisp/pcomplete.el b/lisp/pcomplete.el index 196c5f159cd..0b34712a50c 100644 --- a/lisp/pcomplete.el +++ b/lisp/pcomplete.el | |||
| @@ -1140,7 +1140,7 @@ Typing SPC flushes the help buffer." | |||
| 1140 | (let (event) | 1140 | (let (event) |
| 1141 | (prog1 | 1141 | (prog1 |
| 1142 | (catch 'done | 1142 | (catch 'done |
| 1143 | (while (with-current-buffer (get-buffer "*Completions*") | 1143 | (while (with-current-buffer "*Completions*" |
| 1144 | (setq event (read-event))) | 1144 | (setq event (read-event))) |
| 1145 | (cond | 1145 | (cond |
| 1146 | ((eq event ?\s) | 1146 | ((eq event ?\s) |
diff --git a/lisp/progmodes/bug-reference.el b/lisp/progmodes/bug-reference.el index 29ff521253b..977a3d72cb7 100644 --- a/lisp/progmodes/bug-reference.el +++ b/lisp/progmodes/bug-reference.el | |||
| @@ -493,7 +493,7 @@ and set it if applicable." | |||
| 493 | ;; the values of the From, To, and Cc headers. | 493 | ;; the values of the From, To, and Cc headers. |
| 494 | (let (header-values) | 494 | (let (header-values) |
| 495 | (with-current-buffer | 495 | (with-current-buffer |
| 496 | (get-buffer gnus-original-article-buffer) | 496 | gnus-original-article-buffer |
| 497 | (save-excursion | 497 | (save-excursion |
| 498 | (goto-char (point-min)) | 498 | (goto-char (point-min)) |
| 499 | ;; The Newsgroup is omitted because we already matched | 499 | ;; The Newsgroup is omitted because we already matched |
diff --git a/lisp/progmodes/idlw-help.el b/lisp/progmodes/idlw-help.el index 217b2ab6691..7bed69a738b 100644 --- a/lisp/progmodes/idlw-help.el +++ b/lisp/progmodes/idlw-help.el | |||
| @@ -631,7 +631,7 @@ Needs additional info stored in global `idlwave-completion-help-info'." | |||
| 631 | Those words in `idlwave-completion-help-links' have links. The | 631 | Those words in `idlwave-completion-help-links' have links. The |
| 632 | `idlwave-help-link' face is used for this." | 632 | `idlwave-help-link' face is used for this." |
| 633 | (if idlwave-highlight-help-links-in-completion | 633 | (if idlwave-highlight-help-links-in-completion |
| 634 | (with-current-buffer (get-buffer "*Completions*") | 634 | (with-current-buffer "*Completions*" |
| 635 | (save-excursion | 635 | (save-excursion |
| 636 | (let* ((case-fold-search t) | 636 | (let* ((case-fold-search t) |
| 637 | (props (list 'face 'idlwave-help-link)) | 637 | (props (list 'face 'idlwave-help-link)) |
diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el index 7af78f2229a..a83bad0e8ed 100644 --- a/lisp/progmodes/verilog-mode.el +++ b/lisp/progmodes/verilog-mode.el | |||
| @@ -5803,7 +5803,7 @@ FILENAME to find directory to run in, or defaults to `buffer-file-name'." | |||
| 5803 | (dir (file-name-directory (or filename buffer-file-name))) | 5803 | (dir (file-name-directory (or filename buffer-file-name))) |
| 5804 | (cmd (concat "cd " dir "; " command))) | 5804 | (cmd (concat "cd " dir "; " command))) |
| 5805 | (with-output-to-temp-buffer "*Verilog-Preprocessed*" | 5805 | (with-output-to-temp-buffer "*Verilog-Preprocessed*" |
| 5806 | (with-current-buffer (get-buffer "*Verilog-Preprocessed*") | 5806 | (with-current-buffer "*Verilog-Preprocessed*" |
| 5807 | (insert (concat "// " cmd "\n")) | 5807 | (insert (concat "// " cmd "\n")) |
| 5808 | (call-process shell-file-name nil t nil shell-command-switch cmd) | 5808 | (call-process shell-file-name nil t nil shell-command-switch cmd) |
| 5809 | (verilog-mode) | 5809 | (verilog-mode) |
diff --git a/lisp/replace.el b/lisp/replace.el index 49e7c85c487..01a892bbba7 100644 --- a/lisp/replace.el +++ b/lisp/replace.el | |||
| @@ -1931,7 +1931,7 @@ See also `multi-occur'." | |||
| 1931 | (lambda (boo) | 1931 | (lambda (boo) |
| 1932 | (buffer-name (if (overlayp boo) (overlay-buffer boo) boo))) | 1932 | (buffer-name (if (overlayp boo) (overlay-buffer boo) boo))) |
| 1933 | active-bufs)) | 1933 | active-bufs)) |
| 1934 | (with-current-buffer (get-buffer buf-name) | 1934 | (with-current-buffer buf-name |
| 1935 | (rename-uniquely))) | 1935 | (rename-uniquely))) |
| 1936 | 1936 | ||
| 1937 | ;; Now find or create the output buffer. | 1937 | ;; Now find or create the output buffer. |
diff --git a/lisp/term.el b/lisp/term.el index 2ce0c2b5e79..3a0ecc041ca 100644 --- a/lisp/term.el +++ b/lisp/term.el | |||
| @@ -4342,7 +4342,7 @@ Typing SPC flushes the help buffer." | |||
| 4342 | (display-completion-list (sort completions 'string-lessp))) | 4342 | (display-completion-list (sort completions 'string-lessp))) |
| 4343 | (message "Hit space to flush") | 4343 | (message "Hit space to flush") |
| 4344 | (let (key first) | 4344 | (let (key first) |
| 4345 | (if (with-current-buffer (get-buffer "*Completions*") | 4345 | (if (with-current-buffer "*Completions*" |
| 4346 | (setq key (read-key-sequence nil) | 4346 | (setq key (read-key-sequence nil) |
| 4347 | first (aref key 0)) | 4347 | first (aref key 0)) |
| 4348 | (and (consp first) | 4348 | (and (consp first) |
diff --git a/lisp/time.el b/lisp/time.el index 9b932e945ba..a8d3ab9c813 100644 --- a/lisp/time.el +++ b/lisp/time.el | |||
| @@ -611,7 +611,7 @@ To turn off the world time display, go to the window and type \\[quit-window]." | |||
| 611 | (defun world-clock-update (&optional _arg _noconfirm) | 611 | (defun world-clock-update (&optional _arg _noconfirm) |
| 612 | "Update the `world-clock' buffer." | 612 | "Update the `world-clock' buffer." |
| 613 | (if (get-buffer world-clock-buffer-name) | 613 | (if (get-buffer world-clock-buffer-name) |
| 614 | (with-current-buffer (get-buffer world-clock-buffer-name) | 614 | (with-current-buffer world-clock-buffer-name |
| 615 | (let ((op (point))) | 615 | (let ((op (point))) |
| 616 | (world-clock-display (time--display-world-list)) | 616 | (world-clock-display (time--display-world-list)) |
| 617 | (goto-char op))) | 617 | (goto-char op))) |
diff --git a/lisp/url/url-cache.el b/lisp/url/url-cache.el index 0d27321cc47..ce6de2b3ee4 100644 --- a/lisp/url/url-cache.el +++ b/lisp/url/url-cache.el | |||
| @@ -70,7 +70,7 @@ FILE can be created or overwritten." | |||
| 70 | ;;;###autoload | 70 | ;;;###autoload |
| 71 | (defun url-store-in-cache (&optional buff) | 71 | (defun url-store-in-cache (&optional buff) |
| 72 | "Store buffer BUFF in the cache." | 72 | "Store buffer BUFF in the cache." |
| 73 | (with-current-buffer (get-buffer (or buff (current-buffer))) | 73 | (with-current-buffer (or buff (current-buffer)) |
| 74 | (let ((fname (url-cache-create-filename (url-view-url t)))) | 74 | (let ((fname (url-cache-create-filename (url-view-url t)))) |
| 75 | (if (url-cache-prepare fname) | 75 | (if (url-cache-prepare fname) |
| 76 | (let ((coding-system-for-write 'binary)) | 76 | (let ((coding-system-for-write 'binary)) |
diff --git a/lisp/vc/vc-cvs.el b/lisp/vc/vc-cvs.el index 52039f8da74..63b566b0afe 100644 --- a/lisp/vc/vc-cvs.el +++ b/lisp/vc/vc-cvs.el | |||
| @@ -476,7 +476,7 @@ The changes are between FIRST-REVISION and SECOND-REVISION." | |||
| 476 | (concat "-j" first-revision) | 476 | (concat "-j" first-revision) |
| 477 | (concat "-j" second-revision)) | 477 | (concat "-j" second-revision)) |
| 478 | (vc-file-setprop file 'vc-state 'edited) | 478 | (vc-file-setprop file 'vc-state 'edited) |
| 479 | (with-current-buffer (get-buffer "*vc*") | 479 | (with-current-buffer "*vc*" |
| 480 | (goto-char (point-min)) | 480 | (goto-char (point-min)) |
| 481 | (if (re-search-forward "conflicts during merge" nil t) | 481 | (if (re-search-forward "conflicts during merge" nil t) |
| 482 | (progn | 482 | (progn |
| @@ -495,7 +495,7 @@ The changes are between FIRST-REVISION and SECOND-REVISION." | |||
| 495 | (vc-cvs-command nil nil file "update") | 495 | (vc-cvs-command nil nil file "update") |
| 496 | ;; Analyze the merge result reported by CVS, and set | 496 | ;; Analyze the merge result reported by CVS, and set |
| 497 | ;; file properties accordingly. | 497 | ;; file properties accordingly. |
| 498 | (with-current-buffer (get-buffer "*vc*") | 498 | (with-current-buffer "*vc*" |
| 499 | (goto-char (point-min)) | 499 | (goto-char (point-min)) |
| 500 | ;; get new working revision | 500 | ;; get new working revision |
| 501 | (if (re-search-forward | 501 | (if (re-search-forward |
diff --git a/lisp/vc/vc-rcs.el b/lisp/vc/vc-rcs.el index 1a43b440d18..33377ce1cc8 100644 --- a/lisp/vc/vc-rcs.el +++ b/lisp/vc/vc-rcs.el | |||
| @@ -1177,7 +1177,7 @@ variable `vc-rcs-release' is set to the returned value." | |||
| 1177 | (or vc-rcs-release | 1177 | (or vc-rcs-release |
| 1178 | (setq vc-rcs-release | 1178 | (setq vc-rcs-release |
| 1179 | (or (and (zerop (vc-do-command "*vc*" nil "rcs" nil "-V")) | 1179 | (or (and (zerop (vc-do-command "*vc*" nil "rcs" nil "-V")) |
| 1180 | (with-current-buffer (get-buffer "*vc*") | 1180 | (with-current-buffer "*vc*" |
| 1181 | (vc-parse-buffer "^RCS version \\([0-9.]+ *.*\\)" 1))) | 1181 | (vc-parse-buffer "^RCS version \\([0-9.]+ *.*\\)" 1))) |
| 1182 | 'unknown)))) | 1182 | 'unknown)))) |
| 1183 | 1183 | ||
diff --git a/lisp/vc/vc-svn.el b/lisp/vc/vc-svn.el index 96baa642b44..ae281e54519 100644 --- a/lisp/vc/vc-svn.el +++ b/lisp/vc/vc-svn.el | |||
| @@ -436,7 +436,7 @@ The changes are between FIRST-VERSION and SECOND-VERSION." | |||
| 436 | (concat first-version ":" second-version) | 436 | (concat first-version ":" second-version) |
| 437 | first-version)) | 437 | first-version)) |
| 438 | (vc-file-setprop file 'vc-state 'edited) | 438 | (vc-file-setprop file 'vc-state 'edited) |
| 439 | (with-current-buffer (get-buffer "*vc*") | 439 | (with-current-buffer "*vc*" |
| 440 | (goto-char (point-min)) | 440 | (goto-char (point-min)) |
| 441 | (if (looking-at "C ") | 441 | (if (looking-at "C ") |
| 442 | 1 ; signal conflict | 442 | 1 ; signal conflict |
| @@ -450,7 +450,7 @@ The changes are between FIRST-VERSION and SECOND-VERSION." | |||
| 450 | (vc-svn-command nil 0 file "update") | 450 | (vc-svn-command nil 0 file "update") |
| 451 | ;; Analyze the merge result reported by SVN, and set | 451 | ;; Analyze the merge result reported by SVN, and set |
| 452 | ;; file properties accordingly. | 452 | ;; file properties accordingly. |
| 453 | (with-current-buffer (get-buffer "*vc*") | 453 | (with-current-buffer "*vc*" |
| 454 | (goto-char (point-min)) | 454 | (goto-char (point-min)) |
| 455 | ;; get new working revision | 455 | ;; get new working revision |
| 456 | (if (re-search-forward | 456 | (if (re-search-forward |