]> code.delx.au - gnu-emacs-elpa/commitdiff
Small speed improvements to company-in-string-or-comment.
authorNikolaj Schumacher <git@nschum.de>
Thu, 16 Apr 2009 19:29:07 +0000 (21:29 +0200)
committerNikolaj Schumacher <git@nschum.de>
Sat, 18 Apr 2009 10:59:59 +0000 (12:59 +0200)
company.el

index 65a35ed3ff483b86f69dc402f0fe80156d4f5f4b..4af3c5aaad3bd65270e17b3ed63985b155d813ee 100644 (file)
@@ -563,7 +563,9 @@ keymap during active completions (`company-active-map'):
 
 (defun company-in-string-or-comment ()
   (let ((ppss (syntax-ppss)))
-    (or (nth 3 ppss) (nth 4 ppss) (nth 7 ppss))))
+    (or (car (setq ppss (nthcdr 3 ppss)))
+        (car (setq ppss (cdr ppss)))
+        (nth 3 ppss))))
 
 (defun company-call-backend (&rest args)
   (apply 'company-backend args))