comparison lisp/text-mode.el @ 5766:182d01410b8d

Add mode-require-final-newline from GNU. Thanks GNU. lisp/ChangeLog: 2013-09-15 Mats Lidell <matsl@cxemacs.org> * files.el (mode-require-final-newline): Variable synced from GNU. Thank you GNU. Allows modes to control final newlines. (require-final-newline): Add action on visiting and visiting or saving in sync with GNU. * text-mode.el (text-mode): Use mode-require-final-newline. man/ChangeLog: 2013-09-15 Mats Lidell <matsl@xemacs.org> * xemacs/files.texi (Saving): New variable mode-require-final-newline. Update info for require-final-newline. tests/ChangeLog: 2013-09-15 Mats Lidell <matsl@xemacs.org> * automated/files-tests.el: New file. Test new states in require-final-newline and new variable mode-require-final-newline.
author Mats Lidell <mats.lidell@cag.se>
date Mon, 16 Sep 2013 00:00:12 +0200
parents 308d34e9f07d
children
comparison
equal deleted inserted replaced
5765:e88d026f3917 5766:182d01410b8d
1 ;;; text-mode.el --- text mode, and its idiosyncratic commands. 1 ;;; text-mode.el --- text mode, and its idiosyncratic commands.
2 2
3 ;; Copyright (C) 1985, 1992, 1994, 1997 Free Software Foundation, Inc. 3 ;; Copyright (C) 1985, 1992, 1994, 1997, 2013 Free Software Foundation, Inc.
4 4
5 ;; Maintainer: FSF 5 ;; Maintainer: FSF
6 ;; Keywords: wp, dumped 6 ;; Keywords: wp, dumped
7 7
8 ;; This file is part of XEmacs. 8 ;; This file is part of XEmacs.
81 (set-syntax-table text-mode-syntax-table) 81 (set-syntax-table text-mode-syntax-table)
82 (make-local-variable 'paragraph-start) 82 (make-local-variable 'paragraph-start)
83 (setq paragraph-start (concat page-delimiter "\\|[ \t]*$")) 83 (setq paragraph-start (concat page-delimiter "\\|[ \t]*$"))
84 (make-local-variable 'paragraph-separate) 84 (make-local-variable 'paragraph-separate)
85 (setq paragraph-separate paragraph-start) 85 (setq paragraph-separate paragraph-start)
86 (set (make-local-variable 'require-final-newline)
87 mode-require-final-newline)
86 (setq mode-name "Text") 88 (setq mode-name "Text")
87 (setq major-mode 'text-mode) 89 (setq major-mode 'text-mode)
88 (run-hooks 'text-mode-hook)) 90 (run-hooks 'text-mode-hook))
89 91
90 (defun paragraph-indent-text-mode () 92 (defun paragraph-indent-text-mode ()