unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Vitalie Spinu <spinuvit@gmail.com>
To: "Drew Adams" <drew.adams@oracle.com>
Cc: 13273@debbugs.gnu.org
Subject: bug#13273: 24.3.50; [PATCH] enhancement request: repeatable `visual-line-mode' line movements
Date: Fri, 28 Dec 2012 21:33:53 +0100	[thread overview]
Message-ID: <87k3s1gbm6.fsf@gmail.com> (raw)
In-Reply-To: <2EEA1AD1B23B425DB6980D54D5B7BB79@us.oracle.com> (Drew Adams's message of "Fri, 28 Dec 2012 12:04:27 -0800")

  >> "Drew Adams" <drew.adams@oracle.com>
  >> on Fri, 28 Dec 2012 12:04:27 -0800 wrote:

  >> Here is a short version: apply patch -> test -> emacs 
  >> infloops on every single occasion, i.e "C-h k C-a", "M-q" etc.

  > Try just evaluating the new definitions and key bindings, instead of trying to
  > apply a patch etc.  That will show you the proposed behavior.  You should not
  > seen any errors, inflooping etc.

  > Someone intending to install the change to Emacs itself can worry about applying
  > the patch.  If you just want to evaluate the behavior, you need not do that.

I just did that, and as Eli said, this is a bad idea for built-in
functions.


But the problem with your function is far more simple:
   
   (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)))

How is this not an infloop?  ----------------^^^^^^^^^^^



    Vitalie
   







  reply	other threads:[~2012-12-28 20:33 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-24 22:27 bug#13273: 24.3.50; [PATCH] enhancement request: repeatable `visual-line-mode' line movements Drew Adams
2012-12-25 17:41 ` Eli Zaretskii
2012-12-26  5:59   ` Drew Adams
2012-12-26  6:32   ` Drew Adams
2012-12-27 10:08     ` Vitalie Spinu
2012-12-27 16:16       ` Drew Adams
2012-12-27 19:13         ` Vitalie Spinu
2012-12-27 19:35           ` Drew Adams
2012-12-28 18:06 ` Vitalie Spinu
2012-12-28 18:51   ` Drew Adams
2012-12-28 19:22     ` Vitalie Spinu
2012-12-28 19:36       ` Eli Zaretskii
2012-12-28 19:55         ` Vitalie Spinu
2012-12-28 20:13           ` Eli Zaretskii
2012-12-28 20:04       ` Drew Adams
2012-12-28 20:33         ` Vitalie Spinu [this message]
2012-12-28 21:05           ` Drew Adams
2019-06-27 12:04 ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k3s1gbm6.fsf@gmail.com \
    --to=spinuvit@gmail.com \
    --cc=13273@debbugs.gnu.org \
    --cc=drew.adams@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).