(let ((inhibit-read-only t)
(name (caar docs)) ;Name of doc currently at BOB.
(doc (cdr (cadr docs)))) ;Doc to add at BOB.
- (insert doc)
- (delete-region (point) (progn (skip-chars-backward " \t\n") (point)))
- (insert "\n\n"
- (eval-when-compile
- (propertize "\n" 'face '(:height 0.1 :inverse-video t)))
- "\n")
- (when name
- (insert (symbol-name symbol)
- " is also a " name "." "\n\n")))
+ (when doc
+ (insert doc)
+ (delete-region (point)
+ (progn (skip-chars-backward " \t\n") (point)))
+ (insert "\n\n"
+ (eval-when-compile
+ (propertize "\n" 'face '(:height 0.1 :inverse-video t)))
+ "\n")
+ (when name
+ (insert (symbol-name symbol)
+ " is also a " name "." "\n\n"))))
(setq docs (cdr docs)))
(unless single
;; Don't record the `describe-variable' item in the stack.
(should (search-forward
"(defgh\\\\\\[universal-argument\\]b\\`c\\'d\\\\e\\\"f X)"))))
+(ert-deftest help-fns-test-describe-symbol ()
+ "Test the `describe-symbol' function."
+ ;; 'describe-symbol' would originally signal an error for
+ ;; 'font-lock-comment-face'.
+ (describe-symbol 'font-lock-comment-face)
+ (with-current-buffer "*Help*"
+ (should (> (point-max) 1))
+ (goto-char (point-min))
+ (should (looking-at "^font-lock-comment-face is "))))
+
;;; help-fns.el ends here