bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [patch] 21.3 executable.find - Use cache in `executable-find'


From: Jari Aalto+mail.linux
Subject: Re: [patch] 21.3 executable.find - Use cache in `executable-find'
Date: Tue, 10 Feb 2004 23:21:17 +0200
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (windows-nt) (i386-msvc-nt5.0.2195)

* Sun 2004-02-08 jari.aalto <AT> poboxes.com (Jari Aalto+mail.linux) 
gnu.emacs.bug
* 
<http://groups.google.com/groups?oi=djq&as_umsgid=%3Cmailman.2083.1076239601.928.bug-gnu-emacs@gnu.org>
| It is common that searches for programs are done multiple times, so it
| would be good if the precious values were cached just like bash does.
| Here is patch to make this happen.
| 
| This patch supposes that my other patches have been applied
| (See patch to implement `executable-command-find-unix-p')
| 

One small fix needed to get it working.

2004-02-10 Tue  Jari Aalto  <jari.aalto <AT> poboxes.com>

        * progmodes/executable.el (executable-find-cache): Returned
        (command path), when should have returned path. fixed.



Index: executable.el
===================================================================
RCS file: 
/cygdrive/h/data/version-control/cvsroot/emacs/gnu-emacs/lisp213/progmodes/executable.el,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -IId: -u -r1.6 -r1.7
--- executable.el       8 Feb 2004 11:30:11 -0000       1.6
+++ executable.el       10 Feb 2004 21:19:06 -0000      1.7
@@ -219,7 +219,9 @@
 
 (defsubst executable-find-cache (command)
   "Look up COMMAND from `executable-find-cache'."
-  (assoc command executable-find-cache))
+  (let ((elt (assoc command executable-find-cache)))
+    (when elt
+      (nth 1 elt))))
 
 ;;;###autoload
 (defun executable-find-path (command)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]