Mercurial > hg > xemacs-beta
comparison lisp/prim/lisp.el @ 159:3bb7ccffb0c0 r20-3b6
Import from CVS: tag r20-3b6
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:41:43 +0200 |
parents | 43dd3413c7c7 |
children | 0132846995bd |
comparison
equal
deleted
inserted
replaced
158:558dfa75ffb3 | 159:3bb7ccffb0c0 |
---|---|
25 ;;; Synched up with: Emacs/Mule zeta. | 25 ;;; Synched up with: Emacs/Mule zeta. |
26 | 26 |
27 ;;; Commentary: | 27 ;;; Commentary: |
28 | 28 |
29 ;; Lisp editing commands to go with Lisp major mode. | 29 ;; Lisp editing commands to go with Lisp major mode. |
30 | |
31 ;; 06/11/1997 - Use char-(after|before) instead of | |
32 ;; (following|preceding)-char. -slb | |
30 | 33 |
31 ;;; Code: | 34 ;;; Code: |
32 | 35 |
33 ;; Note that this variable is used by non-lisp modes too. | 36 ;; Note that this variable is used by non-lisp modes too. |
34 (defvar defun-prompt-regexp nil | 37 (defvar defun-prompt-regexp nil |
255 (setq arg 0)) | 258 (setq arg 0)) |
256 (cond ((> arg 0) (skip-chars-forward " \t")) | 259 (cond ((> arg 0) (skip-chars-forward " \t")) |
257 ((< arg 0) (forward-sexp arg) (setq arg (- arg)))) | 260 ((< arg 0) (forward-sexp arg) (setq arg (- arg)))) |
258 (and parens-require-spaces | 261 (and parens-require-spaces |
259 (not (bobp)) | 262 (not (bobp)) |
260 (memq (char-syntax (preceding-char)) '(?w ?_ ?\) )) | 263 (memq (char-syntax (char-before (point))) '(?w ?_ ?\) )) |
261 (insert " ")) | 264 (insert " ")) |
262 (insert ?\() | 265 (insert ?\() |
263 (save-excursion | 266 (save-excursion |
264 (or (eq arg 0) (forward-sexp arg)) | 267 (or (eq arg 0) (forward-sexp arg)) |
265 (insert ?\)) | 268 (insert ?\)) |
266 (and parens-require-spaces | 269 (and parens-require-spaces |
267 (not (eobp)) | 270 (not (eobp)) |
268 (memq (char-syntax (following-char)) '(?w ?_ ?\( )) | 271 (memq (char-syntax (char-after (point))) '(?w ?_ ?\( )) |
269 (insert " ")))) | 272 (insert " ")))) |
270 | 273 |
271 (defun move-past-close-and-reindent () | 274 (defun move-past-close-and-reindent () |
272 "Move past next `)', delete indentation before it, then indent after it." | 275 "Move past next `)', delete indentation before it, then indent after it." |
273 (interactive) | 276 (interactive) |
296 (save-excursion | 299 (save-excursion |
297 ;; XEmacs change | 300 ;; XEmacs change |
298 (if emacs-lisp-mode-syntax-table | 301 (if emacs-lisp-mode-syntax-table |
299 (set-syntax-table emacs-lisp-mode-syntax-table)) | 302 (set-syntax-table emacs-lisp-mode-syntax-table)) |
300 (backward-sexp 1) | 303 (backward-sexp 1) |
301 (while (= (char-syntax (following-char)) ?\') | 304 (while (eq (char-syntax (char-after (point))) ?\') |
302 (forward-char 1)) | 305 (forward-char 1)) |
303 (point)) | 306 (point)) |
304 (set-syntax-table buffer-syntax))) | 307 (set-syntax-table buffer-syntax))) |
305 (pattern (buffer-substring beg end)) | 308 (pattern (buffer-substring beg end)) |
306 (predicate | 309 (predicate |