diff options
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/progmodes/octave.el | 16 |
2 files changed, 17 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e80cc88b5e9..87f0e5242ab 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2013-05-18 Leo Liu <sdl.web@gmail.com> | ||
| 2 | |||
| 3 | * progmodes/octave.el (inferior-octave-startup): Use OCTAVE_SRCDIR | ||
| 4 | instead. | ||
| 5 | (octave-source-directories): Don't check process. | ||
| 6 | (octave-source-directories, octave-find-definition): Doc fix. | ||
| 7 | |||
| 1 | 2013-05-18 Glenn Morris <rgm@gnu.org> | 8 | 2013-05-18 Glenn Morris <rgm@gnu.org> |
| 2 | 9 | ||
| 3 | * progmodes/vhdl-mode.el (vhdl-mode-map-init): | 10 | * progmodes/vhdl-mode.el (vhdl-mode-map-init): |
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 |