diff options
| author | Stefan Monnier | 2007-09-19 14:47:51 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2007-09-19 14:47:51 +0000 |
| commit | e22bbd489670fcef14fd9b917689138867bfacc3 (patch) | |
| tree | 199521278bd75489e270fe87814087f56fa59a9b | |
| parent | ff3197905023037c569a47dc8a168e85b2120a0d (diff) | |
| download | emacs-e22bbd489670fcef14fd9b917689138867bfacc3.tar.gz emacs-e22bbd489670fcef14fd9b917689138867bfacc3.zip | |
Remove spurious * in docstrings.
(octave-mode-map): Move init into declaration and remove \t binding.
(octave-mode-startup-message): Remove unused var.
(octave-scan-blocks): Remove unused arg `from'.
(octave-forward-block, octave-down-block, octave-up-block): Update callers.
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/progmodes/octave-mod.el | 175 |
2 files changed, 87 insertions, 95 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 55e06aecf16..051a8e9502c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,12 @@ | |||
| 1 | 2007-09-19 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2007-09-19 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * progmodes/octave-mod.el: Remove spurious * in docstrings. | ||
| 4 | (octave-mode-map): Move init into declaration and remove \t binding. | ||
| 5 | (octave-mode-startup-message): Remove unused var. | ||
| 6 | (octave-scan-blocks): Remove unused arg `from'. | ||
| 7 | (octave-forward-block, octave-down-block, octave-up-block): | ||
| 8 | Update callers. | ||
| 9 | |||
| 3 | * progmodes/meta-mode.el (meta-mode-syntax-table): Move init into decl. | 10 | * progmodes/meta-mode.el (meta-mode-syntax-table): Move init into decl. |
| 4 | (meta-mode-map): Likewise and remove \t binding. | 11 | (meta-mode-map): Likewise and remove \t binding. |
| 5 | 12 | ||
diff --git a/lisp/progmodes/octave-mod.el b/lisp/progmodes/octave-mod.el index 3da3434cda2..cfa5e056def 100644 --- a/lisp/progmodes/octave-mod.el +++ b/lisp/progmodes/octave-mod.el | |||
| @@ -63,7 +63,7 @@ All Octave abbrevs start with a grave accent (`).") | |||
| 63 | (unless octave-abbrev-table | 63 | (unless octave-abbrev-table |
| 64 | (define-abbrev-table 'octave-abbrev-table ())) | 64 | (define-abbrev-table 'octave-abbrev-table ())) |
| 65 | 65 | ||
| 66 | (let ((ac abbrevs-changed)) | 66 | (let ((abbrevs-changed abbrevs-changed)) |
| 67 | (define-abbrev octave-abbrev-table "`a" "all_va_args" nil 0 t) | 67 | (define-abbrev octave-abbrev-table "`a" "all_va_args" nil 0 t) |
| 68 | (define-abbrev octave-abbrev-table "`b" "break" nil 0 t) | 68 | (define-abbrev octave-abbrev-table "`b" "break" nil 0 t) |
| 69 | (define-abbrev octave-abbrev-table "`cs" "case" nil 0 t) | 69 | (define-abbrev octave-abbrev-table "`cs" "case" nil 0 t) |
| @@ -91,8 +91,7 @@ All Octave abbrevs start with a grave accent (`).") | |||
| 91 | (define-abbrev octave-abbrev-table "`t" "try" nil 0 t) | 91 | (define-abbrev octave-abbrev-table "`t" "try" nil 0 t) |
| 92 | (define-abbrev octave-abbrev-table "`up" "unwind_protect" nil 0 t) | 92 | (define-abbrev octave-abbrev-table "`up" "unwind_protect" nil 0 t) |
| 93 | (define-abbrev octave-abbrev-table "`upc" "unwind_protect_cleanup" nil 0 t) | 93 | (define-abbrev octave-abbrev-table "`upc" "unwind_protect_cleanup" nil 0 t) |
| 94 | (define-abbrev octave-abbrev-table "`w" "while ()" nil 0 t) | 94 | (define-abbrev octave-abbrev-table "`w" "while ()" nil 0 t)) |
| 95 | (setq abbrevs-changed ac)) | ||
| 96 | 95 | ||
| 97 | (defvar octave-comment-char ?# | 96 | (defvar octave-comment-char ?# |
| 98 | "Character to start an Octave comment.") | 97 | "Character to start an Octave comment.") |
| @@ -193,22 +192,18 @@ parenthetical grouping.") | |||
| 193 | "Additional Octave expressions to highlight.") | 192 | "Additional Octave expressions to highlight.") |
| 194 | 193 | ||
| 195 | (defcustom inferior-octave-buffer "*Inferior Octave*" | 194 | (defcustom inferior-octave-buffer "*Inferior Octave*" |
| 196 | "*Name of buffer for running an inferior Octave process." | 195 | "Name of buffer for running an inferior Octave process." |
| 197 | :type 'string | 196 | :type 'string |
| 198 | :group 'octave-inferior) | 197 | :group 'octave-inferior) |
| 199 | 198 | ||
| 200 | (defvar inferior-octave-process nil) | 199 | (defvar inferior-octave-process nil) |
| 201 | 200 | ||
| 202 | (defvar octave-mode-map nil | 201 | (defvar octave-mode-map |
| 203 | "Keymap used in Octave mode.") | ||
| 204 | (if octave-mode-map | ||
| 205 | () | ||
| 206 | (let ((map (make-sparse-keymap))) | 202 | (let ((map (make-sparse-keymap))) |
| 207 | (define-key map "`" 'octave-abbrev-start) | 203 | (define-key map "`" 'octave-abbrev-start) |
| 208 | (define-key map ";" 'octave-electric-semi) | 204 | (define-key map ";" 'octave-electric-semi) |
| 209 | (define-key map " " 'octave-electric-space) | 205 | (define-key map " " 'octave-electric-space) |
| 210 | (define-key map "\n" 'octave-reindent-then-newline-and-indent) | 206 | (define-key map "\n" 'octave-reindent-then-newline-and-indent) |
| 211 | (define-key map "\t" 'indent-according-to-mode) | ||
| 212 | (define-key map "\e;" 'octave-indent-for-comment) | 207 | (define-key map "\e;" 'octave-indent-for-comment) |
| 213 | (define-key map "\e\n" 'octave-indent-new-comment-line) | 208 | (define-key map "\e\n" 'octave-indent-new-comment-line) |
| 214 | (define-key map "\e\t" 'octave-complete-symbol) | 209 | (define-key map "\e\t" 'octave-complete-symbol) |
| @@ -245,49 +240,51 @@ parenthetical grouping.") | |||
| 245 | (define-key map "\C-c\C-i\C-s" 'octave-show-process-buffer) | 240 | (define-key map "\C-c\C-i\C-s" 'octave-show-process-buffer) |
| 246 | (define-key map "\C-c\C-i\C-h" 'octave-hide-process-buffer) | 241 | (define-key map "\C-c\C-i\C-h" 'octave-hide-process-buffer) |
| 247 | (define-key map "\C-c\C-i\C-k" 'octave-kill-process) | 242 | (define-key map "\C-c\C-i\C-k" 'octave-kill-process) |
| 248 | (setq octave-mode-map map))) | 243 | map) |
| 244 | "Keymap used in Octave mode.") | ||
| 245 | |||
| 249 | 246 | ||
| 250 | (defvar octave-mode-menu | 247 | (defvar octave-mode-menu |
| 251 | (list "Octave" | 248 | '("Octave" |
| 252 | (list "Lines" | 249 | '("Lines" |
| 253 | ["Previous Code Line" octave-previous-code-line t] | 250 | ["Previous Code Line" octave-previous-code-line t] |
| 254 | ["Next Code Line" octave-next-code-line t] | 251 | ["Next Code Line" octave-next-code-line t] |
| 255 | ["Begin of Continuation" octave-beginning-of-line t] | 252 | ["Begin of Continuation" octave-beginning-of-line t] |
| 256 | ["End of Continuation" octave-end-of-line t] | 253 | ["End of Continuation" octave-end-of-line t] |
| 257 | ["Split Line at Point" octave-indent-new-comment-line t]) | 254 | ["Split Line at Point" octave-indent-new-comment-line t]) |
| 258 | (list "Blocks" | 255 | '("Blocks" |
| 259 | ["Next Block" octave-forward-block t] | 256 | ["Next Block" octave-forward-block t] |
| 260 | ["Previous Block" octave-backward-block t] | 257 | ["Previous Block" octave-backward-block t] |
| 261 | ["Down Block" octave-down-block t] | 258 | ["Down Block" octave-down-block t] |
| 262 | ["Up Block" octave-backward-up-block t] | 259 | ["Up Block" octave-backward-up-block t] |
| 263 | ["Mark Block" octave-mark-block t] | 260 | ["Mark Block" octave-mark-block t] |
| 264 | ["Close Block" octave-close-block t]) | 261 | ["Close Block" octave-close-block t]) |
| 265 | (list "Functions" | 262 | '("Functions" |
| 266 | ["Begin of Function" octave-beginning-of-defun t] | 263 | ["Begin of Function" octave-beginning-of-defun t] |
| 267 | ["End of Function" octave-end-of-defun t] | 264 | ["End of Function" octave-end-of-defun t] |
| 268 | ["Mark Function" octave-mark-defun t] | 265 | ["Mark Function" octave-mark-defun t] |
| 269 | ["Indent Function" octave-indent-defun t] | 266 | ["Indent Function" octave-indent-defun t] |
| 270 | ["Insert Function" octave-insert-defun t]) | 267 | ["Insert Function" octave-insert-defun t]) |
| 271 | "-" | 268 | "-" |
| 272 | (list "Debug" | 269 | '("Debug" |
| 273 | ["Send Current Line" octave-send-line t] | 270 | ["Send Current Line" octave-send-line t] |
| 274 | ["Send Current Block" octave-send-block t] | 271 | ["Send Current Block" octave-send-block t] |
| 275 | ["Send Current Function" octave-send-defun t] | 272 | ["Send Current Function" octave-send-defun t] |
| 276 | ["Send Region" octave-send-region t] | 273 | ["Send Region" octave-send-region t] |
| 277 | ["Show Process Buffer" octave-show-process-buffer t] | 274 | ["Show Process Buffer" octave-show-process-buffer t] |
| 278 | ["Hide Process Buffer" octave-hide-process-buffer t] | 275 | ["Hide Process Buffer" octave-hide-process-buffer t] |
| 279 | ["Kill Process" octave-kill-process t]) | 276 | ["Kill Process" octave-kill-process t]) |
| 280 | "-" | 277 | "-" |
| 281 | ["Indent Line" indent-according-to-mode t] | 278 | ["Indent Line" indent-according-to-mode t] |
| 282 | ["Complete Symbol" octave-complete-symbol t] | 279 | ["Complete Symbol" octave-complete-symbol t] |
| 283 | "-" | 280 | "-" |
| 284 | ["Toggle Abbrev Mode" abbrev-mode t] | 281 | ["Toggle Abbrev Mode" abbrev-mode t] |
| 285 | ["Toggle Auto-Fill Mode" auto-fill-mode t] | 282 | ["Toggle Auto-Fill Mode" auto-fill-mode t] |
| 286 | "-" | 283 | "-" |
| 287 | ["Submit Bug Report" octave-submit-bug-report t] | 284 | ["Submit Bug Report" octave-submit-bug-report t] |
| 288 | "-" | 285 | "-" |
| 289 | ["Describe Octave Mode" octave-describe-major-mode t] | 286 | ["Describe Octave Mode" octave-describe-major-mode t] |
| 290 | ["Lookup Octave Index" octave-help t]) | 287 | ["Lookup Octave Index" octave-help t]) |
| 291 | "Menu for Octave mode.") | 288 | "Menu for Octave mode.") |
| 292 | 289 | ||
| 293 | (defvar octave-mode-syntax-table | 290 | (defvar octave-mode-syntax-table |
| @@ -316,23 +313,23 @@ parenthetical grouping.") | |||
| 316 | "Syntax table in use in `octave-mode' buffers.") | 313 | "Syntax table in use in `octave-mode' buffers.") |
| 317 | 314 | ||
| 318 | (defcustom octave-auto-indent nil | 315 | (defcustom octave-auto-indent nil |
| 319 | "*Non-nil means indent line after a semicolon or space in Octave mode." | 316 | "Non-nil means indent line after a semicolon or space in Octave mode." |
| 320 | :type 'boolean | 317 | :type 'boolean |
| 321 | :group 'octave) | 318 | :group 'octave) |
| 322 | 319 | ||
| 323 | (defcustom octave-auto-newline nil | 320 | (defcustom octave-auto-newline nil |
| 324 | "*Non-nil means automatically newline after a semicolon in Octave mode." | 321 | "Non-nil means automatically newline after a semicolon in Octave mode." |
| 325 | :type 'boolean | 322 | :type 'boolean |
| 326 | :group 'octave) | 323 | :group 'octave) |
| 327 | 324 | ||
| 328 | (defcustom octave-blink-matching-block t | 325 | (defcustom octave-blink-matching-block t |
| 329 | "*Control the blinking of matching Octave block keywords. | 326 | "Control the blinking of matching Octave block keywords. |
| 330 | Non-nil means show matching begin of block when inserting a space, | 327 | Non-nil means show matching begin of block when inserting a space, |
| 331 | newline or semicolon after an else or end keyword." | 328 | newline or semicolon after an else or end keyword." |
| 332 | :type 'boolean | 329 | :type 'boolean |
| 333 | :group 'octave) | 330 | :group 'octave) |
| 334 | (defcustom octave-block-offset 2 | 331 | (defcustom octave-block-offset 2 |
| 335 | "*Extra indentation applied to statements in Octave block structures." | 332 | "Extra indentation applied to statements in Octave block structures." |
| 336 | :type 'integer | 333 | :type 'integer |
| 337 | :group 'octave) | 334 | :group 'octave) |
| 338 | 335 | ||
| @@ -370,13 +367,13 @@ end keywords as associated values.") | |||
| 370 | "String to insert to start a new Octave comment on an empty line.") | 367 | "String to insert to start a new Octave comment on an empty line.") |
| 371 | 368 | ||
| 372 | (defcustom octave-continuation-offset 4 | 369 | (defcustom octave-continuation-offset 4 |
| 373 | "*Extra indentation applied to Octave continuation lines." | 370 | "Extra indentation applied to Octave continuation lines." |
| 374 | :type 'integer | 371 | :type 'integer |
| 375 | :group 'octave) | 372 | :group 'octave) |
| 376 | (defvar octave-continuation-regexp | 373 | (defvar octave-continuation-regexp |
| 377 | "[^#%\n]*\\(\\\\\\|\\.\\.\\.\\)\\s-*\\(\\s<.*\\)?$") | 374 | "[^#%\n]*\\(\\\\\\|\\.\\.\\.\\)\\s-*\\(\\s<.*\\)?$") |
| 378 | (defcustom octave-continuation-string "\\" | 375 | (defcustom octave-continuation-string "\\" |
| 379 | "*Character string used for Octave continuation lines. Normally \\." | 376 | "Character string used for Octave continuation lines. Normally \\." |
| 380 | :type 'string | 377 | :type 'string |
| 381 | :group 'octave) | 378 | :group 'octave) |
| 382 | 379 | ||
| @@ -392,27 +389,22 @@ Currently, only builtin variables can be completed.") | |||
| 392 | (list nil octave-function-header-regexp 3)) | 389 | (list nil octave-function-header-regexp 3)) |
| 393 | "Imenu expression for Octave mode. See `imenu-generic-expression'.") | 390 | "Imenu expression for Octave mode. See `imenu-generic-expression'.") |
| 394 | 391 | ||
| 395 | (defcustom octave-mode-startup-message t | ||
| 396 | "*nil means do not display the Octave mode startup message." | ||
| 397 | :type 'boolean | ||
| 398 | :group 'octave) | ||
| 399 | |||
| 400 | (defcustom octave-mode-hook nil | 392 | (defcustom octave-mode-hook nil |
| 401 | "*Hook to be run when Octave mode is started." | 393 | "Hook to be run when Octave mode is started." |
| 402 | :type 'hook | 394 | :type 'hook |
| 403 | :group 'octave) | 395 | :group 'octave) |
| 404 | 396 | ||
| 405 | (defcustom octave-send-show-buffer t | 397 | (defcustom octave-send-show-buffer t |
| 406 | "*Non-nil means display `inferior-octave-buffer' after sending to it." | 398 | "Non-nil means display `inferior-octave-buffer' after sending to it." |
| 407 | :type 'boolean | 399 | :type 'boolean |
| 408 | :group 'octave) | 400 | :group 'octave) |
| 409 | (defcustom octave-send-line-auto-forward t | 401 | (defcustom octave-send-line-auto-forward t |
| 410 | "*Control auto-forward after sending to the inferior Octave process. | 402 | "Control auto-forward after sending to the inferior Octave process. |
| 411 | Non-nil means always go to the next Octave code line after sending." | 403 | Non-nil means always go to the next Octave code line after sending." |
| 412 | :type 'boolean | 404 | :type 'boolean |
| 413 | :group 'octave) | 405 | :group 'octave) |
| 414 | (defcustom octave-send-echo-input t | 406 | (defcustom octave-send-echo-input t |
| 415 | "*Non-nil means echo input sent to the inferior Octave process." | 407 | "Non-nil means echo input sent to the inferior Octave process." |
| 416 | :type 'boolean | 408 | :type 'boolean |
| 417 | :group 'octave) | 409 | :group 'octave) |
| 418 | 410 | ||
| @@ -423,7 +415,7 @@ Non-nil means always go to the next Octave code line after sending." | |||
| 423 | 415 | ||
| 424 | This mode makes it easier to write Octave code by helping with | 416 | This mode makes it easier to write Octave code by helping with |
| 425 | indentation, doing some of the typing for you (with Abbrev mode) and by | 417 | indentation, doing some of the typing for you (with Abbrev mode) and by |
| 426 | showing keywords, comments, strings, etc. in different faces (with | 418 | showing keywords, comments, strings, etc.. in different faces (with |
| 427 | Font Lock mode on terminals that support it). | 419 | Font Lock mode on terminals that support it). |
| 428 | 420 | ||
| 429 | Octave itself is a high-level language, primarily intended for numerical | 421 | Octave itself is a high-level language, primarily intended for numerical |
| @@ -446,43 +438,39 @@ Keybindings | |||
| 446 | Variables you can use to customize Octave mode | 438 | Variables you can use to customize Octave mode |
| 447 | ============================================== | 439 | ============================================== |
| 448 | 440 | ||
| 449 | octave-auto-indent | 441 | `octave-auto-indent' |
| 450 | Non-nil means indent current line after a semicolon or space. | 442 | Non-nil means indent current line after a semicolon or space. |
| 451 | Default is nil. | 443 | Default is nil. |
| 452 | 444 | ||
| 453 | octave-auto-newline | 445 | `octave-auto-newline' |
| 454 | Non-nil means auto-insert a newline and indent after a semicolon. | 446 | Non-nil means auto-insert a newline and indent after a semicolon. |
| 455 | Default is nil. | 447 | Default is nil. |
| 456 | 448 | ||
| 457 | octave-blink-matching-block | 449 | `octave-blink-matching-block' |
| 458 | Non-nil means show matching begin of block when inserting a space, | 450 | Non-nil means show matching begin of block when inserting a space, |
| 459 | newline or semicolon after an else or end keyword. Default is t. | 451 | newline or semicolon after an else or end keyword. Default is t. |
| 460 | 452 | ||
| 461 | octave-block-offset | 453 | `octave-block-offset' |
| 462 | Extra indentation applied to statements in block structures. | 454 | Extra indentation applied to statements in block structures. |
| 463 | Default is 2. | 455 | Default is 2. |
| 464 | 456 | ||
| 465 | octave-continuation-offset | 457 | `octave-continuation-offset' |
| 466 | Extra indentation applied to Octave continuation lines. | 458 | Extra indentation applied to Octave continuation lines. |
| 467 | Default is 4. | 459 | Default is 4. |
| 468 | 460 | ||
| 469 | octave-continuation-string | 461 | `octave-continuation-string' |
| 470 | String used for Octave continuation lines. | 462 | String used for Octave continuation lines. |
| 471 | Default is a backslash. | 463 | Default is a backslash. |
| 472 | 464 | ||
| 473 | octave-mode-startup-message | 465 | `octave-send-echo-input' |
| 474 | nil means do not display the Octave mode startup message. | ||
| 475 | Default is t. | ||
| 476 | |||
| 477 | octave-send-echo-input | ||
| 478 | Non-nil means always display `inferior-octave-buffer' after sending a | 466 | Non-nil means always display `inferior-octave-buffer' after sending a |
| 479 | command to the inferior Octave process. | 467 | command to the inferior Octave process. |
| 480 | 468 | ||
| 481 | octave-send-line-auto-forward | 469 | `octave-send-line-auto-forward' |
| 482 | Non-nil means always go to the next unsent line of Octave code after | 470 | Non-nil means always go to the next unsent line of Octave code after |
| 483 | sending a line to the inferior Octave process. | 471 | sending a line to the inferior Octave process. |
| 484 | 472 | ||
| 485 | octave-send-echo-input | 473 | `octave-send-echo-input' |
| 486 | Non-nil means echo input sent to the inferior Octave process. | 474 | Non-nil means echo input sent to the inferior Octave process. |
| 487 | 475 | ||
| 488 | Turning on Octave mode runs the hook `octave-mode-hook'. | 476 | Turning on Octave mode runs the hook `octave-mode-hook'. |
| @@ -490,19 +478,15 @@ Turning on Octave mode runs the hook `octave-mode-hook'. | |||
| 490 | To begin using this mode for all `.m' files that you edit, add the | 478 | To begin using this mode for all `.m' files that you edit, add the |
| 491 | following lines to your `.emacs' file: | 479 | following lines to your `.emacs' file: |
| 492 | 480 | ||
| 493 | (autoload 'octave-mode \"octave-mod\" nil t) | 481 | (add-to-list 'auto-mode-alist '(\"\\\\.m\\\\'\" . octave-mode)) |
| 494 | (setq auto-mode-alist | ||
| 495 | (cons '(\"\\\\.m$\" . octave-mode) auto-mode-alist)) | ||
| 496 | 482 | ||
| 497 | To automatically turn on the abbrev, auto-fill and font-lock features, | 483 | To automatically turn on the abbrev and auto-fill, |
| 498 | add the following lines to your `.emacs' file as well: | 484 | add the following lines to your `.emacs' file as well: |
| 499 | 485 | ||
| 500 | (add-hook 'octave-mode-hook | 486 | (add-hook 'octave-mode-hook |
| 501 | (lambda () | 487 | (lambda () |
| 502 | (abbrev-mode 1) | 488 | (abbrev-mode 1) |
| 503 | (auto-fill-mode 1) | 489 | (auto-fill-mode 1))) |
| 504 | (if (eq window-system 'x) | ||
| 505 | (font-lock-mode 1)))) | ||
| 506 | 490 | ||
| 507 | To submit a problem report, enter \\[octave-submit-bug-report] from \ | 491 | To submit a problem report, enter \\[octave-submit-bug-report] from \ |
| 508 | an Octave mode buffer. | 492 | an Octave mode buffer. |
| @@ -773,7 +757,7 @@ The new line is properly indented." | |||
| 773 | (octave-reindent-then-newline-and-indent)))) | 757 | (octave-reindent-then-newline-and-indent)))) |
| 774 | 758 | ||
| 775 | (defun octave-indent-defun () | 759 | (defun octave-indent-defun () |
| 776 | "Properly indents the Octave function which contains point." | 760 | "Properly indent the Octave function which contains point." |
| 777 | (interactive) | 761 | (interactive) |
| 778 | (save-excursion | 762 | (save-excursion |
| 779 | (octave-mark-defun) | 763 | (octave-mark-defun) |
| @@ -856,8 +840,8 @@ does not end in `...' or `\\' or is inside an open parenthesis list." | |||
| 856 | (zerop (forward-line 1))))) | 840 | (zerop (forward-line 1))))) |
| 857 | (end-of-line))) | 841 | (end-of-line))) |
| 858 | 842 | ||
| 859 | (defun octave-scan-blocks (from count depth) | 843 | (defun octave-scan-blocks (count depth) |
| 860 | "Scan from character number FROM by COUNT Octave begin-end blocks. | 844 | "Scan from point by COUNT Octave begin-end blocks. |
| 861 | Returns the character number of the position thus found. | 845 | Returns the character number of the position thus found. |
| 862 | 846 | ||
| 863 | If DEPTH is nonzero, block depth begins counting from that value. | 847 | If DEPTH is nonzero, block depth begins counting from that value. |
| @@ -895,7 +879,7 @@ With argument, do it that many times. | |||
| 895 | Negative arg -N means move backward across N blocks." | 879 | Negative arg -N means move backward across N blocks." |
| 896 | (interactive "p") | 880 | (interactive "p") |
| 897 | (or arg (setq arg 1)) | 881 | (or arg (setq arg 1)) |
| 898 | (goto-char (or (octave-scan-blocks (point) arg 0) (buffer-end arg)))) | 882 | (goto-char (or (octave-scan-blocks arg 0) (buffer-end arg)))) |
| 899 | 883 | ||
| 900 | (defun octave-backward-block (&optional arg) | 884 | (defun octave-backward-block (&optional arg) |
| 901 | "Move backward across one balanced Octave begin-end block. | 885 | "Move backward across one balanced Octave begin-end block. |
| @@ -913,7 +897,7 @@ In Lisp programs, an argument is required." | |||
| 913 | (interactive "p") | 897 | (interactive "p") |
| 914 | (let ((inc (if (> arg 0) 1 -1))) | 898 | (let ((inc (if (> arg 0) 1 -1))) |
| 915 | (while (/= arg 0) | 899 | (while (/= arg 0) |
| 916 | (goto-char (or (octave-scan-blocks (point) inc -1) | 900 | (goto-char (or (octave-scan-blocks inc -1) |
| 917 | (buffer-end arg))) | 901 | (buffer-end arg))) |
| 918 | (setq arg (- arg inc))))) | 902 | (setq arg (- arg inc))))) |
| 919 | 903 | ||
| @@ -933,7 +917,7 @@ In Lisp programs, an argument is required." | |||
| 933 | (interactive "p") | 917 | (interactive "p") |
| 934 | (let ((inc (if (> arg 0) 1 -1))) | 918 | (let ((inc (if (> arg 0) 1 -1))) |
| 935 | (while (/= arg 0) | 919 | (while (/= arg 0) |
| 936 | (goto-char (or (octave-scan-blocks (point) inc 1) | 920 | (goto-char (or (octave-scan-blocks inc 1) |
| 937 | (buffer-end arg))) | 921 | (buffer-end arg))) |
| 938 | (setq arg (- arg inc))))) | 922 | (setq arg (- arg inc))))) |
| 939 | 923 | ||
| @@ -1149,6 +1133,8 @@ otherwise." | |||
| 1149 | 1133 | ||
| 1150 | (defun octave-fill-paragraph (&optional arg) | 1134 | (defun octave-fill-paragraph (&optional arg) |
| 1151 | "Fill paragraph of Octave code, handling Octave comments." | 1135 | "Fill paragraph of Octave code, handling Octave comments." |
| 1136 | ;; FIXME: now that the default fill-paragraph takes care of similar issues, | ||
| 1137 | ;; this seems obsolete. --Stef | ||
| 1152 | (interactive "P") | 1138 | (interactive "P") |
| 1153 | (save-excursion | 1139 | (save-excursion |
| 1154 | (let ((end (progn (forward-paragraph) (point))) | 1140 | (let ((end (progn (forward-paragraph) (point))) |
| @@ -1389,7 +1375,7 @@ entered without parens)." | |||
| 1389 | 1375 | ||
| 1390 | ;;; Menu | 1376 | ;;; Menu |
| 1391 | (defun octave-add-octave-menu () | 1377 | (defun octave-add-octave-menu () |
| 1392 | "Adds the `Octave' menu to the menu bar in Octave mode." | 1378 | "Add the `Octave' menu to the menu bar in Octave mode." |
| 1393 | (require 'easymenu) | 1379 | (require 'easymenu) |
| 1394 | (easy-menu-define octave-mode-menu-map octave-mode-map | 1380 | (easy-menu-define octave-mode-menu-map octave-mode-map |
| 1395 | "Menu keymap for Octave mode." octave-mode-menu) | 1381 | "Menu keymap for Octave mode." octave-mode-menu) |
| @@ -1519,7 +1505,6 @@ code line." | |||
| 1519 | 'octave-continuation-offset | 1505 | 'octave-continuation-offset |
| 1520 | 'octave-continuation-string | 1506 | 'octave-continuation-string |
| 1521 | 'octave-help-files | 1507 | 'octave-help-files |
| 1522 | 'octave-mode-startup-message | ||
| 1523 | 'octave-send-echo-input | 1508 | 'octave-send-echo-input |
| 1524 | 'octave-send-line-auto-forward | 1509 | 'octave-send-line-auto-forward |
| 1525 | 'octave-send-show-buffer)))) | 1510 | 'octave-send-show-buffer)))) |
| @@ -1528,5 +1513,5 @@ code line." | |||
| 1528 | 1513 | ||
| 1529 | (provide 'octave-mod) | 1514 | (provide 'octave-mod) |
| 1530 | 1515 | ||
| 1531 | ;;; arch-tag: 05f1ce09-be87-4c00-803e-4919ffa26c23 | 1516 | ;; arch-tag: 05f1ce09-be87-4c00-803e-4919ffa26c23 |
| 1532 | ;;; octave-mod.el ends here | 1517 | ;;; octave-mod.el ends here |