Mercurial > emacs
comparison lisp/repeat.el @ 24401:d2de3907a920
Don't require advice.
(repeat-last-kill-command): Variable deleted.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 26 Feb 1999 03:49:42 +0000 |
parents | 242836a572c4 |
children | 6f36bb11c7a5 |
comparison
equal
deleted
inserted
replaced
24400:a4a1ad877482 | 24401:d2de3907a920 |
---|---|
144 ;; since it would complicate checking membership in repeat-too-dangerous. | 144 ;; since it would complicate checking membership in repeat-too-dangerous. |
145 | 145 |
146 ;; It would of course be trivial to implement last-prefix-arg & | 146 ;; It would of course be trivial to implement last-prefix-arg & |
147 ;; true-last-command by putting something in post-command-hook, but that | 147 ;; true-last-command by putting something in post-command-hook, but that |
148 ;; entails a performance hit; the approach taken below avoids that. | 148 ;; entails a performance hit; the approach taken below avoids that. |
149 | |
150 ;; First cope with (kill-region). It's straightforward to advise it to save | |
151 ;; the true value of this-command before clobbering it. | |
152 | |
153 (require 'advice) | |
154 | |
155 (defvar repeat-last-kill-command nil | |
156 "True value of `this-command' before (`kill-region') clobbered it.") | |
157 | 149 |
158 ;; Coping with strings of self-insert commands gets hairy when they interact | 150 ;; Coping with strings of self-insert commands gets hairy when they interact |
159 ;; with auto-filling. Most problems are eliminated by remembering what we're | 151 ;; with auto-filling. Most problems are eliminated by remembering what we're |
160 ;; self-inserting, so we only need to get it from the undo information once. | 152 ;; self-inserting, so we only need to get it from the undo information once. |
161 | 153 |