Improved behaviour of SysRPL apropos feature.

This commit is contained in:
Paul Onions 2018-11-25 14:59:08 +00:00
parent 35c5a144af
commit 63607d3e93

View file

@ -79,6 +79,7 @@
(defvar sysrpl-mode-syntax-table
(let ((table (make-syntax-table prog-mode-syntax-table)))
(modify-syntax-entry ?. "w" table)
(modify-syntax-entry ?: "w" table)
(modify-syntax-entry ?\; "w" table)
(modify-syntax-entry ?! "w" table)
@ -172,7 +173,7 @@ When called interactively NAME defaults to the word around
point."
(interactive (list (completing-read "Apropos: " (rpl-edb-all-names (sysrpl-edb-calculator sysrpl-selected-calculator))
nil nil (thing-at-point 'word))))
(let ((bufname (format "*SysRPL: %s*" name)))
(let ((bufname (format "*sysrpl-apropos*" name)))
(with-current-buffer (get-buffer-create bufname)
(setq buffer-read-only nil)
(erase-buffer)
@ -184,7 +185,7 @@ point."
(newline)
(insert (format "Flags: %s" (rpl-edb-get-flags (sysrpl-edb-calculator sysrpl-selected-calculator) name)))
(newline)
(end-of-buffer)
(beginning-of-buffer)
(help-mode)
(set-buffer-modified-p nil)
(setq buffer-read-only t))