Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

haml-mode should disable tabs #3

Closed
lindes opened this issue Feb 15, 2011 · 1 comment
Closed

haml-mode should disable tabs #3

lindes opened this issue Feb 15, 2011 · 1 comment

Comments

@lindes
Copy link

lindes commented Feb 15, 2011

It seems to me that since haml complains about tabs, indent-tabs-mode should be set to nil when editing using haml-mode in emacs.

Here's a patch (I could create a pull request if desired, but it seems simple enough that perhaps the whole fork/pull-request thing is overkill?):

From f32b4e2267ac041d51c871c7c27111514be3883b Mon Sep 17 00:00:00 2001
From: David Lindes <misc-git-user-haml-mode-20110214-patch@daveltd.com>
Date: Mon, 14 Feb 2011 21:36:46 -0800
Subject: [PATCH] set indent-tabs-mode to nil, to avoid tabs

---
 haml-mode.el |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/haml-mode.el b/haml-mode.el
index c3fc1ee..a0b6e40 100644
--- a/haml-mode.el
+++ b/haml-mode.el
@@ -399,7 +399,8 @@ With ARG, do it that many times."
   (set (make-local-variable 'indent-region-function) 'haml-indent-region)
   (set (make-local-variable 'parse-sexp-lookup-properties) t)
   (set (make-local-variable 'comment-start) "-#")
-  (setq font-lock-defaults '((haml-font-lock-keywords) t t)))
+  (setq font-lock-defaults '((haml-font-lock-keywords) t t))
+  (setq indent-tabs-mode nil))

 ;; Useful functions

-- 
1.7.4.1
@lindes
Copy link
Author

lindes commented Feb 15, 2011

Err, sorry that first From line got auto-linked in a weird way... Perhaps this will work better?

From f32b4e2267ac041d51c871c7c27111514be3883b Mon Sep 17 00:00:00 2001

Not really... perhaps this is closer:

From \f32b4e2267ac041d51c871c7c27111514be3883b Mon Sep 17 00:00:00 2001

Just remove the backslash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants