summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTim Landscheidt <tim@tim-landscheidt.de>2024-03-12 00:21:06 +0000
committerEli Zaretskii <eliz@gnu.org>2024-03-14 12:40:26 +0200
commit6d1c1fca0aa7c5a1ff0254af3f89a34d5309ea0d (patch)
tree080f8471734648e1815544049d57176453fa4566 /test
parent3807f380b3334205bfcbba88003ff96507c86fc4 (diff)
downloademacs-6d1c1fca0aa7c5a1ff0254af3f89a34d5309ea0d.tar.gz
; 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 'test')
-rw-r--r--test/lisp/calendar/icalendar-tests.el2
-rw-r--r--test/lisp/erc/erc-dcc-tests.el6
-rw-r--r--test/lisp/erc/erc-networks-tests.el2
-rw-r--r--test/lisp/erc/erc-scenarios-services-misc.el2
-rw-r--r--test/lisp/erc/erc-tests.el2
5 files changed, 7 insertions, 7 deletions
diff --git a/test/lisp/calendar/icalendar-tests.el b/test/lisp/calendar/icalendar-tests.el
index 7d3af25ea49..39ad735a789 100644
--- a/test/lisp/calendar/icalendar-tests.el
+++ b/test/lisp/calendar/icalendar-tests.el
@@ -68,7 +68,7 @@
(with-temp-buffer
(insert diary-string)
(icalendar-export-region (point-min) (point-max) file))
- (with-current-buffer (get-buffer "*icalendar-errors*")
+ (with-current-buffer "*icalendar-errors*"
(buffer-string))))
;; ======================================================================
diff --git a/test/lisp/erc/erc-dcc-tests.el b/test/lisp/erc/erc-dcc-tests.el
index a2fb0392727..d4b5919a1cc 100644
--- a/test/lisp/erc/erc-dcc-tests.el
+++ b/test/lisp/erc/erc-dcc-tests.el
@@ -243,7 +243,7 @@
(delete-region (point) (point-max))
(insert "/dcc get -")
(call-interactively #'completion-at-point)
- (with-current-buffer (get-buffer "*Completions*")
+ (with-current-buffer "*Completions*"
(goto-char (point-min))
(search-forward "-s")
(search-forward "-t"))
@@ -264,7 +264,7 @@
(delete-region (point) (point-max))
(insert "/dcc get -")
(call-interactively #'completion-at-point)
- (with-current-buffer (get-buffer "*Completions*")
+ (with-current-buffer "*Completions*"
(goto-char (point-min))
(search-forward "-s")
(search-forward "-t"))
@@ -289,7 +289,7 @@
(delete-region (point) (point-max))
(insert "/dcc get -")
(call-interactively #'completion-at-point)
- (with-current-buffer (get-buffer "*Completions*")
+ (with-current-buffer "*Completions*"
(goto-char (point-min))
(search-forward "-s")
(search-forward "-t"))
diff --git a/test/lisp/erc/erc-networks-tests.el b/test/lisp/erc/erc-networks-tests.el
index 90b8aa99741..0d8861f2167 100644
--- a/test/lisp/erc/erc-networks-tests.el
+++ b/test/lisp/erc/erc-networks-tests.el
@@ -1349,7 +1349,7 @@
(should-not
(erc-server-process-alive
(should (get-buffer "#chan/irc.foonet.org"))))
- (with-current-buffer (get-buffer "#chan/irc.foonet.org")
+ (with-current-buffer "#chan/irc.foonet.org"
(should-not erc-server-connected)
(should (eq erc-server-process old-proc))
(erc-with-server-buffer
diff --git a/test/lisp/erc/erc-scenarios-services-misc.el b/test/lisp/erc/erc-scenarios-services-misc.el
index ab4a97c5724..47d0bcff41a 100644
--- a/test/lisp/erc/erc-scenarios-services-misc.el
+++ b/test/lisp/erc/erc-scenarios-services-misc.el
@@ -186,7 +186,7 @@
(funcall expect 10 "Last login from")
(funcall expect 10 "Your new nickname is tester")))
- (with-current-buffer (get-buffer "#test")
+ (with-current-buffer "#test"
(funcall expect 10 "tester ")
(funcall expect 10 "was created on"))))
diff --git a/test/lisp/erc/erc-tests.el b/test/lisp/erc/erc-tests.el
index 6809d9db41d..3e8ddef3731 100644
--- a/test/lisp/erc/erc-tests.el
+++ b/test/lisp/erc/erc-tests.el
@@ -382,7 +382,7 @@
(should-not (search-forward (rx (or "9" "10") ">") nil t)))))
(ert-info ("Query buffer")
- (with-current-buffer (get-buffer "bob")
+ (with-current-buffer "bob"
(goto-char erc-insert-marker)
(should (looking-at-p "bob@ServNet 14>"))
(goto-char erc-input-marker)