aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Kangas2024-12-09 03:28:30 +0100
committerStefan Kangas2024-12-12 22:48:17 +0100
commita4e38cc3753ac416181c0ead758d174093eb3526 (patch)
treed7c8d48d62f18cc12e957ea27fc1b6f8912d739b
parentd121953b971f2bee5d75e37355fd2bd5e1d12784 (diff)
downloademacs-a4e38cc3753ac416181c0ead758d174093eb3526.tar.gz
emacs-a4e38cc3753ac416181c0ead758d174093eb3526.zip
Don't call purecopy in bindings.el
* lisp/bindings.el (mode-line-input-method-map) (mode-line-coding-system-map, mode-line-mule-info, mode-line-client) (mode-line-modified, mode-line-remote) (mode-line-window-dedicated-keymap, propertized-buffer-identification) (completion-ignored-extensions): Remove calls to purecopy.
-rw-r--r--lisp/bindings.el66
1 files changed, 31 insertions, 35 deletions
diff --git a/lisp/bindings.el b/lisp/bindings.el
index a3b6b15f32b..01aa07b9272 100644
--- a/lisp/bindings.el
+++ b/lisp/bindings.el
@@ -67,7 +67,7 @@ corresponding to the mode line clicked."
67 (interactive "e") 67 (interactive "e")
68 (with-selected-window (posn-window (event-start e)) 68 (with-selected-window (posn-window (event-start e))
69 (describe-current-input-method)))) 69 (describe-current-input-method))))
70 (purecopy map))) 70 map))
71 71
72(defvar mode-line-coding-system-map 72(defvar mode-line-coding-system-map
73 (let ((map (make-sparse-keymap))) 73 (let ((map (make-sparse-keymap)))
@@ -83,7 +83,7 @@ corresponding to the mode line clicked."
83 (interactive "e") 83 (interactive "e")
84 (with-selected-window (posn-window (event-start e)) 84 (with-selected-window (posn-window (event-start e))
85 (call-interactively 'set-buffer-file-coding-system)))) 85 (call-interactively 'set-buffer-file-coding-system))))
86 (purecopy map)) 86 map)
87 "Local keymap for the coding-system part of the mode line.") 87 "Local keymap for the coding-system part of the mode line.")
88 88
89(defun mode-line-change-eol (event) 89(defun mode-line-change-eol (event)
@@ -203,11 +203,11 @@ mouse-3: Set coding system"
203 (current-input-method 203 (current-input-method
204 (:propertize ("" current-input-method-title) 204 (:propertize ("" current-input-method-title)
205 help-echo (concat 205 help-echo (concat
206 ,(purecopy "Current input method: ") 206 "Current input method: "
207 current-input-method 207 current-input-method
208 ,(purecopy "\n\ 208 "\n\
209mouse-2: Disable input method\n\ 209mouse-2: Disable input method\n\
210mouse-3: Describe current input method")) 210mouse-3: Describe current input method")
211 local-map ,mode-line-input-method-map 211 local-map ,mode-line-input-method-map
212 mouse-face mode-line-highlight)) 212 mouse-face mode-line-highlight))
213 ,(propertize 213 ,(propertize
@@ -228,7 +228,7 @@ mnemonics of the following coding systems:
228(defvar mode-line-client 228(defvar mode-line-client
229 `(:eval 229 `(:eval
230 (if (frame-parameter nil 'client) 230 (if (frame-parameter nil 'client)
231 ,(propertize "@" 'help-echo (purecopy "emacsclient frame")))) 231 ,(propertize "@" 'help-echo "emacsclient frame")))
232 "Mode line construct for identifying emacsclient frames.") 232 "Mode line construct for identifying emacsclient frames.")
233;; Autoload if this file no longer dumped. 233;; Autoload if this file no longer dumped.
234;;;###autoload 234;;;###autoload
@@ -250,15 +250,15 @@ mnemonics of the following coding systems:
250 (list (propertize 250 (list (propertize
251 "%1*" 251 "%1*"
252 'help-echo 'mode-line-read-only-help-echo 252 'help-echo 'mode-line-read-only-help-echo
253 'local-map (purecopy (make-mode-line-mouse-map 253 'local-map (make-mode-line-mouse-map
254 'mouse-1 254 'mouse-1
255 #'mode-line-toggle-read-only)) 255 #'mode-line-toggle-read-only)
256 'mouse-face 'mode-line-highlight) 256 'mouse-face 'mode-line-highlight)
257 (propertize 257 (propertize
258 "%1+" 258 "%1+"
259 'help-echo 'mode-line-modified-help-echo 259 'help-echo 'mode-line-modified-help-echo
260 'local-map (purecopy (make-mode-line-mouse-map 260 'local-map (make-mode-line-mouse-map
261 'mouse-1 #'mode-line-toggle-modified)) 261 'mouse-1 #'mode-line-toggle-modified)
262 'mouse-face 'mode-line-highlight)) 262 'mouse-face 'mode-line-highlight))
263 "Mode line construct for displaying whether current buffer is modified.") 263 "Mode line construct for displaying whether current buffer is modified.")
264;;;###autoload 264;;;###autoload
@@ -268,16 +268,16 @@ mnemonics of the following coding systems:
268 (list (propertize 268 (list (propertize
269 "%1@" 269 "%1@"
270 'mouse-face 'mode-line-highlight 270 'mouse-face 'mode-line-highlight
271 'help-echo (purecopy (lambda (window _object _point) 271 'help-echo (lambda (window _object _point)
272 (format "%s" 272 (format "%s"
273 (with-selected-window window 273 (with-selected-window window
274 (if (stringp default-directory) 274 (if (stringp default-directory)
275 (concat 275 (concat
276 (if (file-remote-p default-directory) 276 (if (file-remote-p default-directory)
277 "Current directory is remote: " 277 "Current directory is remote: "
278 "Current directory is local: ") 278 "Current directory is local: ")
279 default-directory) 279 default-directory)
280 "Current directory is nil"))))))) 280 "Current directory is nil"))))))
281 "Mode line construct to indicate a remote buffer.") 281 "Mode line construct to indicate a remote buffer.")
282;;;###autoload 282;;;###autoload
283(put 'mode-line-remote 'risky-local-variable t) 283(put 'mode-line-remote 'risky-local-variable t)
@@ -301,8 +301,8 @@ Value is used for `mode-line-frame-identification', which see."
301(defvar mode-line-window-dedicated-keymap 301(defvar mode-line-window-dedicated-keymap
302 (let ((map (make-sparse-keymap))) 302 (let ((map (make-sparse-keymap)))
303 (define-key map [mode-line mouse-1] #'toggle-window-dedicated) 303 (define-key map [mode-line mouse-1] #'toggle-window-dedicated)
304 (purecopy map)) "\ 304 map)
305Keymap for what is displayed by `mode-line-window-dedicated'.") 305 "Keymap for what is displayed by `mode-line-window-dedicated'.")
306 306
307(defun mode-line-window-control () 307(defun mode-line-window-control ()
308 "Compute mode line construct for window dedicated state. 308 "Compute mode line construct for window dedicated state.
@@ -648,8 +648,8 @@ text properties for face, help-echo, and local-map to it."
648 (list (propertize fmt 648 (list (propertize fmt
649 'face 'mode-line-buffer-id 649 'face 'mode-line-buffer-id
650 'help-echo 650 'help-echo
651 (purecopy "Buffer name 651 "Buffer name
652mouse-1: Previous buffer\nmouse-3: Next buffer") 652mouse-1: Previous buffer\nmouse-3: Next buffer"
653 'mouse-face 'mode-line-highlight 653 'mouse-face 'mode-line-highlight
654 'local-map mode-line-buffer-identification-keymap))) 654 'local-map mode-line-buffer-identification-keymap)))
655 655
@@ -823,8 +823,7 @@ Actually, STRING need not be a string; any mode-line construct is
823okay. See `mode-line-format'.") 823okay. See `mode-line-format'.")
824;;;###autoload 824;;;###autoload
825(put 'minor-mode-alist 'risky-local-variable t) 825(put 'minor-mode-alist 'risky-local-variable t)
826;; Don't use purecopy here--some people want to change these strings, 826
827;; also string properties are lost when put into pure space.
828(setq minor-mode-alist 827(setq minor-mode-alist
829 '((abbrev-mode " Abbrev") 828 '((abbrev-mode " Abbrev")
830 (overwrite-mode overwrite-mode) 829 (overwrite-mode overwrite-mode)
@@ -842,14 +841,11 @@ okay. See `mode-line-format'.")
842(setq completion-ignored-extensions 841(setq completion-ignored-extensions
843 (append 842 (append
844 (cond ((memq system-type '(ms-dos windows-nt)) 843 (cond ((memq system-type '(ms-dos windows-nt))
845 (mapcar 'purecopy 844 '(".o" "~" ".bin" ".bak" ".obj" ".map" ".ico" ".pif" ".lnk"
846 '(".o" "~" ".bin" ".bak" ".obj" ".map" ".ico" ".pif" ".lnk" 845 ".a" ".ln" ".blg" ".bbl" ".dll" ".drv" ".vxd" ".386"))
847 ".a" ".ln" ".blg" ".bbl" ".dll" ".drv" ".vxd" ".386")))
848 (t 846 (t
849 (mapcar 'purecopy 847 '(".o" "~" ".bin" ".lbin" ".so"
850 '(".o" "~" ".bin" ".lbin" ".so" 848 ".a" ".ln" ".blg" ".bbl")))
851 ".a" ".ln" ".blg" ".bbl"))))
852 (mapcar 'purecopy
853 '(".elc" ".lof" 849 '(".elc" ".lof"
854 ".glo" ".idx" ".lot" 850 ".glo" ".idx" ".lot"
855 ;; VCS metadata directories 851 ;; VCS metadata directories
@@ -879,7 +875,7 @@ okay. See `mode-line-format'.")
879 ".cp" ".fn" ".ky" ".pg" ".tp" ".vr" 875 ".cp" ".fn" ".ky" ".pg" ".tp" ".vr"
880 ".cps" ".fns" ".kys" ".pgs" ".tps" ".vrs" 876 ".cps" ".fns" ".kys" ".pgs" ".tps" ".vrs"
881 ;; Python byte-compiled 877 ;; Python byte-compiled
882 ".pyc" ".pyo")))) 878 ".pyc" ".pyo")))
883 879
884;; Suffixes used for executables. 880;; Suffixes used for executables.
885(setq exec-suffixes 881(setq exec-suffixes