[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 1c516df 01/29: Increase the minimum Emacs version dependen
From: |
Dmitry Gutov |
Subject: |
[elpa] master 1c516df 01/29: Increase the minimum Emacs version dependency |
Date: |
Tue, 28 Mar 2017 20:50:33 -0400 (EDT) |
branch: master
commit 1c516df435577b2c85995c1cbe80a9968d9ae6a0
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>
Increase the minimum Emacs version dependency
Fixes #604.
---
NEWS.md | 4 ++++
company.el | 47 ++++++++++++++---------------------------------
2 files changed, 18 insertions(+), 33 deletions(-)
diff --git a/NEWS.md b/NEWS.md
index 32d05b3..b3d9697 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,5 +1,9 @@
# History of user-visible changes
+## Next
+
+* The minimum required version of Emacs is now 24.3.
+
## 2016-11-12 (0.9.1)
* `company-indent-or-complete-common` skips trying to indent if
diff --git a/company.el b/company.el
index 2639caa..7fde671 100644
--- a/company.el
+++ b/company.el
@@ -7,7 +7,7 @@
;; URL: http://company-mode.github.io/
;; Version: 0.9.2
;; Keywords: abbrev, convenience, matching
-;; Package-Requires: ((emacs "24.1") (cl-lib "0.5"))
+;; Package-Requires: ((emacs "24.3"))
;; This file is part of GNU Emacs.
@@ -63,28 +63,9 @@
(require 'newcomment)
(require 'pcase)
-;; FIXME: Use `user-error'.
-(add-to-list 'debug-ignored-errors "^.* frontend cannot be used twice$")
-(add-to-list 'debug-ignored-errors "^Echo area cannot be used twice$")
-(add-to-list 'debug-ignored-errors "^No \\(document\\|loc\\)ation available$")
-(add-to-list 'debug-ignored-errors "^Company not ")
-(add-to-list 'debug-ignored-errors "^No candidate number ")
-(add-to-list 'debug-ignored-errors "^Cannot complete at point$")
-(add-to-list 'debug-ignored-errors "^No other backend$")
-
;;; Compatibility
(eval-and-compile
- ;; `defvar-local' for Emacs 24.2 and below
- (unless (fboundp 'defvar-local)
- (defmacro defvar-local (var val &optional docstring)
- "Define VAR as a buffer-local variable with default value VAL.
-Like `defvar' but additionally marks the variable as being automatically
-buffer-local wherever it is set."
- (declare (debug defvar) (doc-string 3))
- `(progn
- (defvar ,var ,val ,docstring)
- (make-variable-buffer-local ',var))))
-
+ ;; Defined in Emacs 24.4
(unless (fboundp 'string-suffix-p)
(defun string-suffix-p (suffix string &optional ignore-case)
"Return non-nil if SUFFIX is a suffix of STRING.
@@ -206,13 +187,13 @@ attention to case differences."
(memq 'company-pseudo-tooltip-frontend value))
(and (memq
'company-pseudo-tooltip-unless-just-one-frontend-with-delay value)
(memq 'company-pseudo-tooltip-unless-just-one-frontend
value)))
- (error "Pseudo tooltip frontend cannot be used more than once"))
+ (user-error "Pseudo tooltip frontend cannot be used more than once"))
(and (memq 'company-preview-if-just-one-frontend value)
(memq 'company-preview-frontend value)
- (error "Preview frontend cannot be used twice"))
+ (user-error "Preview frontend cannot be used twice"))
(and (memq 'company-echo value)
(memq 'company-echo-metadata-frontend value)
- (error "Echo area cannot be used twice"))
+ (user-error "Echo area cannot be used twice"))
;; Preview must come last.
(dolist (f '(company-preview-if-just-one-frontend
company-preview-frontend))
(when (cdr (memq f value))
@@ -795,7 +776,7 @@ means that `company-mode' is always turned on except in
`message-mode' buffers."
(defsubst company-assert-enabled ()
(unless company-mode
(company-uninstall-map)
- (error "Company not enabled")))
+ (user-error "Company not enabled")))
;;; keymaps
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -1437,7 +1418,7 @@ prefix match (same case) will be prioritized."
(when (ignore-errors (company-begin-backend backend))
(cl-return t))))
(unless company-candidates
- (error "No other backend")))
+ (user-error "No other backend")))
(defun company-require-match-p ()
(let ((backend-value (company-call-backend 'require-match)))
@@ -1782,7 +1763,7 @@ each one wraps a part of the input string."
company-search-filtering
(lambda (candidate) (string-match re candidate))))
(cc (company-calculate-candidates company-prefix)))
- (unless cc (error "No match"))
+ (unless cc (user-error "No match"))
(company-update-candidates cc)))
(defun company--search-update-string (new)
@@ -1795,7 +1776,7 @@ each one wraps a part of the input string."
(defun company--search-assert-input ()
(company--search-assert-enabled)
(when (string= company-search-string "")
- (error "Empty search string")))
+ (user-error "Empty search string")))
(defun company-search-repeat-forward ()
"Repeat the incremental search in completion candidates forward."
@@ -1922,7 +1903,7 @@ Don't start this directly, use
`company-search-candidates' or
(company-assert-enabled)
(unless company-search-mode
(company-uninstall-map)
- (error "Company not in search mode")))
+ (user-error "Company not in search mode")))
(defun company-search-candidates ()
"Start searching the completion candidates incrementally.
@@ -2159,7 +2140,7 @@ character, stripping the modifiers. That character must
be a digit."
(when (company-manual-begin)
(and (or (< n 1) (> n (- company-candidates-length
company-tooltip-offset)))
- (error "No candidate number %d" n))
+ (user-error "No candidate number %d" n))
(cl-decf n)
(company-finish (nth (+ n company-tooltip-offset)
company-candidates))))
@@ -2251,7 +2232,7 @@ character, stripping the modifiers. That character must
be a digit."
(company--electric-do
(let* ((selected (nth company-selection company-candidates))
(doc-buffer (or (company-call-backend 'doc-buffer selected)
- (error "No documentation available")))
+ (user-error "No documentation available")))
start)
(when (consp doc-buffer)
(setq start (cdr doc-buffer)
@@ -2268,7 +2249,7 @@ character, stripping the modifiers. That character must
be a digit."
(company--electric-do
(let* ((selected (nth company-selection company-candidates))
(location (company-call-backend 'location selected))
- (pos (or (cdr location) (error "No location available")))
+ (pos (or (cdr location) (user-error "No location available")))
(buffer (or (and (bufferp (car location)) (car location))
(find-file-noselect (car location) t))))
(setq other-window-scroll-buffer (get-buffer buffer))
@@ -2305,7 +2286,7 @@ character, stripping the modifiers. That character must
be a digit."
(setq company-backend backend)
;; Return non-nil if active.
(or (company-manual-begin)
- (error "Cannot complete at point")))
+ (user-error "Cannot complete at point")))
(defun company-begin-with (candidates
&optional prefix-length require-match callback)
- [elpa] master 92b0bf7 06/29: Use pipes instead of PTYs to receive output from Clang, (continued)
- [elpa] master 92b0bf7 06/29: Use pipes instead of PTYs to receive output from Clang, Dmitry Gutov, 2017/03/28
- [elpa] master 6f2ae7f 09/29: Merge pull request #621 from juergenhoetzel/use-pipes, Dmitry Gutov, 2017/03/28
- [elpa] master 21357f6 11/29: Update NEWS, Dmitry Gutov, 2017/03/28
- [elpa] master bc2ce4e 18/29: Support Tramp in company-gtags, Dmitry Gutov, 2017/03/28
- [elpa] master b1127da 16/29: Don't show (anonymous) as function annotation, or in argument expansions, Dmitry Gutov, 2017/03/28
- [elpa] master 31063e1 20/29: Fix company-auto-complete and electric-pair-mode compatibility, Dmitry Gutov, 2017/03/28
- [elpa] master cf98238 04/29: Preview the common part of completion candidates, Dmitry Gutov, 2017/03/28
- [elpa] master 40e2200 07/29: Preview func take the exact common part, Dmitry Gutov, 2017/03/28
- [elpa] master a2ec806 12/29: Use tramp-aware `start-file-process' to start completion process, Dmitry Gutov, 2017/03/28
- [elpa] master a4d0421 05/29: Modified for the original frontends to work, Dmitry Gutov, 2017/03/28
- [elpa] master 1c516df 01/29: Increase the minimum Emacs version dependency,
Dmitry Gutov <=
- [elpa] master c494fc6 17/29: Fix a failing test, Dmitry Gutov, 2017/03/28
- [elpa] master ec12e27 27/29: Merge branch 'master' of github.com:company-mode/company-mode, Dmitry Gutov, 2017/03/28
- [elpa] master f149940 28/29: Release 0.9.3, Dmitry Gutov, 2017/03/28
- [elpa] master ce42fcf 23/29: Update copyright years, Dmitry Gutov, 2017/03/28
- [elpa] master 7bd93b8 15/29: Merge pull request #629 from juergenhoetzel/tramp-aware-clang, Dmitry Gutov, 2017/03/28
- [elpa] master 51f3885 10/29: Merge pull request #618 from kkatsuyuki/preview-common, Dmitry Gutov, 2017/03/28
- [elpa] master b74f329 22/29: Track the changes in window width, Dmitry Gutov, 2017/03/28
- [elpa] master 0affd93 21/29: Fix the new test to work in Emacs 24, Dmitry Gutov, 2017/03/28
- [elpa] master f0ff54e 13/29: company-diag: Also show completions if prefix is a cons, Dmitry Gutov, 2017/03/28
- [elpa] master e19e53e 19/29: Remote the overriding-terminal-local-map check, Dmitry Gutov, 2017/03/28