aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Leake2010-01-14 13:36:14 +0100
committerJuanma Barranquero2010-01-14 13:36:14 +0100
commit5c9434d0a0a6995089224a4bcb2286d13de46aec (patch)
tree327900f0deb0846204d125979527d8b9959863f7
parentd12bd91784f39bc65d9fdccc00676778f035c79d (diff)
downloademacs-5c9434d0a0a6995089224a4bcb2286d13de46aec.tar.gz
emacs-5c9434d0a0a6995089224a4bcb2286d13de46aec.zip
* progmodes/ada-mode.el (ada-clean-buffer-before-saving): Make obsolete.
(ada-mode): Don't obey `ada-clean-buffer-before-saving' anymore.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/progmodes/ada-mode.el14
2 files changed, 9 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 2b14d89c325..fae0eb39051 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12010-01-14 Stephen Leake <stephen_leake@member.fsf.org>
2
3 * progmodes/ada-mode.el (ada-clean-buffer-before-saving): Make obsolete.
4 (ada-mode): Don't obey `ada-clean-buffer-before-saving' anymore.
5
12010-01-14 Glenn Morris <rgm@gnu.org> 62010-01-14 Glenn Morris <rgm@gnu.org>
2 7
3 * frame.el (show-trailing-whitespace): Safe if boolean. (Bug#5312) 8 * frame.el (show-trailing-whitespace): Safe if boolean. (Bug#5312)
diff --git a/lisp/progmodes/ada-mode.el b/lisp/progmodes/ada-mode.el
index d0affdc0726..e246118fae2 100644
--- a/lisp/progmodes/ada-mode.el
+++ b/lisp/progmodes/ada-mode.el
@@ -229,11 +229,13 @@ It may be `downcase-word', `upcase-word', `ada-loose-case-word' or
229 (const ada-no-auto-case)) 229 (const ada-no-auto-case))
230 :group 'ada) 230 :group 'ada)
231 231
232;; FIXME If this is not something required by the ada language, this
233;; should be removed.
234(defcustom ada-clean-buffer-before-saving t 232(defcustom ada-clean-buffer-before-saving t
235 "*Non-nil means remove trailing spaces and untabify the buffer before saving." 233 "*Non-nil means remove trailing spaces and untabify the buffer before saving."
236 :type 'boolean :group 'ada) 234 :type 'boolean :group 'ada)
235(make-obsolete-variable 'ada-clean-buffer-before-saving
236 "use the `write-file-functions' hook."
237 "23.2")
238
237 239
238(defcustom ada-indent 3 240(defcustom ada-indent 3
239 "*Size of Ada indentation. 241 "*Size of Ada indentation.
@@ -1303,14 +1305,6 @@ the file name."
1303 1305
1304 (set-syntax-table ada-mode-syntax-table) 1306 (set-syntax-table ada-mode-syntax-table)
1305 1307
1306 (if ada-clean-buffer-before-saving
1307 (progn
1308 ;; remove all spaces at the end of lines in the whole buffer.
1309 (add-hook 'local-write-file-hooks 'delete-trailing-whitespace)
1310 ;; convert all tabs to the correct number of spaces.
1311 (add-hook 'local-write-file-hooks
1312 (lambda () (untabify (point-min) (point-max))))))
1313
1314 (set (make-local-variable 'skeleton-further-elements) 1308 (set (make-local-variable 'skeleton-further-elements)
1315 '((< '(backward-delete-char-untabify 1309 '((< '(backward-delete-char-untabify
1316 (min ada-indent (current-column)))))) 1310 (min ada-indent (current-column))))))