]> git.eshelyaron.com Git - emacs.git/commitdiff
(eshell/which): Handle the case where no description is found.
authorGlenn Morris <rgm@gnu.org>
Wed, 13 Aug 2008 03:12:49 +0000 (03:12 +0000)
committerGlenn Morris <rgm@gnu.org>
Wed, 13 Aug 2008 03:12:49 +0000 (03:12 +0000)
lisp/ChangeLog
lisp/eshell/esh-cmd.el

index a4fa0a3e64e407674febf2539284fa9087de6b96..8426b30789e17021a9eef585a3ceb80cebcdf823 100644 (file)
@@ -1,3 +1,8 @@
+2008-08-13  Glenn Morris  <rgm@gnu.org>
+
+       * eshell/esh-cmd.el (eshell/which): Handle the case where no description
+       is found.
+
 2008-08-12  Alan Mackenzie  <acm@muc.de>
 
        * progmodes/cc-defs.el (c-emacs-features):
index 82619d60791a18371ba398eed38354353bea82b1..17ae50d1f5036d555f188576897c08310a01d588 100644 (file)
@@ -1252,9 +1252,12 @@ be finished later after the completion of an asynchronous subprocess."
                              (prog1
                                  (describe-function sym)
                                (message nil))))))
-               (setq desc (substring desc 0
-                                     (1- (or (string-match "\n" desc)
-                                             (length desc)))))
+               (setq desc (if desc (substring desc 0
+                                              (1- (or (string-match "\n" desc)
+                                                      (length desc))))
+                            ;; This should not happen.
+                            (format "%s is defined, \
+but no documentation was found" name)))
                (if (buffer-live-p (get-buffer "*Help*"))
                    (kill-buffer "*Help*"))
                (setq program (or desc name))))))