]> git.eshelyaron.com Git - emacs.git/commitdiff
* progmodes/ada-mode.el (ada-clean-buffer-before-saving): Make obsolete.
authorStephen Leake <stephen_leake@member.fsf.org>
Thu, 14 Jan 2010 12:36:14 +0000 (13:36 +0100)
committerJuanma Barranquero <lekktu@gmail.com>
Thu, 14 Jan 2010 12:36:14 +0000 (13:36 +0100)
  (ada-mode): Don't obey `ada-clean-buffer-before-saving' anymore.

lisp/ChangeLog
lisp/progmodes/ada-mode.el

index 2b14d89c3258b8c595297399892474b09787bbac..fae0eb390513de137397e1430f11b3ded0181184 100644 (file)
@@ -1,3 +1,8 @@
+2010-01-14  Stephen Leake  <stephen_leake@member.fsf.org>
+
+       * progmodes/ada-mode.el (ada-clean-buffer-before-saving): Make obsolete.
+       (ada-mode): Don't obey `ada-clean-buffer-before-saving' anymore.
+
 2010-01-14  Glenn Morris  <rgm@gnu.org>
 
        * frame.el (show-trailing-whitespace): Safe if boolean.  (Bug#5312)
index d0affdc07261902865946ea5c9634734fe3187cd..e246118fae2c4d837e556fe1fea43dcdc49fcedc 100644 (file)
@@ -229,11 +229,13 @@ It may be `downcase-word', `upcase-word', `ada-loose-case-word' or
                 (const ada-no-auto-case))
   :group 'ada)
 
-;; FIXME If this is not something required by the ada language, this
-;; should be removed.
 (defcustom ada-clean-buffer-before-saving t
   "*Non-nil means remove trailing spaces and untabify the buffer before saving."
   :type 'boolean :group 'ada)
+(make-obsolete-variable 'ada-clean-buffer-before-saving
+                       "use the `write-file-functions' hook."
+                       "23.2")
+
 
 (defcustom ada-indent 3
   "*Size of Ada indentation.
@@ -1303,14 +1305,6 @@ the file name."
 
   (set-syntax-table ada-mode-syntax-table)
 
-  (if ada-clean-buffer-before-saving
-      (progn
-       ;; remove all spaces at the end of lines in the whole buffer.
-       (add-hook 'local-write-file-hooks 'delete-trailing-whitespace)
-       ;; convert all tabs to the correct number of spaces.
-       (add-hook 'local-write-file-hooks
-                 (lambda () (untabify (point-min) (point-max))))))
-
   (set (make-local-variable 'skeleton-further-elements)
        '((< '(backward-delete-char-untabify
              (min ada-indent (current-column))))))