Permalink
Browse files

Check against buffer-local variable language. For whatever reason, do…

…esn't work at the moment, but running the let form inside an (if language ...) inside the buffer in question works fine. Who knows.
  • Loading branch information...
1 parent 418a06c commit 3e0144d8c6041a512fa23f67fa6ec846de299709 @wfarr committed Apr 24, 2009
Showing with 5 additions and 1 deletion.
  1. +5 −1 add-import.el
View
@@ -24,7 +24,11 @@
(if (string-match (car pair) bufname)
(let ((current-mode (symbol-name (cdr pair))))
(string-match "^\\([[:alpha:]-]+\\)\\-mode" current-mode)
- (return (match-string 1 current-mode))))))))
+ (return (match-string 1 current-mode)))))))
+ (language
+ (let ((current-mode (symbol-name language)))
+ (string-match "^\\([[:alpha:]-]+\\)" current-mode)
+ (return (match-string 0 current-mode)))))
;; check shebang
)

0 comments on commit 3e0144d

Please sign in to comment.