第三种,光标停留在屏幕上的某一行(stick the absolut line),无论怎么滚动,光标都不会移动。
;; scroll functions (defun hold-line-scroll-up() "Scroll the page with the cursor in the same line" (interactive) ;; move the cursor also (let ((tmp (current-column))) (scroll-up1) (line-move-to-column tmp) (forward-line1) ) )
(defun hold-line-scroll-down() "Scroll the page with the cursor in the same line" (interactive) ;; move the cursor also (let ((tmp (current-column))) (scroll-down1) (line-move-to-column tmp) (forward-line-1) ) )