Mercurial > emacs
comparison lisp/emulation/crisp.el @ 17900:08062aad7ef6
(crisp-last-last-command): Renamed from last-last-command
and defvar added.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 20 May 1997 18:49:06 +0000 |
parents | dd277f4e6737 |
children | 954352993fa2 |
comparison
equal
deleted
inserted
replaced
17899:88e528f3dc49 | 17900:08062aad7ef6 |
---|---|
86 does not load Scroll All.") | 86 does not load Scroll All.") |
87 | 87 |
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 | |
94 (defvar crisp-last-last-command nil | |
95 "The command *before* the last command.") | |
93 | 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) |
97 (setq minor-mode-alist | 100 (setq minor-mode-alist |
175 The first use moves point to beginning of the line. Second | 178 The first use moves point to beginning of the line. Second |
176 consecutive use moves point to beginning of the screen. Third | 179 consecutive use moves point to beginning of the screen. Third |
177 consecutive use moves point to the beginning of the buffer." | 180 consecutive 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. |
190 The first use moves point to end of the line. Second | 194 The first use moves point to end of the line. Second |
191 consecutive use moves point to the end of the screen. Third | 195 consecutive use moves point to the end of the screen. Third |
192 consecutive use moves point to the end of the buffer." | 196 consecutive 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 |
206 (defun crisp-mode () | 210 (defun crisp-mode () |
207 "Toggle CRiSP emulation minor mode." | 211 "Toggle CRiSP emulation minor mode." |