(or layout
(error "Unknown keyboard type: %s" keyboard-type))
(with-output-to-temp-buffer "*Help*"
- (save-excursion
- (set-buffer standard-output)
+ (with-current-buffer standard-output
(insert "Keyboard layout (keyboard type: "
keyboard-type
")\n")
(quail-input-string-to-events input-string))))
(quail-delete-overlays)
(if (buffer-live-p quail-guidance-buf)
- (save-excursion
- (set-buffer quail-guidance-buf)
+ (with-current-buffer quail-guidance-buf
(erase-buffer)))
(quail-hide-guidance-buf)
(set-buffer-modified-p modified-p)
"Terminate the translation of the current key."
(setq quail-translating nil)
(if (buffer-live-p quail-guidance-buf)
- (save-excursion
- (set-buffer quail-guidance-buf)
+ (with-current-buffer quail-guidance-buf
(erase-buffer))))
(defun quail-select-current ()
(unless (buffer-live-p quail-completion-buf)
(let ((default-enable-multibyte-characters enable-multibyte-characters))
(setq quail-completion-buf (get-buffer-create "*Quail Completions*")))
- (save-excursion
- (set-buffer quail-completion-buf)
+ (with-current-buffer quail-completion-buf
(setq quail-overlay (make-overlay 1 1))
(overlay-put quail-overlay 'face 'highlight))))
(setq quail-guidance-buf (generate-new-buffer " *Quail-guidance*"))))
(let ((name (quail-name))
(title (quail-title)))
- (save-excursion
- (set-buffer quail-guidance-buf)
+ (with-current-buffer quail-guidance-buf
;; To show the title of Quail package.
(setq current-input-method name
current-input-method-title title)
;; which is what we wanted.
(setq win (split-window win (- height 2))))
(set-window-buffer win quail-guidance-buf)
- (save-excursion
- (set-buffer quail-guidance-buf)
+ (with-current-buffer quail-guidance-buf
(fit-window-to-buffer win nil (window-height win)))))
(set-window-buffer win quail-guidance-buf)
(set-minibuffer-window win))
(let ((key quail-current-key))
(if (quail-kbd-translate)
(setq key (quail-keyseq-translate key)))
- (save-excursion
- (set-buffer quail-guidance-buf)
+ (with-current-buffer quail-guidance-buf
(erase-buffer)
(insert key)))))
;; Make sure the height of the guidance window is OK --
(current-translations quail-current-translations))
(if quail-current-translations
(quail-update-current-translations))
- (save-excursion
- (set-buffer quail-guidance-buf)
+ (with-current-buffer quail-guidance-buf
(erase-buffer)
;; Show the current key.
(key quail-current-key)
(map (quail-lookup-key quail-current-key))
(require-update nil))
- (save-excursion
- (set-buffer quail-completion-buf)
+ (with-current-buffer quail-completion-buf
(if (and win
(equal key quail-current-key)
(eq last-command 'quail-completion))
(let ((buffer (window-buffer))
choice
base-size)
- (save-excursion
- (set-buffer (window-buffer (posn-window (event-start event))))
+ (with-current-buffer (window-buffer (posn-window (event-start event)))
(if completion-reference-buffer
(setq buffer completion-reference-buffer))
(setq base-size completion-base-size)
(defun quail-help (&optional package)
"Show brief description of the current Quail package.
-Optional 2nd arg PACKAGE specifies the name of alternative Quail
+Optional arg PACKAGE specifies the name of alternative Quail
package to describe."
(interactive)
(if package
(let ((help-xref-mule-regexp help-xref-mule-regexp-template)
(default-enable-multibyte-characters enable-multibyte-characters))
;; At first, make sure that the help buffer has window.
- (with-output-to-temp-buffer "*Help*"
- (save-excursion
- (set-buffer standard-output)
+ (help-setup-xref (list #'quail-help package) (interactive-p))
+ (with-output-to-temp-buffer (help-buffer)
+ (with-current-buffer standard-output
(setq quail-current-package package)))
;; Then, insert text in the help buffer while paying attention to
;; the width of the frame in which the buffer displayed.
- (save-excursion
- (set-buffer (get-buffer "*Help*"))
+ (with-current-buffer (help-buffer)
(setq buffer-read-only nil)
(insert "Input method: " (quail-name)
" (mode line indicator:"
"\
KEY BINDINGS FOR CONVERSION
---------------------------\n"))
- (help-setup-xref (list #'quail-help (quail-name))
- (interactive-p))
(setq quail-current-package nil)
;; Resize the help window again, now that it has all its contents.
(save-selected-window
quail-current-key (quail-name))
keymap (quail-translation-keymap)))
(with-output-to-temp-buffer "*Help*"
- (save-excursion
- (set-buffer standard-output)
+ (with-current-buffer standard-output
(insert state-msg)
(quail-help-insert-keymap-description
keymap
"-----------------------\n")
+ ;; Isn't this redundant ? -stef
(help-mode)))))
(let (scroll-help)
(save-selected-window
(setq list-buf (find-file-noselect leim-list))
;; At first, clean up the file.
- (save-excursion
- (set-buffer list-buf)
+ (with-current-buffer list-buf
(goto-char 1)
;; Insert the correct header.
(goto-char (match-beginning 0))
(condition-case nil
(let ((form (read (current-buffer))))
- (save-excursion
- (set-buffer list-buf)
+ (with-current-buffer list-buf
(insert
(format "(register-input-method
%S %S '%s
(setq quail-dirs (cdr quail-dirs) dirnames (cdr dirnames))))
;; At last, write out LEIM list file.
- (save-excursion
- (set-buffer list-buf)
+ (with-current-buffer list-buf
(setq buffer-file-coding-system 'iso-2022-7bit)
(save-buffer 0))
(kill-buffer list-buf)