diff options
| author | Eli Zaretskii | 2018-04-22 20:39:46 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2018-04-22 20:39:46 +0300 |
| commit | 415e8593edfa582edd9d2c03748e9ae9cec5022c (patch) | |
| tree | fafbe16db0246a94dec73d2ee905477bddbe24b4 | |
| parent | d7faaef501eefb7c8a62af086b3cca7e86b635e7 (diff) | |
| download | emacs-415e8593edfa582edd9d2c03748e9ae9cec5022c.tar.gz emacs-415e8593edfa582edd9d2c03748e9ae9cec5022c.zip | |
Minor improvements of next-error docs
* lisp/simple.el (next-error-find-buffer-function)
(previous-error, next-error-select-buffer): Doc fixes.
* doc/emacs/maintaining.texi (Change Log Commands):
* doc/emacs/building.texi (Compilation Mode): Index the new
commands and variables. Improve wording.
(Bug#20493)
| -rw-r--r-- | doc/emacs/building.texi | 5 | ||||
| -rw-r--r-- | doc/emacs/maintaining.texi | 11 | ||||
| -rw-r--r-- | lisp/simple.el | 18 |
3 files changed, 23 insertions, 11 deletions
diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi index 1e2dac9534e..496c4275bc2 100644 --- a/doc/emacs/building.texi +++ b/doc/emacs/building.texi | |||
| @@ -190,6 +190,9 @@ compilation buffer produce automatic source display. | |||
| 190 | @item g | 190 | @item g |
| 191 | Re-run the last command whose output is shown in the | 191 | Re-run the last command whose output is shown in the |
| 192 | @file{*compilation*} buffer. | 192 | @file{*compilation*} buffer. |
| 193 | @item M-x next-error-select-buffer | ||
| 194 | Select a buffer to be used by next invocation of @code{next-error} and | ||
| 195 | @code{previous-error}. | ||
| 193 | @end table | 196 | @end table |
| 194 | 197 | ||
| 195 | @kindex M-g M-n | 198 | @kindex M-g M-n |
| @@ -212,6 +215,8 @@ the beginning of the compilation buffer, and visits the first locus. | |||
| 212 | @kbd{M-g M-p} or @kbd{M-g p} (@code{previous-error}) iterates | 215 | @kbd{M-g M-p} or @kbd{M-g p} (@code{previous-error}) iterates |
| 213 | through errors in the opposite direction. | 216 | through errors in the opposite direction. |
| 214 | 217 | ||
| 218 | @vindex next-error-find-buffer-function | ||
| 219 | @findex next-error-select-buffer | ||
| 215 | The @code{next-error} and @code{previous-error} commands don't just | 220 | The @code{next-error} and @code{previous-error} commands don't just |
| 216 | act on the errors or matches listed in @file{*compilation*} and | 221 | act on the errors or matches listed in @file{*compilation*} and |
| 217 | @file{*grep*} buffers; they also know how to iterate through error or | 222 | @file{*grep*} buffers; they also know how to iterate through error or |
diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index 649ca1ec51f..df8c4479000 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi | |||
| @@ -1640,14 +1640,15 @@ entry is considered a page. This facilitates editing the entries. | |||
| 1640 | @kbd{C-j} and auto-fill indent each new line like the previous line; | 1640 | @kbd{C-j} and auto-fill indent each new line like the previous line; |
| 1641 | this is convenient for entering the contents of an entry. | 1641 | this is convenient for entering the contents of an entry. |
| 1642 | 1642 | ||
| 1643 | You can use the @code{change-log-goto-source} command (by default | 1643 | @findex change-log-goto-source |
| 1644 | You can use the command @code{change-log-goto-source} (by default | ||
| 1644 | bound to @kbd{C-c C-c}) to go to the source location of the change log | 1645 | bound to @kbd{C-c C-c}) to go to the source location of the change log |
| 1645 | entry near point, when Change Log mode is on. Then subsequent | 1646 | entry near point, when Change Log mode is on. Then subsequent |
| 1646 | invocations of the @code{next-error} command (by default bound to | 1647 | invocations of the @code{next-error} command (by default bound to |
| 1647 | @kbd{M-g M-n}) will move between entries in the change log. You will | 1648 | @kbd{M-g M-n} and @kbd{C-x `}) will move between entries in the change |
| 1648 | jump to the actual site in the file that was changed, not just to the | 1649 | log. You will jump to the actual site in the file that was changed, |
| 1649 | next change log entry. You can also use @code{previous-error} to move | 1650 | not just to the next change log entry. You can also use |
| 1650 | back in the same list. | 1651 | @code{previous-error} to move back through the change log entries. |
| 1651 | 1652 | ||
| 1652 | @findex change-log-merge | 1653 | @findex change-log-merge |
| 1653 | You can use the command @kbd{M-x change-log-merge} to merge other | 1654 | You can use the command @kbd{M-x change-log-merge} to merge other |
diff --git a/lisp/simple.el b/lisp/simple.el index 56b89b36fd6..839a4dd2c6c 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -180,8 +180,12 @@ rejected, and the function returns nil." | |||
| 180 | (defcustom next-error-find-buffer-function #'ignore | 180 | (defcustom next-error-find-buffer-function #'ignore |
| 181 | "Function called to find a `next-error' capable buffer. | 181 | "Function called to find a `next-error' capable buffer. |
| 182 | This functions takes the same three arguments as the function | 182 | This functions takes the same three arguments as the function |
| 183 | `next-error-find-buffer', and returns the buffer to be used | 183 | `next-error-find-buffer', and should return the buffer to be |
| 184 | by the subsequent invocation of the command `next-error'." | 184 | used by the subsequent invocation of the command `next-error' |
| 185 | and `previous-error'. | ||
| 186 | If the function returns nil, `next-error-find-buffer' will | ||
| 187 | try to use the buffer it used previously, and failing that | ||
| 188 | all other buffers." | ||
| 185 | :type '(choice (const :tag "No default" ignore) | 189 | :type '(choice (const :tag "No default" ignore) |
| 186 | (const :tag "Single next-error capable buffer on selected frame" | 190 | (const :tag "Single next-error capable buffer on selected frame" |
| 187 | next-error-buffer-on-selected-frame) | 191 | next-error-buffer-on-selected-frame) |
| @@ -340,9 +344,9 @@ and TO-BUFFER is a target buffer." | |||
| 340 | (defun next-error-select-buffer (buffer) | 344 | (defun next-error-select-buffer (buffer) |
| 341 | "Select a `next-error' capable BUFFER and set it as the last used. | 345 | "Select a `next-error' capable BUFFER and set it as the last used. |
| 342 | This means that the selected buffer becomes the source of locations | 346 | This means that the selected buffer becomes the source of locations |
| 343 | for the subsequent invocation of `next-error'. Interactively, this command | 347 | for the subsequent invocation of `next-error' or `previous-error'. |
| 344 | allows selection only among buffers where `next-error-function' is bound to | 348 | Interactively, this command allows selection only among buffers |
| 345 | an appropriate function." | 349 | where `next-error-function' is bound to an appropriate function." |
| 346 | (interactive | 350 | (interactive |
| 347 | (list (get-buffer | 351 | (list (get-buffer |
| 348 | (read-buffer "Select next-error buffer: " nil nil | 352 | (read-buffer "Select next-error buffer: " nil nil |
| @@ -358,7 +362,9 @@ an appropriate function." | |||
| 358 | Prefix arg N says how many error messages to move backwards (or | 362 | Prefix arg N says how many error messages to move backwards (or |
| 359 | forwards, if negative). | 363 | forwards, if negative). |
| 360 | 364 | ||
| 361 | This operates on the output from the \\[compile] and \\[grep] commands." | 365 | This operates on the output from the \\[compile] and \\[grep] commands. |
| 366 | |||
| 367 | See `next-error' for the details." | ||
| 362 | (interactive "p") | 368 | (interactive "p") |
| 363 | (next-error (- (or n 1)))) | 369 | (next-error (- (or n 1)))) |
| 364 | 370 | ||