emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/progmodes/octave-mod.el,v


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/lisp/progmodes/octave-mod.el,v
Date: Wed, 30 Apr 2008 08:48:04 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Stefan Monnier <monnier>        08/04/30 08:48:02

Index: progmodes/octave-mod.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/progmodes/octave-mod.el,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -b -r1.44 -r1.45
--- progmodes/octave-mod.el     8 Jan 2008 20:46:20 -0000       1.44
+++ progmodes/octave-mod.el     30 Apr 2008 08:48:02 -0000      1.45
@@ -31,13 +31,10 @@
 ;; It defines Octave mode, a major mode for editing
 ;; Octave code.
 
-;; The file octave-hlp.el provides `octave-help', a facility for looking up
-;; documentation on a symbol in the Octave info files.
-
 ;; The file octave-inf.el contains code for interacting with an inferior
 ;; Octave process using comint.
 
-;; See the documentation of `octave-mode', `octave-help' and
+;; See the documentation of `octave-mode' and
 ;; `run-octave' for further information on usage and customization.
 
 ;;; Code:
@@ -545,6 +542,12 @@
   (octave-initialize-completions)
   (run-mode-hooks 'octave-mode-hook))
 
+(defun octave-help ()
+  "Get help on Octave symbols from the Octave info files.
+Look up symbol in the function, operator and variable indices of the info 
files."
+  (let ((info-lookup-mode 'octave-mode))
+    (call-interactively 'info-lookup-symbol)))
+
 ;;; Miscellaneous useful functions
 (defun octave-describe-major-mode ()
   "Describe the current major mode."
@@ -1259,8 +1262,7 @@
               (display-completion-list list string))
             (message "Hit space to flush")
             (let (key first)
-              (if (save-excursion
-                    (set-buffer (get-buffer "*Completions*"))
+              (if (with-current-buffer (get-buffer "*Completions*")
                     (setq key (read-key-sequence nil)
                           first (aref key 0))
                     (and (consp first) (consp (event-start first))
@@ -1427,8 +1429,7 @@
   (let ((proc inferior-octave-process)
        (string (buffer-substring-no-properties beg end))
        line)
-    (save-excursion
-      (set-buffer inferior-octave-buffer)
+    (with-current-buffer inferior-octave-buffer
       (setq inferior-octave-output-list nil)
       (while (not (string-equal string ""))
        (if (string-match "\n" string)
@@ -1517,12 +1518,11 @@
      'octave-comment-char
      'octave-continuation-offset
      'octave-continuation-string
-     'octave-help-files
      'octave-send-echo-input
      'octave-send-line-auto-forward
      'octave-send-show-buffer))))
 
-;;; provide ourself
+;; provide ourself
 
 (provide 'octave-mod)
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]