Mercurial > emacs
changeset 35589:e334380bbb2c
(next-line): Don't let `newline' expand abbrevs.
Simplify slightly.
(open-line): Don't let `newline' expand abbrevs.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Fri, 26 Jan 2001 09:22:47 +0000 |
parents | 31904bdf4350 |
children | c6e87bfc63db |
files | lisp/simple.el |
diffstat | 1 files changed, 8 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/simple.el Fri Jan 26 06:19:25 2001 +0000 +++ b/lisp/simple.el Fri Jan 26 09:22:47 2001 +0000 @@ -141,7 +141,9 @@ (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 @@ 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)