;;=== Utilities ===========================================================
-(defmacro progn-with-message (MESSAGE &rest FORMS)
+(defmacro progn-with-message (message &rest forms)
"(progn-with-message MESSAGE FORMS ...)
Display MESSAGE and evaluate FORMS, returning value of the last one."
;; based on Hallvard Furuseth's funcall-with-message
- (`
- (if (eq (selected-window) (minibuffer-window))
+ `(if (eq (selected-window) (minibuffer-window))
(save-excursion
(goto-char (point-max))
(let ((orig-pmax (point-max)))
(unwind-protect
(progn
- (insert " " (, MESSAGE)) (goto-char orig-pmax)
+ (insert " " ,message) (goto-char orig-pmax)
(sit-for 0) ; Redisplay
- (,@ FORMS))
+ ,@forms)
(delete-region orig-pmax (point-max)))))
(prog2
- (message "%s" (, MESSAGE))
- (progn (,@ FORMS))
- (message "")))))
+ (message "%s" ,message)
+ (progn ,@forms)
+ (message ""))))
(put 'progn-with-message 'lisp-indent-hook 1)
;;=== Completion caching ==================================================
(defconst lib-complete:cache nil
- "Used within read-library and read-library-internal to prevent
-costly repeated calls to library-all-completions.
+ "Used within `read-library' and `read-library-internal' to prevent
+costly repeated calls to `library-all-completions'.
Format is a list of lists of the form
([<path> <subdir>] <cache-record> <cache-record> ...)
(cond
((equal library "") DEFAULT)
(FULL (locate-file library read-library-internal-search-path
- ;; decompression doesn't work with Mule -slb
- (if (featurep 'mule)
- ".el:.elc"
- ".el:.el.gz:.el.Z:.elc")))
+ '(".el" ".el.gz" ".elc")))
(t library))))
(defun read-library-name (prompt)
'read-library-internal
(lambda (fn)
(cond
- ;; decompression doesn't work with mule -slb
- ((string-match (if (featurep 'mule)
- "\\.el$"
- "\\.el\\(\\.gz\\|\\.Z\\)?$") fn)
+ ((string-match "\\.el\\(\\.gz\\|\\.Z\\)?$" fn)
(substring fn 0 (match-beginning 0)))))
t nil)))
(let ((path (if (or (null library) (equal library ""))
nil
(locate-file library load-path
- ;; decompression doesn't work with Mule -slb
- (if (featurep 'mule)
- ":.el:.elc"
- ":.el:.el.gz:.el.Z:.elc")))))
+ ":.el:.el.gz:.el.Z:.elc"))))
(if path (funcall (if (fboundp display-function)
display-function 'find-file)
path codesys)