aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/simple.el
diff options
context:
space:
mode:
authorGerd Moellmann2001-01-26 09:23:17 +0000
committerGerd Moellmann2001-01-26 09:23:17 +0000
commit207d7545b7d72fbfa68402cd45441f563cecd5df (patch)
treea9178f5cf92566e314d2bd4e61e8561c189f7ed4 /lisp/simple.el
parent219227ead0447814c838935b8d5d06fd2095546d (diff)
downloademacs-207d7545b7d72fbfa68402cd45441f563cecd5df.tar.gz
emacs-207d7545b7d72fbfa68402cd45441f563cecd5df.zip
(next-line): Don't let `newline' expand abbrevs.
Simplify slightly. (open-line): Don't let `newline' expand abbrevs.
Diffstat (limited to 'lisp/simple.el')
-rw-r--r--lisp/simple.el15
1 files changed, 8 insertions, 7 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index 9053b565276..36780f1a0b2 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -141,7 +141,9 @@ With arg N, insert N newlines."
141 (interactive "*p") 141 (interactive "*p")
142 (let* ((do-fill-prefix (and fill-prefix (bolp))) 142 (let* ((do-fill-prefix (and fill-prefix (bolp)))
143 (do-left-margin (and (bolp) (> (current-left-margin) 0))) 143 (do-left-margin (and (bolp) (> (current-left-margin) 0)))
144 (loc (point))) 144 (loc (point))
145 ;; Don't expand an abbrev before point.
146 (abbrev-mode nil))
145 (newline arg) 147 (newline arg)
146 (goto-char loc) 148 (goto-char loc)
147 (while (> arg 0) 149 (while (> arg 0)
@@ -2391,12 +2393,11 @@ using `forward-line' instead. It is usually easier to use
2391and more reliable (no dependence on goal column, etc.)." 2393and more reliable (no dependence on goal column, etc.)."
2392 (interactive "p") 2394 (interactive "p")
2393 (if (and next-line-add-newlines (= arg 1)) 2395 (if (and next-line-add-newlines (= arg 1))
2394 (let ((opoint (point))) 2396 (if (save-excursion (end-of-line) (eobp))
2395 (end-of-line) 2397 ;; When adding a newline, don't expand an abbrev.
2396 (if (eobp) 2398 (let ((abbrev-mode nil))
2397 (newline 1) 2399 (newline 1))
2398 (goto-char opoint) 2400 (line-move arg))
2399 (line-move arg)))
2400 (if (interactive-p) 2401 (if (interactive-p)
2401 (condition-case nil 2402 (condition-case nil
2402 (line-move arg) 2403 (line-move arg)