;;; lisp.el --- Lisp editing commands for Emacs
-;; Copyright (C) 1985, 1986 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1986, 1994 Free Software Foundation, Inc.
;; Maintainer: FSF
;; Keywords: lisp, languages
"*Non-nil => regexp to ignore, before the character that starts a defun.
This is only necessary if the opening paren or brace is not in column 0.
See `beginning-of-defun'.")
+(make-variable-buffer-local 'defun-prompt-regexp)
(defvar parens-require-spaces t
"Non-nil => `insert-parentheses' should insert whitespace as needed.")
This is identical to beginning-of-defun, except that point does not move
to the beginning of the line when `defun-prompt-regexp' is non-nil."
(interactive "p")
- (and arg (< arg 0) (forward-char 1))
+ (and arg (< arg 0) (not (eobp)) (forward-char 1))
(and (re-search-backward (if defun-prompt-regexp
(concat "^\\s(\\|"
"\\(" defun-prompt-regexp "\\)\\s(")
(setq arg 0))
(or (eq arg 0) (skip-chars-forward " \t"))
(and parens-require-spaces
+ (not (bobp))
(memq (char-syntax (preceding-char)) '(?w ?_ ?\) ))
(insert " "))
(insert ?\()
(or (eq arg 0) (forward-sexp arg))
(insert ?\))
(and parens-require-spaces
+ (not (eobp))
(memq (char-syntax (following-char)) '(?w ?_ ?\( ))
(insert " "))))
(insert completion))
(t
(message "Making completion list...")
- (let ((list (all-completions pattern obarray predicate)))
+ (let ((list (all-completions pattern obarray predicate))
+ (completion-fixup-function
+ (function (lambda () (if (save-excursion
+ (goto-char (max (point-min) (- (point) 4)))
+ (looking-at " <f>"))
+ (forward-char -4))))))
(or (eq predicate 'fboundp)
(let (new)
(while list
new))
(setq list (cdr list)))
(setq list (nreverse new))))
- (with-output-to-temp-buffer " *Completions*"
+ (with-output-to-temp-buffer "*Completions*"
(display-completion-list list)))
(message "Making completion list...%s" "done")))))