diff options
| author | Richard M. Stallman | 2003-04-24 01:56:55 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2003-04-24 01:56:55 +0000 |
| commit | ad4888e42d508a3c8afd338d49ef1e8508f1e1ba (patch) | |
| tree | 2d9dfdbcddf6724dab01d0f9a013b52632b09674 | |
| parent | cfce85d83910bf2abe2d0b057b13617cdfbbd820 (diff) | |
| download | emacs-ad4888e42d508a3c8afd338d49ef1e8508f1e1ba.tar.gz emacs-ad4888e42d508a3c8afd338d49ef1e8508f1e1ba.zip | |
(help-make-xrefs): Clean up the loop that scans
over a keymap inserted by \\{...}; it now stops at end of buffer.
| -rw-r--r-- | lisp/help-mode.el | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/lisp/help-mode.el b/lisp/help-mode.el index 03a711115db..6e8ab0e34a2 100644 --- a/lisp/help-mode.el +++ b/lisp/help-mode.el | |||
| @@ -386,23 +386,27 @@ that." | |||
| 386 | (goto-char (point-min)) | 386 | (goto-char (point-min)) |
| 387 | ;; Find a header and the column at which the command | 387 | ;; Find a header and the column at which the command |
| 388 | ;; name will be found. | 388 | ;; name will be found. |
| 389 | |||
| 390 | ;; If the keymap substitution isn't the last thing in | ||
| 391 | ;; the doc string, and if there is anything on the | ||
| 392 | ;; same line after it, this code won't recognize the end of it. | ||
| 389 | (while (re-search-forward "^key +binding\n\\(-+ +\\)-+\n\n" | 393 | (while (re-search-forward "^key +binding\n\\(-+ +\\)-+\n\n" |
| 390 | nil t) | 394 | nil t) |
| 391 | (let ((col (- (match-end 1) (match-beginning 1)))) | 395 | (let ((col (- (match-end 1) (match-beginning 1)))) |
| 392 | (while | 396 | (while |
| 393 | ;; Ignore single blank lines in table, but not | 397 | (and (not (eobp)) |
| 394 | ;; double ones, which should terminate it. | 398 | ;; Stop at a pair of blank lines. |
| 395 | (and (not (looking-at "\n\\s-*\n")) | 399 | (not (looking-at "\n\\s-*\n"))) |
| 396 | (progn | 400 | ;; Skip a single blank line. |
| 397 | (and (eolp) (forward-line)) | 401 | (and (eolp) (forward-line)) |
| 398 | (end-of-line) | 402 | (end-of-line) |
| 399 | (skip-chars-backward "^\t\n") | 403 | (skip-chars-backward "^\t\n") |
| 400 | (if (and (>= (current-column) col) | 404 | (if (and (>= (current-column) col) |
| 401 | (looking-at "\\(\\sw\\|-\\)+$")) | 405 | (looking-at "\\(\\sw\\|-\\)+$")) |
| 402 | (let ((sym (intern-soft (match-string 0)))) | 406 | (let ((sym (intern-soft (match-string 0)))) |
| 403 | (if (fboundp sym) | 407 | (if (fboundp sym) |
| 404 | (help-xref-button 0 'help-function sym)))) | 408 | (help-xref-button 0 'help-function sym)))) |
| 405 | (zerop (forward-line))))))))) | 409 | (forward-line))))))) |
| 406 | (set-syntax-table stab)) | 410 | (set-syntax-table stab)) |
| 407 | ;; Delete extraneous newlines at the end of the docstring | 411 | ;; Delete extraneous newlines at the end of the docstring |
| 408 | (goto-char (point-max)) | 412 | (goto-char (point-max)) |