comparison lisp/tumme.el @ 72119:c57307165d5e

(tumme-track-original-file): Add `buffer-live-p' check. (tumme-format-properties-string): Handle empty `buf'.
author Mathias Dahl <mathias.dahl@gmail.com>
date Tue, 25 Jul 2006 13:14:03 +0000
parents e75e38c3a62f
children 2df19ee49e28
comparison
equal deleted inserted replaced
72118:c5feedd6ca5e 72119:c57307165d5e
1007 use only useful if `tumme-track-movement' is nil." 1007 use only useful if `tumme-track-movement' is nil."
1008 (interactive) 1008 (interactive)
1009 (let ((old-buf (current-buffer)) 1009 (let ((old-buf (current-buffer))
1010 (dired-buf (tumme-associated-dired-buffer)) 1010 (dired-buf (tumme-associated-dired-buffer))
1011 (file-name (tumme-original-file-name))) 1011 (file-name (tumme-original-file-name)))
1012 (when (and dired-buf file-name) 1012 (when (and (buffer-live-p dired-buf) file-name)
1013 (setq file-name (file-name-nondirectory file-name)) 1013 (setq file-name (file-name-nondirectory file-name))
1014 (set-buffer dired-buf) 1014 (set-buffer dired-buf)
1015 (goto-char (point-min)) 1015 (goto-char (point-min))
1016 (if (not (search-forward file-name nil t)) 1016 (if (not (search-forward file-name nil t))
1017 (message "Could not track file") 1017 (message "Could not track file")
1132 name, PROPS is a list of tags and COMMENT is the image files's 1132 name, PROPS is a list of tags and COMMENT is the image files's
1133 comment." 1133 comment."
1134 (format-spec 1134 (format-spec
1135 tumme-display-properties-format 1135 tumme-display-properties-format
1136 (list 1136 (list
1137 (cons ?b buf) 1137 (cons ?b (or buf ""))
1138 (cons ?f file) 1138 (cons ?f file)
1139 (cons ?t (or (princ props) "")) 1139 (cons ?t (or (princ props) ""))
1140 (cons ?c (or comment ""))))) 1140 (cons ?c (or comment "")))))
1141 1141
1142 (defun tumme-display-thumb-properties () 1142 (defun tumme-display-thumb-properties ()