mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-29 11:02:01 +00:00
(help-make-xrefs): Clean up the loop that scans
over a keymap inserted by \\{...}; it now stops at end of buffer.
This commit is contained in:
parent
cfce85d839
commit
ad4888e42d
@ -386,23 +386,27 @@ that."
|
|||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
;; Find a header and the column at which the command
|
;; Find a header and the column at which the command
|
||||||
;; name will be found.
|
;; name will be found.
|
||||||
|
|
||||||
|
;; If the keymap substitution isn't the last thing in
|
||||||
|
;; the doc string, and if there is anything on the
|
||||||
|
;; same line after it, this code won't recognize the end of it.
|
||||||
(while (re-search-forward "^key +binding\n\\(-+ +\\)-+\n\n"
|
(while (re-search-forward "^key +binding\n\\(-+ +\\)-+\n\n"
|
||||||
nil t)
|
nil t)
|
||||||
(let ((col (- (match-end 1) (match-beginning 1))))
|
(let ((col (- (match-end 1) (match-beginning 1))))
|
||||||
(while
|
(while
|
||||||
;; Ignore single blank lines in table, but not
|
(and (not (eobp))
|
||||||
;; double ones, which should terminate it.
|
;; Stop at a pair of blank lines.
|
||||||
(and (not (looking-at "\n\\s-*\n"))
|
(not (looking-at "\n\\s-*\n")))
|
||||||
(progn
|
;; Skip a single blank line.
|
||||||
(and (eolp) (forward-line))
|
(and (eolp) (forward-line))
|
||||||
(end-of-line)
|
(end-of-line)
|
||||||
(skip-chars-backward "^\t\n")
|
(skip-chars-backward "^\t\n")
|
||||||
(if (and (>= (current-column) col)
|
(if (and (>= (current-column) col)
|
||||||
(looking-at "\\(\\sw\\|-\\)+$"))
|
(looking-at "\\(\\sw\\|-\\)+$"))
|
||||||
(let ((sym (intern-soft (match-string 0))))
|
(let ((sym (intern-soft (match-string 0))))
|
||||||
(if (fboundp sym)
|
(if (fboundp sym)
|
||||||
(help-xref-button 0 'help-function sym))))
|
(help-xref-button 0 'help-function sym))))
|
||||||
(zerop (forward-line)))))))))
|
(forward-line)))))))
|
||||||
(set-syntax-table stab))
|
(set-syntax-table stab))
|
||||||
;; Delete extraneous newlines at the end of the docstring
|
;; Delete extraneous newlines at the end of the docstring
|
||||||
(goto-char (point-max))
|
(goto-char (point-max))
|
||||||
|
Loading…
Reference in New Issue
Block a user