Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix a bug where some modes never were gotten to.

  • Loading branch information...
commit c51a8871f9c383977a87b0ee836b8d3daa6d9dbc 1 parent e3b1cff
@wfarr authored
Showing with 2 additions and 4 deletions.
  1. +2 −4 add-import.el
View
6 add-import.el
@@ -18,9 +18,7 @@
(string-match "^\\([[:alpha:]-]+\\)\\-mode" current-mode)
(match-string 1 current-mode)))
;; check extension
- ((or (and (buffer-file-name)
- (string-match "\.\\([:alpha:]+\\)$" (buffer-file-name)))
- (string-match "\.\\([:alpha:]+\\)$" (buffer-name)))
+ ((or (buffer-file-name) (buffer-name))
(let ((bufname (or (buffer-file-name) (buffer-name))))
(dolist (pair auto-mode-alist)
(if (string-match (car pair) bufname)
@@ -28,7 +26,7 @@
(string-match "^\\([[:alpha:]-]+\\)\\-mode" current-mode)
(return (match-string 1 current-mode))))))))
;; check shebang
-)
+ )
(defun bounds-of-module-at-point ()
"Determine where a module name starts for (thing-at-point 'perl-module)"
Please sign in to comment.
Something went wrong with that request. Please try again.