149 |
Negative arg -N means kill N sexps after the cursor." |
Negative arg -N means kill N sexps after the cursor." |
150 |
(interactive "p") |
(interactive "p") |
151 |
(kill-sexp (- (or arg 1)))) |
(kill-sexp (- (or arg 1)))) |
152 |
|
|
153 |
|
;; After Zmacs: |
154 |
|
(defun kill-backward-up-list (&optional arg) |
155 |
|
"Kill the form containing the current sexp, leaving the sexp itself. |
156 |
|
A prefix argument ARG causes the relevant number of surrounding |
157 |
|
forms to be removed." |
158 |
|
(interactive "*p") |
159 |
|
(let ((current-sexp (thing-at-point 'sexp))) |
160 |
|
(if current-sexp |
161 |
|
(save-excursion |
162 |
|
(backward-up-list arg) |
163 |
|
(kill-sexp) |
164 |
|
(insert current-sexp)) |
165 |
|
(error "Not at a sexp")))) |
166 |
|
|
167 |
(defvar beginning-of-defun-function nil |
(defvar beginning-of-defun-function nil |
168 |
"If non-nil, function for `beginning-of-defun-raw' to call. |
"If non-nil, function for `beginning-of-defun-raw' to call. |