Permalink
Browse files

notes-mode/mkconfig: don't reference undefined envvar NOTES_BIN_DIR

  • Loading branch information...
1 parent 13332f0 commit c6b386e626e4b24c56ecf3f20167a375b77c99d1 @andreas-schwab andreas-schwab committed Dec 26, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 mkconfig
View
@@ -32,10 +32,11 @@ my($home_dir) = ((getpwuid($<))[7]);
my(%defaults) = (
'dir' => ['path', '~/NOTES'],
- 'bin_dir' => ['path', "$ENV{'NOTES_BIN_DIR'}"],
'int_form' => ['form', '%Y%m'],
'file_form' => ['form', '%y%m%d'],
);
+$defaults{'bin_dir'} = ['path', "$ENV{'NOTES_BIN_DIR'}"]
+ if defined($ENV{'NOTES_BIN_DIR'});
my($key, $value, %notes);
while (($key, $value) = each %defaults) {

0 comments on commit c6b386e

Please sign in to comment.