aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/emulation
diff options
context:
space:
mode:
authorRichard M. Stallman1997-05-20 18:49:06 +0000
committerRichard M. Stallman1997-05-20 18:49:06 +0000
commitf4ff0fb4feedde7155855de8a6226d998b2ee526 (patch)
treeaedcac89ea04065e431f2460b2f2a243e51ded5f /lisp/emulation
parent9108fd3aefcc66024d829333a352f5f425f46bff (diff)
downloademacs-f4ff0fb4feedde7155855de8a6226d998b2ee526.tar.gz
emacs-f4ff0fb4feedde7155855de8a6226d998b2ee526.zip
(crisp-last-last-command): Renamed from last-last-command
and defvar added.
Diffstat (limited to 'lisp/emulation')
-rw-r--r--lisp/emulation/crisp.el14
1 files changed, 9 insertions, 5 deletions
diff --git a/lisp/emulation/crisp.el b/lisp/emulation/crisp.el
index 81148bf04d7..93f20715e9d 100644
--- a/lisp/emulation/crisp.el
+++ b/lisp/emulation/crisp.el
@@ -88,9 +88,12 @@ does not load Scroll All.")
88(defvar crisp-load-hook nil 88(defvar crisp-load-hook nil
89 "Hooks to run after loadint the CRiSP emulator package.") 89 "Hooks to run after loadint the CRiSP emulator package.")
90 90
91(defvar crisp-version "crisp.el release 1.1/$Revision: 1.3 $" 91(defvar crisp-version "crisp.el release 1.1/$Revision: 1.4 $"
92 "The release number and RCS version for the CRiSP emulator.") 92 "The release number and RCS version for the CRiSP emulator.")
93 93
94(defvar crisp-last-last-command nil
95 "The command *before* the last command.")
96
94(if (string-match "XEmacs\\Lucid" emacs-version) 97(if (string-match "XEmacs\\Lucid" emacs-version)
95 (add-minor-mode 'crisp-mode-enabled crisp-mode-modeline-string) 98 (add-minor-mode 'crisp-mode-enabled crisp-mode-modeline-string)
96 (or (assq 'crisp-mode-enabled minor-mode-alist) 99 (or (assq 'crisp-mode-enabled minor-mode-alist)
@@ -177,13 +180,14 @@ consecutive use moves point to beginning of the screen. Third
177consecutive use moves point to the beginning of the buffer." 180consecutive use moves point to the beginning of the buffer."
178 (interactive nil) 181 (interactive nil)
179 (cond 182 (cond
180 ((and (eq last-command 'crisp-home) (eq last-last-command 'crisp-home)) 183 ((and (eq last-command 'crisp-home)
184 (eq crisp-last-last-command 'crisp-home))
181 (goto-char (point-min))) 185 (goto-char (point-min)))
182 ((eq last-command 'crisp-home) 186 ((eq last-command 'crisp-home)
183 (move-to-window-line 0)) 187 (move-to-window-line 0))
184 (t 188 (t
185 (beginning-of-line))) 189 (beginning-of-line)))
186 (setq last-last-command last-command)) 190 (setq crisp-last-last-command last-command))
187 191
188(defun crisp-end () 192(defun crisp-end ()
189 "\"End\" point, the way CRiSP would do it. 193 "\"End\" point, the way CRiSP would do it.
@@ -192,14 +196,14 @@ consecutive use moves point to the end of the screen. Third
192consecutive use moves point to the end of the buffer." 196consecutive use moves point to the end of the buffer."
193 (interactive nil) 197 (interactive nil)
194 (cond 198 (cond
195 ((and (eq last-command 'crisp-end) (eq last-last-command 'crisp-end)) 199 ((and (eq last-command 'crisp-end) (eq crisp-last-last-command 'crisp-end))
196 (goto-char (point-max))) 200 (goto-char (point-max)))
197 ((eq last-command 'crisp-end) 201 ((eq last-command 'crisp-end)
198 (move-to-window-line -1) 202 (move-to-window-line -1)
199 (end-of-line)) 203 (end-of-line))
200 (t 204 (t
201 (end-of-line))) 205 (end-of-line)))
202 (setq last-last-command last-command)) 206 (setq crisp-last-last-command last-command))
203 207
204;; Now enable the mode 208;; Now enable the mode
205 209