emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ELPA-diffs] ELPA branch, master, updated. 0931fc611712fa1a539cefa0ce637


From: Dmitry Gutov
Subject: [ELPA-diffs] ELPA branch, master, updated. 0931fc611712fa1a539cefa0ce637af514a81058
Date: Sun, 06 Oct 2013 04:01:40 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "ELPA".

The branch, master has been updated
       via  0931fc611712fa1a539cefa0ce637af514a81058 (commit)
       via  d15b59463d24a60d85f461c968e91f1b068eba87 (commit)
       via  0a16ae8e60cfe875f513fa20a80e5b49004b4bd7 (commit)
       via  cf91107e579519087db5fc64ad95222e15440646 (commit)
       via  206007c79cdffac04dcd30a8eeb6f6ad25536ddf (commit)
       via  114ba5b76022f2980a7335e5224142adde59a6c4 (commit)
       via  4e41b037e34dba6b87033da7639094b49aab4a89 (commit)
       via  2b8eef81ee50084e16d31fc2c01e1d014bebdea8 (commit)
      from  f251e4496a5776c1980a81ddd7a299509c701e4a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 0931fc611712fa1a539cefa0ce637af514a81058
Merge: f251e44 d15b594
Author: Dmitry Gutov <address@hidden>
Date:   Sun Oct 6 07:01:08 2013 +0300

    Sync from company/master


commit d15b59463d24a60d85f461c968e91f1b068eba87
Author: Dmitry Gutov <address@hidden>
Date:   Sun Sep 29 02:26:24 2013 +0300

    Bump the version
    
    Oops, forgot to do that the last time

diff --git a/NEWS.md b/NEWS.md
index 1e2902a..8c43c58 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,6 +1,6 @@
 # History of user-visible changes
 
-## Next
+## 2013-09-28 (0.6.12)
 
 * Default value of `company-begin-commands` changed to `(self-insert-command)`.
 * Futher improvement in `org-indent-mode` compatibility.
diff --git a/company.el b/company.el
index 1ddcf47..ec0f2b3 100644
--- a/company.el
+++ b/company.el
@@ -4,7 +4,7 @@
 
 ;; Author: Nikolaj Schumacher
 ;; Maintainer: Dmitry Gutov <address@hidden>
-;; Version: 0.6.10
+;; Version: 0.6.12
 ;; Keywords: abbrev, convenience, matching
 ;; URL: http://company-mode.github.io/
 ;; Compatibility: GNU Emacs 22.x, GNU Emacs 23.x, GNU Emacs 24.x

commit 0a16ae8e60cfe875f513fa20a80e5b49004b4bd7
Author: Dmitry Gutov <address@hidden>
Date:   Sat Sep 28 19:09:47 2013 +0300

    Change default `company-begin-commands' value to be more conservative

diff --git a/NEWS.md b/NEWS.md
index e1874a0..1e2902a 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,5 +1,10 @@
 # History of user-visible changes
 
+## Next
+
+* Default value of `company-begin-commands` changed to `(self-insert-command)`.
+* Futher improvement in `org-indent-mode` compatibility.
+
 ## 2013-08-18 (0.6.11)
 
 * `company-template-c-like-templatify` removes all text after closing paren, 
for
diff --git a/company.el b/company.el
index 253dcc0..1ddcf47 100644
--- a/company.el
+++ b/company.el
@@ -408,7 +408,7 @@ immediately when a prefix of 
`company-minimum-prefix-length' is reached."
                  (const :tag "immediate (t)" t)
                  (number :tag "seconds")))
 
