]> code.delx.au - gnu-emacs-elpa/blobdiff - company-nxml.el
company-etags-find-table: check that TAGS is a regular file, cf. #222
[gnu-emacs-elpa] / company-nxml.el
index 62e6e31543af65d2a6df2fdff4b2b6987821c677..70e1c096bf31b561d403a5ade0d22187c5e10b3f 100644 (file)
@@ -26,7 +26,7 @@
 ;;; Code:
 
 (require 'company)
-(eval-when-compile (require 'cl))
+(require 'cl-lib)
 
 (defvar rng-open-elements)
 (defvar rng-validate-mode)
@@ -76,7 +76,7 @@
        ,@body)))
 
 (defun company-nxml-tag (command &optional arg &rest ignored)
-  (case command
+  (cl-case command
     (prefix (and (derived-mode-p 'nxml-mode)
                  rng-validate-mode
                  (company-grab company-nxml-in-tag-name-regexp 1)))
@@ -86,7 +86,7 @@
     (sorted t)))
 
 (defun company-nxml-attribute (command &optional arg &rest ignored)
-  (case command
+  (cl-case command
     (prefix (and (derived-mode-p 'nxml-mode)
                  rng-validate-mode
                  (memq (char-after) '(?\  ?\t ?\n)) ;; outside word
@@ -99,7 +99,7 @@
     (sorted t)))
 
 (defun company-nxml-attribute-value (command &optional arg &rest ignored)
-  (case command
+  (cl-case command
     (prefix (and (derived-mode-p 'nxml-mode)
                  rng-validate-mode
                  (and (memq (char-after) '(?' ?\" ?\  ?\t ?\n)) ;; outside word
 (defun company-nxml (command &optional arg &rest ignored)
   "`company-mode' completion back-end for `nxml-mode'."
   (interactive (list 'interactive))
-  (case command
+  (cl-case command
     (interactive (company-begin-backend 'company-nxml))
     (prefix (or (company-nxml-tag 'prefix)
                 (company-nxml-attribute 'prefix)