1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-24 10:38:38 +00:00

(insert-parentheses): Don't insert spaces at beginning and end of buffer.

This commit is contained in:
Richard M. Stallman 1994-09-22 06:42:30 +00:00
parent 973e887321
commit 6696af6580

View File

@ -218,6 +218,7 @@ before and after, depending on the surrounding characters."
(setq arg 0)) (setq arg 0))
(or (eq arg 0) (skip-chars-forward " \t")) (or (eq arg 0) (skip-chars-forward " \t"))
(and parens-require-spaces (and parens-require-spaces
(not (bobp))
(memq (char-syntax (preceding-char)) '(?w ?_ ?\) )) (memq (char-syntax (preceding-char)) '(?w ?_ ?\) ))
(insert " ")) (insert " "))
(insert ?\() (insert ?\()
@ -225,6 +226,7 @@ before and after, depending on the surrounding characters."
(or (eq arg 0) (forward-sexp arg)) (or (eq arg 0) (forward-sexp arg))
(insert ?\)) (insert ?\))
(and parens-require-spaces (and parens-require-spaces
(not (eobp))
(memq (char-syntax (following-char)) '(?w ?_ ?\( )) (memq (char-syntax (following-char)) '(?w ?_ ?\( ))
(insert " ")))) (insert " "))))