+2013-11-18 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * textmodes/text-mode.el (paragraph-indent-minor-mode): Use add-function.
+
2013-11-17 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/nadvice.el (remove-function): Align with
(concat ps-re paragraph-start)))))
;; Change the indentation function.
(if paragraph-indent-minor-mode
- (set (make-local-variable 'indent-line-function) 'indent-to-left-margin)
- (if (eq indent-line-function 'indent-to-left-margin)
- (set (make-local-variable 'indent-line-function) 'indent-region))))
+ (add-function :override (local 'indent-line-function)
+ #'indent-to-left-margin)
+ (remove-function (local 'indent-line-function)
+ #'indent-to-left-margin)))
(defalias 'indented-text-mode 'text-mode)