Mercurial > emacs
comparison lisp/emacs-lisp/lisp.el @ 8996:06a5ceb0fb21
(insert-parentheses): Don't insert spaces at beginning and end of buffer.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 22 Sep 1994 06:42:30 +0000 |
parents | f9e57f3ecc9d |
children | 83f275dcd93a |
comparison
equal
deleted
inserted
replaced
8995:2281d87b7c91 | 8996:06a5ceb0fb21 |
---|---|
216 (interactive "P") | 216 (interactive "P") |
217 (if arg (setq arg (prefix-numeric-value arg)) | 217 (if arg (setq arg (prefix-numeric-value arg)) |
218 (setq arg 0)) | 218 (setq arg 0)) |
219 (or (eq arg 0) (skip-chars-forward " \t")) | 219 (or (eq arg 0) (skip-chars-forward " \t")) |
220 (and parens-require-spaces | 220 (and parens-require-spaces |
221 (not (bobp)) | |
221 (memq (char-syntax (preceding-char)) '(?w ?_ ?\) )) | 222 (memq (char-syntax (preceding-char)) '(?w ?_ ?\) )) |
222 (insert " ")) | 223 (insert " ")) |
223 (insert ?\() | 224 (insert ?\() |
224 (save-excursion | 225 (save-excursion |
225 (or (eq arg 0) (forward-sexp arg)) | 226 (or (eq arg 0) (forward-sexp arg)) |
226 (insert ?\)) | 227 (insert ?\)) |
227 (and parens-require-spaces | 228 (and parens-require-spaces |
229 (not (eobp)) | |
228 (memq (char-syntax (following-char)) '(?w ?_ ?\( )) | 230 (memq (char-syntax (following-char)) '(?w ?_ ?\( )) |
229 (insert " ")))) | 231 (insert " ")))) |
230 | 232 |
231 (defun move-past-close-and-reindent () | 233 (defun move-past-close-and-reindent () |
232 "Move past next `)', delete indentation before it, then indent after it." | 234 "Move past next `)', delete indentation before it, then indent after it." |