comparison lisp/mail/mh-utils.el @ 26455:03d8424273d3

Use new backquote syntax.
author Gerd Moellmann <gerd@gnu.org>
date Mon, 15 Nov 1999 14:24:32 +0000
parents 1fa062857a8d
children d810d00ddd7c
comparison
equal deleted inserted replaced
26454:2f0e687605b8 26455:03d8424273d3
215 ;; Execute BODY, which can modify the folder buffer without having to 215 ;; Execute BODY, which can modify the folder buffer without having to
216 ;; worry about file locking or the read-only flag, and return its result. 216 ;; worry about file locking or the read-only flag, and return its result.
217 ;; If SAVE-MODIFICATION-FLAG-P is non-nil, the buffer's modification 217 ;; If SAVE-MODIFICATION-FLAG-P is non-nil, the buffer's modification
218 ;; flag is unchanged, otherwise it is cleared. 218 ;; flag is unchanged, otherwise it is cleared.
219 (setq save-modification-flag-p (car save-modification-flag-p)) ; CL style 219 (setq save-modification-flag-p (car save-modification-flag-p)) ; CL style
220 (` (prog1 220 `(prog1
221 (let ((mh-folder-updating-mod-flag (buffer-modified-p)) 221 (let ((mh-folder-updating-mod-flag (buffer-modified-p))
222 (buffer-read-only nil) 222 (buffer-read-only nil)
223 (buffer-file-name nil)) ;don't let the buffer get locked 223 (buffer-file-name nil)) ;don't let the buffer get locked
224 (prog1 224 (prog1
225 (progn 225 (progn
226 (,@ body)) 226 ,@body)
227 (mh-set-folder-modified-p mh-folder-updating-mod-flag))) 227 (mh-set-folder-modified-p mh-folder-updating-mod-flag)))
228 (,@ (if (not save-modification-flag-p) 228 ,@(if (not save-modification-flag-p)
229 '((mh-set-folder-modified-p nil))))))) 229 '((mh-set-folder-modified-p nil)))))
230 230
231 (put 'with-mh-folder-updating 'lisp-indent-hook 1) 231 (put 'with-mh-folder-updating 'lisp-indent-hook 1)
232 232
233 (defmacro mh-in-show-buffer (show-buffer &rest body) 233 (defmacro mh-in-show-buffer (show-buffer &rest body)
234 ;; Format is (mh-in-show-buffer (SHOW-BUFFER) &body BODY). 234 ;; Format is (mh-in-show-buffer (SHOW-BUFFER) &body BODY).
235 ;; Display buffer SHOW-BUFFER in other window and execute BODY in it. 235 ;; Display buffer SHOW-BUFFER in other window and execute BODY in it.
236 ;; Stronger than save-excursion, weaker than save-window-excursion. 236 ;; Stronger than save-excursion, weaker than save-window-excursion.
237 (setq show-buffer (car show-buffer)) ; CL style 237 (setq show-buffer (car show-buffer)) ; CL style
238 (` (let ((mh-in-show-buffer-saved-window (selected-window))) 238 `(let ((mh-in-show-buffer-saved-window (selected-window)))
239 (switch-to-buffer-other-window (, show-buffer)) 239 (switch-to-buffer-other-window ,show-buffer)
240 (if mh-bury-show-buffer (bury-buffer (current-buffer))) 240 (if mh-bury-show-buffer (bury-buffer (current-buffer)))
241 (unwind-protect 241 (unwind-protect
242 (progn 242 (progn
243 (,@ body)) 243 ,@body)
244 (select-window mh-in-show-buffer-saved-window))))) 244 (select-window mh-in-show-buffer-saved-window))))
245 245
246 (put 'mh-in-show-buffer 'lisp-indent-hook 1) 246 (put 'mh-in-show-buffer 'lisp-indent-hook 1)
247 247
248 (defmacro mh-make-seq (name msgs) (list 'cons name msgs)) 248 (defmacro mh-make-seq (name msgs) (list 'cons name msgs))
249 249