diff options
| author | Stefan Monnier | 2006-07-07 14:40:35 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2006-07-07 14:40:35 +0000 |
| commit | e2536e57f9dbb227eb198a678fe0052cded82952 (patch) | |
| tree | cf14e5b68dae0ffc7a71e345e6a1b57fcd88e30a | |
| parent | 898cfc1d8a8ac22ccc7727d61b6cbb1cfb8c89b6 (diff) | |
| download | emacs-e2536e57f9dbb227eb198a678fe0052cded82952.tar.gz emacs-e2536e57f9dbb227eb198a678fe0052cded82952.zip | |
Remove spurious * in docstrings.
(inferior-octave-mode): Only change the buffer-local value of
comint-dynamic-complete-functions.
(inferior-octave-mode-map, inferior-octave-mode-syntax-table):
Move the initialization to the declaration.
(inferior-octave-complete): Remove unused var `filter'.
| -rw-r--r-- | lisp/ChangeLog | 12 | ||||
| -rw-r--r-- | lisp/progmodes/octave-inf.el | 40 |
2 files changed, 30 insertions, 22 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a8532e7143c..47871e2daaa 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,15 @@ | |||
| 1 | 2006-07-07 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * progmodes/octave-inf.el: Remove spurious * in docstrings. | ||
| 4 | (inferior-octave-mode): Only change the buffer-local value of | ||
| 5 | comint-dynamic-complete-functions. | ||
| 6 | (inferior-octave-mode-map, inferior-octave-mode-syntax-table): | ||
| 7 | Move the initialization to the declaration. | ||
| 8 | (inferior-octave-complete): Remove unused var `filter'. | ||
| 9 | |||
| 10 | * shell.el (shell-mode): Only change the buffer-local value of | ||
| 11 | comint-dynamic-complete-functions. | ||
| 12 | |||
| 1 | 2006-07-07 Carsten Dominik <dominik@science.uva.nl> | 13 | 2006-07-07 Carsten Dominik <dominik@science.uva.nl> |
| 2 | 14 | ||
| 3 | * textmodes/org.el (org-agenda-get-todos): Skip subtree also if | 15 | * textmodes/org.el (org-agenda-get-todos): Skip subtree also if |
diff --git a/lisp/progmodes/octave-inf.el b/lisp/progmodes/octave-inf.el index b6e6e4fc456..863f972086e 100644 --- a/lisp/progmodes/octave-inf.el +++ b/lisp/progmodes/octave-inf.el | |||
| @@ -37,18 +37,18 @@ | |||
| 37 | :group 'octave) | 37 | :group 'octave) |
| 38 | 38 | ||
| 39 | (defcustom inferior-octave-program "octave" | 39 | (defcustom inferior-octave-program "octave" |
| 40 | "*Program invoked by `inferior-octave'." | 40 | "Program invoked by `inferior-octave'." |
| 41 | :type 'string | 41 | :type 'string |
| 42 | :group 'octave-inferior) | 42 | :group 'octave-inferior) |
| 43 | 43 | ||
| 44 | (defcustom inferior-octave-prompt | 44 | (defcustom inferior-octave-prompt |
| 45 | "\\(^octave\\(\\|.bin\\)\\(-[.0-9]+\\)?\\(:[0-9]+\\)?\\|^debug\\|^\\)>+ " | 45 | "\\(^octave\\(\\|.bin\\)\\(-[.0-9]+\\)?\\(:[0-9]+\\)?\\|^debug\\|^\\)>+ " |
| 46 | "*Regexp to match prompts for the inferior Octave process." | 46 | "Regexp to match prompts for the inferior Octave process." |
| 47 | :type 'regexp | 47 | :type 'regexp |
| 48 | :group 'octave-inferior) | 48 | :group 'octave-inferior) |
| 49 | 49 | ||
| 50 | (defcustom inferior-octave-startup-file nil | 50 | (defcustom inferior-octave-startup-file nil |
| 51 | "*Name of the inferior Octave startup file. | 51 | "Name of the inferior Octave startup file. |
| 52 | The contents of this file are sent to the inferior Octave process on | 52 | The contents of this file are sent to the inferior Octave process on |
| 53 | startup." | 53 | startup." |
| 54 | :type '(choice (const :tag "None" nil) | 54 | :type '(choice (const :tag "None" nil) |
| @@ -56,34 +56,31 @@ startup." | |||
| 56 | :group 'octave-inferior) | 56 | :group 'octave-inferior) |
| 57 | 57 | ||
| 58 | (defcustom inferior-octave-startup-args nil | 58 | (defcustom inferior-octave-startup-args nil |
| 59 | "*List of command line arguments for the inferior Octave process. | 59 | "List of command line arguments for the inferior Octave process. |
| 60 | For example, for suppressing the startup message and using `traditional' | 60 | For example, for suppressing the startup message and using `traditional' |
| 61 | mode, set this to (\"-q\" \"--traditional\")." | 61 | mode, set this to (\"-q\" \"--traditional\")." |
| 62 | :type '(repeat string) | 62 | :type '(repeat string) |
| 63 | :group 'octave-inferior) | 63 | :group 'octave-inferior) |
| 64 | 64 | ||
| 65 | (defvar inferior-octave-mode-map nil | 65 | (defvar inferior-octave-mode-map |
| 66 | "Keymap used in Inferior Octave mode.") | 66 | (let ((map (make-sparse-keymap))) |
| 67 | (if inferior-octave-mode-map | 67 | (set-keymap-parent map comint-mode-map) |
| 68 | () | ||
| 69 | (let ((map (copy-keymap comint-mode-map))) | ||
| 70 | (define-key map "\t" 'comint-dynamic-complete) | 68 | (define-key map "\t" 'comint-dynamic-complete) |
| 71 | (define-key map "\M-?" 'comint-dynamic-list-filename-completions) | 69 | (define-key map "\M-?" 'comint-dynamic-list-filename-completions) |
| 72 | (define-key map "\C-c\C-l" 'inferior-octave-dynamic-list-input-ring) | 70 | (define-key map "\C-c\C-l" 'inferior-octave-dynamic-list-input-ring) |
| 73 | (define-key map [menu-bar inout list-history] | 71 | (define-key map [menu-bar inout list-history] |
| 74 | '("List Input History" . inferior-octave-dynamic-list-input-ring)) | 72 | '("List Input History" . inferior-octave-dynamic-list-input-ring)) |
| 75 | (define-key map "\C-c\C-h" 'octave-help) | 73 | (define-key map "\C-c\C-h" 'octave-help) |
| 76 | (setq inferior-octave-mode-map map))) | 74 | map) |
| 75 | "Keymap used in Inferior Octave mode.") | ||
| 77 | 76 | ||
| 78 | (defvar inferior-octave-mode-syntax-table nil | 77 | (defvar inferior-octave-mode-syntax-table |
| 79 | "Syntax table in use in inferior-octave-mode buffers.") | ||
| 80 | (if inferior-octave-mode-syntax-table | ||
| 81 | () | ||
| 82 | (let ((table (make-syntax-table))) | 78 | (let ((table (make-syntax-table))) |
| 83 | (modify-syntax-entry ?\` "w" table) | 79 | (modify-syntax-entry ?\` "w" table) |
| 84 | (modify-syntax-entry ?\# "<" table) | 80 | (modify-syntax-entry ?\# "<" table) |
| 85 | (modify-syntax-entry ?\n ">" table) | 81 | (modify-syntax-entry ?\n ">" table) |
| 86 | (setq inferior-octave-mode-syntax-table table))) | 82 | table) |
| 83 | "Syntax table in use in inferior-octave-mode buffers.") | ||
| 87 | 84 | ||
| 88 | (defcustom inferior-octave-mode-hook nil | 85 | (defcustom inferior-octave-mode-hook nil |
| 89 | "*Hook to be run when Inferior Octave mode is started." | 86 | "*Hook to be run when Inferior Octave mode is started." |
| @@ -154,9 +151,9 @@ Entry to this mode successively runs the hooks `comint-mode-hook' and | |||
| 154 | (setq comint-input-ring-file-name | 151 | (setq comint-input-ring-file-name |
| 155 | (or (getenv "OCTAVE_HISTFILE") "~/.octave_hist") | 152 | (or (getenv "OCTAVE_HISTFILE") "~/.octave_hist") |
| 156 | comint-input-ring-size (or (getenv "OCTAVE_HISTSIZE") 1024) | 153 | comint-input-ring-size (or (getenv "OCTAVE_HISTSIZE") 1024) |
| 157 | comint-input-filter-functions '(inferior-octave-directory-tracker) | 154 | comint-input-filter-functions '(inferior-octave-directory-tracker)) |
| 158 | comint-dynamic-complete-functions | 155 | (set (make-local-variable 'comint-dynamic-complete-functions) |
| 159 | inferior-octave-dynamic-complete-functions) | 156 | inferior-octave-dynamic-complete-functions) |
| 160 | (comint-read-input-ring t) | 157 | (comint-read-input-ring t) |
| 161 | 158 | ||
| 162 | (run-mode-hooks 'inferior-octave-mode-hook)) | 159 | (run-mode-hooks 'inferior-octave-mode-hook)) |
| @@ -272,8 +269,7 @@ is NOT available with versions of Octave prior to 2.0." | |||
| 272 | (save-excursion | 269 | (save-excursion |
| 273 | (skip-syntax-backward "w_" (comint-line-beginning-position)) | 270 | (skip-syntax-backward "w_" (comint-line-beginning-position)) |
| 274 | (buffer-substring-no-properties (point) end))) | 271 | (buffer-substring-no-properties (point) end))) |
| 275 | (proc (get-buffer-process inferior-octave-buffer)) | 272 | (proc (get-buffer-process inferior-octave-buffer))) |
| 276 | (filter (process-filter proc))) | ||
| 277 | (cond (inferior-octave-complete-impossible | 273 | (cond (inferior-octave-complete-impossible |
| 278 | (error (concat | 274 | (error (concat |
| 279 | "Your Octave does not have `completion_matches'. " | 275 | "Your Octave does not have `completion_matches'. " |
| @@ -299,7 +295,7 @@ is NOT available with versions of Octave prior to 2.0." | |||
| 299 | command inferior-octave-output-list))))) | 295 | command inferior-octave-output-list))))) |
| 300 | 296 | ||
| 301 | (defun inferior-octave-dynamic-list-input-ring () | 297 | (defun inferior-octave-dynamic-list-input-ring () |
| 302 | "List the buffer's input history in a help buffer" | 298 | "List the buffer's input history in a help buffer." |
| 303 | ;; We cannot use `comint-dynamic-list-input-ring', because it replaces | 299 | ;; We cannot use `comint-dynamic-list-input-ring', because it replaces |
| 304 | ;; "completion" by "history reference" ... | 300 | ;; "completion" by "history reference" ... |
| 305 | (interactive) | 301 | (interactive) |
| @@ -394,5 +390,5 @@ directory and makes this the current buffer's default directory." | |||
| 394 | 390 | ||
| 395 | (provide 'octave-inf) | 391 | (provide 'octave-inf) |
| 396 | 392 | ||
| 397 | ;;; arch-tag: bdce0395-24d1-4bb4-bfba-6fb1eeb1a660 | 393 | ;; arch-tag: bdce0395-24d1-4bb4-bfba-6fb1eeb1a660 |
| 398 | ;;; octave-inf.el ends here | 394 | ;;; octave-inf.el ends here |