[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#13273: 24.3.50; [PATCH] enhancement request: repeatable `visual-line
From: |
Vitalie Spinu |
Subject: |
bug#13273: 24.3.50; [PATCH] enhancement request: repeatable `visual-line-mode' line movements |
Date: |
Fri, 28 Dec 2012 19:06:56 +0100 |
User-agent: |
Gnus/5.130004 (Ma Gnus v0.4) Emacs/24.2.91 (gnu/linux) |
>> "Drew Adams" <drew.adams@oracle.com>
>> on Mon, 24 Dec 2012 14:27:14 -0800 wrote:
[...]
> diff -c c\:/foo/simple.el c\:/foo/simple-patched-2012-12-24.el
> *** c:/foo/simple.el Mon Dec 24 13:48:06 2012
> --- c:/foo/simple-patched-2012-12-24.el Mon Dec 24 14:13:14 2012
> ***************
> *** 819,824 ****
> --- 819,854 ----
> (overlay-recenter (point))
> (recenter -3))))
> + (defun end-of-line (&optional n)
> + "Move cursor to end of current line or end of next line if repeated.
> + If called interactively with no prefix arg:
> + If the previous command was also `end-of-line' then move to the
> + end of the next line. Else move to the end of the current line.
> + Otherwise, move to the end of the Nth next line (Nth previous line
> + if N <0 )."
> + (interactive
> + (list (if current-prefix-arg (prefix-numeric-value current-prefix-arg)
0)))
> + (unless n (setq n 0)) ; non-interactive with no arg
> + (if (and (eq this-command last-command) (not current-prefix-arg))
> + (forward-line 1)
> + (forward-line n))
> + (let ((inhibit-field-text-motion t)) (end-of-line)))
> +
> + (defun beginning-of-line (&optional n)
> + "Move cursor to beginning of current line or next line if repeated.
> + If called interactively with no prefix arg:
> + If the previous command was also `beginning-of-line' then move to the
> + beginning of the previous line. Else move to the beginning of the
> + current line.
> + Otherwise, move to the beginning of the Nth previous line (Nth next
> + line if N < 0)."
> + (interactive
> + (list (if current-prefix-arg (prefix-numeric-value current-prefix-arg)
0)))
> + (unless n (setq n 0)) ; non-interactive with no arg
> + (if (and (eq this-command last-command) (not current-prefix-arg))
> + (forward-line -1)
> + (forward-line (- n))))
> +
This stuff doesn't work at all for me. Huge amount of misbehavior.
A couple of them, backward-paragraph hangs emacs,
typing after fill-column infloops. 'C-h k key' doesn't work, for
example C-h k C-a shows C-a in the minibuffer and waits ... Many other
editing commands stall emacs.
When writing this mail I got
Debugger entered--Lisp error: (error "Lisp nesting exceeds
`max-lisp-eval-depth'")
with 600 lines backtrace.
[...]
> ***************
> *** 5098,5105 ****
> (defvar visual-line-mode-map
> (let ((map (make-sparse-keymap)))
> (define-key map [remap kill-line] 'kill-visual-line)
> ! (define-key map [remap move-beginning-of-line]
'beginning-of-visual-line)
> ! (define-key map [remap move-end-of-line] 'end-of-visual-line)
> ;; These keybindings interfere with xterm function keys. Are
> ;; there any other suitable bindings?
> ;; (define-key map "\M-[" 'previous-logical-line)
> --- 5145,5154 ----
> (defvar visual-line-mode-map
> (let ((map (make-sparse-keymap)))
> (define-key map [remap kill-line] 'kill-visual-line)
> ! (define-key map [home] 'beginning-of-line)
> ! (define-key map [end] 'end-of-line)
> ! (define-key map "\C-a" 'beginning-of-visual-line)
> ! (define-key map "\C-e" 'end-of-visual-line)
> ;; These keybindings interfere with xterm function keys. Are
> ;; there any other suitable bindings?
> ;; (define-key map "\M-[" 'previous-logical-line)
[remap move-beginning-of-line] wasn't there for nothing, or was it?
Sorry,
but
I
think
it
should
be
something
much
less
intrusive
and
only
concerning beginning-of-visual-line and end-of-visible-line.
(^^^^--- Ah yes, fill-paragraph now produces this ... after C-g ... restarting
my emacs ...)
Best,
Vitalie
bug#13273: 24.3.50; [PATCH] enhancement request: repeatable `visual-line-mode' line movements,
Vitalie Spinu <=
bug#13273: 24.3.50; [PATCH] enhancement request: repeatable `visual-line-mode' line movements, Drew Adams, 2012/12/28
bug#13273: 24.3.50; [PATCH] enhancement request: repeatable `visual-line-mode' line movements, Vitalie Spinu, 2012/12/28
bug#13273: 24.3.50; [PATCH] enhancement request: repeatable `visual-line-mode' line movements, Drew Adams, 2012/12/28