Skip to content

Commit

Permalink
fix emacs indenting howto filename expansion
Browse files Browse the repository at this point in the history
I don't think emacs understands tilde expansion, so use
"expand-file-name" to do that.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Dan Carpenter authored and Linus Torvalds committed Jan 30, 2009
1 parent 0acbc6c commit 7022139
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Documentation/CodingStyle
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,8 @@ values. To do the latter, you can stick the following in your .emacs file:
(let ((filename (buffer-file-name)))
;; Enable kernel mode for the appropriate files
(when (and filename
(string-match "~/src/linux-trees" filename))
(string-match (expand-file-name "~/src/linux-trees")
filename))
(setq indent-tabs-mode t)
(c-set-style "linux-tabs-only")))))

Expand Down

0 comments on commit 7022139

Please sign in to comment.