From 62efb35e42807972b8599e52c42e2c7302e25aa8 Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Fri, 21 Jun 2013 14:45:37 +0800 Subject: [PATCH] * progmodes/octave.el (octave-mode): Backward compatibility fix. --- lisp/ChangeLog | 4 ++++ lisp/progmodes/octave.el | 11 +++++++---- 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 @@ +2013-06-21 Leo Liu + + * progmodes/octave.el (octave-mode): Backward compatibility fix. + 2013-06-21 Glenn Morris * 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." (setq-local fill-nobreak-predicate (lambda () (eq (octave-in-string-p) ?'))) - (add-function :around (local 'comment-line-break-function) - #'octave--indent-new-comment-line) + (with-no-warnings + (if (fboundp 'add-function) ; new in 24.4 + (add-function :around (local 'comment-line-break-function) + #'octave--indent-new-comment-line) + (setq-local comment-line-break-function + (apply-partially #'octave--indent-new-comment-line + #'comment-indent-new-line)))) (setq font-lock-defaults '(octave-font-lock-keywords)) @@ -1151,8 +1156,6 @@ q: Don't fix\n" func file)) ;;; Indentation (defun octave-indent-new-comment-line (&optional soft) - ;; FIXME: C-M-j should probably be bound globally to a function like - ;; this one. "Break Octave line at point, continuing comment if within one. Insert `octave-continuation-string' before breaking the line unless inside a list. Signal an error if within a single-quoted -- 2.39.2