nsis-mode.el
changeset 1250 73c10c73c63f
parent 847 d38ced086516
equal deleted inserted replaced
1249:edb7f9210892 1250:73c10c73c63f
    77     )
    77     )
    78   '("\\.nsi\\'" "\\.nsh\\'")
    78   '("\\.nsi\\'" "\\.nsh\\'")
    79   '(nsis-mode-modify-syntax-entry nsis-mode-set-comment-style)
    79   '(nsis-mode-modify-syntax-entry nsis-mode-set-comment-style)
    80   "Generic mode for nsis files.")
    80   "Generic mode for nsis files.")
    81 
    81 
    82 (setq nsis-imenu-generic-expression
    82 (defvar nsis-imenu-generic-expression
    83       '(
    83       '(
    84         ("Defines"  "^!define[[:blank:]]+\\([[:word:]]+\\)" 1)
    84         ("Defines"  "^!define[[:blank:]]+\\([[:word:]]+\\)" 1)
    85         ("Sections"  "^Section[[:blank:]]+\"?\\(-?[[:word:] ]+\\)\"?" 1)
    85         ("Sections"  "^Section[[:blank:]]+\"?\\(-?[[:word:] ]+\\)\"?" 1)
    86         ("Functions"  "^Function[[:blank:]]+\\([[:word:]]+\\)" 1)
    86         ("Functions"  "^Function[[:blank:]]+\\([[:word:]]+\\)" 1)
    87         ("Macros"  "^!macro[[:blank:]]+\\([[:word:]]+\\)" 1)
    87         ("Macros"  "^!macro[[:blank:]]+\\([[:word:]]+\\)" 1)
    91   (setq imenu-generic-expression nsis-imenu-generic-expression)
    91   (setq imenu-generic-expression nsis-imenu-generic-expression)
    92   )
    92   )
    93 
    93 
    94 (add-hook 'nsis-mode-hook 'nsis-set-imenu-generic-expression)
    94 (add-hook 'nsis-mode-hook 'nsis-set-imenu-generic-expression)
    95 
    95 
       
    96 (eval-when-compile
       
    97   (defvar which-func-modes))
       
    98 
    96 (eval-after-load 'which-func
    99 (eval-after-load 'which-func
    97   '(add-to-list 'which-func-modes 'nsis-mode)
   100   '(add-to-list 'which-func-modes 'nsis-mode))
    98   )
       
    99 
   101 
   100 (provide 'nsis-mode)
   102 (provide 'nsis-mode)
   101 
   103 
   102 ;;; nsis-mode.el ends here
   104 ;;; nsis-mode.el ends here