-
-\f
-;;;========================================================
-;;; Exiting in lemacs
-
-;; This is a large amount of code to support automatic termination of
-;; isearch-mode when a command (however it is invoked) is not an
-;; isearch command, or the buffer is switched out from under
-;; isearch-mode. Only later versions of lemacs have the pre-command-hook.
-
-;;(if isearch-pre-command-hook-exists
-;;(progn
-
-;;;; This list must be modified whenever the available commands are modified.
-;;(mapcar (function (lambda (command)
-;; (put command 'isearch-command t)))
-;; '(isearch-printing-char
-;; isearch-return-char
-;; isearch-repeat-forward
-;; isearch-repeat-backward
-;; isearch-delete-char
-;; isearch-abort
-;; isearch-quote-char
-;; isearch-exit
-;; isearch-printing-char
-;; isearch-printing-char
-;; isearch-yank-word
-;; isearch-yank-line
-;; isearch-*-char
-;; isearch-*-char
-;; isearch-|-char
-;; isearch-toggle-regexp
-;; isearch-edit-string
-;; isearch-mode-help
-;; isearch-ring-advance
-;; isearch-ring-retreat
-;; isearch-ring-advance-edit
-;; isearch-ring-retreat-edit
-;; isearch-whitespace-chars
-;; isearch-complete
-;; isearch-complete-edit
-;; isearch-edit-string
-;; isearch-toggle-regexp
-;; ;; The following may not be needed since isearch-mode is off already.
-;; isearch-forward-exit-minibuffer
-;; isearch-reverse-exit-minibuffer
-;; isearch-nonincremental-exit-minibuffer))
-
-;;(defun isearch-pre-command-hook ()
-;; ;;
-;; ;; For use as the value of `pre-command-hook' when isearch-mode is active.
-;; ;; If the command about to be executed is not one of the isearch commands,
-;; ;; then isearch-mode is turned off before that command is executed.
-;; ;;
-;; ;; If the command about to be executed is self-insert-command, or is a
-;; ;; keyboard macro of a single key sequence which is bound to self-insert-
-;; ;; command, then we add those chars to the search ring instead of inserting
-;; ;; them in the buffer. In this way, the set of self-searching characters
-;; ;; need not be exhaustively enumerated, but is derived from other maps.
-;; ;;
-;; (isearch-maybe-frob-keyboard-macros)
-;; (if (and (symbolp this-command)
-;; (get this-command 'isearch-command))
-;; nil
-;; (isearch-done)))
-
-;;(defun isearch-maybe-frob-keyboard-macros ()
-;; ;;
-;; ;; If the command about to be executed is `self-insert-command' then change
-;; ;; the command to `isearch-printing-char' instead, meaning add the last-
-;; ;; typed character to the search string.
-;; ;;
-;; ;; If `this-command' is a string or a vector (that is, a keyboard macro)
-;; ;; and it contains only one command, which is bound to self-insert-command,
-;; ;; then do the same thing as for self-inserting commands: arrange for that
-;; ;; character to be added to the search string. If we didn't do this, then
-;; ;; typing a compose sequence (a la x-compose.el) would terminate the search
-;; ;; and insert the character, instead of searching for that character.
-;; ;;
-;; (cond ((eq this-command 'self-insert-command)
-;; (setq this-command 'isearch-printing-char))
-;; ((and (stringp this-command)
-;; (eq (key-binding this-command) 'self-insert-command))
-;; (setq last-command-char (aref this-command 0)
-;; last-command-event (character-to-event last-command-char)
-;; this-command 'isearch-printing-char))
-;; ((and (vectorp this-command)
-;; (eq (key-binding this-command) 'self-insert-command))
-;; (let* ((desc (aref this-command 0))
-;; (code (cond ((integerp desc) desc)
-;; ((symbolp desc) (get desc character-set-property))
-;; ((consp desc)
-;; (and (null (cdr desc))
-;; (get (car desc) character-set-property)))
-;; (t nil))))
-;; (if code
-;; (setq last-command-char code
-;; last-command-event (character-to-event last-command-char)
-;; this-command 'isearch-printing-char))))
-;; ))
-
-;;))