1999.1.20, Hisashi Gotoh J-Shell を CANNA 付き Emacs で使うパッチ。Mule 2.3 based Emacs 19.34 で確認している。 あと、パスワードを入力を、ミニバッファから入力するためのパッチ。 これは、comint.el の機能。当然、本来の J-Shell でもパスワードの入力は できるけど、特定の文字を受け付けてくれない場合に有効。例えば空白。 以下の 1 行を .emacs に加える。 (setq jsh-password-send-invisible t) ついでに、"Password: " 以外にも、"pass phrase" などをパスワード要求と して認識するように修正。これも comint.el から借りてきた。 *** j-shell.el.dist Wed Jan 20 00:27:49 1999 --- j-shell.el Wed Jan 20 23:59:27 1999 *************** *** 45,51 **** (defvar jsh-prompt-pattern "[>%\\$][ \t]*" "*Matches the user's prompt.") ! (defvar jsh-password-pattern "[Pp]assword: *$" "*The pattern that invokes password-parsing.") (defvar jsh-home (concat "\\(" (getenv "HOME") "\\)") --- 45,53 ---- (defvar jsh-prompt-pattern "[>%\\$][ \t]*" "*Matches the user's prompt.") ! ; 1999.1.20: from comint.el, gotoh@hinet.co.jp ! (defvar jsh-password-pattern ! "\\(\\([Oo]ld \\|[Nn]ew \\|^\\)[Pp]assword\\|pass phrase\\):\\s *\\'" "*The pattern that invokes password-parsing.") (defvar jsh-home (concat "\\(" (getenv "HOME") "\\)") *************** *** 109,114 **** --- 111,121 ---- hidden by j-shell, to protect passwords entered in shell buffers." "The message printed for view-lossage in \"secure\" mode.") + ;; 1999.1.20, gotoh@hinet.co.jp + (defvar jsh-password-send-invisible nil + "Prompt in the minibuffer for password and send without echoing. + from comint.el's send-invisible function") + ;; Signals (defvar jsh-send-char-signals t *************** *** 470,477 **** ;;"printing" keys and for Del. The substituted functions handle ;;the reading of passwords. (setq jsh-mode-map (copy-keymap global-map)) ! (substitute-key-definition 'self-insert-command 'jsh-self-insert ! jsh-mode-map) (substitute-key-definition 'delete-backward-char 'jsh-del-back jsh-mode-map) --- 477,488 ---- ;;"printing" keys and for Del. The substituted functions handle ;;the reading of passwords. (setq jsh-mode-map (copy-keymap global-map)) ! ;; 1999.1.20, gotoh@hinet.co.jp ! (if (boundp 'CANNA) ! (substitute-key-definition 'canna-self-insert-command 'jsh-self-insert ! jsh-mode-map) ! (substitute-key-definition 'self-insert-command 'jsh-self-insert ! jsh-mode-map)) (substitute-key-definition 'delete-backward-char 'jsh-del-back jsh-mode-map) *************** *** 683,689 **** (save-excursion (re-search-backward jsh-password-pattern pass-search-bound t)) (= (match-end 0) (point))) ! (jsh-password))) ;; Set the buffer and search folding back to what they were when ;; we entered the filter function. --- 694,705 ---- (save-excursion (re-search-backward jsh-password-pattern pass-search-bound t)) (= (match-end 0) (point))) ! ;; 1999.1.20, gotoh@hinet.co.jp ! (if jsh-password-send-invisible ! (progn ! (require 'comint) ! (send-invisible nil)) ! (jsh-password)))) ;; Set the buffer and search folding back to what they were when ;; we entered the filter function.