]> code.delx.au - gnu-emacs/blobdiff - lisp/textmodes/text-mode.el
Merge from emacs-24; up to 117691
[gnu-emacs] / lisp / textmodes / text-mode.el
index a045af8522fd645c1027e2e33f154fa5f86506f2..727697b5533fcffd52bb85b5650bc27059155f0e 100644 (file)
@@ -1,8 +1,9 @@
 ;;; text-mode.el --- text mode, and its idiosyncratic commands
 
-;; Copyright (C) 1985, 1992, 1994, 2001-2013 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1992, 1994, 2001-2014 Free Software Foundation,
+;; Inc.
 
-;; Maintainer: FSF
+;; Maintainer: emacs-devel@gnu.org
 ;; Keywords: wp
 ;; Package: emacs
 
@@ -121,9 +122,10 @@ Turning on Paragraph-Indent minor mode runs the normal hook
                (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)