[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: line-move-visual never set to nil?
From: |
Chong Yidong |
Subject: |
Re: line-move-visual never set to nil? |
Date: |
Tue, 29 Jul 2008 10:34:08 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
"Andrew W. Nosenko" <address@hidden> writes:
> The biggest problem with "visual" line motion ... is that current
> defaults are beaks keybord macro. Just try to record some macro that
> uses up/down key having wrapped lines, change width of the
> window/frame and enjoy. :-(
That's a good point. That's also why line-move doesn't try to scroll
tall images when executing a keyboard macro. Maybe line-move-visual
needs the same treatment, like in the following patch. WDYT?
*** trunk/lisp/simple.el.~1.939.~ 2008-07-28 10:55:05.000000000 -0400
--- trunk/lisp/simple.el 2008-07-29 10:32:51.000000000 -0400
***************
*** 3978,3994 ****
;; a cleaner solution to the problem of making C-n do something
;; useful given a tall image.
(defun line-move (arg &optional noerror to-end try-vscroll)
! (unless (and auto-window-vscroll try-vscroll
! ;; Only vscroll for single line moves
! (= (abs arg) 1)
! ;; But don't vscroll in a keyboard macro.
! (not defining-kbd-macro)
! (not executing-kbd-macro)
! (line-move-partial arg noerror to-end))
! (set-window-vscroll nil 0 t)
! (if line-move-visual
! (line-move-visual arg noerror)
! (line-move-1 arg noerror to-end))))
;; Display-based alternative to line-move-1.
;; Arg says how many lines to move. The value is t if we can move the
--- 3978,3996 ----
;; a cleaner solution to the problem of making C-n do something
;; useful given a tall image.
(defun line-move (arg &optional noerror to-end try-vscroll)
! (if (or defining-kbd-macro executing-kbd-macro)
! ;; If inside a keyboard macro, don't vscroll and don't move by
! ;; screen lines.
! (progn (set-window-vscroll nil 0 t)
! (line-move-1 arg noerror to-end))
! ;; Otherwise, only vscroll for single line moves
! (unless (and auto-window-vscroll try-vscroll
! (= (abs arg) 1)
! (line-move-partial arg noerror to-end))
! (set-window-vscroll nil 0 t)
! (if line-move-visual
! (line-move-visual arg noerror)
! (line-move-1 arg noerror to-end)))))
;; Display-based alternative to line-move-1.
;; Arg says how many lines to move. The value is t if we can move the
- Re: line-move-visual never set to nil?, (continued)
- Re: line-move-visual never set to nil?, Chong Yidong, 2008/07/26
- Re: line-move-visual never set to nil?, T. V. Raman, 2008/07/26
- Re: line-move-visual never set to nil?, David Reitter, 2008/07/27
- Re: line-move-visual never set to nil?, Andrew W. Nosenko, 2008/07/29
- Re: line-move-visual never set to nil?,
Chong Yidong <=
- Re: line-move-visual never set to nil?, Lennart Borgman, 2008/07/29
- Re: line-move-visual never set to nil?, Stefan Monnier, 2008/07/29
- Re: line-move-visual never set to nil?, Chong Yidong, 2008/07/29
- Re: line-move-visual never set to nil?, David Reitter, 2008/07/29
- Re: line-move-visual never set to nil?, Chong Yidong, 2008/07/29
- Re: line-move-visual never set to nil?, Lennart Borgman (gmail), 2008/07/29
- Re: line-move-visual never set to nil?, Stefan Monnier, 2008/07/29
- Re: line-move-visual never set to nil?, David De La Harpe Golden, 2008/07/29
- Re: line-move-visual never set to nil?, Miles Bader, 2008/07/29
- Re: line-move-visual never set to nil?, David Reitter, 2008/07/29