mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 14:30:50 -08:00
(parens-require-spaces): Var renamed and sense changed.
(insert-parentheses): Corresponding changes.
This commit is contained in:
parent
5bd65b3b64
commit
78e367e9ae
1 changed files with 4 additions and 4 deletions
|
|
@ -30,8 +30,8 @@
|
|||
(defvar defun-prompt-regexp nil
|
||||
"Non-nil => regexp to ignore, before the `(' that starts a defun.")
|
||||
|
||||
(defvar parens-dont-require-spaces nil
|
||||
"Non-nil => `insert-parentheses' should not insert whitespace.")
|
||||
(defvar parens-require-spaces t
|
||||
"Non-nil => `insert-parentheses' should insert whitespace as needed.")
|
||||
|
||||
(defun forward-sexp (&optional arg)
|
||||
"Move forward across one balanced expression (sexp).
|
||||
|
|
@ -205,14 +205,14 @@ depending on the surrounding characters."
|
|||
(if arg (setq arg (prefix-numeric-value arg))
|
||||
(setq arg 0))
|
||||
(or (eq arg 0) (skip-chars-forward " \t"))
|
||||
(and (not parens-dont-require-spaces)
|
||||
(and parens-require-spaces
|
||||
(memq (char-syntax (preceding-char)) '(?w ?_ ?\) ))
|
||||
(insert " "))
|
||||
(insert ?\()
|
||||
(save-excursion
|
||||
(or (eq arg 0) (forward-sexp arg))
|
||||
(insert ?\))
|
||||
(and (not parens-dont-require-spaces)
|
||||
(and parens-require-spaces
|
||||
(memq (char-syntax (following-char)) '(?w ?_ ?\( ))
|
||||
(insert " "))))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue