Mercurial > emacs
changeset 31847:c2d49e897f90
(fortran-mode): Locally set
normal-auto-fill-function.
(fortran-auto-fill-mode): Just alias to auto-fill-mode.
(fortran-mode-map): Adjust auto-fill menu entry.
author | Dave Love <fx@gnu.org> |
---|---|
date | Fri, 22 Sep 2000 17:16:57 +0000 |
parents | 6e48fd527039 |
children | ca2642f7b76a |
files | lisp/progmodes/fortran.el |
diffstat | 1 files changed, 5 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/progmodes/fortran.el Fri Sep 22 17:16:31 2000 +0000 +++ b/lisp/progmodes/fortran.el Fri Sep 22 17:16:57 2000 +0000 @@ -434,8 +434,8 @@ ["Reset to Saved" Custom-reset-saved t] ["Reset to Standard Settings" Custom-reset-standard t] "----" - ["Toggle Auto-fill" fortran-auto-fill-mode :style toggle - :selected (eq auto-fill-function 'fortran-auto-fill)] + ["Toggle Auto-fill" auto-fill-mode :style toggle + :selected auto-fill-function] ["Toggle abbrev-mode" abbrev-mode :style toggle :selected abbrev-mode] "----" ["Comment-out Region" fortran-comment-region mark-active] @@ -662,6 +662,7 @@ (setq imenu-generic-expression fortran-imenu-generic-expression) (setq imenu-syntax-alist '(("_$" . "w"))) (set (make-local-variable 'fill-paragraph-function) 'fortran-fill-paragraph) + (set (make-local-variable 'normal-auto-fill-function) 'fortran-auto-fill) (set (make-local-variable 'indent-line-function) 'fortran-indent-line) (set (make-local-variable 'indent-region-function) (lambda (start end) @@ -1594,19 +1595,8 @@ ;; result is (nth 3 parse-state)))))) -(defun fortran-auto-fill-mode (arg) - "Toggle fortran-auto-fill mode. -With ARG, turn `fortran-auto-fill' mode on iff ARG is positive. -In `fortran-auto-fill' mode, inserting a space at a column beyond `fill-column' -automatically breaks the line at a previous space." - (interactive "P") - (prog1 (setq auto-fill-function - (if (if (null arg) - (not auto-fill-function) - (> (prefix-numeric-value arg) 0)) - #'fortran-auto-fill - nil)) - (force-mode-line-update))) +;; From old version. +(defalias 'fortran-auto-fill-mode 'auto-fill-mode) (defun fortran-fill () (let* ((auto-fill-function #'fortran-auto-fill)