# HG changeset patch # User Oleksandr Gavenko # Date 1425210073 -7200 # Node ID 73c10c73c63f2ebafa248937294e99451cd67930 # Parent edb7f9210892c99e222d287de8b44a64964aa9b5 Fix: Warning: reference/assignment to free variable `which-func-modes' diff -r edb7f9210892 -r 73c10c73c63f nsis-mode.el --- a/nsis-mode.el Sun Mar 01 13:39:23 2015 +0200 +++ b/nsis-mode.el Sun Mar 01 13:41:13 2015 +0200 @@ -79,7 +79,7 @@ '(nsis-mode-modify-syntax-entry nsis-mode-set-comment-style) "Generic mode for nsis files.") -(setq nsis-imenu-generic-expression +(defvar nsis-imenu-generic-expression '( ("Defines" "^!define[[:blank:]]+\\([[:word:]]+\\)" 1) ("Sections" "^Section[[:blank:]]+\"?\\(-?[[:word:] ]+\\)\"?" 1) @@ -93,9 +93,11 @@ (add-hook 'nsis-mode-hook 'nsis-set-imenu-generic-expression) +(eval-when-compile + (defvar which-func-modes)) + (eval-after-load 'which-func - '(add-to-list 'which-func-modes 'nsis-mode) - ) + '(add-to-list 'which-func-modes 'nsis-mode)) (provide 'nsis-mode)