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

Disable indent-tabs-mode in emacs-lisp-mode via .dir-locals.el #281

Closed
d125q opened this issue Jul 9, 2019 · 2 comments
Closed

Disable indent-tabs-mode in emacs-lisp-mode via .dir-locals.el #281

d125q opened this issue Jul 9, 2019 · 2 comments

Comments

@d125q
Copy link
Contributor

d125q commented Jul 9, 2019

I noticed that the Emacs Lisp code in leaf.el does not use the standard Emacs configuration which allows for tabs to be used for indentation.

Therefore, I propose that a .dir-locals.el is added that sets indent-tabs-mode to nil in emacs-lisp-mode.

@d125q d125q changed the title Consider disabling indent-tabs-mode for emacs-lisp-mode in .dir-locals.el Disable indent-tabs-mode for emacs-lisp-mode through .dir-locals.el Jul 9, 2019
@d125q d125q changed the title Disable indent-tabs-mode for emacs-lisp-mode through .dir-locals.el Disable indent-tabs-mode in emacs-lisp-mode via .dir-locals.el Jul 9, 2019
@conao3
Copy link
Owner

conao3 commented Jul 9, 2019

Good catch. As I configure indent-tabs-mode to nil globally, I haven't met this error.
But that file helps many developers to contribute leaf.

https://github.com/conao3/dotfiles/blob/d17c030115b5739e7593d95eecc950ed8d3ec427/.dotfiles/.emacs.d/init.el#L254-L281

(leaf cus-start
    :doc "define customization properties of builtins"
    :url "http://handlename.hatenablog.jp/entry/2011/12/11/214923" ; align sumple
    :bind (("M-ESC ESC" . keyboard-quit))
    ;; :hook ((before-save-hook . delete-trailing-whitespace))
    :custom `((gc-cons-threshold               . ,(* 512 1024 1024))
              (garbage-collection-messages     . t)
              (fill-column                     . 70)
              (tab-width                       . 8)
              ;; (shell-file-name              . "/bin/bash")
              (user-full-name                  . "Naoya Yamashita")
              (user-mail-address               . "conao3@gmail.com")
              (user-login-name                 . "conao3")
              (debug-on-error                  . t)
              (create-lockfiles                . nil)
              (use-dialog-box                  . nil)
              (use-file-dialog                 . nil)
              (frame-resize-pixelwise          . t)
              (enable-recursive-minibuffers    . t)
              (history-length                  . 1000)
              (history-delete-duplicates       . t)
              (inhibit-compacting-font-caches  . t)
              (scroll-preserve-screen-position . t)

              (truncate-lines   . t)
              (menu-bar-mode    . t)
              (tool-bar-mode    . nil)
              (indent-tabs-mode . nil))
    :config
    (keyboard-translate ?\C-h ?\C-?)
    (mapc (lambda (func) (put func 'disabled nil))
          (cdr '(:dummy
                 upcase-region downcase-region
                 narrow-to-region narrow-to-page narrow-to-defun
                 list-timers))))

@conao3 conao3 mentioned this issue Jul 10, 2019
@conao3
Copy link
Owner

conao3 commented Aug 4, 2019

This issue is solved by add file local variables settings.

@conao3 conao3 closed this as completed Aug 4, 2019
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