Description of problem:
Please remove the
| (set (make-local-variable 'indent-tabs-mode) nil)
line from fedora-init.el. rpmbuild works well with tabs instead of whitespaces
and there does not exist a policy forbidding tabs.
The TAB policy can (and is) customized globally and I do not want to setup it
for every filemode.
Beside that, setting it in the fedora-new-rpm-spec-file-init does not make much
sense: the new tab policy applies to new spec files only; when opening an
already existing file, the hook will not be called and the global policy will be
Version-Release number of selected component (if applicable):
Since the beginning of the spec templates, they use indented "header" tags
(Name, Version etc). The indentation in these spec templates (which are used
by newrpmspec and fedora-init.el) done with spaces, and we want to stay in
sync with that and avoid mixing spaces/tabs. As long as the indented
templates are used, we need to choose between spaces and tabs, and I see no
reason to change to tabs.
Applying this to new specfiles only is the intended behaviour.
So I'm not going to remove that line, but if you want, feel free to submit a
patch that makes the behaviour easier to customize, and reopen this bug.
Created attachment 120024 [details]
Do not sed `indent-tabs-mode' but tabify buffer on demand
Ok, this patch should solve the templates-do-not-use-tab situation without
adding a complicated customization.
> Applying this to new specfiles only is the intended behaviour.
I think, it is a broken behavior ;) when keybindings differ between new and
existing files. E.g.
| C-c C-f newfile.spec<CR> ; fedora-new-rpm-spec-file-init will be called
| <TAB> --> lots of spaces will be created
| C-c C-s ; save
| C-c k ; close buffer
| C-c C-f newfile.spec<CR> ; is not 'new' anymore and new-hook not executed
| <TAB> --> tabs will be created
Created attachment 120027 [details]
That patch is broken, testing for 'indent-tabs-mode always yields t since it
tests for the string "indent-tabs-mode", not the value of the variable.
Here's a simplified and fixed version, no need to explicitly load tabify.el
since tabify/untabify are autoloaded functions in in both GNU Emacs and XEmacs.
This still affects new files only, but should preserve consistency in terms of
local settings. It doesn't help with preserving the existing policy in an
existing opened random specfile, but it didn't do it before either, so no new
Ok, I've applied my version of the patch to CVS; let me know if it works for
you and I'll close this bug and release 1.3 with it soon.
Ok; works for me (indent-tabs-mode is t).
Fixed in 1.3-1*