X-Git-Url: https://code.delx.au/gnu-emacs-elpa/blobdiff_plain/0a29a07b6f6d135b65b9180b084750a99de6bbd6..951b5e388108af26263a6ab6892391fea976a220:/packages/company/company-nxml.el diff --git a/packages/company/company-nxml.el b/packages/company/company-nxml.el index 62e6e3154..70e1c096b 100644 --- a/packages/company/company-nxml.el +++ b/packages/company/company-nxml.el @@ -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 @@ -123,7 +123,7 @@ (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)