emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master f3062c4104: ; * lisp/emacs-lisp/lisp.el (raise-sexp): Doc fix. (


From: Eli Zaretskii
Subject: master f3062c4104: ; * lisp/emacs-lisp/lisp.el (raise-sexp): Doc fix. (Bug#55788)
Date: Mon, 6 Jun 2022 10:11:00 -0400 (EDT)

branch: master
commit f3062c41048143e065a95d035e4a932f5457648a
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    ; * lisp/emacs-lisp/lisp.el (raise-sexp): Doc fix.  (Bug#55788)
---
 lisp/emacs-lisp/lisp.el | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el
index d6086abe59..641ce0d5c0 100644
--- a/lisp/emacs-lisp/lisp.el
+++ b/lisp/emacs-lisp/lisp.el
@@ -857,10 +857,14 @@ The option `delete-pair-blink-delay' can disable 
blinking."
          (delete-char -1)))
       (delete-char 1))))
 
-(defun raise-sexp (&optional arg)
-  "Raise ARG sexps higher up the tree.
-This means that the ARGth enclosing form will be deleted and
-replaced with the form that follows point.
+(defun raise-sexp (&optional n)
+  "Raise N sexps one level higher up the tree.
+
+This function removes the sexp enclosing the form which follows
+point, and then re-inserts N sexps that originally followe point,
+thus raising those N sexps one level up.
+
+Interactively, N is the numeric prefix argument, and defaults to 1.
 
 For instance, if you have:
 
@@ -879,7 +883,7 @@ and point is before (zot), \\[raise-sexp] will give you
                (buffer-substring (region-beginning) (region-end))
              (buffer-substring
               (point)
-              (save-excursion (forward-sexp arg) (point))))))
+              (save-excursion (forward-sexp n) (point))))))
     (backward-up-list 1)
     (delete-region (point) (save-excursion (forward-sexp 1) (point)))
     (save-excursion (insert s))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]