Could this patch be checked in? When require-final-newlines is t, the
newline is inserted by (insert "\n"), which does not take
use-hard-newlines into account, so the newline is not marked as 'hard.


*** emacs/lisp/files.el~        Tue Mar  1 22:13:16 2005
--- emacs/lisp/files.el Wed Mar  2 10:16:52 2005
***************
*** 1661,1667 ****
                   (= (char-after (1- (point-max))) ?\r)))
         (save-excursion
           (goto-char (point-max))
!          (insert "\n")))
      (when (and buffer-read-only
               view-read-only
               (not (eq (get major-mode 'mode-class) 'special)))
--- 1661,1667 ----
                   (= (char-after (1- (point-max))) ?\r)))
         (save-excursion
           (goto-char (point-max))
!          (newline)))
      (when (and buffer-read-only
               view-read-only
               (not (eq (get major-mode 'mode-class) 'special)))
***************
*** 3244,3250 ****
                                     (buffer-name)))))
                   (save-excursion
                     (goto-char (point-max))
!                    (insert ?\n))))
            ;; Support VC version backups.
            (vc-before-save)
            (run-hooks 'before-save-hook)
--- 3244,3250 ----
                                     (buffer-name)))))
                   (save-excursion
                     (goto-char (point-max))
!                    (newline))))
            ;; Support VC version backups.
            (vc-before-save)
            (run-hooks 'before-save-hook)



_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

Reply via email to