diff lisp/simple.el @ 83296:effe22690419

Merged from miles@gnu.org--gnu-2005 (patch 281-285) Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-281 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-282 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-283 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-284 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-285 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-336
author Karoly Lorentey <lorentey@elte.hu>
date Mon, 02 May 2005 14:38:00 +0000
parents bbf359ec4a59 5f3a630ef0ac
children b151ec53c504
line wrap: on
line diff
--- a/lisp/simple.el	Tue Apr 26 12:17:42 2005 +0000
+++ b/lisp/simple.el	Mon May 02 14:38:00 2005 +0000
@@ -113,7 +113,9 @@
 (defvar next-error-highlight-timer nil)
 
 (defvar next-error-overlay-arrow-position nil)
-(put 'next-error-overlay-arrow-position 'overlay-arrow-string "=>")
+;; This is nil so as not to really display anything on text
+;; terminals.  On text terminals, it would hide part of the file name.
+(put 'next-error-overlay-arrow-position 'overlay-arrow-string "")
 (add-to-list 'overlay-arrow-variable-list 'next-error-overlay-arrow-position)
 
 (defvar next-error-last-buffer nil
@@ -3407,19 +3409,33 @@
 		  (goto-char (next-char-property-change (point))))
 		;; Now move a line.
 		(end-of-line)
-		(and (zerop (vertical-motion 1))
-		     (if (not noerror)
-			 (signal 'end-of-buffer nil)
-		       (setq done t)))
+		;; If there's no invisibility here, move over the newline.
+		(if (not (line-move-invisible-p (point)))
+		    ;; We avoid vertical-motion when possible
+		    ;; because that has to fontify.
+		    (if (eobp)
+			(setq done t)
+		      (forward-line 1))
+		  ;; Otherwise move a more sophisticated way.
+		  ;; (What's the logic behind this code?)
+		  (and (zerop (vertical-motion 1))
+		       (if (not noerror)
+			   (signal 'end-of-buffer nil)
+			 (setq done t))))
 		(unless done
 		  (setq arg (1- arg))))
+	      ;; The logic of this is the same as the loop above, 
+	      ;; it just goes in the other direction.
 	      (while (and (< arg 0) (not done))
 		(beginning-of-line)
-
-		(if (zerop (vertical-motion -1))
-		    (if (not noerror)
-			(signal 'beginning-of-buffer nil)
-		      (setq done t)))
+		(if (not (line-move-invisible-p (1- (point))))
+		    (if (bobp)
+			(setq done t)
+		      (forward-line -1))
+		  (if (zerop (vertical-motion -1))
+		      (if (not noerror)
+			  (signal 'beginning-of-buffer nil)
+			(setq done t))))
 		(unless done
 		  (setq arg (1+ arg))
 		  (while (and ;; Don't move over previous invis lines