Skip to content

Commit ec9c3ee

Browse files
author
Bozhidar Batsov
committed
Don't shadow the dynamic variable major-mode
1 parent 84cf5ed commit ec9c3ee

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

cider-interaction.el

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1148,11 +1148,11 @@ KILL-BUFFER-P is passed along."
11481148
(interactive)
11491149
(funcall cider-popup-buffer-quit-function kill-buffer-p))
11501150

1151-
(defun cider-popup-buffer (name &optional select major-mode)
1151+
(defun cider-popup-buffer (name &optional select mode)
11521152
"Create new popup buffer called NAME.
11531153
If SELECT is non-nil, select the newly created window.
1154-
If MAJOR-MODE is non-nil enabled it for the popup buffer."
1155-
(with-current-buffer (cider-make-popup-buffer name major-mode)
1154+
If major MODE is non-nil, enable it for the popup buffer."
1155+
(with-current-buffer (cider-make-popup-buffer name mode)
11561156
(cider-popup-buffer-display (current-buffer) select)))
11571157

11581158
(defun cider-popup-buffer-display (popup-buffer &optional select)
@@ -1171,14 +1171,14 @@ If prefix argument KILL-BUFFER-P is non-nil, kill the buffer instead of burying
11711171
(interactive)
11721172
(quit-window kill-buffer-p (selected-window)))
11731173

1174-
(defun cider-make-popup-buffer (name &optional major-mode)
1175-
"Create a temporary buffer called NAME using MAJOR-mode (if specified)."
1174+
(defun cider-make-popup-buffer (name &optional mode)
1175+
"Create a temporary buffer called NAME using major MODE (if specified)."
11761176
(with-current-buffer (get-buffer-create name)
11771177
(kill-all-local-variables)
11781178
(setq buffer-read-only nil)
11791179
(erase-buffer)
1180-
(when major-mode
1181-
(funcall major-mode))
1180+
(when mode
1181+
(funcall mode))
11821182
(setq-local cider-popup-output-marker (point-marker))
11831183
(cider-popup-buffer-mode 1)
11841184
(setq buffer-read-only t)

0 commit comments

Comments
 (0)