aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo Liu2013-06-21 14:45:37 +0800
committerLeo Liu2013-06-21 14:45:37 +0800
commit62efb35e42807972b8599e52c42e2c7302e25aa8 (patch)
tree06dce5254c6cd0362740a1ed672804cfd15e198e
parent21e3f963e7472f5b9721ff9dc5b683efc6b3e9b8 (diff)
downloademacs-62efb35e42807972b8599e52c42e2c7302e25aa8.tar.gz
emacs-62efb35e42807972b8599e52c42e2c7302e25aa8.zip
* progmodes/octave.el (octave-mode): Backward compatibility fix.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/progmodes/octave.el11
2 files changed, 11 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 1b1714711ca..7c6a59c75f7 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
12013-06-21 Leo Liu <sdl.web@gmail.com>
2
3 * progmodes/octave.el (octave-mode): Backward compatibility fix.
4
12013-06-21 Glenn Morris <rgm@gnu.org> 52013-06-21 Glenn Morris <rgm@gnu.org>
2 6
3 * font-lock.el (lisp-font-lock-keywords-2): Add with-eval-after-load. 7 * font-lock.el (lisp-font-lock-keywords-2): Add with-eval-after-load.
diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el
index 4e5a3058d4e..de1c26a7fa7 100644
--- a/lisp/progmodes/octave.el
+++ b/lisp/progmodes/octave.el
@@ -554,8 +554,13 @@ definitions can also be stored in files and used in batch mode."
554 554
555 (setq-local fill-nobreak-predicate 555 (setq-local fill-nobreak-predicate
556 (lambda () (eq (octave-in-string-p) ?'))) 556 (lambda () (eq (octave-in-string-p) ?')))
557 (add-function :around (local 'comment-line-break-function) 557 (with-no-warnings
558 #'octave--indent-new-comment-line) 558 (if (fboundp 'add-function) ; new in 24.4
559 (add-function :around (local 'comment-line-break-function)
560 #'octave--indent-new-comment-line)
561 (setq-local comment-line-break-function
562 (apply-partially #'octave--indent-new-comment-line
563 #'comment-indent-new-line))))
559 564
560 (setq font-lock-defaults '(octave-font-lock-keywords)) 565 (setq font-lock-defaults '(octave-font-lock-keywords))
561 566
@@ -1151,8 +1156,6 @@ q: Don't fix\n" func file))
1151;;; Indentation 1156;;; Indentation
1152 1157
1153(defun octave-indent-new-comment-line (&optional soft) 1158(defun octave-indent-new-comment-line (&optional soft)
1154 ;; FIXME: C-M-j should probably be bound globally to a function like
1155 ;; this one.
1156 "Break Octave line at point, continuing comment if within one. 1159 "Break Octave line at point, continuing comment if within one.
1157Insert `octave-continuation-string' before breaking the line 1160Insert `octave-continuation-string' before breaking the line
1158unless inside a list. Signal an error if within a single-quoted 1161unless inside a list. Signal an error if within a single-quoted