* local variable when editing a file in a specific directory
@ 2007-04-28 22:28 Seweryn Kokot
0 siblings, 0 replies; 2+ messages in thread
From: Seweryn Kokot @ 2007-04-28 22:28 UTC (permalink / raw)
To: help-gnu-emacs
Hello,
In .emacs file I have
(setq require-final-newline t)
and I would like to set it to "nil" when I visit a file in a specific
directory.
Any idea?
regards,
Seweryn Kokot
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: local variable when editing a file in a specific directory
@ 2007-04-29 7:48 martin rudalics
0 siblings, 0 replies; 2+ messages in thread
From: martin rudalics @ 2007-04-29 7:48 UTC (permalink / raw)
To: skokot; +Cc: help-gnu-emacs
(add-hook
'find-file-hook
'(lambda ()
(when (save-match-data
(string-match
(concat "^" (regexp-quote "full name of specific directory"))
(file-name-directory (buffer-file-name))))
(set (make-local-variable 'require-final-newline) nil))))
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-04-29 7:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-28 22:28 local variable when editing a file in a specific directory Seweryn Kokot
-- strict thread matches above, loose matches on Subject: below --
2007-04-29 7:48 martin rudalics
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).