* Defadvice on undo-more in ses.el
@ 2005-02-20 20:12 Kim F. Storm
0 siblings, 0 replies; only message in thread
From: Kim F. Storm @ 2005-02-20 20:12 UTC (permalink / raw)
Cc: emacs-devel
We really don't want defadvice on built-in functions in packages
included with emacs.
So we should find an alternative to this change:
2005-02-20 Jonathan Yavner <jyavner@member.fsf.org>
* ses.el (undo-more): restore defadvice, but only the part that
allows changes outside the restricted area of the buffer.
What about the following?
Replace the defadvice with this defun:
(defun ses-undo (fun &rest args)
"For SES mode, allow undo outside of narrowed buffer range."
(setq ses--deferred-narrow
(or ses--deferred-narrow (ses-narrowed-p)))
(widen)
(condition-case x
(apply fun args)
(error
;;Restore narrow if appropriate
(ses-command-hook)
(signal (car x) (cdr x)))))
Then, wherever an entry is pushed onto the buffer-undo-list, make a
change like this:
From
(push `(apply ses-vector-delete ses--cells ,row 1) buffer-undo-list)
to
(push `(apply ses-undo ses-vector-delete ses--cells ,row 1) buffer-undo-list)
^^^^^^^^
I haven't tested this, but I think it would work....
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-02-20 20:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-20 20:12 Defadvice on undo-more in ses.el Kim F. Storm
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.