emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/follow.el,v


From: Juanma Barranquero
Subject: [Emacs-diffs] Changes to emacs/lisp/follow.el,v
Date: Fri, 19 Oct 2007 10:53:59 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Juanma Barranquero <lektu>      07/10/19 10:53:59

Index: follow.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/follow.el,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -b -r1.42 -r1.43
--- follow.el   11 Oct 2007 11:44:05 -0000      1.42
+++ follow.el   19 Oct 2007 10:53:58 -0000      1.43
@@ -712,7 +712,7 @@
 ;;}}}
 ;;{{{ Movement
 
-;; Note, these functions are not very useful, atleast not unless you
+;; Note, these functions are not very useful, at least not unless you
 ;; rebind the rather cumbersome key sequence `C-c . p'.
 
 (defun follow-next-window ()
@@ -1267,7 +1267,7 @@
     (let ((done nil)
          win-start
          res)
-      ;; Always calculate what happend when no line is displayed in the first
+      ;; Always calculate what happens when no line is displayed in the first
       ;; window. (The `previous' res is needed below!)
       (goto-char guess)
       (vertical-motion 0 (car windows))
@@ -1508,9 +1508,9 @@
                    (setq win-start-end (follow-windows-start-end windows))
                    (follow-invalidate-cache)
                    ;; When the point ends up in another window. This
-                   ;; happends when dest is in the beginning of the
+                   ;; happens when dest is in the beginning of the
                    ;; file and the selected window is not the first.
-                   ;; It can also, in rare situations happend when
+                   ;; It can also, in rare situations happen when
                    ;; long lines are used and there is a big
                    ;; difference between the width of the windows.
                    ;; (When scrolling one line in a wide window which
@@ -2162,6 +2162,37 @@
 
 ;;{{{ The end
 
+(defun follow-unload-function ()
+  (easy-menu-remove-item nil '("Tools") "Follow")
+  (follow-stop-intercept-process-output)
+  (dolist (group '((before
+                   ;; XEmacs
+                   isearch-done
+                   ;; both
+                   set-process-filter sit-for move-overlay)
+                  (after
+                   ;; Emacs
+                   scroll-bar-drag scroll-bar-drag-1 scroll-bar-scroll-down
+                   scroll-bar-scroll-up scroll-bar-set-window-start
+                   ;; XEmacs
+                   scrollbar-line-down scrollbar-line-up scrollbar-page-down
+                   scrollbar-page-up scrollbar-to-bottom scrollbar-to-top
+                   scrollbar-vertical-drag
+                   ;; both
+                   process-filter)))
+    (let ((class (car group)))
+      (dolist (fun (cdr group))
+       (when (functionp fun)
+         (condition-case nil
+             (progn
+               (ad-remove-advice fun class
+                                 (intern (concat "follow-" (symbol-name fun))))
+               (ad-update fun))
+           (error nil))))))
+  nil)
+
+(defvar follow-unload-function 'follow-unload-function)
+
 ;;
 ;; We're done!
 ;;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]