emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r105795: Fix bug #971 with next/previ


From: Eli Zaretskii
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r105795: Fix bug #971 with next/previous-line when goal-column is set.
Date: Fri, 16 Sep 2011 20:15:16 +0300
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 105795
fixes bug(s): http://debbugs.gnu.org/971
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Fri 2011-09-16 20:15:16 +0300
message:
  Fix bug #971 with next/previous-line when goal-column is set.
  
   lisp/simple.el (line-move): If goal-column is set, move by logical
   lines, not by display lines.
   (next-line, previous-line, goal-column, line-move-visual): Doc fix
   to reflect the above change.
modified:
  lisp/ChangeLog
  lisp/simple.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-09-16 13:46:42 +0000
+++ b/lisp/ChangeLog    2011-09-16 17:15:16 +0000
@@ -1,3 +1,10 @@
+2011-09-16  Eli Zaretskii  <address@hidden>
+
+       * simple.el (line-move): If goal-column is set, move by logical
+       lines, not by display lines.  (Bug#971)
+       (next-line, previous-line, goal-column, line-move-visual): Doc fix
+       to reflect the above change.
+
 2011-09-16  Stefan Monnier  <address@hidden>
 
        * image.el (imagemagick-register-types): Use regexp-opt.

=== modified file 'lisp/simple.el'
--- a/lisp/simple.el    2011-09-10 03:02:06 +0000
+++ b/lisp/simple.el    2011-09-16 17:15:16 +0000
@@ -4134,7 +4134,9 @@
 Then instead of trying to move exactly vertically (or as close as possible),
 this command moves to the specified goal column (or as close as possible).
 The goal column is stored in the variable `goal-column', which is nil
-when there is no goal column.
+when there is no goal column.  Note that setting `goal-column'
+overrides `line-move-visual' and causes this command to move by buffer
+lines rather than by display lines.
 
 If you are thinking of using this in a Lisp program, consider
 using `forward-line' instead.  It is usually easier to use
@@ -4172,7 +4174,9 @@
 Then instead of trying to move exactly vertically (or as close as possible),
 this command moves to the specified goal column (or as close as possible).
 The goal column is stored in the variable `goal-column', which is nil
-when there is no goal column.
+when there is no goal column.  Note that setting `goal-column'
+overrides `line-move-visual' and causes this command to move by buffer
+lines rather than by display lines.
 
 If you are thinking of using this in a Lisp program, consider using
 `forward-line' with a negative argument instead.  It is usually easier
@@ -4196,7 +4200,8 @@
   :group 'editing-basics)
 
 (defcustom goal-column nil
-  "Semipermanent goal column for vertical motion, as set by 
\\[set-goal-column], or nil."
+  "Semipermanent goal column for vertical motion, as set by 
\\[set-goal-column], or nil.
+A non-nil setting overrides `line-move-visual', which see."
   :type '(choice integer
                 (const :tag "None" nil))
   :group 'editing-basics)
@@ -4226,7 +4231,9 @@
 This movement is based on where the cursor is displayed on the
 screen, instead of relying on buffer contents alone.  It takes
 into account variable-width characters and line continuation.
-If nil, `line-move' moves point by logical lines."
+If nil, `line-move' moves point by logical lines.
+A non-nil setting of `goal-column' overrides the value of this variable
+and forces movement by logical lines."
   :type 'boolean
   :group 'editing-basics
   :version "23.1")
@@ -4303,7 +4310,7 @@
               (not executing-kbd-macro)
               (line-move-partial arg noerror to-end))
     (set-window-vscroll nil 0 t)
-    (if line-move-visual
+    (if (and line-move-visual (not goal-column))
        (line-move-visual arg noerror)
       (line-move-1 arg noerror to-end))))
 


reply via email to

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