diff options
| author | Leo Liu | 2013-05-18 09:17:50 +0800 |
|---|---|---|
| committer | Leo Liu | 2013-05-18 09:17:50 +0800 |
| commit | 5e80b74f7aa90e002186ca510e877883c2f1f14f (patch) | |
| tree | 5fa09b19e4ec3453b7fee01325421b5291ff4c69 /lisp/progmodes | |
| parent | 254826b811e0fa52f163441188ae915801600cb5 (diff) | |
| download | emacs-5e80b74f7aa90e002186ca510e877883c2f1f14f.tar.gz emacs-5e80b74f7aa90e002186ca510e877883c2f1f14f.zip | |
* progmodes/octave.el (inferior-octave-startup): Use OCTAVE_SRCDIR
instead.
(octave-source-directories): Don't check process.
(octave-source-directories, octave-find-definition): Doc fix.
Diffstat (limited to 'lisp/progmodes')
| -rw-r--r-- | lisp/progmodes/octave.el | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el index 26fb254af5f..03da4095449 100644 --- a/lisp/progmodes/octave.el +++ b/lisp/progmodes/octave.el | |||
| @@ -738,8 +738,10 @@ startup file, `~/.emacs-octave'." | |||
| 738 | (inferior-octave-send-list-and-digest (list "PS2 (\"> \");\n"))) | 738 | (inferior-octave-send-list-and-digest (list "PS2 (\"> \");\n"))) |
| 739 | 739 | ||
| 740 | (inferior-octave-send-list-and-digest | 740 | (inferior-octave-send-list-and-digest |
| 741 | (list "if exist(\"__octave_srcdir__\") disp(__octave_srcdir__) endif\n")) | 741 | (list "disp(getenv(\"OCTAVE_SRCDIR\"))\n")) |
| 742 | (process-put proc 'octave-srcdir (car inferior-octave-output-list)) | 742 | (process-put proc 'octave-srcdir |
| 743 | (unless (equal (car inferior-octave-output-list) "") | ||
| 744 | (car inferior-octave-output-list))) | ||
| 743 | 745 | ||
| 744 | ;; O.K., now we are ready for the Inferior Octave startup commands. | 746 | ;; O.K., now we are ready for the Inferior Octave startup commands. |
| 745 | (inferior-octave-send-list-and-digest | 747 | (inferior-octave-send-list-and-digest |
| @@ -1627,14 +1629,16 @@ if ismember(exist(\"%s\"), [2 3 5 103]) print_usage(\"%s\") endif\n" | |||
| 1627 | :type 'octave-help-function)))))))) | 1629 | :type 'octave-help-function)))))))) |
| 1628 | 1630 | ||
| 1629 | (defcustom octave-source-directories nil | 1631 | (defcustom octave-source-directories nil |
| 1630 | "A list of directories for Octave sources." | 1632 | "A list of directories for Octave sources. |
| 1633 | If the environment variable OCTAVE_SRCDIR is set, it is searched first." | ||
| 1631 | :type '(repeat directory) | 1634 | :type '(repeat directory) |
| 1632 | :group 'octave | 1635 | :group 'octave |
| 1633 | :version "24.4") | 1636 | :version "24.4") |
| 1634 | 1637 | ||
| 1635 | (defun octave-source-directories () | 1638 | (defun octave-source-directories () |
| 1636 | (inferior-octave-check-process) | 1639 | (let ((srcdir (or (and inferior-octave-process |
| 1637 | (let ((srcdir (process-get inferior-octave-process 'octave-srcdir))) | 1640 | (process-get inferior-octave-process 'octave-srcdir)) |
| 1641 | (getenv "OCTAVE_SRCDIR")))) | ||
| 1638 | (if srcdir | 1642 | (if srcdir |
| 1639 | (cons srcdir octave-source-directories) | 1643 | (cons srcdir octave-source-directories) |
| 1640 | octave-source-directories))) | 1644 | octave-source-directories))) |
| @@ -1668,7 +1672,7 @@ if ismember(exist(\"%s\"), [2 3 5 103]) print_usage(\"%s\") endif\n" | |||
| 1668 | 1672 | ||
| 1669 | (defun octave-find-definition (fn) | 1673 | (defun octave-find-definition (fn) |
| 1670 | "Find the definition of FN. | 1674 | "Find the definition of FN. |
| 1671 | Definitions for functions implemented in C++ can be found if | 1675 | Functions implemented in C++ can be found if |
| 1672 | `octave-source-directories' is set correctly." | 1676 | `octave-source-directories' is set correctly." |
| 1673 | (interactive (list (octave-completing-read))) | 1677 | (interactive (list (octave-completing-read))) |
| 1674 | (inferior-octave-send-list-and-digest | 1678 | (inferior-octave-send-list-and-digest |