[asdf-devel] P.S. re patch...

Robert Goldman rpgoldman at sift.info
Wed Dec 12 20:32:08 UTC 2012


Faré wrote:
> The patch was applied. I should probably use the same emacs setting to
> avoid tabs (what do you use?).
> 

Let me see....

In my slime-config.el:

(add-hook 'lisp-mode-hook
	  '(lambda ()
;;            (setq show-trailing-whitespace t)
	    (make-local-variable 'write-contents-hooks)
	    (add-hook 'write-contents-hooks 'kill-all-tabs)))

and in my init.el:

;;;---------------------------------------------------------------------------
;;; Kill tabs
;;;---------------------------------------------------------------------------
(defun kill-all-tabs ()
  "Code lifted from jwz for untabifying before save.
Note that this was originally java-mode-untabify."
  (interactive)
  (save-excursion
    ;; stop killing trailing whitespace...
    ;; (goto-char (point-min))
    ;; (while (re-search-forward "[ \t]+$" nil t)
    ;;   (delete-region (match-beginning 0) (match-end 0)))
    (goto-char (point-min))
    (if (search-forward "\t" nil t)
	(untabify (1- (point)) (point-max))))
  nil)

;; tab characters make shared editing a total mess.  I'm killing them
for all
;; edits I make. [2008/12/23:rpg]
(setq-default indent-tabs-mode nil)

(setq whitespace-style
      '(indentation::space empty space-before-tab::space trailing
        space-after-tab::space))



Key insight is due to jwz -- and the time I worked with someone who used
some windows editor that insisted that tabs were 8 characters wide, and
whose editor turned all our indents into tab characters that broke the
layout.

Our local svn repositories are configured to refuse to accept tab
characters in commits.

This *mostly* works, but can be annoying when doing vendor branch
installs of upstream code with tabs.

cheers,
r





More information about the asdf-devel mailing list