X-Git-Url: https://git.distorted.org.uk/~mdw/profile/blobdiff_plain/8945a62fdffc085386d22bcbe8d6a20643d7e5e5..3260d9c4edcb845b7b441d42c294942957bee5ce:/el/dot-emacs.el?ds=sidebyside diff --git a/el/dot-emacs.el b/el/dot-emacs.el index 8ac22bb..0ff628b 100644 --- a/el/dot-emacs.el +++ b/el/dot-emacs.el @@ -169,6 +169,17 @@ library." (set-frame-parameter frame 'menu-bar-lines 0) (set-frame-parameter frame 'menu-bar-lines old))) +;; Page motion. + +(defun mdw-fixup-page-position () + (unless (eq (char-before (point)) ? ) + (forward-line 0))) + +(defadvice backward-page (after mdw-fixup compile activate) + (mdw-fixup-page-position)) +(defadvice forward-page (after mdw-fixup compile activate) + (mdw-fixup-page-position)) + ;; Splitting windows. (unless (fboundp 'scroll-bar-columns)