-(defcustom company-begin-commands t
+(defcustom company-begin-commands '(self-insert-command)
   "A list of commands following which company will start completing.
 If this is t, it will complete after any command.  See `company-idle-delay'.
 

commit cf91107e579519087db5fc64ad95222e15440646
Author: Dmitry Gutov <address@hidden>
Date:   Mon Sep 23 05:13:54 2013 +0300

    company-files-complete: Filter candidates by prefix

diff --git a/company-files.el b/company-files.el
index 3b7a7d0..b897e3d 100644
--- a/company-files.el
+++ b/company-files.el
@@ -71,7 +71,8 @@
                           (unless (eq (aref file (1- (length file))) ?/) "/")
                           child) candidates))))
       (setq company-files-completion-cache (cons dir (nreverse candidates))))
-    (cdr company-files-completion-cache)))
+    (all-completions prefix
+                     (cdr company-files-completion-cache))))
 
 ;;;###autoload
 (defun company-files (command &optional arg &rest ignored)

commit 206007c79cdffac04dcd30a8eeb6f6ad25536ddf
Author: Dmitry Gutov <address@hidden>
Date:   Mon Sep 23 03:36:31 2013 +0300

    * company-untabify: Rename to `company-plainify'.
    * company-modify-line: Move `line-prefix' logic to `company-plainify'.
    
    Fix #24, take four

diff --git a/company-tests.el b/company-tests.el
index 1031d0b..870ad2b 100644
--- a/company-tests.el
+++ b/company-tests.el
@@ -217,15 +217,23 @@
     (put-text-property (point-min) (point-max) 'line-prefix "  ")
     (should (= (company--column) 2))))
 
-(ert-deftest company-modify-line-with-line-prefix ()
-  (let ((str (propertize "foobar" 'line-prefix "-*-")))
+(ert-deftest company-plainify ()
+  (let ((tab-width 8))
+    (should (equal-including-properties
+             (company-plainify "\tabc\td\t")
+             (concat "        "
+                     "abc     "
+                     "d       "))))
+  (should (equal-including-properties
+           (company-plainify (propertize "foobar" 'line-prefix "-*-"))
+           "-*-foobar")))
+
+(ert-deftest company-modify-line ()
+  (let ((str "-*-foobar"))
     (should (equal-including-properties
              (company-modify-line str "zz" 4)
              "-*-fzzbar"))
     (should (equal-including-properties
-             (company-modify-line str "zzxx" 1)
-             "-zzxxobar"))
-    (should (equal-including-properties
              (company-modify-line str "xx" 0)
              "xx-foobar"))
     (should (equal-including-properties
diff --git a/company.el b/company.el
index dff2e06..253dcc0 100644
--- a/company.el
+++ b/company.el
@@ -1637,7 +1637,11 @@ Example: \(company-begin-with '\(\"foo\" \"foobar\" 
\"foobarbaz\"\)\)"
 (defsubst company-round-tab (arg)
   (* (/ (+ arg tab-width) tab-width) tab-width))
 
-(defun company-untabify (str)
+(defun company-plainify (str)
+  (let ((prefix (get-text-property 0 'line-prefix str)))
+    (when prefix ; Keep the original value unmodified, for no special reason.
+      (setq str (concat prefix str))
+      (remove-text-properties 0 (length str) '(line-prefix) str)))
   (let* ((pieces (split-string str "\t"))
          (copy pieces))
     (while (cdr copy)
@@ -1698,10 +1702,6 @@ Example: \(company-begin-with '\(\"foo\" \"foobar\" 
\"foobarbaz\"\)\)"
     (nreverse lines)))
 
 (defun company-modify-line (old new offset)
-  (let ((prefix (get-text-property 0 'line-prefix old)))
-    (when prefix ; Keep the original value unmodified, for no special reason.
-      (setq old (concat prefix old))
-      (remove-text-properties 0 (length old) '(line-prefix) old)))
   (concat (company-safe-substring old 0 offset)
           new
           (company-safe-substring old (+ offset (length new)))))
@@ -1831,7 +1831,7 @@ Returns a negative number if the tooltip should be 
displayed above point."
                     (move-to-window-line (+ row (abs height)))
                     (point)))
              (ov (make-overlay beg end))
-             (args (list (mapcar 'company-untabify
+             (args (list (mapcar 'company-plainify
                                  (company-buffer-lines beg end))
                          column nl above)))
 

commit 114ba5b76022f2980a7335e5224142adde59a6c4
Author: Dmitry Gutov <address@hidden>
Date:   Mon Sep 23 02:03:23 2013 +0300

    company--column: Account for line-prefix even at bol
    
    Again, for org-indent-mode.

diff --git a/company-tests.el b/company-tests.el
index 79d1f02..1031d0b 100644
--- a/company-tests.el
+++ b/company-tests.el
@@ -210,6 +210,13 @@
     (put-text-property (point-min) (point) 'line-prefix "  ")
     (should (= (company--column) 5))))
 
+(ert-deftest company-column-wth-line-prefix-on-empty-line ()
+  (with-temp-buffer
+    (insert "\n")
+    (forward-char -1)
+    (put-text-property (point-min) (point-max) 'line-prefix "  ")
+    (should (= (company--column) 2))))
+
 (ert-deftest company-modify-line-with-line-prefix ()
   (let ((str (propertize "foobar" 'line-prefix "-*-")))
     (should (equal-including-properties
diff --git a/company.el b/company.el
index 40fdfa7..dff2e06 100644
--- a/company.el
+++ b/company.el
@@ -598,14 +598,13 @@ means that `company-mode' is always turned on except in 
`message-mode' buffers."
 (defun company--column (&optional pos)
   (save-excursion
     (when pos (goto-char pos))
-    (let ((pt (point)))
-      (save-restriction
-        (+ (save-excursion
-             (vertical-motion 0)
-             (narrow-to-region (point) pt)
-             (let ((prefix (get-text-property (point) 'line-prefix)))
-               (if prefix (length prefix) 0)))
-           (current-column))))))
+    (save-restriction
+      (+ (save-excursion
+           (vertical-motion 0)
+           (narrow-to-region (point) (point-max))
+           (let ((prefix (get-text-property (point) 'line-prefix)))
+             (if prefix (length prefix) 0)))
+         (current-column)))))
 
 (defun company--row (&optional pos)
   (save-excursion

commit 4e41b037e34dba6b87033da7639094b49aab4a89
Author: Stefan Monnier <address@hidden>
Date:   Fri Sep 6 05:52:06 2013 +0300

    * packages/company/company-capf.el (company-capf): Add preliminary support 
for
    doc-buffer, meta, location, and require-match.

diff --git a/company-capf.el b/company-capf.el
index 60e4494..2d20bee 100644
--- a/company-capf.el
+++ b/company-capf.el
@@ -35,40 +35,47 @@
   "`company-mode' back-end using `completion-at-point-functions'.
 Requires Emacs 24.1 or newer."
   (interactive (list 'interactive))
-  (case command
-    (interactive (company-begin-backend 'company-capf))
-    (prefix
+  (pcase command
+    (`interactive (company-begin-backend 'company-capf))
+    (`prefix
      (let ((res (company--capf-data)))
        (when res
          (if (> (nth 2 res) (point))
              'stop
            (buffer-substring-no-properties (nth 1 res) (point))))))
-    (candidates
+    (`candidates
      (let ((res (company--capf-data)))
        (when res
          (let* ((table (nth 3 res))
                 (pred (plist-get (nthcdr 4 res) :predicate))
                 (meta (completion-metadata
-                       (buffer-substring (nth 1 res) (nth 2 res))
-                       table pred))
+                      (buffer-substring (nth 1 res) (nth 2 res))
+                      table pred))
                 (sortfun (cdr (assq 'display-sort-function meta)))
                 (candidates (all-completions arg table pred)))
            (if sortfun (funcall sortfun candidates) candidates)))))
-    (sorted
+    (`sorted
      (let ((res (company--capf-data)))
        (when res
          (let ((meta (completion-metadata
                       (buffer-substring (nth 1 res) (nth 2 res))
                       (nth 3 res) (plist-get (nthcdr 4 res) :predicate))))
            (cdr (assq 'display-sort-function meta))))))
-    (duplicates nil)     ;Don't bother.
-    (no-cache t)         ;FIXME: Improve!
-    (meta nil)           ;FIXME: Return one-line docstring for `arg'.
-    (doc-buffer nil)     ;FIXME: Return help buffer for `arg'.
-    (location nil)       ;FIXME: Return (BUF . POS) or (FILE . LINENB) of 
`arg'.
-    (require-match nil)  ;Front-ends should also have a say in this.
-    (init nil)       ;Don't bother: plenty of other ways to initialize the 
code.
-    (post-completion
+    (`duplicates nil) ;Don't bother.
+    (`no-cache t)     ;FIXME: Improve!
+    (`meta
+     (let ((f (plist-get (nthcdr 4 (company--capf-data)) :company-docsig)))
+       (when f (funcall f arg))))
+    (`doc-buffer
+     (let ((f (plist-get (nthcdr 4 (company--capf-data)) :company-doc-buffer)))
+       (when f (funcall f arg))))
+    (`location
+     (let ((f (plist-get (nthcdr 4 (company--capf-data)) :company-location)))
+       (when f (funcall f arg))))
+    (`require-match
+     (plist-get (nthcdr 4 (company--capf-data)) :company-require-match))
+    (`init nil)      ;Don't bother: plenty of other ways to initialize the 
code.
+    (`post-completion
      (let* ((res (company--capf-data))
             (exit-function (plist-get (nthcdr 4 res) :exit-function)))
        (if exit-function

commit 2b8eef81ee50084e16d31fc2c01e1d014bebdea8
Author: Stefan Monnier <address@hidden>
Date:   Fri Sep 6 02:24:27 2013 +0300

    * packages/company/company-cmake.el: Fix up copyright.  Require CL.
    * packages/company/company-template.el (company-template--buffer-templates):
      Declare before first use.
    * packages/company/company-eclim.el (json-array-type): Declare 
json-array-type.
      (company-eclim--candidates): Remove unused var `project-name'.

diff --git a/company-cmake.el b/company-cmake.el
index 0c96eb6..34359dc 100644
--- a/company-cmake.el
+++ b/company-cmake.el
@@ -1,24 +1,22 @@
 ;;; company-cmake.el --- company-mode completion back-end for CMake
 
-;; Copyright (C) 2013  Chen Bin
+;; Copyright (C) 2013  Free Software Foundation, Inc.
 
 ;; Author: Chen Bin <chenbin DOT sh AT gmail>
 ;; Version: 0.1
 
-;; This file is NOT part of GNU Emacs.
-
-;; GNU Emacs is free software: you can redistribute it and/or modify
+;; This program is free software: you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
 ;; the Free Software Foundation, either version 3 of the License, or
 ;; (at your option) any later version.
 
-;; GNU Emacs is distributed in the hope that it will be useful,
+;; This program is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 ;;; Commentary:
 ;;
@@ -26,6 +24,8 @@
 ;; commands used by CMake.  And their descriptions.
 
 ;;; Code:
+
+(eval-when-compile (require 'cl))
 (require 'company)
 
 (defgroup company-cmake nil
diff --git a/company-eclim.el b/company-eclim.el
index 05e609c..70db7c3 100644
--- a/company-eclim.el
+++ b/company-eclim.el
@@ -70,6 +70,7 @@ eclim can only complete correctly when the buffer has been 
saved."
 (make-variable-buffer-local 'company-eclim--doc)
 
 (declare-function json-read "json")
+(defvar json-array-type)
 
 (defun company-eclim--call-process (&rest args)
   (let ((coding-system-for-read 'utf-8)
@@ -109,8 +110,7 @@ eclim can only complete correctly when the buffer has been 
saved."
 (defun company-eclim--candidates (prefix)
   (interactive "d")
   (let ((project-file (file-relative-name buffer-file-name
-                                          (company-eclim--project-dir)))
-        (project-name (company-eclim--project-name)))
+                                          (company-eclim--project-dir))))
     (when company-eclim-auto-save
       (when (buffer-modified-p)
         (basic-save-buffer))
diff --git a/company-template.el b/company-template.el
index 5c72ac8..ea1db86 100644
--- a/company-template.el
+++ b/company-template.el
@@ -1,6 +1,6 @@
 ;;; company-template.el
 
-;; Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 2009, 2010, 2013 Free Software Foundation, Inc.
 
 ;; Author: Nikolaj Schumacher
 
@@ -34,6 +34,9 @@
     (define-key keymap [tab] 'company-template-forward-field)
     keymap))
 
+(defvar company-template--buffer-templates nil)
+(make-variable-buffer-local 'company-template--buffer-templates)
+
 ;; interactive 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 (defun company-template-templates-at (pos)
@@ -73,9 +76,6 @@
 
 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
-(defvar company-template--buffer-templates nil)
-(make-variable-buffer-local 'company-template--buffer-templates)
-
 (defun company-template-declare-template (beg end)
   (let ((ov (make-overlay beg end)))
     ;; (overlay-put ov 'face 'highlight)
@@ -134,7 +134,7 @@ Leave point at the end of the field."
 
 ;; hooks 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
-(defun company-template-insert-hook (ovl after-p &rest ignore)
+(defun company-template-insert-hook (ovl after-p &rest _ignore)
   "Called when a snippet input prompt is modified."
   (unless after-p
     (company-template-remove-field ovl t)))

-----------------------------------------------------------------------

Summary of changes:
 packages/company/NEWS.md          |    5 +++++
 packages/company/company-files.el |    3 ++-
 packages/company/company-tests.el |   25 ++++++++++++++++++++-----
 packages/company/company.el       |   31 +++++++++++++++----------------
 4 files changed, 42 insertions(+), 22 deletions(-)


hooks/post-receive
-- 
ELPA



reply via email to

[Prev in Thread] Current Thread [Next in Thread]