/[emacs]/emacs/lisp/emacs-lisp/lisp.el
ViewVC logotype

Diff of /emacs/lisp/emacs-lisp/lisp.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.58 by monnier, Tue Oct 12 16:05:55 2004 UTC revision 1.59 by jurta, Mon Dec 13 03:09:59 2004 UTC
# Line 73  move forward across N balanced expressio Line 73  move forward across N balanced expressio
73    "Set mark ARG sexps from point.    "Set mark ARG sexps from point.
74  The place mark goes is the same place \\[forward-sexp] would  The place mark goes is the same place \\[forward-sexp] would
75  move to with the same argument.  move to with the same argument.
76  If this command is repeated, it marks the next ARG sexps after the ones  If this command is repeated or mark is active in Transient Mark mode,
77  already marked."  it marks the next ARG sexps after the ones already marked."
78    (interactive "P")    (interactive "P")
79    (cond ((and (eq last-command this-command) (mark t))    (cond ((or (and (eq last-command this-command) (mark t))
80                 (and transient-mark-mode mark-active))
81           (setq arg (if arg (prefix-numeric-value arg)           (setq arg (if arg (prefix-numeric-value arg)
82                       (if (> (mark) (point)) 1 -1)))                       (if (< (mark) (point)) -1 1)))
83           (set-mark           (set-mark
84            (save-excursion            (save-excursion
85             (goto-char (mark))              (goto-char (mark))
86             (forward-sexp arg)              (forward-sexp arg)
87             (point))))              (point))))
88          (t          (t
89           (push-mark           (push-mark
90            (save-excursion            (save-excursion
# Line 191  open-parenthesis, and point ends up at t Line 192  open-parenthesis, and point ends up at t
192  If variable `beginning-of-defun-function' is non-nil, its value  If variable `beginning-of-defun-function' is non-nil, its value
193  is called as a function to find the defun's beginning."  is called as a function to find the defun's beginning."
194    (interactive "p")    (interactive "p")
195    (and (eq this-command 'beginning-of-defun)    (or inhibit-mark-movement
196         (or inhibit-mark-movement (eq last-command 'beginning-of-defun)        (not (eq this-command 'beginning-of-defun))
197             (push-mark)))        (eq last-command 'beginning-of-defun)
198          (and transient-mark-mode mark-active)
199          (push-mark))
200    (and (beginning-of-defun-raw arg)    (and (beginning-of-defun-raw arg)
201         (progn (beginning-of-line) t)))         (progn (beginning-of-line) t)))
202    
# Line 242  matches the open-parenthesis that starts Line 245  matches the open-parenthesis that starts
245  If variable `end-of-defun-function' is non-nil, its value  If variable `end-of-defun-function' is non-nil, its value
246  is called as a function to find the defun's end."  is called as a function to find the defun's end."
247    (interactive "p")    (interactive "p")
248    (and (eq this-command 'end-of-defun)    (or inhibit-mark-movement
249         (or inhibit-mark-movement (eq last-command 'end-of-defun)        (not (eq this-command 'end-of-defun))
250             (push-mark)))        (eq last-command 'end-of-defun)
251          (and transient-mark-mode mark-active)
252          (push-mark))
253    (if (or (null arg) (= arg 0)) (setq arg 1))    (if (or (null arg) (= arg 0)) (setq arg 1))
254    (if end-of-defun-function    (if end-of-defun-function
255        (if (> arg 0)        (if (> arg 0)
# Line 289  is called as a function to find the defu Line 294  is called as a function to find the defu
294  (defun mark-defun ()  (defun mark-defun ()
295    "Put mark at end of this defun, point at beginning.    "Put mark at end of this defun, point at beginning.
296  The defun marked is the one that contains point or follows point.  The defun marked is the one that contains point or follows point.
297  If this command is repeated, marks more defuns after the ones  If this command is repeated or mark is active in Transient Mark mode,
298  already marked."  it marks more defuns after the ones already marked."
299    (interactive)    (interactive)
300    (cond ((and (eq last-command this-command) (mark t))    (cond ((or (and (eq last-command this-command) (mark t))
301                 (and transient-mark-mode mark-active))
302           (set-mark           (set-mark
303            (save-excursion            (save-excursion
304              (goto-char (mark))              (goto-char (mark))

Legend:
Removed from v.1.58  
changed lines
  Added in v.1.59

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26