comparison lisp/progmodes/idlw-shell.el @ 83548:c71725faff1a

Merged from emacs@sv.gnu.org. Last-minute emacsclient rewrites be damned! Patches applied: * emacs@sv.gnu.org/emacs--devo--0--patch-490 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-491 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-492 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-493 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-494 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-495 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-496 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-497 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-498 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-499 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-500 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-501 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-502 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-503 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-504 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-505 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-506 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-507 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-508 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-509 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-510 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-511 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-512 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-513 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-514 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-515 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-516 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-517 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-518 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-519 Update from CVS: etc/TUTORIAL.cn: Updated. * emacs@sv.gnu.org/emacs--devo--0--patch-520 Merge from erc--emacs--22 * emacs@sv.gnu.org/emacs--devo--0--patch-521 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-522 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-523 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-524 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-525 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-526 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-527 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-528 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-529 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-530 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-531 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-532 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-533 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-534 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-535 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-161 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-162 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-163 Merge from emacs--devo--0 * emacs@sv.gnu.org/gnus--rel--5.10--patch-164 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-165 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-166 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-167 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-168 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-169 Merge from emacs--devo--0 * emacs@sv.gnu.org/gnus--rel--5.10--patch-170 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-588
author Karoly Lorentey <lorentey@elte.hu>
date Sun, 03 Dec 2006 15:03:30 +0000
parents 02e39decdc84 b21beb03e5c4
children b8d9a391daf3
comparison
equal deleted inserted replaced
83547:0912b745fc75 83548:c71725faff1a
4 4
5 ;; Authors: J.D. Smith <jdsmith@as.arizona.edu> 5 ;; Authors: J.D. Smith <jdsmith@as.arizona.edu>
6 ;; Carsten Dominik <dominik@astro.uva.nl> 6 ;; Carsten Dominik <dominik@astro.uva.nl>
7 ;; Chris Chase <chase@att.com> 7 ;; Chris Chase <chase@att.com>
8 ;; Maintainer: J.D. Smith <jdsmith@as.arizona.edu> 8 ;; Maintainer: J.D. Smith <jdsmith@as.arizona.edu>
9 ;; Version: 6.0_em22 9 ;; Version: 6.1_em22
10 ;; Keywords: processes 10 ;; Keywords: processes
11 11
12 ;; This file is part of GNU Emacs. 12 ;; This file is part of GNU Emacs.
13 13
14 ;; GNU Emacs is free software; you can redistribute it and/or modify 14 ;; GNU Emacs is free software; you can redistribute it and/or modify
29 ;;; Commentary: 29 ;;; Commentary:
30 ;; 30 ;;
31 ;; This mode is for IDL version 5 or later. It should work on 31 ;; This mode is for IDL version 5 or later. It should work on
32 ;; Emacs>20.3 or XEmacs>20.4. 32 ;; Emacs>20.3 or XEmacs>20.4.
33 ;; 33 ;;
34 ;; Runs IDL as an inferior process of Emacs, much like the emacs 34 ;; Runs IDL as an inferior process of Emacs, much like the Emacs
35 ;; `shell' or `telnet' commands. Provides command history and 35 ;; `shell' or `telnet' commands. Provides command history and
36 ;; searching. Provides debugging commands available in buffers 36 ;; searching. Provides debugging commands available in buffers
37 ;; visiting IDL procedure files, e.g., breakpoint setting, stepping, 37 ;; visiting IDL procedure files, e.g., breakpoint setting, stepping,
38 ;; execution until a certain line, printing expressions under point, 38 ;; execution until a certain line, printing expressions under point,
39 ;; visual line pointer for current execution line, etc. 39 ;; visual line pointer for current execution line, etc.
250 the same file. However, IDLWAVE no longer makes this mistake, so it is safe 250 the same file. However, IDLWAVE no longer makes this mistake, so it is safe
251 to set this option to nil." 251 to set this option to nil."
252 :group 'idlwave-shell-general-setup 252 :group 'idlwave-shell-general-setup
253 :type 'boolean) 253 :type 'boolean)
254 254
255 (defcustom idlwave-shell-file-name-chars "~/A-Za-z0-9+:_.$#%={}\\-" 255 (defcustom idlwave-shell-file-name-chars "~/A-Za-z0-9+:_.$#%={}\\- "
256 "The characters allowed in file names, as a string. 256 "The characters allowed in file names, as a string.
257 Used for file name completion. Must not contain `'', `,' and `\"' 257 Used for file name completion. Must not contain `'', `,' and `\"'
258 because these are used as separators by IDL." 258 because these are used as separators by IDL."
259 :group 'idlwave-shell-general-setup 259 :group 'idlwave-shell-general-setup
260 :type 'string) 260 :type 'string)
1571 (setq full-output (buffer-string)) 1571 (setq full-output (buffer-string))
1572 (goto-char (point-max)) 1572 (goto-char (point-max))
1573 (re-search-backward idlwave-shell-prompt-pattern nil t) 1573 (re-search-backward idlwave-shell-prompt-pattern nil t)
1574 (goto-char (match-end 0)) 1574 (goto-char (match-end 0))
1575 (setq idlwave-shell-command-output 1575 (setq idlwave-shell-command-output
1576 (buffer-substring-no-properties (point-min) (point))) 1576 (buffer-substring-no-properties
1577 (point-min) (point)))
1577 (delete-region (point-min) (point))) 1578 (delete-region (point-min) (point)))
1578 (setq idlwave-shell-command-output 1579 (setq idlwave-shell-command-output
1579 (with-current-buffer (process-buffer proc) 1580 (with-current-buffer (process-buffer proc)
1580 (buffer-substring-no-properties 1581 (buffer-substring-no-properties
1581 (save-excursion 1582 (save-excursion
2099 (defun idlwave-shell-filter-directory () 2100 (defun idlwave-shell-filter-directory ()
2100 "Get the current directory from `idlwave-shell-command-output'. 2101 "Get the current directory from `idlwave-shell-command-output'.
2101 Change the default directory for the process buffer to concur." 2102 Change the default directory for the process buffer to concur."
2102 (save-excursion 2103 (save-excursion
2103 (set-buffer (idlwave-shell-buffer)) 2104 (set-buffer (idlwave-shell-buffer))
2104 (if (string-match ",___cur[\n\r]\\(\\S-*\\) *[\n\r]" 2105 (if (string-match ",___cur[\n\r ]+\\([^\n\r]+\\)[\n\r]"
2105 idlwave-shell-command-output) 2106 idlwave-shell-command-output)
2106 (let ((dir (substring idlwave-shell-command-output 2107 (let ((dir (substring idlwave-shell-command-output
2107 (match-beginning 1) (match-end 1)))) 2108 (match-beginning 1) (match-end 1))))
2108 ; (message "Setting Emacs working dir to %s" dir) 2109 ; (message "Setting Emacs working dir to %s" dir)
2109 (setq idlwave-shell-default-directory dir) 2110 (setq idlwave-shell-default-directory dir)
4097 (define-key idlwave-mode-map key hook) 4098 (define-key idlwave-mode-map key hook)
4098 (define-key idlwave-shell-mode-map key hook)) 4099 (define-key idlwave-shell-mode-map key hook))
4099 4100
4100 ;(define-key idlwave-shell-mode-map "\M-?" 'comint-dynamic-list-completions) 4101 ;(define-key idlwave-shell-mode-map "\M-?" 'comint-dynamic-list-completions)
4101 ;(define-key idlwave-shell-mode-map "\t" 'comint-dynamic-complete) 4102 ;(define-key idlwave-shell-mode-map "\t" 'comint-dynamic-complete)
4103 (define-key idlwave-shell-mode-map "\C-w" 'comint-kill-region)
4102 (define-key idlwave-shell-mode-map "\t" 'idlwave-shell-complete) 4104 (define-key idlwave-shell-mode-map "\t" 'idlwave-shell-complete)
4103 (define-key idlwave-shell-mode-map "\M-\t" 'idlwave-shell-complete) 4105 (define-key idlwave-shell-mode-map "\M-\t" 'idlwave-shell-complete)
4104 (define-key idlwave-shell-mode-map "\C-c\C-s" 'idlwave-shell) 4106 (define-key idlwave-shell-mode-map "\C-c\C-s" 'idlwave-shell)
4105 (define-key idlwave-shell-mode-map "\C-c?" 'idlwave-routine-info) 4107 (define-key idlwave-shell-mode-map "\C-c?" 'idlwave-routine-info)
4106 (define-key idlwave-shell-mode-map "\C-g" 'idlwave-keyboard-quit) 4108 (define-key idlwave-shell-mode-map "\C-g" 'idlwave-keyboard-quit)
4107 (define-key idlwave-shell-mode-map "\M-?" 'idlwave-context-help) 4109 (define-key idlwave-shell-mode-map "\M-?" 'idlwave-context-help)
4108 (define-key idlwave-shell-mode-map [(control meta ?\?)] 'idlwave-online-help) 4110 (define-key idlwave-shell-mode-map [(control meta ?\?)]
4111 'idlwave-help-assistant-help-with-topic)
4109 (define-key idlwave-shell-mode-map "\C-c\C-i" 'idlwave-update-routine-info) 4112 (define-key idlwave-shell-mode-map "\C-c\C-i" 'idlwave-update-routine-info)
4110 (define-key idlwave-shell-mode-map "\C-c\C-y" 'idlwave-shell-char-mode-loop) 4113 (define-key idlwave-shell-mode-map "\C-c\C-y" 'idlwave-shell-char-mode-loop)
4111 (define-key idlwave-shell-mode-map "\C-c\C-x" 'idlwave-shell-send-char) 4114 (define-key idlwave-shell-mode-map "\C-c\C-x" 'idlwave-shell-send-char)
4112 (define-key idlwave-shell-mode-map "\C-c=" 'idlwave-resolve) 4115 (define-key idlwave-shell-mode-map "\C-c=" 'idlwave-resolve)
4113 (define-key idlwave-shell-mode-map "\C-c\C-v" 'idlwave-find-module) 4116 (define-key idlwave-shell-mode-map "\C-c\C-v" 'idlwave-find-module)