diff options
author | Gerd Moellmann <gerd@gnu.org> | 2001-01-26 09:23:17 +0000 |
---|---|---|
committer | Gerd Moellmann <gerd@gnu.org> | 2001-01-26 09:23:17 +0000 |
commit | 207d7545b7d72fbfa68402cd45441f563cecd5df (patch) | |
tree | a9178f5cf92566e314d2bd4e61e8561c189f7ed4 /lisp/simple.el | |
parent | 219227ead0447814c838935b8d5d06fd2095546d (diff) | |
download | emacs-207d7545b7d72fbfa68402cd45441f563cecd5df.tar.gz |
(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.el | 15 |
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." (interactive "*p") (let* ((do-fill-prefix (and fill-prefix (bolp))) (do-left-margin (and (bolp) (> (current-left-margin) 0))) - (loc (point))) + (loc (point)) + ;; Don't expand an abbrev before point. + (abbrev-mode nil)) (newline arg) (goto-char loc) (while (> arg 0) @@ -2391,12 +2393,11 @@ using `forward-line' instead. It is usually easier to use and more reliable (no dependence on goal column, etc.)." (interactive "p") (if (and next-line-add-newlines (= arg 1)) - (let ((opoint (point))) - (end-of-line) - (if (eobp) - (newline 1) - (goto-char opoint) - (line-move arg))) + (if (save-excursion (end-of-line) (eobp)) + ;; When adding a newline, don't expand an abbrev. + (let ((abbrev-mode nil)) + (newline 1)) + (line-move arg)) (if (interactive-p) (condition-case nil (line-move arg) |