[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
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/lisp.el |
Date: |
Sat, 04 Sep 2004 09:08:25 -0400 |
Index: emacs/lisp/emacs-lisp/lisp.el
diff -c emacs/lisp/emacs-lisp/lisp.el:1.56 emacs/lisp/emacs-lisp/lisp.el:1.57
*** emacs/lisp/emacs-lisp/lisp.el:1.56 Thu Sep 2 09:43:38 2004
--- emacs/lisp/emacs-lisp/lisp.el Sat Sep 4 12:56:54 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.