chiark / gitweb /
el/dot-emacs.el: Wrap `save-excursion' around `hs-hide-all' hack.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 28 Nov 2009 17:54:57 +0000 (17:54 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 28 Nov 2009 17:54:57 +0000 (17:54 +0000)
Stops point from moving to the top of the buffer.

el/dot-emacs.el

index cd0ee1056ae88b82655d34d38e044d3e10482428..e4e7f8d499ba82ab206b3630b9a51a5271da5615 100644 (file)
@@ -2237,7 +2237,7 @@ (defun mdw-outline-collapse-all ()
 (setq hs-hide-comments-when-hiding-all nil)
 
 (defadvice hs-hide-all (after hide-first-comment activate)
-  (hs-hide-initial-comment-block))
+  (save-excursion (hs-hide-initial-comment-block)))
 
 ;;;--------------------------------------------------------------------------
 ;;; Shell mode.