diff options
| author | Juanma Barranquero | 2007-10-08 16:13:18 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2007-10-08 16:13:18 +0000 |
| commit | ee3c2877bf62577130d2d91731cceaced9cdad98 (patch) | |
| tree | f02710015d82c8ada1dfe7e4b31e7bbc3c43d175 | |
| parent | b861ffc3440c317c60b0eb86609044f4db9d2010 (diff) | |
| download | emacs-ee3c2877bf62577130d2d91731cceaced9cdad98.tar.gz emacs-ee3c2877bf62577130d2d91731cceaced9cdad98.zip | |
(follow-mode): Don't run hooks twice. Use `when'.
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/follow.el | 14 |
2 files changed, 10 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b98dac1e432..b8dab0b4989 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2007-10-08 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * follow.el (follow-mode): Don't run hooks twice. Use `when'. | ||
| 4 | |||
| 1 | 2007-10-07 Glenn Morris <rgm@gnu.org> | 5 | 2007-10-07 Glenn Morris <rgm@gnu.org> |
| 2 | 6 | ||
| 3 | * simple.el (bad-packages-alist): Clarify Semantic and CEDET | 7 | * simple.el (bad-packages-alist): Clarify Semantic and CEDET |
diff --git a/lisp/follow.el b/lisp/follow.el index e28edae846e..eddb1037a43 100644 --- a/lisp/follow.el +++ b/lisp/follow.el | |||
| @@ -602,20 +602,18 @@ is called. When turned off, `follow-mode-off-hook' is called. | |||
| 602 | Keys specific to Follow mode: | 602 | Keys specific to Follow mode: |
| 603 | \\{follow-mode-map}" | 603 | \\{follow-mode-map}" |
| 604 | :keymap follow-mode-map | 604 | :keymap follow-mode-map |
| 605 | (if (and follow-mode follow-intercept-processes) | 605 | (when (and follow-mode follow-intercept-processes) |
| 606 | (follow-intercept-process-output)) | 606 | (follow-intercept-process-output)) |
| 607 | (cond (follow-mode ; On | 607 | (cond (follow-mode ; On |
| 608 | ;; XEmacs: If this is non-nil, the window will scroll before | 608 | ;; XEmacs: If this is non-nil, the window will scroll before |
| 609 | ;; the point will have a chance to get into the next window. | 609 | ;; the point will have a chance to get into the next window. |
| 610 | (if (boundp 'scroll-on-clipped-lines) | 610 | (when (boundp 'scroll-on-clipped-lines) |
| 611 | (setq scroll-on-clipped-lines nil)) | 611 | (setq scroll-on-clipped-lines nil)) |
| 612 | (force-mode-line-update) | 612 | (force-mode-line-update) |
| 613 | (add-hook 'post-command-hook 'follow-post-command-hook t) | 613 | (add-hook 'post-command-hook 'follow-post-command-hook t)) |
| 614 | (run-hooks 'follow-mode-hook)) | ||
| 615 | 614 | ||
| 616 | ((not follow-mode) ; Off | 615 | ((not follow-mode) ; Off |
| 617 | (force-mode-line-update) | 616 | (force-mode-line-update)))) |
| 618 | (run-hooks 'follow-mode-off-hook)))) | ||
| 619 | 617 | ||
| 620 | ;;}}} | 618 | ;;}}} |
| 621 | ;;{{{ Find file hook | 619 | ;;{{{ Find file hook |