X-Git-Url: http://git.chise.org/gitweb/?p=chise%2Fxemacs-chise.git.1;a=blobdiff_plain;f=lisp%2Flib-complete.el;h=69d5554b4f627b024d12852403bc2baa265815b1;hp=29175a89a9cdac2f263cc6028a20bd0812032017;hb=da416a1945940b3f952144475eb1a1357430527d;hpb=937bb3ce20f4819a75e8234cb91a1acaa19847f8 diff --git a/lisp/lib-complete.el b/lisp/lib-complete.el index 29175a8..69d5554 100644 --- a/lisp/lib-complete.el +++ b/lisp/lib-complete.el @@ -104,25 +104,24 @@ 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) @@ -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)))