]> git.bundesbrandschatzamt.de Git - emacsconfig.git/commitdiff
fix sh-mode-hook
authorAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Tue, 8 Dec 2015 15:15:23 +0000 (16:15 +0100)
committerAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Tue, 8 Dec 2015 15:15:23 +0000 (16:15 +0100)
- org-mode org-edit-special buffer has no buffer-file-name.

bba.org

diff --git a/bba.org b/bba.org
index 016771bcf3fa056d4abb603b9df56b2f70ec10e4..4bf94c029dabd78de155b2025727ff708e4462bf 100644 (file)
--- 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