[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/lisp.el [lexbind]
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/lisp.el [lexbind] |
Date: |
Wed, 15 Sep 2004 20:43:46 -0400 |
Index: emacs/lisp/emacs-lisp/lisp.el
diff -c emacs/lisp/emacs-lisp/lisp.el:1.46.4.8
emacs/lisp/emacs-lisp/lisp.el:1.46.4.9
*** emacs/lisp/emacs-lisp/lisp.el:1.46.4.8 Sat Sep 4 09:28:13 2004
--- emacs/lisp/emacs-lisp/lisp.el Thu Sep 16 00:12:21 2004
***************
*** 149,154 ****
--- 149,168 ----
Negative arg -N means kill N sexps after the cursor."
(interactive "p")
(kill-sexp (- (or arg 1))))
+
+ ;; After Zmacs:
+ (defun kill-backward-up-list (&optional arg)
+ "Kill the form containing the current sexp, leaving the sexp itself.
+ A prefix argument ARG causes the relevant number of surrounding
+ forms to be removed."
+ (interactive "*p")
+ (let ((current-sexp (thing-at-point 'sexp)))
+ (if current-sexp
+ (save-excursion
+ (backward-up-list arg)
+ (kill-sexp)
+ (insert current-sexp))
+ (error "Not at a sexp"))))
(defvar beginning-of-defun-function nil
"If non-nil, function for `beginning-of-defun-raw' to call.