aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo Liu2013-05-16 16:52:02 +0800
committerLeo Liu2013-05-16 16:52:02 +0800
commit2d4bf34b5b83b3728b2fb18a72536f3e14afcf34 (patch)
treed27f7f60cfea2fd68d9c1940a735d3aa9d9bb89c
parent238cebefb7e880cce1823ef1f0976efafe600b87 (diff)
downloademacs-2d4bf34b5b83b3728b2fb18a72536f3e14afcf34.tar.gz
emacs-2d4bf34b5b83b3728b2fb18a72536f3e14afcf34.zip
* progmodes/octave.el (octave-indent-defun): Mark obsolete.
(octave-mode-menu, octave-mode-map): Remove its uses.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/progmodes/octave.el45
2 files changed, 23 insertions, 27 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index bb9dc479e94..e6f56664a52 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12013-05-16 Leo Liu <sdl.web@gmail.com>
2
3 * progmodes/octave.el (octave-indent-defun): Mark obsolete.
4 (octave-mode-menu, octave-mode-map): Remove its uses.
5
12013-05-16 Reto Zimmermann <reto@gnu.org> 62013-05-16 Reto Zimmermann <reto@gnu.org>
2 7
3 Sync with upstream vhdl mode v3.34.2. 8 Sync with upstream vhdl mode v3.34.2.
diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el
index 49c9c30d313..ab2f570cccb 100644
--- a/lisp/progmodes/octave.el
+++ b/lisp/progmodes/octave.el
@@ -98,8 +98,6 @@ parenthetical grouping.")
98 (let ((map (make-sparse-keymap))) 98 (let ((map (make-sparse-keymap)))
99 (define-key map "\M-." 'octave-find-definition) 99 (define-key map "\M-." 'octave-find-definition)
100 (define-key map "\M-\C-j" 'octave-indent-new-comment-line) 100 (define-key map "\M-\C-j" 'octave-indent-new-comment-line)
101 ;; C-c C-q is also used by cc modes for similar command
102 (define-key map "\C-c\C-q" 'octave-indent-defun)
103 (define-key map "\C-c\C-p" 'octave-previous-code-line) 101 (define-key map "\C-c\C-p" 'octave-previous-code-line)
104 (define-key map "\C-c\C-n" 'octave-next-code-line) 102 (define-key map "\C-c\C-n" 'octave-next-code-line)
105 (define-key map "\C-c\C-a" 'octave-beginning-of-line) 103 (define-key map "\C-c\C-a" 'octave-beginning-of-line)
@@ -134,27 +132,26 @@ parenthetical grouping.")
134 "Menu for Octave mode." 132 "Menu for Octave mode."
135 '("Octave" 133 '("Octave"
136 ("Lines" 134 ("Lines"
137 ["Previous Code Line" octave-previous-code-line t] 135 ["Previous Code Line" octave-previous-code-line t]
138 ["Next Code Line" octave-next-code-line t] 136 ["Next Code Line" octave-next-code-line t]
139 ["Begin of Continuation" octave-beginning-of-line t] 137 ["Begin of Continuation" octave-beginning-of-line t]
140 ["End of Continuation" octave-end-of-line t] 138 ["End of Continuation" octave-end-of-line t]
141 ["Split Line at Point" octave-indent-new-comment-line t]) 139 ["Split Line at Point" octave-indent-new-comment-line t])
142 ("Blocks" 140 ("Blocks"
143 ["Mark Block" octave-mark-block t] 141 ["Mark Block" octave-mark-block t]
144 ["Close Block" smie-close-block t]) 142 ["Close Block" smie-close-block t])
145 ("Functions" 143 ("Functions"
146 ["Indent Function" octave-indent-defun t] 144 ["Insert Function" octave-insert-defun t]
147 ["Insert Function" octave-insert-defun t] 145 ["Update function file comment" octave-update-function-file-comment t])
148 ["Update function file comment" octave-update-function-file-comment t])
149 "-" 146 "-"
150 ("Debug" 147 ("Debug"
151 ["Send Current Line" octave-send-line t] 148 ["Send Current Line" octave-send-line t]
152 ["Send Current Block" octave-send-block t] 149 ["Send Current Block" octave-send-block t]
153 ["Send Current Function" octave-send-defun t] 150 ["Send Current Function" octave-send-defun t]
154 ["Send Region" octave-send-region t] 151 ["Send Region" octave-send-region t]
155 ["Show Process Buffer" octave-show-process-buffer t] 152 ["Show Process Buffer" octave-show-process-buffer t]
156 ["Hide Process Buffer" octave-hide-process-buffer t] 153 ["Hide Process Buffer" octave-hide-process-buffer t]
157 ["Kill Process" octave-kill-process t]) 154 ["Kill Process" octave-kill-process t])
158 "-" 155 "-"
159 ["Indent Line" indent-according-to-mode t] 156 ["Indent Line" indent-according-to-mode t]
160 ["Complete Symbol" completion-at-point t] 157 ["Complete Symbol" completion-at-point t]
@@ -1111,14 +1108,8 @@ The new line is properly indented."
1111 (insert (concat " " octave-continuation-string)) 1108 (insert (concat " " octave-continuation-string))
1112 (reindent-then-newline-and-indent)))) 1109 (reindent-then-newline-and-indent))))
1113 1110
1114(defun octave-indent-defun () 1111(define-obsolete-function-alias
1115 "Properly indent the Octave function which contains point." 1112 'octave-indent-defun 'prog-indent-sexp "24.4")
1116 (interactive)
1117 (save-excursion
1118 (mark-defun)
1119 (message "Indenting function...")
1120 (indent-region (point) (mark) nil))
1121 (message "Indenting function...done."))
1122 1113
1123 1114
1124;;; Motion 1115;;; Motion