]> code.delx.au - gnu-emacs-elpa/commitdiff
Removed superfluous quotes.
authorNikolaj Schumacher <git@nschum.de>
Sat, 18 Jun 2011 13:15:57 +0000 (15:15 +0200)
committerNikolaj Schumacher <git@nschum.de>
Sat, 18 Jun 2011 13:15:57 +0000 (15:15 +0200)
20 files changed:
company-abbrev.el
company-clang.el
company-css.el
company-dabbrev-code.el
company-dabbrev.el
company-eclim.el
company-elisp.el
company-etags.el
company-files.el
company-gtags.el
company-ispell.el
company-keywords.el
company-nxml.el
company-oddmuse.el
company-pysmell.el
company-ropemacs.el
company-semantic.el
company-tempo.el
company-xcode.el
company.el

index 16cdeedc1910ba8cecbcc8d2b898180fbd69dbb5..57939e8434a9b403ef4b6792399be2c8e9f93896 100644 (file)
   "A `company-mode' completion back-end for abbrev."
   (interactive (list 'interactive))
   (case command
-        ('interactive (company-begin-backend 'company-abbrev
-                                             'company-abbrev-insert))
-        ('prefix (company-grab-symbol))
-        ('candidates (nconc
-                      (delete "" (all-completions arg global-abbrev-table))
-                      (delete "" (all-completions arg local-abbrev-table))))
-        ('meta (abbrev-expansion arg))
-        ('require-match t)))
+    (interactive (company-begin-backend 'company-abbrev
+                                        'company-abbrev-insert))
+    (prefix (company-grab-symbol))
+    (candidates (nconc
+                 (delete "" (all-completions arg global-abbrev-table))
+                 (delete "" (all-completions arg local-abbrev-table))))
+    (meta (abbrev-expansion arg))
+    (require-match t)))
 
 (provide 'company-abbrev)
 ;;; company-abbrev.el ends here
index f4725c70e73e5a44095841741804760cfb1d1603..5bd55355610e01410f7259bdf3c3a79c02bfe552 100644 (file)
@@ -204,21 +204,21 @@ Completions only work correctly when the buffer has been saved.
 `company-clang-auto-save' determines whether to do this automatically."
   (interactive (list 'interactive))
   (case command
-        ('interactive (company-begin-backend 'company-clang))
-        ('init (unless company-clang-executable
-                 (error "Company found no clang executable"))
-               (when (version< (company-clang-version)
-                               company-clang-required-version)
-                 (error "Company requires clang version 1.1")))
-        ('prefix (and (memq major-mode company-clang-modes)
-                      buffer-file-name
-                      company-clang-executable
-                      (not (company-in-string-or-comment))
-                      (or (company-grab-symbol) 'stop)))
-        ('candidates (company-clang--candidates arg))
-        ('post-completion (and (derived-mode-p 'objc-mode)
-                               (string-match ":" arg)
-                               (company-clang-objc-templatify arg)))))
+    (interactive (company-begin-backend 'company-clang))
+    (init (unless company-clang-executable
+            (error "Company found no clang executable"))
+          (when (version< (company-clang-version)
+                          company-clang-required-version)
+            (error "Company requires clang version 1.1")))
+    (prefix (and (memq major-mode company-clang-modes)
+                 buffer-file-name
+                 company-clang-executable
+                 (not (company-in-string-or-comment))
+                 (or (company-grab-symbol) 'stop)))
+    (candidates (company-clang--candidates arg))
+    (post-completion (and (derived-mode-p 'objc-mode)
+                          (string-match ":" arg)
+                          (company-clang-objc-templatify arg)))))
 
 (provide 'company-clang)
 ;;; company-clang.el ends here
index cb80ce0873ba2426a0a41b972fa47250c0f2f4ed..6c8f4c06d14f4e08c45fd64b08f392c9255b28ac 100644 (file)
@@ -275,13 +275,13 @@ Returns \"\" if no property found, but feasible at this position."
   "A `company-mode' completion back-end for `css-mode'."
   (interactive (list 'interactive))
   (case command
-    ('interactive (company-begin-backend 'company-css))
-    ('prefix (and (derived-mode-p 'css-mode)
-                  (or (company-grab company-css-tag-regexp 1)
-                      (company-grab company-css-pseudo-regexp 1)
-                      (company-grab company-css-property-value-regexp 2)
-                      (company-css-grab-property))))
-    ('candidates
+    (interactive (company-begin-backend 'company-css))
+    (prefix (and (derived-mode-p 'css-mode)
+                 (or (company-grab company-css-tag-regexp 1)
+                     (company-grab company-css-pseudo-regexp 1)
+                     (company-grab company-css-property-value-regexp 2)
+                     (company-css-grab-property))))
+    (candidates
      (cond
       ((company-grab company-css-tag-regexp 1)
        (all-completions arg company-css-html-tags))
@@ -293,7 +293,7 @@ Returns \"\" if no property found, but feasible at this position."
                          (company-grab company-css-property-value-regexp 1))))
       ((company-css-grab-property)
        (all-completions arg company-css-property-alist))))
-    ('sorted t)))
+    (sorted t)))
 
 (provide 'company-css)
 ;;; company-css.el ends here
index 93f62c9cd405533a89e1a5dc6dfe08dc72072205..5d962e288cd41ea8c59baf3776904d51b6d27cf6 100644 (file)
@@ -65,17 +65,17 @@ The back-end looks for all symbols in the current buffer that aren't in
 comments or strings."
   (interactive (list 'interactive))
   (case command
-    ('interactive (company-begin-backend 'company-dabbrev-code))
-    ('prefix (and (or (eq t company-dabbrev-code-modes)
-                      (apply 'derived-mode-p company-dabbrev-code-modes))
-                  (not (company-in-string-or-comment))
-                  (or (company-grab-symbol) 'stop)))
-    ('candidates (let ((completion-ignore-case nil))
-                   (company-dabbrev--search
-                    (company-dabbrev-code--make-regexp arg)
-                    company-dabbrev-code-time-limit
-                    company-dabbrev-code-other-buffers t)))
-    ('duplicates t)))
+    (interactive (company-begin-backend 'company-dabbrev-code))
+    (prefix (and (or (eq t company-dabbrev-code-modes)
+                     (apply 'derived-mode-p company-dabbrev-code-modes))
+                 (not (company-in-string-or-comment))
+                 (or (company-grab-symbol) 'stop)))
+    (candidates (let ((completion-ignore-case nil))
+                  (company-dabbrev--search
+                   (company-dabbrev-code--make-regexp arg)
+                   company-dabbrev-code-time-limit
+                   company-dabbrev-code-other-buffers t)))
+    (duplicates t)))
 
 (provide 'company-dabbrev-code)
 ;;; company-dabbrev-code.el ends here
index c5a6081f1a51665aec0314975d0e32a3d2b02146..f4453e98c316e48b2ba4d5ef9ee6fc55d514efb0 100644 (file)
@@ -104,15 +104,15 @@ See also `company-dabbrev-time-limit'."
   "A dabbrev-like `company-mode' completion back-end."
   (interactive (list 'interactive))
   (case command
-    ('interactive (company-begin-backend 'company-dabbrev))
-    ('prefix (company-grab-word))
-    ('candidates
+    (interactive (company-begin-backend 'company-dabbrev))
+    (prefix (company-grab-word))
+    (candidates
      (mapcar 'downcase
              (company-dabbrev--search (company-dabbrev--make-regexp arg)
                                       company-dabbrev-time-limit
                                       company-dabbrev-other-buffers)))
-    ('ignore-case t)
-    ('duplicates t)))
+    (ignore-case t)
+    (duplicates t)))
 
 (provide 'company-dabbrev)
 ;;; company-dabbrev.el ends here
index 8ff01410408cdd9225723010b5ee3732c8a777b6..f28bdb095390a67fa5c7f543a8e5b515aeeef712 100644 (file)
@@ -123,17 +123,17 @@ Completions only work correctly when the buffer has been saved.
 `company-eclim-auto-save' determines whether to do this automatically."
   (interactive (list 'interactive))
   (case command
-    ('interactive (company-begin-backend 'company-eclim))
-    ('prefix (and (derived-mode-p 'java-mode 'jde-mode)
-                  buffer-file-name
-                  company-eclim-executable
-                  (company-eclim--project-name)
-                  (not (company-in-string-or-comment))
-                  (or (company-grab-symbol) 'stop)))
-    ('candidates (company-eclim--candidates arg))
-    ('meta (cadr (assoc arg company-eclim--doc)))
+    (interactive (company-begin-backend 'company-eclim))
+    (prefix (and (derived-mode-p 'java-mode 'jde-mode)
+                 buffer-file-name
+                 company-eclim-executable
+                 (company-eclim--project-name)
+                 (not (company-in-string-or-comment))
+                 (or (company-grab-symbol) 'stop)))
+    (candidates (company-eclim--candidates arg))
+    (meta (cadr (assoc arg company-eclim--doc)))
     ;; because "" doesn't return everything
-    ('no-cache (equal arg ""))))
+    (no-cache (equal arg ""))))
 
 (provide 'company-eclim)
 ;;; company-eclim.el ends here
index a10fe464ce13a8d10cb52e816807ce712d345251..1e2b17176fe9090185f2227e3169243d5bd0d9f6 100644 (file)
@@ -109,20 +109,20 @@ Functions are offered for completion only after ' and \(."
   "A `company-mode' completion back-end for `emacs-lisp-mode'."
   (interactive (list 'interactive))
   (case command
-    ('interactive (company-begin-backend 'company-elisp))
-    ('prefix (and (eq (derived-mode-p 'emacs-lisp-mode) 'emacs-lisp-mode)
-                  (company-grab-lisp-symbol)))
-    ('candidates (company-elisp-candidates arg))
-    ('meta (company-elisp-doc arg))
-    ('doc-buffer (let ((symbol (intern arg)))
-                   (save-window-excursion
-                     (when (or (ignore-errors (describe-function symbol))
-                               (ignore-errors (describe-variable symbol)))
-                       (help-buffer)))))
-    ('location (let ((sym (intern arg)))
-                 (or (ignore-errors (find-definition-noselect sym nil))
-                     (ignore-errors (find-definition-noselect sym 'defvar))
-                     (ignore-errors (find-definition-noselect sym t)))))))
+    (interactive (company-begin-backend 'company-elisp))
+    (prefix (and (eq (derived-mode-p 'emacs-lisp-mode) 'emacs-lisp-mode)
+                 (company-grab-lisp-symbol)))
+    (candidates (company-elisp-candidates arg))
+    (meta (company-elisp-doc arg))
+    (doc-buffer (let ((symbol (intern arg)))
+                  (save-window-excursion
+                    (when (or (ignore-errors (describe-function symbol))
+                              (ignore-errors (describe-variable symbol)))
+                      (help-buffer)))))
+    (location (let ((sym (intern arg)))
+                (or (ignore-errors (find-definition-noselect sym nil))
+                    (ignore-errors (find-definition-noselect sym 'defvar))
+                    (ignore-errors (find-definition-noselect sym t)))))))
 
 (provide 'company-elisp)
 ;;; company-elisp.el ends here
index 55842d2229cb1510b58587da6e7cf27af9f5fdf3..a4c2f1d41f3a06c22b0039e0aef498be23fe4feb 100644 (file)
@@ -61,18 +61,18 @@ buffer automatically."
   "A `company-mode' completion back-end for etags."
   (interactive (list 'interactive))
   (case command
-    ('interactive (company-begin-backend 'company-etags))
-    ('prefix (and (memq major-mode company-etags-modes)
-                  (not (company-in-string-or-comment))
-                  (company-etags-buffer-table)
-                  (or (company-grab-symbol) 'stop)))
-    ('candidates (company-etags--candidates arg))
-    ('location (let ((tags-table-list (company-etags-buffer-table)))
-                 (when (fboundp 'find-tag-noselect)
-                   (save-excursion
-                     (let ((buffer (find-tag-noselect arg)))
-                       (cons buffer (with-current-buffer buffer (point))))))))
-    ('sorted t)))
+    (interactive (company-begin-backend 'company-etags))
+    (prefix (and (memq major-mode company-etags-modes)
+                 (not (company-in-string-or-comment))
+                 (company-etags-buffer-table)
+                 (or (company-grab-symbol) 'stop)))
+    (candidates (company-etags--candidates arg))
+    (location (let ((tags-table-list (company-etags-buffer-table)))
+                (when (fboundp 'find-tag-noselect)
+                  (save-excursion
+                    (let ((buffer (find-tag-noselect arg)))
+                      (cons buffer (with-current-buffer buffer (point))))))))
+    (sorted t)))
 
 (provide 'company-etags)
 ;;; company-etags.el ends here
index 6c0775c2be0870ded2801bf76c53689a8aa2e30b..bc764698d7d171a6d62ac9fdff7f46c50ddb6cdb 100644 (file)
   "a `company-mode' completion back-end existing file names."
   (interactive (list 'interactive))
   (case command
-    ('interactive (company-begin-backend 'company-files))
-    ('prefix (company-files-grab-existing-name))
-    ('candidates (company-files-complete arg))
-    ('location (cons (dired-noselect
-                      (file-name-directory (directory-file-name arg))) 1))
-    ('sorted t)
-    ('no-cache t)))
+    (interactive (company-begin-backend 'company-files))
+    (prefix (company-files-grab-existing-name))
+    (candidates (company-files-complete arg))
+    (location (cons (dired-noselect
+                     (file-name-directory (directory-file-name arg))) 1))
+    (sorted t)
+    (no-cache t)))
 
 (provide 'company-files)
 ;;; company-files.el ends here
index ed591a0db4abb93770b3cb24128fae8ab99b54a4..2630f732a095f8d9cef0489b5e3c829c4a9e9352 100644 (file)
   "A `company-mode' completion back-end for GNU Global."
   (interactive (list 'interactive))
   (case command
-    ('interactive (company-begin-backend 'company-gtags))
-    ('prefix (and company-gtags-executable
-                  (memq major-mode company-gtags-modes)
-                  (not (company-in-string-or-comment))
-                  (company-gtags--tags-available-p)
-                  (or (company-grab-symbol) 'stop)))
-    ('candidates (company-gtags-fetch-tags arg))
-    ('sorted t)
-    ('location (company-gtags-location arg))))
+    (interactive (company-begin-backend 'company-gtags))
+    (prefix (and company-gtags-executable
+                 (memq major-mode company-gtags-modes)
+                 (not (company-in-string-or-comment))
+                 (company-gtags--tags-available-p)
+                 (or (company-grab-symbol) 'stop)))
+    (candidates (company-gtags-fetch-tags arg))
+    (sorted t)
+    (location (company-gtags-location arg))))
 
 (provide 'company-gtags)
 ;;; company-gtags.el ends here
index 236c5198dad693a1829ad659f028cdb09f41e4af..c4acebc8711875a829637a77ae7765aac9f1dcb0 100644 (file)
@@ -46,13 +46,13 @@ If nil, use `ispell-complete-word-dict'."
   "A `company-mode' completion back-end using ispell."
   (interactive (list 'interactive))
   (case command
-    ('interactive (company-begin-backend 'company-ispell))
-    ('prefix (when (company-ispell-available)
-               (company-grab-word)))
-    ('candidates (lookup-words arg (or company-ispell-dictionary
-                                       ispell-complete-word-dict)))
-    ('sorted t)
-    ('ignore-case t)))
+    (interactive (company-begin-backend 'company-ispell))
+    (prefix (when (company-ispell-available)
+              (company-grab-word)))
+    (candidates (lookup-words arg (or company-ispell-dictionary
+                                      ispell-complete-word-dict)))
+    (sorted t)
+    (ignore-case t)))
 
 (provide 'company-ispell)
 ;;; company-ispell.el ends here
index 1e86705f2f34a9a25b5b44870a63e2fd451660f0..3efda9e0363785f36be66c464cec4fede01493c4 100644 (file)
   "A `company-mode' back-end for programming language keywords."
   (interactive (list 'interactive))
   (case command
-    ('interactive (company-begin-backend 'company-))
-    ('prefix (and (assq major-mode company-keywords-alist)
-                  (not (company-in-string-or-comment))
-                  (or (company-grab-symbol) 'stop)))
-    ('candidates
+    (interactive (company-begin-backend 'company-))
+    (prefix (and (assq major-mode company-keywords-alist)
+                 (not (company-in-string-or-comment))
+                 (or (company-grab-symbol) 'stop)))
+    (candidates
      (let ((completion-ignore-case nil)
            (symbols (cdr (assq major-mode company-keywords-alist))))
        (all-completions arg (if (consp symbols)
                                 symbols
                               (cdr (assq symbols company-keywords-alist))))))
-    ('sorted t)))
+    (sorted t)))
 
 (provide 'company-keywords)
 ;;; company-keywords.el ends here
index bacc1dc96483e6f1c1f8ae91d07046e00b02db94..5d05bc685c416f0f0b7f76aeea7334f424f16f76 100644 (file)
 
 (defun company-nxml-tag (command &optional arg &rest ignored)
   (case command
-    ('prefix (and (derived-mode-p 'nxml-mode)
-                  rng-validate-mode
-                  (company-grab company-nxml-in-tag-name-regexp 1)))
-    ('candidates (company-nxml-prepared
-                   (company-nxml-all-completions arg
-                    (rng-match-possible-start-tag-names))))
-    ('sorted t)))
+    (prefix (and (derived-mode-p 'nxml-mode)
+                 rng-validate-mode
+                 (company-grab company-nxml-in-tag-name-regexp 1)))
+    (candidates (company-nxml-prepared
+                 (company-nxml-all-completions
+                  arg (rng-match-possible-start-tag-names))))
+    (sorted t)))
 
 (defun company-nxml-attribute (command &optional arg &rest ignored)
   (case command
-    ('prefix (and (derived-mode-p 'nxml-mode)
-                  rng-validate-mode
-                  (memq (char-after) '(?\  ?\t ?\n)) ;; outside word
-                  (company-grab rng-in-attribute-regex 1)))
-    ('candidates (company-nxml-prepared
-                   (and (rng-adjust-state-for-attribute
-                         lt-pos (- (point) (length arg)))
-                        (company-nxml-all-completions arg
-                         (rng-match-possible-attribute-names)))))
-    ('sorted t)))
+    (prefix (and (derived-mode-p 'nxml-mode)
+                 rng-validate-mode
+                 (memq (char-after) '(?\  ?\t ?\n)) ;; outside word
+                 (company-grab rng-in-attribute-regex 1)))
+    (candidates (company-nxml-prepared
+                 (and (rng-adjust-state-for-attribute
+                       lt-pos (- (point) (length arg)))
+                      (company-nxml-all-completions
+                       arg (rng-match-possible-attribute-names)))))
+    (sorted t)))
 
 (defun company-nxml-attribute-value (command &optional arg &rest ignored)
   (case command
-    ('prefix (and (derived-mode-p 'nxml-mode)
-                  rng-validate-mode
-                  (and (memq (char-after) '(?' ?\" ?\  ?\t ?\n)) ;; outside word
-                       (looking-back company-nxml-in-attribute-value-regexp)
-                       (or (match-string-no-properties 4)
-                           (match-string-no-properties 5)
-                           ""))))
-    ('candidates (company-nxml-prepared
-                   (let (attr-start attr-end colon)
-                     (and (looking-back rng-in-attribute-value-regex lt-pos)
-                          (setq colon (match-beginning 2)
-                                attr-start (match-beginning 1)
-                                attr-end (match-end 1))
-                          (rng-adjust-state-for-attribute lt-pos attr-start)
-                          (rng-adjust-state-for-attribute-value
-                           attr-start colon attr-end)
-                          (all-completions arg
-                           (rng-match-possible-value-strings))))))))
+    (prefix (and (derived-mode-p 'nxml-mode)
+                 rng-validate-mode
+                 (and (memq (char-after) '(?' ?\" ?\  ?\t ?\n)) ;; outside word
+                      (looking-back company-nxml-in-attribute-value-regexp)
+                      (or (match-string-no-properties 4)
+                          (match-string-no-properties 5)
+                          ""))))
+    (candidates (company-nxml-prepared
+                 (let (attr-start attr-end colon)
+                   (and (looking-back rng-in-attribute-value-regex lt-pos)
+                        (setq colon (match-beginning 2)
+                              attr-start (match-beginning 1)
+                              attr-end (match-end 1))
+                        (rng-adjust-state-for-attribute lt-pos attr-start)
+                        (rng-adjust-state-for-attribute-value
+                         attr-start colon attr-end)
+                        (all-completions
+                         arg (rng-match-possible-value-strings))))))))
 
 ;;;###autoload
 (defun company-nxml (command &optional arg &rest ignored)
   "A `company-mode' completion back-end for `nxml-mode'."
   (interactive (list 'interactive))
   (case command
-    ('interactive (company-begin-backend 'company-nxml))
-    ('prefix (or (company-nxml-tag 'prefix)
-                 (company-nxml-attribute 'prefix)
-                 (company-nxml-attribute-value 'prefix)))
-    ('candidates (cond
-                  ((company-nxml-tag 'prefix)
-                   (company-nxml-tag 'candidates arg))
-                  ((company-nxml-attribute 'prefix)
-                   (company-nxml-attribute 'candidates arg))
-                  ((company-nxml-attribute-value 'prefix)
-                   (sort (company-nxml-attribute-value 'candidates arg)
-                         'string<))))
-    ('sorted t)))
+    (interactive (company-begin-backend 'company-nxml))
+    (prefix (or (company-nxml-tag 'prefix)
+                (company-nxml-attribute 'prefix)
+                (company-nxml-attribute-value 'prefix)))
+    (candidates (cond
+                 ((company-nxml-tag 'prefix)
+                  (company-nxml-tag 'candidates arg))
+                 ((company-nxml-attribute 'prefix)
+                  (company-nxml-attribute 'candidates arg))
+                 ((company-nxml-attribute-value 'prefix)
+                  (sort (company-nxml-attribute-value 'candidates arg)
+                        'string<))))
+    (sorted t)))
 
 (provide 'company-nxml)
 ;;; company-nxml.el ends here
index 67b9a80cd47a277b785df82e91ed6b1d81d03285..344a8be51974ad9f4a5eeca863a3327da410401a 100644 (file)
 
 (defun company-oddmuse-get-page-table ()
   (case major-mode
-    ('yaoddmuse-mode (with-no-warnings
-                       (yaoddmuse-get-pagename-table yaoddmuse-wikiname)))
-    ('oddmuse-mode (with-no-warnings
-                     (oddmuse-make-completion-table oddmuse-wiki)))))
+    (yaoddmuse-mode (with-no-warnings
+                      (yaoddmuse-get-pagename-table yaoddmuse-wikiname)))
+    (oddmuse-mode (with-no-warnings
+                    (oddmuse-make-completion-table oddmuse-wiki)))))
 
 ;;;###autoload
 (defun company-oddmuse (command &optional arg &rest ignored)
   "A `company-mode' completion back-end for `oddmuse-mode'."
   (interactive (list 'interactive))
   (case command
-    ('interactive (company-begin-backend 'company-oddmuse))
-    ('prefix (let ((case-fold-search nil))
-               (and (memq major-mode '(oddmuse-mode yaoddmuse-mode))
-                    (looking-back company-oddmuse-link-regexp (point-at-bol))
-                    (or (match-string 1)
-                        (match-string 2)))))
-    ('candidates (all-completions arg (company-oddmuse-get-page-table)))))
+    (interactive (company-begin-backend 'company-oddmuse))
+    (prefix (let ((case-fold-search nil))
+              (and (memq major-mode '(oddmuse-mode yaoddmuse-mode))
+                   (looking-back company-oddmuse-link-regexp (point-at-bol))
+                   (or (match-string 1)
+                       (match-string 2)))))
+    (candidates (all-completions arg (company-oddmuse-get-page-table)))))
 
 (provide 'company-oddmuse)
 ;;; company-oddmuse.el ends here
index 4c98f07c6825d8cd068bcacdcc6a78d376536a8e..83dfebb1a565441fed8332f4722acbc0afc21cbd 100644 (file)
 This requires pysmell.el and pymacs.el."
   (interactive (list 'interactive))
   (case command
-    ('interactive (company-begin-backend 'company-pysmell))
-    ('prefix (and (derived-mode-p 'python-mode)
-                  buffer-file-name
-                  (not (company-in-string-or-comment))
-                  (company-pysmell--available-p)
-                  (company-pysmell--grab-symbol)))
-    ('candidates (delete "" (pysmell-get-all-completions)))))
+    (interactive (company-begin-backend 'company-pysmell))
+    (prefix (and (derived-mode-p 'python-mode)
+                 buffer-file-name
+                 (not (company-in-string-or-comment))
+                 (company-pysmell--available-p)
+                 (company-pysmell--grab-symbol)))
+    (candidates (delete "" (pysmell-get-all-completions)))))
 
 (provide 'company-pysmell)
 ;;; company-pysmell.el ends here
index 92de7d05caf039f59f0979a51a5d7c2ee0a7e2cf..e63a8dffd58266523e33c6e7b3a1dee85c72109f 100644 (file)
   "A `company-mode' completion back-end for ropemacs."
   (interactive (list 'interactive))
   (case command
-    ('interactive (company-begin-backend 'company-ropemacs))
-    ('prefix (and (derived-mode-p 'python-mode)
-                  (not (company-in-string-or-comment))
-                  (company-ropemacs--grab-symbol)))
-    ('candidates (mapcar (lambda (element) (concat arg element))
-                         (rope-completions)))
-    ('doc-buffer (company-ropemacs-doc-buffer arg))
-    ('location (company-ropemacs-location arg))))
+    (interactive (company-begin-backend 'company-ropemacs))
+    (prefix (and (derived-mode-p 'python-mode)
+                 (not (company-in-string-or-comment))
+                 (company-ropemacs--grab-symbol)))
+    (candidates (mapcar (lambda (element) (concat arg element))
+                        (rope-completions)))
+    (doc-buffer (company-ropemacs-doc-buffer arg))
+    (location (company-ropemacs-location arg))))
 
 (provide 'company-ropemacs)
 ;;; company-ropemacs.el ends here
index aec05a94ac8cb0dc3d44b995d05b7cd3215d27cb..f22266de94e4d0a19cf925181a88328bd6e69182 100644 (file)
@@ -97,25 +97,25 @@ Symbols are chained by \".\" or \"->\"."
   "A `company-mode' completion back-end using CEDET Semantic."
   (interactive (list 'interactive))
   (case command
-    ('interactive (company-begin-backend 'company-semantic))
-    ('prefix (and (memq major-mode company-semantic-modes)
-                  (semantic-active-p)
-                  (not (company-in-string-or-comment))
-                  (or (company-semantic--grab) 'stop)))
-    ('candidates (if (and (equal arg "")
-                          (not (looking-back "->\\|\\.")))
-                     (company-semantic-completions-raw arg)
-                   (company-semantic-completions arg)))
-    ('meta (funcall company-semantic-metadata-function
-                    (assoc arg company-semantic--current-tags)))
-    ('doc-buffer (company-semantic-doc-buffer
-                  (assoc arg company-semantic--current-tags)))
+    (interactive (company-begin-backend 'company-semantic))
+    (prefix (and (memq major-mode company-semantic-modes)
+                 (semantic-active-p)
+                 (not (company-in-string-or-comment))
+                 (or (company-semantic--grab) 'stop)))
+    (candidates (if (and (equal arg "")
+                         (not (looking-back "->\\|\\.")))
+                    (company-semantic-completions-raw arg)
+                  (company-semantic-completions arg)))
+    (meta (funcall company-semantic-metadata-function
+                   (assoc arg company-semantic--current-tags)))
+    (doc-buffer (company-semantic-doc-buffer
+                 (assoc arg company-semantic--current-tags)))
     ;; because "" is an empty context and doesn't return local variables
-    ('no-cache (equal arg ""))
-    ('location (let ((tag (assoc arg company-semantic--current-tags)))
-                 (when (buffer-live-p (semantic-tag-buffer tag))
-                   (cons (semantic-tag-buffer tag)
-                         (semantic-tag-start tag)))))))
+    (no-cache (equal arg ""))
+    (location (let ((tag (assoc arg company-semantic--current-tags)))
+                (when (buffer-live-p (semantic-tag-buffer tag))
+                  (cons (semantic-tag-buffer tag)
+                        (semantic-tag-start tag)))))))
 
 (provide 'company-semantic)
 ;;; company-semantic.el ends here
index b22e72a95a3ab75f2c21ba644d6f44731d5394d3..efba482915bcda78ab8e9ef4e2226f6b4b6552da 100644 (file)
   "A `company-mode' completion back-end for tempo."
   (interactive (list 'interactive))
   (case command
-    ('interactive (company-begin-backend 'company-tempo
-                                         'company-tempo-insert))
-    ('prefix (or (car (tempo-find-match-string tempo-match-finder)) ""))
-    ('candidates (all-completions arg (tempo-build-collection)))
-    ('meta (company-tempo-meta arg))
-    ('require-match t)
-    ('sorted t)))
+    (interactive (company-begin-backend 'company-tempo
+                                        'company-tempo-insert))
+    (prefix (or (car (tempo-find-match-string tempo-match-finder)) ""))
+    (candidates (all-completions arg (tempo-build-collection)))
+    (meta (company-tempo-meta arg))
+    (require-match t)
+    (sorted t)))
 
 (provide 'company-tempo)
 ;;; company-tempo.el ends here
index 396cef87253a14d619d72069785a98f174341e71..884a78d2f705f58726e4b50f20936830b0dc97a1 100644 (file)
@@ -100,14 +100,14 @@ valid in most contexts."
   "A `company-mode' completion back-end for Xcode projects."
   (interactive (list 'interactive))
   (case command
-    ('interactive (company-begin-backend 'company-xcode))
-    ('prefix (and company-xcode-xcodeindex-executable
+    (interactive (company-begin-backend 'company-xcode))
+    (prefix (and company-xcode-xcodeindex-executable
+                 (company-xcode-tags)
+                 (not (company-in-string-or-comment))
+                 (or (company-grab-symbol) 'stop)))
+    (candidates (let ((completion-ignore-case nil))
                   (company-xcode-tags)
-                  (not (company-in-string-or-comment))
-                  (or (company-grab-symbol) 'stop)))
-    ('candidates (let ((completion-ignore-case nil))
-                   (company-xcode-tags)
-                   (all-completions arg (company-xcode-tags))))))
+                  (all-completions arg (company-xcode-tags))))))
 
 
 (provide 'company-xcode)
index 4641ab991d250c3d62589ca670479322939013ed..d001a9ffb5f7a2458a07799500b6d8da03129144 100644 (file)
 ;;
 ;; (defun company-my-backend (command &optional arg &rest ignored)
 ;;   (case command
-;;     ('prefix (when (looking-back "foo\\>")
-;;                (match-string 0)))
-;;     ('candidates (list "foobar" "foobaz" "foobarbaz"))
-;;     ('meta (format "This value is named %s" arg))))
+;;     (prefix (when (looking-back "foo\\>")
+;;               (match-string 0)))
+;;     (candidates (list "foobar" "foobaz" "foobarbaz"))
+;;     (meta (format "This value is named %s" arg))))
 ;;
 ;; Sometimes it is a good idea to mix two back-ends together, for example to
 ;; enrich gtags with dabbrev-code results (to emulate local variables):
@@ -696,11 +696,11 @@ keymap during active completions (`company-active-map'):
 
 (defun company--multi-backend-adapter (backends command &rest args)
   (case command
-    ('candidates
+    (candidates
      (apply 'append (mapcar (lambda (backend) (apply backend command args))
                             backends)))
-    ('sorted nil)
-    ('duplicates t)
+    (sorted nil)
+    (duplicates t)
     (otherwise
      (let (value)
        (dolist (backend backends)
@@ -1801,8 +1801,8 @@ Returns a negative number if the tooltip should be displayed above point."
 (defun company-pseudo-tooltip-frontend (command)
   "A `company-mode' front-end similar to a tool-tip but based on overlays."
   (case command
-    ('pre-command (company-pseudo-tooltip-hide-temporarily))
-    ('post-command
+    (pre-command (company-pseudo-tooltip-hide-temporarily))
+    (post-command
      (let ((old-height (if (overlayp company-pseudo-tooltip-overlay)
                            (overlay-get company-pseudo-tooltip-overlay
                                         'company-height)
@@ -1814,11 +1814,11 @@ Returns a negative number if the tooltip should be displayed above point."
          (company-pseudo-tooltip-show-at-point (- (point)
                                                   (length company-prefix)))))
      (company-pseudo-tooltip-unhide))
-    ('hide (company-pseudo-tooltip-hide)
-           (setq company-tooltip-offset 0))
-    ('update (when (overlayp company-pseudo-tooltip-overlay)
-               (company-pseudo-tooltip-edit company-candidates
-                                            company-selection)))))
+    (hide (company-pseudo-tooltip-hide)
+          (setq company-tooltip-offset 0))
+    (update (when (overlayp company-pseudo-tooltip-overlay)
+              (company-pseudo-tooltip-edit company-candidates
+                                           company-selection)))))
 
 (defun company-pseudo-tooltip-unless-just-one-frontend (command)
   "`company-pseudo-tooltip-frontend', but not shown for single candidates."
@@ -1866,9 +1866,9 @@ Returns a negative number if the tooltip should be displayed above point."
 (defun company-preview-frontend (command)
   "A `company-mode' front-end showing the selection as if it had been inserted."
   (case command
-    ('pre-command (company-preview-hide))
-    ('post-command (company-preview-show-at-point (point)))
-    ('hide (company-preview-hide))))
+    (pre-command (company-preview-hide))
+    (post-command (company-preview-show-at-point (point)))
+    (hide (company-preview-hide))))
 
 (defun company-preview-if-just-one-frontend (command)
   "`company-preview-frontend', but only shown for single candidates."
@@ -1966,20 +1966,20 @@ Returns a negative number if the tooltip should be displayed above point."
 (defun company-echo-frontend (command)
   "A `company-mode' front-end showing the candidates in the echo area."
   (case command
-    ('post-command (company-echo-show-soon 'company-echo-format))
-    ('hide (company-echo-hide))))
+    (post-command (company-echo-show-soon 'company-echo-format))
+    (hide (company-echo-hide))))
 
 (defun company-echo-strip-common-frontend (command)
   "A `company-mode' front-end showing the candidates in the echo area."
   (case command
-    ('post-command (company-echo-show-soon 'company-echo-strip-common-format))
-    ('hide (company-echo-hide))))
+    (post-command (company-echo-show-soon 'company-echo-strip-common-format))
+    (hide (company-echo-hide))))
 
 (defun company-echo-metadata-frontend (command)
   "A `company-mode' front-end showing the documentation in the echo area."
   (case command
-    ('post-command (company-echo-show-when-idle 'company-fetch-metadata))
-    ('hide (company-echo-hide))))
+    (post-command (company-echo-show-when-idle 'company-fetch-metadata))
+    (hide (company-echo-hide))))
 
 ;; templates ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;