Lines Matching +full:cdr +full:- +full:mode

1 ;;; -*- mode: emacs-lisp; indent-tabs-mode: nil -*-
3 (error "to be used only with -batch"))
4 ;; Avoid vc-mode interference.
5 (setq vc-handled-backends nil)
8 (defun report-tabs ()
9 (let ((tab-found (search-forward "\t" nil t)))
10 (if tab-found
11 (message "Tab found @%s." tab-found)
14 (defun whitespace-new ()
15 ;; Sometimes whitespace-cleanup gets its internals confused
16 ;; when whitespace-mode hasn't been activated on the buffer.
17 (let ((whitespace-indent-tabs-mode indent-tabs-mode)
18 (whitespace-style '(empty trailing)))
19 ;; Only clean up tab issues if indent-tabs-mode is explicitly
21 (if (local-variable-p 'indent-tabs-mode)
24 (add-to-list 'whitespace-style 'indentation)
25 (add-to-list 'whitespace-style 'space-before-tab)
26 (add-to-list 'whitespace-style 'space-after-tab)))
27 ;; (message "indent-tabs-mode=%s" indent-tabs-mode)
29 (whitespace-cleanup)))
32 (defun whitespace-old ()
33 (let (whitespace-check-buffer-indent
34 whitespace-check-buffer-spacetab)
35 (if (local-variable-p 'indent-tabs-mode)
38 (setq whitespace-check-buffer-indent indent-tabs-mode)
39 (setq whitespace-check-buffer-spacetab t)))
41 (whitespace-cleanup)))
43 (while command-line-args-left
44 (let ((filename (car command-line-args-left))
46 (make-backup-files nil))
47 (find-file filename)
50 (if (not indent-tabs-mode)
53 (untabify (point-min) (point-max))))
56 ;; Note that krb5-c-style.el already has a heuristic for setting
57 ;; the C style if the file has "c-basic-offset: 4;
58 ;; indent-tabs-mode: nil".
59 (if (equal c-indentation-style "krb5")
60 (c-indent-region (point-min) (point-max)))
62 (if (fboundp 'whitespace-newline-mode)
63 (whitespace-new)
64 (whitespace-old))
66 (save-buffer)
67 (kill-buffer nil)
68 (setq command-line-args-left (cdr command-line-args-left))))