changeset 17214:15e868121a15

(newline): Be more conservative about when to use the optimization. (universal-argument-more): If previous arg is `-', change that to -4.
author Richard M. Stallman <rms@gnu.org>
date Sat, 22 Mar 1997 03:54:14 +0000
parents d6eb07a26f03
children 21e3f467224e
files lisp/simple.el
diffstat 1 files changed, 16 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/simple.el	Sat Mar 22 03:53:10 1997 +0000
+++ b/lisp/simple.el	Sat Mar 22 03:54:14 1997 +0000
@@ -39,8 +39,20 @@
   ;; the end of the previous line.
   (let ((flag (and (not (bobp)) 
 		   (bolp)
+		   ;; Make sure no functions want to be told about
+		   ;; the range of the changes.
+		   (not after-change-function)
+		   (not before-change-function)
+		   (not after-change-functions)
+		   (not before-change-functions)
 		   ;; Make sure there are no markers here.
 		   (not (buffer-has-markers-at (1- (point))))
+		   ;; Make sure no text properties want to know
+		   ;; where the change was.
+		   (not (get-char-property (1- (point)) 'modification-hooks))
+		   (not (get-char-property (1- (point)) 'insert-behind-hooks))
+		   (or (eobp)
+		       (not (get-char-property (point) 'insert-in-front-hooks)))
 		   ;; Make sure the newline before point isn't intangible.
 		   (not (get-char-property (1- (point)) 'intangible))
 		   ;; Make sure the newline before point isn't read-only.
@@ -1003,8 +1015,10 @@
   (interactive "P")
   (if (consp arg)
       (setq prefix-arg (list (* 4 (car arg))))
-    (setq prefix-arg arg)
-    (setq overriding-terminal-local-map nil))
+    (if (eq arg '-)
+	(setq prefix-arg (list -4))
+      (setq prefix-arg arg)
+      (setq overriding-terminal-local-map nil)))
   (setq universal-argument-num-events (length (this-command-keys))))
 
 (defun negative-argument (arg)