Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
de6d64b2
Commit
de6d64b2
authored
Sep 04, 2004
by
Eli Zaretskii
Browse files
(kill-backward-up-list): New function.
parent
0ad10447
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
lisp/emacs-lisp/lisp.el
lisp/emacs-lisp/lisp.el
+14
-0
No files found.
lisp/emacs-lisp/lisp.el
View file @
de6d64b2
...
...
@@ -149,6 +149,20 @@ With ARG, kill that many sexps before the cursor.
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.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment