[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/progmodes/octave-mod.el
From: |
Juanma Barranquero |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/progmodes/octave-mod.el |
Date: |
Tue, 04 Feb 2003 08:24:49 -0500 |
Index: emacs/lisp/progmodes/octave-mod.el
diff -c emacs/lisp/progmodes/octave-mod.el:1.21
emacs/lisp/progmodes/octave-mod.el:1.22
*** emacs/lisp/progmodes/octave-mod.el:1.21 Mon Jan 20 03:59:40 2003
--- emacs/lisp/progmodes/octave-mod.el Tue Feb 4 08:24:35 2003
***************
*** 51,57 ****
(defvar inferior-octave-receive-in-progress nil)
(defconst octave-maintainer-address
! "Kurt Hornik <address@hidden>, address@hidden"
"Current maintainer of the Emacs Octave package.")
(defvar octave-abbrev-table nil
--- 51,57 ----
(defvar inferior-octave-receive-in-progress nil)
(defconst octave-maintainer-address
! "Kurt Hornik <address@hidden>, address@hidden"
"Current maintainer of the Emacs Octave package.")
(defvar octave-abbrev-table nil
***************
*** 207,225 ****
(define-key map "\n" 'octave-reindent-then-newline-and-indent)
(define-key map "\t" 'indent-according-to-mode)
(define-key map "\e;" 'octave-indent-for-comment)
! (define-key map "\e\n" 'octave-indent-new-comment-line)
(define-key map "\e\t" 'octave-complete-symbol)
(define-key map "\M-\C-a" 'octave-beginning-of-defun)
(define-key map "\M-\C-e" 'octave-end-of-defun)
(define-key map "\M-\C-h" 'octave-mark-defun)
! (define-key map "\M-\C-q" 'octave-indent-defun)
(define-key map "\C-c;" 'octave-comment-region)
! (define-key map "\C-c:" 'octave-uncomment-region)
(define-key map "\C-c\C-b" 'octave-submit-bug-report)
(define-key map "\C-c\C-p" 'octave-previous-code-line)
(define-key map "\C-c\C-n" 'octave-next-code-line)
(define-key map "\C-c\C-a" 'octave-beginning-of-line)
! (define-key map "\C-c\C-e" 'octave-end-of-line)
(define-key map "\C-c\M-\C-n" 'octave-forward-block)
(define-key map "\C-c\M-\C-p" 'octave-backward-block)
(define-key map "\C-c\M-\C-u" 'octave-backward-up-block)
--- 207,225 ----
(define-key map "\n" 'octave-reindent-then-newline-and-indent)
(define-key map "\t" 'indent-according-to-mode)
(define-key map "\e;" 'octave-indent-for-comment)
! (define-key map "\e\n" 'octave-indent-new-comment-line)
(define-key map "\e\t" 'octave-complete-symbol)
(define-key map "\M-\C-a" 'octave-beginning-of-defun)
(define-key map "\M-\C-e" 'octave-end-of-defun)
(define-key map "\M-\C-h" 'octave-mark-defun)
! (define-key map "\M-\C-q" 'octave-indent-defun)
(define-key map "\C-c;" 'octave-comment-region)
! (define-key map "\C-c:" 'octave-uncomment-region)
(define-key map "\C-c\C-b" 'octave-submit-bug-report)
(define-key map "\C-c\C-p" 'octave-previous-code-line)
(define-key map "\C-c\C-n" 'octave-next-code-line)
(define-key map "\C-c\C-a" 'octave-beginning-of-line)
! (define-key map "\C-c\C-e" 'octave-end-of-line)
(define-key map "\C-c\M-\C-n" 'octave-forward-block)
(define-key map "\C-c\M-\C-p" 'octave-backward-block)
(define-key map "\C-c\M-\C-u" 'octave-backward-up-block)
***************
*** 231,244 ****
(define-key map "\C-c\C-il" 'octave-send-line)
(define-key map "\C-c\C-ib" 'octave-send-block)
(define-key map "\C-c\C-if" 'octave-send-defun)
! (define-key map "\C-c\C-ir" 'octave-send-region)
(define-key map "\C-c\C-is" 'octave-show-process-buffer)
(define-key map "\C-c\C-ih" 'octave-hide-process-buffer)
(define-key map "\C-c\C-ik" 'octave-kill-process)
(define-key map "\C-c\C-i\C-l" 'octave-send-line)
(define-key map "\C-c\C-i\C-b" 'octave-send-block)
(define-key map "\C-c\C-i\C-f" 'octave-send-defun)
! (define-key map "\C-c\C-i\C-r" 'octave-send-region)
(define-key map "\C-c\C-i\C-s" 'octave-show-process-buffer)
(define-key map "\C-c\C-i\C-h" 'octave-hide-process-buffer)
(define-key map "\C-c\C-i\C-k" 'octave-kill-process)
--- 231,244 ----
(define-key map "\C-c\C-il" 'octave-send-line)
(define-key map "\C-c\C-ib" 'octave-send-block)
(define-key map "\C-c\C-if" 'octave-send-defun)
! (define-key map "\C-c\C-ir" 'octave-send-region)
(define-key map "\C-c\C-is" 'octave-show-process-buffer)
(define-key map "\C-c\C-ih" 'octave-hide-process-buffer)
(define-key map "\C-c\C-ik" 'octave-kill-process)
(define-key map "\C-c\C-i\C-l" 'octave-send-line)
(define-key map "\C-c\C-i\C-b" 'octave-send-block)
(define-key map "\C-c\C-i\C-f" 'octave-send-defun)
! (define-key map "\C-c\C-i\C-r" 'octave-send-region)
(define-key map "\C-c\C-i\C-s" 'octave-show-process-buffer)
(define-key map "\C-c\C-i\C-h" 'octave-hide-process-buffer)
(define-key map "\C-c\C-i\C-k" 'octave-kill-process)
***************
*** 383,389 ****
"Alist of Octave symbols for completion in Octave mode.
Each element looks like (VAR . VAR), where the car and cdr are the same
symbol (an Octave command or variable name).
! Currently, only builtin variables can be completed.")
(defvar octave-mode-imenu-generic-expression
(list
--- 383,389 ----
"Alist of Octave symbols for completion in Octave mode.
Each element looks like (VAR . VAR), where the car and cdr are the same
symbol (an Octave command or variable name).
! Currently, only builtin variables can be completed.")
(defvar octave-mode-imenu-generic-expression
(list
***************
*** 516,531 ****
(setq mode-name "Octave")
(setq local-abbrev-table octave-abbrev-table)
(set-syntax-table octave-mode-syntax-table)
!
(make-local-variable 'indent-line-function)
(setq indent-line-function 'octave-indent-line)
! (make-local-variable 'comment-start)
(setq comment-start octave-comment-start)
(make-local-variable 'comment-end)
(setq comment-end "")
(make-local-variable 'comment-column)
! (setq comment-column 32)
(make-local-variable 'comment-start-skip)
(setq comment-start-skip "\\s<+\\s-*")
(make-local-variable 'comment-indent-function)
--- 516,531 ----
(setq mode-name "Octave")
(setq local-abbrev-table octave-abbrev-table)
(set-syntax-table octave-mode-syntax-table)
!
(make-local-variable 'indent-line-function)
(setq indent-line-function 'octave-indent-line)
! (make-local-variable 'comment-start)
(setq comment-start octave-comment-start)
(make-local-variable 'comment-end)
(setq comment-end "")
(make-local-variable 'comment-column)
! (setq comment-column 32)
(make-local-variable 'comment-start-skip)
(setq comment-start-skip "\\s<+\\s-*")
(make-local-variable 'comment-indent-function)
***************
*** 566,572 ****
(describe-function major-mode))
(defun octave-point (position)
! "Returns the value of point at certain positions."
(save-excursion
(cond
((eq position 'bol) (beginning-of-line))
--- 566,572 ----
(describe-function major-mode))
(defun octave-point (position)
! "Returns the value of point at certain positions."
(save-excursion
(cond
((eq position 'bol) (beginning-of-line))
***************
*** 644,650 ****
(interactive "r\nP")
(let ((comment-start (char-to-string octave-comment-char)))
(comment-region beg end arg)))
!
(defun octave-uncomment-region (beg end &optional arg)
"Uncomment each line in the region as Octave code."
(interactive "r\nP")
--- 644,650 ----
(interactive "r\nP")
(let ((comment-start (char-to-string octave-comment-char)))
(comment-region beg end arg)))
!
(defun octave-uncomment-region (beg end &optional arg)
"Uncomment each line in the region as Octave code."
(interactive "r\nP")
***************
*** 741,747 ****
"Maybe insert and indent an Octave comment.
If there is no comment already on this line, create a code-level comment
\(started by two comment characters) if the line is empty, or an in-line
! comment (started by one comment character) otherwise.
Point is left after the start of the comment which is properly aligned."
(interactive)
(indent-for-comment)
--- 741,747 ----
"Maybe insert and indent an Octave comment.
If there is no comment already on this line, create a code-level comment
\(started by two comment characters) if the line is empty, or an in-line
! comment (started by one comment character) otherwise.
Point is left after the start of the comment which is properly aligned."
(interactive)
(indent-for-comment)
***************
*** 767,774 ****
(defun octave-indent-new-comment-line ()
"Break Octave line at point, continuing comment if within one.
If within code, insert `octave-continuation-string' before breaking the
! line. If within a string, signal an error.
! The new line is properly indented."
(interactive)
(delete-horizontal-space)
(cond
--- 767,774 ----
(defun octave-indent-new-comment-line ()
"Break Octave line at point, continuing comment if within one.
If within code, insert `octave-continuation-string' before breaking the
! line. If within a string, signal an error.
! The new line is properly indented."
(interactive)
(delete-horizontal-space)
(cond
***************
*** 808,814 ****
(setq n (forward-line inc)))
(setq arg (- arg inc)))
n))
!
(defun octave-previous-code-line (&optional arg)
"Move ARG lines of Octave code backward (forward if ARG is negative).
Skips past all empty and comment lines. Default for ARG is 1.
--- 808,814 ----
(setq n (forward-line inc)))
(setq arg (- arg inc)))
n))
!
(defun octave-previous-code-line (&optional arg)
"Move ARG lines of Octave code backward (forward if ARG is negative).
Skips past all empty and comment lines. Default for ARG is 1.
***************
*** 863,869 ****
(looking-at octave-continuation-regexp)))
(zerop (forward-line 1)))))
(end-of-line)))
!
(defun octave-scan-blocks (from count depth)
"Scan from character number FROM by COUNT Octave begin-end blocks.
Returns the character number of the position thus found.
--- 863,869 ----
(looking-at octave-continuation-regexp)))
(zerop (forward-line 1)))))
(end-of-line)))
!
(defun octave-scan-blocks (from count depth)
"Scan from character number FROM by COUNT Octave begin-end blocks.
Returns the character number of the position thus found.
***************
*** 1068,1074 ****
(interactive "p")
(or arg (setq arg 1))
(and (< arg 0) (skip-syntax-backward "w"))
! (and (> arg 0) (skip-syntax-forward "w"))
(if (octave-in-defun-p)
(setq arg (- arg 1)))
(if (= arg 0) (setq arg -1))
--- 1068,1074 ----
(interactive "p")
(or arg (setq arg 1))
(and (< arg 0) (skip-syntax-backward "w"))
! (and (> arg 0) (skip-syntax-forward "w"))
(if (octave-in-defun-p)
(setq arg (- arg 1)))
(if (= arg 0) (setq arg -1))
***************
*** 1091,1097 ****
(exchange-point-and-mark))
(goto-char pos)
(message "No function to mark found"))))
!
;;; Filling
(defun octave-auto-fill ()
--- 1091,1097 ----
(exchange-point-and-mark))
(goto-char pos)
(message "No function to mark found"))))
!
;;; Filling
(defun octave-auto-fill ()
***************
*** 1101,1107 ****
(let (fc give-up)
(if (or (null (setq fc (current-fill-column)))
(save-excursion
! (beginning-of-line)
(and auto-fill-inhibit-regexp
(looking-at auto-fill-inhibit-regexp))))
nil ; Can't do anything
--- 1101,1107 ----
(let (fc give-up)
(if (or (null (setq fc (current-fill-column)))
(save-excursion
! (beginning-of-line)
(and auto-fill-inhibit-regexp
(looking-at auto-fill-inhibit-regexp))))
nil ; Can't do anything
***************
*** 1158,1164 ****
(defun octave-fill-paragraph (&optional arg)
"Fill paragraph of Octave code, handling Octave comments."
(interactive "P")
! (save-excursion
(let ((end (progn (forward-paragraph) (point)))
(beg (progn
(forward-paragraph -1)
--- 1158,1164 ----
(defun octave-fill-paragraph (&optional arg)
"Fill paragraph of Octave code, handling Octave comments."
(interactive "P")
! (save-excursion
(let ((end (progn (forward-paragraph) (point)))
(beg (progn
(forward-paragraph -1)
***************
*** 1263,1269 ****
(let ((list (all-completions string octave-completion-alist))
(conf (current-window-configuration)))
;; Taken from comint.el
! (message "Making completion list...")
(with-output-to-temp-buffer "*Completions*"
(display-completion-list list))
(message "Hit space to flush")
--- 1263,1269 ----
(let ((list (all-completions string octave-completion-alist))
(conf (current-window-configuration)))
;; Taken from comint.el
! (message "Making completion list...")
(with-output-to-temp-buffer "*Completions*"
(display-completion-list list))
(message "Hit space to flush")
***************
*** 1284,1290 ****
(set-window-configuration conf)
(setq unread-command-events
(listify-key-sequence key))))))))))
!
;;; Electric characters && friends
(defun octave-reindent-then-newline-and-indent ()
--- 1284,1290 ----
(set-window-configuration conf)
(setq unread-command-events
(listify-key-sequence key))))))))))
!
;;; Electric characters && friends
(defun octave-reindent-then-newline-and-indent ()
***************
*** 1383,1403 ****
(indent-according-to-mode)
(newline 2)
(insert prefix "usage: " string)
! (reindent-then-newline-and-indent)
(insert prefix)
! (reindent-then-newline-and-indent)
(insert prefix)
(indent-according-to-mode)
(save-excursion
(newline 2)
(insert "endfunction")
(indent-according-to-mode))))
!
;;; Menu
(defun octave-add-octave-menu ()
"Adds the `Octave' menu to the menu bar in Octave mode."
! (require 'easymenu)
(easy-menu-define octave-mode-menu-map octave-mode-map
"Menu keymap for Octave mode." octave-mode-menu)
(easy-menu-add octave-mode-menu-map octave-mode-map))
--- 1383,1403 ----
(indent-according-to-mode)
(newline 2)
(insert prefix "usage: " string)
! (reindent-then-newline-and-indent)
(insert prefix)
! (reindent-then-newline-and-indent)
(insert prefix)
(indent-according-to-mode)
(save-excursion
(newline 2)
(insert "endfunction")
(indent-according-to-mode))))
!
;;; Menu
(defun octave-add-octave-menu ()
"Adds the `Octave' menu to the menu bar in Octave mode."
! (require 'easymenu)
(easy-menu-define octave-mode-menu-map octave-mode-map
"Menu keymap for Octave mode." octave-mode-menu)
(easy-menu-add octave-mode-menu-map octave-mode-map))
***************
*** 1431,1437 ****
(defun octave-send-region (beg end)
"Send current region to the inferior Octave process."
(interactive "r")
! (inferior-octave t)
(let ((proc inferior-octave-process)
(string (buffer-substring-no-properties beg end))
line)
--- 1431,1437 ----
(defun octave-send-region (beg end)
"Send current region to the inferior Octave process."
(interactive "r")
! (inferior-octave t)
(let ((proc inferior-octave-process)
(string (buffer-substring-no-properties beg end))
line)
***************
*** 1459,1465 ****
(display-buffer inferior-octave-buffer)))
(defun octave-send-block ()
! "Send current Octave block to the inferior Octave process."
(interactive)
(save-excursion
(octave-mark-block)
--- 1459,1465 ----
(display-buffer inferior-octave-buffer)))
(defun octave-send-block ()
! "Send current Octave block to the inferior Octave process."
(interactive)
(save-excursion
(octave-mark-block)
***************
*** 1498,1504 ****
(print-escape-newlines nil)
(opoint (point)))
(terpri)
! (prin1
(save-excursion
(forward-sexp -1)
(inferior-octave-send-list-and-digest
--- 1498,1504 ----
(print-escape-newlines nil)
(opoint (point)))
(terpri)
! (prin1
(save-excursion
(forward-sexp -1)
(inferior-octave-send-list-and-digest
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/progmodes/octave-mod.el,
Juanma Barranquero <=