Browse files

Ensure that comment-start-skip is non-nill in ac-filename-candidate

Some modes might set comment-start-skip to nil as comments are meaningless (for
example comint buffers). In such modes ac-filename-candidate blows. This patch
solves the issue.
  • Loading branch information...
vspinu committed Jun 14, 2012
1 parent c394441 commit 0800424452c7352d5a0c58ba6ca61d080fca242c
Showing with 2 additions and 1 deletion.
  1. +2 −1 auto-complete.el
@@ -1955,7 +1955,8 @@ completion menu. This workaround stops that annoying behavior."
(defun ac-filename-candidate ()
(let (file-name-handler-alist)
- (unless (or (string-match comment-start-skip ac-prefix)
+ (unless (or (and comment-start-skip
+ (string-match comment-start-skip ac-prefix))
(file-regular-p ac-prefix))
(loop with dir = (file-name-directory ac-prefix)

0 comments on commit 0800424

Please sign in to comment.