]> code.delx.au - gnu-emacs/commitdiff
Merge branch 'project-next'
authorDmitry Gutov <dgutov@yandex.ru>
Tue, 10 Nov 2015 00:47:46 +0000 (02:47 +0200)
committerDmitry Gutov <dgutov@yandex.ru>
Tue, 10 Nov 2015 00:47:46 +0000 (02:47 +0200)
1  2 
lisp/progmodes/elisp-mode.el
lisp/vc/vc.el
test/automated/cl-lib-tests.el

index 8ea17b74ddb80a40487a01f3a24b833af5036857,29257cdd4ab708ca66d8e0700055527ef831a902..a19542fb2040d597a40339598064080e4ae884ec
@@@ -230,7 -230,7 +230,7 @@@ Blank lines separate paragraphs.  Semic
    :group 'lisp
    (defvar xref-find-function)
    (defvar xref-identifier-completion-table-function)
-   (defvar project-search-path-function)
+   (defvar project-library-roots-function)
    (lisp-mode-variables nil nil 'elisp)
    (add-hook 'after-load-functions #'elisp--font-lock-flush-elisp-buffers)
    (setq-local electric-pair-text-pairs
    (setq-local xref-find-function #'elisp-xref-find)
    (setq-local xref-identifier-completion-table-function
                #'elisp--xref-identifier-completion-table)
-   (setq-local project-search-path-function #'elisp-search-path)
+   (setq-local project-library-roots-function #'elisp-library-roots)
    (add-hook 'completion-at-point-functions
              #'elisp-completion-at-point nil 'local))
  
@@@ -801,7 -801,7 +801,7 @@@ non-nil result supercedes the xrefs pro
  
      xrefs))
  
- (declare-function project-search-path "project")
+ (declare-function project-library-roots "project")
  (declare-function project-current "project")
  
  (defun elisp--xref-find-references (symbol)
    (cl-mapcan
     (lambda (dir)
       (xref-collect-references symbol dir))
-    (project-search-path (project-current))))
+    (let ((pr (project-current t)))
+      (append
+       (project-roots pr)
+       (project-library-roots pr)))))
  
  (defun elisp--xref-find-apropos (regexp)
    (apply #'nconc
  (cl-defmethod xref-location-group ((l xref-elisp-location))
    (xref-elisp-location-file l))
  
- (defun elisp-search-path ()
+ (defun elisp-library-roots ()
    (defvar package-user-dir)
    (cons package-user-dir load-path))
  
@@@ -1120,6 -1123,7 +1123,6 @@@ character).
       (eval (eval-sexp-add-defvars (elisp--preceding-sexp)) lexical-binding)
       eval-last-sexp-arg-internal)))
  
 -
  (defun elisp--eval-last-sexp-print-value (value &optional eval-last-sexp-arg-internal)
    (let ((unabbreviated (let ((print-length nil) (print-level nil))
                         (prin1-to-string value)))
diff --combined lisp/vc/vc.el
index 28ddeb3d58b857a58407668898b1731025f604b9,0a2169534e569565427b44af289e1ec92a18e424..efd816b4f0ebe9f53d2991ba7e88a783b5031351
@@@ -1433,8 -1433,9 +1433,9 @@@ Argument BACKEND is the backend you ar
     (lambda (str)
       ;; Commented or empty lines.
       (string-match-p "\\`\\(?:#\\|[ \t\r\n]*\\'\\)" str))
-    (vc--read-lines
-     (vc-call-backend backend 'find-ignore-file file))))
+    (let ((file (vc-call-backend backend 'find-ignore-file file)))
+      (and (file-exists-p file)
+           (vc--read-lines file)))))
  
  (defun vc--read-lines (file)
    "Return a list of lines of FILE."
@@@ -2067,13 -2068,6 +2068,13 @@@ changes from the current branch.
      (smerge-mode 1)
      (message "File contains conflicts.")))
  
 +;;;###autoload
 +(defun vc-message-unresolved-conflicts (filename)
 +  "Display a message indicating unresolved conflicts in FILENAME."
 +  ;; This enables all VC backends to give a standard, recognizeable
 +  ;; conflict message that indicates which file is conflicted.
 +  (message "There are unresolved conflicts in %s" filename))
 +
  ;;;###autoload
  (defalias 'vc-resolve-conflicts 'smerge-ediff)
  
index b31622fdc339cd40c43b1af936b2bb3fdd25f6e4,d6e6bef2db6652fa2145d4e9f78506b327fa0018..9b230db99e40867cf1429cf6eef41c55d23fec1c
        (should (equal (cl-set-difference b b) e))
        ;; Note: this test (and others) is sensitive to the order of the
        ;; result, which is not documented.
-       (should (equal (cl-set-difference a b) (list c2 "x" "" nil 'a)))
-       (should (equal (cl-set-difference b a) (list 'x 'y)))
+       (should (equal (cl-set-difference a b) (list 'a  nil "" "x" c2)))
+       (should (equal (cl-set-difference b a) (list 'y 'x)))
  
        ;; We aren't testing whether this is really using `eq' rather than `eql'.
        (should (equal (cl-set-difference e e :test 'eq) e))
        (should (equal (cl-set-difference b e :test 'eq) b))
        (should (equal (cl-set-difference e b :test 'eq) e))
        (should (equal (cl-set-difference b b :test 'eq) e))
-       (should (equal (cl-set-difference a b :test 'eq) (list c2 "x" "" nil 'a)))
-       (should (equal (cl-set-difference b a :test 'eq) (list 'x 'y)))
+       (should (equal (cl-set-difference a b :test 'eq) (list 'a  nil "" "x" c2)))
+       (should (equal (cl-set-difference b a :test 'eq) (list 'y 'x)))
  
        (should (equal (cl-union e e) e))
        (should (equal (cl-union a e) a))
  
  (cl-defstruct (mystruct
                 (:constructor cl-lib--con-1 (&aux (abc 1)))
 -               (:constructor cl-lib--con-2 (&optional def)))
 +               (:constructor cl-lib--con-2 (&optional def) "Constructor docstring."))
 +  "General docstring."
    (abc 5 :readonly t) (def nil))
  (ert-deftest cl-lib-struct-accessors ()
    (let ((x (make-mystruct :abc 1 :def 2)))
                (`((cl-tag-slot) (abc 5 :readonly t)
                   (def . ,(or `nil `(nil))))
                 t)))))
 +(ert-deftest cl-lib-struct-constructors ()
 +  (should (equal (documentation 'cl-lib--con-2 t)
 +                 "Constructor docstring."))
 +  (should (mystruct-p (cl-lib--con-1)))
 +  (should (mystruct-p (cl-lib--con-2))))
  
  (ert-deftest cl-lib-arglist-performance ()
    ;; An `&aux' should not cause lambda's arglist to be turned into an &rest