[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Zmacs' kill-backward-up-list
From: |
Emilio Lopes |
Subject: |
Zmacs' kill-backward-up-list |
Date: |
Sun, 29 Aug 2004 16:29:53 +0200 |
User-agent: |
Emacs Gnus |
This Zmacs function seems to be missing in GNU Emacs. I find
it very useful when programming Lisp/Scheme.
;; the Zmacs function `kill-backward-up-list':
(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"))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Zmacs' kill-backward-up-list,
Emilio Lopes <=