aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo Liu2013-11-22 16:09:40 +0800
committerLeo Liu2013-11-22 16:09:40 +0800
commit8c09f64b76ed0be6ad41fe0c58406add0ebf361b (patch)
tree42a1dac48795f0ab5b9064486f881cd59058863d
parent48592bfdf58e26bb6df780ca0a154f7b20d352c6 (diff)
downloademacs-8c09f64b76ed0be6ad41fe0c58406add0ebf361b.tar.gz
emacs-8c09f64b76ed0be6ad41fe0c58406add0ebf361b.zip
* progmodes/octave.el (octave-help-mode): Adapt to change to
help-mode-finish to use derived-mode-p on 2013-09-17. (inferior-octave-prompt): Also match octave-gui.
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/progmodes/octave.el27
2 files changed, 8 insertions, 22 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 17f3f4c0c1f..d865af7cda1 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -2,6 +2,9 @@
2 2
3 * progmodes/octave.el (octave-operator-regexp): Exclude newline. 3 * progmodes/octave.el (octave-operator-regexp): Exclude newline.
4 (Bug#15076) 4 (Bug#15076)
5 (octave-help-mode): Adapt to change to help-mode-finish to use
6 derived-mode-p on 2013-09-17.
7 (inferior-octave-prompt): Also match octave-gui.
5 8
62013-11-22 Leo Liu <sdl.web@gmail.com> 92013-11-22 Leo Liu <sdl.web@gmail.com>
7 10
diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el
index 3d68b57cd65..49b5a2970d7 100644
--- a/lisp/progmodes/octave.el
+++ b/lisp/progmodes/octave.el
@@ -599,7 +599,7 @@ definitions can also be stored in files and used in batch mode."
599 :group 'octave) 599 :group 'octave)
600 600
601(defcustom inferior-octave-prompt 601(defcustom inferior-octave-prompt
602 "\\(^octave\\(\\|.bin\\|.exe\\)\\(-[.0-9]+\\)?\\(:[0-9]+\\)?\\|^debug\\|^\\)>+ " 602 "\\(^octave\\(\\|.bin\\|.exe\\|-gui\\)\\(-[.0-9]+\\)?\\(:[0-9]+\\)?\\|^debug\\|^\\)>+ "
603 "Regexp to match prompts for the inferior Octave process." 603 "Regexp to match prompts for the inferior Octave process."
604 :type 'regexp 604 :type 'regexp
605 :group 'octave) 605 :group 'octave)
@@ -1649,7 +1649,7 @@ code line."
1649 1649
1650(defvar octave-help-mode-map 1650(defvar octave-help-mode-map
1651 (let ((map (make-sparse-keymap))) 1651 (let ((map (make-sparse-keymap)))
1652 (define-key map "\M-." 'octave-find-definition) 1652 (define-key map "\M-." 'octave-find-definition)
1653 (define-key map "\C-hd" 'octave-help) 1653 (define-key map "\C-hd" 'octave-help)
1654 (define-key map "\C-ha" 'octave-lookfor) 1654 (define-key map "\C-ha" 'octave-lookfor)
1655 map)) 1655 map))
@@ -1659,26 +1659,9 @@ code line."
1659 :abbrev-table nil 1659 :abbrev-table nil
1660 :syntax-table octave-mode-syntax-table 1660 :syntax-table octave-mode-syntax-table
1661 (eval-and-compile (require 'help-mode)) 1661 (eval-and-compile (require 'help-mode))
1662 ;; Mostly stolen from `help-make-xrefs'. 1662 ;; Don't highlight `EXAMPLE' as elisp symbols by using a regexp that
1663 (let ((inhibit-read-only t)) 1663 ;; can never match.
1664 (setq-local info-lookup-mode 'octave-mode) 1664 (setq-local help-xref-symbol-regexp "x\\`"))
1665 ;; Delete extraneous newlines at the end of the docstring
1666 (goto-char (point-max))
1667 (while (and (not (bobp)) (bolp))
1668 (delete-char -1))
1669 (insert "\n")
1670 (when (or help-xref-stack help-xref-forward-stack)
1671 (insert "\n"))
1672 (when help-xref-stack
1673 (help-insert-xref-button help-back-label 'help-back
1674 (current-buffer)))
1675 (when help-xref-forward-stack
1676 (when help-xref-stack
1677 (insert "\t"))
1678 (help-insert-xref-button help-forward-label 'help-forward
1679 (current-buffer)))
1680 (when (or help-xref-stack help-xref-forward-stack)
1681 (insert "\n"))))
1682 1665
1683(defun octave-help (fn) 1666(defun octave-help (fn)
1684 "Display the documentation of FN." 1667 "Display the documentation of FN."