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
fc779383
Commit
fc779383
authored
Oct 19, 2007
by
Juanma Barranquero
Browse files
(follow-unload-function): New function.
parent
7b82c3b6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
4 deletions
+37
-4
lisp/ChangeLog
lisp/ChangeLog
+2
-0
lisp/follow.el
lisp/follow.el
+35
-4
No files found.
lisp/ChangeLog
View file @
fc779383
2007-10-19 Juanma Barranquero <lekktu@gmail.com>
2007-10-19 Juanma Barranquero <lekktu@gmail.com>
* follow.el (follow-unload-function): New function.
* loadhist.el (unload-function-features-list):
* loadhist.el (unload-function-features-list):
Rename from `unload-hook-features-list'.
Rename from `unload-hook-features-list'.
(unload-hook-features-list): Add as obsolete alias.
(unload-hook-features-list): Add as obsolete alias.
...
...
lisp/follow.el
View file @
fc779383
...
@@ -712,7 +712,7 @@ in your `~/.emacs' file:
...
@@ -712,7 +712,7 @@ in your `~/.emacs' file:
;;}}}
;;}}}
;;{{{ Movement
;;{{{ 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'.
;; rebind the rather cumbersome key sequence `C-c . p'.
(defun follow-next-window ()
(defun follow-next-window ()
...
@@ -1267,7 +1267,7 @@ position of the first window. Otherwise it is a good guess."
...
@@ -1267,7 +1267,7 @@ position of the first window. Otherwise it is a good guess."
(let ((done nil)
(let ((done nil)
win-start
win-start
res)
res)
;; Always calculate what happen
d
when no line is displayed in the first
;; Always calculate what happen
s
when no line is displayed in the first
;; window. (The `previous' res is needed below!)
;; window. (The `previous' res is needed below!)
(goto-char guess)
(goto-char guess)
(vertical-motion 0 (car windows))
(vertical-motion 0 (car windows))
...
@@ -1508,9 +1508,9 @@ non-first windows in Follow mode."
...
@@ -1508,9 +1508,9 @@ non-first windows in Follow mode."
(setq win-start-end (follow-windows-start-end windows))
(setq win-start-end (follow-windows-start-end windows))
(follow-invalidate-cache)
(follow-invalidate-cache)
;; When the point ends up in another window. This
;; When the point ends up in another window. This
;; happen
d
s 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.
;; file and the selected window is not the first.
;; It can also, in rare situations happen
d
when
;; It can also, in rare situations happen when
;; long lines are used and there is a big
;; long lines are used and there is a big
;; difference between the width of the windows.
;; difference between the width of the windows.
;; (When scrolling one line in a wide window which
;; (When scrolling one line in a wide window which
...
@@ -2162,6 +2162,37 @@ This prevents `mouse-drag-region' from messing things up."
...
@@ -2162,6 +2162,37 @@ This prevents `mouse-drag-region' from messing things up."
;;{{{ The end
;;{{{ 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!
;; We're done!
;;
;;
...
...
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