emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: move-beginning-of-line misbehaves on wrapped-line invisible text - r


From: Ken Manheimer
Subject: Re: move-beginning-of-line misbehaves on wrapped-line invisible text - recent cvs checkout
Date: Mon, 23 Jan 2006 15:47:28 -0500

i now have a fix i'm more confident about, because (1) it takes care
of another problem i noticed, even with my previous fix, and (2) it
departs less from the checked-in version of the function, leaving less
room for betrayal of unfamiliar concerns.  here's the diff from
simple.el 1.786:

Index: simple.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/simple.el,v
retrieving revision 1.786
diff -u -u -r1.786 simple.el
--- simple.el   23 Jan 2006 04:05:59 -0000      1.786
+++ simple.el   23 Jan 2006 20:46:34 -0000
@@ -3735,11 +3735,14 @@
   (or arg (setq arg 1))
   (if (/= arg 1)
       (line-move (1- arg) t))
-
+
   ;; Move to beginning-of-line, ignoring fields and invisibles.
   (skip-chars-backward "^\n")
   (while (and (not (bobp)) (line-move-invisible-p (1- (point))))
-    (goto-char (previous-char-property-change (1- (point))))
+    (goto-char (previous-char-property-change
+                (if (line-move-invisible-p (point))
+                    (point)
+                  (1- (point)))))
     (skip-chars-backward "^\n"))

   (let ((orig (point)))
@@ -3747,7 +3750,6 @@
     (if (/= orig (point))
        (goto-char (constrain-to-field (point) orig (/= arg 1) t nil)))))

-
 ;;; Many people have said they rarely use this feature, and often type
 ;;; it by accident.  Maybe it shouldn't even be on a key.
 (put 'set-goal-column 'disabled t)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]