aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuanma Barranquero2005-08-02 10:26:31 +0000
committerJuanma Barranquero2005-08-02 10:26:31 +0000
commit6ced5724bcc4948b0b673c878d3c315161fa70de (patch)
tree95c7c3f8351ab948cdc927e88c10fcae5a6391cf
parent2bd5227edee9a2d21df51ecf6ebaa2fe252a30db (diff)
downloademacs-6ced5724bcc4948b0b673c878d3c315161fa70de.tar.gz
emacs-6ced5724bcc4948b0b673c878d3c315161fa70de.zip
(thumbs-find-image): Don't make variables automatically buffer local.
(thumbs-current-tmp-filename, thumbs-current-image-filename, thumbs-image-num): Make automatically buffer local. (thumbs-show-thumbs-list): Use `make-local-variable', not `make-variable-buffer-local'. (thumbs-insert-image): Make `thumbs-current-image-size' buffer-local.
-rw-r--r--lisp/ChangeLog12
-rw-r--r--lisp/thumbs.el37
2 files changed, 29 insertions, 20 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b58f9466967..754c96a882e 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,14 @@
12005-08-02 Juanma Barranquero <lekktu@gmail.com> 12005-08-02 Juanma Barranquero <lekktu@gmail.com>
2 2
3 * thumbs.el (thumbs-find-image): Don't make variables
4 automatically buffer local.
5 (thumbs-current-tmp-filename, thumbs-current-image-filename)
6 (thumbs-image-num): Make automatically buffer local.
7 (thumbs-show-thumbs-list): Use `make-local-variable', not
8 `make-variable-buffer-local'.
9 (thumbs-insert-image): Make `thumbs-current-image-size'
10 buffer-local.
11
3 * play/doctor.el (doctor-type-symbol): "?\ " -> "?\s". 12 * play/doctor.el (doctor-type-symbol): "?\ " -> "?\s".
4 (**mad**, *debug*, *print-space*, *print-upcase*, abuselst) 13 (**mad**, *debug*, *print-space*, *print-upcase*, abuselst)
5 (abusewords, account, afraidof, arerelated, areyou, bak, beclst) 14 (abusewords, account, afraidof, arerelated, areyou, bak, beclst)
@@ -16,6 +25,9 @@
16 (whatwhen, whereoutp, whysay, whywant, zippy-flag, zippylst): 25 (whatwhen, whereoutp, whysay, whywant, zippy-flag, zippylst):
17 Defvar at compile time. 26 Defvar at compile time.
18 27
28 * progmodes/ada-mode.el (ada-mode): Use `make-local-variable',
29 not `make-variable-buffer-local'.
30
192005-08-02 Kim F. Storm <storm@cua.dk> 312005-08-02 Kim F. Storm <storm@cua.dk>
20 32
21 * emulation/cua-rect.el (cua--highlight-rectangle): Only show 33 * emulation/cua-rect.el (cua--highlight-rectangle): Only show
diff --git a/lisp/thumbs.el b/lisp/thumbs.el
index 478fb0b6528..0d6e9a5ac44 100644
--- a/lisp/thumbs.el
+++ b/lisp/thumbs.el
@@ -138,23 +138,25 @@ this value can let another user see some of your images."
138 :group 'thumbs) 138 :group 'thumbs)
139 139
140;; Initialize some variable, for later use. 140;; Initialize some variable, for later use.
141(defvar thumbs-current-tmp-filename 141(defvar thumbs-current-tmp-filename nil
142 nil
143 "Temporary filename of current image.") 142 "Temporary filename of current image.")
144(defvar thumbs-current-image-filename 143(make-variable-buffer-local 'thumbs-current-tmp-filename)
145 nil 144
145(defvar thumbs-current-image-filename nil
146 "Filename of current image.") 146 "Filename of current image.")
147(defvar thumbs-current-image-size 147(make-variable-buffer-local 'thumbs-current-image-filename)
148 nil 148
149(defvar thumbs-current-image-size nil
149 "Size of current image.") 150 "Size of current image.")
150(defvar thumbs-image-num 151
151 nil 152(defvar thumbs-image-num nil
152 "Number of current image.") 153 "Number of current image.")
153(defvar thumbs-current-dir 154(make-variable-buffer-local 'thumbs-image-num)
154 nil 155
156(defvar thumbs-current-dir nil
155 "Current directory.") 157 "Current directory.")
156(defvar thumbs-markedL 158
157 nil 159(defvar thumbs-markedL nil
158 "List of marked files.") 160 "List of marked files.")
159 161
160(defalias 'thumbs-gensym 162(defalias 'thumbs-gensym
@@ -365,8 +367,8 @@ If MARKED is non-nil, the image is marked."
365 :conversion ,(if marked 'disabled) 367 :conversion ,(if marked 'disabled)
366 :margin ,thumbs-margin))) 368 :margin ,thumbs-margin)))
367 (insert-image i) 369 (insert-image i)
368 (setq thumbs-current-image-size 370 (set (make-local-variable 'thumbs-current-image-size)
369 (image-size i t)))) 371 (image-size i t))))
370 372
371(defun thumbs-insert-thumb (img &optional marked) 373(defun thumbs-insert-thumb (img &optional marked)
372 "Insert the thumbnail for IMG at point. 374 "Insert the thumbnail for IMG at point.
@@ -397,8 +399,7 @@ If MARKED is non-nil, the image is marked."
397 (thumbs-mode) 399 (thumbs-mode)
398 (thumbs-do-thumbs-insertion L) 400 (thumbs-do-thumbs-insertion L)
399 (goto-char (point-min)) 401 (goto-char (point-min))
400 (setq thumbs-current-dir default-directory) 402 (set (make-local-variable 'thumbs-current-dir) default-directory)))
401 (make-variable-buffer-local 'thumbs-current-dir)))
402 403
403;;;###autoload 404;;;###autoload
404(defun thumbs-show-all-from-dir (dir &optional reg same-window) 405(defun thumbs-show-all-from-dir (dir &optional reg same-window)
@@ -436,10 +437,6 @@ and SAME-WINDOW to show thumbs in the same window."
436 (setq thumbs-current-image-filename img 437 (setq thumbs-current-image-filename img
437 thumbs-current-tmp-filename nil 438 thumbs-current-tmp-filename nil
438 thumbs-image-num (or num 0)) 439 thumbs-image-num (or num 0))
439 (make-variable-buffer-local 'thumbs-current-image-filename)
440 (make-variable-buffer-local 'thumbs-current-tmp-filename)
441 (make-variable-buffer-local 'thumbs-current-image-size)
442 (make-variable-buffer-local 'thumbs-image-num)
443 (delete-region (point-min)(point-max)) 440 (delete-region (point-min)(point-max))
444 (thumbs-insert-image img (thumbs-image-type img) 0))) 441 (thumbs-insert-image img (thumbs-image-type img) 0)))
445 442