X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Flib-complete.el;h=ea0bc696ff1fcb808df393758a281327b778b945;hb=0f32e94e63549a803257dd1612fcdb83dbd6a149;hp=29175a89a9cdac2f263cc6028a20bd0812032017;hpb=937bb3ce20f4819a75e8234cb91a1acaa19847f8;p=chise%2Fxemacs-chise.git.1 diff --git a/lisp/lib-complete.el b/lisp/lib-complete.el index 29175a8..ea0bc69 100644 --- a/lisp/lib-complete.el +++ b/lisp/lib-complete.el @@ -104,33 +104,32 @@ If optional fourth argument FAST is non-nil, don't sort the completions, ;;=== 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 ([ ] ...) @@ -255,10 +254,7 @@ Optional sixth argument FILTER can be used to provide a function to (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) @@ -269,10 +265,7 @@ Optional sixth argument FILTER can be used to provide a function to '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))) @@ -313,10 +306,7 @@ and CODESYS. The default for DISPLAY-FUNCTION is `find-file'." (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)