Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
282d6eae
Commit
282d6eae
authored
Sep 04, 2004
by
Eli Zaretskii
Browse files
(next-error-follow-mode, next-error-follow-mode-post-command-hook):
New functions. (next-error-follow-last-line): New defvar.
parent
f5e9cb97
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
lisp/simple.el
lisp/simple.el
+26
-0
No files found.
lisp/simple.el
View file @
282d6eae
...
...
@@ -249,6 +249,32 @@ If `fringe-arrow', indicate the locus by the fringe arrow."
(
const
:tag
"Fringe arrow"
'fringe-arrow
))
:group
'next-error
:version
"21.4"
)
;;; Internal variable for `next-error-follow-mode-post-command-hook'.
(
defvar
next-error-follow-last-line
nil
)
(
define-minor-mode
next-error-follow-mode
"Minor mode for compilation, occur and diff modes.
When turned on, cursor motion in the compilation, occur or diff
buffer determines the cursor in the corresponding buffer to move
to the corresponding position. "
nil
" Fol"
nil
(
if
(
not
next-error-follow-mode
)
(
remove-hook
'post-command-hook
'next-error-follow-mode-post-command-hook
t
)
(
add-hook
'post-command-hook
'next-error-follow-mode-post-command-hook
nil
t
)
(
make-variable-buffer-local
'next-error-follow-last-line
)))
;;; Used as a `post-command-hook' by `next-error-follow-mode'
;;; for the *Compilation* *grep* and *Occur* buffers.
(
defun
next-error-follow-mode-post-command-hook
()
(
unless
(
equal
next-error-follow-last-line
(
line-number-at-pos
))
(
setq
next-error-follow-last-line
(
line-number-at-pos
))
(
condition-case
nil
(
let
((
compilation-context-lines
nil
))
(
setq
compilation-current-error
(
point
))
(
next-error-no-select
0
))
(
error
t
))))
;;;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment