summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/lisp.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-09-22 06:42:30 +0000
committerRichard M. Stallman <rms@gnu.org>1994-09-22 06:42:30 +0000
commit6696af6580eea3a04f6459758b78817ee0f9d216 (patch)
tree43bd3665530cb708aa56cf91aac1b2931e1cc855 /lisp/emacs-lisp/lisp.el
parent973e88732100a0b474a36459e6079325517044ca (diff)
downloademacs-6696af6580eea3a04f6459758b78817ee0f9d216.tar.gz
emacs-6696af6580eea3a04f6459758b78817ee0f9d216.tar.bz2
emacs-6696af6580eea3a04f6459758b78817ee0f9d216.zip
(insert-parentheses): Don't insert spaces at beginning and end of buffer.
Diffstat (limited to 'lisp/emacs-lisp/lisp.el')
-rw-r--r--lisp/emacs-lisp/lisp.el2
1 files changed, 2 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el
index 07a22698c6e..fd9ae0c078a 100644
--- a/lisp/emacs-lisp/lisp.el
+++ b/lisp/emacs-lisp/lisp.el
@@ -218,6 +218,7 @@ before and after, depending on the surrounding characters."
(setq arg 0))
(or (eq arg 0) (skip-chars-forward " \t"))
(and parens-require-spaces
+ (not (bobp))
(memq (char-syntax (preceding-char)) '(?w ?_ ?\) ))
(insert " "))
(insert ?\()
@@ -225,6 +226,7 @@ before and after, depending on the surrounding characters."
(or (eq arg 0) (forward-sexp arg))
(insert ?\))
(and parens-require-spaces
+ (not (eobp))
(memq (char-syntax (following-char)) '(?w ?_ ?\( ))
(insert " "))))