emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r112549: * progmodes/octave.el (octav


From: Leo Liu
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r112549: * progmodes/octave.el (octave-beginning-of-line)
Date: Sat, 11 May 2013 11:50:34 +0800
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 112549
committer: Leo Liu <address@hidden>
branch nick: trunk
timestamp: Sat 2013-05-11 11:50:34 +0800
message:
  * progmodes/octave.el (octave-beginning-of-line)
  (octave-end-of-line): Check before using up-list because it jumps
  out of more syntactic contructs since moving to smie.
modified:
  lisp/ChangeLog
  lisp/progmodes/octave.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-05-11 02:27:28 +0000
+++ b/lisp/ChangeLog    2013-05-11 03:50:34 +0000
@@ -1,3 +1,9 @@
+2013-05-11  Leo Liu  <address@hidden>
+
+       * progmodes/octave.el (octave-beginning-of-line)
+       (octave-end-of-line): Check before using up-list because it jumps
+       out of more syntactic contructs since moving to smie.
+
 2013-05-11  Glenn Morris  <address@hidden>
 
        * faces.el (internal-face-x-get-resource):
@@ -89,7 +95,7 @@
 2013-05-09  Leo Liu  <address@hidden>
 
        * progmodes/octave.el (inferior-octave-completion-at-point):
-       Restore the broken file completion.  (Bug#14300)
+       Restore file completion.  (Bug#14300)
        (inferior-octave-startup): Fix incorrect highlighting for the
        first prompt.
 

=== modified file 'lisp/progmodes/octave.el'
--- a/lisp/progmodes/octave.el  2013-05-10 06:26:42 +0000
+++ b/lisp/progmodes/octave.el  2013-05-11 03:50:34 +0000
@@ -1107,45 +1107,43 @@
 If on an empty or comment line, go to the beginning of that line.
 Otherwise, move backward to the beginning of the first Octave code line
 which is not inside a continuation statement, i.e., which does not
-follow a code line ending in `...' or `\\', or is inside an open
+follow a code line ending with `...' or is inside an open
 parenthesis list."
   (interactive)
   (beginning-of-line)
-  (if (not (looking-at "\\s-*\\($\\|\\s<\\)"))
-      (while (or (condition-case nil
-                    (progn
-                      (up-list -1)
-                      (beginning-of-line)
-                      t)
-                  (error nil))
-                (and (or (looking-at "\\s-*\\($\\|\\s<\\)")
-                         (save-excursion
-                           (if (zerop (octave-previous-code-line))
-                               (looking-at octave-continuation-regexp))))
-                     (zerop (forward-line -1)))))))
+  (unless (looking-at "\\s-*\\($\\|\\s<\\)")
+    (while (or (when (cadr (syntax-ppss))
+                 (goto-char (cadr (syntax-ppss)))
+                 (beginning-of-line)
+                 t)
+               (and (or (looking-at "\\s-*\\($\\|\\s<\\)")
+                        (save-excursion
+                          (if (zerop (octave-previous-code-line))
+                              (looking-at octave-continuation-regexp))))
+                    (zerop (forward-line -1)))))))
 
 (defun octave-end-of-line ()
   "Move point to end of current Octave line.
 If on an empty or comment line, go to the end of that line.
 Otherwise, move forward to the end of the first Octave code line which
-does not end in `...' or `\\' or is inside an open parenthesis list."
+does not end with `...' or is inside an open parenthesis list."
   (interactive)
   (end-of-line)
-  (if (save-excursion
-       (beginning-of-line)
-       (looking-at "\\s-*\\($\\|\\s<\\)"))
-      ()
-    (while (or (condition-case nil
-                  (progn
-                    (up-list 1)
-                    (end-of-line)
-                    t)
-                (error nil))
-              (and (save-excursion
-                     (beginning-of-line)
-                     (or (looking-at "\\s-*\\($\\|\\s<\\)")
-                         (looking-at octave-continuation-regexp)))
-                   (zerop (forward-line 1)))))
+  (unless (save-excursion
+            (beginning-of-line)
+            (looking-at "\\s-*\\($\\|\\s<\\)"))
+    (while (or (when (cadr (syntax-ppss))
+                 (condition-case nil
+                     (progn
+                       (up-list 1)
+                       (end-of-line)
+                       t)
+                   (error nil)))
+               (and (save-excursion
+                      (beginning-of-line)
+                      (or (looking-at "\\s-*\\($\\|\\s<\\)")
+                          (looking-at octave-continuation-regexp)))
+                    (zerop (forward-line 1)))))
     (end-of-line)))
 
 (defun octave-mark-block ()


reply via email to

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