From 044816229c22b0187f7aea1ac55b18025c1fbf43 Mon Sep 17 00:00:00 2001 From: Andreas Gerler Date: Tue, 8 Dec 2015 16:15:23 +0100 Subject: [PATCH] fix sh-mode-hook - org-mode org-edit-special buffer has no buffer-file-name. --- bba.org | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 -- 2.47.3