summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2012-10-12 16:11:50 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2012-10-12 16:11:50 -0400
commit06485aa8215af39f9f5f999933aa39d349a2bdf9 (patch)
tree7969cb614e87d05d5d603c52bff9534e2a5ca415
parentbd0ffffd5a90e25d32708dd4fec29578648e1fad (diff)
downloademacs-06485aa8215af39f9f5f999933aa39d349a2bdf9.tar.gz
* src/doc.c (get_doc_string): Don't signal an error if the file is missing.
* lisp/help-fns.el (describe-variable, describe-function-1): * lisp/help-mode.el (help-make-xrefs): Remove error handler, made unneeded.
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/help-fns.el14
-rw-r--r--lisp/help-mode.el14
-rw-r--r--src/ChangeLog4
-rw-r--r--src/doc.c3
5 files changed, 20 insertions, 18 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index dd43dbb2fb2..2a92c1178cf 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
2012-10-12 Stefan Monnier <monnier@iro.umontreal.ca>
+ * help-fns.el (describe-variable, describe-function-1):
+ * help-mode.el (help-make-xrefs): Remove error handler, made unneeded.
+
* emacs-lisp/eieio.el (lisp-imenu-generic-expression): Fix typo.
2012-10-12 Glenn Morris <rgm@gnu.org>
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index f17b29de720..b552d8c1357 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -615,9 +615,7 @@ FILE is the file where FUNCTION was probably defined."
(point)))
(terpri)(terpri)
- (let* ((doc-raw (condition-case err
- (documentation function t)
- (error (format "No Doc! %S" err))))
+ (let* ((doc-raw (documentation function t))
;; If the function is autoloaded, and its docstring has
;; key substitution constructs, load the library.
(doc (progn
@@ -849,12 +847,10 @@ it is displayed along with the global value."
(obsolete (get variable 'byte-obsolete-variable))
(use (car obsolete))
(safe-var (get variable 'safe-local-variable))
- (doc (condition-case err
- (or (documentation-property
- variable 'variable-documentation)
- (documentation-property
- alias 'variable-documentation))
- (error (format "Doc not found: %S" err))))
+ (doc (or (documentation-property
+ variable 'variable-documentation)
+ (documentation-property
+ alias 'variable-documentation)))
(extra-line nil))
;; Mention if it's a local variable.
diff --git a/lisp/help-mode.el b/lisp/help-mode.el
index 9924300647c..c1ce5a521be 100644
--- a/lisp/help-mode.el
+++ b/lisp/help-mode.el
@@ -505,14 +505,12 @@ that."
((and
(or (boundp sym)
(get sym 'variable-documentation))
- (condition-case err
- (or
- (documentation-property
- sym 'variable-documentation)
- (documentation-property
- (indirect-variable sym)
- 'variable-documentation))
- (error (message "No doc found: %S" err) nil)))
+ (or
+ (documentation-property
+ sym 'variable-documentation)
+ (documentation-property
+ (indirect-variable sym)
+ 'variable-documentation)))
(help-xref-button 8 'help-variable sym))
((fboundp sym)
(help-xref-button 8 'help-function sym)))))))
diff --git a/src/ChangeLog b/src/ChangeLog
index d6429501059..d753221b996 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
+2012-10-12 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * doc.c (get_doc_string): Don't signal an error if the file is missing.
+
2012-10-12 Jan Djärv <jan.h.d@swipnet.se>
* nsterm.m (hold_event_q): New static variable.
diff --git a/src/doc.c b/src/doc.c
index d2d664df266..9ead1addfba 100644
--- a/src/doc.c
+++ b/src/doc.c
@@ -144,7 +144,8 @@ get_doc_string (Lisp_Object filepos, bool unibyte, bool definition)
}
#endif
if (fd < 0)
- error ("Cannot open doc string file \"%s\"", name);
+ return concat3 (build_string ("Cannot open doc string file \""),
+ file, build_string ("\"\n"));
}
/* Seek only to beginning of disk block. */