aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>2005-01-29 17:31:32 +0000
committerRichard M. Stallman <[email protected]>2005-01-29 17:31:32 +0000
commit137e400204f8d8046d9ef12b9f627106ed06b4d7 (patch)
tree7141e6474c35071fda33b1a0ee94a8381cc2dec7 /lisp
parent5e5a3412552dd70bf5fe9c664a62cbd019c7a29d (diff)
(undo-more): defadvice deleted.
(ses-begin-change): Doc fix.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ses.el61
1 files changed, 31 insertions, 30 deletions
diff --git a/lisp/ses.el b/lisp/ses.el
index 49d4f49d94..952474c871 100644
--- a/lisp/ses.el
+++ b/lisp/ses.el
@@ -1279,38 +1279,39 @@ to each symbol."
;; Undo control
;;----------------------------------------------------------------------------
-(defadvice undo-more (around ses-undo-more activate preactivate)
- "Define a meaning for conses in buffer-undo-list whose car is a symbol
-other than t or nil. To undo these, apply the car--a function--to the
-cdr--its arglist."
- (let ((ses-count (ad-get-arg 0)))
- (catch 'undo
- (dolist (ses-x pending-undo-list)
- (unless ses-x
- ;;End of undo boundary
- (setq ses-count (1- ses-count))
- (if (<= ses-count 0)
- ;;We've seen enough boundaries - stop undoing
- (throw 'undo nil)))
- (and (consp ses-x) (symbolp (car ses-x)) (fboundp (car ses-x))
- ;;Undo using apply
- (apply (car ses-x) (cdr ses-x)))))
- (if (not (eq major-mode 'ses-mode))
- ad-do-it
- ;;Here is some extra code for SES mode.
- (setq ses--deferred-narrow
- (or ses--deferred-narrow (ses-narrowed-p)))
- (widen)
- (condition-case x
- ad-do-it
- (error
- ;;Restore narrow if appropriate
- (ses-command-hook)
- (signal (car x) (cdr x)))))))
+;; This should be unnecessary, because the feature is now built in.
+
+;;; (defadvice undo-more (around ses-undo-more activate preactivate)
+;;; "Define a meaning for conses in buffer-undo-list whose car is a symbol
+;;; other than t or nil. To undo these, apply the car--a function--to the
+;;; cdr--its arglist."
+;;; (let ((ses-count (ad-get-arg 0)))
+;;; (catch 'undo
+;;; (dolist (ses-x pending-undo-list)
+;;; (unless ses-x
+;;; ;;End of undo boundary
+;;; (setq ses-count (1- ses-count))
+;;; (if (<= ses-count 0)
+;;; ;;We've seen enough boundaries - stop undoing
+;;; (throw 'undo nil)))
+;;; (and (consp ses-x) (symbolp (car ses-x)) (fboundp (car ses-x))
+;;; ;;Undo using apply
+;;; (apply (car ses-x) (cdr ses-x)))))
+;;; (if (not (eq major-mode 'ses-mode))
+;;; ad-do-it
+;;; ;;Here is some extra code for SES mode.
+;;; (setq ses--deferred-narrow
+;;; (or ses--deferred-narrow (ses-narrowed-p)))
+;;; (widen)
+;;; (condition-case x
+;;; ad-do-it
+;;; (error
+;;; ;;Restore narrow if appropriate
+;;; (ses-command-hook)
+;;; (signal (car x) (cdr x)))))))
(defun ses-begin-change ()
- "For undo, remember current buffer-position before we start changing hidden
-stuff."
+ "For undo, remember point before we start changing hidden stuff."
(let ((inhibit-read-only t))
(insert-and-inherit "X")
(delete-region (1- (point)) (point))))