comparison lisp/simple.el @ 83201:8a6fd1c164cd

Merged in changes from CVS trunk. Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-521 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-522 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523 Merge from emacs--gnus--5.10, gnus--rel--5.10 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-524 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-525 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-526 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-527 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-528 Update from CVS * miles@gnu.org--gnu-2004/emacs--gnus--5.10--base-0 tag of miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-464 * miles@gnu.org--gnu-2004/emacs--gnus--5.10--patch-1 Import from CVS branch gnus-5_10-branch * miles@gnu.org--gnu-2004/emacs--gnus--5.10--patch-2 Merge from lorentey@elte.hu--2004/emacs--multi-tty--0, emacs--cvs-trunk--0 * miles@gnu.org--gnu-2004/emacs--gnus--5.10--patch-3 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/emacs--gnus--5.10--patch-4 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-18 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-19 Remove autoconf-generated files from archive * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-20 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-241
author Karoly Lorentey <lorentey@elte.hu>
date Mon, 06 Sep 2004 07:53:44 +0000
parents cc29203a9a04 f8e248e9a717
children 42acc7fa8a4f
comparison
equal deleted inserted replaced
83200:cc29203a9a04 83201:8a6fd1c164cd
247 (const :tag "Persistent overlay" t) 247 (const :tag "Persistent overlay" t)
248 (const :tag "No highlighting" nil) 248 (const :tag "No highlighting" nil)
249 (const :tag "Fringe arrow" 'fringe-arrow)) 249 (const :tag "Fringe arrow" 'fringe-arrow))
250 :group 'next-error 250 :group 'next-error
251 :version "21.4") 251 :version "21.4")
252
253 ;;; Internal variable for `next-error-follow-mode-post-command-hook'.
254 (defvar next-error-follow-last-line nil)
255
256 (define-minor-mode next-error-follow-minor-mode
257 "Minor mode for compilation, occur and diff modes.
258 When turned on, cursor motion in the compilation, grep, occur or diff
259 buffer causes automatic display of the corresponding source code
260 location."
261 nil " Fol" nil
262 (if (not next-error-follow-mode)
263 (remove-hook 'post-command-hook 'next-error-follow-mode-post-command-hook t)
264 (add-hook 'post-command-hook 'next-error-follow-mode-post-command-hook nil t)
265 (make-variable-buffer-local 'next-error-follow-last-line)))
266
267 ;;; Used as a `post-command-hook' by `next-error-follow-mode'
268 ;;; for the *Compilation* *grep* and *Occur* buffers.
269 (defun next-error-follow-mode-post-command-hook ()
270 (unless (equal next-error-follow-last-line (line-number-at-pos))
271 (setq next-error-follow-last-line (line-number-at-pos))
272 (condition-case nil
273 (let ((compilation-context-lines nil))
274 (setq compilation-current-error (point))
275 (next-error-no-select 0))
276 (error t))))
277
252 278
253 ;;; 279 ;;;
254 280
255 (defun fundamental-mode () 281 (defun fundamental-mode ()
256 "Major mode not specialized for anything in particular. 282 "Major mode not specialized for anything in particular.