From: Andreas Gerler Date: Tue, 8 Dec 2015 15:15:23 +0000 (+0100) Subject: fix sh-mode-hook X-Git-Url: http://git.bundesbrandschatzamt.de/?a=commitdiff_plain;h=044816229c22b0187f7aea1ac55b18025c1fbf43;p=emacsconfig.git fix sh-mode-hook - org-mode org-edit-special buffer has no buffer-file-name. --- diff --git a/bba.org b/bba.org index 016771bc..4bf94c02 100644 --- a/bba.org +++ b/bba.org @@ -1538,8 +1538,9 @@ Use C-c C-c to run rpmbuild if buffer is spec file. (add-hook 'sh-mode-hook (lambda () (progn - (if (string-match ".spec$" buffer-file-name) - (define-key sh-mode-map "\C-c\C-c" 'bba-build-rpm)) + (if (buffer-file-name) + (if (string-match ".spec$" buffer-file-name) + (define-key sh-mode-map "\C-c\C-c" 'bba-build-rpm))) ))) #+END_SRC