Mercurial > emacs
comparison lisp/emulation/viper-cmd.el @ 93615:34417c118a39
2008-04-03 Michael Kifer <kifer@cs.stonybrook.edu>
* viper-macs.el (viper-read-fast-keysequence): use viper-read-event
instead of viper-read-key.
* viper.el (viper-mode): move the check for fundamental mode.
* viper-utils.el (viper-get-saved-cursor-color-in-replace-mode)
viper-get-saved-cursor-color-in-insert-mode): get rid of redundant
let-statements.
* viper*.el: replaced load with require in eval-when-compile.
author | Michael Kifer <kifer@cs.stonybrook.edu> |
---|---|
date | Thu, 03 Apr 2008 21:04:18 +0000 |
parents | 3b2c0edcb428 |
children | d7554c14325c |
comparison
equal
deleted
inserted
replaced
93614:ee3b56d7c857 | 93615:34417c118a39 |
---|---|
1837 | 1837 |
1838 (message " `.' runs %s%s" | 1838 (message " `.' runs %s%s" |
1839 (concat "`" (viper-array-to-string keys) "'") | 1839 (concat "`" (viper-array-to-string keys) "'") |
1840 (viper-abbreviate-string | 1840 (viper-abbreviate-string |
1841 (if (featurep 'xemacs) | 1841 (if (featurep 'xemacs) |
1842 (replace-in-string ; xemacs | 1842 (replace-in-string ; xemacs |
1843 (cond ((characterp text) (char-to-string text)) | 1843 (cond ((characterp text) (char-to-string text)) |
1844 ((stringp text) text) | 1844 ((stringp text) text) |
1845 (t "")) | 1845 (t "")) |
1846 "\n" "^J") | 1846 "\n" "^J") |
1847 text ; emacs | 1847 text ; emacs |
1848 ) | 1848 ) |
1849 max-text-len | 1849 max-text-len |
1850 " inserting `" "'" " .......")) | 1850 " inserting `" "'" " .......")) |
1851 )) | 1851 )) |
1852 | 1852 |
1853 | 1853 |
2157 '(exit-minibuffer viper-exit-minibuffer))) | 2157 '(exit-minibuffer viper-exit-minibuffer))) |
2158 (setq cmd | 2158 (setq cmd |
2159 (key-binding (setq key (read-key-sequence nil)))) | 2159 (key-binding (setq key (read-key-sequence nil)))) |
2160 (cond ((eq cmd 'self-insert-command) | 2160 (cond ((eq cmd 'self-insert-command) |
2161 (if (featurep 'xemacs) | 2161 (if (featurep 'xemacs) |
2162 (insert (events-to-keys key)) ; xemacs | 2162 (insert (events-to-keys key)) ; xemacs |
2163 (insert key) ; emacs | 2163 (insert key) ; emacs |
2164 )) | 2164 )) |
2165 ((memq cmd '(exit-minibuffer viper-exit-minibuffer)) | 2165 ((memq cmd '(exit-minibuffer viper-exit-minibuffer)) |
2166 nil) | 2166 nil) |
2167 (t (command-execute cmd))) | 2167 (t (command-execute cmd))) |
2168 ))) | 2168 ))) |
2169 )))) | 2169 )))) |
3448 ;; scroll up or down 1/7 of window height, depending on whether we are at the | 3448 ;; scroll up or down 1/7 of window height, depending on whether we are at the |
3449 ;; bottom or at the top of the window. This function is called by viper-search | 3449 ;; bottom or at the top of the window. This function is called by viper-search |
3450 ;; (which is called from viper-search-forward/backward/next). If the value of | 3450 ;; (which is called from viper-search-forward/backward/next). If the value of |
3451 ;; viper-search-scroll-threshold is negative - don't scroll. | 3451 ;; viper-search-scroll-threshold is negative - don't scroll. |
3452 (defun viper-adjust-window () | 3452 (defun viper-adjust-window () |
3453 (let ((win-height (if (featurep 'xemacs) (window-displayed-height) | 3453 (let ((win-height (if (featurep 'xemacs) |
3454 (window-displayed-height) | |
3454 (1- (window-height)))) ; adjust for modeline | 3455 (1- (window-height)))) ; adjust for modeline |
3455 (pt (point)) | 3456 (pt (point)) |
3456 at-top-p at-bottom-p | 3457 at-top-p at-bottom-p |
3457 min-scroll direction) | 3458 min-scroll direction) |
3458 (save-excursion | 3459 (save-excursion |