+2013-05-01 Leo Liu <sdl.web@gmail.com>
+
+ * progmodes/octave.el (inferior-octave-has-built-in-variables):
+ Remove. Buil-in variables were removed from Octave in 2007.
+ (inferior-octave-startup): Fix uses.
+ (comint-line-beginning-position): Remove compatibility code for
+ emacs 21.
+
2013-05-01 Juri Linkov <juri@jurta.org>
* isearch.el (isearch-forward, isearch-mode): Doc fix. (Bug#13923)
;; Could certainly do more font locking in inferior Octave ...
"Additional expressions to highlight in Inferior Octave mode.")
-
-;;; Compatibility functions
-(if (not (fboundp 'comint-line-beginning-position))
- ;; comint-line-beginning-position is defined in Emacs 21
- (defun comint-line-beginning-position ()
- "Returns the buffer position of the beginning of the line, after any prompt.
-The prompt is assumed to be any text at the beginning of the line matching
-the regular expression `comint-prompt-regexp', a buffer local variable."
- (save-excursion (comint-bol nil) (point))))
-
-
(defvar inferior-octave-output-list nil)
(defvar inferior-octave-output-string nil)
(defvar inferior-octave-receive-in-progress nil)
(define-obsolete-variable-alias 'inferior-octave-startup-hook
'inferior-octave-mode-hook "24.4")
-(defvar inferior-octave-has-built-in-variables nil
- "Non-nil means that Octave has built-in variables.")
-
(defvar inferior-octave-dynamic-complete-functions
'(inferior-octave-completion-at-point comint-filename-completion)
"List of functions called to perform completion for inferior Octave.
'identity inferior-octave-output-list "\n")
"\n"))))
- ;; Find out whether Octave has built-in variables.
- (inferior-octave-send-list-and-digest
- (list "exist \"LOADPATH\"\n"))
- (setq inferior-octave-has-built-in-variables
- (string-match "101$" (car inferior-octave-output-list)))
-
;; An empty secondary prompt, as e.g. obtained by '--braindead',
;; means trouble.
(inferior-octave-send-list-and-digest (list "PS2\n"))
(if (string-match "\\(PS2\\|ans\\) = *$" (car inferior-octave-output-list))
- (inferior-octave-send-list-and-digest
- (list (if inferior-octave-has-built-in-variables
- "PS2 = \"> \"\n"
- "PS2 (\"> \");\n"))))
+ (inferior-octave-send-list-and-digest (list "PS2 (\"> \");\n")))
;; O.k., now we are ready for the Inferior Octave startup commands.
(let* (commands
(list "more off;\n"
(if (not (string-equal
inferior-octave-output-string ">> "))
- (if inferior-octave-has-built-in-variables
- "PS1=\"\\\\s> \";\n"
- "PS1 (\"\\\\s> \");\n"))
+ "PS1 (\"\\\\s> \");\n")
(if (file-exists-p file)
(format "source (\"%s\");\n" file))))
(inferior-octave-send-list-and-digest commands))