branch: scratch/hyperbole
commit 12fa8e328d99738fe5f68f4c4a713b3581ea68da
Author: Stefan Monnier <[email protected]>
Commit: Stefan Monnier <[email protected]>
(man-show): Fix miscompilation
* hactypes.el (annot-bib): Avoid gratuitous `setq`.
(man-show): Declare `Man-notify-method` to fix miscompilation.
(rfc-toc): `select-buffer` doesn't exist.
---
hactypes.el | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/hactypes.el b/hactypes.el
index 1101ba186f..a56624fea3 100644
--- a/hactypes.el
+++ b/hactypes.el
@@ -32,14 +32,14 @@
;;; Standard Hyperbole action types
;;; ************************************************************************
-(defact annot-bib (key)
+(defact annot-bib (key) ;; FIXME: Clean up namespace use!
"Follow internal ref KEY within an annotated bibliography, delimiters=[]."
(interactive "sReference key (no []): ")
- (let ((key-regexp (concat "^[*]*[ \t]*\\[" (ebut:key-to-label key) "\\]"))
- citation)
- (if (save-excursion
- (goto-char (point-max))
- (setq citation (re-search-backward key-regexp nil t)))
+ (let* ((key-regexp (concat "^[*]*[ \t]*\\[" (ebut:key-to-label key) "\\]"))
+ (citation (save-excursion
+ (goto-char (point-max))
+ (re-search-backward key-regexp nil t))))
+ (if citation
(progn (hpath:display-buffer (current-buffer))
(goto-char citation)
(beginning-of-line))
@@ -689,6 +689,7 @@ package to display search results."
Uses `hpath:display-where' setting to control where the man page is displayed."
(interactive "sManual topic: ")
(require 'man)
+ (defvar Man-notify-method)
(let ((Man-notify-method 'meek))
(hpath:display-buffer (man topic))))
@@ -716,7 +717,7 @@ Optional SECTIONS-START limits toc entries to those after
that point."
(insert "Sections of " rfc-buf-name ":\n")
(set-buffer-modified-p nil))
(when opoint
- (select-buffer buf-name)
+ (set-buffer buf-name)
(goto-char opoint))))
(defact text-toc (section)