diff options
author | Richard M. Stallman <rms@gnu.org> | 1990-12-10 03:02:52 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1990-12-10 03:02:52 +0000 |
commit | a17f9e55b2b8868dcfe540b8bb51c43c17b8cd56 (patch) | |
tree | 736d58aa2cf599801a52bdef3fd6dd79bbb0d4ae /lisp/emacs-lisp | |
parent | 29975121ed73833df9696df91530e4718f19003e (diff) | |
download | emacs-a17f9e55b2b8868dcfe540b8bb51c43c17b8cd56.tar.gz emacs-a17f9e55b2b8868dcfe540b8bb51c43c17b8cd56.tar.bz2 emacs-a17f9e55b2b8868dcfe540b8bb51c43c17b8cd56.zip |
*** empty log message ***
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/lisp.el | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el index 9cd267a76f4..5851e4f3ac5 100644 --- a/lisp/emacs-lisp/lisp.el +++ b/lisp/emacs-lisp/lisp.el @@ -187,21 +187,17 @@ The defun marked is the one that contains point or follows point." "Put parentheses around next ARG sexps. Leave point after open-paren. No argument is equivalent to zero: just insert () and leave point between." (interactive "P") - (if arg (skip-chars-forward " \t")) + (if arg (setq arg (prefix-numeric-value arg)) + (setq arg 0)) + (or (eq arg 0) (skip-chars-forward " \t")) (and (memq (char-syntax (preceding-char)) '(?w ?_ ?\) )) (insert " ")) -; (or (memq (char-syntax (preceding-char)) '(?\ ?> ?\( )) -; (insert " "))) (insert ?\() (save-excursion - (if arg - (forward-sexp (prefix-numeric-value arg))) + (or (eq arg 0) (forward-sexp arg)) (insert ?\)) -; (or (memq (char-syntax (following-char)) '(?\ ?> ?\( )) -; (insert " ")) - (and (memq (char-syntax (following-char)) '(?w ?_ ?\( )) - (insert " ")) - )) + (and (memq (char-syntax (following-char)) '(?w ?_ ?\( )) + (insert " ")))) (defun move-past-close-and-reindent () "Move past next `)', delete indentation before it, then indent after it." |