emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs/lisp/emacs-lisp lisp.el


From: Alan Mackenzie
Subject: [Emacs-diffs] emacs/lisp/emacs-lisp lisp.el
Date: Wed, 26 Nov 2008 10:30:53 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Alan Mackenzie <acmacm> 08/11/26 10:30:53

Modified files:
        lisp/emacs-lisp: lisp.el 

Log message:
        (forward-sexp, backward-sexp, mark-sexp)
        (forward-list, backward-list, down-list, backward-up-list)
        (up-list, kill-sexp, backward-kill-sexp, kill-backward-up-list)
        (insert-pair, insert-parentheses):  State that the
        command assumes that point is not in a string or comment.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/emacs-lisp/lisp.el?cvsroot=emacs&r1=1.89&r2=1.90

Patches:
Index: lisp.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/emacs-lisp/lisp.el,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -b -r1.89 -r1.90
--- lisp.el     15 Aug 2008 00:06:12 -0000      1.89
+++ lisp.el     26 Nov 2008 10:30:53 -0000      1.90
@@ -51,8 +51,9 @@
 (defun forward-sexp (&optional arg)
   "Move forward across one balanced expression (sexp).
 With ARG, do it that many times.  Negative arg -N means
-move backward across N balanced expressions."
-  (interactive "p")
+move backward across N balanced expressions.
+This command assumes point is not in a string or comment."
+  (Interactive "p")
   (or arg (setq arg 1))
   (if forward-sexp-function
       (funcall forward-sexp-function arg)
@@ -62,7 +63,8 @@
 (defun backward-sexp (&optional arg)
   "Move backward across one balanced expression (sexp).
 With ARG, do it that many times.  Negative arg -N means
-move forward across N balanced expressions."
+move forward across N balanced expressions.
+This command assumes point is not in a string or comment."
   (interactive "p")
   (or arg (setq arg 1))
   (forward-sexp (- arg)))
@@ -73,7 +75,8 @@
 move to with the same argument.
 Interactively, if this command is repeated
 or (in Transient Mark mode) if the mark is active,
-it marks the next ARG sexps after the ones already marked."
+it marks the next ARG sexps after the ones already marked.
+This command assumes point is not in a string or comment."
   (interactive "P\np")
   (cond ((and allow-extend
              (or (and (eq last-command this-command) (mark t))
@@ -95,7 +98,8 @@
 (defun forward-list (&optional arg)
   "Move forward across one balanced group of parentheses.
 With ARG, do it that many times.
-Negative arg -N means move backward across N groups of parentheses."
+Negative arg -N means move backward across N groups of parentheses.
+This command assumes point is not in a string or comment."
   (interactive "p")
   (or arg (setq arg 1))
   (goto-char (or (scan-lists (point) arg 0) (buffer-end arg))))
@@ -103,7 +107,8 @@
 (defun backward-list (&optional arg)
   "Move backward across one balanced group of parentheses.
 With ARG, do it that many times.
-Negative arg -N means move forward across N groups of parentheses."
+Negative arg -N means move forward across N groups of parentheses.
+This command assumes point is not in a string or comment."
   (interactive "p")
   (or arg (setq arg 1))
   (forward-list (- arg)))
@@ -111,7 +116,8 @@
 (defun down-list (&optional arg)
   "Move forward down one level of parentheses.
 With ARG, do this that many times.
-A negative argument means move backward but still go down a level."
+A negative argument means move backward but still go down a level.
+This command assumes point is not in a string or comment."
   (interactive "p")
   (or arg (setq arg 1))
   (let ((inc (if (> arg 0) 1 -1)))
@@ -122,14 +128,16 @@
 (defun backward-up-list (&optional arg)
   "Move backward out of one level of parentheses.
 With ARG, do this that many times.
-A negative argument means move forward but still to a less deep spot."
+A negative argument means move forward but still to a less deep spot.
+This command assumes point is not in a string or comment."
   (interactive "p")
   (up-list (- (or arg 1))))
 
 (defun up-list (&optional arg)
   "Move forward out of one level of parentheses.
 With ARG, do this that many times.
-A negative argument means move backward but still to a less deep spot."
+A negative argument means move backward but still to a less deep spot.
+This command assumes point is not in a string or comment."
   (interactive "p")
   (or arg (setq arg 1))
   (let ((inc (if (> arg 0) 1 -1)))
@@ -140,7 +148,8 @@
 (defun kill-sexp (&optional arg)
   "Kill the sexp (balanced expression) following point.
 With ARG, kill that many sexps after point.
-Negative arg -N means kill N sexps before point."
+Negative arg -N means kill N sexps before point.
+This command assumes point is not in a string or comment."
   (interactive "p")
   (let ((opoint (point)))
     (forward-sexp (or arg 1))
@@ -149,7 +158,8 @@
 (defun backward-kill-sexp (&optional arg)
   "Kill the sexp (balanced expression) preceding point.
 With ARG, kill that many sexps before point.
-Negative arg -N means kill N sexps after point."
+Negative arg -N means kill N sexps after point.
+This command assumes point is not in a string or comment."
   (interactive "p")
   (kill-sexp (- (or arg 1))))
 
@@ -157,7 +167,8 @@
 (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."
+forms to be removed.
+This command assumes point is not in a string or comment."
   (interactive "*p")
   (let ((current-sexp (thing-at-point 'sexp)))
     (if current-sexp
@@ -458,7 +469,9 @@
 from the variable `insert-pair-alist' according to the last input
 character with or without modifiers.  If no character pair is
 found in the variable `insert-pair-alist', then the last input
-character is inserted ARG times."
+character is inserted ARG times.
+
+This command assumes point is not in a string or comment."
   (interactive "P")
   (if (not (and open close))
       (let ((pair (or (assq last-command-char insert-pair-alist)
@@ -499,7 +512,9 @@
 No argument is equivalent to zero: just insert `()' and leave point between.
 If `parens-require-spaces' is non-nil, this command also inserts a space
 before and after, depending on the surrounding characters.
-If region is active, insert enclosing characters at region boundaries."
+If region is active, insert enclosing characters at region boundaries.
+
+This command assumes point is not in a string or comment."
   (interactive "P")
   (insert-pair arg ?\( ?\)))
 




reply via email to

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