diff --git a/elpa/async-20160425.551/async-autoloads.el b/elpa/async-20160513.128/async-autoloads.el similarity index 93% rename from elpa/async-20160425.551/async-autoloads.el rename to elpa/async-20160513.128/async-autoloads.el index 9a65f8f..db4528c 100644 --- a/elpa/async-20160425.551/async-autoloads.el +++ b/elpa/async-20160513.128/async-autoloads.el @@ -3,7 +3,7 @@ ;;; Code: (add-to-list 'load-path (or (file-name-directory #$) (car load-path))) -;;;### (autoloads nil "async" "async.el" (22303 19287 502173 365000)) +;;;### (autoloads nil "async" "async.el" (22387 29376 289753 380000)) ;;; Generated autoloads from async.el (autoload 'async-start-process "async" "\ @@ -68,8 +68,8 @@ returns nil. It can still be useful, however, as an argument to ;;;*** -;;;### (autoloads nil "async-bytecomp" "async-bytecomp.el" (22303 -;;;;;; 19287 498173 368000)) +;;;### (autoloads nil "async-bytecomp" "async-bytecomp.el" (22387 +;;;;;; 29376 281759 465000)) ;;; Generated autoloads from async-bytecomp.el (autoload 'async-byte-recompile-directory "async-bytecomp" "\ @@ -96,8 +96,8 @@ Async compilation of packages can be controlled by ;;;*** -;;;### (autoloads nil "dired-async" "dired-async.el" (22303 19287 -;;;;;; 486173 378000)) +;;;### (autoloads nil "dired-async" "dired-async.el" (22387 29376 +;;;;;; 261774 676000)) ;;; Generated autoloads from dired-async.el (defvar dired-async-mode nil "\ @@ -116,8 +116,8 @@ Do dired actions asynchronously. ;;;*** -;;;### (autoloads nil nil ("async-pkg.el" "smtpmail-async.el") (22303 -;;;;;; 19287 520307 139000)) +;;;### (autoloads nil nil ("async-pkg.el" "smtpmail-async.el") (22387 +;;;;;; 29376 315816 570000)) ;;;*** diff --git a/elpa/async-20160425.551/async-bytecomp.el b/elpa/async-20160513.128/async-bytecomp.el similarity index 84% rename from elpa/async-20160425.551/async-bytecomp.el rename to elpa/async-20160513.128/async-bytecomp.el index 54313c0..2c96da0 100644 --- a/elpa/async-20160425.551/async-bytecomp.el +++ b/elpa/async-20160513.128/async-bytecomp.el @@ -1,4 +1,4 @@ -;;; async-bytecomp.el --- Async functions to compile elisp files async +;;; async-bytecomp.el --- Compile elisp files asynchronously -*- lexical-binding: t -*- ;; Copyright (C) 2014-2016 Free Software Foundation, Inc. @@ -65,27 +65,27 @@ All *.elc files are systematically deleted before proceeding." ;; This happen when recompiling its own directory. (load "async") (let ((call-back - `(lambda (&optional ignore) - (if (file-exists-p async-byte-compile-log-file) - (let ((buf (get-buffer-create byte-compile-log-buffer)) - (n 0)) - (with-current-buffer buf - (goto-char (point-max)) - (let ((inhibit-read-only t)) - (insert-file-contents async-byte-compile-log-file) - (compilation-mode)) - (display-buffer buf) - (delete-file async-byte-compile-log-file) - (unless ,quiet - (save-excursion - (goto-char (point-min)) - (while (re-search-forward "^.*:Error:" nil t) - (cl-incf n))) - (if (> n 0) - (message "Failed to compile %d files in directory `%s'" n ,directory) - (message "Directory `%s' compiled asynchronously with warnings" ,directory))))) - (unless ,quiet - (message "Directory `%s' compiled asynchronously with success" ,directory)))))) + (lambda (&optional _ignore) + (if (file-exists-p async-byte-compile-log-file) + (let ((buf (get-buffer-create byte-compile-log-buffer)) + (n 0)) + (with-current-buffer buf + (goto-char (point-max)) + (let ((inhibit-read-only t)) + (insert-file-contents async-byte-compile-log-file) + (compilation-mode)) + (display-buffer buf) + (delete-file async-byte-compile-log-file) + (unless quiet + (save-excursion + (goto-char (point-min)) + (while (re-search-forward "^.*:Error:" nil t) + (cl-incf n))) + (if (> n 0) + (message "Failed to compile %d files in directory `%s'" n directory) + (message "Directory `%s' compiled asynchronously with warnings" directory))))) + (unless quiet + (message "Directory `%s' compiled asynchronously with success" directory)))))) (async-start `(lambda () (require 'bytecomp) diff --git a/elpa/async-20160425.551/async-pkg.el b/elpa/async-20160513.128/async-pkg.el similarity index 68% rename from elpa/async-20160425.551/async-pkg.el rename to elpa/async-20160513.128/async-pkg.el index ab58946..5f6d550 100644 --- a/elpa/async-20160425.551/async-pkg.el +++ b/elpa/async-20160513.128/async-pkg.el @@ -1,4 +1,4 @@ -(define-package "async" "20160425.551" "Asynchronous processing in Emacs" 'nil :keywords +(define-package "async" "20160513.128" "Asynchronous processing in Emacs" 'nil :keywords '("async") :url "http://elpa.gnu.org/packages/async.html") ;; Local Variables: diff --git a/elpa/async-20160425.551/async.el b/elpa/async-20160513.128/async.el similarity index 97% rename from elpa/async-20160425.551/async.el rename to elpa/async-20160513.128/async.el index 080fd34..3798c95 100644 --- a/elpa/async-20160425.551/async.el +++ b/elpa/async-20160513.128/async.el @@ -1,10 +1,10 @@ -;;; async.el --- Asynchronous processing in Emacs +;;; async.el --- Asynchronous processing in Emacs -*- lexical-binding: t -*- ;; Copyright (C) 2012-2016 Free Software Foundation, Inc. ;; Author: John Wiegley ;; Created: 18 Jun 2012 -;; Version: 1.6 +;; Version: 1.9 ;; Keywords: async ;; X-URL: https://github.com/jwiegley/emacs-async @@ -95,8 +95,8 @@ as follows: (unless async-debug (kill-buffer buf))))) -(defun async-when-done (proc &optional change) - "Process sentinal used to retrieve the value from the child process." +(defun async-when-done (proc &optional _change) + "Process sentinel used to retrieve the value from the child process." (when (eq 'exit (process-status proc)) (with-current-buffer (process-buffer proc) (let ((async-current-process proc)) @@ -201,7 +201,7 @@ its FINISH-FUNC is nil." (funcall async-callback args)) (async--transmit-sexp (car args) (list 'quote (cdr args)))))) -(defun async-receive (&rest args) +(defun async-receive () "Send the given messages to the asychronous Emacs PROCESS." (async--receive-sexp)) diff --git a/elpa/async-20160425.551/dired-async.el b/elpa/async-20160513.128/dired-async.el similarity index 69% rename from elpa/async-20160425.551/dired-async.el rename to elpa/async-20160513.128/dired-async.el index 18e86fc..d0de789 100644 --- a/elpa/async-20160425.551/dired-async.el +++ b/elpa/async-20160513.128/dired-async.el @@ -1,4 +1,4 @@ -;;; dired-async.el --- Copy/move/delete asynchronously in dired. +;;; dired-async.el --- Asynchronous dired actions -*- lexical-binding: t -*- ;; Copyright (C) 2012-2016 Free Software Foundation, Inc. @@ -44,7 +44,6 @@ (eval-when-compile (defvar async-callback)) -(defvar dired-async-operation nil) (defgroup dired-async nil "Copy rename files asynchronously from dired." @@ -72,6 +71,11 @@ Should take same args as `message'." "Face used for mode-line message." :group 'dired-async) +(defface dired-async-failures + '((t (:foreground "red"))) + "Face used for mode-line message." + :group 'dired-async) + (defface dired-async-mode-message '((t (:foreground "Gold"))) "Face used for `dired-async--modeline-mode' lighter." @@ -87,7 +91,7 @@ Should take same args as `message'." (unless dired-async--modeline-mode (let ((visible-bell t)) (ding)))) -(defun dired-async-mode-line-message (text &rest args) +(defun dired-async-mode-line-message (text face &rest args) "Notify end of operation in `mode-line'." (message nil) (let ((mode-line-format (concat @@ -95,7 +99,7 @@ Should take same args as `message'." (if args (apply #'format text args) text) - 'face 'dired-async-message)))) + 'face face)))) (force-mode-line-update) (sit-for 3) (force-mode-line-update))) @@ -110,28 +114,49 @@ Should take same args as `message'." (interactive) (let* ((processes (dired-async-processes)) (proc (car (last processes)))) - (delete-process proc) + (and proc (delete-process proc)) (unless (> (length processes) 1) (dired-async--modeline-mode -1)))) -(defun dired-async-after-file-create (len-flist) +(defun dired-async-after-file-create (total operation failures skipped) "Callback function used for operation handled by `dired-create-file'." (unless (dired-async-processes) ;; Turn off mode-line notification ;; only when last process end. (dired-async--modeline-mode -1)) - (when dired-async-operation + (when operation (if (file-exists-p dired-async-log-file) (progn - (pop-to-buffer (get-buffer-create "*dired async*")) - (erase-buffer) + (pop-to-buffer (get-buffer-create dired-log-buffer)) + (goto-char (point-max)) + (setq inhibit-read-only t) (insert "Error: ") (insert-file-contents dired-async-log-file) + (special-mode) + (shrink-window-if-larger-than-buffer) (delete-file dired-async-log-file)) (run-with-timer 0.1 nil - dired-async-message-function "Asynchronous %s of %s file(s) on %s file(s) done" - (car dired-async-operation) (cadr dired-async-operation) len-flist)))) + (lambda () + ;; First send error messages. + (cond (failures + (funcall dired-async-message-function + "%s failed for %d of %d file%s -- See *Dired log* buffer" + 'dired-async-failures + (car operation) (length failures) + total (dired-plural-s total))) + (skipped + (funcall dired-async-message-function + "%s: %d of %d file%s skipped -- See *Dired log* buffer" + 'dired-async-failures + (car operation) (length skipped) total + (dired-plural-s total)))) + ;; Finally send the success message. + (funcall dired-async-message-function + "Asynchronous %s of %s on %s file%s done" + 'dired-async-message + (car operation) (cadr operation) + total (dired-plural-s total))))))) (defun dired-async-maybe-kill-ftp () "Return a form to kill ftp process in child emacs." @@ -144,19 +169,16 @@ Should take same args as `message'." (buffer-name b)) b)))) (when buf (kill-buffer buf)))))) +(defvar overwrite-query) (defun dired-async-create-files (file-creator operation fn-list name-constructor - &optional marker-char) + &optional _marker-char) "Same as `dired-create-files' but asynchronous. See `dired-create-files' for the behavior of arguments." - (setq dired-async-operation nil) - (let (dired-create-files-failures - failures async-fn-list - skipped (success-count 0) - (total (length fn-list)) - callback) - (let (to overwrite-query - overwrite-backup-query) ; for dired-handle-overwrite + (setq overwrite-query nil) + (let ((total (length fn-list)) + failures async-fn-list skipped callback) + (let (to) (dolist (from fn-list) (setq to (funcall name-constructor from)) (if (equal to from) @@ -170,19 +192,12 @@ See `dired-create-files' for the behavior of arguments." (file-exists-p to))) (dired-overwrite-confirmed ; for dired-handle-overwrite (and overwrite - (let ((help-form '(format "\ + (let ((help-form `(format "\ Type SPC or `y' to overwrite file `%s', DEL or `n' to skip to next, ESC or `q' to not overwrite any of the remaining files, -`!' to overwrite all remaining files with no more questions." to))) - (dired-query 'overwrite-query - "Overwrite `%s'?" to)))) - ;; must determine if FROM is marked before file-creator - ;; gets a chance to delete it (in case of a move). - (actual-marker-char - (cond ((integerp marker-char) marker-char) - (marker-char (dired-file-marker from)) ; slow - (t nil)))) +`!' to overwrite all remaining files with no more questions." ,to))) + (dired-query 'overwrite-query "Overwrite `%s'?" to))))) ;; Handle the `dired-copy-file' file-creator specially ;; When copying a directory to another directory or ;; possibly to itself or one of its subdirectories. @@ -214,48 +229,49 @@ ESC or `q' to not overwrite any of the remaining files, (push (cons from to) async-fn-list)) (progn (push (dired-make-relative from) failures) - (dired-log "%s `%s' to `%s' failed" + (dired-log "%s `%s' to `%s' failed\n" operation from to))) (push (cons from to) async-fn-list))))) + ;; When failures have been printed to dired log add the date at bob. + (when (or failures skipped) (dired-log t)) + ;; When async-fn-list is empty that's mean only one file + ;; had to be copied and user finally answer NO. + ;; In this case async process will never start and callback + ;; will have no chance to run, so notify failures here. + (unless async-fn-list + (cond (failures + (funcall dired-async-message-function + "%s failed for %d of %d file%s -- See *Dired log* buffer" + 'dired-async-failures + operation (length failures) + total (dired-plural-s total))) + (skipped + (funcall dired-async-message-function + "%s: %d of %d file%s skipped -- See *Dired log* buffer" + 'dired-async-failures + operation (length skipped) total + (dired-plural-s total))))) + ;; Setup callback. (setq callback - `(lambda (&optional ignore) - (dired-async-after-file-create ,total) - (when (string= ,(downcase operation) "rename") - (cl-loop for (file . to) in ',async-fn-list - do (and (get-file-buffer file) - (with-current-buffer (get-file-buffer file) + (lambda (&optional _ignore) + (dired-async-after-file-create + total (list operation (length async-fn-list)) failures skipped) + (when (string= (downcase operation) "rename") + (cl-loop for (file . to) in async-fn-list + for bf = (get-file-buffer file) + for destp = (file-exists-p to) + do (and bf destp + (with-current-buffer bf (set-visited-file-name to nil t)))))))) - ;; Handle error happening in host emacs. - (cond - (dired-create-files-failures - (setq failures (nconc failures dired-create-files-failures)) - (dired-log-summary - (format "%s failed for %d file%s in %d requests" - operation (length failures) - (dired-plural-s (length failures)) - total) - failures)) - (failures - (dired-log-summary - (format "%s failed for %d of %d file%s" - operation (length failures) - total (dired-plural-s total)) - failures)) - (skipped - (dired-log-summary - (format "%s: %d of %d file%s skipped" - operation (length skipped) total - (dired-plural-s total)) - skipped)) - (t (message "%s: %s file%s" - operation success-count (dired-plural-s success-count)))) ;; Start async process. (when async-fn-list (async-start `(lambda () (require 'cl-lib) (require 'dired-aux) (require 'dired-x) ,(async-inject-variables dired-async-env-variables-regexp) - (condition-case err - (let ((dired-recursive-copies (quote always))) + (let ((dired-recursive-copies (quote always)) + (dired-copy-preserve-time + ,dired-copy-preserve-time)) + (setq overwrite-backup-query nil) ;; Inline `backup-file' as long as it is not ;; available in emacs. (defalias 'backup-file @@ -274,21 +290,24 @@ ESC or `q' to not overwrite any of the remaining files, (condition-case err (copy-file from to ok dired-copy-preserve-time) (file-date-error - (push (dired-make-relative from) - dired-create-files-failures) (dired-log "Can't set date on %s:\n%s\n" from err))))))) ;; Now run the FILE-CREATOR function on files. (cl-loop with fn = (quote ,file-creator) for (from . dest) in (quote ,async-fn-list) - do (funcall fn from dest t))) - (file-error - (with-temp-file ,dired-async-log-file - (insert (format "%S" err))))) + do (condition-case err + (funcall fn from dest t) + (file-error + (dired-log "%s: %s\n" (car err) (cdr err))) + nil)) + (when (get-buffer dired-log-buffer) + (dired-log t) + (with-current-buffer dired-log-buffer + (write-region (point-min) (point-max) + ,dired-async-log-file)))) ,(dired-async-maybe-kill-ftp)) callback) ;; Run mode-line notifications while process running. (dired-async--modeline-mode 1) - (setq dired-async-operation (list operation (length async-fn-list))) (message "%s proceeding asynchronously..." operation)))) (defadvice dired-create-files (around dired-async) diff --git a/elpa/async-20160425.551/smtpmail-async.el b/elpa/async-20160513.128/smtpmail-async.el similarity index 95% rename from elpa/async-20160425.551/smtpmail-async.el rename to elpa/async-20160513.128/smtpmail-async.el index 5ac426d..6fcf287 100644 --- a/elpa/async-20160425.551/smtpmail-async.el +++ b/elpa/async-20160513.128/smtpmail-async.el @@ -1,4 +1,4 @@ -;;; smtpmail-async.el --- Send e-mail with smtpmail.el asynchronously +;;; smtpmail-async.el --- Send e-mail with smtpmail.el asynchronously -*- lexical-binding: t -*- ;; Copyright (C) 2012-2016 Free Software Foundation, Inc. @@ -65,8 +65,8 @@ It is called just before calling `smtpmail-send-it'.") nil "\\`\\(mail-header-format-function\\|smtpmail-address-buffer\\|mail-mode-abbrev-table\\)") (run-hooks 'async-smtpmail-before-send-hook) (smtpmail-send-it))) - `(lambda (&optional ignore) - (message "Delivering message to %s...done" ,to))))) + (lambda (&optional _ignore) + (message "Delivering message to %s...done" to))))) (provide 'smtpmail-async) diff --git a/elpa/buffer-move-20160108.708/buffer-move-pkg.el b/elpa/buffer-move-20160108.708/buffer-move-pkg.el deleted file mode 100644 index dbed75e..0000000 --- a/elpa/buffer-move-20160108.708/buffer-move-pkg.el +++ /dev/null @@ -1 +0,0 @@ -(define-package "buffer-move" "20160108.708" "easily swap buffers" 'nil :url "https://github.com/lukhas/buffer-move" :keywords '("lisp" "convenience")) diff --git a/elpa/buffer-move-20160108.708/buffer-move-autoloads.el b/elpa/buffer-move-20160615.1103/buffer-move-autoloads.el similarity index 93% rename from elpa/buffer-move-20160108.708/buffer-move-autoloads.el rename to elpa/buffer-move-20160615.1103/buffer-move-autoloads.el index 80f4b5e..d1f4ba0 100644 --- a/elpa/buffer-move-20160108.708/buffer-move-autoloads.el +++ b/elpa/buffer-move-20160615.1103/buffer-move-autoloads.el @@ -3,8 +3,8 @@ ;;; Code: (add-to-list 'load-path (or (file-name-directory #$) (car load-path))) -;;;### (autoloads nil "buffer-move" "buffer-move.el" (22297 19848 -;;;;;; 209528 72000)) +;;;### (autoloads nil "buffer-move" "buffer-move.el" (22387 29375 +;;;;;; 754161 271000)) ;;; Generated autoloads from buffer-move.el (autoload 'buf-move-up "buffer-move" "\ diff --git a/elpa/buffer-move-20160615.1103/buffer-move-pkg.el b/elpa/buffer-move-20160615.1103/buffer-move-pkg.el new file mode 100644 index 0000000..a9e0a04 --- /dev/null +++ b/elpa/buffer-move-20160615.1103/buffer-move-pkg.el @@ -0,0 +1 @@ +(define-package "buffer-move" "20160615.1103" "easily swap buffers" 'nil :url "https://github.com/lukhas/buffer-move" :keywords '("lisp" "convenience")) diff --git a/elpa/buffer-move-20160108.708/buffer-move.el b/elpa/buffer-move-20160615.1103/buffer-move.el similarity index 92% rename from elpa/buffer-move-20160108.708/buffer-move.el rename to elpa/buffer-move-20160615.1103/buffer-move.el index 2fd0508..8f2c16e 100644 --- a/elpa/buffer-move-20160108.708/buffer-move.el +++ b/elpa/buffer-move-20160615.1103/buffer-move.el @@ -8,7 +8,7 @@ ;; Geyslan G. Bem ;; Mathis Hofer ;; Keywords: lisp,convenience -;; Package-Version: 20160108.708 +;; Package-Version: 20160615.1103 ;; Version: 0.6.2 ;; URL : https://github.com/lukhas/buffer-move @@ -92,6 +92,12 @@ :group 'buffer-move :type 'symbol) +(defcustom buffer-move-stay-after-swap nil + "If set to non-nil, point will stay in the current window + so it will not be moved when swapping buffers. This setting + only has effect if `buffer-move-behavior' is set to 'swap." + :group 'buffer-move + :type 'boolean) (defun buf-move-to (direction) "Helper function to move the current buffer to the window in the given @@ -116,7 +122,9 @@ ;; switch other window to this buffer (set-window-buffer other-win buf-this-buf) - (select-window other-win)))) + (when (or (null buffer-move-stay-after-swap) + (eq buffer-move-behavior 'move)) + (select-window other-win))))) ;;;###autoload (defun buf-move-up () diff --git a/elpa/coffee-mode-20160419.1947/coffee-mode-pkg.el b/elpa/coffee-mode-20160419.1947/coffee-mode-pkg.el deleted file mode 100644 index 6c64a50..0000000 --- a/elpa/coffee-mode-20160419.1947/coffee-mode-pkg.el +++ /dev/null @@ -1 +0,0 @@ -(define-package "coffee-mode" "20160419.1947" "Major mode for CoffeeScript code" '((emacs "24.1") (cl-lib "0.5")) :url "http://github.com/defunkt/coffee-mode" :keywords '("coffeescript" "major" "mode")) diff --git a/elpa/coffee-mode-20160419.1947/coffee-mode-autoloads.el b/elpa/coffee-mode-20160520.146/coffee-mode-autoloads.el similarity index 89% rename from elpa/coffee-mode-20160419.1947/coffee-mode-autoloads.el rename to elpa/coffee-mode-20160520.146/coffee-mode-autoloads.el index f8889e9..9521923 100644 --- a/elpa/coffee-mode-20160419.1947/coffee-mode-autoloads.el +++ b/elpa/coffee-mode-20160520.146/coffee-mode-autoloads.el @@ -3,8 +3,8 @@ ;;; Code: (add-to-list 'load-path (or (file-name-directory #$) (car load-path))) -;;;### (autoloads nil "coffee-mode" "coffee-mode.el" (22297 53349 -;;;;;; 494925 803000)) +;;;### (autoloads nil "coffee-mode" "coffee-mode.el" (22387 29375 +;;;;;; 378447 595000)) ;;; Generated autoloads from coffee-mode.el (autoload 'coffee-mode "coffee-mode" "\ diff --git a/elpa/coffee-mode-20160520.146/coffee-mode-pkg.el b/elpa/coffee-mode-20160520.146/coffee-mode-pkg.el new file mode 100644 index 0000000..f8958ac --- /dev/null +++ b/elpa/coffee-mode-20160520.146/coffee-mode-pkg.el @@ -0,0 +1 @@ +(define-package "coffee-mode" "20160520.146" "Major mode for CoffeeScript code" '((emacs "24.1") (cl-lib "0.5")) :url "http://github.com/defunkt/coffee-mode" :keywords '("coffeescript" "major" "mode")) diff --git a/elpa/coffee-mode-20160419.1947/coffee-mode.el b/elpa/coffee-mode-20160520.146/coffee-mode.el similarity index 98% rename from elpa/coffee-mode-20160419.1947/coffee-mode.el rename to elpa/coffee-mode-20160520.146/coffee-mode.el index ba0a6d2..8f1c3a6 100644 --- a/elpa/coffee-mode-20160419.1947/coffee-mode.el +++ b/elpa/coffee-mode-20160520.146/coffee-mode.el @@ -3,7 +3,7 @@ ;; Copyright (C) 2010 Chris Wanstrath ;; Version: 0.6.3 -;; Package-Version: 20160419.1947 +;; Package-Version: 20160520.146 ;; Keywords: CoffeeScript major mode ;; Author: Chris Wanstrath ;; URL: http://github.com/defunkt/coffee-mode @@ -737,7 +737,7 @@ output in a compilation buffer." "Return the indentation level of the previous non-blank line." (save-excursion (forward-line -1) - (while (and (looking-at "^[ \t]*$") (not (bobp))) + (while (and (looking-at-p "^[ \t]*$") (not (bobp))) (forward-line -1)) (current-indentation))) @@ -815,15 +815,16 @@ previous line." (or (and char-of-eol (memq char-of-eol coffee-indenters-eol)) (progn (back-to-indentation) - (looking-at (coffee-indenters-bol-regexp))))))) + (and (looking-at-p (coffee-indenters-bol-regexp)) + (not (re-search-forward "\\_" (line-end-position) t)))))))) (defun coffee-previous-line-is-single-line-comment () "Return t if the previous line is a CoffeeScript single line comment." (save-excursion (forward-line -1) (back-to-indentation) - (and (looking-at "#") - (not (looking-at "###\\(?:\\s-+.*\\)?$")) + (and (looking-at-p "#") + (not (looking-at-p "###\\(?:\\s-+.*\\)?$")) (progn (goto-char (line-end-position)) (nth 4 (syntax-ppss)))))) @@ -865,7 +866,7 @@ indented less than COUNT columns." ;; Check that all lines can be shifted enough (while (< (point) end) (if (and (< (current-indentation) amount) - (not (looking-at "[ \t]*$"))) + (not (looking-at-p "[ \t]*$"))) (error "Can't shift all lines enough")) (forward-line)) (indent-rigidly start end (- amount))))))) @@ -927,7 +928,7 @@ comments such as the following: ..." (let ((ret (forward-paragraph count))) (when (and (= count -1) - (looking-at "[[:space:]]*###[[:space:]]*$")) + (looking-at-p "[[:space:]]*###[[:space:]]*$")) (forward-line)) ret)) @@ -1236,6 +1237,19 @@ comments such as the following: ;; Define Major Mode ;; +(defvar coffee-mode-syntax-table + (let ((table (make-syntax-table))) + ;; perl style comment: "# ..." + (modify-syntax-entry ?# "< b" table) + (modify-syntax-entry ?\n "> b" table) + + ;; Treat slashes as paired delimiters; useful for finding regexps. + (modify-syntax-entry ?/ "/" table) + + ;; single quote strings + (modify-syntax-entry ?' "\"" table) + table)) + ;;;###autoload (define-derived-mode coffee-mode prog-mode "Coffee" "Major mode for editing CoffeeScript." @@ -1247,18 +1261,9 @@ comments such as the following: (set (make-local-variable 'comment-line-break-function) #'coffee-comment-line-break-fn) (set (make-local-variable 'normal-auto-fill-function) #'coffee-auto-fill-fn) - ;; perl style comment: "# ..." - (modify-syntax-entry ?# "< b" coffee-mode-syntax-table) - (modify-syntax-entry ?\n "> b" coffee-mode-syntax-table) - - ;; Treat slashes as paired delimiters; useful for finding regexps. - (modify-syntax-entry ?/ "/" coffee-mode-syntax-table) (set (make-local-variable 'comment-start) "#") - ;; single quote strings - (modify-syntax-entry ?' "\"" coffee-mode-syntax-table) - ;; indentation (make-local-variable 'coffee-tab-width) (make-local-variable 'coffee-indent-tabs-mode) diff --git a/elpa/company-20160424.1521/company-abbrev.el b/elpa/company-20160626.1903/company-abbrev.el similarity index 100% rename from elpa/company-20160424.1521/company-abbrev.el rename to elpa/company-20160626.1903/company-abbrev.el diff --git a/elpa/company-20160424.1521/company-autoloads.el b/elpa/company-20160626.1903/company-autoloads.el similarity index 84% rename from elpa/company-20160424.1521/company-autoloads.el rename to elpa/company-20160626.1903/company-autoloads.el index 3facc78..919f21b 100644 --- a/elpa/company-20160424.1521/company-autoloads.el +++ b/elpa/company-20160626.1903/company-autoloads.el @@ -3,8 +3,8 @@ ;;; Code: (add-to-list 'load-path (or (file-name-directory #$) (car load-path))) -;;;### (autoloads nil "company" "company.el" (22303 19286 146174 -;;;;;; 415000)) +;;;### (autoloads nil "company" "company.el" (22387 29374 119407 +;;;;;; 928000)) ;;; Generated autoloads from company.el (autoload 'company-mode "company" "\ @@ -73,8 +73,8 @@ inserted. ;;;*** -;;;### (autoloads nil "company-abbrev" "company-abbrev.el" (22303 -;;;;;; 19286 222174 356000)) +;;;### (autoloads nil "company-abbrev" "company-abbrev.el" (22387 +;;;;;; 29374 199346 932000)) ;;; Generated autoloads from company-abbrev.el (autoload 'company-abbrev "company-abbrev" "\ @@ -84,8 +84,8 @@ inserted. ;;;*** -;;;### (autoloads nil "company-bbdb" "company-bbdb.el" (22303 19286 -;;;;;; 206174 368000)) +;;;### (autoloads nil "company-bbdb" "company-bbdb.el" (22387 29374 +;;;;;; 179362 181000)) ;;; Generated autoloads from company-bbdb.el (autoload 'company-bbdb "company-bbdb" "\ @@ -95,8 +95,8 @@ inserted. ;;;*** -;;;### (autoloads nil "company-css" "company-css.el" (22303 19286 -;;;;;; 142174 418000)) +;;;### (autoloads nil "company-css" "company-css.el" (22387 29374 +;;;;;; 115410 979000)) ;;; Generated autoloads from company-css.el (autoload 'company-css "company-css" "\ @@ -106,8 +106,8 @@ inserted. ;;;*** -;;;### (autoloads nil "company-dabbrev" "company-dabbrev.el" (22303 -;;;;;; 19286 178174 390000)) +;;;### (autoloads nil "company-dabbrev" "company-dabbrev.el" (22387 +;;;;;; 29374 151383 530000)) ;;; Generated autoloads from company-dabbrev.el (autoload 'company-dabbrev "company-dabbrev" "\ @@ -118,7 +118,7 @@ dabbrev-like `company-mode' completion backend. ;;;*** ;;;### (autoloads nil "company-dabbrev-code" "company-dabbrev-code.el" -;;;;;; (22303 19286 170174 396000)) +;;;;;; (22387 29374 139392 679000)) ;;; Generated autoloads from company-dabbrev-code.el (autoload 'company-dabbrev-code "company-dabbrev-code" "\ @@ -130,8 +130,8 @@ comments or strings. ;;;*** -;;;### (autoloads nil "company-elisp" "company-elisp.el" (22303 19286 -;;;;;; 242174 341000)) +;;;### (autoloads nil "company-elisp" "company-elisp.el" (22387 29374 +;;;;;; 207340 832000)) ;;; Generated autoloads from company-elisp.el (autoload 'company-elisp "company-elisp" "\ @@ -141,8 +141,8 @@ comments or strings. ;;;*** -;;;### (autoloads nil "company-etags" "company-etags.el" (22303 19286 -;;;;;; 154174 409000)) +;;;### (autoloads nil "company-etags" "company-etags.el" (22387 29374 +;;;;;; 127401 829000)) ;;; Generated autoloads from company-etags.el (autoload 'company-etags "company-etags" "\ @@ -152,8 +152,8 @@ comments or strings. ;;;*** -;;;### (autoloads nil "company-files" "company-files.el" (22303 19286 -;;;;;; 182174 387000)) +;;;### (autoloads nil "company-files" "company-files.el" (22387 29374 +;;;;;; 159377 430000)) ;;; Generated autoloads from company-files.el (autoload 'company-files "company-files" "\ @@ -165,8 +165,8 @@ File paths with spaces are only supported inside strings. ;;;*** -;;;### (autoloads nil "company-gtags" "company-gtags.el" (22303 19286 -;;;;;; 114174 440000)) +;;;### (autoloads nil "company-gtags" "company-gtags.el" (22387 29374 +;;;;;; 87432 327000)) ;;; Generated autoloads from company-gtags.el (autoload 'company-gtags "company-gtags" "\ @@ -176,8 +176,8 @@ File paths with spaces are only supported inside strings. ;;;*** -;;;### (autoloads nil "company-ispell" "company-ispell.el" (22303 -;;;;;; 19286 230174 350000)) +;;;### (autoloads nil "company-ispell" "company-ispell.el" (22387 +;;;;;; 29374 203343 882000)) ;;; Generated autoloads from company-ispell.el (autoload 'company-ispell "company-ispell" "\ @@ -187,8 +187,8 @@ File paths with spaces are only supported inside strings. ;;;*** -;;;### (autoloads nil "company-keywords" "company-keywords.el" (22303 -;;;;;; 19286 194174 378000)) +;;;### (autoloads nil "company-keywords" "company-keywords.el" (22387 +;;;;;; 29374 167371 330000)) ;;; Generated autoloads from company-keywords.el (autoload 'company-keywords "company-keywords" "\ @@ -198,8 +198,8 @@ File paths with spaces are only supported inside strings. ;;;*** -;;;### (autoloads nil "company-nxml" "company-nxml.el" (22303 19286 -;;;;;; 210174 365000)) +;;;### (autoloads nil "company-nxml" "company-nxml.el" (22387 29374 +;;;;;; 187356 81000)) ;;; Generated autoloads from company-nxml.el (autoload 'company-nxml "company-nxml" "\ @@ -209,8 +209,8 @@ File paths with spaces are only supported inside strings. ;;;*** -;;;### (autoloads nil "company-oddmuse" "company-oddmuse.el" (22303 -;;;;;; 19286 134174 424000)) +;;;### (autoloads nil "company-oddmuse" "company-oddmuse.el" (22387 +;;;;;; 29374 107417 78000)) ;;; Generated autoloads from company-oddmuse.el (autoload 'company-oddmuse "company-oddmuse" "\ @@ -220,8 +220,8 @@ File paths with spaces are only supported inside strings. ;;;*** -;;;### (autoloads nil "company-semantic" "company-semantic.el" (22303 -;;;;;; 19286 122174 434000)) +;;;### (autoloads nil "company-semantic" "company-semantic.el" (22387 +;;;;;; 29374 91429 277000)) ;;; Generated autoloads from company-semantic.el (autoload 'company-semantic "company-semantic" "\ @@ -231,8 +231,8 @@ File paths with spaces are only supported inside strings. ;;;*** -;;;### (autoloads nil "company-tempo" "company-tempo.el" (22303 19286 -;;;;;; 174174 393000)) +;;;### (autoloads nil "company-tempo" "company-tempo.el" (22387 29374 +;;;;;; 147386 580000)) ;;; Generated autoloads from company-tempo.el (autoload 'company-tempo "company-tempo" "\ @@ -242,8 +242,8 @@ File paths with spaces are only supported inside strings. ;;;*** -;;;### (autoloads nil "company-xcode" "company-xcode.el" (22303 19286 -;;;;;; 218174 359000)) +;;;### (autoloads nil "company-xcode" "company-xcode.el" (22387 29374 +;;;;;; 195349 982000)) ;;; Generated autoloads from company-xcode.el (autoload 'company-xcode "company-xcode" "\ @@ -254,7 +254,7 @@ File paths with spaces are only supported inside strings. ;;;*** ;;;### (autoloads nil "company-yasnippet" "company-yasnippet.el" -;;;;;; (22303 19286 214174 362000)) +;;;;;; (22387 29374 191353 32000)) ;;; Generated autoloads from company-yasnippet.el (autoload 'company-yasnippet "company-yasnippet" "\ @@ -286,7 +286,7 @@ shadow backends that come after it. Recommended usages: ;;;### (autoloads nil nil ("company-capf.el" "company-clang.el" "company-cmake.el" ;;;;;; "company-eclim.el" "company-pkg.el" "company-template.el") -;;;;;; (22303 19286 253549 387000)) +;;;;;; (22387 29374 220274 120000)) ;;;*** diff --git a/elpa/company-20160424.1521/company-bbdb.el b/elpa/company-20160626.1903/company-bbdb.el similarity index 100% rename from elpa/company-20160424.1521/company-bbdb.el rename to elpa/company-20160626.1903/company-bbdb.el diff --git a/elpa/company-20160424.1521/company-capf.el b/elpa/company-20160626.1903/company-capf.el similarity index 100% rename from elpa/company-20160424.1521/company-capf.el rename to elpa/company-20160626.1903/company-capf.el diff --git a/elpa/company-20160424.1521/company-clang.el b/elpa/company-20160626.1903/company-clang.el similarity index 100% rename from elpa/company-20160424.1521/company-clang.el rename to elpa/company-20160626.1903/company-clang.el diff --git a/elpa/company-20160424.1521/company-cmake.el b/elpa/company-20160626.1903/company-cmake.el similarity index 100% rename from elpa/company-20160424.1521/company-cmake.el rename to elpa/company-20160626.1903/company-cmake.el diff --git a/elpa/company-20160424.1521/company-css.el b/elpa/company-20160626.1903/company-css.el similarity index 100% rename from elpa/company-20160424.1521/company-css.el rename to elpa/company-20160626.1903/company-css.el diff --git a/elpa/company-20160424.1521/company-dabbrev-code.el b/elpa/company-20160626.1903/company-dabbrev-code.el similarity index 100% rename from elpa/company-20160424.1521/company-dabbrev-code.el rename to elpa/company-20160626.1903/company-dabbrev-code.el diff --git a/elpa/company-20160424.1521/company-dabbrev.el b/elpa/company-20160626.1903/company-dabbrev.el similarity index 89% rename from elpa/company-20160424.1521/company-dabbrev.el rename to elpa/company-20160626.1903/company-dabbrev.el index 3a533d5..b1a9def 100644 --- a/elpa/company-20160424.1521/company-dabbrev.el +++ b/elpa/company-20160626.1903/company-dabbrev.el @@ -41,8 +41,11 @@ buffers with the same major mode. See also `company-dabbrev-time-limit'." (const :tag "All" all))) (defcustom company-dabbrev-ignore-buffers "\\`[ *]" - "Regexp matching the names of buffers to ignore." - :type 'regexp) + "Regexp matching the names of buffers to ignore. +Or a function that returns non-nil for such buffers." + :type '(choice (regexp :tag "Regexp") + (function :tag "Predicate")) + :package-version '(company . "0.9.0")) (defcustom company-dabbrev-time-limit .1 "Determines how many seconds `company-dabbrev' should look for matches." @@ -137,14 +140,16 @@ This variable affects both `company-dabbrev' and `company-dabbrev-code'." ignore-comments))) (when other-buffer-modes (cl-dolist (buffer (delq (current-buffer) (buffer-list))) - (with-current-buffer buffer - (when (if (eq other-buffer-modes 'all) - (not (string-match-p company-dabbrev-ignore-buffers - (buffer-name))) - (apply #'derived-mode-p other-buffer-modes)) - (setq symbols - (company-dabbrev--search-buffer regexp nil symbols start - limit ignore-comments)))) + (unless (if (stringp company-dabbrev-ignore-buffers) + (string-match-p company-dabbrev-ignore-buffers + (buffer-name buffer)) + (funcall company-dabbrev-ignore-buffers buffer)) + (with-current-buffer buffer + (when (or (eq other-buffer-modes 'all) + (apply #'derived-mode-p other-buffer-modes)) + (setq symbols + (company-dabbrev--search-buffer regexp nil symbols start + limit ignore-comments))))) (and limit (> (float-time (time-since start)) limit) (cl-return)))) diff --git a/elpa/company-20160424.1521/company-eclim.el b/elpa/company-20160626.1903/company-eclim.el similarity index 97% rename from elpa/company-20160424.1521/company-eclim.el rename to elpa/company-20160626.1903/company-eclim.el index 208daf5..b37f756 100644 --- a/elpa/company-20160424.1521/company-eclim.el +++ b/elpa/company-20160626.1903/company-eclim.el @@ -89,10 +89,11 @@ eclim can only complete correctly when the buffer has been saved." (defun company-eclim--project-dir () (if (eq company-eclim--project-dir 'unknown) - (setq company-eclim--project-dir - (directory-file-name - (expand-file-name - (locate-dominating-file buffer-file-name ".project")))) + (let ((dir (locate-dominating-file buffer-file-name ".project"))) + (when dir + (setq company-eclim--project-dir + (directory-file-name + (expand-file-name dir))))) company-eclim--project-dir)) (defun company-eclim--project-name () diff --git a/elpa/company-20160424.1521/company-elisp.el b/elpa/company-20160626.1903/company-elisp.el similarity index 100% rename from elpa/company-20160424.1521/company-elisp.el rename to elpa/company-20160626.1903/company-elisp.el diff --git a/elpa/company-20160424.1521/company-etags.el b/elpa/company-20160626.1903/company-etags.el similarity index 100% rename from elpa/company-20160424.1521/company-etags.el rename to elpa/company-20160626.1903/company-etags.el diff --git a/elpa/company-20160424.1521/company-files.el b/elpa/company-20160626.1903/company-files.el similarity index 100% rename from elpa/company-20160424.1521/company-files.el rename to elpa/company-20160626.1903/company-files.el diff --git a/elpa/company-20160424.1521/company-gtags.el b/elpa/company-20160626.1903/company-gtags.el similarity index 100% rename from elpa/company-20160424.1521/company-gtags.el rename to elpa/company-20160626.1903/company-gtags.el diff --git a/elpa/company-20160424.1521/company-ispell.el b/elpa/company-20160626.1903/company-ispell.el similarity index 100% rename from elpa/company-20160424.1521/company-ispell.el rename to elpa/company-20160626.1903/company-ispell.el diff --git a/elpa/company-20160424.1521/company-keywords.el b/elpa/company-20160626.1903/company-keywords.el similarity index 100% rename from elpa/company-20160424.1521/company-keywords.el rename to elpa/company-20160626.1903/company-keywords.el diff --git a/elpa/company-20160424.1521/company-nxml.el b/elpa/company-20160626.1903/company-nxml.el similarity index 100% rename from elpa/company-20160424.1521/company-nxml.el rename to elpa/company-20160626.1903/company-nxml.el diff --git a/elpa/company-20160424.1521/company-oddmuse.el b/elpa/company-20160626.1903/company-oddmuse.el similarity index 100% rename from elpa/company-20160424.1521/company-oddmuse.el rename to elpa/company-20160626.1903/company-oddmuse.el diff --git a/elpa/company-20160424.1521/company-pkg.el b/elpa/company-20160626.1903/company-pkg.el similarity index 75% rename from elpa/company-20160424.1521/company-pkg.el rename to elpa/company-20160626.1903/company-pkg.el index e143b4c..071c3c2 100644 --- a/elpa/company-20160424.1521/company-pkg.el +++ b/elpa/company-20160626.1903/company-pkg.el @@ -1,4 +1,4 @@ -(define-package "company" "20160424.1521" "Modular text completion framework" +(define-package "company" "20160626.1903" "Modular text completion framework" '((emacs "24.1") (cl-lib "0.5")) :url "http://company-mode.github.io/" :keywords diff --git a/elpa/company-20160424.1521/company-semantic.el b/elpa/company-20160626.1903/company-semantic.el similarity index 100% rename from elpa/company-20160424.1521/company-semantic.el rename to elpa/company-20160626.1903/company-semantic.el diff --git a/elpa/company-20160424.1521/company-template.el b/elpa/company-20160626.1903/company-template.el similarity index 100% rename from elpa/company-20160424.1521/company-template.el rename to elpa/company-20160626.1903/company-template.el diff --git a/elpa/company-20160424.1521/company-tempo.el b/elpa/company-20160626.1903/company-tempo.el similarity index 100% rename from elpa/company-20160424.1521/company-tempo.el rename to elpa/company-20160626.1903/company-tempo.el diff --git a/elpa/company-20160424.1521/company-xcode.el b/elpa/company-20160626.1903/company-xcode.el similarity index 100% rename from elpa/company-20160424.1521/company-xcode.el rename to elpa/company-20160626.1903/company-xcode.el diff --git a/elpa/company-20160424.1521/company-yasnippet.el b/elpa/company-20160626.1903/company-yasnippet.el similarity index 100% rename from elpa/company-20160424.1521/company-yasnippet.el rename to elpa/company-20160626.1903/company-yasnippet.el diff --git a/elpa/company-20160424.1521/company.el b/elpa/company-20160626.1903/company.el similarity index 94% rename from elpa/company-20160424.1521/company.el rename to elpa/company-20160626.1903/company.el index 23ed09a..70bd5b4 100644 --- a/elpa/company-20160424.1521/company.el +++ b/elpa/company-20160626.1903/company.el @@ -5,7 +5,7 @@ ;; Author: Nikolaj Schumacher ;; Maintainer: Dmitry Gutov ;; URL: http://company-mode.github.io/ -;; Version: 0.9.0-cvs +;; Version: 0.9.0 ;; Keywords: abbrev, convenience, matching ;; Package-Requires: ((emacs "24.1") (cl-lib "0.5")) @@ -186,9 +186,13 @@ buffer-local wherever it is set." (defun company-frontends-set (variable value) ;; Uniquify. (let ((value (delete-dups (copy-sequence value)))) - (and (memq 'company-pseudo-tooltip-unless-just-one-frontend value) - (memq 'company-pseudo-tooltip-frontend value) - (error "Pseudo tooltip frontend cannot be used twice")) + (and (or (and (memq 'company-pseudo-tooltip-unless-just-one-frontend value) + (memq 'company-pseudo-tooltip-frontend value)) + (and (memq 'company-pseudo-tooltip-unless-just-one-frontend-with-delay value) + (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")) (and (memq 'company-preview-if-just-one-frontend value) (memq 'company-preview-frontend value) (error "Preview frontend cannot be used twice")) @@ -233,6 +237,8 @@ The visualized data is stored in `company-prefix', `company-candidates', company-pseudo-tooltip-frontend) (const :tag "pseudo tooltip, multiple only" company-pseudo-tooltip-unless-just-one-frontend) + (const :tag "pseudo tooltip, multiple only, delayed" + company-pseudo-tooltip-unless-just-one-frontend-with-delay) (const :tag "preview" company-preview-frontend) (const :tag "preview, unique only" company-preview-if-just-one-frontend) @@ -420,11 +426,11 @@ call is dispatched to the backend the candidate came from. In other cases (except for `duplicates' and `sorted'), the first non-nil value among all the backends is returned. -The group can also contain keywords. Currently, `:with' and `:sorted' +The group can also contain keywords. Currently, `:with' and `:separate' keywords are defined. If the group contains keyword `:with', the backends listed after this keyword are ignored for the purpose of the `prefix' -command. If the group contains keyword `:sorted', the final list of -candidates is not sorted after concatenation. +command. If the group contains keyword `:separate', the candidates that +come from different backends are sorted separately in the combined list. Asynchronous backends ===================== @@ -465,6 +471,8 @@ without duplicates." (const :tag "Sort by occurrence" (company-sort-by-occurrence)) (const :tag "Sort by backend importance" (company-sort-by-backend-importance)) + (const :tag "Prefer case sensitive prefix" + (company-sort-prefer-same-case-prefix)) (repeat :tag "User defined" (function)))) (defcustom company-completion-started-hook nil @@ -557,6 +565,13 @@ happens. The value of nil means no idle completion." (const :tag "immediate (0)" 0) (number :tag "seconds"))) +(defcustom company-tooltip-idle-delay .5 + "The idle delay in seconds until tooltip is shown when using +`company-pseudo-tooltip-unless-just-one-frontend-with-delay'." + :type '(choice (const :tag "never (nil)" nil) + (const :tag "immediate (0)" 0) + (number :tag "seconds"))) + (defcustom company-begin-commands '(self-insert-command org-self-insert-command orgtbl-self-insert-command @@ -720,9 +735,6 @@ keymap during active completions (`company-active-map'): nil company-lighter company-mode-map (if company-mode (progn - (when (eq company-idle-delay t) - (setq company-idle-delay 0) - (warn "Setting `company-idle-delay' to t is deprecated. Set it to 0 instead.")) (add-hook 'pre-command-hook 'company-pre-command nil t) (add-hook 'post-command-hook 'company-post-command nil t) (mapc 'company-init-backend company-backends)) @@ -905,19 +917,19 @@ matches IDLE-BEGIN-AFTER-RE, return it wrapped in a cons." (let ((backends (cl-loop for b in backends when (not (and (symbolp b) (eq 'failed (get b 'company-init)))) - collect b))) + collect b)) + (separate (memq :separate backends))) (when (eq command 'prefix) (setq backends (butlast backends (length (member :with backends))))) - (unless (memq command '(sorted)) - (setq backends (cl-delete-if #'keywordp backends))) + (setq backends (cl-delete-if #'keywordp backends)) (pcase command (`candidates - (company--multi-backend-adapter-candidates backends (car args))) - (`sorted (memq :sorted backends)) - (`duplicates t) + (company--multi-backend-adapter-candidates backends (car args) separate)) + (`sorted separate) + (`duplicates (not separate)) ((or `prefix `ignore-case `no-cache `require-match) (let (value) (cl-dolist (backend backends) @@ -931,26 +943,35 @@ matches IDLE-BEGIN-AFTER-RE, return it wrapped in a cons." (car backends)))) (apply backend command args)))))))) -(defun company--multi-backend-adapter-candidates (backends prefix) - (let ((pairs (cl-loop for backend in (cdr backends) +(defun company--multi-backend-adapter-candidates (backends prefix separate) + (let ((pairs (cl-loop for backend in backends when (equal (company--prefix-str (funcall backend 'prefix)) prefix) collect (cons (funcall backend 'candidates prefix) - (let ((b backend)) - (lambda (candidates) - (mapcar - (lambda (str) - (propertize str 'company-backend b)) - candidates))))))) - (when (equal (company--prefix-str (funcall (car backends) 'prefix)) prefix) - ;; Small perf optimization: don't tag the candidates received - ;; from the first backend in the group. - (push (cons (funcall (car backends) 'candidates prefix) - 'identity) - pairs)) + (company--multi-candidates-mapper + backend + separate + ;; Small perf optimization: don't tag the + ;; candidates received from the first + ;; backend in the group. + (not (eq backend (car backends)))))))) (company--merge-async pairs (lambda (values) (apply #'append values))))) +(defun company--multi-candidates-mapper (backend separate tag) + (lambda (candidates) + (when separate + (let ((company-backend backend)) + (setq candidates + (company--preprocess-candidates candidates)))) + (when tag + (setq candidates + (mapcar + (lambda (str) + (propertize str 'company-backend backend)) + candidates))) + candidates)) + (defun company--merge-async (pairs merger) (let ((async (cl-loop for pair in pairs thereis @@ -1017,6 +1038,7 @@ Controlled by `company-auto-complete'.") (defvar-local company-point nil) (defvar company-timer nil) +(defvar company-tooltip-timer nil) (defsubst company-strip-prefix (str) (substring str (length company-prefix))) @@ -1202,10 +1224,11 @@ can retrieve meta-data for them." (progn (setq res 'done) nil))))) (defun company--preprocess-candidates (candidates) + (cl-assert (cl-every #'stringp candidates)) (unless (company-call-backend 'sorted) (setq candidates (sort candidates 'string<))) (when (company-call-backend 'duplicates) - (setq candidates (company--strip-duplicates candidates))) + (company--strip-duplicates candidates)) candidates) (defun company--postprocess-candidates (candidates) @@ -1216,37 +1239,27 @@ can retrieve meta-data for them." (company--transform-candidates candidates)) (defun company--strip-duplicates (candidates) - (let* ((annos 'unk) - (str (car candidates)) - (ref (cdr candidates)) - res str2 anno2) - (while ref - (setq str2 (pop ref)) - (if (not (equal str str2)) - (progn - (push str res) - (setq str str2) - (setq annos 'unk)) - (setq anno2 (company-call-backend - 'annotation str2)) - (cond - ((null anno2)) ; Skip it. - ((when (eq annos 'unk) - (let ((ann1 (company-call-backend 'annotation str))) - (if (null ann1) - ;; No annotation on the earlier element, drop it. - t - (setq annos (list ann1)) - nil))) - (setq annos (list anno2)) - (setq str str2)) - ((member anno2 annos)) ; Also skip. - (t - (push anno2 annos) - (push str res) ; Maintain ordering. - (setq str str2))))) - (when str (push str res)) - (nreverse res))) + (let ((c2 candidates) + (annos 'unk)) + (while c2 + (setcdr c2 + (let ((str (pop c2))) + (while (let ((str2 (car c2))) + (if (not (equal str str2)) + (progn + (setq annos 'unk) + nil) + (when (eq annos 'unk) + (setq annos (list (company-call-backend + 'annotation str)))) + (let ((anno2 (company-call-backend + 'annotation str2))) + (if (member anno2 annos) + t + (push anno2 annos) + nil)))) + (pop c2)) + c2))))) (defun company--transform-candidates (candidates) (let ((c candidates)) @@ -1340,6 +1353,16 @@ from the rest of the backends in the group, if any, will be left at the end." (let ((b1 (get-text-property 0 'company-backend c1))) (or (not b1) (not (memq b1 low-priority))))))))))) +(defun company-sort-prefer-same-case-prefix (candidates) + "Prefer CANDIDATES with the exact same prefix. +If a backend returns case insensitive matches, candidates with the an exact +prefix match (same case) will be prioritized." + (cl-loop for candidate in candidates + if (string-prefix-p company-prefix candidate) + collect candidate into same-case + else collect candidate into other-case + finally return (append same-case other-case))) + (defun company-idle-begin (buf win tick pos) (and (eq buf (current-buffer)) (eq win (selected-window)) @@ -1612,11 +1635,13 @@ from the rest of the backends in the group, if any, will be left at the end." (company--perform))) (if company-candidates (company-call-frontends 'post-command) - (and (numberp company-idle-delay) + (and (or (numberp company-idle-delay) + ;; Deprecated. + (eq company-idle-delay t)) (not defining-kbd-macro) (company--should-begin) (setq company-timer - (run-with-timer company-idle-delay nil + (run-with-timer (company--idle-delay) nil 'company-idle-begin (current-buffer) (selected-window) (buffer-chars-modified-tick) (point)))))) @@ -1625,6 +1650,11 @@ from the rest of the backends in the group, if any, will be left at the end." (company-cancel)))) (company-install-map)) +(defun company--idle-delay () + (if (memql company-idle-delay '(t 0 0.0)) + 0.01 + company-idle-delay)) + (defvar company--begin-inhibit-commands '(company-abort company-complete-mouse company-complete @@ -1951,15 +1981,23 @@ With ARG, move by that many elements." "Select the candidate one page further." (interactive) (when (company-manual-begin) - (company-set-selection (+ company-selection - company-tooltip-limit)))) + (if (and company-selection-wrap-around + (= company-selection (1- company-candidates-length))) + (company-set-selection 0) + (let (company-selection-wrap-around) + (company-set-selection (+ company-selection + company-tooltip-limit)))))) (defun company-previous-page () "Select the candidate one page earlier." (interactive) (when (company-manual-begin) - (company-set-selection (- company-selection - company-tooltip-limit)))) + (if (and company-selection-wrap-around + (zerop company-selection)) + (company-set-selection (1- company-candidates-length)) + (let (company-selection-wrap-around) + (company-set-selection (- company-selection + company-tooltip-limit)))))) (defvar company-pseudo-tooltip-overlay) @@ -2057,6 +2095,15 @@ With ARG, move by that many elements." (eq old-tick (buffer-chars-modified-tick))) (company-complete-common)))))) +(defun company-select-next-if-tooltip-visible-or-complete-selection () + "Insert selection if appropriate, or select the next candidate. +Insert selection if only preview is showing or only one candidate, +otherwise select the next candidate." + (interactive) + (if (and (company-tooltip-visible-p) (> company-candidates-length 1)) + (call-interactively 'company-select-next) + (call-interactively 'company-complete-selection))) + ;;;###autoload (defun company-complete () "Insert the common part of all candidates or the current selection. @@ -2827,6 +2874,30 @@ Returns a negative number if the tooltip should be displayed above point." (company--show-inline-p)) (company-pseudo-tooltip-frontend command))) +(defun company-pseudo-tooltip-unless-just-one-frontend-with-delay (command) + "`compandy-pseudo-tooltip-frontend', but shown after a delay. +Delay is determined by `company-tooltip-idle-delay'." + (defvar company-preview-overlay) + (when (and (memq command '(pre-command hide)) + company-tooltip-timer) + (cancel-timer company-tooltip-timer) + (setq company-tooltip-timer nil)) + (cl-case command + (post-command + (if (or company-tooltip-timer + (overlayp company-pseudo-tooltip-overlay)) + (if (not (overlayp company-preview-overlay)) + (company-pseudo-tooltip-unless-just-one-frontend command) + (let (company-tooltip-timer) + (company-call-frontends 'pre-command)) + (company-call-frontends 'post-command)) + (setq company-tooltip-timer + (run-with-timer company-tooltip-idle-delay nil + 'company-pseudo-tooltip-unless-just-one-frontend-with-delay + 'post-command)))) + (t + (company-pseudo-tooltip-unless-just-one-frontend command)))) + ;;; overlay ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defvar-local company-preview-overlay nil) @@ -2901,6 +2972,11 @@ Returns a negative number if the tooltip should be displayed above point." (or (eq (company-call-backend 'ignore-case) 'keep-prefix) (string-prefix-p company-prefix company-common)))) +(defun company-tooltip-visible-p () + "Returns whether the tooltip is visible." + (when (overlayp company-pseudo-tooltip-overlay) + (not (overlay-get company-pseudo-tooltip-overlay 'invisible)))) + ;;; echo ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defvar-local company-echo-last-msg nil) diff --git a/elpa/company-shell-20160212.1139/company-shell-pkg.el b/elpa/company-shell-20160212.1139/company-shell-pkg.el deleted file mode 100644 index e62640b..0000000 --- a/elpa/company-shell-20160212.1139/company-shell-pkg.el +++ /dev/null @@ -1 +0,0 @@ -(define-package "company-shell" "20160212.1139" "Company mode backend for shell functions" '((company "0.8.12") (dash "2.12.0") (cl-lib "0.5")) :url "https://github.com/Alexander-Miller/company-shell" :keywords '("company" "shell")) diff --git a/elpa/company-shell-20160212.1139/company-shell-autoloads.el b/elpa/company-shell-20160528.507/company-shell-autoloads.el similarity index 89% rename from elpa/company-shell-20160212.1139/company-shell-autoloads.el rename to elpa/company-shell-20160528.507/company-shell-autoloads.el index 3ce4d0e..71e7636 100644 --- a/elpa/company-shell-20160212.1139/company-shell-autoloads.el +++ b/elpa/company-shell-20160528.507/company-shell-autoloads.el @@ -3,8 +3,8 @@ ;;; Code: (add-to-list 'load-path (or (file-name-directory #$) (car load-path))) -;;;### (autoloads nil "company-shell" "company-shell.el" (22297 53347 -;;;;;; 354924 555000)) +;;;### (autoloads nil "company-shell" "company-shell.el" (22387 29373 +;;;;;; 371978 851000)) ;;; Generated autoloads from company-shell.el (autoload 'company-shell-rebuild-cache "company-shell" "\ diff --git a/elpa/company-shell-20160528.507/company-shell-pkg.el b/elpa/company-shell-20160528.507/company-shell-pkg.el new file mode 100644 index 0000000..2919ddc --- /dev/null +++ b/elpa/company-shell-20160528.507/company-shell-pkg.el @@ -0,0 +1 @@ +(define-package "company-shell" "20160528.507" "Company mode backend for shell functions" '((company "0.8.12") (dash "2.12.0") (cl-lib "0.5")) :url "https://github.com/Alexander-Miller/company-shell" :keywords '("company" "shell")) diff --git a/elpa/company-shell-20160212.1139/company-shell.el b/elpa/company-shell-20160528.507/company-shell.el similarity index 97% rename from elpa/company-shell-20160212.1139/company-shell.el rename to elpa/company-shell-20160528.507/company-shell.el index b65a41a..00a1f9e 100644 --- a/elpa/company-shell-20160212.1139/company-shell.el +++ b/elpa/company-shell-20160528.507/company-shell.el @@ -4,9 +4,9 @@ ;; Author: Alexander Miller ;; Package-Requires: ((company "0.8.12") (dash "2.12.0") (cl-lib "0.5")) +;; Package-Version: 20160528.507 ;; Homepage: https://github.com/Alexander-Miller/company-shell ;; Version: 1.0 -;; Package-Version: 20160212.1139 ;; Keywords: company, shell ;; This program is free software; you can redistribute it and/or modify @@ -32,6 +32,7 @@ (require 'company) (require 'dash) (require 'cl-lib) +(require 'subr-x) (defvar company-shell--cache nil "Cache of all possible $PATH completions. Automatically built when nil. Invoke `company-shell-rebuild-cache' to rebuild manually.") @@ -88,7 +89,9 @@ it in the understanding that you do this AT YOUR OWN RISK.") (let ((completions (-mapcat (lambda (dir) (-map - (lambda (file) (propertize file 'origin dir)) + (lambda (file) + (propertize (file-name-sans-extension file) + 'origin dir)) (directory-files dir))) (-filter 'file-readable-p exec-path)))) (setq company-shell--cache (sort diff --git a/elpa/dash-20160306.1222/dash-pkg.el b/elpa/dash-20160306.1222/dash-pkg.el deleted file mode 100644 index 644d1f1..0000000 --- a/elpa/dash-20160306.1222/dash-pkg.el +++ /dev/null @@ -1 +0,0 @@ -(define-package "dash" "20160306.1222" "A modern list library for Emacs" 'nil :keywords '("lists")) diff --git a/elpa/dash-20160306.1222/dash-autoloads.el b/elpa/dash-20160619.611/dash-autoloads.el similarity index 81% rename from elpa/dash-20160306.1222/dash-autoloads.el rename to elpa/dash-20160619.611/dash-autoloads.el index 27c2f1c..f24a9d7 100644 --- a/elpa/dash-20160306.1222/dash-autoloads.el +++ b/elpa/dash-20160619.611/dash-autoloads.el @@ -3,7 +3,7 @@ ;;; Code: (add-to-list 'load-path (or (file-name-directory #$) (car load-path))) -;;;### (autoloads nil nil ("dash.el") (22297 19836 790973 907000)) +;;;### (autoloads nil nil ("dash.el") (22387 29373 79163 715000)) ;;;*** diff --git a/elpa/dash-20160619.611/dash-pkg.el b/elpa/dash-20160619.611/dash-pkg.el new file mode 100644 index 0000000..2d41f78 --- /dev/null +++ b/elpa/dash-20160619.611/dash-pkg.el @@ -0,0 +1 @@ +(define-package "dash" "20160619.611" "A modern list library for Emacs" 'nil :keywords '("lists")) diff --git a/elpa/dash-20160306.1222/dash.el b/elpa/dash-20160619.611/dash.el similarity index 97% rename from elpa/dash-20160306.1222/dash.el rename to elpa/dash-20160619.611/dash.el index 4c285f9..d10954b 100644 --- a/elpa/dash-20160306.1222/dash.el +++ b/elpa/dash-20160619.611/dash.el @@ -4,7 +4,7 @@ ;; Author: Magnar Sveen ;; Version: 2.12.1 -;; Package-Version: 20160306.1222 +;; Package-Version: 20160619.611 ;; Keywords: lists ;; This program is free software; you can redistribute it and/or modify @@ -72,12 +72,38 @@ special values." (setq it-index (1+ it-index)) (!cdr ,l))))) +(defmacro -doto (eval-initial-value &rest forms) + "Eval a form, then insert that form as the 2nd argument to other forms. +The EVAL-INITIAL-VALUE form is evaluated once. Its result is +passed to FORMS, which are then evaluated sequentially. Returns +the target form." + (declare (indent 1)) + (let ((retval (make-symbol "value"))) + `(let ((,retval ,eval-initial-value)) + ,@(mapcar (lambda (form) + (if (sequencep form) + `(,(-first-item form) ,retval ,@(cdr form)) + `(funcall form ,retval))) + forms) + ,retval))) + (defun -each (list fn) "Call FN with every item in LIST. Return nil, used for side-effects only." (--each list (funcall fn it))) (put '-each 'lisp-indent-function 1) +(defalias '--each-indexed '--each) + +(defun -each-indexed (list fn) + "Call (FN index item) for each item in LIST. + +In the anaphoric form `--each-indexed', the index is exposed as `it-index`. + +See also: `-map-indexed'." + (--each list (funcall fn it-index it))) +(put '-each-indexed 'lisp-indent-function 1) + (defmacro --each-while (list pred &rest body) "Anaphoric form of `-each-while'." (declare (debug (form form body)) @@ -271,7 +297,7 @@ See also: `-remove', `-map-first'" Alias: `-reject-last' See also: `-remove', `-map-last'" - (nreverse (-remove-first pred (nreverse list)))) + (nreverse (-remove-first pred (reverse list)))) (defmacro --remove-last (form list) "Anaphoric form of `-remove-last'." @@ -318,7 +344,9 @@ If you want to select the original items satisfying a predicate use `-filter'." (defun -map-indexed (fn list) "Return a new list consisting of the result of (FN index item) for each item in LIST. -In the anaphoric form `--map-indexed', the index is exposed as `it-index`." +In the anaphoric form `--map-indexed', the index is exposed as `it-index`. + +See also: `-each-indexed'." (--map-indexed (funcall fn it-index it) list)) (defmacro --map-when (pred rep list) @@ -362,7 +390,7 @@ See also: `-map-when', `-replace-first'" "Replace first item in LIST satisfying PRED with result of REP called on this item. See also: `-map-when', `-replace-last'" - (nreverse (-map-first pred rep (nreverse list)))) + (nreverse (-map-first pred rep (reverse list)))) (defmacro --map-last (pred rep list) "Anaphoric form of `-map-last'." @@ -544,11 +572,8 @@ Alias: `-any'" (defun -butlast (list) "Return a list of all items in list except for the last." - (let (result) - (while (cdr list) - (!cons (car list) result) - (!cdr list)) - (nreverse result))) + ;; no alias as we don't want magic optional argument + (butlast list)) (defmacro --count (pred list) "Anaphoric form of `-count'." @@ -665,7 +690,9 @@ section is returned. Defaults to 1." (nreverse new-list))) (defun -take (n list) - "Return a new list of the first N items in LIST, or all items if there are fewer than N." + "Return a new list of the first N items in LIST, or all items if there are fewer than N. + +See also: `-take-last'" (let (result) (--dotimes n (when list @@ -673,7 +700,23 @@ section is returned. Defaults to 1." (!cdr list))) (nreverse result))) -(defalias '-drop 'nthcdr "Return the tail of LIST without the first N items.") +(defun -take-last (n list) + "Return the last N items of LIST in order. + +See also: `-take'" + (copy-sequence (last list n))) + +(defalias '-drop 'nthcdr + "Return the tail of LIST without the first N items. + +See also: `-drop-last'") + +(defun -drop-last (n list) + "Remove the last N items of LIST and return a copy. + +See also: `-drop'" + ;; No alias because we don't want magic optional argument + (butlast list n)) (defmacro --take-while (form list) "Anaphoric form of `-take-while'." @@ -1825,7 +1868,7 @@ Alias: `-uniq'" (defalias '-uniq '-distinct) (defun -union (list list2) - "Return a new list containing the elements of LIST1 and elements of LIST2 that are not in LIST1. + "Return a new list containing the elements of LIST and elements of LIST2 that are not in LIST. The test for equality is done with `equal', or with `-compare-fn' if that's non-nil." ;; We fall back to iteration implementation if the comparison @@ -2213,6 +2256,8 @@ structure such as plist or alist." (let ((new-keywords '( "-each" "--each" + "-each-indexed" + "--each-indexed" "-each-while" "--each-while" "-dotimes" diff --git a/elpa/erlang-20151013.157/erlang-pkg.el b/elpa/erlang-20151013.157/erlang-pkg.el deleted file mode 100644 index 909a055..0000000 --- a/elpa/erlang-20151013.157/erlang-pkg.el +++ /dev/null @@ -1,4 +0,0 @@ -(define-package "erlang" "20151013.157" "Erlang major mode" 'nil) -;; Local Variables: -;; no-byte-compile: t -;; End: diff --git a/elpa/erlang-20151013.157/erlang-autoloads.el b/elpa/erlang-20160615.633/erlang-autoloads.el similarity index 95% rename from elpa/erlang-20151013.157/erlang-autoloads.el rename to elpa/erlang-20160615.633/erlang-autoloads.el index bea6be2..6515b08 100644 --- a/elpa/erlang-20151013.157/erlang-autoloads.el +++ b/elpa/erlang-20160615.633/erlang-autoloads.el @@ -3,7 +3,7 @@ ;;; Code: (add-to-list 'load-path (or (file-name-directory #$) (car load-path))) -;;;### (autoloads nil "erlang" "erlang.el" (22297 19833 531790 580000)) +;;;### (autoloads nil "erlang" "erlang.el" (22387 29371 497412 949000)) ;;; Generated autoloads from erlang.el (autoload 'erlang-mode "erlang" "\ @@ -118,8 +118,8 @@ editing control characters: ;;;*** -;;;### (autoloads nil "erlang-start" "erlang-start.el" (22297 19833 -;;;;;; 146797 463000)) +;;;### (autoloads nil "erlang-start" "erlang-start.el" (22387 29371 +;;;;;; 473431 317000)) ;;; Generated autoloads from erlang-start.el (let ((a '("\\.erl\\'" . erlang-mode)) (b '("\\.hrl\\'" . erlang-mode))) (or (assoc (car a) auto-mode-alist) (setq auto-mode-alist (cons a auto-mode-alist))) (or (assoc (car b) auto-mode-alist) (setq auto-mode-alist (cons b auto-mode-alist)))) @@ -131,8 +131,8 @@ editing control characters: ;;;*** ;;;### (autoloads nil nil ("erlang-eunit.el" "erlang-flymake.el" -;;;;;; "erlang-pkg.el" "erlang-skels-old.el" "erlang-skels.el" "erlang_appwiz.el") -;;;;;; (22297 19834 170483 735000)) +;;;;;; "erlang-pkg.el" "erlang-skels-old.el" "erlang-skels.el" "erlang-test.el" +;;;;;; "erlang_appwiz.el") (22387 29371 532912 630000)) ;;;*** diff --git a/elpa/erlang-20151013.157/erlang-eunit.el b/elpa/erlang-20160615.633/erlang-eunit.el similarity index 99% rename from elpa/erlang-20151013.157/erlang-eunit.el rename to elpa/erlang-20160615.633/erlang-eunit.el index a3c29c5..3b85e66 100644 --- a/elpa/erlang-20151013.157/erlang-eunit.el +++ b/elpa/erlang-20160615.633/erlang-eunit.el @@ -1,7 +1,7 @@ ;; ;; %CopyrightBegin% ;; -;; Copyright Ericsson AB 2009-2010. All Rights Reserved. +;; Copyright Ericsson AB 2009-2016. All Rights Reserved. ;; ;; Licensed under the Apache License, Version 2.0 (the "License"); ;; you may not use this file except in compliance with the License. diff --git a/elpa/erlang-20151013.157/erlang-flymake.el b/elpa/erlang-20160615.633/erlang-flymake.el similarity index 100% rename from elpa/erlang-20151013.157/erlang-flymake.el rename to elpa/erlang-20160615.633/erlang-flymake.el diff --git a/elpa/erlang-20160615.633/erlang-pkg.el b/elpa/erlang-20160615.633/erlang-pkg.el new file mode 100644 index 0000000..c90a8b7 --- /dev/null +++ b/elpa/erlang-20160615.633/erlang-pkg.el @@ -0,0 +1,4 @@ +(define-package "erlang" "20160615.633" "Erlang major mode" 'nil) +;; Local Variables: +;; no-byte-compile: t +;; End: diff --git a/elpa/erlang-20151013.157/erlang-skels-old.el b/elpa/erlang-20160615.633/erlang-skels-old.el similarity index 99% rename from elpa/erlang-20151013.157/erlang-skels-old.el rename to elpa/erlang-20160615.633/erlang-skels-old.el index c271cce..4087bc3 100644 --- a/elpa/erlang-20151013.157/erlang-skels-old.el +++ b/elpa/erlang-20160615.633/erlang-skels-old.el @@ -1,7 +1,7 @@ ;; ;; %CopyrightBegin% ;; -;; Copyright Ericsson AB 2010. All Rights Reserved. +;; Copyright Ericsson AB 2010-2016. All Rights Reserved. ;; ;; Licensed under the Apache License, Version 2.0 (the "License"); ;; you may not use this file except in compliance with the License. @@ -816,7 +816,7 @@ Please see the function `tempo-define-template'.") "%% Note: This directive should only be used in test suites." n "-compile(export_all)." n n - "-include_lib(\"test_server/include/test_server.hrl\")." n n + "-include_lib(\"common_test/include/ct.hrl\")." n n (erlang-skel-separator 2) "%% TEST SERVER CALLBACK FUNCTIONS" n diff --git a/elpa/erlang-20151013.157/erlang-skels.el b/elpa/erlang-20160615.633/erlang-skels.el similarity index 93% rename from elpa/erlang-20151013.157/erlang-skels.el rename to elpa/erlang-20160615.633/erlang-skels.el index 6880ec7..ce26c83 100644 --- a/elpa/erlang-20151013.157/erlang-skels.el +++ b/elpa/erlang-20160615.633/erlang-skels.el @@ -1,7 +1,7 @@ ;; ;; %CopyrightBegin% ;; -;; Copyright Ericsson AB 2010-2014. All Rights Reserved. +;; Copyright Ericsson AB 2010-2016. All Rights Reserved. ;; ;; Licensed under the Apache License, Version 2.0 (the "License"); ;; you may not use this file except in compliance with the License. @@ -56,6 +56,8 @@ erlang-skel-gen-event erlang-skel-header) ("gen_fsm" "gen-fsm" erlang-skel-gen-fsm erlang-skel-header) + ("gen_statem" "gen-statem" + erlang-skel-gen-statem erlang-skel-header) ("wx_object" "wx-object" erlang-skel-wx-object erlang-skel-header) ("Library module" "gen-lib" @@ -858,6 +860,122 @@ Please see the function `tempo-define-template'.") "*The template of a gen_fsm. Please see the function `tempo-define-template'.") +(defvar erlang-skel-gen-statem + '((erlang-skel-include erlang-skel-large-header) + "-behaviour(gen_statem)." n n + + "%% API" n + "-export([start_link/0])." n + n + "%% gen_statem callbacks" n + "-export([init/1, terminate/3, code_change/4])." n + "-export([state_name/3])." n + "-export([handle_event/4])." n + n + "-define(SERVER, ?MODULE)." n + n + "-record(data, {})." n + n + (erlang-skel-double-separator-start 3) + "%%% API" n + (erlang-skel-double-separator-end 3) n + (erlang-skel-separator-start 2) + "%% @doc" n + "%% Creates a gen_statem process which calls Module:init/1 to" n + "%% initialize. To ensure a synchronized start-up procedure, this" n + "%% function does not return until Module:init/1 has returned." n + "%%" n + (erlang-skel-separator-end 2) + "-spec start_link() ->" n> + "{ok, Pid :: pid()} |" n> + "ignore |" n> + "{error, Error :: term()}." n + "start_link() ->" n> + "gen_statem:start_link({local, ?SERVER}, ?MODULE, [], [])." n + n + (erlang-skel-double-separator-start 3) + "%%% gen_statem callbacks" n + (erlang-skel-double-separator-end 3) n + (erlang-skel-separator-start 2) + "%% @private" n + "%% @doc" n + "%% Whenever a gen_statem is started using gen_statem:start/[3,4] or" n + "%% gen_statem:start_link/[3,4], this function is called by the new" n + "%% process to initialize." n + (erlang-skel-separator-end 2) + "-spec init(Args :: term()) -> " n> + "{gen_statem:callback_mode()," n> + "State :: term(), Data :: term()} |" n> + "{gen_statem:callback_mode()," n> + "State :: term(), Data :: term()," n> + "[gen_statem:action()] | gen_statem:action()} |" n> + "ignore |" n> + "{stop, Reason :: term()}." n + "init([]) ->" n> + "{state_functions, state_name, #data{}}." n + n + (erlang-skel-separator-start 2) + "%% @private" n + "%% @doc" n + "%% If the gen_statem runs with CallbackMode =:= state_functions" n + "%% there should be one instance of this function for each possible" n + "%% state name. Whenever a gen_statem receives an event," n + "%% the instance of this function with the same name" n + "%% as the current state name StateName is called to" n + "%% handle the event." n + (erlang-skel-separator-end 2) + "-spec state_name(" n> + "gen_statem:event_type(), Msg :: term()," n> + "Data :: term()) ->" n> + "gen_statem:state_function_result(). " n + "state_name({call,Caller}, _Msg, Data) ->" n> + "{next_state, state_name, Data, [{reply,Caller,ok}]}." n + n + (erlang-skel-separator-start 2) + "%% @private" n + "%% @doc" n + "%% If the gen_statem runs with CallbackMode =:= handle_event_function" n + "%% this function is called for every event a gen_statem receives." n + (erlang-skel-separator-end 2) + "-spec handle_event(" n> + "gen_statem:event_type(), Msg :: term()," n> + "State :: term(), Data :: term()) ->" n> + "gen_statem:handle_event_result(). " n + "handle_event({call,From}, _Msg, State, Data) ->" n> + "{next_state, State, Data, [{reply,From,ok}]}." n + n + (erlang-skel-separator-start 2) + "%% @private" n + "%% @doc" n + "%% This function is called by a gen_statem when it is about to" n + "%% terminate. It should be the opposite of Module:init/1 and do any" n + "%% necessary cleaning up. When it returns, the gen_statem terminates with" n + "%% Reason. The return value is ignored." n + (erlang-skel-separator-end 2) + "-spec terminate(Reason :: term(), State :: term(), Data :: term()) ->" n> + "any()." n + "terminate(_Reason, _State, _Data) ->" n> + "void." n + n + (erlang-skel-separator-start 2) + "%% @private" n + "%% @doc" n + "%% Convert process state when code is changed" n + (erlang-skel-separator-end 2) + "-spec code_change(" n> + "OldVsn :: term() | {down,term()}," n> + "State :: term(), Data :: term(), Extra :: term()) ->" n> + "{ok, NewState :: term(), NewData :: term()}." n + "code_change(_OldVsn, State, Data, _Extra) ->" n> + "{ok, State, Data}." n + n + (erlang-skel-double-separator-start 3) + "%%% Internal functions" n + (erlang-skel-double-separator-end 3) + ) + "*The template of a gen_statem. +Please see the function `tempo-define-template'.") + (defvar erlang-skel-wx-object '((erlang-skel-include erlang-skel-large-header) "-behaviour(wx_object)." n n @@ -1070,7 +1188,7 @@ Please see the function `tempo-define-template'.") "%% Note: This directive should only be used in test suites." n "-compile(export_all)." n n - "-include_lib(\"test_server/include/test_server.hrl\")." n n + "-include_lib(\"common_test/include/ct.hrl\")." n n (erlang-skel-separator-start 2) "%% TEST SERVER CALLBACK FUNCTIONS" n diff --git a/elpa/erlang-20151013.157/erlang-start.el b/elpa/erlang-20160615.633/erlang-start.el similarity index 100% rename from elpa/erlang-20151013.157/erlang-start.el rename to elpa/erlang-20160615.633/erlang-start.el diff --git a/elpa/erlang-20160615.633/erlang-test.el b/elpa/erlang-20160615.633/erlang-test.el new file mode 100644 index 0000000..9a14663 --- /dev/null +++ b/elpa/erlang-20160615.633/erlang-test.el @@ -0,0 +1,122 @@ +;;; erlang-test.el -*- lexical-binding: t; coding: utf-8-unix -*- + +;;; Unit tests for erlang.el. + +;; Author: Johan Claesson +;; Created: 2016-05-07 +;; Keywords: erlang, languages + +;; %CopyrightBegin% +;; +;; Copyright Ericsson AB 2016. All Rights Reserved. +;; +;; Licensed under the Apache License, Version 2.0 (the "License"); +;; you may not use this file except in compliance with the License. +;; You may obtain a copy of the License at +;; +;; http://www.apache.org/licenses/LICENSE-2.0 +;; +;; Unless required by applicable law or agreed to in writing, software +;; distributed under the License is distributed on an "AS IS" BASIS, +;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +;; See the License for the specific language governing permissions and +;; limitations under the License. +;; +;; %CopyrightEnd% + + +;;; Commentary: + +;; This library require GNU Emacs 25 or later. + +;;; Code: + +(require 'ert) +(require 'cl-lib) +(require 'erlang) + +(defvar erlang-test-code + '((nil . "-module(erlang_test).") + (nil . "-import(lists, [map/2]).") + (nil . "-compile(export_all).") + ("SYMBOL" . "-define(SYMBOL, value).") + ("MACRO" . "-define(MACRO(X), X + X).") + ("struct" . "-record(struct, {until,maps,are,everywhere}).") + ("function". "function() -> #struct{}.")) + "Alist of erlang test code. +Each entry have the format (TAGNAME . ERLANG_CODE). If TAGNAME +is nil there is no definitions in the ERLANG_CODE. The +ERLANG_CODE is a single line of erlang code. These lines will be +concatenated to form an erlang file to test on.") + + +(ert-deftest erlang-test-tags () + (let* ((dir (make-temp-file "erlang-test" t)) + (erlang-file (expand-file-name "erlang_test.erl" dir)) + (tags-file (expand-file-name "TAGS" dir)) + tags-file-name tags-table-list erlang-buffer) + (unwind-protect + (progn + (erlang-test-create-erlang-file erlang-file) + (erlang-test-compile-tags erlang-file tags-file) + (setq erlang-buffer (find-file-noselect erlang-file)) + (with-current-buffer erlang-buffer + (setq-local tags-file-name tags-file)) + ;; Setting global tags-file-name is a workaround for + ;; GNU Emacs bug#23164. + (setq tags-file-name tags-file) + (erlang-test-completion-table) + (erlang-test-xref-find-definitions erlang-file erlang-buffer)) + (when (buffer-live-p erlang-buffer) + (kill-buffer erlang-buffer)) + (let ((tags-buffer (find-buffer-visiting tags-file))) + (when (buffer-live-p tags-buffer) + (kill-buffer tags-buffer))) + (when (file-exists-p dir) + (delete-directory dir t))))) + +(defun erlang-test-create-erlang-file (erlang-file) + (with-temp-file erlang-file + (cl-loop for (_ . code) in erlang-test-code + do (insert code "\n")))) + +(defun erlang-test-compile-tags (erlang-file tags-file) + (should (zerop (call-process "etags" nil nil nil + "-o" tags-file + erlang-file)))) + +(defun erlang-test-completion-table () + (let ((erlang-replace-etags-tags-completion-table t)) + (setq tags-completion-table nil) + (tags-completion-table)) + (should (equal (sort tags-completion-table #'string-lessp) + (sort (erlang-expected-completion-table) #'string-lessp)))) + +(defun erlang-expected-completion-table () + (append (cl-loop for (symbol . _) in erlang-test-code + when (stringp symbol) + append (list symbol (concat "erlang_test:" symbol))) + (list "erlang_test:" "erlang_test:module_info"))) + +(defun erlang-test-xref-find-definitions (erlang-file erlang-buffer) + (cl-loop for (tagname . code) in erlang-test-code + for line = 1 then (1+ line) + do (when tagname + (switch-to-buffer erlang-buffer) + (xref-find-definitions tagname) + (erlang-test-verify-pos erlang-file line) + (xref-find-definitions (concat "erlang_test:" tagname)) + (erlang-test-verify-pos erlang-file line))) + (xref-find-definitions "erlang_test:") + (erlang-test-verify-pos erlang-file 1)) + +(defun erlang-test-verify-pos (expected-file expected-line) + (should (string-equal (file-truename expected-file) + (file-truename (buffer-file-name)))) + (should (eq expected-line (line-number-at-pos))) + (should (= (point-at-bol) (point)))) + + +(provide 'erlang-test) + +;;; erlang-test.el ends here diff --git a/elpa/erlang-20151013.157/erlang.el b/elpa/erlang-20160615.633/erlang.el similarity index 93% rename from elpa/erlang-20151013.157/erlang.el rename to elpa/erlang-20160615.633/erlang.el index 466bf13..a206218 100644 --- a/elpa/erlang-20151013.157/erlang.el +++ b/elpa/erlang-20160615.633/erlang.el @@ -7,7 +7,7 @@ ;; %CopyrightBegin% ;; -;; Copyright Ericsson AB 1996-2014. All Rights Reserved. +;; Copyright Ericsson AB 1996-2016. All Rights Reserved. ;; ;; Licensed under the Apache License, Version 2.0 (the "License"); ;; you may not use this file except in compliance with the License. @@ -70,8 +70,8 @@ ;; `debug-on-error' to `t'. Repeat the error and enclose the debug ;; information in your bug-report. ;; -;; To set the variable you can use the following command: -;; M-x set-variable RET debug-on-error RET t RET +;; To toggle the variable you can use the following command: +;; M-x toggle-debug-on-error RET ;;; Code: (eval-when-compile (require 'cl)) @@ -897,6 +897,7 @@ resulting regexp is surrounded by \\_< and \\_>." "get_module_info" "get_stacktrace" "hash" + "has_prepared_code_on_load" "hibernate" "insert_element" "is_builtin" @@ -970,7 +971,7 @@ resulting regexp is surrounded by \\_< and \\_>." (defvar erlang-defun-prompt-regexp (concat "^" erlang-atom-regexp "\\s *(") "Regexp which should match beginning of a clause.") -(defvar erlang-file-name-extension-regexp "\\.[eh]rl$" +(defvar erlang-file-name-extension-regexp "\\.erl$" "*Regexp which should match an Erlang file name. This regexp is used when an Erlang module name is extracted from the @@ -1067,8 +1068,14 @@ behaviour.") "Font lock keyword highlighting a function header.") (defface erlang-font-lock-exported-function-name-face - '((default (:inherit font-lock-function-name-face))) - "Face used for highlighting exported functions.") + (if (featurep 'xemacs) + (progn + (require 'font-lock) + `((t (:foreground ,(face-foreground 'font-lock-function-name-face)) + (:background ,(face-background 'font-lock-function-name-face))))) + '((default (:inherit font-lock-function-name-face)))) + "Face used for highlighting exported functions." + :group 'erlang) (defvar erlang-font-lock-exported-function-name-face 'erlang-font-lock-exported-function-name-face) @@ -1284,6 +1291,11 @@ Unfortunately, XEmacs hasn't got support for a special Font Lock syntax table. The effect is that `apply' in the atom `foo_apply' will be highlighted as a bif.") +(defvar erlang-replace-etags-tags-completion-table nil + "Internal flag used by advice `erlang-replace-tags-table'. +This is non-nil when `etags-tags-completion-table' should be +replaced by `erlang-etags-tags-completion-table'.") + ;;; Avoid errors while compiling this file. @@ -1337,14 +1349,22 @@ Lock syntax table. The effect is that `apply' in the atom (defun erlang-version () "Return the current version of Erlang mode." (interactive) - (if (interactive-p) + (if (erlang-interactive-p) (message "Erlang mode version %s, written by Anders Lindgren" erlang-version)) erlang-version) +(defun erlang-interactive-p () + (if (fboundp 'called-interactively-p) + (called-interactively-p 'interactive) + (funcall (symbol-function 'interactive-p)))) + +(unless (fboundp 'prog-mode) + (defun prog-mode () + (use-local-map (make-keymap)))) ;;;###autoload -(defun erlang-mode () +(define-derived-mode erlang-mode prog-mode "Erlang" "Major mode for editing Erlang source files in Emacs. It knows about syntax and comment, it can indent code, it is capable of fontifying the source file, the TAGS commands are aware of Erlang @@ -1403,12 +1423,9 @@ and examples of hooks. Other commands: \\{erlang-mode-map}" - (interactive) - (kill-all-local-variables) - (setq major-mode 'erlang-mode) - (setq mode-name "Erlang") + ;; Use our own syntax table function + :syntax-table nil (erlang-syntax-table-init) - (use-local-map erlang-mode-map) (erlang-electric-init) (erlang-menu-init) (erlang-mode-variables) @@ -1417,13 +1434,13 @@ Other commands: (erlang-tags-init) (erlang-font-lock-init) (erlang-skel-init) - (tempo-use-tag-list 'erlang-tempo-tags) + (when (fboundp 'tempo-use-tag-list) + (tempo-use-tag-list 'erlang-tempo-tags)) + (when (boundp 'xref-backend-functions) + (add-hook 'xref-backend-functions #'erlang-etags--xref-backend nil t)) (run-hooks 'erlang-mode-hook) (if (zerop (buffer-size)) - (run-hooks 'erlang-new-file-hook)) - ;; Doesn't exist in Emacs v21.4; required by Emacs v23. - (if (boundp 'after-change-major-mode-hook) - (run-hooks 'after-change-major-mode-hook))) + (run-hooks 'erlang-new-file-hook))) ;;;###autoload (dolist (r '("\\.erl$" "\\.app\\.src$" "\\.escript" @@ -1531,7 +1548,9 @@ Other commands: (set (make-local-variable 'outline-regexp) "[[:lower:]0-9_]+ *(.*) *-> *$") (set (make-local-variable 'outline-level) (lambda () 1)) (set (make-local-variable 'add-log-current-defun-function) - 'erlang-current-defun)) + 'erlang-current-defun) + (set (make-local-variable 'find-tag-default-function) + 'erlang-find-tag-for-completion)) (defun erlang-font-lock-init () "Initialize Font Lock for Erlang mode." @@ -1542,7 +1561,9 @@ Other commands: table))) (set (make-local-variable 'font-lock-syntax-table) erlang-font-lock-syntax-table) - (set (make-local-variable 'font-lock-beginning-of-syntax-function) + (set (make-local-variable (if (boundp 'syntax-begin-function) + 'syntax-begin-function + 'font-lock-beginning-of-syntax-function)) 'erlang-beginning-of-clause) (make-local-variable 'font-lock-keywords) (let ((level (cond ((boundp 'font-lock-maximum-decoration) @@ -2250,6 +2271,7 @@ mode with the command `M-x erlang-mode RET'."))) ;; This code is based on the package `tempo' which is part of modern ;; Emacsen. (GNU Emacs 19.25 (?) and XEmacs 19.14.) +(defvar erlang-skel) (defun erlang-skel-init () "Generate the skeleton functions and menu items. The variable `erlang-skel' contains the name and descriptions of @@ -2976,8 +2998,9 @@ Return nil if inside string, t if in a comment." (current-column))) ;; Type and Spec indentation ((eq (car stack-top) '::) - (if (looking-at "}") - ;; Closing record definition with types + (if (looking-at "[},)]") + ;; Closing function spec, record definition with types, + ;; or a comma at the start of the line ;; pop stack and recurse (erlang-calculate-stack-indent indent-point (cons (erlang-pop stack) (cdr state))) @@ -3748,6 +3771,12 @@ In the future the list may contain more elements." (if (assoc fk (cdr (car imports))) (setq mod (car (car imports))) (setq imports (cdr imports)))) + (cond ((eq (preceding-char) ?#) + (setq fk (concat "-record(" fk))) + ((eq (preceding-char) ??) + (setq fk (concat "-define(" fk))) + ((and (null mod) (not (member fk erlang-int-bifs))) + (setq mod (erlang-get-module)))) (setq res (list mod fk))))) (store-match-data md) res))) @@ -3818,20 +3847,19 @@ exported function." (defun erlang-check-module-name-init () "Initialize the functionality to compare file and module names. -Unless we have `before-save-hook', we redefine the function +Unless we have `before-save-hook', we advice the function `set-visited-file-name' since it clears the variable -`local-write-file-hooks'. The original function definition is -stored in `erlang-orig-set-visited-file-name'." +`local-write-file-hooks'." (if (boundp 'before-save-hook) - ;; If we have that, `make-local-hook' is obsolete. (add-hook 'before-save-hook 'erlang-check-module-name nil t) (require 'advice) - (unless (ad-advised-definition-p 'set-visited-file-name) - (defadvice set-visited-file-name (after erlang-set-visited-file-name - activate) - (if (eq major-mode 'erlang-mode) - (add-hook 'local-write-file-hooks 'erlang-check-module-name)))) - (add-hook 'local-write-file-hooks 'erlang-check-module-name))) + (when (fboundp 'ad-advised-definition-p) + (unless (ad-advised-definition-p 'set-visited-file-name) + (defadvice set-visited-file-name (after erlang-set-visited-file-name + activate) + (if (eq major-mode 'erlang-mode) + (add-hook 'local-write-file-hooks 'erlang-check-module-name)))) + (add-hook 'local-write-file-hooks 'erlang-check-module-name)))) (defun erlang-check-module-name () @@ -3908,7 +3936,7 @@ non-whitespace characters following the point on the current line." (newline) (if (condition-case nil (progn (erlang-indent-line) t) - (error (if (bolp) (delete-backward-char 1)))) + (error (if (bolp) (delete-char -1)))) (if (not (bolp)) (save-excursion (insert " ->")) @@ -3920,7 +3948,7 @@ non-whitespace characters following the point on the current line." (beginning-of-line) (newline erlang-electric-semicolon-insert-blank-lines)))) - (error (if (bolp) (delete-backward-char 1)))))))) + (error (if (bolp) (delete-char -1)))))))) (defun erlang-electric-comma (&optional arg) @@ -3950,7 +3978,7 @@ non-whitespace characters following the point on the current line." (newline) (condition-case nil (erlang-indent-line) - (error (if (bolp) (delete-backward-char 1)))))) + (error (if (bolp) (delete-char -1)))))) (defun erlang-electric-lt (&optional arg) "Insert a less-than sign, and optionally mark it as an open paren." @@ -4036,7 +4064,7 @@ non-whitespace characters following the point on the current line." (newline) (condition-case nil (erlang-indent-line) - (error (if (bolp) (delete-backward-char 1)))))) + (error (if (bolp) (delete-char -1)))))) ;; Then it's just a plain greater-than. (t @@ -4076,7 +4104,7 @@ After being split/merged into `erlang-after-arrow' and (newline) (condition-case nil (erlang-indent-line) - (error (if (bolp) (delete-backward-char 1))))))) + (error (if (bolp) (delete-char -1))))))) (defun erlang-electric-newline (&optional arg) @@ -4341,12 +4369,12 @@ works under XEmacs.)" (require 'etags) ;; Test on a function available in the Emacs 19 version ;; of tags but not in the XEmacs version. - (if (not (fboundp 'find-tag-noselect)) - () + (when (fboundp 'find-tag-noselect) (erlang-tags-define-keys (current-local-map)) (setq erlang-tags-installed t))))) + ;; Set all keys bound to `find-tag' et.al. in the global map and the ;; menu to `erlang-find-tag' et.al. in `map'. ;; @@ -4369,10 +4397,6 @@ works under XEmacs.)" (erlang-menu-init)) -;; There exists a variable `find-tag-default-function'. It is not used -;; since `complete-tag' uses it to get current word under point. In that -;; situation we don't want the module to be prepended. - (defun erlang-find-tag-default () "Return the default tag. Search `-import' list of imported functions. @@ -4552,6 +4576,11 @@ Tags can be given on the forms `tag', `module:', `module:tag'." (current-buffer))) ; Return the new buffer. + + + + + ;; Process interactive arguments for erlang-find-tag-*. ;; ;; Negative arguments work only for `etags', not `tags'. This is not @@ -4645,9 +4674,25 @@ Tags can be given on the forms `tag', `module:', `module:tag'." (set (make-local-variable 'find-tag-regexp-search-function) 'erlang-tags-regexp-search-forward) (set (make-local-variable 'find-tag-tag-order) - '(erlang-tag-match-module-p)) + (mapcar #'erlang-make-order-function-aware-of-modules + erlang-tags-orig-tag-order)) (set (make-local-variable 'find-tag-regexp-tag-order) - '(erlang-tag-match-module-regexp-p)))) + (mapcar #'erlang-make-order-function-aware-of-modules + erlang-tags-orig-regexp-tag-order)))) + +(defun erlang-make-order-function-aware-of-modules (f) + `(lambda (tag) + (let (mod) + (when (string-match ":" tag) + (setq mod (substring tag 0 (match-beginning 0))) + (setq tag (substring tag (match-end 0) nil))) + (and (funcall ',f tag) + (or (null mod) + (erlang-tag-at-point-match-module-p mod)))))) + +(defun erlang-tag-at-point-match-module-p (mod) + (string-equal mod (erlang-get-module-from-file-name + (funcall (symbol-function 'file-of-tag))))) (defun erlang-tags-remove-module-check () @@ -4724,61 +4769,34 @@ for a tag on the form `module:tag'." (funcall erlang-tags-orig-regexp-search-function tag bound noerror count))) - -;; t if point is at a tag line that matches TAG, containing -;; module information. Assumes that all other order functions -;; are stored in `erlang-tags-orig-[regex]-tag-order'. - -(defun erlang-tag-match-module-p (tag) - (erlang-tag-match-module-common-p tag erlang-tags-orig-tag-order)) - -(defun erlang-tag-match-module-regexp-p (tag) - (erlang-tag-match-module-common-p tag erlang-tags-orig-regexp-tag-order)) - -(defun erlang-tag-match-module-common-p (tag order) - (let ((mod nil) - (found nil)) - (if (string-match ":" tag) - (progn - (setq mod (substring tag 0 (match-beginning 0))) - (setq tag (substring tag (match-end 0) nil)))) - (while (and order (not found)) - (setq found - (and (not (memq (car order) - '(erlang-tag-match-module-p - erlang-tag-match-module-regexp-p))) - (funcall (car order) tag))) - (setq order (cdr order))) - (and found - (or (null mod) - (string= mod (erlang-get-module-from-file-name - (file-of-tag))))))) - - ;;; Tags completion, Emacs 19 `etags' specific. ;;; ;;; The basic idea is to create a second completion table `erlang-tags- ;;; completion-table' containing all normal tags plus tags on the form -;;; `module:tag'. +;;; `module:tag' and `module:'. - -(when (and (fboundp 'etags-tags-completion-table) +;; PENDING - Should probably make use of the +;; `completion-at-point-functions' hook instead of this advice. +(when (and (locate-library "etags") + (require 'etags) + (fboundp 'etags-tags-completion-table) (fboundp 'tags-lazy-completion-table)) ; Emacs 23.1+ (if (fboundp 'advice-add) ;; Emacs 24.4+ (advice-add 'etags-tags-completion-table :around (lambda (oldfun) - (if (eq find-tag-default-function 'erlang-find-tag-for-completion) + (if erlang-replace-etags-tags-completion-table (erlang-etags-tags-completion-table) (funcall oldfun))) (list :name 'erlang-replace-tags-table)) ;; Emacs 23.1-24.3 - (defadvice etags-tags-completion-table (around erlang-replace-tags-table activate) - (if (eq find-tag-default-function 'erlang-find-tag-for-completion) + (defadvice etags-tags-completion-table (around + erlang-replace-tags-table + activate) + (if erlang-replace-etags-tags-completion-table (setq ad-return-value (erlang-etags-tags-completion-table)) ad-do-it)))) - (defun erlang-complete-tag () "Perform tags completion on the text around point. Completes to the set of names listed in the current tags table. @@ -4792,23 +4810,19 @@ about Erlang modules." (cond ((and erlang-tags-installed (fboundp 'etags-tags-completion-table) (fboundp 'tags-lazy-completion-table)) ; Emacs 23.1+ - ;; This depends on the advice called erlang-replace-tags-table - ;; above. It is not enough to let-bind - ;; tags-completion-table-function since that will not override - ;; the buffer-local value in the TAGS buffer. - (let ((find-tag-default-function 'erlang-find-tag-for-completion)) + (let ((erlang-replace-etags-tags-completion-table t)) (complete-tag))) ((and erlang-tags-installed - (fboundp 'complete-tag) - (fboundp 'tags-complete-tag)) ; Emacs 19 + (fboundp 'complete-tag) + (fboundp 'tags-complete-tag)) ; Emacs 19-22 (let ((orig-tags-complete-tag (symbol-function 'tags-complete-tag))) (fset 'tags-complete-tag (symbol-function 'erlang-tags-complete-tag)) (unwind-protect - (funcall (symbol-function 'complete-tag)) + (complete-tag) (fset 'tags-complete-tag orig-tags-complete-tag)))) ((fboundp 'complete-tag) ; Emacs 19 - (funcall (symbol-function 'complete-tag))) + (complete-tag)) ((fboundp 'tag-complete-symbol) ; XEmacs (funcall (symbol-function 'tag-complete-symbol))) (t @@ -4823,19 +4837,22 @@ about Erlang modules." (buffer-substring-no-properties start (point))))) - ;; Based on `tags-complete-tag', but this one uses ;; `erlang-tags-completion-table' instead of `tags-completion-table'. ;; ;; This is the entry-point called by system function `completing-read'. +;; +;; Used for minibuffer completion in Emacs 19-24 and completion in +;; erlang buffers in Emacs 19-22. (defun erlang-tags-complete-tag (string predicate what) - (save-excursion - ;; If we need to ask for the tag table, allow that. - (let ((enable-recursive-minibuffers t)) - (visit-tags-table-buffer)) + (with-current-buffer (window-buffer (minibuffer-selected-window)) + (save-excursion + ;; If we need to ask for the tag table, allow that. + (let ((enable-recursive-minibuffers t)) + (visit-tags-table-buffer)) (if (eq what t) (all-completions string (erlang-tags-completion-table) predicate) - (try-completion string (erlang-tags-completion-table) predicate)))) + (try-completion string (erlang-tags-completion-table) predicate))))) ;; `tags-completion-table' calls itself recursively, make it @@ -4853,7 +4870,6 @@ about Erlang modules." (fset 'tags-completion-table erlang-tags-orig-completion-table))) - (defun erlang-tags-completion-table-1 () (make-local-variable 'erlang-tags-completion-table) (or erlang-tags-completion-table @@ -4864,59 +4880,190 @@ about Erlang modules." (setq erlang-tags-completion-table tags-completion-table)))) + +;; Emacs 25 expects this function to return a list (and it is ok for +;; it to include duplicates). Older emacsen expects an obarray. +(defun erlang-etags-tags-completion-table () + (if (>= emacs-major-version 25) + (erlang-etags-tags-completion-table-list) + (let ((obarray (make-vector 511 0))) + (dolist (tag (erlang-etags-tags-completion-table-list)) + (intern tag obarray)) + obarray))) + ;; Based on `etags-tags-completion-table'. The difference is that we -;; add three symbols to the vector, the tag, module: and module:tag. +;; add three strings to the list, the tag, module: and module:tag. ;; The module is extracted from the file name of a tag. (This one ;; only works if we are looking at an `etags' file. However, this is ;; the only format supported by Emacs, so far.) -(defun erlang-etags-tags-completion-table () - (let ((table (make-vector 511 0)) - (file nil) - (progress-reporter - (when (fboundp 'make-progress-reporter) - (make-progress-reporter - (format "Making erlang tags completion table for %s..." buffer-file-name) - (point-min) (point-max))))) +(defun erlang-etags-tags-completion-table-list () + (let ((progress-reporter + (make-progress-reporter + (format "Making tags completion table for %s..." buffer-file-name) + (point-min) (point-max))) + table module) (save-excursion (goto-char (point-min)) - ;; This monster regexp matches an etags tag line. - ;; \1 is the string to match; - ;; \2 is not interesting; - ;; \3 is the guessed tag name; XXX guess should be better eg DEFUN - ;; \4 is not interesting; - ;; \5 is the explicitly-specified tag name. - ;; \6 is the line to start searching at; - ;; \7 is the char to start searching at. (while (progn - (while (and - (eq (following-char) ?\f) - (looking-at "\f\n\\([^,\n]*\\),.*\n")) - (setq file (buffer-substring - (match-beginning 1) (match-end 1))) - (goto-char (match-end 0))) + (while (and (eq (following-char) ?\f) + (looking-at "\f\n\\([^,\n]*\\),.*\n")) + (let ((file (buffer-substring (match-beginning 1) + (match-end 1)))) + (setq module (erlang-get-module-from-file-name file)) + (when module + (push (concat module ":") table) + (push (concat module ":module_info") table)) + (forward-line 2))) + ;; This regexp matches an explicit tag name or the + ;; place where it would start. (re-search-forward - "\ -^\\(\\([^\177]+[^-a-zA-Z0-9_$\177]+\\)?\\([-a-zA-Z0-9_$?:]+\\)\ -\[^-a-zA-Z0-9_$?:\177]*\\)\177\\(\\([^\n\001]+\\)\001\\)?\ -\\([0-9]+\\)?,\\([0-9]+\\)?\n" + "[\f\t\n\r()=,; ]?\177\\\(?:\\([^\n\001]+\\)\001\\)?" nil t)) - (let ((tag (if (match-beginning 5) + (let ((tag (if (match-beginning 1) ;; There is an explicit tag name. - (buffer-substring (match-beginning 5) (match-end 5)) - ;; No explicit tag name. Best guess. - (buffer-substring (match-beginning 3) (match-end 3)))) - (module (and file - (erlang-get-module-from-file-name file)))) - (intern tag table) + (buffer-substring (match-beginning 1) (match-end 1)) + ;; No explicit tag name. Backtrack a little, + ;; and look for the implicit one. + (goto-char (match-beginning 0)) + (skip-chars-backward "^\f\t\n\r()=,; ") + (buffer-substring (point) (match-beginning 0))))) + (forward-line 1) + (push tag table) (when (stringp module) - (intern (concat module ":" tag) table) - ;; Only the first ones will be stored in the table. - (intern (concat module ":") table) - (intern (concat module ":module_info") table)) - (when progress-reporter - (progress-reporter-update progress-reporter (point)))))) + (push (concat module ":" tag) table)) + (progress-reporter-update progress-reporter (point))))) table)) + + + +;;; Xref backend erlang-etags + +;; In GNU Emacs 25 xref was introduced. It is a framework for cross +;; referencing commands, in particular commands for finding +;; definitions. It does not replace etags. It rather resides on top +;; of it and provides user-friendly commands. The idea is that the +;; user commands should be the same regardless of what backend does +;; the actual finding of definitions. + +;; The backend below is a wrapper around the built-in etags backend. +;; It adds awareness of the module:tag syntax in a similar way that is +;; done above for the old etags commands. + + +(defun erlang-etags--xref-backend () 'erlang-etags) + +(defun erlang-soft-require (feature) + (when (locate-library (symbol-name feature)) + (require feature))) + +(and (erlang-soft-require 'xref) + (erlang-soft-require 'cl-generic) + ;; The purpose of using eval here is to avoid compilation + ;; warnings in emacsen without cl-defmethod. + (eval + '(progn + (cl-defmethod xref-backend-identifier-at-point + ((_backend (eql erlang-etags))) + (erlang-find-tag-default)) + + (cl-defmethod xref-backend-definitions + ((_backend (eql erlang-etags)) identifier) + (erlang-xref-find-definitions identifier)) + + (cl-defmethod xref-backend-apropos + ((_backend (eql erlang-etags)) identifier) + (erlang-xref-find-definitions identifier t)) + + (cl-defmethod xref-backend-identifier-completion-table + ((_backend (eql erlang-etags))) + (let ((erlang-replace-etags-tags-completion-table t)) + (tags-completion-table)))))) + + + + +(defun erlang-xref-find-definitions (identifier &optional is-regexp) + (let ((id-list (split-string identifier ":"))) + (cond + ;; Handle "tag" + ((null (cdr id-list)) + (erlang-xref-find-definitions-tag identifier is-regexp)) + ;; Handle "module:" + ((string-equal (cadr id-list) "") + (erlang-xref-find-definitions-module (car id-list))) + ;; Handle "module:tag" + (t + (erlang-xref-find-definitions-module-tag (car id-list) + (cadr id-list) + is-regexp))))) + +(defun erlang-xref-find-definitions-tag (tag is-regexp) + "Find all definitions of TAG and reorder them so that +definitions in the currently visited file comes first." + (when (fboundp 'etags--xref-find-definitions) + (let* ((current-file (and (buffer-file-name) + (file-truename (buffer-file-name)))) + (xrefs (etags--xref-find-definitions tag is-regexp)) + local-xrefs non-local-xrefs) + (while xrefs + (if (string-equal (erlang-xref-truename-file (car xrefs)) + current-file) + (push (car xrefs) local-xrefs) + (push (car xrefs) non-local-xrefs)) + (setq xrefs (cdr xrefs))) + (append (reverse local-xrefs) + (reverse non-local-xrefs))))) + +(defun erlang-xref-find-definitions-module (module) + (and (fboundp 'xref-make) + (fboundp 'xref-make-file-location) + (let* ((first-time t) + xrefs matching-files) + (save-excursion + (while (visit-tags-table-buffer (not first-time)) + (setq first-time nil) + (let ((files (tags-table-files))) + (while files + (let* ((file (car files)) + (m (erlang-get-module-from-file-name file))) + (when (and m (string-equal m module)) + (unless (member file matching-files) + (push file + matching-files) + (push (xref-make file + (xref-make-file-location file 1 0)) + xrefs)))) + (setq files (cdr files)))))) + (nreverse xrefs)))) + +(defun erlang-xref-find-definitions-module-tag (module tag is-regexp) + "Find all definitions of TAG and filter away definitions +outside of MODULE." + (when (fboundp 'etags--xref-find-definitions) + (let ((xrefs (etags--xref-find-definitions tag is-regexp)) + xrefs-in-module) + (while xrefs + (when (string-equal module (erlang-xref-module (car xrefs))) + (push (car xrefs) xrefs-in-module)) + (setq xrefs (cdr xrefs))) + xrefs-in-module))) + +(defun erlang-xref-module (xref) + (erlang-get-module-from-file-name (erlang-xref-file xref))) + +(defun erlang-xref-truename-file (xref) + (let ((file (erlang-xref-file xref))) + (and file + (file-truename file)))) + +(defun erlang-xref-file (xref) + (and (fboundp 'xref-location-group) + (fboundp 'xref-item-location) + (xref-location-group (xref-item-location xref)))) + + + ;;; ;;; Prepare for other methods to run an Erlang slave process. ;;; @@ -5315,8 +5462,7 @@ frame will become deselected before the next command." () (or (inferior-erlang-running-p) (error "No inferior Erlang shell is running")) - (save-excursion - (set-buffer inferior-erlang-buffer) + (with-current-buffer inferior-erlang-buffer (let ((msg nil)) (while (save-excursion (goto-char (process-mark inferior-erlang-process)) @@ -5336,8 +5482,7 @@ frame will become deselected before the next command." The empty command resembles hitting RET. This is useful in some situations, for instance if a crash or error report from sasl has been printed after the last prompt." - (save-excursion - (set-buffer inferior-erlang-buffer) + (with-current-buffer inferior-erlang-buffer (if (> (point-max) 1) ;; make sure we get a prompt if buffer contains data (if (save-excursion @@ -5403,7 +5548,7 @@ Return the position after the newly inserted command." (boundp 'comint-last-output-start)) (save-excursion (goto-char - (if (interactive-p) + (if (erlang-interactive-p) (symbol-value 'comint-last-input-end) (symbol-value 'comint-last-output-start))) (while (progn (skip-chars-forward "^\C-h") @@ -5422,7 +5567,7 @@ Return the position after the newly inserted command." (let ((pmark (process-mark (get-buffer-process (current-buffer))))) (save-excursion (goto-char - (if (interactive-p) + (if (erlang-interactive-p) (symbol-value 'comint-last-input-end) (symbol-value 'comint-last-output-start))) (while (re-search-forward "\r+$" pmark t) @@ -5449,23 +5594,21 @@ There exists two workarounds for this bug: (save-some-buffers) (inferior-erlang-prepare-for-input) (let* ((dir (inferior-erlang-compile-outdir)) -;;; (file (file-name-nondirectory (buffer-file-name))) (noext (substring (erlang-local-buffer-file-name) 0 -4)) (opts (append (list (cons 'outdir dir)) (if current-prefix-arg (list 'debug_info 'export_all)) erlang-compile-extra-opts)) end) - (save-excursion - (set-buffer inferior-erlang-buffer) - (compilation-forget-errors)) + (with-current-buffer inferior-erlang-buffer + (when (fboundp 'compilation-forget-errors) + (compilation-forget-errors))) (setq end (inferior-erlang-send-command (inferior-erlang-compute-compile-command noext opts) nil)) (sit-for 0) (inferior-erlang-wait-prompt) - (save-excursion - (set-buffer inferior-erlang-buffer) + (with-current-buffer inferior-erlang-buffer (setq compilation-error-list nil) (set-marker compilation-parsing-end end)) (setq compilation-last-buffer inferior-erlang-buffer))) @@ -5505,7 +5648,8 @@ unless the optional NO-DISPLAY is non-nil." (let ((ccfn erlang-compile-command-function-alist) (res (inferior-erlang-compute-erl-compile-command module-name opts)) ccfn-entry - done) + done + result) (if (not (null (erlang-local-buffer-file-name))) (while (and (not done) (not (null ccfn))) (setq ccfn-entry (car ccfn)) @@ -5635,12 +5779,14 @@ unless the optional NO-DISPLAY is non-nil." (tramp-tramp-file-p (buffer-file-name)))) (defun erlang-tramp-get-localname () - (let ((tramp-info (tramp-dissect-file-name (buffer-file-name)))) - (if (fboundp 'tramp-file-name-localname) - (tramp-file-name-localname tramp-info) - ;; In old versions of tramp, it was `tramp-file-name-path' - ;; instead of the newer `tramp-file-name-localname' - (tramp-file-name-path tramp-info)))) + (when (fboundp 'tramp-dissect-file-name) + (let ((tramp-info (tramp-dissect-file-name (buffer-file-name)))) + (if (fboundp 'tramp-file-name-localname) + (tramp-file-name-localname tramp-info) + ;; In old versions of tramp, it was `tramp-file-name-path' + ;; instead of the newer `tramp-file-name-localname' + (when (fboundp 'tramp-file-name-path) + (tramp-file-name-path tramp-info)))))) ;; `next-error' only accepts buffers with major mode `compilation-mode' ;; or with the minor mode `compilation-minor-mode' activated. @@ -5657,16 +5803,14 @@ Capable of finding error messages in an inferior Erlang buffer." (and (boundp 'compilation-last-buffer) compilation-last-buffer)))) (if (and (bufferp buf) - (save-excursion - (set-buffer buf) + (with-current-buffer buf (and (eq major-mode 'erlang-shell-mode) (setq major-mode 'compilation-mode)))) (unwind-protect (progn (setq done t) (next-error argp)) - (save-excursion - (set-buffer buf) + (with-current-buffer buf (setq major-mode 'erlang-shell-mode)))) (or done (next-error argp)))) @@ -5769,7 +5913,7 @@ Simplified version of a combination `defalias' and `make-obsolete', it assumes that NEWDEF is loaded." (defalias sym (symbol-function newdef)) (if (fboundp 'make-obsolete) - (make-obsolete sym newdef))) + (make-obsolete sym newdef "long ago"))) (erlang-obsolete 'calculate-erlang-indent 'erlang-calculate-indent) @@ -5787,11 +5931,8 @@ it assumes that NEWDEF is loaded." (erlang-obsolete 'name-of-erlang-function 'erlang-name-of-function) -;; Fixme: shouldn't redefine `set-visited-file-name' anyhow -- see above. (defconst erlang-unload-hook (list (lambda () - (defalias 'set-visited-file-name - 'erlang-orig-set-visited-file-name) (when (featurep 'advice) (ad-unadvise 'Man-notify-when-ready) (ad-unadvise 'set-visited-file-name))))) diff --git a/elpa/erlang-20151013.157/erlang_appwiz.el b/elpa/erlang-20160615.633/erlang_appwiz.el similarity index 100% rename from elpa/erlang-20151013.157/erlang_appwiz.el rename to elpa/erlang-20160615.633/erlang_appwiz.el diff --git a/elpa/ggtags-20151214.1344/ggtags-autoloads.el b/elpa/ggtags-20160617.1840/ggtags-autoloads.el similarity index 94% rename from elpa/ggtags-20151214.1344/ggtags-autoloads.el rename to elpa/ggtags-20160617.1840/ggtags-autoloads.el index 7a4aed4..ea53ff0 100644 --- a/elpa/ggtags-20151214.1344/ggtags-autoloads.el +++ b/elpa/ggtags-20160617.1840/ggtags-autoloads.el @@ -3,7 +3,7 @@ ;;; Code: (add-to-list 'load-path (or (file-name-directory #$) (car load-path))) -;;;### (autoloads nil "ggtags" "ggtags.el" (22297 20828 347968 373000)) +;;;### (autoloads nil "ggtags" "ggtags.el" (22387 29370 530154 256000)) ;;; Generated autoloads from ggtags.el (autoload 'ggtags-find-project "ggtags" "\ diff --git a/elpa/ggtags-20151214.1344/ggtags-pkg.el b/elpa/ggtags-20160617.1840/ggtags-pkg.el similarity index 68% rename from elpa/ggtags-20151214.1344/ggtags-pkg.el rename to elpa/ggtags-20160617.1840/ggtags-pkg.el index f505ad7..5d37fbb 100644 --- a/elpa/ggtags-20151214.1344/ggtags-pkg.el +++ b/elpa/ggtags-20160617.1840/ggtags-pkg.el @@ -1 +1 @@ -(define-package "ggtags" "20151214.1344" "emacs frontend to GNU Global source code tagging system" '((emacs "24") (cl-lib "0.5")) :url "https://github.com/leoliu/ggtags" :keywords '("tools" "convenience")) +(define-package "ggtags" "20160617.1840" "emacs frontend to GNU Global source code tagging system" '((emacs "24") (cl-lib "0.5")) :url "https://github.com/leoliu/ggtags" :keywords '("tools" "convenience")) diff --git a/elpa/ggtags-20151214.1344/ggtags.el b/elpa/ggtags-20160617.1840/ggtags.el similarity index 99% rename from elpa/ggtags-20151214.1344/ggtags.el rename to elpa/ggtags-20160617.1840/ggtags.el index 2aaacce..d1cb9a5 100644 --- a/elpa/ggtags-20151214.1344/ggtags.el +++ b/elpa/ggtags-20160617.1840/ggtags.el @@ -1,10 +1,10 @@ ;;; ggtags.el --- emacs frontend to GNU Global source code tagging system -*- lexical-binding: t; -*- -;; Copyright (C) 2013-2015 Free Software Foundation, Inc. +;; Copyright (C) 2013-2016 Free Software Foundation, Inc. ;; Author: Leo Liu -;; Version: 0.8.11 -;; Package-Version: 20151214.1344 +;; Version: 0.8.12 +;; Package-Version: 20160617.1840 ;; Keywords: tools, convenience ;; Created: 2013-01-29 ;; URL: https://github.com/leoliu/ggtags @@ -1942,7 +1942,12 @@ ggtags: history match invalid, jump to first match instead") "Ligher for `ggtags-navigation-mode'; set to nil to disable it.") (define-minor-mode ggtags-navigation-mode nil - :lighter ggtags-navigation-mode-lighter + ;; If `ggtags-enable-navigation-keys' is set to nil only display the + ;; lighter in `ggtags-mode' buffers. + ;; See https://github.com/leoliu/ggtags/issues/124 + :lighter (:eval (and (or ggtags-enable-navigation-keys + ggtags-mode) + ggtags-navigation-mode-lighter)) :global t (if ggtags-navigation-mode (progn diff --git a/elpa/gh-20160222.1811/gh-api.el b/elpa/gh-20160626.1349/gh-api.el similarity index 85% rename from elpa/gh-20160222.1811/gh-api.el rename to elpa/gh-20160626.1349/gh-api.el index ce6b8b3..78776c5 100644 --- a/elpa/gh-20160222.1811/gh-api.el +++ b/elpa/gh-20160626.1349/gh-api.el @@ -66,7 +66,7 @@ (defmethod logito-log ((api gh-api) level tag string &rest objects) (apply 'logito-log (oref api :log) level tag string objects)) -(defmethod constructor :static ((api gh-api) &rest args) +(defmethod initialize-instance ((api gh-api) &rest args) (call-next-method)) (defmethod gh-api-set-default-auth ((api gh-api) auth) @@ -107,15 +107,14 @@ (const :tag "OAuth" gh-oauth-authenticator)) :group 'gh-api) -(defmethod constructor :static ((api gh-api-v3) &rest args) - (let ((obj (call-next-method)) - (gh-profile-current-profile (gh-profile-current-profile))) - (oset obj :profile (gh-profile-current-profile)) - (oset obj :base (gh-profile-url)) - (gh-api-set-default-auth obj - (or (oref obj :auth) - (funcall gh-api-v3-authenticator "auth"))) - obj)) +(defmethod initialize-instance ((api gh-api-v3) &rest args) + (call-next-method) + (let ((gh-profile-current-profile (gh-profile-current-profile))) + (oset api :profile (gh-profile-current-profile)) + (oset api :base (gh-profile-url)) + (gh-api-set-default-auth api + (or (oref api :auth) + (funcall gh-api-v3-authenticator "auth"))))) (defclass gh-api-request (gh-url-request) ((default-response-cls :allocation :class :initform gh-api-response))) @@ -136,7 +135,8 @@ (call-next-method resp (gh-api-json-decode data))) (defclass gh-api-paged-request (gh-api-request) - ((default-response-cls :allocation :class :initform gh-api-paged-response))) + ((default-response-cls :allocation :class :initform gh-api-paged-response) + (page-limit :initarg :page-limit :initform -1))) (defclass gh-api-paged-response (gh-api-response) ()) @@ -155,13 +155,25 @@ (call-next-method) (oset resp :data (append previous-data (oref resp :data))) (when (and next (not (equal 304 (oref resp :http-status)))) - (let ((req (oref resp :-req))) - (oset resp :data-received nil) - (oset req :url next) - (gh-url-run-request req resp))))) + (let* ((req (oref resp :-req)) + (last-page-limit (oref req :page-limit)) + (this-page-limit (if (numberp last-page-limit) (- last-page-limit 1) -1))) + (oset req :page-limit this-page-limit) + (unless (eq (oref req :page-limit) 0) + ;; We use an explicit check for 0 since -1 indicates that + ;; paging should continue forever. + (oset resp :data-received nil) + (oset req :url next) + ;; Params need to be set to nil because the next uri will + ;; already have query params. If params are non-nil this will + ;; cause another set of params to be added to the end of the + ;; string which will override the params that are set in the + ;; next link. + (oset req :query nil) + (gh-url-run-request req resp)))))) (defmethod gh-api-authenticated-request - ((api gh-api) transformer method resource &optional data params) + ((api gh-api) transformer method resource &optional data params page-limit) (let* ((fmt (oref api :data-format)) (headers (cond ((eq fmt :form) '(("Content-Type" . @@ -200,10 +212,11 @@ (gh-api-json-encode data)) (and (eq fmt :form) (gh-url-form-encode data)) - "")))))) + "") + :page-limit page-limit))))) (cond ((and has-value ;; got value from cache (not is-outdated)) - (gh-api-response "cached" :data-received t :data value)) + (make-instance 'gh-api-response :data-received t :data value)) (cache-key ;; no value, but cache exists and method is safe (let ((resp (make-instance (oref req default-response-cls) :transform transformer))) diff --git a/elpa/gh-20160222.1811/gh-auth.el b/elpa/gh-20160626.1349/gh-auth.el similarity index 90% rename from elpa/gh-20160222.1811/gh-auth.el rename to elpa/gh-20160626.1349/gh-auth.el index 39112f6..fae66ae 100644 --- a/elpa/gh-20160222.1811/gh-auth.el +++ b/elpa/gh-20160626.1349/gh-auth.el @@ -95,11 +95,10 @@ ((username :initarg :username :initform nil)) "Abstract authenticator") -(defmethod constructor :static ((auth gh-authenticator) &rest args) - (let ((obj (call-next-method))) - (or (oref obj :username) - (oset obj :username (gh-auth-get-username))) - obj)) +(defmethod initialize-instance ((auth gh-authenticator) &rest args) + (call-next-method) + (or (oref auth :username) + (oset auth :username (gh-auth-get-username)))) (defmethod gh-auth-modify-request ((auth gh-authenticator) req) req) @@ -131,11 +130,10 @@ (2fa-cls :initform gh-auth-2fa-callback :allocation :class)) "Password-based authenticator") -(defmethod constructor :static ((auth gh-password-authenticator) &rest args) - (let ((obj (call-next-method))) - (or (oref obj :password) - (oset obj :password (gh-auth-get-password (oref obj remember)))) - obj)) +(defmethod initialize-instance ((auth gh-password-authenticator) &rest args) + (call-next-method) + (or (oref auth :password) + (oset auth :password (gh-auth-get-password (oref auth remember))))) (defmethod gh-auth-modify-request ((auth gh-password-authenticator) req) (object-add-to-list req :headers @@ -154,11 +152,10 @@ ((token :initarg :token :protection :private :initform nil)) "Oauth-based authenticator") -(defmethod constructor :static ((auth gh-oauth-authenticator) &rest args) - (let ((obj (call-next-method))) - (or (oref obj :token) - (oset obj :token (gh-auth-get-oauth-token))) - obj)) +(defmethod initialize-instance :static ((auth gh-oauth-authenticator) &rest args) + (call-next-method) + (or (oref auth :token) + (oset auth :token (gh-auth-get-oauth-token)))) (defmethod gh-auth-modify-request ((auth gh-oauth-authenticator) req) (object-add-to-list req :headers diff --git a/elpa/gh-20160222.1811/gh-autoloads.el b/elpa/gh-20160626.1349/gh-autoloads.el similarity index 71% rename from elpa/gh-20160222.1811/gh-autoloads.el rename to elpa/gh-20160626.1349/gh-autoloads.el index 892a1ae..7bd84d1 100644 --- a/elpa/gh-20160222.1811/gh-autoloads.el +++ b/elpa/gh-20160626.1349/gh-autoloads.el @@ -3,7 +3,7 @@ ;;; Code: (add-to-list 'load-path (or (file-name-directory #$) (car load-path))) -;;;### (autoloads nil "gh-api" "gh-api.el" (22221 60701 548000 0)) +;;;### (autoloads nil "gh-api" "gh-api.el" (22387 29369 466970 131000)) ;;; Generated autoloads from gh-api.el (require 'eieio) @@ -14,8 +14,8 @@ ;;;*** -;;;### (autoloads nil "gh-auth" "gh-auth.el" (22221 60701 635000 -;;;;;; 0)) +;;;### (autoloads nil "gh-auth" "gh-auth.el" (22387 29369 526924 +;;;;;; 94000)) ;;; Generated autoloads from gh-auth.el (require 'eieio) @@ -28,24 +28,24 @@ ;;;*** -;;;### (autoloads nil "gh-cache" "gh-cache.el" (22221 60701 606000 -;;;;;; 0)) +;;;### (autoloads nil "gh-cache" "gh-cache.el" (22387 29369 498945 +;;;;;; 578000)) ;;; Generated autoloads from gh-cache.el (require 'eieio) ;;;*** -;;;### (autoloads nil "gh-common" "gh-common.el" (22221 60701 578000 -;;;;;; 0)) +;;;### (autoloads nil "gh-common" "gh-common.el" (22387 29369 478960 +;;;;;; 924000)) ;;; Generated autoloads from gh-common.el (require 'eieio) ;;;*** -;;;### (autoloads nil "gh-gist" "gh-gist.el" (22221 60701 536000 -;;;;;; 0)) +;;;### (autoloads nil "gh-gist" "gh-gist.el" (22387 29369 442988 +;;;;;; 546000)) ;;; Generated autoloads from gh-gist.el (require 'eieio) @@ -59,23 +59,23 @@ ;;;*** ;;;### (autoloads nil "gh-issue-comments" "gh-issue-comments.el" -;;;;;; (22221 60701 591000 0)) +;;;;;; (22387 29369 490951 716000)) ;;; Generated autoloads from gh-issue-comments.el (require 'eieio) ;;;*** -;;;### (autoloads nil "gh-issues" "gh-issues.el" (22221 60701 615000 -;;;;;; 0)) +;;;### (autoloads nil "gh-issues" "gh-issues.el" (22387 29369 502942 +;;;;;; 509000)) ;;; Generated autoloads from gh-issues.el (require 'eieio) ;;;*** -;;;### (autoloads nil "gh-oauth" "gh-oauth.el" (22221 60701 531000 -;;;;;; 0)) +;;;### (autoloads nil "gh-oauth" "gh-oauth.el" (22387 29369 430997 +;;;;;; 753000)) ;;; Generated autoloads from gh-oauth.el (require 'eieio) @@ -84,8 +84,8 @@ ;;;*** -;;;### (autoloads nil "gh-orgs" "gh-orgs.el" (22221 60701 586000 -;;;;;; 0)) +;;;### (autoloads nil "gh-orgs" "gh-orgs.el" (22387 29369 482957 +;;;;;; 854000)) ;;; Generated autoloads from gh-orgs.el (require 'eieio) @@ -96,16 +96,16 @@ ;;;*** -;;;### (autoloads nil "gh-pull-comments" "gh-pull-comments.el" (22221 -;;;;;; 60701 627000 0)) +;;;### (autoloads nil "gh-pull-comments" "gh-pull-comments.el" (22387 +;;;;;; 29369 518930 232000)) ;;; Generated autoloads from gh-pull-comments.el (require 'eieio) ;;;*** -;;;### (autoloads nil "gh-pulls" "gh-pulls.el" (22221 60701 621000 -;;;;;; 0)) +;;;### (autoloads nil "gh-pulls" "gh-pulls.el" (22387 29369 506939 +;;;;;; 440000)) ;;; Generated autoloads from gh-pulls.el (require 'eieio) @@ -116,8 +116,8 @@ ;;;*** -;;;### (autoloads nil "gh-repos" "gh-repos.el" (22221 60701 598000 -;;;;;; 0)) +;;;### (autoloads nil "gh-repos" "gh-repos.el" (22387 29369 494948 +;;;;;; 647000)) ;;; Generated autoloads from gh-repos.el (require 'eieio) @@ -130,15 +130,15 @@ ;;;*** -;;;### (autoloads nil "gh-url" "gh-url.el" (22221 60701 497000 0)) +;;;### (autoloads nil "gh-url" "gh-url.el" (22387 29369 419006 961000)) ;;; Generated autoloads from gh-url.el (require 'eieio) ;;;*** -;;;### (autoloads nil "gh-users" "gh-users.el" (22221 60701 569000 -;;;;;; 0)) +;;;### (autoloads nil "gh-users" "gh-users.el" (22387 29369 474963 +;;;;;; 993000)) ;;; Generated autoloads from gh-users.el (require 'eieio) @@ -149,8 +149,8 @@ ;;;*** -;;;### (autoloads nil nil ("gh-pkg.el" "gh-profile.el" "gh.el") (22221 -;;;;;; 60701 645865 81000)) +;;;### (autoloads nil nil ("gh-pkg.el" "gh-profile.el" "gh-search.el" +;;;;;; "gh.el") (22387 29369 541412 67000)) ;;;*** diff --git a/elpa/gh-20160222.1811/gh-cache.el b/elpa/gh-20160626.1349/gh-cache.el similarity index 100% rename from elpa/gh-20160222.1811/gh-cache.el rename to elpa/gh-20160626.1349/gh-cache.el diff --git a/elpa/gh-20160222.1811/gh-common.el b/elpa/gh-20160626.1349/gh-common.el similarity index 100% rename from elpa/gh-20160222.1811/gh-common.el rename to elpa/gh-20160626.1349/gh-common.el diff --git a/elpa/gh-20160222.1811/gh-gist.el b/elpa/gh-20160626.1349/gh-gist.el similarity index 100% rename from elpa/gh-20160222.1811/gh-gist.el rename to elpa/gh-20160626.1349/gh-gist.el diff --git a/elpa/gh-20160222.1811/gh-issue-comments.el b/elpa/gh-20160626.1349/gh-issue-comments.el similarity index 98% rename from elpa/gh-20160222.1811/gh-issue-comments.el rename to elpa/gh-20160626.1349/gh-issue-comments.el index 1ab8974..88218d9 100644 --- a/elpa/gh-20160222.1811/gh-issue-comments.el +++ b/elpa/gh-20160626.1349/gh-issue-comments.el @@ -64,7 +64,7 @@ (with-slots (url html-url body user created-at updated-at) comment (setq url (gh-read data 'url) - html-url (gh-read data 'html-url) + html-url (gh-read data 'html_url) body (gh-read data 'body) user (gh-object-read (or (oref comment :user) (oref comment user-cls)) diff --git a/elpa/gh-20160222.1811/gh-issues.el b/elpa/gh-20160626.1349/gh-issues.el similarity index 93% rename from elpa/gh-20160222.1811/gh-issues.el rename to elpa/gh-20160626.1349/gh-issues.el index c566271..4a1eddc 100644 --- a/elpa/gh-20160222.1811/gh-issues.el +++ b/elpa/gh-20160626.1349/gh-issues.el @@ -165,13 +165,13 @@ (gh-issues-milestone-req-to-update milestone))) (defmethod gh-issues-milestone-req-to-update ((milestone gh-issues-milestone)) - (let ((state (oref milestone state) ) - (description (oref milestone description)) - (due_on (oref milestone due_on)) - (to-update `(("title" . ,(oref milestone title))))) + (let ((state (oref milestone :state)) + (description (oref milestone :description)) + (due-on (oref milestone :due-on)) + (to-update `(("title" . ,(oref milestone :title))))) (when state (nconc to-update `(("state" . ,state)))) (when description (nconc to-update `(("description" . ,description)))) - (when due_on (nconc to-update `(("due_on" . ,due_on)))) + (when due-on (nconc to-update `(("due_on" . ,due-on)))) to-update)) (defmethod gh-issues-issue-get ((api gh-issues-api) user repo id) @@ -180,18 +180,18 @@ (format "/repos/%s/%s/issues/%s" user repo id))) (defmethod gh-issues-issue-req-to-update ((req gh-issues-issue)) - (let ((assignee (oref req assignee)) + (let ((assignee (oref req :assignee)) ;; (labels (oref req labels)) - (milestone (oref req milestone)) - (to-update `(("title" . ,(oref req title)) - ("state" . ,(oref req state)) - ("body" . ,(oref req body))))) + (milestone (oref req :milestone)) + (to-update `(("title" . ,(oref req :title)) + ("state" . ,(oref req :state)) + ("body" . ,(oref req :body))))) ;; (when labels (nconc to-update `(("labels" . ,(oref req labels) )))) (when milestone - (nconc to-update `(("milestone" . ,(oref milestone number))))) + (nconc to-update `(("milestone" . ,(oref milestone :number))))) (when assignee - (nconc to-update `(("assignee" . ,(oref assignee login) )))) + (nconc to-update `(("assignee" . ,(oref assignee :login))))) to-update)) (defmethod gh-issues-issue-update ((api gh-issues-api) user repo id req) @@ -243,7 +243,7 @@ (defmethod gh-issues-label-update ((api gh-issues-api) user repo req) (gh-api-authenticated-request api (gh-object-reader (oref api label-cls)) "POST" - (format "/repos/%s/%s/labels/%s" user repo (oref req name)) + (format "/repos/%s/%s/labels/%s" user repo (oref req :name)) (gh-issues-label-req-to-update req))) (defmethod gh-issues-label-delete ((api gh-issues-api) user repo name) @@ -286,17 +286,17 @@ (defun gh-issues--issue-id (issue-or-issue-id) (if (eieio-object-p issue-or-issue-id) - (oref issue-or-issue-id id) + (oref issue-or-issue-id :id) issue-or-issue-id)) (defun gh-issues--milestone-id (milestone-or-milestone-id) (if (eieio-object-p milestone-or-milestone-id) - (oref milestone-or-milestone-id id) + (oref milestone-or-milestone-id :id) milestone-or-milestone-id)) (defun gh-issues--label-name (label-or-label-name) (if (eieio-object-p label-or-label-name) - (oref label-or-label-name name) + (oref label-or-label-name :name) label-or-label-name)) diff --git a/elpa/gh-20160222.1811/gh-oauth.el b/elpa/gh-20160626.1349/gh-oauth.el similarity index 98% rename from elpa/gh-20160222.1811/gh-oauth.el rename to elpa/gh-20160626.1349/gh-oauth.el index e41b6df..774a83a 100644 --- a/elpa/gh-20160222.1811/gh-oauth.el +++ b/elpa/gh-20160626.1349/gh-oauth.el @@ -44,7 +44,7 @@ (defclass gh-oauth-password-authenticator (gh-password-authenticator) ((remember :allocation :class :initform nil))) -(defmethod constructor :static ((api gh-oauth-api) &rest args) +(defmethod initialize-instance ((api gh-oauth-api) &rest args) ;; force password authentication for this API (let ((gh-api-v3-authenticator 'gh-oauth-password-authenticator)) (call-next-method))) diff --git a/elpa/gh-20160222.1811/gh-orgs.el b/elpa/gh-20160626.1349/gh-orgs.el similarity index 100% rename from elpa/gh-20160222.1811/gh-orgs.el rename to elpa/gh-20160626.1349/gh-orgs.el diff --git a/elpa/gh-20160222.1811/gh-pkg.el b/elpa/gh-20160626.1349/gh-pkg.el similarity index 63% rename from elpa/gh-20160222.1811/gh-pkg.el rename to elpa/gh-20160626.1349/gh-pkg.el index 86a87b6..4a158b5 100644 --- a/elpa/gh-20160222.1811/gh-pkg.el +++ b/elpa/gh-20160626.1349/gh-pkg.el @@ -1,4 +1,4 @@ -(define-package "gh" "20160222.1811" "A GitHub library for Emacs" +(define-package "gh" "20160626.1349" "A GitHub library for Emacs" '((emacs "24.4") (pcache "0.3.1") (logito "0.1"))) diff --git a/elpa/gh-20160222.1811/gh-profile.el b/elpa/gh-20160626.1349/gh-profile.el similarity index 100% rename from elpa/gh-20160222.1811/gh-profile.el rename to elpa/gh-20160626.1349/gh-profile.el diff --git a/elpa/gh-20160222.1811/gh-pull-comments.el b/elpa/gh-20160626.1349/gh-pull-comments.el similarity index 99% rename from elpa/gh-20160222.1811/gh-pull-comments.el rename to elpa/gh-20160626.1349/gh-pull-comments.el index b00daa4..ab0d901 100644 --- a/elpa/gh-20160222.1811/gh-pull-comments.el +++ b/elpa/gh-20160626.1349/gh-pull-comments.el @@ -75,7 +75,7 @@ created-at updated-at) comment (setq url (gh-read data 'url) - html-url (gh-read data 'html-url) + html-url (gh-read data 'html_url) id (gh-read data 'id) body (gh-read data 'body) user (gh-object-read (or (oref comment :user) diff --git a/elpa/gh-20160222.1811/gh-pulls.el b/elpa/gh-20160626.1349/gh-pulls.el similarity index 100% rename from elpa/gh-20160222.1811/gh-pulls.el rename to elpa/gh-20160626.1349/gh-pulls.el diff --git a/elpa/gh-20160222.1811/gh-repos.el b/elpa/gh-20160626.1349/gh-repos.el similarity index 90% rename from elpa/gh-20160222.1811/gh-repos.el rename to elpa/gh-20160626.1349/gh-repos.el index 7204ea3..328a61d 100644 --- a/elpa/gh-20160222.1811/gh-repos.el +++ b/elpa/gh-20160626.1349/gh-repos.el @@ -70,13 +70,14 @@ (mirror-url :initarg :mirror-url) (owner :initarg :owner :initform nil) (id :initarg :id) - (full-name :initarg full-name) + (full-name :initarg :full-name) (language :initarg :language) (fork :initarg :fork) (forks :initarg :forks) - (forks-count :initarg forks-count) + (forks-count :initarg :forks-count) (watchers :initarg :watchers) - (watchers-count :initarg watchers-count) + (watchers-count :initarg :watchers-count) + (stargazers-count :initarg :stargazers-count) (size :initarg :size) (master-branch :initarg :master-branch) (open-issues :initarg :open-issues) @@ -217,7 +218,7 @@ (defmethod gh-repos-repo-rename ((api gh-repos-api) repo-stub new-name &optional user) - (let ((new-stub (gh-repos-repo-stub "repo" :name new-name))) + (let ((new-stub (make-instance 'gh-repos-repo-stub :name new-name))) (gh-api-authenticated-request api (gh-object-reader (oref api repo-cls)) "PATCH" (format "/repos/%s/%s" @@ -269,7 +270,41 @@ (oref repo :name)))) ;;; TODO gh-repos-repo-branch-commits -;;; TODO Collaborators sub-API + +;;; Collaborators sub-API + +(defmethod gh-repos-collaborators-list ((api gh-repos-api) repo) + (gh-api-authenticated-request + api (gh-object-list-reader (oref api user-cls)) "GET" (format "/repos/%s/%s/collaborators" + (oref (oref repo :owner) :login) + (oref repo :name)))) + +(defmethod gh-repos-collaborators-p ((api gh-repos-api) repo user) + (eq (oref (gh-api-authenticated-request + api nil "GET" + (format "/repos/%s/%s/collaborators/%s" + (oref (oref repo :owner) :login) + (oref repo :name) + user)) + :http-status) + 204)) + +(defmethod gh-repos-collaborators-add ((api gh-repos-api) repo user) + (gh-api-authenticated-request + api nil "PUT" + (format "/repos/%s/%s/collaborators/%s" + (oref (oref repo :owner) :login) + (oref repo :name) + user))) + +(defmethod gh-repos-collaborators-delete ((api gh-repos-api) repo user) + (gh-api-authenticated-request + api nil "DELETE" + (format "/repos/%s/%s/collaborators/%s" + (oref (oref repo :owner) :login) + (oref repo :name) + user))) + ;;; TODO Comments sub-API ;;; TODO Commits sub-API ;;; TODO Contents sub-API diff --git a/elpa/gh-20160626.1349/gh-search.el b/elpa/gh-20160626.1349/gh-search.el new file mode 100644 index 0000000..c0248ca --- /dev/null +++ b/elpa/gh-20160626.1349/gh-search.el @@ -0,0 +1,61 @@ +;;; gh-search.el --- repository search for gh.el +;; Copyright (C) 2016 Ivan Malison + +;; Author: Ivan Malison + +;; 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. + +;; 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 this program. If not, see . + +;;; Commentary: + +;; + +;;; Code: + +(require 'gh-users) +(require 'gh-repos) + +(defclass gh-search-api (gh-api-v3) + ((repo-cls :allocation :class :initform gh-repos-repo) + (user-cls :allocation :class :initform gh-users-user))) + +(defmacro gh-search-method-builder (method-name uri process-result-function) + `(defmethod ,method-name ((search-api gh-search-api) + query-string &optional page-limit + &rest additional-arguments) + (unless (and (stringp query-string) (> (length query-string) 1)) + (error "a non-empty query string must be provided to github search")) + (gh-api-authenticated-request + search-api + (apply-partially (quote ,process-result-function) search-api) + "GET" ,uri nil + `((q . ,query-string) ,@additional-arguments) page-limit))) + +(defmacro gh-search-process-method-builder (method-name class-symbol) + `(defmethod ,method-name ((search-api gh-search-api) data) + (unless (listp data) + (error "Did not recieve a list from the search query")) + (let ((items (assoc 'items data))) + (unless items + (error "Search query did not return items")) + (gh-object-list-read (oref search-api ,class-symbol) (cdr items))))) + +(gh-search-process-method-builder gh-process-repo-search-result repo-cls) +(gh-search-process-method-builder gh-process-user-search-result user-cls) +(gh-search-method-builder gh-search-repos "/search/repositories" + gh-process-repo-search-result) +(gh-search-method-builder gh-search-users "/search/users" + gh-process-user-search-result) + +(provide 'gh-search) +;;; gh-search.el ends here diff --git a/elpa/gh-20160222.1811/gh-url.el b/elpa/gh-20160626.1349/gh-url.el similarity index 98% rename from elpa/gh-20160222.1811/gh-url.el rename to elpa/gh-20160626.1349/gh-url.el index 885aba8..d8dddfd 100644 --- a/elpa/gh-20160222.1811/gh-url.el +++ b/elpa/gh-20160626.1349/gh-url.el @@ -141,8 +141,8 @@ (set-buffer-multibyte t) (destructuring-bind (req resp) req-resp (condition-case err - (progn - (oset resp :-req req) + (let ((responses-req (clone req))) + (oset resp :-req responses-req) (gh-url-response-init resp (current-buffer))) (error (let ((num (oref req :num-retries))) diff --git a/elpa/gh-20160222.1811/gh-users.el b/elpa/gh-20160626.1349/gh-users.el similarity index 100% rename from elpa/gh-20160222.1811/gh-users.el rename to elpa/gh-20160626.1349/gh-users.el diff --git a/elpa/gh-20160222.1811/gh.el b/elpa/gh-20160626.1349/gh.el similarity index 100% rename from elpa/gh-20160222.1811/gh.el rename to elpa/gh-20160626.1349/gh.el diff --git a/elpa/git-commit-20160425.430/git-commit-autoloads.el b/elpa/git-commit-20160519.950/git-commit-autoloads.el similarity index 92% rename from elpa/git-commit-20160425.430/git-commit-autoloads.el rename to elpa/git-commit-20160519.950/git-commit-autoloads.el index f071d15..36a9977 100644 --- a/elpa/git-commit-20160425.430/git-commit-autoloads.el +++ b/elpa/git-commit-20160519.950/git-commit-autoloads.el @@ -3,8 +3,8 @@ ;;; Code: (add-to-list 'load-path (or (file-name-directory #$) (car load-path))) -;;;### (autoloads nil "git-commit" "git-commit.el" (22303 19285 486174 -;;;;;; 926000)) +;;;### (autoloads nil "git-commit" "git-commit.el" (22387 29368 875424 +;;;;;; 490000)) ;;; Generated autoloads from git-commit.el (defvar global-git-commit-mode t "\ diff --git a/elpa/git-commit-20160425.430/git-commit-pkg.el b/elpa/git-commit-20160519.950/git-commit-pkg.el similarity index 69% rename from elpa/git-commit-20160425.430/git-commit-pkg.el rename to elpa/git-commit-20160519.950/git-commit-pkg.el index f04366c..c1a6afe 100644 --- a/elpa/git-commit-20160425.430/git-commit-pkg.el +++ b/elpa/git-commit-20160519.950/git-commit-pkg.el @@ -1 +1 @@ -(define-package "git-commit" "20160425.430" "Edit Git commit messages" '((emacs "24.4") (dash "20151021.113") (with-editor "20160408.201")) :url "https://github.com/magit/magit" :keywords '("git" "tools" "vc")) +(define-package "git-commit" "20160519.950" "Edit Git commit messages" '((emacs "24.4") (dash "20151021.113") (with-editor "20160408.201")) :url "https://github.com/magit/magit" :keywords '("git" "tools" "vc")) diff --git a/elpa/git-commit-20160425.430/git-commit.el b/elpa/git-commit-20160519.950/git-commit.el similarity index 99% rename from elpa/git-commit-20160425.430/git-commit.el rename to elpa/git-commit-20160519.950/git-commit.el index d350c03..ccf03e6 100644 --- a/elpa/git-commit-20160425.430/git-commit.el +++ b/elpa/git-commit-20160519.950/git-commit.el @@ -12,8 +12,8 @@ ;; Maintainer: Jonas Bernoulli ;; Package-Requires: ((emacs "24.4") (dash "20151021.113") (with-editor "20160408.201")) +;; Package-Version: 20160519.950 ;; Keywords: git tools vc -;; Package-Version: 20160425.430 ;; Homepage: https://github.com/magit/magit ;; This file is not part of GNU Emacs. diff --git a/elpa/git-gutter-20160409.713/git-gutter-autoloads.el b/elpa/git-gutter-20160610.852/git-gutter-autoloads.el similarity index 94% rename from elpa/git-gutter-20160409.713/git-gutter-autoloads.el rename to elpa/git-gutter-20160610.852/git-gutter-autoloads.el index ee9f745..1e1412b 100644 --- a/elpa/git-gutter-20160409.713/git-gutter-autoloads.el +++ b/elpa/git-gutter-20160610.852/git-gutter-autoloads.el @@ -3,8 +3,8 @@ ;;; Code: (add-to-list 'load-path (or (file-name-directory #$) (car load-path))) -;;;### (autoloads nil "git-gutter" "git-gutter.el" (22297 19829 459863 -;;;;;; 402000)) +;;;### (autoloads nil "git-gutter" "git-gutter.el" (22387 29368 367814 +;;;;;; 765000)) ;;; Generated autoloads from git-gutter.el (autoload 'git-gutter:linum-setup "git-gutter" "\ diff --git a/elpa/git-gutter-20160409.713/git-gutter-pkg.el b/elpa/git-gutter-20160610.852/git-gutter-pkg.el similarity index 61% rename from elpa/git-gutter-20160409.713/git-gutter-pkg.el rename to elpa/git-gutter-20160610.852/git-gutter-pkg.el index ff865bb..653b929 100644 --- a/elpa/git-gutter-20160409.713/git-gutter-pkg.el +++ b/elpa/git-gutter-20160610.852/git-gutter-pkg.el @@ -1 +1 @@ -(define-package "git-gutter" "20160409.713" "Port of Sublime Text plugin GitGutter" '((cl-lib "0.5") (emacs "24")) :url "https://github.com/syohex/emacs-git-gutter") +(define-package "git-gutter" "20160610.852" "Port of Sublime Text plugin GitGutter" '((cl-lib "0.5") (emacs "24")) :url "https://github.com/syohex/emacs-git-gutter") diff --git a/elpa/git-gutter-20160409.713/git-gutter.el b/elpa/git-gutter-20160610.852/git-gutter.el similarity index 94% rename from elpa/git-gutter-20160409.713/git-gutter.el rename to elpa/git-gutter-20160610.852/git-gutter.el index 99e877e..562a265 100644 --- a/elpa/git-gutter-20160409.713/git-gutter.el +++ b/elpa/git-gutter-20160610.852/git-gutter.el @@ -4,8 +4,8 @@ ;; Author: Syohei YOSHIDA ;; URL: https://github.com/syohex/emacs-git-gutter -;; Package-Version: 20160409.713 -;; Version: 0.87 +;; Package-Version: 20160610.852 +;; Version: 0.89 ;; Package-Requires: ((cl-lib "0.5") (emacs "24")) ;; This program is free software; you can redistribute it and/or modify @@ -170,6 +170,9 @@ gutter information of other windows." "Ask whether commit/revert or not" :type 'boolean) +(cl-defstruct git-gutter-hunk + type content start-line end-line) + (defvar git-gutter:enabled nil) (defvar git-gutter:diffinfos nil) (defvar git-gutter:has-indirect-buffers nil) @@ -204,8 +207,7 @@ gutter information of other windows." (with-temp-buffer (when (zerop (git-gutter:execute-command "git" t "rev-parse" "--is-inside-work-tree")) (goto-char (point-min)) - (string= "true" (buffer-substring-no-properties - (point) (line-end-position))))))) + (looking-at-p "true"))))) (defun git-gutter:in-repository-common-p (cmd check-subcmd repodir) (and (executable-find cmd) @@ -230,9 +232,6 @@ gutter information of other windows." 1 (string-to-number str))) -(defsubst git-gutter:make-diffinfo (type content start end) - (list :type type :content content :start-line start :end-line end)) - (defsubst git-gutter:base-file () (buffer-file-name (buffer-base-buffer))) @@ -265,7 +264,8 @@ gutter information of other windows." collect (let ((start (if (zerop new-line) 1 new-line)) (end (if (zerop end-line) 1 end-line))) - (git-gutter:make-diffinfo type content start end)))))) + (make-git-gutter-hunk + :type type :content content :start-line start :end-line end)))))) (defsubst git-gutter:window-margin () (or git-gutter:window-width (git-gutter:longest-sign-width))) @@ -369,21 +369,15 @@ gutter information of other windows." (let ((gutter-sep (concat sign (git-gutter:gutter-sperator)))) (propertize " " 'display `((margin left-margin) ,gutter-sep)))) -(defsubst git-gutter:select-face (type) - (cl-case type - (added 'git-gutter:added) - (modified 'git-gutter:modified) - (deleted 'git-gutter:deleted))) - -(defsubst git-gutter:select-sign (type) - (cl-case type - (added git-gutter:added-sign) - (modified git-gutter:modified-sign) - (deleted git-gutter:deleted-sign))) - (defun git-gutter:propertized-sign (type) - (let ((sign (git-gutter:select-sign type)) - (face (git-gutter:select-face type))) + (let (sign face) + (cl-case type + (added (setq sign git-gutter:added-sign + face 'git-gutter:added)) + (modified (setq sign git-gutter:modified-sign + face 'git-gutter:modified)) + (deleted (setq sign git-gutter:deleted-sign + face 'git-gutter:deleted))) (propertize sign 'face face))) (defsubst git-gutter:linum-get-overlay (pos) @@ -551,7 +545,7 @@ gutter information of other windows." (git-gutter) (when (and (not git-gutter:update-timer) (> git-gutter:update-interval 0)) (setq git-gutter:update-timer - (run-with-idle-timer 1 git-gutter:update-interval 'git-gutter:live-update)))) + (run-with-idle-timer git-gutter:update-interval t 'git-gutter:live-update)))) (when (> git-gutter:verbosity 2) (message "Here is not %s work tree" (git-gutter:show-backends))) (git-gutter-mode -1)) @@ -590,9 +584,9 @@ gutter information of other windows." #'forward-line) for info in diffinfos - for start-line = (plist-get info :start-line) - for end-line = (plist-get info :end-line) - for type = (plist-get info :type) + for start-line = (git-gutter-hunk-start-line info) + for end-line = (git-gutter-hunk-end-line info) + for type = (git-gutter-hunk-type info) for sign = (git-gutter:propertized-sign type) for points = nil do @@ -645,7 +639,7 @@ gutter information of other windows." with cmp-fn = (if is-reverse #'> #'<) for diffinfo in (if is-reverse (reverse diffinfos) diffinfos) for index = 0 then (1+ index) - for start-line = (plist-get diffinfo :start-line) + for start-line = (git-gutter-hunk-start-line diffinfo) when (funcall cmp-fn current-line start-line) return (if is-reverse (1- (- (length diffinfos) index)) @@ -656,8 +650,8 @@ gutter information of other windows." (widen) (cl-loop with current-line = (line-number-at-pos) for diffinfo in diffinfos - for start = (plist-get diffinfo :start-line) - for end = (or (plist-get diffinfo :end-line) (1+ start)) + for start = (git-gutter-hunk-start-line diffinfo) + for end = (or (git-gutter-hunk-end-line diffinfo) (1+ start)) when (and (>= current-line start) (<= current-line end)) return diffinfo finally do (error "Here is not changed!!")))) @@ -686,10 +680,10 @@ gutter information of other windows." (defun git-gutter:do-revert-hunk (diffinfo) (save-excursion (goto-char (point-min)) - (let ((start-line (plist-get diffinfo :start-line)) - (end-line (plist-get diffinfo :end-line)) - (content (plist-get diffinfo :content))) - (cl-case (plist-get diffinfo :type) + (let ((start-line (git-gutter-hunk-start-line diffinfo)) + (end-line (git-gutter-hunk-end-line diffinfo)) + (content (git-gutter-hunk-content diffinfo))) + (cl-case (git-gutter-hunk-type diffinfo) (added (git-gutter:delete-added-lines start-line end-line)) (deleted (when (git-gutter:delete-from-first-line-p start-line end-line) (forward-line start-line)) @@ -758,8 +752,8 @@ gutter information of other windows." (file-name-directory (file-relative-name (git-gutter:base-file) root)))) (defun git-gutter:do-stage-hunk (diff-info) - (let ((content (plist-get diff-info :content)) - (type (plist-get diff-info :type)) + (let ((content (git-gutter-hunk-content diff-info)) + (type (git-gutter-hunk-type diff-info)) (header (git-gutter:extract-hunk-header)) (patch (make-temp-name "git-gutter"))) (when header @@ -790,8 +784,8 @@ gutter information of other windows." (defun git-gutter:mark-hunk () (interactive) (git-gutter:awhen (git-gutter:search-here-diffinfo git-gutter:diffinfos) - (let ((start (git-gutter:line-point (plist-get it :start-line))) - (end (git-gutter:line-point (1+ (plist-get it :end-line))))) + (let ((start (git-gutter:line-point (git-gutter-hunk-start-line it))) + (end (git-gutter:line-point (1+ (git-gutter-hunk-end-line it))))) (goto-char start) (push-mark end nil t)))) @@ -800,7 +794,7 @@ gutter information of other windows." (view-mode -1) (setq buffer-read-only nil) (erase-buffer) - (insert (plist-get diffinfo :content)) + (insert (git-gutter-hunk-content diffinfo)) (insert "\n") (goto-char (point-min)) (diff-mode) @@ -831,7 +825,7 @@ gutter information of other windows." (if is-reverse (1- len) 0))) (diffinfo (nth real-index diffinfos))) (goto-char (point-min)) - (forward-line (1- (plist-get diffinfo :start-line))) + (forward-line (1- (git-gutter-hunk-start-line diffinfo))) (when (> git-gutter:verbosity 0) (message "Move to %d/%d hunk" (1+ real-index) len)) (when (buffer-live-p (get-buffer git-gutter:popup-buffer)) @@ -946,7 +940,7 @@ start revision." (when git-gutter:update-timer (error "Update timer is already running.")) (setq git-gutter:update-timer - (run-with-idle-timer 1 git-gutter:update-interval 'git-gutter:live-update))) + (run-with-idle-timer git-gutter:update-interval t 'git-gutter:live-update))) (defun git-gutter:cancel-update-timer () (interactive) @@ -1032,9 +1026,9 @@ start revision." (length git-gutter:diffinfos)) (defun git-gutter:stat-hunk (hunk) - (cl-case (plist-get hunk :type) + (cl-case (git-gutter-hunk-type hunk) (modified (with-temp-buffer - (insert (plist-get hunk :content)) + (insert (git-gutter-hunk-content hunk)) (goto-char (point-min)) (let ((added 0) (deleted 0)) @@ -1043,8 +1037,8 @@ start revision." ((looking-at-p "\\-") (cl-incf deleted))) (forward-line 1)) (cons added deleted)))) - (added (cons (- (plist-get hunk :end-line) (plist-get hunk :start-line)) 0)) - (deleted (cons 0 (- (plist-get hunk :end-line) (plist-get hunk :start-line)))))) + (added (cons (- (git-gutter-hunk-end-line hunk) (git-gutter-hunk-start-line hunk)) 0)) + (deleted (cons 0 (- (git-gutter-hunk-end-line hunk) (git-gutter-hunk-start-line hunk)))))) (defun git-gutter:statistic () "Return statistic unstaged hunks in current buffer." diff --git a/elpa/go-mode-20160404.2/go-mode-pkg.el b/elpa/go-mode-20160404.2/go-mode-pkg.el deleted file mode 100644 index bf2e100..0000000 --- a/elpa/go-mode-20160404.2/go-mode-pkg.el +++ /dev/null @@ -1,5 +0,0 @@ -(define-package "go-mode" "20160404.2" "Major mode for the Go programming language" 'nil :url "https://github.com/dominikh/go-mode.el" :keywords - '("languages" "go")) -;; Local Variables: -;; no-byte-compile: t -;; End: diff --git a/elpa/go-mode-20160404.2/go-mode-autoloads.el b/elpa/go-mode-20160512.110/go-mode-autoloads.el similarity index 95% rename from elpa/go-mode-20160404.2/go-mode-autoloads.el rename to elpa/go-mode-20160512.110/go-mode-autoloads.el index f335b4d..fa993ce 100644 --- a/elpa/go-mode-20160404.2/go-mode-autoloads.el +++ b/elpa/go-mode-20160512.110/go-mode-autoloads.el @@ -3,8 +3,8 @@ ;;; Code: -;;;### (autoloads nil "go-mode" "go-mode.el" (22297 19826 179922 -;;;;;; 64000)) +;;;### (autoloads nil "go-mode" "go-mode.el" (22387 29367 888183 +;;;;;; 643000)) ;;; Generated autoloads from go-mode.el (autoload 'go-mode "go-mode" "\ @@ -96,8 +96,8 @@ Tries to look for a URL at point. ;;;*** -;;;### (autoloads nil nil ("go-mode-pkg.el") (22297 19826 479482 -;;;;;; 139000)) +;;;### (autoloads nil nil ("go-mode-pkg.el") (22387 29367 902180 +;;;;;; 904000)) ;;;*** diff --git a/elpa/go-mode-20160512.110/go-mode-pkg.el b/elpa/go-mode-20160512.110/go-mode-pkg.el new file mode 100644 index 0000000..b4e5c39 --- /dev/null +++ b/elpa/go-mode-20160512.110/go-mode-pkg.el @@ -0,0 +1,5 @@ +(define-package "go-mode" "20160512.110" "Major mode for the Go programming language" 'nil :url "https://github.com/dominikh/go-mode.el" :keywords + '("languages" "go")) +;; Local Variables: +;; no-byte-compile: t +;; End: diff --git a/elpa/go-mode-20160404.2/go-mode.el b/elpa/go-mode-20160512.110/go-mode.el similarity index 99% rename from elpa/go-mode-20160404.2/go-mode.el rename to elpa/go-mode-20160512.110/go-mode.el index eccb74e..7d152a0 100644 --- a/elpa/go-mode-20160404.2/go-mode.el +++ b/elpa/go-mode-20160512.110/go-mode.el @@ -5,7 +5,7 @@ ;; license that can be found in the LICENSE file. ;; Author: The go-mode Authors -;; Version: 1.3.1 +;; Version: 1.4.0 ;; Keywords: languages go ;; URL: https://github.com/dominikh/go-mode.el ;; @@ -1329,14 +1329,14 @@ Playground URL." (buffer-substring-no-properties start end) 'utf-8)) (content-buf (url-retrieve - "http://play.golang.org/share" + "https://play.golang.org/share" (lambda (arg) (cond ((equal :error (car arg)) (signal 'go-play-error (cdr arg))) (t (re-search-forward "\n\n") - (let ((url (format "http://play.golang.org/p/%s" + (let ((url (format "https://play.golang.org/p/%s" (buffer-substring (point) (point-max))))) (when go-play-browse-function (funcall go-play-browse-function url))))))))))) diff --git a/elpa/helm-20160425.958/helm-pkg.el b/elpa/helm-20160425.958/helm-pkg.el deleted file mode 100644 index bcdd528..0000000 --- a/elpa/helm-20160425.958/helm-pkg.el +++ /dev/null @@ -1,9 +0,0 @@ -(define-package "helm" "20160425.958" "Helm is an Emacs incremental and narrowing framework" - '((emacs "24.3") - (async "1.7") - (popup "0.5.3") - (helm-core "1.9.4")) - :url "https://emacs-helm.github.io/helm/") -;; Local Variables: -;; no-byte-compile: t -;; End: diff --git a/elpa/helm-20160425.958/emacs-helm.sh b/elpa/helm-20160625.2316/emacs-helm.sh similarity index 100% rename from elpa/helm-20160425.958/emacs-helm.sh rename to elpa/helm-20160625.2316/emacs-helm.sh diff --git a/elpa/helm-20160425.958/helm-adaptive.el b/elpa/helm-20160625.2316/helm-adaptive.el similarity index 78% rename from elpa/helm-20160425.958/helm-adaptive.el rename to elpa/helm-20160625.2316/helm-adaptive.el index 29b675f..d8be6b1 100644 --- a/elpa/helm-20160425.958/helm-adaptive.el +++ b/elpa/helm-20160625.2316/helm-adaptive.el @@ -104,7 +104,7 @@ Format: ((SOURCE-NAME (SELECTED-CANDIDATE (PATTERN . NUMBER-OF-USE) ...) ...) .. (progn (push (list source-name) helm-adaptive-history) (car helm-adaptive-history)))) - (selection (helm-get-selection)) + (selection (helm-get-selection nil t)) (selection-info (progn (setcdr source-info (cons @@ -175,47 +175,43 @@ This is a filtered candidate transformer you can use with the (source-info (assoc source-name helm-adaptive-history))) (if source-info (let ((usage - ;; ... assemble a list containing the (CANIDATE . USAGE-COUNT) - ;; pairs - (mapcar (lambda (candidate-info) - (let ((count 0)) - (cl-dolist (pattern-info (cdr candidate-info)) - (if (not (equal (car pattern-info) - helm-pattern)) - (cl-incf count (cdr pattern-info)) - - ;; if current pattern is equal to the previously - ;; used one then this candidate has priority - ;; (that's why its count is boosted by 10000) and - ;; it only has to compete with other candidates - ;; which were also selected with the same pattern - (setq count (+ 10000 (cdr pattern-info))) - (cl-return))) - (cons (car candidate-info) count))) - (cdr source-info)))) - (if (and usage (consp usage)) - ;; sort the list in descending order, so candidates with highest - ;; priorty come first - (progn - (setq usage (sort usage (lambda (first second) - (> (cdr first) (cdr second))))) - - ;; put those candidates first which have the highest usage count - (cl-loop for (info . _freq) in usage - for member = (cl-member info candidates - :test 'helm-adaptive-compare) - when member collect (car member) into sorted - and do - (setq candidates (cl-remove info candidates - :test 'helm-adaptive-compare)) - finally return (append sorted candidates))) - (message "Your `%s' is maybe corrupted or too old, \ + ;; Assemble a list containing the (CANDIDATE . USAGE-COUNT) pairs. + (cl-loop with count = 0 + for (sn . infos) in (cdr source-info) + do (cl-loop for (pattern . score) in infos + if (not (equal pattern helm-pattern)) + do (cl-incf count score) + else return + ;; If current pattern is equal to the previously + ;; used one then this candidate has priority + ;; (that's why its count is boosted by 10000) and + ;; it only has to compete with other candidates + ;; which were also selected with the same pattern. + (setq count (+ 10000 score))) + and collect (cons sn count) into results + ;; Sort the list in descending order, so candidates with highest + ;; priority come first. + finally return (sort results (lambda (first second) + (> (cdr first) (cdr second))))))) + (if (consp usage) + ;; Put those candidates first which have the highest usage count. + (cl-loop for (info . _freq) in usage + for mlinfo = (and (assq 'multiline source) + (replace-regexp-in-string "\n\\'" "" info)) + for member = (cl-member (or mlinfo info) candidates + :test 'helm-adaptive-compare) + when member collect (car member) into sorted + and do + (setq candidates (cl-remove (or mlinfo info) candidates + :test 'helm-adaptive-compare)) + finally return (append sorted candidates)) + (message "Your `%s' is maybe corrupted or too old, \ you should reinitialize it with `helm-reset-adaptive-history'" - helm-adaptive-history-file) - (sit-for 1) - candidates)) - ;; if there is no information stored for this source then do nothing - candidates))) + helm-adaptive-history-file) + (sit-for 1) + candidates)) + ;; if there is no information stored for this source then do nothing + candidates))) ;;;###autoload (defun helm-reset-adaptive-history () diff --git a/elpa/helm-20160425.958/helm-apt.el b/elpa/helm-20160625.2316/helm-apt.el similarity index 100% rename from elpa/helm-20160425.958/helm-apt.el rename to elpa/helm-20160625.2316/helm-apt.el diff --git a/elpa/helm-20160425.958/helm-autoloads.el b/elpa/helm-20160625.2316/helm-autoloads.el similarity index 84% rename from elpa/helm-20160425.958/helm-autoloads.el rename to elpa/helm-20160625.2316/helm-autoloads.el index 898cc24..3dca02f 100644 --- a/elpa/helm-20160425.958/helm-autoloads.el +++ b/elpa/helm-20160625.2316/helm-autoloads.el @@ -3,8 +3,8 @@ ;;; Code: (add-to-list 'load-path (or (file-name-directory #$) (car load-path))) -;;;### (autoloads nil "helm-adaptive" "helm-adaptive.el" (22303 19284 -;;;;;; 902175 378000)) +;;;### (autoloads nil "helm-adaptive" "helm-adaptive.el" (22387 29367 +;;;;;; 188722 114000)) ;;; Generated autoloads from helm-adaptive.el (defvar helm-adaptive-mode nil "\ @@ -29,8 +29,8 @@ Useful when you have a old or corrupted `helm-adaptive-history-file'. ;;;*** -;;;### (autoloads nil "helm-apt" "helm-apt.el" (22303 19284 870175 -;;;;;; 403000)) +;;;### (autoloads nil "helm-apt" "helm-apt.el" (22387 29367 144755 +;;;;;; 961000)) ;;; Generated autoloads from helm-apt.el (autoload 'helm-apt "helm-apt" "\ @@ -41,8 +41,8 @@ With a prefix arg reload cache. ;;;*** -;;;### (autoloads nil "helm-bookmark" "helm-bookmark.el" (22303 19284 -;;;;;; 950175 341000)) +;;;### (autoloads nil "helm-bookmark" "helm-bookmark.el" (22387 29367 +;;;;;; 236685 191000)) ;;; Generated autoloads from helm-bookmark.el (autoload 'helm-bookmarks "helm-bookmark" "\ @@ -59,8 +59,8 @@ only if external library addressbook-bookmark.el is available. ;;;*** -;;;### (autoloads nil "helm-buffers" "helm-buffers.el" (22303 19284 -;;;;;; 854175 415000)) +;;;### (autoloads nil "helm-buffers" "helm-buffers.el" (22387 29367 +;;;;;; 132765 192000)) ;;; Generated autoloads from helm-buffers.el (autoload 'helm-buffers-list "helm-buffers" "\ @@ -75,8 +75,8 @@ Preconfigured `helm' lightweight version (buffer -> recentf). ;;;*** -;;;### (autoloads nil "helm-color" "helm-color.el" (22303 19284 930175 -;;;;;; 357000)) +;;;### (autoloads nil "helm-color" "helm-color.el" (22387 29367 220697 +;;;;;; 499000)) ;;; Generated autoloads from helm-color.el (autoload 'helm-colors "helm-color" "\ @@ -86,8 +86,8 @@ Preconfigured `helm' for color. ;;;*** -;;;### (autoloads nil "helm-command" "helm-command.el" (22303 19284 -;;;;;; 806175 452000)) +;;;### (autoloads nil "helm-command" "helm-command.el" (22387 29367 +;;;;;; 76808 270000)) ;;; Generated autoloads from helm-command.el (autoload 'helm-M-x "helm-command" "\ @@ -95,7 +95,9 @@ Preconfigured `helm' for Emacs commands. It is `helm' replacement of regular `M-x' `execute-extended-command'. Unlike regular `M-x' emacs vanilla `execute-extended-command' command, -the prefix args if needed, are passed AFTER starting `helm-M-x'. +the prefix args if needed, can be passed AFTER starting `helm-M-x'. +When a prefix arg is passed BEFORE starting `helm-M-x', the first `C-u' +while in `helm-M-x' session will disable it. You can get help on each command by persistent action. @@ -103,8 +105,8 @@ You can get help on each command by persistent action. ;;;*** -;;;### (autoloads nil "helm-config" "helm-config.el" (22303 19284 -;;;;;; 942175 347000)) +;;;### (autoloads nil "helm-config" "helm-config.el" (22387 29367 +;;;;;; 228691 345000)) ;;; Generated autoloads from helm-config.el (autoload 'helm-configuration "helm-config" "\ @@ -114,8 +116,8 @@ Customize `helm'. ;;;*** -;;;### (autoloads nil "helm-dabbrev" "helm-dabbrev.el" (22303 19284 -;;;;;; 882175 394000)) +;;;### (autoloads nil "helm-dabbrev" "helm-dabbrev.el" (22387 29367 +;;;;;; 156746 731000)) ;;; Generated autoloads from helm-dabbrev.el (autoload 'helm-dabbrev "helm-dabbrev" "\ @@ -125,8 +127,8 @@ Preconfigured helm for dynamic abbreviations. ;;;*** -;;;### (autoloads nil "helm-elisp" "helm-elisp.el" (22303 19284 934175 -;;;;;; 353000)) +;;;### (autoloads nil "helm-elisp" "helm-elisp.el" (22387 29367 224694 +;;;;;; 422000)) ;;; Generated autoloads from helm-elisp.el (autoload 'helm-lisp-completion-at-point "helm-elisp" "\ @@ -180,7 +182,7 @@ Preconfigured helm for complex command history. ;;;*** ;;;### (autoloads nil "helm-elisp-package" "helm-elisp-package.el" -;;;;;; (22303 19284 810175 449000)) +;;;;;; (22387 29367 80805 193000)) ;;; Generated autoloads from helm-elisp-package.el (autoload 'helm-list-elisp-packages "helm-elisp-package" "\ @@ -196,8 +198,8 @@ Same as `helm-list-elisp-packages' but don't fetch packages on remote. ;;;*** -;;;### (autoloads nil "helm-elscreen" "helm-elscreen.el" (22303 19284 -;;;;;; 794175 462000)) +;;;### (autoloads nil "helm-elscreen" "helm-elscreen.el" (22387 29367 +;;;;;; 68814 424000)) ;;; Generated autoloads from helm-elscreen.el (autoload 'helm-elscreen "helm-elscreen" "\ @@ -212,8 +214,8 @@ Preconfigured helm to list elscreen in history order. ;;;*** -;;;### (autoloads nil "helm-eshell" "helm-eshell.el" (22303 19284 -;;;;;; 826175 437000)) +;;;### (autoloads nil "helm-eshell" "helm-eshell.el" (22387 29367 +;;;;;; 100789 808000)) ;;; Generated autoloads from helm-eshell.el (autoload 'helm-esh-pcomplete "helm-eshell" "\ @@ -228,8 +230,8 @@ Preconfigured helm for eshell history. ;;;*** -;;;### (autoloads nil "helm-eval" "helm-eval.el" (22303 19284 910175 -;;;;;; 372000)) +;;;### (autoloads nil "helm-eval" "helm-eval.el" (22387 29367 196715 +;;;;;; 961000)) ;;; Generated autoloads from helm-eval.el (autoload 'helm-eval-expression "helm-eval" "\ @@ -249,8 +251,8 @@ Preconfigured helm for `helm-source-calculation-result'. ;;;*** -;;;### (autoloads nil "helm-external" "helm-external.el" (22303 19284 -;;;;;; 786175 468000)) +;;;### (autoloads nil "helm-external" "helm-external.el" (22387 29367 +;;;;;; 56823 655000)) ;;; Generated autoloads from helm-external.el (autoload 'helm-run-external-command "helm-external" "\ @@ -263,8 +265,8 @@ You can set your own list of commands with ;;;*** -;;;### (autoloads nil "helm-files" "helm-files.el" (22303 19284 886175 -;;;;;; 391000)) +;;;### (autoloads nil "helm-files" "helm-files.el" (22387 29367 172734 +;;;;;; 423000)) ;;; Generated autoloads from helm-files.el (autoload 'helm-browse-project "helm-files" "\ @@ -291,6 +293,21 @@ and (autoload 'helm-find "helm-files" "\ Preconfigured `helm' for the find shell command. +Recursively find files whose names are matched by all specified +globbing PATTERNs under the current directory using the external +program specified in `find-program' (usually \"find\"). Every +input PATTERN is silently wrapped into two stars: *PATTERN*. + +With prefix argument, prompt for a directory to search. + +When user option `helm-findutils-search-full-path' is non-nil, +match against complete paths, otherwise, against file names +without directory part. + +The (possibly empty) list of globbing PATTERNs can be followed by +the separator \"*\" plus any number of additional arguments that +are passed to \"find\" literally. + \(fn ARG)" t nil) (autoload 'helm-find-files "helm-files" "\ @@ -322,8 +339,8 @@ Preconfigured `helm' for `recentf'. ;;;*** -;;;### (autoloads nil "helm-font" "helm-font.el" (22303 19284 830175 -;;;;;; 434000)) +;;;### (autoloads nil "helm-font" "helm-font.el" (22387 29367 104786 +;;;;;; 731000)) ;;; Generated autoloads from helm-font.el (autoload 'helm-select-xfont "helm-font" "\ @@ -338,8 +355,8 @@ Preconfigured helm for `ucs-names' math symbols. ;;;*** -;;;### (autoloads nil "helm-grep" "helm-grep.el" (22303 19284 954175 -;;;;;; 338000)) +;;;### (autoloads nil "helm-grep" "helm-grep.el" (22387 29367 240682 +;;;;;; 114000)) ;;; Generated autoloads from helm-grep.el (autoload 'helm-goto-precedent-file "helm-grep" "\ @@ -366,8 +383,8 @@ With a prefix arg ARG git-grep the whole repository. ;;;*** -;;;### (autoloads nil "helm-help" "helm-help.el" (22303 19284 782175 -;;;;;; 471000)) +;;;### (autoloads nil "helm-help" "helm-help.el" (22387 29367 52826 +;;;;;; 733000)) ;;; Generated autoloads from helm-help.el (autoload 'helm-documentation "helm-help" "\ @@ -393,8 +410,8 @@ HELM-ATTRIBUTE should be a symbol. ;;;*** -;;;### (autoloads nil "helm-id-utils" "helm-id-utils.el" (22303 19284 -;;;;;; 862175 409000)) +;;;### (autoloads nil "helm-id-utils" "helm-id-utils.el" (22387 29367 +;;;;;; 140759 38000)) ;;; Generated autoloads from helm-id-utils.el (autoload 'helm-gid "helm-id-utils" "\ @@ -408,8 +425,8 @@ See . ;;;*** -;;;### (autoloads nil "helm-imenu" "helm-imenu.el" (22303 19284 846175 -;;;;;; 421000)) +;;;### (autoloads nil "helm-imenu" "helm-imenu.el" (22387 29367 120774 +;;;;;; 423000)) ;;; Generated autoloads from helm-imenu.el (autoload 'helm-imenu "helm-imenu" "\ @@ -418,14 +435,16 @@ Preconfigured `helm' for `imenu'. \(fn)" t nil) (autoload 'helm-imenu-in-all-buffers "helm-imenu" "\ -Preconfigured helm for fetching imenu entries of all buffers. +Preconfigured helm for fetching imenu entries in all buffers with similar mode as current. +A mode is similar as current if it is the same, it is derived i.e `derived-mode-p' +or it have an association in `helm-imenu-all-buffer-assoc'. \(fn)" t nil) ;;;*** -;;;### (autoloads nil "helm-info" "helm-info.el" (22303 19284 838175 -;;;;;; 427000)) +;;;### (autoloads nil "helm-info" "helm-info.el" (22387 29367 112780 +;;;;;; 578000)) ;;; Generated autoloads from helm-info.el (autoload 'helm-info "helm-info" "\ @@ -441,8 +460,8 @@ With a prefix-arg insert symbol at point. ;;;*** -;;;### (autoloads nil "helm-locate" "helm-locate.el" (22303 19284 -;;;;;; 790175 465000)) +;;;### (autoloads nil "helm-locate" "helm-locate.el" (22387 29367 +;;;;;; 60820 578000)) ;;; Generated autoloads from helm-locate.el (autoload 'helm-projects-find-files "helm-locate" "\ @@ -469,8 +488,8 @@ Where db_path is a filename matched by ;;;*** -;;;### (autoloads nil "helm-man" "helm-man.el" (22303 19284 914175 -;;;;;; 369000)) +;;;### (autoloads nil "helm-man" "helm-man.el" (22387 29367 200712 +;;;;;; 884000)) ;;; Generated autoloads from helm-man.el (autoload 'helm-man-woman "helm-man" "\ @@ -481,8 +500,8 @@ With a prefix arg reinitialize the cache. ;;;*** -;;;### (autoloads nil "helm-misc" "helm-misc.el" (22303 19284 898175 -;;;;;; 381000)) +;;;### (autoloads nil "helm-misc" "helm-misc.el" (22387 29367 180728 +;;;;;; 268000)) ;;; Generated autoloads from helm-misc.el (autoload 'helm-browse-menubar "helm-misc" "\ @@ -523,8 +542,8 @@ Preconfigured `helm' that provide completion of `comint' history. ;;;*** -;;;### (autoloads nil "helm-mode" "helm-mode.el" (22303 19284 766175 -;;;;;; 484000)) +;;;### (autoloads nil "helm-mode" "helm-mode.el" (22387 29366 904940 +;;;;;; 675000)) ;;; Generated autoloads from helm-mode.el (autoload 'helm-comp-read "helm-mode" "\ @@ -691,8 +710,8 @@ Note: This mode is incompatible with Emacs23. ;;;*** -;;;### (autoloads nil "helm-net" "helm-net.el" (22303 19284 926175 -;;;;;; 360000)) +;;;### (autoloads nil "helm-net" "helm-net.el" (22387 29367 216700 +;;;;;; 576000)) ;;; Generated autoloads from helm-net.el (autoload 'helm-surfraw "helm-net" "\ @@ -712,8 +731,8 @@ Preconfigured `helm' for Wikipedia lookup with Wikipedia suggest. ;;;*** -;;;### (autoloads nil "helm-org" "helm-org.el" (22303 19284 958175 -;;;;;; 335000)) +;;;### (autoloads nil "helm-org" "helm-org.el" (22387 29367 244679 +;;;;;; 37000)) ;;; Generated autoloads from helm-org.el (autoload 'helm-org-agenda-files-headings "helm-org" "\ @@ -744,8 +763,8 @@ Preconfigured helm for org templates. ;;;*** -;;;### (autoloads nil "helm-regexp" "helm-regexp.el" (22303 19284 -;;;;;; 922175 363000)) +;;;### (autoloads nil "helm-regexp" "helm-regexp.el" (22387 29367 +;;;;;; 208706 730000)) ;;; Generated autoloads from helm-regexp.el (autoload 'helm-moccur-mode "helm-regexp" "\ @@ -784,8 +803,8 @@ The prefix arg can be set before calling ;;;*** -;;;### (autoloads nil "helm-ring" "helm-ring.el" (22303 19284 778175 -;;;;;; 474000)) +;;;### (autoloads nil "helm-ring" "helm-ring.el" (22387 29367 48829 +;;;;;; 810000)) ;;; Generated autoloads from helm-ring.el (defvar helm-push-mark-mode nil "\ @@ -842,8 +861,8 @@ This command is useful when used with persistent action. ;;;*** -;;;### (autoloads nil "helm-semantic" "helm-semantic.el" (22303 19284 -;;;;;; 850175 418000)) +;;;### (autoloads nil "helm-semantic" "helm-semantic.el" (22387 29367 +;;;;;; 128768 269000)) ;;; Generated autoloads from helm-semantic.el (autoload 'helm-semantic "helm-semantic" "\ @@ -865,10 +884,24 @@ Fill in the symbol at point by default. ;;;*** -;;;### (autoloads nil "helm-sys" "helm-sys.el" (22303 19284 874175 -;;;;;; 400000)) +;;;### (autoloads nil "helm-sys" "helm-sys.el" (22387 29367 148752 +;;;;;; 884000)) ;;; Generated autoloads from helm-sys.el +(defvar helm-top-poll-mode nil "\ +Non-nil if Helm-Top-Poll mode is enabled. +See the command `helm-top-poll-mode' for a description of this minor mode. +Setting this variable directly does not take effect; +either customize it (see the info node `Easy Customization') +or call the function `helm-top-poll-mode'.") + +(custom-autoload 'helm-top-poll-mode "helm-sys" nil) + +(autoload 'helm-top-poll-mode "helm-sys" "\ +Refresh automatically helm top buffer once enabled. + +\(fn &optional ARG)" t nil) + (autoload 'helm-top "helm-sys" "\ Preconfigured `helm' for top command. @@ -886,8 +919,8 @@ Preconfigured helm for xrandr. ;;;*** -;;;### (autoloads nil "helm-tags" "helm-tags.el" (22303 19284 822175 -;;;;;; 440000)) +;;;### (autoloads nil "helm-tags" "helm-tags.el" (22387 29367 92795 +;;;;;; 962000)) ;;; Generated autoloads from helm-tags.el (autoload 'helm-etags-select "helm-tags" "\ @@ -906,8 +939,8 @@ This function aggregates three sources of tag files: ;;;*** -;;;### (autoloads nil "helm-utils" "helm-utils.el" (22303 19284 798175 -;;;;;; 459000)) +;;;### (autoloads nil "helm-utils" "helm-utils.el" (22387 29367 72811 +;;;;;; 347000)) ;;; Generated autoloads from helm-utils.el (defvar helm-popup-tip-mode nil "\ @@ -927,8 +960,8 @@ Show help-echo informations in a popup tip at end of line. ;;;*** ;;;### (autoloads nil nil ("helm-easymenu.el" "helm-multi-match.el" -;;;;;; "helm-pkg.el" "helm-plugin.el" "helm-types.el") (22303 19284 -;;;;;; 973293 164000)) +;;;;;; "helm-pkg.el" "helm-plugin.el" "helm-types.el") (22387 29367 +;;;;;; 261328 856000)) ;;;*** diff --git a/elpa/helm-20160425.958/helm-bookmark.el b/elpa/helm-20160625.2316/helm-bookmark.el similarity index 100% rename from elpa/helm-20160425.958/helm-bookmark.el rename to elpa/helm-20160625.2316/helm-bookmark.el diff --git a/elpa/helm-20160425.958/helm-buffers.el b/elpa/helm-20160625.2316/helm-buffers.el similarity index 97% rename from elpa/helm-20160425.958/helm-buffers.el rename to elpa/helm-20160625.2316/helm-buffers.el index 7e405d6..509b9a6 100644 --- a/elpa/helm-20160425.958/helm-buffers.el +++ b/elpa/helm-20160625.2316/helm-buffers.el @@ -30,6 +30,7 @@ (declare-function ido-make-buffer-list "ido" (default)) (declare-function ido-add-virtual-buffers-to-list "ido") (declare-function helm-comp-read "helm-mode") +(declare-function helm-browse-project "helm-files") (defgroup helm-buffers nil @@ -153,6 +154,7 @@ Only buffer names are fuzzy matched when this is enabled, ;; So use zgrep for both as it is capable to handle non--compressed files. (define-key map (kbd "M-g s") 'helm-buffer-run-zgrep) (define-key map (kbd "C-s") 'helm-buffers-run-multi-occur) + (define-key map (kbd "C-x C-d") 'helm-buffers-run-browse-project) (define-key map (kbd "C-c o") 'helm-buffer-switch-other-window) (define-key map (kbd "C-c C-o") 'helm-buffer-switch-other-frame) (define-key map (kbd "C-c =") 'helm-buffer-run-ediff) @@ -186,6 +188,7 @@ Only buffer names are fuzzy matched when this is enabled, (defvar helm-buffers-list-cache nil) (defvar helm-buffer-max-len-mode nil) +(defvar helm-buffers-in-project-p nil) (defun helm-buffers-list--init () ;; Issue #51 Create the list before `helm-buffer' creation. @@ -549,7 +552,7 @@ i.e same color." collect p))) (if regexps (cl-loop for re in regexps - thereis + thereis (and buf-fname (string-match (substring re 1) (helm-basedir buf-fname)))) @@ -842,6 +845,18 @@ Can be used by any source that list buffers." (helm-force-update)))) (put 'helm-buffers-toggle-show-hidden-buffers 'helm-only t) +(defun helm-buffers-browse-project (buf) + "Browse project from buffer." + (with-current-buffer buf + (helm-browse-project helm-current-prefix-arg))) + +(defun helm-buffers-run-browse-project () + "Run `helm-buffers-browse-project' from key." + (interactive) + (with-helm-alive-p + (if helm-buffers-in-project-p + (user-error "You are already browsing this project") + (helm-exit-and-execute-action 'helm-buffers-browse-project)))) ;;; Candidate Transformers ;; @@ -884,6 +899,12 @@ displayed with the `file-name-shadow' face if available." :ff-transformer-show-only-basename nil :truncate-lines helm-buffers-truncate-lines)) +(defun helm-quit-and-helm-mini () + "Drop into `helm-mini' from `helm'." + (interactive) + (with-helm-alive-p + (helm-run-after-exit 'helm-mini))) + (provide 'helm-buffers) ;; Local Variables: diff --git a/elpa/helm-20160425.958/helm-color.el b/elpa/helm-20160625.2316/helm-color.el similarity index 100% rename from elpa/helm-20160425.958/helm-color.el rename to elpa/helm-20160625.2316/helm-color.el diff --git a/elpa/helm-20160425.958/helm-command.el b/elpa/helm-20160625.2316/helm-command.el similarity index 82% rename from elpa/helm-20160425.958/helm-command.el rename to elpa/helm-20160625.2316/helm-command.el index 69beab2..3eafc59 100644 --- a/elpa/helm-20160425.958/helm-command.el +++ b/elpa/helm-20160625.2316/helm-command.el @@ -65,6 +65,8 @@ Show all candidates on startup when 0 (default)." (defvar helm-M-x-input-history nil) +(defvar helm-M-x-prefix-argument nil + "Prefix argument before calling `helm-M-x'.") (cl-defun helm-M-x-get-major-mode-command-alist (mode-map) @@ -158,6 +160,28 @@ fuzzy matching is running its own sort function with a different algorithm." (push (substring (helm-cmd--get-current-function-name) 1) results)))) results)) +(defvar helm-M-x-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map helm-comp-read-map) + (define-key map (kbd "C-u") nil) + (define-key map (kbd "C-u") 'helm-M-x-universal-argument) + map)) + +(defun helm-M-x-universal-argument () + "Same as `universal-argument' but for `helm-M-x'." + (interactive) + (if helm-M-x-prefix-argument + (progn (setq helm-M-x-prefix-argument nil) + (let ((inhibit-read-only t)) + (with-selected-window (minibuffer-window) + (save-excursion + (goto-char (point-min)) + (delete-char (- (minibuffer-prompt-width) (length "M-x ")))))) + (message "Initial prefix arg disabled")) + (setq prefix-arg (list 4)) + (universal-argument--mode))) +(put 'helm-M-x-universal-argument 'helm-only t) + (defun helm-M-x-read-extended-command (&optional collection history) "Read command name to invoke in `helm-M-x'. Helm completion is not provided when executing or defining @@ -187,16 +211,20 @@ than the default which is OBARRAY." do (set-text-properties 0 (length c) nil c) and collect c)) (unwind-protect - (let ((msg "Error: Specifying a prefix arg before calling `helm-M-x'")) - (when current-prefix-arg - (ding) - (message "%s" msg) - (while (not (sit-for 1)) - (discard-input)) - (user-error msg)) + (progn (setq current-prefix-arg nil) (helm-comp-read - "M-x " (or collection obarray) + (concat (cond + ((eq helm-M-x-prefix-argument '-) "- ") + ((and (consp helm-M-x-prefix-argument) + (eq (car helm-M-x-prefix-argument) 4)) "C-u ") + ((and (consp helm-M-x-prefix-argument) + (integerp (car helm-M-x-prefix-argument))) + (format "%d " (car helm-M-x-prefix-argument))) + ((integerp helm-M-x-prefix-argument) + (format "%d " helm-M-x-prefix-argument))) + "M-x ") + (or collection obarray) :test 'commandp :requires-pattern helm-M-x-requires-pattern :name "Emacs Commands" @@ -210,6 +238,7 @@ than the default which is OBARRAY." :input-history 'helm-M-x-input-history :del-input nil :help-message 'helm-M-x-help-message + :keymap helm-M-x-map :must-match t :fuzzy helm-M-x-fuzzy-match :nomark t @@ -220,15 +249,20 @@ than the default which is OBARRAY." (setq helm--mode-line-display-prefarg nil))))) ;;;###autoload -(defun helm-M-x (arg &optional command-name) +(defun helm-M-x (_arg &optional command-name) "Preconfigured `helm' for Emacs commands. It is `helm' replacement of regular `M-x' `execute-extended-command'. Unlike regular `M-x' emacs vanilla `execute-extended-command' command, -the prefix args if needed, are passed AFTER starting `helm-M-x'. +the prefix args if needed, can be passed AFTER starting `helm-M-x'. +When a prefix arg is passed BEFORE starting `helm-M-x', the first `C-u' +while in `helm-M-x' session will disable it. You can get help on each command by persistent action." - (interactive (list current-prefix-arg (helm-M-x-read-extended-command))) + (interactive + (progn + (setq helm-M-x-prefix-argument current-prefix-arg) + (list current-prefix-arg (helm-M-x-read-extended-command)))) (let ((sym-com (and (stringp command-name) (intern-soft command-name)))) (when sym-com ;; Avoid having `this-command' set to *exit-minibuffer. @@ -237,7 +271,7 @@ You can get help on each command by persistent action." real-this-command sym-com) ;; If helm-M-x is called with regular emacs completion (kmacro) ;; use the value of arg otherwise use helm-current-prefix-arg. - (let ((prefix-arg (or helm-current-prefix-arg arg))) + (let ((prefix-arg (or helm-current-prefix-arg helm-M-x-prefix-argument))) ;; This ugly construct is to save history even on error. (unless helm-M-x-always-save-history (command-execute sym-com 'record)) @@ -246,7 +280,7 @@ You can get help on each command by persistent action." (delete command-name extended-command-history))) (when helm-M-x-always-save-history (command-execute sym-com 'record)))))) - +(put 'helm-M-x 'interactive-only 'command-execute) (provide 'helm-command) diff --git a/elpa/helm-20160425.958/helm-config.el b/elpa/helm-20160625.2316/helm-config.el similarity index 96% rename from elpa/helm-20160425.958/helm-config.el rename to elpa/helm-20160625.2316/helm-config.el index 7f3d9ca..1a1bf58 100644 --- a/elpa/helm-20160425.958/helm-config.el +++ b/elpa/helm-20160625.2316/helm-config.el @@ -149,7 +149,10 @@ ("(\\<\\(define-helm-type-attribute\\)\\>" 1 font-lock-keyword-face) ("(\\<\\(helm-multi-key-defun\\)\\>" 1 font-lock-keyword-face) ("(\\<\\(helm-while-no-input\\)\\>" 1 font-lock-keyword-face) - ("(\\<\\(helm-aif\\)\\>" 1 font-lock-keyword-face)))) + ("(\\<\\(helm-aif\\)\\>" 1 font-lock-keyword-face) + ("(\\<\\(helm-awhile\\)\\>" 1 font-lock-keyword-face) + ("(\\<\\(helm-acond\\)\\>" 1 font-lock-keyword-face) + ("(\\<\\(helm-with-gensyms\\)\\>" 1 font-lock-keyword-face)))) ;;; Load the autoload file diff --git a/elpa/helm-20160425.958/helm-dabbrev.el b/elpa/helm-20160625.2316/helm-dabbrev.el similarity index 89% rename from elpa/helm-20160425.958/helm-dabbrev.el rename to elpa/helm-20160625.2316/helm-dabbrev.el index 6f64f67..21d54f7 100644 --- a/elpa/helm-20160425.958/helm-dabbrev.el +++ b/elpa/helm-20160625.2316/helm-dabbrev.el @@ -18,6 +18,7 @@ ;;; Code: (require 'helm) +(require 'helm-lib) (require 'helm-help) (require 'helm-elisp) ; For show-completion. @@ -58,8 +59,7 @@ When nil all buffers are considered related to `current-buffer'." :group 'helm-dabbrev :type 'function) -(defcustom helm-dabbrev-major-mode-assoc - '((emacs-lisp-mode . lisp-interaction-mode)) +(defcustom helm-dabbrev-major-mode-assoc nil "Major mode association alist. This allow helm-dabbrev searching in buffers with the associated `major-mode'. e.g \(emacs-lisp-mode . lisp-interaction-mode\) @@ -120,37 +120,8 @@ but the initial search for all candidates in buffer(s)." collect buf)) (defun helm-dabbrev--same-major-mode-p (start-buffer) - ;; START-BUFFER is the current-buffer where we start searching. - ;; Determine the major-mode of START-BUFFER as `cur-maj-mode'. - ;; Each time the loop go in another buffer we try to find if its - ;; `major-mode' is: - ;; - same as the `cur-maj-mode' - ;; - derived from `cur-maj-mode' - ;; - have an assoc entry (major-mode . cur-maj-mode) - ;; - have an rassoc entry (cur-maj-mode . major-mode) - ;; - check if one of these entries inherit from another one in - ;; `helm-dabbrev-major-mode-assoc'. - (let* ((cur-maj-mode (with-current-buffer start-buffer major-mode)) - (c-assoc-mode (assq cur-maj-mode helm-dabbrev-major-mode-assoc)) - (c-rassoc-mode (rassq cur-maj-mode helm-dabbrev-major-mode-assoc)) - (o-assoc-mode (assq major-mode helm-dabbrev-major-mode-assoc)) - (o-rassoc-mode (rassq major-mode helm-dabbrev-major-mode-assoc)) - (cdr-c-assoc-mode (cdr c-assoc-mode)) - (cdr-o-assoc-mode (cdr o-assoc-mode))) - (or (eq major-mode cur-maj-mode) - (derived-mode-p cur-maj-mode) - (or (eq cdr-c-assoc-mode major-mode) - (eq (car c-rassoc-mode) major-mode) - (eq (cdr (assq cdr-c-assoc-mode helm-dabbrev-major-mode-assoc)) - major-mode) - (eq (car (rassq cdr-c-assoc-mode helm-dabbrev-major-mode-assoc)) - major-mode)) - (or (eq cdr-o-assoc-mode cur-maj-mode) - (eq (car o-rassoc-mode) cur-maj-mode) - (eq (cdr (assq cdr-o-assoc-mode helm-dabbrev-major-mode-assoc)) - cur-maj-mode) - (eq (car (rassq cdr-o-assoc-mode helm-dabbrev-major-mode-assoc)) - cur-maj-mode))))) + "Decide if current-buffer is related to START-BUFFER." + (helm-same-major-mode-p start-buffer helm-dabbrev-major-mode-assoc)) (defun helm-dabbrev--collect (str limit ignore-case all) (let* ((case-fold-search ignore-case) diff --git a/elpa/helm-20160425.958/helm-easymenu.el b/elpa/helm-20160625.2316/helm-easymenu.el similarity index 100% rename from elpa/helm-20160425.958/helm-easymenu.el rename to elpa/helm-20160625.2316/helm-easymenu.el diff --git a/elpa/helm-20160425.958/helm-elisp-package.el b/elpa/helm-20160625.2316/helm-elisp-package.el similarity index 90% rename from elpa/helm-20160425.958/helm-elisp-package.el rename to elpa/helm-20160625.2316/helm-elisp-package.el index 29914d4..059c05e 100644 --- a/elpa/helm-20160425.958/helm-elisp-package.el +++ b/elpa/helm-20160625.2316/helm-elisp-package.el @@ -43,6 +43,7 @@ ;; Shutup bytecompiler for emacs-24* (defvar package-menu-async) ; Only available on emacs-25. +(declare-function async-byte-recompile-directory "ext:async-bytecomp.el") (defun helm-el-package--init () (let (package-menu-async) @@ -104,26 +105,20 @@ (defun helm-el-package-install-1 (pkg-list) (cl-loop with mkd = pkg-list - for p in mkd - for id = (get-text-property 0 'tabulated-list-id p) - do (package-install - (if (fboundp 'package-desc-name) id (car id))) - collect (if (fboundp 'package-desc-full-name) id (car id)) - into installed-list - finally do (progn - (when (boundp 'package-selected-packages) - (customize-save-variable - 'package-selected-packages - (append (mapcar 'package-desc-name installed-list) - package-selected-packages))) - (if (fboundp 'package-desc-full-name) - (message (format "%d packages installed:\n(%s)" - (length installed-list) - (mapconcat #'package-desc-full-name - installed-list ", "))) - (message (format "%d packages installed:\n(%s)" - (length installed-list) - (mapconcat 'symbol-name installed-list ", "))))))) + for p in mkd + for id = (get-text-property 0 'tabulated-list-id p) + do (package-install + (if (fboundp 'package-desc-name) id (car id))) + collect (if (fboundp 'package-desc-full-name) id (car id)) + into installed-list + finally do (if (fboundp 'package-desc-full-name) + (message (format "%d packages installed:\n(%s)" + (length installed-list) + (mapconcat #'package-desc-full-name + installed-list ", "))) + (message (format "%d packages installed:\n(%s)" + (length installed-list) + (mapconcat 'symbol-name installed-list ", ")))))) (defun helm-el-package-install (_candidate) (helm-el-package-install-1 (helm-marked-candidates))) @@ -212,7 +207,10 @@ (ignore)) ((equal pkg-desc upgrade) ;;Install. - (package-install pkg-desc)) + (with-no-warnings + (if (boundp 'package-selected-packages) + (package-install pkg-desc t) + (package-install pkg-desc)))) (t ;; Delete. (if (boundp 'package-selected-packages) @@ -351,12 +349,23 @@ (and (package-built-in-p pkg-name) (assq pkg-name package-alist)))) (append acts '(("Reinstall package(s)" . helm-el-package-reinstall) + ("Recompile package(s)" . helm-el-package-recompile) ("Uninstall package(s)" . helm-el-package-uninstall)))) (t (append acts '(("Install packages(s)" . helm-el-package-install))))))) (defun helm-el-package--update () (setq helm-el-package--initialized-p nil)) +(defun helm-el-package-recompile (_pkg) + (cl-loop for p in (helm-marked-candidates) + for pkg-desc = (get-text-property 0 'tabulated-list-id p) + for name = (package-desc-name pkg-desc) + for dir = (package-desc-dir pkg-desc) + do (if (fboundp 'async-byte-recompile-directory) + (async-byte-recompile-directory dir) + (when (y-or-n-p (format "Really recompile `%s' while already loaded ?" name)) + (byte-recompile-directory dir 0 t))))) + (defun helm-el-package-reinstall (_pkg) (cl-loop for p in (helm-marked-candidates) for pkg-desc = (get-text-property 0 'tabulated-list-id p) @@ -374,7 +383,7 @@ ;; packages already installed, the name (as symbol) ;; fails with such packages. (package-install - (cadr (assq name package-archive-contents)))) + (cadr (assq name package-archive-contents)) t)) (package-delete pkg-desc) (package-install name)))) diff --git a/elpa/helm-20160425.958/helm-elisp.el b/elpa/helm-20160625.2316/helm-elisp.el similarity index 99% rename from elpa/helm-20160425.958/helm-elisp.el rename to elpa/helm-20160625.2316/helm-elisp.el index abb2995..c04dc95 100644 --- a/elpa/helm-20160425.958/helm-elisp.el +++ b/elpa/helm-20160625.2316/helm-elisp.el @@ -458,6 +458,8 @@ Filename completion happen if string start after or between a double quote." ;;; Apropos ;; ;; +(defvar helm-apropos-history nil) + (defun helm-apropos-init (test default) "Init candidates buffer for `helm-apropos' sources." (require 'helm-help) @@ -681,6 +683,7 @@ i.e the `symbol-name' of any existing symbol." (mapcar (lambda (func) (funcall func default)) helm-apropos-function-list) + :history 'helm-apropos-history :buffer "*helm apropos*" :preselect (and default (concat "\\_<" (regexp-quote default) "\\_>")))) diff --git a/elpa/helm-20160425.958/helm-elscreen.el b/elpa/helm-20160625.2316/helm-elscreen.el similarity index 100% rename from elpa/helm-20160425.958/helm-elscreen.el rename to elpa/helm-20160625.2316/helm-elscreen.el diff --git a/elpa/helm-20160425.958/helm-eshell.el b/elpa/helm-20160625.2316/helm-eshell.el similarity index 100% rename from elpa/helm-20160425.958/helm-eshell.el rename to elpa/helm-20160625.2316/helm-eshell.el diff --git a/elpa/helm-20160425.958/helm-eval.el b/elpa/helm-20160625.2316/helm-eval.el similarity index 100% rename from elpa/helm-20160425.958/helm-eval.el rename to elpa/helm-20160625.2316/helm-eval.el diff --git a/elpa/helm-20160425.958/helm-external.el b/elpa/helm-20160625.2316/helm-external.el similarity index 100% rename from elpa/helm-20160425.958/helm-external.el rename to elpa/helm-20160625.2316/helm-external.el diff --git a/elpa/helm-20160425.958/helm-files.el b/elpa/helm-20160625.2316/helm-files.el similarity index 95% rename from elpa/helm-20160425.958/helm-files.el rename to elpa/helm-20160625.2316/helm-files.el index 6cc9377..15b6d51 100644 --- a/elpa/helm-20160425.958/helm-files.el +++ b/elpa/helm-20160625.2316/helm-files.el @@ -315,6 +315,11 @@ see `helm-ff-guess-ffap-filenames' for this." "Face used for file names in `helm-find-files'." :group 'helm-files-faces) +(defface helm-ff-dirs + '((t (:inherit font-lock-function-name-face))) + "Face used for file names in recursive dirs completion in `helm-find-files'." + :group 'helm-files-faces) + (defface helm-history-deleted '((t (:inherit helm-ff-invalid-symlink))) "Face used for deleted files in `file-name-history'." @@ -472,8 +477,8 @@ Don't set it directly, use instead `helm-ff-auto-update-initial-value'.") 'helm-find-files-eshell-command-on-file "Find file as root `C-c r'" 'helm-find-file-as-root "Find alternate file" 'find-alternate-file - "Ediff File `C-='" 'helm-find-files-ediff-files - "Ediff Merge File `C-c ='" 'helm-find-files-ediff-merge-files + "Ediff File `C-c ='" 'helm-find-files-ediff-files + "Ediff Merge File `M-='" 'helm-find-files-ediff-merge-files "Delete File(s) `M-D'" 'helm-delete-marked-files "Copy file(s) `M-C, C-u to follow'" 'helm-find-files-copy "Rename file(s) `M-R, C-u to follow'" 'helm-find-files-rename @@ -1322,7 +1327,7 @@ print with the default `lpr' settings. NOTE: DO NOT set the \"-P\" flag in `lpr-switches', if you really have to modify this, do it in `lpr-printer-switch'. - + Same as `dired-do-print' but for helm." (require 'lpr) (when (or helm-current-prefix-arg @@ -1453,7 +1458,7 @@ If prefix numeric arg is given go ARG level up." (with-helm-alive-p (when (and (helm-file-completion-source-p) (not (helm-ff-invalid-tramp-name-p))) - (unless helm-find-files--level-tree-iterator + (unless helm-find-files--level-tree-iterator (setq helm-find-files--level-tree-iterator (helm-iter-list (cdr helm-find-files--level-tree)))) (setq helm-find-files--level-tree nil) @@ -1588,34 +1593,42 @@ or when `helm-pattern' is equal to \"~/\"." (defun helm-ff-auto-expand-to-home-or-root () "Allow expanding to home/user directory or root or text yanked after pattern." (when (and (helm-file-completion-source-p) - (string-match - "/?\\$.*/\\|/\\./\\|/\\.\\./\\|/~.*/\\|//\\|\\(/[[:alpha:]]:/\\|\\s\\+\\)" - helm-pattern) (with-current-buffer (window-buffer (minibuffer-window)) (eolp)) (not (string-match helm-ff-url-regexp helm-pattern))) - (let* ((match (match-string 0 helm-pattern)) - (input (cond ((string= match "/./") - (expand-file-name default-directory)) - ((string= helm-pattern "/../") "/") - ((string-match-p "\\`/\\$" match) - (let ((sub (substitute-in-file-name match))) - (if (file-directory-p sub) - sub (replace-regexp-in-string "/\\'" "" sub)))) - (t (expand-file-name - (helm-substitute-in-filename helm-pattern) - ;; [Windows] On UNC paths "/" expand to current machine, - ;; so use the root of current Drive. (i.e "C:/") - (and (memq system-type '(windows-nt ms-dos)) - (getenv "SystemDrive")) ; nil on Unix. - ))))) - (if (file-directory-p input) - (setq helm-ff-default-directory - (setq input (file-name-as-directory input))) - (setq helm-ff-default-directory (file-name-as-directory - (file-name-directory input)))) - (with-helm-window - (helm-set-pattern input) - (helm-check-minibuffer-input))))) + (cond ((and (not (file-remote-p helm-pattern)) + (null (file-exists-p helm-pattern)) + (string-match-p + "\\`\\([.]\\|\\s-\\)\\{2\\}[^/]+" + (helm-basename helm-pattern)) + (string-match-p "/\\'" helm-pattern)) + (helm-ff-recursive-dirs helm-pattern) + (with-helm-window (helm-check-minibuffer-input))) + ((and (string-match + "/?\\$.*/\\|/\\./\\|/\\.\\./\\|/~.*/\\|//\\|\\(/[[:alpha:]]:/\\|\\s\\+\\)" + helm-pattern)) + (let* ((match (match-string 0 helm-pattern)) + (input (cond ((string= match "/./") + (expand-file-name default-directory)) + ((string= helm-pattern "/../") "/") + ((string-match-p "\\`/\\$" match) + (let ((sub (substitute-in-file-name match))) + (if (file-directory-p sub) + sub (replace-regexp-in-string "/\\'" "" sub)))) + (t (expand-file-name + (helm-substitute-in-filename helm-pattern) + ;; [Windows] On UNC paths "/" expand to current machine, + ;; so use the root of current Drive. (i.e "C:/") + (and (memq system-type '(windows-nt ms-dos)) + (getenv "SystemDrive")) ; nil on Unix. + ))))) + (if (file-directory-p input) + (setq helm-ff-default-directory + (setq input (file-name-as-directory input))) + (setq helm-ff-default-directory (file-name-as-directory + (file-name-directory input)))) + (with-helm-window + (helm-set-pattern input) + (helm-check-minibuffer-input))))))) (defun helm-substitute-in-filename (fname) "Substitute all parts of FNAME from start up to \"~/\" or \"/\". @@ -1748,6 +1761,9 @@ purpose." invalid-basedir non-essential (tramp-verbose helm-tramp-verbose)) ; No tramp message when 0. + ;; Tramp check if path is valid without waiting a valid + ;; connection and may send a file-error. + (setq helm--ignore-errors (file-remote-p path)) (set-text-properties 0 (length path) nil path) ;; Issue #118 allow creation of newdir+newfile. (unless (or @@ -2230,12 +2246,10 @@ Return candidates prefixed with basename of `helm-input' first." (eq major-mode 'message-mode)) (append actions '(("Gnus attach file(s)" . helm-ff-gnus-attach-files)))) - ((save-match-data - (and ffap-url-regexp - (not (string-match-p ffap-url-regexp str-at-point)) - (not (with-helm-current-buffer (eq major-mode 'dired-mode))) - (string-match ":\\([0-9]+:?\\)" str-at-point) - )) + ((and ffap-url-regexp + (not (string-match-p ffap-url-regexp str-at-point)) + (not (with-helm-current-buffer (eq major-mode 'dired-mode))) + (string-match-p ":\\([0-9]+:?\\)" str-at-point)) (append '(("Find file to line number" . helm-ff-goto-linum)) actions)) ((string-match (image-file-name-regexp) candidate) @@ -2405,11 +2419,62 @@ If a prefix arg is given or `helm-follow-mode' is on open file." (file-name-directory candidate)) (helm-ff-file-compressed-p candidate)) (funcall insert-in-minibuffer (concat candidate "#"))) + ;; File doesn't exists and basename starts with ".." or " ", + ;; Start a recursive search for directories. + ((and (not (file-exists-p candidate)) + (not (file-remote-p candidate)) + (string-match-p "\\`\\([.]\\|\\s-\\)\\{2\\}[^/]+" + (helm-basename candidate))) + ;; As soon as the final "/" is added the job is passed + ;; to `helm-ff-auto-expand-to-home-or-root'. + (funcall insert-in-minibuffer (concat candidate "/"))) ;; On second hit we open file. ;; On Third hit we kill it's buffer maybe. (t (helm-ff-kill-or-find-buffer-fname candidate))))) + +;;; Recursive dirs completion +;; +(defun helm-find-files-recursive-dirs (directory &optional input) + (when (string-match "\\(\\s-+\\|[.]\\)\\{2\\}" input) + (setq input (replace-match "" nil t input))) + (message "Recursively searching %s from %s ..." + input (abbreviate-file-name directory)) + (helm :sources + (helm-make-source + "Recursive directories" 'helm-locate-subdirs-source + :basedir (if (string-match-p "\\`es" helm-locate-recursive-dirs-command) + directory + (shell-quote-argument directory)) + :subdir (shell-quote-argument input) + :candidate-transformer + `((lambda (candidates) + (cl-loop for c in candidates + when (and (file-directory-p c) + (null (helm-boring-directory-p + c helm-boring-file-regexp-list)) + (string-match-p ,(regexp-quote input) + (helm-basename c))) + collect (propertize c 'face 'helm-ff-dirs))) + helm-w32-pathname-transformer) + :persistent-action 'ignore + :action (lambda (c) + (helm-set-pattern + (file-name-as-directory (expand-file-name c))))) + :candidate-number-limit 999999 + :allow-nest t + :resume 'noresume + :ff-transformer-show-only-basename nil + :buffer "*helm recursive dirs*")) + +(defun helm-ff-recursive-dirs (_candidate) + "Launch a recursive search in `helm-ff-default-directory'." + (with-helm-default-directory helm-ff-default-directory + (helm-find-files-recursive-dirs + (helm-current-directory) + (helm-basename (helm-get-selection))))) + (defun helm-ff-file-compressed-p (candidate) "Whether CANDIDATE is a compressed file or not." (member (file-name-extension candidate) @@ -2499,8 +2564,8 @@ Use it for non--interactive calls of `helm-find-files'." :ff-transformer-show-only-basename helm-ff-transformer-show-only-basename :default def - :prompt "Find Files or Url: " - :buffer "*Helm Find Files*") + :prompt "Find files or url: " + :buffer "*helm find files*") (helm-attrset 'resume `(lambda () (setq helm-ff-default-directory ,helm-ff-default-directory @@ -2529,7 +2594,7 @@ Use it for non--interactive calls of `helm-find-files'." ;; Switch back to helm-find-files. (helm-set-pattern "./" t) ; Back to initial directory of hff session. (helm-set-sources '(helm-source-find-files)) - (helm--maybe-update-keymap))))) + (helm--maybe-update-keymap))))) (put 'helm-find-files-toggle-to-bookmark 'helm-only t) (defun helm-find-files-initial-input (&optional input) @@ -2947,7 +3012,7 @@ Else return ACTIONS unmodified." :path 'full :directories nil :match match - :skip-subdirs ignore-dirs) + :skip-subdirs ignore-dirs) do (file-cache-add-file f))) (defun helm-ff-cache-add-file (_candidate) @@ -3079,7 +3144,7 @@ Don't use it in your own code unless you know what you are doing.") (cl-loop for file in (helm-marked-candidates) do (setq recentf-list (delq file recentf-list))))))))) -(defvar helm-source-recentf nil +(defvar helm-source-recentf nil "See (info \"(emacs)File Conveniences\"). Set `recentf-max-saved-items' to a bigger value if default is too small.") @@ -3099,6 +3164,7 @@ Set `recentf-max-saved-items' to a bigger value if default is too small.") ;; ;; Only hg and git are supported for now. (defvar helm--browse-project-cache (make-hash-table :test 'equal)) +(defvar helm-buffers-in-project-p) (defun helm-browse-project-get-buffers (root-directory) (cl-loop for b in (helm-buffer-list) @@ -3134,17 +3200,20 @@ Set `recentf-max-saved-items' to a bigger value if default is too small.") "%s (%s)" name (abbreviate-file-name directory))) :match-part (lambda (c) - (if helm-ff-transformer-show-only-basename + (if (with-helm-buffer + helm-ff-transformer-show-only-basename) (helm-basename c) c)) :filter-one-by-one (lambda (c) - (if helm-ff-transformer-show-only-basename + (if (with-helm-buffer + helm-ff-transformer-show-only-basename) (cons (propertize (helm-basename c) 'face 'helm-ff-file) c) (propertize c 'face 'helm-ff-file))) :keymap helm-generic-files-map - :action 'helm-type-file-actions)) + :action 'helm-type-file-actions)) + :ff-transformer-show-only-basename nil :buffer "*helm browse project*")) ;;;###autoload @@ -3167,24 +3236,29 @@ and and ." (interactive "P") - (cond ((and (require 'helm-ls-git nil t) - (fboundp 'helm-ls-git-root-dir) - (helm-ls-git-root-dir)) - (helm-ls-git-ls)) - ((and (require 'helm-ls-hg nil t) - (fboundp 'helm-hg-root) - (helm-hg-root)) - (helm-hg-find-files-in-project)) - ((and (require 'helm-ls-svn nil t) - (fboundp 'helm-ls-svn-root-dir) - (helm-ls-svn-root-dir)) - (helm-ls-svn-ls)) - (t (let ((cur-dir (helm-browse-project-get--root-dir - (helm-current-directory)))) - (if (or arg (gethash cur-dir helm--browse-project-cache)) - (helm-browse-project-find-files cur-dir (equal arg '(16))) - (helm :sources (helm-browse-project-build-buffers-source cur-dir) - :buffer "*helm browse project*")))))) + (let ((helm-type-buffer-actions + (remove (assoc "Browse project from buffer" + helm-type-buffer-actions) + helm-type-buffer-actions)) + (helm-buffers-in-project-p t)) + (cond ((and (require 'helm-ls-git nil t) + (fboundp 'helm-ls-git-root-dir) + (helm-ls-git-root-dir)) + (helm-ls-git-ls)) + ((and (require 'helm-ls-hg nil t) + (fboundp 'helm-hg-root) + (helm-hg-root)) + (helm-hg-find-files-in-project)) + ((and (require 'helm-ls-svn nil t) + (fboundp 'helm-ls-svn-root-dir) + (helm-ls-svn-root-dir)) + (helm-ls-svn-ls)) + (t (let ((cur-dir (helm-browse-project-get--root-dir + (helm-current-directory)))) + (if (or arg (gethash cur-dir helm--browse-project-cache)) + (helm-browse-project-find-files cur-dir (equal arg '(16))) + (helm :sources (helm-browse-project-build-buffers-source cur-dir) + :buffer "*helm browse project*"))))))) (defun helm-browse-project-get--root-dir (directory) (cl-loop with dname = (file-name-as-directory directory) @@ -3435,7 +3509,7 @@ separator." '(" " mode-line-buffer-identification " " (:eval (format "L%s" (helm-candidate-number-at-point))) " " (:eval (propertize - (format "[Find process finished - (%s results)]" + (format "[Find process finished - (%s results)]" (max (1- (count-lines (point-min) (point-max))) 0)) @@ -3469,7 +3543,22 @@ separator." ;; ;;;###autoload (defun helm-find (arg) - "Preconfigured `helm' for the find shell command." + "Preconfigured `helm' for the find shell command. + +Recursively find files whose names are matched by all specified +globbing PATTERNs under the current directory using the external +program specified in `find-program' (usually \"find\"). Every +input PATTERN is silently wrapped into two stars: *PATTERN*. + +With prefix argument, prompt for a directory to search. + +When user option `helm-findutils-search-full-path' is non-nil, +match against complete paths, otherwise, against file names +without directory part. + +The (possibly empty) list of globbing PATTERNs can be followed by +the separator \"*\" plus any number of additional arguments that +are passed to \"find\" literally." (interactive "P") (let ((directory (if arg diff --git a/elpa/helm-20160425.958/helm-font.el b/elpa/helm-20160625.2316/helm-font.el similarity index 100% rename from elpa/helm-20160425.958/helm-font.el rename to elpa/helm-20160625.2316/helm-font.el diff --git a/elpa/helm-20160425.958/helm-grep.el b/elpa/helm-20160625.2316/helm-grep.el similarity index 94% rename from elpa/helm-20160425.958/helm-grep.el rename to elpa/helm-20160625.2316/helm-grep.el index 22f4087..bd5422b 100644 --- a/elpa/helm-20160425.958/helm-grep.el +++ b/elpa/helm-20160625.2316/helm-grep.el @@ -364,11 +364,13 @@ It is intended to use as a let-bound variable, DON'T set this globaly.") (mapconcat 'identity files " ") (mapconcat 'shell-quote-argument files " ")))))) -(defun helm-grep-command (&optional recursive) +(defun helm-grep-command (&optional recursive grep) (let* ((com (if recursive helm-grep-default-recurse-command helm-grep-default-command)) - (exe (and com (car (split-string com " "))))) + (exe (if grep + (symbol-name grep) + (and com (car (split-string com " ")))))) (if (and exe (string= exe "git")) "git-grep" exe))) (cl-defun helm-grep-use-ack-p (&key where) @@ -908,21 +910,28 @@ These extensions will be added to command line with --include arg of grep." (defvar helm-source-grep nil) -(defun helm-do-grep-1 (targets &optional recurse zgrep exts default-input input) +(defun helm-do-grep-1 (targets &optional recurse grep exts default-input input) "Launch grep on a list of TARGETS files. + When RECURSE is given use -r option of grep and prompt user -to set the --include args of grep. -You can give more than one arg separated by space at prompt. -e.g *.el *.py *.tex. +for EXTS to set the --include args of grep. +Interactively you can give more than one arg separated by space at prompt. +e.g + $Pattern: *.el *.py *.tex + From lisp use the EXTS argument as a list of extensions as above. If you are using ack-grep, you will be prompted for --type instead and EXTS will be ignored. If prompt is empty `helm-grep-ignored-files' are added to --exclude. + Argument DEFAULT-INPUT is use as `default' arg of `helm' and INPUT is used as `input' arg of `helm', See `helm' docstring. -ZGREP when non--nil use zgrep instead, without prompting for a choice -in recurse, and ignoring EXTS, search being made on -`helm-zgrep-file-extension-regexp'." + +Arg GREP when non--nil specify which grep to use +It is used actually to specify 'zgrep or 'git. +When zgrep is used don't prompt for a choice +in recurse, and ignore EXTS, search being made recursively on files matching +`helm-zgrep-file-extension-regexp' only." (when (and (helm-grep-use-ack-p) helm-ff-default-directory (file-remote-p helm-ff-default-directory)) @@ -930,7 +939,7 @@ in recurse, and ignoring EXTS, search being made on (let* (non-essential (exts (and recurse ;; [FIXME] I could handle this from helm-walk-directory. - (not zgrep) ; zgrep doesn't handle -r opt. + (not (eq grep 'zgrep)) ; zgrep doesn't handle -r opt. (not (helm-grep-use-ack-p :where 'recursive)) (or exts (helm-grep-get-file-extensions targets)))) (include-files @@ -942,7 +951,7 @@ in recurse, and ignoring EXTS, search being made on (remove "*" exts) exts) " "))) (types (and (not include-files) - (not zgrep) + (not (eq grep 'zgrep)) recurse (helm-grep-use-ack-p :where 'recursive) ;; When %e format spec is not specified @@ -951,11 +960,7 @@ in recurse, and ignoring EXTS, search being made on (helm-grep-read-ack-type))) (follow (and helm-follow-mode-persistent (assoc-default 'follow helm-source-grep))) - (src-name (if zgrep - "Zgrep" - (capitalize (if recurse - (helm-grep-command t) - (helm-grep-command)))))) + (src-name (capitalize (helm-grep-command recurse grep)))) ;; When called as action from an other source e.g *-find-files ;; we have to kill action buffer. (when (get-buffer helm-action-buffer) @@ -968,13 +973,14 @@ in recurse, and ignoring EXTS, search being made on ;; We need to store these vars locally ;; to pass infos later to `helm-resume'. (helm-set-local-variable - 'helm-zgrep-recurse-flag (and recurse zgrep) + 'helm-zgrep-recurse-flag (and recurse (eq grep 'zgrep)) 'helm-grep-last-targets targets 'helm-grep-include-files (or include-files types) 'helm-grep-in-recurse recurse - 'helm-grep-use-zgrep zgrep + 'helm-grep-use-zgrep (eq grep 'zgrep) 'helm-grep-default-command - (cond (zgrep helm-default-zgrep-command) + (cond ((eq grep 'zgrep) helm-default-zgrep-command) + ((eq grep 'git) helm-grep-git-grep-command) (recurse helm-grep-default-recurse-command) ;; When resuming, the local value of ;; `helm-grep-default-command' is used, only git-grep @@ -986,8 +992,7 @@ in recurse, and ignoring EXTS, search being made on :follow follow)) (helm :sources 'helm-source-grep - :buffer (format "*helm %s*" - (if zgrep "zgrep" (helm-grep-command recurse))) + :buffer (format "*helm %s*" (helm-grep-command recurse grep)) :default default-input :input input :keymap helm-grep-map @@ -1095,7 +1100,7 @@ in recurse, and ignoring EXTS, search being made on (while (and (re-search-forward reg nil t) (> (- (setq end (match-end 0)) (setq beg (match-beginning 0))) 0)) - (add-text-properties beg end '(face helm-grep-match))) + (helm-add-face-text-properties beg end 'helm-grep-match)) do (goto-char (point-min))) (buffer-string)) (error nil)))) @@ -1293,24 +1298,48 @@ if available with current AG version." (let ((cmd-line (helm-grep-ag-prepare-cmd-line helm-pattern directory type))) (set (make-local-variable 'helm-grep-last-cmd-line) cmd-line) + (helm-log "Starting %s process in directory `%s'" + (helm-grep--ag-command) directory) + (helm-log "Command line used was:\n\n%s" + (concat ">>> " cmd-line "\n\n")) (prog1 (start-process-shell-command "ag" helm-buffer cmd-line) (set-process-sentinel (get-buffer-process helm-buffer) - (lambda (_process event) - (when (string= event "finished\n") - (with-helm-window - (setq mode-line-format - '(" " mode-line-buffer-identification " " - (:eval (format "L%s" (helm-candidate-number-at-point))) " " - (:eval (propertize - (format - "[%s process finished - (%s results)] " - (upcase (helm-grep--ag-command)) - (helm-get-candidate-number)) - 'face 'helm-grep-finish)))) - (force-mode-line-update)))))))) + (lambda (process event) + (let* ((err (process-exit-status process)) + (noresult (= err 1))) + (cond (noresult + (with-helm-buffer + (insert (concat "* Exit with code 1, no result found," + " command line was:\n\n " + (propertize helm-grep-last-cmd-line + 'face 'helm-grep-cmd-line))) + (setq mode-line-format + '(" " mode-line-buffer-identification " " + (:eval (format "L%s" (helm-candidate-number-at-point))) " " + (:eval (propertize + (format + "[%s process finished - (no results)] " + (upcase (helm-grep--ag-command))) + 'face 'helm-grep-finish)))))) + ((string= event "finished\n") + (with-helm-window + (setq mode-line-format + '(" " mode-line-buffer-identification " " + (:eval (format "L%s" (helm-candidate-number-at-point))) " " + (:eval (propertize + (format + "[%s process finished - (%s results)] " + (upcase (helm-grep--ag-command)) + (helm-get-candidate-number)) + 'face 'helm-grep-finish)))) + (force-mode-line-update))) + (t (helm-log + "Error: %s %s" + (helm-grep--ag-command) + (replace-regexp-in-string "\n" "" event)))))))))) (defclass helm-grep-ag-class (helm-source-async) ((nohighlight :initform t) @@ -1378,8 +1407,7 @@ at DIRECTORY. Arg DEFAULT is what you will have with `next-history-element', arg INPUT is what you will have by default at prompt on startup." (require 'vc) - (let* ((helm-grep-default-command helm-grep-git-grep-command) - helm-grep-default-recurse-command + (let* (helm-grep-default-recurse-command ;; Expand filename of each candidate with the git root dir. ;; The filename will be in the help-echo prop. (helm-grep-default-directory-fn (lambda () @@ -1387,7 +1415,7 @@ arg INPUT is what you will have by default at prompt on startup." (helm-ff-default-directory (funcall helm-grep-default-directory-fn))) (cl-assert helm-ff-default-directory nil "Not inside a Git repository") (helm-do-grep-1 (if all '("") `(,(expand-file-name directory))) - nil nil nil default input))) + nil 'git nil default input))) ;;;###autoload diff --git a/elpa/helm-20160425.958/helm-help.el b/elpa/helm-20160625.2316/helm-help.el similarity index 95% rename from elpa/helm-20160425.958/helm-help.el rename to elpa/helm-20160625.2316/helm-help.el index fb3d345..8f97c30 100644 --- a/elpa/helm-20160425.958/helm-help.el +++ b/elpa/helm-20160625.2316/helm-help.el @@ -185,6 +185,7 @@ Italic => A non--file buffer. \\[helm-buffers-run-multi-occur]\t\tMulti Occur buffer or marked buffers. (C-u toggle force searching current-buffer). \\[helm-buffer-switch-other-window]\t\tSwitch other window. \\[helm-buffer-switch-other-frame]\t\tSwitch other frame. +\\[helm-buffers-run-browse-project]\t\tBrowse Project from buffer. \\[helm-buffer-run-query-replace-regexp]\t\tQuery replace regexp in marked buffers. \\[helm-buffer-run-query-replace]\t\tQuery replace in marked buffers. \\[helm-buffer-run-ediff]\t\tEdiff current buffer with candidate. If two marked buffers ediff those buffers. @@ -266,6 +267,9 @@ If you are already in `default-directory' this will move cursor on top. NOTE: This is different from using `C-l' in that `C-l' doesn't move cursor on top but stays on previous subdir name. +**** Enter `..name/' at end of pattern start a recursive search of directories matching name under +your current directory, see below the \"Recursive completion on subdirectories\" section for more infos. + **** Enter any environment var (e.g. `$HOME') at end of pattern, it will be expanded **** You can yank any valid filename after pattern, it will be expanded @@ -325,12 +329,32 @@ e.g. You can create \"~/new/newnew/newnewnew/my_newfile.txt\". - With two prefix args same but the cache will be refreshed. -**** You can start a recursive search with Locate of Find (See commands below) +**** You can start a recursive search with Locate or Find (See commands below) With Locate you can use a local db with a prefix arg. If the localdb doesn't already exists, you will be prompted for its creation, if it exists and you want to refresh it, give two prefix args. +Note that when using locate the helm-buffer is empty until you type something, +but helm use by default the basename of pattern entered in your helm-find-files session, +hitting M-n should just kick in the locate search with this pattern. +If you want to automatically do this add the `helm-source-locate' +to `helm-sources-using-default-as-input'. + +**** Recursive completion on subdirectories + +Starting from the current directory you are browsing, it is possible +to have completion of all directories under here. +So if you are at \"/home/you/foo/\" and you want to go to \"/home/you/foo/bar/baz/somewhere/else\" +just type \"/home/you/foo/..else\" and hit `C-j' or enter the final \"/\", helm will show you all +possibles directories under \"foo\" matching \"else\". +\(Note that entering two spaces before \"else\" instead of two dots works also). + +NOTE: Completion on subdirectories use locate as backend, you can configure +the command with `helm-locate-recursive-dirs-command'. +Because this completion use an index, you may not have all the recent additions +of directories until you update your index (with `updatedb' for locate). + *** Insert filename at point or complete filename at point On insertion (no completion, i.e nothing at point): @@ -356,8 +380,13 @@ You can do the same but with \"**.el\" (note the two stars), this will select recursively all \".el\" files under current directory. Note that when copying recursively files, you may have files with same name -dispatched in the different directories, so when copying them in the same directory -they would be overwrited. +dispatched in the different subdirectories, so when copying them in the same directory +they would be overwrited. To avoid this helm have a special action called \"backup files\" +that have the same behavior as the command line \"cp --backup=numbered\", it allows you +copying for example many *.jpg files with the same name from different +subdirectories in one directory. +Files with same name are renamed like this: \"foo.txt.~1~\". +NOTE: This command is available only when `dired-async-mode' is used. NOTE: When using an action that involve an external backend (e.g. grep), using \"**\" is not advised (even if it works fine) because it will be slower to select all your files, @@ -366,7 +395,10 @@ However, if you know you have not many files it is reasonable to use this, also using not recursive wilcard (e.g. \"*.el\") is perfectly fine for this. This feature (\"**\") is activated by default with the option `helm-file-globstar'. -The directory selection with \"**foo/\" like bash shopt globstar option is not supported yet. +It is different than the bash shopt globstar feature in that to list files with a named extension +recursively you just have to specify e.g \"**.el\" whereas in bash you have to specify \"**/*.el\" +which is not convenient as \"**.el\". +The directory selection with \"**/\" like bash shopt globstar option is not supported yet. *** Query replace regexp on filenames @@ -977,11 +1009,12 @@ This feature is only available with emacs-25. *** Prefix Args -All the prefix args passed BEFORE running `helm-M-x' are ignored, -you should get an error message if you do so. -When you want to pass prefix args, pass them AFTER starting `helm-M-x', +When you want pass prefix args, you should pass prefix args AFTER starting `helm-M-x', you will see a prefix arg counter appearing in mode-line notifying you -the number of prefix args entered.") +the number of prefix args entered. + +If you pass prefix args before running `helm-M-x', it will be displayed in prompt, +then the first C-u after `helm-M-x' will be used to clear that prefix args.") ;;; helm-imenu ;; diff --git a/elpa/helm-20160425.958/helm-id-utils.el b/elpa/helm-20160625.2316/helm-id-utils.el similarity index 100% rename from elpa/helm-20160425.958/helm-id-utils.el rename to elpa/helm-20160625.2316/helm-id-utils.el diff --git a/elpa/helm-20160425.958/helm-imenu.el b/elpa/helm-20160625.2316/helm-imenu.el similarity index 91% rename from elpa/helm-20160425.958/helm-imenu.el rename to elpa/helm-20160625.2316/helm-imenu.el index 3aaaa4a..8cb8b8f 100644 --- a/elpa/helm-20160425.958/helm-imenu.el +++ b/elpa/helm-20160625.2316/helm-imenu.el @@ -19,6 +19,7 @@ (require 'cl-lib) (require 'helm) +(require 'helm-lib) (require 'imenu) (require 'helm-utils) (require 'helm-help) @@ -44,6 +45,14 @@ :group 'helm-imenu :type 'boolean) +(defcustom helm-imenu-all-buffer-assoc nil + "Major mode association alist for `helm-imenu-in-all-buffers'. +Allow `helm-imenu-in-all-buffers' searching in these associated buffers +even if they are not derived from each other. +The alist is bidirectional, i.e no need to add '((foo . bar) (bar . foo)) +only '((foo . bar)) is needed." + :type '(alist :key-type symbol :value-type symbol) + :group 'helm-imenu) ;;; keymap (defvar helm-imenu-map @@ -168,12 +177,12 @@ (prog1 (cl-loop for b in lst for count from 1 - for mm = (with-current-buffer b major-mode) - for cmm = (with-helm-current-buffer major-mode) - when (or (with-helm-current-buffer - (derived-mode-p mm)) - (with-current-buffer b - (derived-mode-p cmm))) + when + (and (with-current-buffer b + (derived-mode-p 'prog-mode)) + (with-current-buffer b + (helm-same-major-mode-p helm-current-buffer + helm-imenu-all-buffer-assoc))) do (progress-reporter-update progress-reporter count) and append (with-current-buffer b @@ -247,7 +256,9 @@ ;;;###autoload (defun helm-imenu-in-all-buffers () - "Preconfigured helm for fetching imenu entries of all buffers." + "Preconfigured helm for fetching imenu entries in all buffers with similar mode as current. +A mode is similar as current if it is the same, it is derived i.e `derived-mode-p' +or it have an association in `helm-imenu-all-buffer-assoc'." (interactive) (unless helm-source-imenu-all (setq helm-source-imenu-all diff --git a/elpa/helm-20160425.958/helm-info.el b/elpa/helm-20160625.2316/helm-info.el similarity index 91% rename from elpa/helm-20160425.958/helm-info.el rename to elpa/helm-20160625.2316/helm-info.el index 43c02c8..ecc8b3c 100644 --- a/elpa/helm-20160425.958/helm-info.el +++ b/elpa/helm-20160625.2316/helm-info.el @@ -56,18 +56,28 @@ files with `helm-info-at-point'." (save-window-excursion (info file) (let ((tobuf (helm-candidate-buffer 'global)) - (infobuf (current-buffer)) Info-history - start end) + start end line) (cl-dolist (node (Info-index-nodes)) (Info-goto-node node) (goto-char (point-min)) (while (search-forward "\n* " nil t) (unless (search-forward "Menu:\n" (1+ (point-at-eol)) t) (setq start (point-at-bol) - end (point-at-eol)) + ;; Fix issue #1503 by getting the invisible + ;; info displayed on next line in long strings. + ;; e.g "* Foo.\n (line 12)" instead of + ;; "* Foo.(line 12)" + end (or (save-excursion + (goto-char (point-at-bol)) + (re-search-forward "(line +[0-9]+)" nil t)) + (point-at-eol)) + ;; Long string have a new line inserted before the + ;; invisible spec, remove it. + line (replace-regexp-in-string + "\n" "" (buffer-substring start end))) (with-current-buffer tobuf - (insert-buffer-substring infobuf start end) + (insert line) (insert "\n"))))))))) (defun helm-info-goto (node-line) diff --git a/elpa/helm-20160425.958/helm-locate.el b/elpa/helm-20160625.2316/helm-locate.el similarity index 94% rename from elpa/helm-20160425.958/helm-locate.el rename to elpa/helm-20160625.2316/helm-locate.el index 03289d6..1298202 100644 --- a/elpa/helm-20160425.958/helm-locate.el +++ b/elpa/helm-20160625.2316/helm-locate.el @@ -97,6 +97,12 @@ directories of this list with `helm-projects-find-files'." :group 'helm-locate :type '(repeat string)) +(defcustom helm-locate-recursive-dirs-command "locate -i -e -A --regex ^%s %s.*$" + "Command used in recursive directories completion in `helm-find-files'. +For Windows and `es' use something like \"es -r ^%s.*%s.*$\"." + :type 'string + :group 'helm-files) + (defvar helm-generic-files-map (let ((map (make-sparse-keymap))) @@ -348,6 +354,30 @@ See also `helm-locate'." else do (funcall pfn db p) and collect db))) +;;; Directory completion for hff. +;; +(defclass helm-locate-subdirs-source (helm-source-in-buffer) + ((basedir :initarg :basedir + :initform nil + :custom string) + (subdir :initarg :subdir + :initform nil + :custom 'string) + (data :initform #'helm-locate-init-subdirs))) + +(defun helm-locate-init-subdirs () + (with-temp-buffer + (call-process-shell-command + (format helm-locate-recursive-dirs-command + (if (string-match-p "\\`es" helm-locate-recursive-dirs-command) + ;; Fix W32 paths. + (replace-regexp-in-string + "/" "\\\\\\\\" (helm-attr 'basedir)) + (helm-attr 'basedir)) + (helm-attr 'subdir)) + nil t nil) + (buffer-string))) + ;;;###autoload (defun helm-projects-find-files (update) "Find files with locate in `helm-locate-project-list'. diff --git a/elpa/helm-20160425.958/helm-man.el b/elpa/helm-20160625.2316/helm-man.el similarity index 98% rename from elpa/helm-20160425.958/helm-man.el rename to elpa/helm-20160625.2316/helm-man.el index 9989ea9..987624f 100644 --- a/elpa/helm-20160425.958/helm-man.el +++ b/elpa/helm-20160625.2316/helm-man.el @@ -88,7 +88,7 @@ source.") (defvar helm-source-man-pages (helm-build-in-buffer-source "Manual Pages" - :init #'helm-man--init + :init #'helm-man--init :persistent-action #'ignore :filtered-candidate-transformer (lambda (candidates _source) @@ -102,7 +102,7 @@ With a prefix arg reinitialize the cache." (interactive "P") (when arg (setq helm-man--pages nil)) (helm :sources 'helm-source-man-pages - :buffer "*Helm man woman*")) + :buffer "*helm man woman*")) (provide 'helm-man) diff --git a/elpa/helm-20160425.958/helm-misc.el b/elpa/helm-20160625.2316/helm-misc.el similarity index 100% rename from elpa/helm-20160425.958/helm-misc.el rename to elpa/helm-20160625.2316/helm-misc.el diff --git a/elpa/helm-20160425.958/helm-mode.el b/elpa/helm-20160625.2316/helm-mode.el similarity index 92% rename from elpa/helm-20160425.958/helm-mode.el rename to elpa/helm-20160625.2316/helm-mode.el index 47af057..837d506 100644 --- a/elpa/helm-20160425.958/helm-mode.el +++ b/elpa/helm-20160625.2316/helm-mode.el @@ -242,9 +242,9 @@ If COLLECTION is an `obarray', a TEST should be needed. See `obarray'." (helm-basedir helm-pattern)) f))) ((functionp collection) (funcall collection input test t)) - ((and alistp test) - (cl-loop for i in collection when (funcall test i) collect i)) - (alistp collection) + ((and alistp (null test)) collection) + ;; Next test ensure circular objects are removed + ;; with `all-completions' (Issue #1530). (t (all-completions input collection test))))) (if sort-fn (sort cands sort-fn) cands)))) @@ -273,6 +273,13 @@ If COLLECTION is an `obarray', a TEST should be needed. See `obarray'." (when (string= (get-text-property 0 'display it) "[?]") (helm-next-line)))) +(defun helm-cr-default (default cands) + (cond ((and (stringp default) (not (string= default ""))) + (delq nil (cons default (delete default cands)))) + ((consp default) + (append default cands)) + (t cands))) + ;;;###autoload (cl-defun helm-comp-read (prompt collection &key @@ -419,43 +426,33 @@ that use `helm-comp-read' See `helm-M-x' for example." (replace-regexp-in-string "helm-maybe-exit-minibuffer" "helm-confirm-and-exit-minibuffer" helm-read-file-name-mode-line-string)) - (get-candidates (lambda () - (let ((cands (helm-comp-read-get-candidates - collection test sort alistp))) - (setq helm-cr-unknown-pattern-flag nil) - (unless (or (eq must-match t) - (string= helm-pattern "") - (assoc helm-pattern cands) - (assoc (intern helm-pattern) cands) - (member helm-pattern cands) - (member (downcase helm-pattern) cands) - (member (upcase helm-pattern) cands)) - (setq cands (append (list - ;; Unquote helm-pattern - ;; when it is added - ;; as candidate. - (replace-regexp-in-string - "\\s\\" "" helm-pattern)) - cands)) - (setq helm-cr-unknown-pattern-flag t)) - ;; When DEFAULT is initially a list, candidates - ;; come already computed with DEFAULT list appended, - ;; and DEFAULT is set to the car of this list. - (if (and default (not (string= default ""))) - (delq nil (cons default (delete default cands))) - cands)))) - (history-get-candidates (lambda () - (let ((all (helm-comp-read-get-candidates - history test nil alistp))) - (when all - (delete - "" - (helm-fast-remove-dups - (if (and default (not (string= default ""))) - (delq nil (cons default - (delete default all))) - all) - :test 'equal)))))) + (get-candidates + (lambda () + (let ((cands (helm-comp-read-get-candidates + collection test sort alistp))) + (setq helm-cr-unknown-pattern-flag nil) + (unless (or (eq must-match t) + (string= helm-pattern "") + (assoc helm-pattern cands) + (assoc (intern helm-pattern) cands) + (member helm-pattern cands) + (member (downcase helm-pattern) cands) + (member (upcase helm-pattern) cands)) + (setq cands (append (list + ;; Unquote helm-pattern + ;; when it is added + ;; as candidate. + (replace-regexp-in-string + "\\s\\" "" helm-pattern)) + cands)) + (setq helm-cr-unknown-pattern-flag t)) + (helm-cr-default default cands)))) + (history-get-candidates + (lambda () + (let ((cands (helm-comp-read-get-candidates + history test nil alistp))) + (when cands + (delete "" (helm-cr-default default cands)))))) (src-hist (helm-build-sync-source (format "%s History" name) :candidates history-get-candidates :fuzzy-match fuzzy @@ -528,19 +525,7 @@ that use `helm-comp-read' See `helm-M-x' for example." (setcar history result)) (t ; Possibly a symbol with a nil value. (set history (list result))))) - (or - result - (when (and (eq helm-exit-status 0) - (eq must-match 'confirm)) - ;; Return empty string only if it is the DEFAULT - ;; value and helm-pattern is empty. - ;; otherwise return helm-pattern - (if (and (string= helm-pattern "") default) - default (identity helm-pattern))) - (unless (or (eq helm-exit-status 1) - must-match) ; FIXME this should not be needed now. - default) - (helm-mode--keyboard-quit))))) + (or result (helm-mode--keyboard-quit))))) ;; Generic completing-read ;; @@ -613,18 +598,6 @@ It should be used when candidate list don't need to rebuild dynamically." (`(,l . ,_ll) l)) (if minibuffer-completing-file-name it (regexp-quote it))))) - (when (and default (listp default)) - ;; When DEFAULT is a list move the list on head of COLLECTION - ;; and set it to its car. #bugfix `grep-read-files'. - (setq collection - ;; COLLECTION is maybe a function or a table. - (append default - (helm-comp-read-get-candidates - collection test nil (listp collection)))) - ;; Ensure `all-completions' will not be used - ;; a second time to recompute COLLECTION [1]. - (setq alistp t) - (setq default (car default))) (helm-comp-read prompt collection :test test @@ -632,9 +605,10 @@ It should be used when candidate list don't need to rebuild dynamically." :reverse-history helm-mode-reverse-history :input-history history :must-match require-match - :alistp alistp ; Ensure `all-completions' is used when non-nil [1]. + :alistp alistp :name name - :requires-pattern (if (and (string= default "") + :requires-pattern (if (and (stringp default) + (string= default "") (or (eq require-match 'confirm) (eq require-match 'confirm-after-completion))) @@ -923,10 +897,6 @@ Keys description: ((and result (listp result)) (mapcar #'expand-file-name result)) (t result)) - (when (and (not (string= helm-pattern "")) - (eq helm-exit-status 0) - (eq must-match 'confirm)) - (identity helm-pattern)) (helm-mode--keyboard-quit)))) (defun helm-mode--default-filename (fname dir initial) @@ -1076,7 +1046,8 @@ Can be used as value for `completion-in-region-function'." (setcdr last-data nil)) 0)) (init-space-suffix (unless (or helm-completion-in-region-fuzzy-match - (string-suffix-p " " input)) + (string-suffix-p " " input) + (string= input "")) " ")) (file-comp-p (or (eq (completion-metadata-get metadata 'category) 'file) (helm-mode--in-file-completion-p) @@ -1115,8 +1086,7 @@ Can be used as value for `completion-in-region-function'." (cond ((and file-comp-p (not (string-match "/\\'" input))) (concat (helm-basename input) - (unless (string= input "") - init-space-suffix))) + init-space-suffix)) ((string-match "/\\'" input) nil) ((or (null require-match) (stringp require-match)) diff --git a/elpa/helm-20160425.958/helm-multi-match.el b/elpa/helm-20160625.2316/helm-multi-match.el similarity index 100% rename from elpa/helm-20160425.958/helm-multi-match.el rename to elpa/helm-20160625.2316/helm-multi-match.el diff --git a/elpa/helm-20160425.958/helm-net.el b/elpa/helm-20160625.2316/helm-net.el similarity index 100% rename from elpa/helm-20160425.958/helm-net.el rename to elpa/helm-20160625.2316/helm-net.el diff --git a/elpa/helm-20160425.958/helm-org.el b/elpa/helm-20160625.2316/helm-org.el similarity index 100% rename from elpa/helm-20160425.958/helm-org.el rename to elpa/helm-20160625.2316/helm-org.el diff --git a/elpa/helm-20160625.2316/helm-pkg.el b/elpa/helm-20160625.2316/helm-pkg.el new file mode 100644 index 0000000..af734d7 --- /dev/null +++ b/elpa/helm-20160625.2316/helm-pkg.el @@ -0,0 +1,9 @@ +(define-package "helm" "20160625.2316" "Helm is an Emacs incremental and narrowing framework" + '((emacs "24.3") + (async "1.9") + (popup "0.5.3") + (helm-core "1.9.8")) + :url "https://emacs-helm.github.io/helm/") +;; Local Variables: +;; no-byte-compile: t +;; End: diff --git a/elpa/helm-20160425.958/helm-plugin.el b/elpa/helm-20160625.2316/helm-plugin.el similarity index 100% rename from elpa/helm-20160425.958/helm-plugin.el rename to elpa/helm-20160625.2316/helm-plugin.el diff --git a/elpa/helm-20160425.958/helm-regexp.el b/elpa/helm-20160625.2316/helm-regexp.el similarity index 100% rename from elpa/helm-20160425.958/helm-regexp.el rename to elpa/helm-20160625.2316/helm-regexp.el diff --git a/elpa/helm-20160425.958/helm-ring.el b/elpa/helm-20160625.2316/helm-ring.el similarity index 98% rename from elpa/helm-20160425.958/helm-ring.el rename to elpa/helm-20160625.2316/helm-ring.el index 18e327d..3221af6 100644 --- a/elpa/helm-20160425.958/helm-ring.el +++ b/elpa/helm-20160625.2316/helm-ring.el @@ -115,6 +115,12 @@ If this action is executed just after `yank', replace with STR as yanked string." (with-helm-current-buffer (setq kill-ring (delete str kill-ring)) + ;; Adding a `delete-selection' property + ;; to `helm-kill-ring-action' is not working + ;; because `this-command' will be `helm-maybe-exit-minibuffer', + ;; so use this workaround (Issue #1520). + (when (and (region-active-p) delete-selection-mode) + (delete-region (region-beginning) (region-end))) (if (not (eq (helm-attr 'last-command helm-source-kill-ring) 'yank)) (insert-for-yank str) ;; from `yank-pop' diff --git a/elpa/helm-20160425.958/helm-semantic.el b/elpa/helm-20160625.2316/helm-semantic.el similarity index 98% rename from elpa/helm-20160425.958/helm-semantic.el rename to elpa/helm-20160625.2316/helm-semantic.el index 3de1c39..5baa00a 100644 --- a/elpa/helm-20160425.958/helm-semantic.el +++ b/elpa/helm-20160625.2316/helm-semantic.el @@ -198,6 +198,7 @@ Fill in the symbol at point by default." 'helm-source-imenu)) (imenu-p (eq source 'helm-source-imenu)) (imenu-auto-rescan imenu-p) + (str (thing-at-point 'symbol)) (helm-execute-action-at-once-if-one (and imenu-p helm-imenu-execute-action-at-once-if-one)) @@ -207,9 +208,8 @@ Fill in the symbol at point by default." (format "\\_<%s\\_>" (car (semantic-current-tag)))))) (helm :sources source :candidate-number-limit 9999 - :preselect (if (or arg imenu-p) - (thing-at-point 'symbol) - tag) + :default (and imenu-p (list (concat "\\_<" str "\\_>") str)) + :preselect (if (or arg imenu-p) str tag) :buffer "*helm semantic/imenu*"))) (provide 'helm-semantic) diff --git a/elpa/helm-20160425.958/helm-sys.el b/elpa/helm-20160625.2316/helm-sys.el similarity index 68% rename from elpa/helm-20160425.958/helm-sys.el rename to elpa/helm-20160625.2316/helm-sys.el index d06225c..79a6800 100644 --- a/elpa/helm-20160425.958/helm-sys.el +++ b/elpa/helm-20160625.2316/helm-sys.el @@ -33,13 +33,10 @@ :group 'helm-sys) -(defun helm-top-command-set-fn (var _value) - (set var - (cl-case system-type - (darwin "env COLUMNS=%s ps -axo pid,user,pri,nice,ucomm,tty,start,vsz,%%cpu,%%mem,etime,command") - (t "env COLUMNS=%s top -b -n 1")))) - -(defcustom helm-top-command "env COLUMNS=%s top -b -n 1" +(defcustom helm-top-command + (cl-case system-type + (darwin "env COLUMNS=%s ps -axo pid,user,pri,nice,ucomm,tty,start,vsz,%%cpu,%%mem,etime,command") + (t "env COLUMNS=%s top -b -n 1")) "Top command used to display output of top. To use top command, a version supporting batch mode (-b option) is needed. On Mac OSX top command doesn't support this, so ps command @@ -50,9 +47,28 @@ working properly, that is 12 elements with the 2 first being PID and USER and the last 4 being %CPU, %MEM, TIME and COMMAND. A format string where %s will be replaced with `frame-width'." :group 'helm-sys - :type 'string - :set 'helm-top-command-set-fn) + :type 'string) +(defcustom helm-top-poll-delay 1.5 + "Helm top poll after this dealy when `helm-top-poll-mode' is enabled. +The minimal delay allowed is 1.5, if less than this helm-top will use 1.5." + :group 'helm-sys + :type 'float) + +(defcustom helm-top-poll-delay-post-command 1.0 + "Helm top stop polling during this delay. +This delay is additioned to `helm-top-poll-delay' after emacs stop +being idle." + :group 'helm-sys + :type 'float) + +(defcustom helm-top-poll-preselection 'linum + "Stay on same line or follow candidate when `helm-top-poll' update display. +Possible values are 'candidate or 'linum." + :group'helm-sys + :type '(radio :tag "Preferred preselection action for helm-top" + (const :tag "Follow candidate" candidate) + (const :tag "Stay on same line" linum))) ;;; Top (process) ;; @@ -67,10 +83,82 @@ A format string where %s will be replaced with `frame-width'." (define-key map (kbd "M-U") 'helm-top-run-sort-by-user) map)) +(defvar helm-top-after-init-hook nil + "Local hook for helm-top.") + +(defvar helm-top--poll-timer nil) + +(defun helm-top-poll (&optional no-update delay) + (when helm-top--poll-timer + (cancel-timer helm-top--poll-timer)) + (condition-case nil + (progn + (when (and (helm-alive-p) (null no-update)) + ;; Fix quitting while process is running + ;; by binding `with-local-quit' in init function + ;; Issue #1521. + (helm-force-update + (cl-ecase helm-top-poll-preselection + (candidate (replace-regexp-in-string + "[0-9]+" "[0-9]+" + (regexp-quote (helm-get-selection nil t)))) + (linum `(lambda () + (goto-char (point-min)) + (forward-line ,(helm-candidate-number-at-point))))))) + (setq helm-top--poll-timer + (run-with-idle-timer + (helm-aif (current-idle-time) + (time-add it (seconds-to-time + (or delay (helm-top--poll-delay)))) + (or delay (helm-top--poll-delay))) + nil + 'helm-top-poll))) + (quit (cancel-timer helm-top--poll-timer)))) + +(defun helm-top--poll-delay () + (max 1.5 helm-top-poll-delay)) + +(defun helm-top-poll-no-update () + (helm-top-poll t (+ (helm-top--poll-delay) + helm-top-poll-delay-post-command))) + +(defun helm-top-initialize-poll-hooks () + ;; When emacs is idle during say 20s + ;; the idle timer will run in 20+1.5 s. + ;; This is fine when emacs stays idle, because the next timer + ;; will run at 21.5+1.5 etc... so the display will be updated + ;; at every 1.5 seconds. + ;; But as soon as emacs looses its idleness, the next update + ;; will occur at say 21+1.5 s, so we have to reinitialize + ;; the timer at 0+1.5. + (add-hook 'post-command-hook 'helm-top-poll-no-update) + (add-hook 'focus-in-hook 'helm-top-poll-no-update)) + +;;;###autoload +(define-minor-mode helm-top-poll-mode + "Refresh automatically helm top buffer once enabled." + :group 'helm-top + :global t + (if helm-top-poll-mode + (progn + (add-hook 'helm-top-after-init-hook 'helm-top-poll-no-update) + (add-hook 'helm-top-after-init-hook 'helm-top-initialize-poll-hooks)) + (remove-hook 'helm-top-after-init-hook 'helm-top-poll-no-update) + (remove-hook 'helm-top-after-init-hook 'helm-top-initialize-poll-hooks))) + (defvar helm-source-top (helm-build-in-buffer-source "Top" - :header-name (lambda (name) (concat name " (Press C-c C-u to refresh)")) + :header-name (lambda (name) + (concat name (if helm-top-poll-mode + " (auto updating)" + " (Press C-c C-u to refresh)"))) :init #'helm-top-init + :after-init-hook 'helm-top-after-init-hook + :cleanup (lambda () + (when helm-top--poll-timer + (cancel-timer helm-top--poll-timer)) + (remove-hook 'post-command-hook 'helm-top-poll-no-update) + (remove-hook 'focus-in-hook 'helm-top-poll-no-update)) :nomark t :display-to-real #'helm-top-display-to-real :persistent-action #'helm-top-sh-persistent-action @@ -136,11 +224,12 @@ Show actions only on line starting by a PID." (defun helm-top-init () "Insert output of top command in candidate buffer." - (unless helm-top-sort-fn (helm-top-set-mode-line "CPU")) - (with-current-buffer (helm-candidate-buffer 'global) - (call-process-shell-command - (format helm-top-command (frame-width)) - nil (current-buffer)))) + (with-local-quit + (unless helm-top-sort-fn (helm-top-set-mode-line "CPU")) + (with-current-buffer (helm-candidate-buffer 'global) + (call-process-shell-command + (format helm-top-command (frame-width)) + nil (current-buffer))))) (defun helm-top-display-to-real (line) "Return pid only from LINE." @@ -191,25 +280,33 @@ Show actions only on line starting by a PID." (interactive) (helm-top-set-mode-line "COM") (setq helm-top-sort-fn 'helm-top-sort-by-com) - (helm-force-update)) + (helm-update (replace-regexp-in-string + "[0-9]+" "[0-9]+" + (regexp-quote (helm-get-selection nil t))))) (defun helm-top-run-sort-by-cpu () (interactive) (helm-top-set-mode-line "CPU") (setq helm-top-sort-fn nil) - (helm-force-update)) + (helm-update (replace-regexp-in-string + "[0-9]+" "[0-9]+" + (regexp-quote (helm-get-selection nil t))))) (defun helm-top-run-sort-by-mem () (interactive) (helm-top-set-mode-line "MEM") (setq helm-top-sort-fn 'helm-top-sort-by-mem) - (helm-force-update)) + (helm-update (replace-regexp-in-string + "[0-9]+" "[0-9]+" + (regexp-quote (helm-get-selection nil t))))) (defun helm-top-run-sort-by-user () (interactive) (helm-top-set-mode-line "USER") (setq helm-top-sort-fn 'helm-top-sort-by-user) - (helm-force-update)) + (helm-update (replace-regexp-in-string + "[0-9]+" "[0-9]+" + (regexp-quote (helm-get-selection nil t))))) ;;; X RandR resolution change diff --git a/elpa/helm-20160425.958/helm-tags.el b/elpa/helm-20160625.2316/helm-tags.el similarity index 100% rename from elpa/helm-20160425.958/helm-tags.el rename to elpa/helm-20160625.2316/helm-tags.el diff --git a/elpa/helm-20160425.958/helm-types.el b/elpa/helm-20160625.2316/helm-types.el similarity index 99% rename from elpa/helm-20160425.958/helm-types.el rename to elpa/helm-20160625.2316/helm-types.el index 670ecf4..fcf8f48 100644 --- a/elpa/helm-20160425.958/helm-types.el +++ b/elpa/helm-20160625.2316/helm-types.el @@ -135,6 +135,8 @@ (lambda () (and (locate-library "elscreen") "Display buffer in Elscreen")) 'helm-find-buffer-on-elscreen + "Browse project from buffer" + 'helm-buffers-browse-project "Query replace regexp `C-M-%'" 'helm-buffer-query-replace-regexp "Query replace `M-%'" 'helm-buffer-query-replace diff --git a/elpa/helm-20160425.958/helm-utils.el b/elpa/helm-20160625.2316/helm-utils.el similarity index 96% rename from elpa/helm-20160425.958/helm-utils.el rename to elpa/helm-20160625.2316/helm-utils.el index e567f97..e9300c7 100644 --- a/elpa/helm-20160425.958/helm-utils.el +++ b/elpa/helm-20160625.2316/helm-utils.el @@ -515,34 +515,34 @@ you have in `file-attributes'." :inode inode :device-num device-num))) (modes (helm-split-mode-file-attributes (cl-getf all :mode)))) - (cond (type (cl-getf all :type)) - (links (cl-getf all :links)) - (uid (cl-getf all :uid)) - (gid (cl-getf all :gid)) + (cond (type (cl-getf all :type)) + (links (cl-getf all :links)) + (uid (cl-getf all :uid)) + (gid (cl-getf all :gid)) (access-time (cl-getf all :access-time)) - (modif-time (cl-getf all :modif-time)) - (status (cl-getf all :status)) - (size (cl-getf all :size)) - (mode (cl-getf all :mode)) - (gid-change (cl-getf all :gid-change)) - (inode (cl-getf all :inode)) - (device-num (cl-getf all :device-num)) - (dired - (concat - (helm-split-mode-file-attributes (cl-getf all :mode) t) " " - (number-to-string (cl-getf all :links)) " " - (cl-getf all :uid) ":" - (cl-getf all :gid) " " - (if human-size - (helm-file-human-size (cl-getf all :size)) - (int-to-string (cl-getf all :size))) " " - (cl-getf all :modif-time))) + (modif-time (cl-getf all :modif-time)) + (status (cl-getf all :status)) + (size (cl-getf all :size)) + (mode (cl-getf all :mode)) + (gid-change (cl-getf all :gid-change)) + (inode (cl-getf all :inode)) + (device-num (cl-getf all :device-num)) + (dired (concat + (helm-split-mode-file-attributes + (cl-getf all :mode) t) " " + (number-to-string (cl-getf all :links)) " " + (cl-getf all :uid) ":" + (cl-getf all :gid) " " + (if human-size + (helm-file-human-size (cl-getf all :size)) + (int-to-string (cl-getf all :size))) " " + (cl-getf all :modif-time))) (human-size (helm-file-human-size (cl-getf all :size))) - (mode-type (cl-getf modes :mode-type)) + (mode-type (cl-getf modes :mode-type)) (mode-owner (cl-getf modes :user)) (mode-group (cl-getf modes :group)) (mode-other (cl-getf modes :other)) - (t (append all modes))))) + (t (append all modes))))) (defun helm-split-mode-file-attributes (str &optional string) "Split mode file attributes STR into a proplist. diff --git a/elpa/helm-ag-20160424.546/helm-ag-pkg.el b/elpa/helm-ag-20160424.546/helm-ag-pkg.el deleted file mode 100644 index e7f4a9d..0000000 --- a/elpa/helm-ag-20160424.546/helm-ag-pkg.el +++ /dev/null @@ -1 +0,0 @@ -(define-package "helm-ag" "20160424.546" "the silver searcher with helm interface" '((emacs "24.3") (helm "1.7.7")) :url "https://github.com/syohex/emacs-helm-ag") diff --git a/elpa/helm-ag-20160424.546/helm-ag-autoloads.el b/elpa/helm-ag-20160622.2235/helm-ag-autoloads.el similarity index 93% rename from elpa/helm-ag-20160424.546/helm-ag-autoloads.el rename to elpa/helm-ag-20160622.2235/helm-ag-autoloads.el index 6eb0caf..b9ddf27 100644 --- a/elpa/helm-ag-20160424.546/helm-ag-autoloads.el +++ b/elpa/helm-ag-20160622.2235/helm-ag-autoloads.el @@ -3,7 +3,8 @@ ;;; Code: (add-to-list 'load-path (or (file-name-directory #$) (car load-path))) -;;;### (autoloads nil "helm-ag" "helm-ag.el" (22303 19283 86176 785000)) +;;;### (autoloads nil "helm-ag" "helm-ag.el" (22387 29365 905711 +;;;;;; 0)) ;;; Generated autoloads from helm-ag.el (autoload 'helm-ag-pop-stack "helm-ag" "\ diff --git a/elpa/helm-ag-20160622.2235/helm-ag-pkg.el b/elpa/helm-ag-20160622.2235/helm-ag-pkg.el new file mode 100644 index 0000000..4d4fe68 --- /dev/null +++ b/elpa/helm-ag-20160622.2235/helm-ag-pkg.el @@ -0,0 +1 @@ +(define-package "helm-ag" "20160622.2235" "the silver searcher with helm interface" '((emacs "24.3") (helm "1.7.7")) :url "https://github.com/syohex/emacs-helm-ag") diff --git a/elpa/helm-ag-20160424.546/helm-ag.el b/elpa/helm-ag-20160622.2235/helm-ag.el similarity index 93% rename from elpa/helm-ag-20160424.546/helm-ag.el rename to elpa/helm-ag-20160622.2235/helm-ag.el index 9a9cb12..bcb8d56 100644 --- a/elpa/helm-ag-20160424.546/helm-ag.el +++ b/elpa/helm-ag-20160622.2235/helm-ag.el @@ -4,8 +4,8 @@ ;; Author: Syohei YOSHIDA ;; URL: https://github.com/syohex/emacs-helm-ag -;; Package-Version: 20160424.546 -;; Version: 0.53 +;; Package-Version: 20160622.2235 +;; Version: 0.56 ;; Package-Requires: ((emacs "24.3") (helm "1.7.7")) ;; This program is free software; you can redistribute it and/or modify @@ -404,7 +404,23 @@ Default behaviour shows finish and result in mode-line." (helm-make-actions "Open file" #'helm-ag--action-find-file "Open file other window" #'helm-ag--action-find-file-other-window - "Save results in buffer" #'helm-ag--action-save-buffer)) + "Save results in buffer" #'helm-ag--action-save-buffer + "Edit search results" #'helm-ag--edit)) + +(defvar helm-ag-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map helm-map) + (define-key map (kbd "C-c o") 'helm-ag--run-other-window-action) + (define-key map (kbd "C-l") 'helm-ag--up-one-level) + (define-key map (kbd "C-c C-e") 'helm-ag-edit) + (define-key map (kbd "C-x C-s") 'helm-ag--run-save-buffer) + (define-key map (kbd "C-c ?") 'helm-ag-help) + (define-key map (kbd "C-c >") 'helm-ag--next-file) + (define-key map (kbd "") 'helm-ag--next-file) + (define-key map (kbd "C-c <") 'helm-ag--previous-file) + (define-key map (kbd "") 'helm-ag--previous-file) + map) + "Keymap for `helm-ag'.") (defvar helm-ag-source (helm-build-in-buffer-source "The Silver Searcher" @@ -414,6 +430,7 @@ Default behaviour shows finish and result in mode-line." :fuzzy-match helm-ag-fuzzy-match :action helm-ag--actions :candidate-number-limit 9999 + :keymap helm-ag-map :follow (and helm-follow-mode-persistent 1))) ;;;###autoload @@ -437,7 +454,8 @@ Default behaviour shows finish and result in mode-line." (defsubst helm-ag--marked-input () (when (use-region-p) - (buffer-substring-no-properties (region-beginning) (region-end)))) + (prog1 (buffer-substring-no-properties (region-beginning) (region-end)) + (deactivate-mark)))) (defun helm-ag--query () (let* ((searched-word (helm-ag--searched-word)) @@ -497,13 +515,16 @@ Default behaviour shows finish and result in mode-line." (saved-buffers nil) (regexp (helm-ag--match-line-regexp)) (default-directory helm-ag--default-directory) - (line-deletes (make-hash-table :test #'equal))) + (line-deletes (make-hash-table :test #'equal)) + (kept-buffers (buffer-list)) + open-buffers) (while (re-search-forward regexp nil t) (let* ((file (or (match-string-no-properties 1) helm-ag--search-this-file-p)) (line (string-to-number (match-string-no-properties 2))) (body (match-string-no-properties 3)) (ovs (overlays-at (line-beginning-position)))) (with-current-buffer (find-file-noselect file) + (cl-pushnew (current-buffer) open-buffers) (if buffer-read-only (cl-incf read-only-files) (goto-char (point-min)) @@ -522,6 +543,9 @@ Default behaviour shows finish and result in mode-line." (dolist (buf saved-buffers) (with-current-buffer buf (save-buffer)))) + (dolist (buf open-buffers) + (unless (memq buf kept-buffers) + (kill-buffer buf))) (helm-ag--exit-from-edit-mode) (if (not (zerop read-only-files)) (message "%d files are read-only and not editable." read-only-files) @@ -556,10 +580,13 @@ Default behaviour shows finish and result in mode-line." map)) (defun helm-ag--edit (_candidate) - (let ((default-directory helm-ag--default-directory)) + (let* ((helm-buf-dir (or helm-ag--default-directory + helm-ag--last-default-directory + default-directory)) + (default-directory helm-buf-dir)) (with-current-buffer (get-buffer-create "*helm-ag-edit*") (erase-buffer) - (setq-local helm-ag--default-directory helm-ag--default-directory) + (setq-local helm-ag--default-directory helm-buf-dir) (unless (helm-ag--vimgrep-option) (setq-local helm-ag--search-this-file-p (assoc-default 'search-this-file (helm-get-current-source)))) @@ -725,21 +752,6 @@ Special commands: (helm-ag--move-file-common #'helm-end-of-source-p #'helm-next-line #'helm-beginning-of-buffer)) -(defvar helm-ag-map - (let ((map (make-sparse-keymap))) - (set-keymap-parent map helm-map) - (define-key map (kbd "C-c o") 'helm-ag--run-other-window-action) - (define-key map (kbd "C-l") 'helm-ag--up-one-level) - (define-key map (kbd "C-c C-e") 'helm-ag-edit) - (define-key map (kbd "C-x C-s") 'helm-ag--run-save-buffer) - (define-key map (kbd "C-c ?") 'helm-ag-help) - (define-key map (kbd "C-c >") 'helm-ag--next-file) - (define-key map (kbd "") 'helm-ag--next-file) - (define-key map (kbd "C-c <") 'helm-ag--previous-file) - (define-key map (kbd "") 'helm-ag--previous-file) - map) - "Keymap for `helm-ag'.") - (defsubst helm-ag--root-directory-p () (cl-loop for dir in '(".git/" ".hg/") thereis (file-directory-p dir))) @@ -756,7 +768,7 @@ Continue searching the parent directory? ")) (helm-ag--default-directory parent)) (setq helm-ag--last-default-directory default-directory) (helm-attrset 'name (helm-ag--helm-header default-directory) helm-ag-source) - (helm :sources '(helm-ag-source) :buffer "*helm-ag*" :keymap helm-ag-map))))) + (helm :sources '(helm-ag-source) :buffer "*helm-ag*"))))) (message nil))) ;;;###autoload @@ -770,7 +782,7 @@ Continue searching the parent directory? ")) (helm-attrset 'search-this-file (file-relative-name (buffer-file-name)) helm-ag-source) (helm-attrset 'name (format "Search at %s" filename) helm-ag-source) - (helm :sources '(helm-ag-source) :buffer "*helm-ag*" :keymap helm-ag-map))) + (helm :sources '(helm-ag-source) :buffer "*helm-ag*"))) ;;;###autoload (defun helm-ag (&optional basedir) @@ -786,7 +798,7 @@ Continue searching the parent directory? ")) (helm-ag--query) (helm-attrset 'search-this-file nil helm-ag-source) (helm-attrset 'name (helm-ag--helm-header helm-ag--default-directory) helm-ag-source) - (helm :sources '(helm-ag-source) :buffer "*helm-ag*" :keymap helm-ag-map)))) + (helm :sources '(helm-ag-source) :buffer "*helm-ag*")))) (defun helm-ag--split-string (str) (with-temp-buffer @@ -835,37 +847,38 @@ Continue searching the parent directory? ")) collect pattern))) (defun helm-ag--propertize-candidates (input) - (goto-char (point-min)) - (forward-line 1) - (let ((patterns (helm-ag--do-ag-highlight-patterns input))) - (cl-loop with one-file-p = (and (not (helm-ag--vimgrep-option)) - (helm-ag--search-only-one-file-p)) - while (not (eobp)) - for num = 1 then (1+ num) - do - (progn - (let ((start (point)) - (bound (line-end-position))) - (if (and one-file-p (search-forward ":" bound t)) - (set-text-properties (line-beginning-position) (1- (point)) - '(face helm-grep-lineno)) - (when (re-search-forward helm-grep-split-line-regexp bound t) - (set-text-properties (match-beginning 1) (match-end 1) '(face helm-moccur-buffer)) - (set-text-properties (match-beginning 2) (match-end 2) '(face helm-grep-lineno)) - (goto-char (match-beginning 3)))) - (let ((curpoint (point)) - (case-fold-search helm-ag--ignore-case)) - (dolist (pattern patterns) - (let ((last-point (point))) - (while (re-search-forward pattern bound t) - (set-text-properties (match-beginning 0) (match-end 0) - '(face helm-match)) - (when (= last-point (point)) - (forward-char 1)) - (setq last-point (point))) - (goto-char curpoint)))) - (put-text-property start bound 'helm-cand-num num)) - (forward-line 1))))) + (save-excursion + (goto-char (point-min)) + (forward-line 1) + (let ((patterns (helm-ag--do-ag-highlight-patterns input))) + (cl-loop with one-file-p = (and (not (helm-ag--vimgrep-option)) + (helm-ag--search-only-one-file-p)) + while (not (eobp)) + for num = 1 then (1+ num) + do + (progn + (let ((start (point)) + (bound (line-end-position))) + (if (and one-file-p (search-forward ":" bound t)) + (set-text-properties (line-beginning-position) (1- (point)) + '(face helm-grep-lineno)) + (when (re-search-forward helm-grep-split-line-regexp bound t) + (set-text-properties (match-beginning 1) (match-end 1) '(face helm-moccur-buffer)) + (set-text-properties (match-beginning 2) (match-end 2) '(face helm-grep-lineno)) + (goto-char (match-beginning 3)))) + (let ((curpoint (point)) + (case-fold-search helm-ag--ignore-case)) + (dolist (pattern patterns) + (let ((last-point (point))) + (while (re-search-forward pattern bound t) + (set-text-properties (match-beginning 0) (match-end 0) + '(face helm-match)) + (when (= last-point (point)) + (forward-char 1)) + (setq last-point (point))) + (goto-char curpoint)))) + (put-text-property start bound 'helm-cand-num num)) + (forward-line 1)))))) (defun helm-ag-show-status-default-mode-line () (setq mode-line-format @@ -880,7 +893,6 @@ Continue searching the parent directory? ")) (with-helm-window (helm-ag--remove-carrige-returns) (helm-ag--propertize-candidates input) - (goto-char (point-min)) (when helm-ag-show-status-function (funcall helm-ag-show-status-function) (force-mode-line-update)))) @@ -985,7 +997,8 @@ Continue searching the parent directory? ")) :nohighlight t :requires-pattern 3 :candidate-number-limit 9999 - :follow (and helm-follow-mode-persistent 1))) + :follow (and helm-follow-mode-persistent 1) + :keymap helm-do-ag-map)) (defun helm-ag--do-ag-up-one-level () (interactive) @@ -1002,7 +1015,7 @@ Continue searching the parent directory? ")) (helm-attrset 'name (helm-ag--helm-header parent) helm-source-do-ag) (helm :sources '(helm-source-do-ag) :buffer "*helm-ag*" - :input initial-input :keymap helm-do-ag-map))))) + :input initial-input))))) (message nil))) (defun helm-ag--set-do-ag-option () @@ -1035,8 +1048,8 @@ Continue searching the parent directory? ")) (helm-attrset 'name (helm-ag--helm-header search-dir) helm-source-do-ag) (helm :sources '(helm-source-do-ag) :buffer "*helm-ag*" - :input (helm-ag--insert-thing-at-point helm-ag-insert-at-point) - :keymap helm-do-ag-map))) + :input (or (helm-ag--marked-input) + (helm-ag--insert-thing-at-point helm-ag-insert-at-point))))) ;;;###autoload (defun helm-do-ag-this-file () diff --git a/elpa/helm-core-20160419.2355/helm-core-autoloads.el b/elpa/helm-core-20160627.324/helm-core-autoloads.el similarity index 94% rename from elpa/helm-core-20160419.2355/helm-core-autoloads.el rename to elpa/helm-core-20160627.324/helm-core-autoloads.el index ecf9987..d8541e8 100644 --- a/elpa/helm-core-20160419.2355/helm-core-autoloads.el +++ b/elpa/helm-core-20160627.324/helm-core-autoloads.el @@ -3,7 +3,7 @@ ;;; Code: (add-to-list 'load-path (or (file-name-directory #$) (car load-path))) -;;;### (autoloads nil "helm" "helm.el" (22297 20819 137133 668000)) +;;;### (autoloads nil "helm" "helm.el" (22387 29365 581960 874000)) ;;; Generated autoloads from helm.el (autoload 'helm-define-multi-key "helm" "\ @@ -47,11 +47,10 @@ Arg MAP is the keymap to use, SUBKEY is the initial short key-binding to call COMMAND. Arg OTHER-SUBKEYS is an alist specifying other short key-bindings -to use once started. -e.g: +to use once started e.g: -\(helm-define-key-with-subkeys global-map - (kbd \"C-x v n\") ?n 'git-gutter:next-hunk '((?p . git-gutter:previous-hunk))) + (helm-define-key-with-subkeys global-map + (kbd \"C-x v n\") ?n 'git-gutter:next-hunk '((?p . git-gutter:previous-hunk))) In this example, `C-x v n' will run `git-gutter:next-hunk' @@ -73,8 +72,7 @@ NOTE: SUBKEY and OTHER-SUBKEYS bindings support char syntax only (put 'helm-define-key-with-subkeys 'lisp-indent-function '1) (autoload 'helm-debug-open-last-log "helm" "\ -Open helm log file of last helm session. -If `helm-last-log-file' is nil, switch to `helm-debug-buffer' . +Open helm log file or buffer of last helm session. \(fn)" t nil) @@ -190,7 +188,7 @@ Enable/disable helm debugging from outside of helm session. ;;;*** ;;;### (autoloads nil nil ("helm-core-pkg.el" "helm-lib.el" "helm-multi-match.el" -;;;;;; "helm-source.el") (22297 20819 302900 527000)) +;;;;;; "helm-source.el") (22387 29365 611862 481000)) ;;;*** diff --git a/elpa/helm-core-20160419.2355/helm-core-pkg.el b/elpa/helm-core-20160627.324/helm-core-pkg.el similarity index 55% rename from elpa/helm-core-20160419.2355/helm-core-pkg.el rename to elpa/helm-core-20160627.324/helm-core-pkg.el index e9f381e..35981f4 100644 --- a/elpa/helm-core-20160419.2355/helm-core-pkg.el +++ b/elpa/helm-core-20160627.324/helm-core-pkg.el @@ -1,6 +1,6 @@ -(define-package "helm-core" "20160419.2355" "Development files for Helm" +(define-package "helm-core" "20160627.324" "Development files for Helm" '((emacs "24.3") - (async "1.7")) + (async "1.9")) :url "https://emacs-helm.github.io/helm/") ;; Local Variables: ;; no-byte-compile: t diff --git a/elpa/helm-core-20160419.2355/helm-lib.el b/elpa/helm-core-20160627.324/helm-lib.el similarity index 76% rename from elpa/helm-core-20160419.2355/helm-lib.el rename to elpa/helm-core-20160627.324/helm-lib.el index 5a7c7cd..5759efc 100644 --- a/elpa/helm-core-20160419.2355/helm-lib.el +++ b/elpa/helm-core-20160627.324/helm-lib.el @@ -54,6 +54,15 @@ If you prefer scrolling line by line, set this value to 1." :group 'helm :type 'integer) +(defcustom helm-help-full-frame t + "Display help window in full frame when non nil. + +Even when `nil' probably the same result (full frame) +can be reach by tweaking `display-buffer-alist' but it is +much more convenient to use a simple boolean value here." + :type 'boolean + :group 'helm-help) + ;;; Internal vars ;; @@ -67,6 +76,18 @@ If you prefer scrolling line by line, set this value to 1." (defvar helm-suspend-update-flag nil) (defvar helm-action-buffer "*helm action*" "Buffer showing actions.") + + +;;; Compatibility +;; +(defun helm-add-face-text-properties (beg end face &optional append object) + "Add the face property to the text from START to END. +It is a compatibility function which behave exactly like +`add-face-text-property' if available otherwise like `add-text-properties'. +When only `add-text-properties' is available APPEND is ignored." + (if (fboundp 'add-face-text-property) + (add-face-text-property beg end face append object) + (add-text-properties beg end `(face ,face) object))) ;;; Macros helper. ;; @@ -122,13 +143,19 @@ THEN-FORM and ELSE-FORMS are then excuted just like in `if'." (if it ,then-form ,@else-forms))) (defmacro helm-awhile (sexp &rest body) - "Anaphoric version of `while'." + "Anaphoric version of `while'. +Same usage as `while' except that SEXP is bound to +a temporary variable called `it' at each turn. +An implicit nil block is bound to the loop so usage +of `cl-return' is possible to exit the loop." + (declare (indent 1) (debug t)) (helm-with-gensyms (flag) `(let ((,flag t)) - (while ,flag - (helm-aif ,sexp - (progn ,@body) - (setq ,flag nil)))))) + (cl-block nil + (while ,flag + (helm-aif ,sexp + (progn ,@body) + (setq ,flag nil))))))) (defmacro helm-acond (&rest clauses) "Anaphoric version of `cond'." @@ -184,7 +211,7 @@ text to be displayed in BUFNAME." (setq helm-suspend-update-flag t) (set-buffer (get-buffer-create bufname)) (switch-to-buffer bufname) - (delete-other-windows) + (when helm-help-full-frame (delete-other-windows)) (delete-region (point-min) (point-max)) (org-mode) (save-excursion @@ -230,28 +257,28 @@ text to be displayed in BUFNAME." "[SPC,C-v,down,next:NextPage b,M-v,up,prior:PrevPage C-s/r:Isearch q:Quit]" 'face 'helm-helper)) scroll-error-top-bottom) - (cl-loop for event = (read-key prompt) do - (cl-case event - ((?\C-v ? down next) (helm-help-scroll-up helm-scroll-amount)) - ((?\M-v ?b up prior) (helm-help-scroll-down helm-scroll-amount)) - (?\C-s (isearch-forward)) - (?\C-r (isearch-backward)) - (?\C-a (call-interactively #'move-beginning-of-line)) - (?\C-e (call-interactively #'move-end-of-line)) - (?\C-f (call-interactively #'forward-char)) - (?\C-b (call-interactively #'backward-char)) - (?\C-n (helm-help-next-line)) - (?\C-p (helm-help-previous-line)) - (?\M-a (call-interactively #'backward-sentence)) - (?\M-e (call-interactively #'forward-sentence)) - (?\M-f (call-interactively #'forward-word)) - (?\M-b (call-interactively #'backward-word)) - (?\C- (helm-help-toggle-mark)) - (?\M-w (copy-region-as-kill - (region-beginning) (region-end)) - (deactivate-mark)) - (?q (cl-return)) - (t (ignore)))))) + (helm-awhile (read-key prompt) + (cl-case it + ((?\C-v ? down next) (helm-help-scroll-up helm-scroll-amount)) + ((?\M-v ?b up prior) (helm-help-scroll-down helm-scroll-amount)) + (?\C-s (isearch-forward)) + (?\C-r (isearch-backward)) + (?\C-a (call-interactively #'move-beginning-of-line)) + (?\C-e (call-interactively #'move-end-of-line)) + (?\C-f (call-interactively #'forward-char)) + (?\C-b (call-interactively #'backward-char)) + (?\C-n (helm-help-next-line)) + (?\C-p (helm-help-previous-line)) + (?\M-a (call-interactively #'backward-sentence)) + (?\M-e (call-interactively #'forward-sentence)) + (?\M-f (call-interactively #'forward-word)) + (?\M-b (call-interactively #'backward-word)) + (?\C- (helm-help-toggle-mark)) + (?\M-w (copy-region-as-kill + (region-beginning) (region-end)) + (deactivate-mark)) + (?q (cl-return)) + (t (ignore)))))) ;;; List processing @@ -318,6 +345,17 @@ Default is `eq'." (string-match-p re i))))) collect i)) +(defun helm-boring-directory-p (directory black-list) + "Check if one regexp in BLACK-LIST match DIRECTORY." + (helm-awhile (helm-basedir (directory-file-name + (expand-file-name directory))) + (when (string= it "/") (cl-return nil)) + (when (cl-loop for r in black-list + thereis (string-match-p + r (directory-file-name directory))) + (cl-return t)) + (setq directory it))) + (defun helm-shadow-entries (seq regexp-list) "Put shadow property on entries in SEQ matching a regexp in REGEXP-LIST." (let ((face 'italic)) @@ -444,18 +482,18 @@ Add spaces at end if needed to reach WIDTH when STR is shorter than WIDTH." (defun helm-describe-function (func) "FUNC is symbol or string." - (describe-function (helm-symbolify func)) - (message nil)) + (cl-letf (((symbol-function 'message) #'ignore)) + (describe-function (helm-symbolify func)))) (defun helm-describe-variable (var) "VAR is symbol or string." - (describe-variable (helm-symbolify var)) - (message nil)) + (cl-letf (((symbol-function 'message) #'ignore)) + (describe-variable (helm-symbolify var)))) (defun helm-describe-face (face) - "VAR is symbol or string." - (describe-face (helm-symbolify face)) - (message nil)) + "FACE is symbol or string." + (cl-letf (((symbol-function 'message) #'ignore)) + (describe-face (helm-symbolify face)))) (defun helm-find-function (func) "FUNC is symbol or string." @@ -473,6 +511,48 @@ Add spaces at end if needed to reach WIDTH when STR is shorter than WIDTH." "CANDIDATE is symbol or string. See `kill-new' for argument REPLACE." (kill-new (helm-stringify candidate) replace)) + + +;;; Modes +;; +(defun helm-same-major-mode-p (start-buffer alist) + "Decide if current-buffer is related to START-BUFFER. +Argument ALIST is an alist of associated major modes." + ;; START-BUFFER is the current-buffer where we start searching. + ;; Determine the major-mode of START-BUFFER as `cur-maj-mode'. + ;; Each time the loop go in another buffer we try from this buffer + ;; to determine if its `major-mode' is: + ;; - same as the `cur-maj-mode' + ;; - derived from `cur-maj-mode' and from + ;; START-BUFFER if its mode is derived from the one in START-BUFFER. + ;; - have an assoc entry (major-mode . cur-maj-mode) + ;; - have an rassoc entry (cur-maj-mode . major-mode) + ;; - check if one of these entries inherit from another one in + ;; `alist'. + (let* ((cur-maj-mode (with-current-buffer start-buffer major-mode)) + (maj-mode major-mode) + (c-assoc-mode (assq cur-maj-mode alist)) + (c-rassoc-mode (rassq cur-maj-mode alist)) + (o-assoc-mode (assq major-mode alist)) + (o-rassoc-mode (rassq major-mode alist)) + (cdr-c-assoc-mode (cdr c-assoc-mode)) + (cdr-o-assoc-mode (cdr o-assoc-mode))) + (or (eq major-mode cur-maj-mode) + (derived-mode-p cur-maj-mode) + (with-current-buffer start-buffer + (derived-mode-p maj-mode)) + (or (eq cdr-c-assoc-mode major-mode) + (eq (car c-rassoc-mode) major-mode) + (eq (cdr (assq cdr-c-assoc-mode alist)) + major-mode) + (eq (car (rassq cdr-c-assoc-mode alist)) + major-mode)) + (or (eq cdr-o-assoc-mode cur-maj-mode) + (eq (car o-rassoc-mode) cur-maj-mode) + (eq (cdr (assq cdr-o-assoc-mode alist)) + cur-maj-mode) + (eq (car (rassq cdr-o-assoc-mode alist)) + cur-maj-mode))))) ;;; Files routines ;; @@ -529,62 +609,65 @@ Useful in dired buffers when there is inserted subdirs." ;; Same as `vc-directory-exclusion-list'. (defvar helm-walk-ignore-directories - '("SCCS" "RCS" "CVS" "MCVS" ".svn" ".git" ".hg" ".bzr" - "_MTN" "_darcs" "{arch}" ".gvfs")) + '("SCCS/" "RCS/" "CVS/" "MCVS/" ".svn/" ".git/" ".hg/" ".bzr/" + "_MTN/" "_darcs/" "{arch}/" ".gvfs/")) + +(defsubst helm--dir-file-name (file dir) + (expand-file-name + (substring file 0 (1- (length file))) dir)) + +(defsubst helm--dir-name-p (str) + (char-equal (aref str (1- (length str))) ?/)) (cl-defun helm-walk-directory (directory &key (path 'basename) - (directories t) - match skip-subdirs) + directories + match skip-subdirs) "Walk through DIRECTORY tree. + Argument PATH can be one of basename, relative, full, or a function called on file name, default to basename. + Argument DIRECTORIES when non--nil (default) return also directories names, -otherwise skip directories names. -Argument MATCH can be a predicate or a regexp. -Argument SKIP-SUBDIRS when non--nil will skip `helm-walk-ignore-directories' -unless it is given as a list of directories, in this case this list will be used +otherwise skip directories names, with a value of 'only returns +only subdirectories, i.e files are skipped. + +Argument MATCH is a regexp matching files or directories. + +Argument SKIP-SUBDIRS when `t' will skip `helm-walk-ignore-directories' +otherwise if it is given as a list of directories, this list will be used instead of `helm-walk-ignore-directories'." - (let* ((result '()) - (fn (cl-case path + (let ((fn (cl-case path (basename 'file-name-nondirectory) (relative 'file-relative-name) (full 'identity) - (t path)))) + (t path)))) ; A function. + (setq skip-subdirs (if (listp skip-subdirs) + skip-subdirs + helm-walk-ignore-directories)) (cl-labels ((ls-rec (dir) - (unless (and skip-subdirs - (member (helm-basename dir) - (if (listp skip-subdirs) - skip-subdirs - helm-walk-ignore-directories))) - (cl-loop with ls = (sort (file-name-all-completions "" dir) - 'string-lessp) - for f in ls - ;; Use `directory-file-name' to remove the final slash. - ;; Needed to avoid infloop on symlinks symlinking - ;; a directory inside it [1]. - for file = (directory-file-name - (expand-file-name f dir)) - unless (member f '("./" "../")) - ;; A directory. - if (char-equal (aref f (1- (length f))) ?/) - do (progn (when directories - (push (funcall fn file) result)) - ;; Don't recurse in symlinks. - ;; `file-symlink-p' have to be called - ;; on the directory with its final - ;; slash removed [1]. - (and (not (file-symlink-p file)) - (ls-rec file))) - else do - (if match - (and (if (functionp match) - (funcall match f) - (and (stringp match) - (string-match match f))) - (push (funcall fn file) result)) - (push (funcall fn file) result)))))) - (ls-rec directory) - (nreverse result)))) + (unless (file-symlink-p dir) + (cl-loop for f in (sort (file-name-all-completions "" dir) + 'string-lessp) + unless (member f '("./" "../")) + ;; A directory. + ;; Use `helm--dir-file-name' to remove the final slash. + ;; Needed to avoid infloop on directory symlinks. + if (and (helm--dir-name-p f) + (helm--dir-file-name f dir)) + nconc + (unless (member f skip-subdirs) + (if (and directories + (or (null match) + (string-match match f))) + (nconc (list (concat (funcall fn it) "/")) + (ls-rec it)) + (ls-rec it))) + ;; A regular file. + else nconc + (when (and (null (eq directories 'only)) + (or (null match) (string-match match f))) + (list (funcall fn (expand-file-name f dir)))))))) + (ls-rec directory)))) (defun helm-file-expand-wildcards (pattern &optional full) "Same as `file-expand-wildcards' but allow recursion. diff --git a/elpa/helm-core-20160419.2355/helm-multi-match.el b/elpa/helm-core-20160627.324/helm-multi-match.el similarity index 100% rename from elpa/helm-core-20160419.2355/helm-multi-match.el rename to elpa/helm-core-20160627.324/helm-multi-match.el diff --git a/elpa/helm-core-20160419.2355/helm-source.el b/elpa/helm-core-20160627.324/helm-source.el similarity index 100% rename from elpa/helm-core-20160419.2355/helm-source.el rename to elpa/helm-core-20160627.324/helm-source.el diff --git a/elpa/helm-core-20160419.2355/helm.el b/elpa/helm-core-20160627.324/helm.el similarity index 97% rename from elpa/helm-core-20160419.2355/helm.el rename to elpa/helm-core-20160627.324/helm.el index c075ea4..42364f7 100644 --- a/elpa/helm-core-20160419.2355/helm.el +++ b/elpa/helm-core-20160627.324/helm.el @@ -116,11 +116,10 @@ Arg MAP is the keymap to use, SUBKEY is the initial short key-binding to call COMMAND. Arg OTHER-SUBKEYS is an alist specifying other short key-bindings -to use once started. -e.g: +to use once started e.g: -\(helm-define-key-with-subkeys global-map - \(kbd \"C-x v n\") ?n 'git-gutter:next-hunk '((?p . git-gutter:previous-hunk))\) + \(helm-define-key-with-subkeys global-map + \(kbd \"C-x v n\") ?n 'git-gutter:next-hunk '((?p . git-gutter:previous-hunk))\) In this example, `C-x v n' will run `git-gutter:next-hunk' @@ -135,7 +134,7 @@ For any other keys pressed, run their assigned command as defined in MAP and then exit the loop running EXIT-FN, if specified. NOTE: SUBKEY and OTHER-SUBKEYS bindings support char syntax only -(e.g ?n), so don't use strings or vectors to define them." +\(e.g ?n), so don't use strings or vectors to define them." (declare (indent 1)) (define-key map key (lambda () @@ -162,7 +161,6 @@ NOTE: SUBKEY and OTHER-SUBKEYS bindings support char syntax only unread-command-events))) nil))))) (and exit-fn (funcall exit-fn)))))) - ;;; Keymap ;; @@ -570,6 +568,16 @@ Only async sources than use a sentinel calling :type 'integer :group 'helm) +(defcustom helm-debug-root-directory nil + "When non-`nil', saves helm log messages to a file in this directory. +When `nil' log messages are saved to a buffer instead. +Log message are saved only when `helm-debug' is non-nil, so setting this +doesn't enable debugging by itself. + +See `helm-log-save-maybe' for more info." + :type 'string + :group 'helm) + ;;; Faces ;; @@ -873,6 +881,24 @@ Very useful for resuming previous Helm. Binding a key to this command will greatly improve `helm' interactivity especially after an accidental exit. +** Debugging helm + +helm have a special variable called `helm-debug', setting it to non-nil +will allow helm logging in a special outline-mode buffer. +Helm is resetting the variable to nil at end of each session. + +A convenient command is bound to \\\\[helm-enable-or-switch-to-debug] +and allow turning debugging to this session only. +To avoid accumulating log while you are typing your pattern, you can use +\\\\[helm-toggle-suspend-update] to turn off updating, then when you +are ready turn it on again to start updating. + +Once you exit your helm session you can access the debug buffer with `helm-debug-open-last-log'. +It is possible to save logs to dated files when `helm-debug-root-directory' +is set to a valid directory. + +NOTE: Be aware that helm log buffers grow really fast, so use `helm-debug' only when needed. + ** Helm Map \\{helm-map}" "Message string containing detailed help for `helm'. @@ -913,11 +939,7 @@ It also accepts function or variable symbol.") (defvar helm-candidate-buffer-alist nil) (defvar helm-tick-hash (make-hash-table :test 'equal)) (defvar helm-issued-errors nil) -(defvar helm-debug-root-directory nil - "When non-`nil', saves helm log messages to `helm-last-log-file'. -Use only for debugging purposes because of the size of the log files. -See `helm-log-save-maybe' for more info.") -(defvar helm-last-log-file nil +(defvar helm--last-log-file nil "The name of the log file of the last helm session.") (defvar helm-follow-mode nil) (defvar helm--local-variables nil) @@ -979,6 +1001,10 @@ because they are automatically added. You should not modify this yourself unless you know what you are doing.") ;; Same as `ffap-url-regexp' but keep it here to ensure `ffap-url-regexp' is not nil. (defvar helm--url-regexp "\\(news\\(post\\)?:\\|mailto:\\|file:\\|\\(ftp\\|https?\\|telnet\\|gopher\\|www\\|wais\\)://\\)") +(defvar helm--ignore-errors nil + "Flag to prevent helm popping up errors in candidates functions. +Should be set in candidates functions if needed, will be restored +at end of session.") ;; Utility: logging (defun helm-log (format-string &rest args) @@ -1030,10 +1056,8 @@ e.g (helm-log-error \"Error %s: %s\" (car err) (cdr err))." (add-to-list 'helm-issued-errors msg)))) (defun helm-log-save-maybe () - "May be save log buffer to `helm-last-log-file'. -If `helm-debug-root-directory' is non-`nil' then a valid -directory, 'helm-debug-', is created and messages -logged to a file named with todays date and time." + "Save log buffer if `helm-debug-root-directory' is set to a valid directory. +Messages are logged to a file named with todays date and time in this directory." (when (and (stringp helm-debug-root-directory) (file-directory-p helm-debug-root-directory) helm-debug) @@ -1043,20 +1067,22 @@ logged to a file named with todays date and time." (make-directory logdir t) (with-current-buffer (get-buffer-create helm-debug-buffer) (write-region (point-min) (point-max) - (setq helm-last-log-file + (setq helm--last-log-file (expand-file-name (format-time-string "%Y%m%d-%H%M%S") logdir)) nil 'silent) - (kill-buffer))))) + (kill-buffer)))) + (setq helm-debug nil)) ;;;###autoload (defun helm-debug-open-last-log () - "Open helm log file of last helm session. -If `helm-last-log-file' is nil, switch to `helm-debug-buffer' ." + "Open helm log file or buffer of last helm session." (interactive) - (if helm-last-log-file - (view-file helm-last-log-file) + (if helm--last-log-file + (progn + (find-file helm--last-log-file) + (outline-mode) (view-mode 1) (visual-line-mode 1)) (switch-to-buffer helm-debug-buffer) (view-mode 1) (visual-line-mode 1))) @@ -1508,7 +1534,7 @@ Use this on commands invoked from key-bindings, but not on action functions invoked as action from the action menu, i.e functions called with RET." (setq helm-saved-action action) - (setq helm-saved-selection (helm-get-selection)) + (setq helm-saved-selection (or (helm-get-selection) "")) (helm-exit-minibuffer)) (defalias 'helm-run-after-quit 'helm-run-after-exit) @@ -1570,15 +1596,16 @@ Default value for BUFFER is `helm-buffer'." "Check if current source contains candidates. This could happen when for example the last element of a source was deleted and the candidates list not updated." - (with-helm-window - (or (helm-empty-buffer-p) - (and (helm-end-of-source-p) - (eq (point-at-bol) (point-at-eol)) - (or - (save-excursion - (forward-line -1) - (helm-pos-header-line-p)) - (bobp)))))) + (when (helm-window) + (with-helm-window + (or (helm-empty-buffer-p) + (and (helm-end-of-source-p) + (eq (point-at-bol) (point-at-eol)) + (or + (save-excursion + (forward-line -1) + (helm-pos-header-line-p)) + (bobp))))))) ;; Core: tools @@ -1862,7 +1889,11 @@ ANY-KEYMAP ANY-DEFAULT ANY-HISTORY See `helm'." (helm-log "any-history = %S" any-history) (setq helm--prompt (or any-prompt "pattern: ")) (let ((non-essential t) + ;; Prevent mouse jumping to the upper-right + ;; hand corner of the frame (#1538). mode-line-in-non-selected-windows + mouse-autoselect-window + focus-follows-mouse (input-method-verbose-flag helm-input-method-verbose-flag) (old--cua cua-mode) (helm--maybe-use-default-as-input @@ -1918,6 +1949,7 @@ ANY-KEYMAP ANY-DEFAULT ANY-HISTORY See `helm'." ;; Reset helm-pattern so that lambda's using it ;; before running helm will not start with its old value. (setq helm-pattern "") + (setq helm--ignore-errors nil) (and old--cua (cua-mode 1)) (helm-log-save-maybe)))) @@ -1931,7 +1963,9 @@ Call with a prefix arg to choose among existing helm buffers (sessions). When calling from lisp, specify a buffer-name as a string with ARG." (interactive "P") - (let (any-buffer helm-full-frame cur-dir) + (let (any-buffer + cur-dir + (helm-full-frame (default-value 'helm-full-frame))) (if arg (if (and (stringp arg) (bufferp (get-buffer arg))) (setq any-buffer arg) @@ -2351,10 +2385,10 @@ Unuseful when used outside helm, don't use it.") "Create and setup `helm-buffer'." (let ((root-dir default-directory)) (with-current-buffer (get-buffer-create helm-buffer) - (helm-major-mode) (helm-log "Enabling major-mode %S" major-mode) (helm-log "kill local variables: %S" (buffer-local-variables)) (kill-all-local-variables) + (helm-major-mode) (set (make-local-variable 'inhibit-read-only) t) (buffer-disable-undo) (erase-buffer) @@ -2588,7 +2622,7 @@ map)." [drag-mouse-1] [drag-mouse-2] [drag-mouse-3] [double-mouse-1] [double-mouse-2] [double-mouse-3] [triple-mouse-1] [triple-mouse-2] [triple-mouse-3]) - do (define-key map k 'undefined)) + do (define-key map k 'ignore)) map)) (define-minor-mode helm--remap-mouse-mode @@ -2609,6 +2643,7 @@ WARNING: Do not use this mode yourself, it is internal to helm." "Clean up the mess when helm exit or quit." (helm-log "start cleanup") (with-current-buffer helm-buffer + (setq cursor-type t) ;; bury-buffer from this window. (bury-buffer) ;[1] (remove-hook 'post-command-hook 'helm--maybe-update-keymap) @@ -2634,7 +2669,6 @@ WARNING: Do not use this mode yourself, it is internal to helm." ;; be a helm buffer. (replace-buffer-in-windows helm-buffer) (setq helm-alive-p nil) - (setq helm-debug nil) ;; This is needed in some cases where last input ;; is yielded infinitely in minibuffer after helm session. (helm-clean-up-minibuffer)) @@ -2729,7 +2763,8 @@ Helm plug-ins are realized by this function." ;; Candidates will be filtered later in process filter. candidates) ;; An error occured in candidates function. - (cfn-error (funcall notify-error cfn-error)) + (cfn-error (unless helm--ignore-errors + (funcall notify-error cfn-error))) ;; Candidates function returns no candidates. ((or (null candidates) ;; Can happen when the output of a process @@ -2748,8 +2783,7 @@ Helm plug-ins are realized by this function." (defmacro helm-while-no-input (&rest body) "Same as `while-no-input' but without the `input-pending-p' test." (declare (debug t) (indent 0)) - (let ((catch-sym (make-symbol "input")) - inhibit-quit) + (let ((catch-sym (make-symbol "input"))) `(with-local-quit (catch ',catch-sym (let ((throw-on-input ',catch-sym)) @@ -3061,30 +3095,30 @@ to the matching method in use." ;; Try first matching against whole pattern. (while (re-search-forward regex nil t) (cl-incf count) - (add-text-properties - (match-beginning 0) (match-end 0) '(face helm-match))) + (helm-add-face-text-properties + (match-beginning 0) (match-end 0) 'helm-match)) ;; If no matches start matching against multiples or fuzzy matches. (when (zerop count) (cl-loop with multi-match = (string-match-p " " helm-pattern) with patterns = (if multi-match - (split-string helm-pattern) + (mapcar #'helm--maybe-get-migemo-pattern + (split-string helm-pattern)) (split-string helm-pattern "" t)) for p in patterns - for re = (helm--maybe-get-migemo-pattern p) ;; Multi matches (regexps patterns). if multi-match do (progn - (while (re-search-forward re nil t) - (add-text-properties + (while (re-search-forward p nil t) + (helm-add-face-text-properties (match-beginning 0) (match-end 0) - '(face helm-match))) + 'helm-match)) (goto-char (point-min))) ;; Fuzzy matches (literal patterns). else do - (when (search-forward re nil t) - (add-text-properties + (when (search-forward p nil t) + (helm-add-face-text-properties (match-beginning 0) (match-end 0) - '(face helm-match)))))) + 'helm-match))))) (invalid-regexp nil)) ;; Now replace the original match-part with the part ;; with face properties added. @@ -3337,7 +3371,9 @@ pattern has changed. Selection is preserved to current candidate or moved to PRESELECT, if specified." (let ((source (helm-get-current-source)) - (selection (helm-get-selection nil t))) + (selection (helm-aif (helm-get-selection nil t) + (regexp-quote it) + it))) (setq helm-force-updating-p t) (when source (mapc 'helm-force-update--reinit @@ -3606,6 +3642,7 @@ If action buffer is selected, back to the helm buffer." (set-window-buffer (get-buffer-window helm-action-buffer) helm-buffer) (kill-buffer helm-action-buffer) + (setq helm-saved-selection nil) (helm-set-pattern helm-input 'noupdate)) (helm-saved-selection (setq helm-saved-current-source (helm-get-current-source)) @@ -3702,25 +3739,37 @@ DIRECTION is either 'next or 'previous." ;; Setup mode-line. (if helm-mode-line-string (setq mode-line-format - `(" " mode-line-buffer-identification " " - (:eval (format "L%-3d" (helm-candidate-number-at-point))) - ,follow - (:eval ,(and marked - (concat - " " - (propertize - (format "M%d" (length marked)) - 'face 'helm-visible-mark)))) - (:eval (when ,helm--mode-line-display-prefarg - (let ((arg (prefix-numeric-value - (or prefix-arg current-prefix-arg)))) - (unless (= arg 1) - (propertize (format " [prefarg:%s]" arg) - 'face 'helm-prefarg))))) - " " - (:eval (helm-show-candidate-number - (car-safe helm-mode-line-string))) - " " helm--mode-line-string-real " " mode-line-end-spaces) + `(:propertize + (" " mode-line-buffer-identification " " + (:eval (format "L%-3d" (helm-candidate-number-at-point))) + ,follow + (:eval ,(and marked + (concat + " " + (propertize + (format "M%d" (length marked)) + 'face 'helm-visible-mark)))) + (:eval (when ,helm--mode-line-display-prefarg + (let ((arg (prefix-numeric-value + (or prefix-arg current-prefix-arg)))) + (unless (= arg 1) + (propertize (format " [prefarg:%s]" arg) + 'face 'helm-prefarg))))) + " " + (:eval (helm-show-candidate-number + (car-safe helm-mode-line-string))) + " " helm--mode-line-string-real " " + (:eval (make-string (window-width) ? ))) + keymap (keymap (mode-line keymap + (mouse-1 . ignore) + (down-mouse-1 . ignore) + (drag-mouse-1 . ignore) + (mouse-2 . ignore) + (down-mouse-2 . ignore) + (drag-mouse-2 . ignore) + (mouse-3 . ignore) + (down-mouse-3 . ignore) + (drag-mouse-3 . ignore)))) helm--mode-line-string-real (substitute-command-keys (if (listp helm-mode-line-string) (cadr helm-mode-line-string) @@ -3945,8 +3994,10 @@ Key arg DIRECTION can be one of: (error (helm-log "%S" err))))) (defun helm-candidate-number-at-point () - (with-helm-buffer - (or (get-text-property (point) 'helm-cand-num) 1))) + (if helm-alive-p + (with-helm-buffer + (or (get-text-property (point) 'helm-cand-num) 1)) + (or (get-text-property (point) 'helm-cand-num) 1))) (defun helm--next-or-previous-line (direction &optional arg) ;; Be sure to not use this in non--interactives calls. @@ -4274,15 +4325,19 @@ want to preselect." (when candidate-or-regexp (if (and helm-force-updating-p source) (helm-goto-source source) - (goto-char (point-min)) - (forward-line 1)) - (let ((start (point))) - (or - (if (consp candidate-or-regexp) - (and (re-search-forward (car candidate-or-regexp) nil t) - (re-search-forward (cdr candidate-or-regexp) nil t)) - (re-search-forward candidate-or-regexp nil t)) - (goto-char start)))) + (goto-char (point-min)) + (forward-line 1)) + (if (functionp candidate-or-regexp) + (funcall candidate-or-regexp) + (let ((start (point)) mp) + (helm-awhile (if (consp candidate-or-regexp) + (and (re-search-forward (car candidate-or-regexp) nil t) + (re-search-forward (cdr candidate-or-regexp) nil t)) + (re-search-forward candidate-or-regexp nil t)) + ;; If search fall on an header line continue loop + ;; until it match or fail (Issue #1509). + (unless (helm-pos-header-line-p) (cl-return (setq mp it)))) + (goto-char (or mp start))))) (forward-line 0) ; Avoid scrolling right on long lines. (when (helm-pos-multiline-p) (helm-move--beginning-of-multiline-candidate)) diff --git a/elpa/helm-flyspell-20151026.912/helm-flyspell-pkg.el b/elpa/helm-flyspell-20151026.912/helm-flyspell-pkg.el deleted file mode 100644 index b341fcf..0000000 --- a/elpa/helm-flyspell-20151026.912/helm-flyspell-pkg.el +++ /dev/null @@ -1 +0,0 @@ -(define-package "helm-flyspell" "20151026.912" "Helm extension for correcting words with flyspell" '((helm "1.6.5"))) diff --git a/elpa/helm-flyspell-20151026.912/helm-flyspell-autoloads.el b/elpa/helm-flyspell-20160612.1640/helm-flyspell-autoloads.el similarity index 84% rename from elpa/helm-flyspell-20151026.912/helm-flyspell-autoloads.el rename to elpa/helm-flyspell-20160612.1640/helm-flyspell-autoloads.el index b86f96f..6301494 100644 --- a/elpa/helm-flyspell-20151026.912/helm-flyspell-autoloads.el +++ b/elpa/helm-flyspell-20160612.1640/helm-flyspell-autoloads.el @@ -3,8 +3,8 @@ ;;; Code: (add-to-list 'load-path (or (file-name-directory #$) (car load-path))) -;;;### (autoloads nil "helm-flyspell" "helm-flyspell.el" (22297 53346 -;;;;;; 154923 870000)) +;;;### (autoloads nil "helm-flyspell" "helm-flyspell.el" (22387 29364 +;;;;;; 594723 244000)) ;;; Generated autoloads from helm-flyspell.el (autoload 'helm-flyspell-correct "helm-flyspell" "\ diff --git a/elpa/helm-flyspell-20160612.1640/helm-flyspell-pkg.el b/elpa/helm-flyspell-20160612.1640/helm-flyspell-pkg.el new file mode 100644 index 0000000..4954e68 --- /dev/null +++ b/elpa/helm-flyspell-20160612.1640/helm-flyspell-pkg.el @@ -0,0 +1 @@ +(define-package "helm-flyspell" "20160612.1640" "No description available." 'nil) diff --git a/elpa/helm-flyspell-20151026.912/helm-flyspell.el b/elpa/helm-flyspell-20160612.1640/helm-flyspell.el similarity index 85% rename from elpa/helm-flyspell-20151026.912/helm-flyspell.el rename to elpa/helm-flyspell-20160612.1640/helm-flyspell.el index fb47666..763cba8 100644 --- a/elpa/helm-flyspell-20151026.912/helm-flyspell.el +++ b/elpa/helm-flyspell-20160612.1640/helm-flyspell.el @@ -1,8 +1,11 @@ -;;; helm-flyspell.el --- Helm extension for correcting words with flyspell -;; Package-Version: 20151026.912 +;;; helm-flyspell.el -- Helm extension for correcting words with flyspell -*- lexical-binding: t; -*- ;; Copyright (C) 2014 Andrzej Pronobis +;; Author: Andrzej Pronobis +;; URL: https://github.com/pronobis/helm-flyspell +;; Package-Version: 20160612.1640 +;; Keywords: convenience ;; Package-Requires: ((helm "1.6.5")) ;; This program is free software; you can redistribute it and/or modify @@ -19,6 +22,7 @@ ;; along with this program. If not, see . ;;; Commentary: +;; ;; To use, just put your cursor on or after the misspelled word and ;; run helm-flyspell-correct. You can of course bind it to a key as ;; well by adding this to your `~/.emacs` file: @@ -34,20 +38,14 @@ ;;; Code: -;; For lexical-let -(eval-when-compile - (require 'cl)) - ;; Requires (require 'helm) (require 'flyspell) -(defun helm-flyspell--always-match (candidate) +(defun helm-flyspell--always-match (_candidate) "Return true for any CANDIDATE." - t - ) - + t) (defun helm-flyspell--option-candidates (word) "Return a set of options for the given WORD." @@ -58,9 +56,7 @@ (setq opts (append opts (list (cons (format "Save \"%s\"" helm-pattern) (cons 'save helm-pattern)) (cons (format "Accept (session) \"%s\"" helm-pattern) (cons 'session helm-pattern)) (cons (format "Accept (buffer) \"%s\"" helm-pattern) (cons 'buffer helm-pattern)))))) - opts - )) - + opts)) (defun helm-flyspell (candidates word) "Run helm for the given CANDIDATES given by flyspell for the WORD. @@ -73,22 +69,17 @@ a tuple of (command, word) to be used by flyspell-do-correct." :candidates candidates :action 'identity :candidate-number-limit 9999 - :fuzzy-match t - ) + :fuzzy-match t) (helm-build-sync-source "Options" - :candidates '(lambda () - (lexical-let ((tmp word)) - (helm-flyspell--option-candidates tmp))) + :candidates (lambda () + (helm-flyspell--option-candidates word)) :action 'identity :candidate-number-limit 9999 :match 'helm-flyspell--always-match - :volatile t - ) - ) + :volatile t)) :buffer "*Helm Flyspell*" :prompt "Correction: ")) - ;;;###autoload (defun helm-flyspell-correct () "Use helm for flyspell correction. @@ -97,8 +88,7 @@ Adapted from `flyspell-correct-word-before-point'." ;; use the correct dictionary (flyspell-accept-buffer-local-defs) (let ((cursor-location (point)) - (word (flyspell-get-word)) - (opoint (point))) + (word (flyspell-get-word))) (if (consp word) (let ((start (car (cdr word))) (end (car (cdr (cdr word)))) @@ -128,19 +118,18 @@ Adapted from `flyspell-correct-word-before-point'." (error "Ispell: error in Ispell process")) (t ;; The word is incorrect, we have to propose a replacement. - (let ((res (helm-flyspell (third poss) word))) + (let ((res (helm-flyspell (nth 2 poss) word))) (cond ((stringp res) - (flyspell-do-correct res poss word cursor-location start end opoint)) + (flyspell-do-correct res poss word cursor-location start end cursor-location)) (t (let ((cmd (car res)) (wrd (cdr res))) (if (string= wrd word) - (flyspell-do-correct cmd poss wrd cursor-location start end opoint) + (flyspell-do-correct cmd poss wrd cursor-location start end cursor-location) (progn - (flyspell-do-correct cmd poss wrd cursor-location start end opoint) - (flyspell-do-correct wrd poss word cursor-location start end opoint))))))))) + (flyspell-do-correct cmd poss wrd cursor-location start end cursor-location) + (flyspell-do-correct wrd poss word cursor-location start end cursor-location))))))))) (ispell-pdict-save t))))) - (provide 'helm-flyspell) ;;; helm-flyspell.el ends here diff --git a/elpa/js2-mode-20160409.1113/js2-imenu-extras.el b/elpa/js2-mode-20160626.2025/js2-imenu-extras.el similarity index 100% rename from elpa/js2-mode-20160409.1113/js2-imenu-extras.el rename to elpa/js2-mode-20160626.2025/js2-imenu-extras.el diff --git a/elpa/js2-mode-20160409.1113/js2-mode-autoloads.el b/elpa/js2-mode-20160626.2025/js2-mode-autoloads.el similarity index 91% rename from elpa/js2-mode-20160409.1113/js2-mode-autoloads.el rename to elpa/js2-mode-20160626.2025/js2-mode-autoloads.el index e53ef56..a9ea407 100644 --- a/elpa/js2-mode-20160409.1113/js2-mode-autoloads.el +++ b/elpa/js2-mode-20160626.2025/js2-mode-autoloads.el @@ -3,8 +3,8 @@ ;;; Code: (add-to-list 'load-path (or (file-name-directory #$) (car load-path))) -;;;### (autoloads nil "js2-imenu-extras" "js2-imenu-extras.el" (22297 -;;;;;; 19274 703515 321000)) +;;;### (autoloads nil "js2-imenu-extras" "js2-imenu-extras.el" (22387 +;;;;;; 29360 905580 641000)) ;;; Generated autoloads from js2-imenu-extras.el (autoload 'js2-imenu-extras-setup "js2-imenu-extras" "\ @@ -19,8 +19,8 @@ Toggle Imenu support for frameworks and structural patterns. ;;;*** -;;;### (autoloads nil "js2-mode" "js2-mode.el" (22297 19275 33509 -;;;;;; 465000)) +;;;### (autoloads nil "js2-mode" "js2-mode.el" (22387 29360 929562 +;;;;;; 12000)) ;;; Generated autoloads from js2-mode.el (autoload 'js2-highlight-unused-variables-mode "js2-mode" "\ @@ -56,7 +56,7 @@ variables (`sgml-basic-offset' et al) locally, like so: ;;;*** ;;;### (autoloads nil nil ("js2-mode-pkg.el" "js2-old-indent.el") -;;;;;; (22297 19275 125905 653000)) +;;;;;; (22387 29360 947929 521000)) ;;;*** diff --git a/elpa/js2-mode-20160409.1113/js2-mode-pkg.el b/elpa/js2-mode-20160626.2025/js2-mode-pkg.el similarity index 74% rename from elpa/js2-mode-20160409.1113/js2-mode-pkg.el rename to elpa/js2-mode-20160626.2025/js2-mode-pkg.el index 5175b07..0fb0f98 100644 --- a/elpa/js2-mode-20160409.1113/js2-mode-pkg.el +++ b/elpa/js2-mode-20160626.2025/js2-mode-pkg.el @@ -1,4 +1,4 @@ -(define-package "js2-mode" "20160409.1113" "Improved JavaScript editing mode" +(define-package "js2-mode" "20160626.2025" "Improved JavaScript editing mode" '((emacs "24.1") (cl-lib "0.5")) :url "https://github.com/mooz/js2-mode/" :keywords diff --git a/elpa/js2-mode-20160409.1113/js2-mode.el b/elpa/js2-mode-20160626.2025/js2-mode.el similarity index 98% rename from elpa/js2-mode-20160409.1113/js2-mode.el rename to elpa/js2-mode-20160626.2025/js2-mode.el index 292af25..e0ad559 100644 --- a/elpa/js2-mode-20160409.1113/js2-mode.el +++ b/elpa/js2-mode-20160626.2025/js2-mode.el @@ -1,13 +1,13 @@ ;;; js2-mode.el --- Improved JavaScript editing mode -;; Copyright (C) 2009, 2011-2015 Free Software Foundation, Inc. +;; Copyright (C) 2009, 2011-2016 Free Software Foundation, Inc. ;; Author: Steve Yegge ;; mooz ;; Dmitry Gutov ;; URL: https://github.com/mooz/js2-mode/ ;; http://code.google.com/p/js2-mode/ -;; Version: 20150909 +;; Version: 20160623 ;; Keywords: languages, javascript ;; Package-Requires: ((emacs "24.1") (cl-lib "0.5")) @@ -277,6 +277,11 @@ end of the line, otherwise, at the beginning of the next line." :type 'boolean :group 'js2-mode) +(defcustom js2-mode-assume-strict nil + "Non-nil to start files in strict mode automatically." + :type 'boolean + :group 'js2-mode) + (defcustom js2-mode-show-strict-warnings t "Non-nil to emit Ecma strict-mode warnings. Some of the warnings can be individually disabled by other flags, @@ -534,11 +539,11 @@ which doesn't seem particularly useful, but Rhino permits it." (defvar js2-ASSIGN_MUL 98) ; *= (defvar js2-ASSIGN_DIV 99) ; /= (defvar js2-ASSIGN_MOD 100) ; %= +(defvar js2-ASSIGN_EXPON 101) (defvar js2-first-assign js2-ASSIGN) -(defvar js2-last-assign js2-ASSIGN_MOD) +(defvar js2-last-assign js2-ASSIGN_EXPON) -(defvar js2-HOOK 101) ; conditional (?:) (defvar js2-COLON 102) (defvar js2-OR 103) ; logical or (||) (defvar js2-AND 104) ; logical and (&&) @@ -619,7 +624,10 @@ which doesn't seem particularly useful, but Rhino permits it." (defvar js2-AWAIT 169) ; await (pseudo keyword) -(defconst js2-num-tokens (1+ js2-AWAIT)) +(defvar js2-HOOK 170) ; conditional (?:) +(defvar js2-EXPON 171) + +(defconst js2-num-tokens (1+ js2-EXPON)) (defconst js2-debug-print-trees nil) @@ -1456,7 +1464,7 @@ the correct number of ARGS must be provided." "Compilation produced %s syntax errors.") (js2-msg "msg.var.redecl" - "TypeError: redeclaration of var %s.") + "Redeclaration of var %s.") (js2-msg "msg.const.redecl" "TypeError: redeclaration of const %s.") @@ -3502,6 +3510,7 @@ The type field inherited from `js2-node' holds the operator." (cons js2-ADD "+") ; infix plus (cons js2-SUB "-") ; infix minus (cons js2-MUL "*") + (cons js2-EXPON "**") (cons js2-DIV "/") (cons js2-MOD "%") (cons js2-NOT "!") @@ -3521,6 +3530,7 @@ The type field inherited from `js2-node' holds the operator." (cons js2-ASSIGN_ADD "+=") (cons js2-ASSIGN_SUB "-=") (cons js2-ASSIGN_MUL "*=") + (cons js2-ASSIGN_EXPON "**=") (cons js2-ASSIGN_DIV "/=") (cons js2-ASSIGN_MOD "%=")))) (cl-loop for (k . v) in tokens do @@ -5078,6 +5088,7 @@ You should use `js2-print-tree' instead of this function." js2-ASSIGN_RSH js2-ASSIGN_SUB js2-ASSIGN_URSH + js2-ASSIGN_EXPON js2-BLOCK js2-BREAK js2-CALL @@ -6189,7 +6200,11 @@ its relevant fields and puts it into `js2-ti-tokens'." (?* (if (js2-match-char ?=) js2-ASSIGN_MUL - (throw 'return js2-MUL))) + (if (js2-match-char ?*) + (if (js2-match-char ?=) + js2-ASSIGN_EXPON + js2-EXPON) + (throw 'return js2-MUL)))) (?/ ;; is it a // comment? (when (js2-match-char ?/) @@ -7264,7 +7279,7 @@ are ignored." when (and (eq 'block (js2-comment-node-format node)) (save-excursion (goto-char (js2-node-abs-pos node)) - (looking-at "/\\*global "))) + (looking-at "/\\* *global "))) append (js2-get-jslint-globals-in (match-end 0) (js2-node-abs-end node)))) @@ -7456,22 +7471,23 @@ We do a depth-first traversal of NODE. For any functions we find, we append the property name to QNAME, then call `js2-record-imenu-entry'." (let (right) (dolist (e (js2-object-node-elems node)) ; e is a `js2-object-prop-node' - (let ((left (js2-infix-node-left e)) - ;; Element positions are relative to the parent position. - (pos (+ pos (js2-node-pos e)))) - (cond - ;; foo: function() {...} - ((js2-function-node-p (setq right (js2-infix-node-right e))) - (when (js2-prop-node-name left) - ;; As a policy decision, we record the position of the property, - ;; not the position of the `function' keyword, since the property - ;; is effectively the name of the function. - (js2-record-imenu-entry right (append qname (list left)) pos))) - ;; foo: {object-literal} -- add foo to qname, offset position, and recurse - ((js2-object-node-p right) - (js2-record-object-literal right - (append qname (list (js2-infix-node-left e))) - (+ pos (js2-node-pos right))))))))) + (when (js2-infix-node-p e) + (let ((left (js2-infix-node-left e)) + ;; Element positions are relative to the parent position. + (pos (+ pos (js2-node-pos e)))) + (cond + ;; foo: function() {...} + ((js2-function-node-p (setq right (js2-infix-node-right e))) + (when (js2-prop-node-name left) + ;; As a policy decision, we record the position of the property, + ;; not the position of the `function' keyword, since the property + ;; is effectively the name of the function. + (js2-record-imenu-entry right (append qname (list left)) pos))) + ;; foo: {object-literal} -- add foo to qname, offset position, and recurse + ((js2-object-node-p right) + (js2-record-object-literal right + (append qname (list (js2-infix-node-left e))) + (+ pos (js2-node-pos right)))))))))) (defun js2-node-top-level-decl-p (node) "Return t if NODE's name is defined in the top-level scope. @@ -7987,7 +8003,7 @@ Scanner should be initialized." js2-nesting-of-function 0 js2-labeled-stmt nil js2-recorded-identifiers nil ; for js2-highlight - js2-in-use-strict-directive nil) + js2-in-use-strict-directive js2-mode-assume-strict) (while (/= (setq tt (js2-get-token)) js2-EOF) (if (= tt js2-FUNCTION) (progn @@ -8098,13 +8114,25 @@ declared; probably to check them for errors." (list node))) ((js2-object-node-p node) (dolist (elem (js2-object-node-elems node)) - ;; js2-infix-node-p catches both object prop node and initialized - ;; binding element (which is directly an infix node). - (when (js2-infix-node-p elem) - (push (js2-define-destruct-symbols - (js2-infix-node-left elem) - decl-type face ignore-not-in-block) - name-nodes))) + (let ((subexpr (cond + ((and (js2-infix-node-p elem) + (= js2-ASSIGN (js2-infix-node-type elem))) + ;; Destructuring with default argument. + (js2-infix-node-left elem)) + ((and (js2-infix-node-p elem) + (= js2-COLON (js2-infix-node-type elem))) + ;; In regular destructuring {a: aa, b: bb}, + ;; the var is on the right. In abbreviated + ;; destructuring {a, b}, right == left. + (js2-infix-node-right elem)) + ((and (js2-unary-node-p elem) + (= js2-TRIPLEDOT (js2-unary-node-type elem))) + ;; Destructuring with spread. + (js2-unary-node-operand elem))))) + (when subexpr + (push (js2-define-destruct-symbols + subexpr decl-type face ignore-not-in-block) + name-nodes)))) (apply #'append (nreverse name-nodes))) ((js2-array-node-p node) (dolist (elem (js2-array-node-elems node)) @@ -8599,7 +8627,7 @@ imports or a namespace import that follows it. (js2-define-symbol js2-LET (js2-name-node-name name-node) name-node t)))))) ((= (js2-peek-token) js2-NAME) - (let ((binding (js2-maybe-parse-export-binding))) + (let ((binding (js2-maybe-parse-export-binding t))) (let ((node-name (js2-export-binding-node-local-name binding))) (js2-define-symbol js2-LET (js2-name-node-name node-name) node-name t)) (setf (js2-import-clause-node-default-binding clause) binding) @@ -8632,50 +8660,47 @@ imports or a namespace import that follows it. "Parse a namespace import expression such as '* as bar'. The current token must be js2-MUL." (let ((beg (js2-current-token-beg))) - (when (js2-must-match js2-NAME "msg.syntax") - (if (equal "as" (js2-current-token-string)) - (when (js2-must-match-prop-name "msg.syntax") - (let ((node (make-js2-namespace-import-node - :pos beg - :len (- (js2-current-token-end) beg) - :name (make-js2-name-node - :pos (js2-current-token-beg) - :len (js2-current-token-end) - :name (js2-current-token-string))))) - (js2-node-add-children node (js2-namespace-import-node-name node)) - node)) - (js2-unget-token) - (js2-report-error "msg.syntax"))))) + (if (js2-match-contextual-kwd "as") + (when (js2-must-match-prop-name "msg.syntax") + (let ((node (make-js2-namespace-import-node + :pos beg + :len (- (js2-current-token-end) beg) + :name (make-js2-name-node + :pos (js2-current-token-beg) + :len (js2-current-token-end) + :name (js2-current-token-string))))) + (js2-node-add-children node (js2-namespace-import-node-name node)) + node)) + (js2-unget-token) + (js2-report-error "msg.syntax")))) (defun js2-parse-from-clause () "Parse the from clause in an import or export statement. E.g. from 'src/lib'" - (when (js2-must-match-name "msg.mod.from.after.import.spec.set") - (let ((beg (js2-current-token-beg))) - (if (equal "from" (js2-current-token-string)) - (cond - ((js2-match-token js2-STRING) - (make-js2-from-clause-node - :pos beg - :len (- (js2-current-token-end) beg) - :module-id (js2-current-token-string) - :metadata-p nil)) - ((js2-match-token js2-THIS) - (when (js2-must-match-name "msg.mod.spec.after.from") - (if (equal "module" (js2-current-token-string)) - (make-js2-from-clause-node - :pos beg - :len (- (js2-current-token-end) beg) - :module-id "this" - :metadata-p t) - (js2-unget-token) - (js2-unget-token) - (js2-report-error "msg.mod.spec.after.from") - nil))) - (t (js2-report-error "msg.mod.spec.after.from") nil)) - (js2-unget-token) - (js2-report-error "msg.mod.from.after.import.spec.set") - nil)))) + (if (js2-match-contextual-kwd "from") + (let ((beg (js2-current-token-beg))) + (cond + ((js2-match-token js2-STRING) + (make-js2-from-clause-node + :pos beg + :len (- (js2-current-token-end) beg) + :module-id (js2-current-token-string) + :metadata-p nil)) + ((js2-match-token js2-THIS) + (when (js2-must-match-name "msg.mod.spec.after.from") + (if (equal "module" (js2-current-token-string)) + (make-js2-from-clause-node + :pos beg + :len (- (js2-current-token-end) beg) + :module-id "this" + :metadata-p t) + (js2-unget-token) + (js2-unget-token) + (js2-report-error "msg.mod.spec.after.from") + nil))) + (t (js2-report-error "msg.mod.spec.after.from") nil))) + (js2-report-error "msg.mod.from.after.import.spec.set") + nil)) (defun js2-parse-export-bindings (&optional import-p) "Parse a list of export binding expressions such as {}, {foo, bar}, and @@ -8683,7 +8708,7 @@ The current token must be js2-MUL." js2-LC. Return a lisp list of js2-export-binding-node" (let ((bindings (list))) (while - (let ((binding (js2-maybe-parse-export-binding))) + (let ((binding (js2-maybe-parse-export-binding import-p))) (when binding (push binding bindings)) (js2-match-token js2-COMMA))) @@ -8692,7 +8717,7 @@ js2-LC. Return a lisp list of js2-export-binding-node" "msg.mod.rc.after.export.spec.list")) (reverse bindings)))) -(defun js2-maybe-parse-export-binding () +(defun js2-maybe-parse-export-binding (&optional import-p) "Attempt to parse a binding expression found inside an import/export statement. This can take the form of either as single js2-NAME token as in 'foo' or as in a rebinding expression 'bar as foo'. If it matches, it will return an instance of @@ -8704,45 +8729,49 @@ consumes no tokens." (is-reserved-name (or (= (js2-current-token-type) js2-RESERVED) (aref js2-kwd-tokens (js2-current-token-type))))) (if extern-name - (let ((as (and (js2-match-token js2-NAME) (js2-current-token-string)))) - (if (and as (equal "as" (js2-current-token-string))) - (let ((name - (or - (and (js2-match-token js2-DEFAULT) "default") - (and (js2-match-token js2-NAME) (js2-current-token-string))))) - (if name - (let ((node (make-js2-export-binding-node - :pos beg - :len (- (js2-current-token-end) beg) - :local-name (make-js2-name-node - :name name - :pos (js2-current-token-beg) - :len (js2-current-token-len)) - :extern-name (make-js2-name-node - :name extern-name - :pos beg - :len extern-name-len)))) - (js2-node-add-children - node - (js2-export-binding-node-local-name node) - (js2-export-binding-node-extern-name node)) - node) - (js2-unget-token) - nil)) - (when as (js2-unget-token)) - (let* ((name-node (make-js2-name-node - :name (js2-current-token-string) - :pos (js2-current-token-beg) - :len (js2-current-token-len))) - (node (make-js2-export-binding-node - :pos (js2-current-token-beg) - :len (js2-current-token-len) - :local-name name-node - :extern-name name-node))) - (when is-reserved-name - (js2-report-error "msg.mod.as.after.reserved.word" extern-name)) - (js2-node-add-children node name-node) - node))) + (if (js2-match-contextual-kwd "as") + (let ((name + (or + (and (js2-match-token js2-DEFAULT) "default") + (and (js2-match-token js2-NAME) (js2-current-token-string))))) + (if name + (let ((node (make-js2-export-binding-node + :pos beg + :len (- (js2-current-token-end) beg) + :local-name (make-js2-name-node + :name name + :pos (js2-current-token-beg) + :len (js2-current-token-len)) + :extern-name (make-js2-name-node + :name extern-name + :pos beg + :len extern-name-len)))) + (js2-node-add-children + node + (js2-export-binding-node-local-name node) + (js2-export-binding-node-extern-name node)) + (if import-p + (js2-set-face (js2-current-token-beg) (js2-current-token-end) + 'font-lock-variable-name-face 'record)) + node) + (js2-unget-token) + nil)) + (let* ((name-node (make-js2-name-node + :name (js2-current-token-string) + :pos (js2-current-token-beg) + :len (js2-current-token-len))) + (node (make-js2-export-binding-node + :pos (js2-current-token-beg) + :len (js2-current-token-len) + :local-name name-node + :extern-name name-node))) + (when is-reserved-name + (js2-report-error "msg.mod.as.after.reserved.word" extern-name)) + (js2-node-add-children node name-node) + (if import-p + (js2-set-face (js2-current-token-beg) (js2-current-token-end) + 'font-lock-variable-name-face 'record)) + node)) nil))) (defun js2-parse-switch () @@ -8870,12 +8899,9 @@ invalid export statements." (when exports-list (dolist (export exports-list) (push export children))) - (when (js2-match-token js2-NAME) - (if (equal "from" (js2-current-token-string)) - (progn - (js2-unget-token) - (setq from-clause (js2-parse-from-clause))) - (js2-unget-token)))) + (when (js2-match-contextual-kwd "from") + (js2-unget-token) + (setq from-clause (js2-parse-from-clause)))) ((js2-match-token js2-DEFAULT) (setq default (cond ((js2-match-token js2-CLASS) (js2-parse-class-stmt)) @@ -9594,16 +9620,10 @@ If NODE is non-nil, it is the AST node associated with the symbol." (pos (if node (js2-node-abs-pos node))) (len (if node (js2-node-len node)))) (cond - ((and symbol ; already defined - (or (if js2-in-use-strict-directive - ;; two const-bound vars in this block have same name - (and (= sdt js2-CONST) - (eq defining-scope js2-current-scope)) - (or (= sdt js2-CONST) ; old version is const - (= decl-type js2-CONST))) ; new version is const - ;; two let-bound vars in this block have same name - (and (= sdt js2-LET) - (eq defining-scope js2-current-scope)))) + ((and symbol ; already defined in this block + (or (= sdt js2-LET) + (= sdt js2-CONST)) + (eq defining-scope js2-current-scope)) (js2-report-error (cond ((= sdt js2-CONST) "msg.const.redecl") @@ -9613,9 +9633,7 @@ If NODE is non-nil, it is the AST node associated with the symbol." (t "msg.parm.redecl")) name pos len)) ((or (= decl-type js2-LET) - ;; strict mode const is scoped to the current LexicalEnvironment - (and js2-in-use-strict-directive - (= decl-type js2-CONST))) + (= decl-type js2-CONST)) (if (and (= decl-type js2-LET) (not ignore-not-in-block) (or (= (js2-node-type js2-current-scope) js2-IF) @@ -9623,10 +9641,7 @@ If NODE is non-nil, it is the AST node associated with the symbol." (js2-report-error "msg.let.decl.not.in.block") (js2-define-new-symbol decl-type name node))) ((or (= decl-type js2-VAR) - (= decl-type js2-FUNCTION) - ;; sloppy mode const is scoped to the current VariableEnvironment - (and (not js2-in-use-strict-directive) - (= decl-type js2-CONST))) + (= decl-type js2-FUNCTION)) (if symbol (if (and js2-strict-var-redeclaration-warning (= sdt js2-VAR)) (js2-add-strict-warning "msg.var.redecl" name) @@ -9902,17 +9917,29 @@ FIXME: The latter option is unused?" (list js2-MUL js2-DIV js2-MOD)) (defun js2-parse-mul-expr () - (let ((pn (js2-parse-unary-expr)) + (let ((pn (js2-parse-expon-expr)) tt (continue t)) (while continue (setq tt (js2-get-token)) (if (memq tt js2-parse-mul-ops) - (setq pn (js2-make-binary tt pn 'js2-parse-unary-expr)) + (setq pn (js2-make-binary tt pn 'js2-parse-expon-expr)) (js2-unget-token) (setq continue nil))) pn)) +(defun js2-parse-expon-expr () + (let ((pn (js2-parse-unary-expr))) + (when (>= js2-language-version 200) + (while (js2-match-token js2-EXPON) + (when (and (js2-unary-node-p pn) + (not (memq (js2-node-type pn) '(js2-INC js2-DEC)))) + (js2-report-error "msg.syntax" nil + (js2-node-abs-pos pn) (js2-node-len pn))) + ;; Make it right-associative. + (setq pn (js2-make-binary js2-EXPON pn 'js2-parse-expon-expr)))) + pn)) + (defun js2-make-unary (type parser &rest args) "Make a unary node of type TYPE. PARSER is either a node (for postfix operators) or a function to call @@ -10732,16 +10759,19 @@ If ONLY-OF-P is non-nil, only the 'for (foo of bar)' form is allowed." `js2-method-node') as a string, or nil if it can't be represented as a string (e.g., the key is computed by an expression)." - (let ((key (js2-infix-node-left property-node))) - (when (js2-computed-prop-name-node-p key) - (setq key (js2-computed-prop-name-node-expr key))) - (cond - ((js2-name-node-p key) - (js2-name-node-name key)) - ((js2-string-node-p key) - (js2-string-node-value key)) - ((js2-number-node-p key) - (js2-number-node-value key))))) + (cond + ((js2-unary-node-p property-node) nil) ;; {...foo} + (t + (let ((key (js2-infix-node-left property-node))) + (when (js2-computed-prop-name-node-p key) + (setq key (js2-computed-prop-name-node-expr key))) + (cond + ((js2-name-node-p key) + (js2-name-node-name key)) + ((js2-string-node-p key) + (js2-string-node-value key)) + ((js2-number-node-p key) + (js2-number-node-value key))))))) (defun js2-parse-object-literal-elems (&optional class-p) (let ((pos (js2-current-token-beg)) @@ -10776,7 +10806,13 @@ expression)." (setq previous-token (js2-current-token) tt (js2-get-prop-name-token)))) (cond - ;; Found a property (of any sort) + ;; Rest/spread (...expr) + ((and (>= js2-language-version 200) + (not class-p) (not static) (not previous-token) + (= js2-TRIPLEDOT tt)) + (setq after-comma nil + elem (js2-make-unary js2-TRIPLEDOT 'js2-parse-assign-expr))) + ;; Found a key/value property (of any sort) ((member tt (list js2-NAME js2-STRING js2-NUMBER js2-LB)) (setq after-comma nil elem (js2-parse-named-prop tt previous-token)) @@ -10857,7 +10893,8 @@ When `js2-is-in-destructuring' is t, forms like {a, b, c} will be permitted." ;; method definition: {f() {...}} ((and (= (js2-peek-token) js2-LP) (>= js2-language-version 200)) - (when (js2-name-node-p key) ; highlight function name properties + (when (or (js2-name-node-p key) (js2-string-node-p key)) + ;; highlight function name properties (js2-record-face 'font-lock-function-name-face)) (js2-parse-method-prop pos key property-type)) ;; binding element with initializer @@ -10972,15 +11009,13 @@ TYPE-STRING is a string `get', `set', `*', or nil, indicating a found keyword." ("async" . ASYNC)))) 'FUNCTION)) result end - (fn (js2-parse-function-expr (eq type 'ASYNC)))) - ;; it has to be an anonymous function, as we already parsed the name - (if (/= (js2-node-type fn) js2-FUNCTION) - (js2-report-error "msg.bad.prop") - (if (cl-plusp (length (js2-function-name fn))) - (js2-report-error "msg.bad.prop"))) + (pos (js2-current-token-beg)) + (_ (js2-must-match js2-LP "msg.no.paren.parms")) + (fn (js2-parse-function 'FUNCTION_EXPRESSION pos + (string= type-string "*") + (eq type 'ASYNC) + nil))) (js2-node-set-prop fn 'METHOD_TYPE type) ; for codegen - (when (string= type-string "*") - (setf (js2-function-node-generator-type fn) 'STAR)) (unless pos (setq pos (js2-node-pos prop))) (setq end (js2-node-end fn) result (make-js2-method-node :pos pos diff --git a/elpa/js2-mode-20160409.1113/js2-old-indent.el b/elpa/js2-mode-20160626.2025/js2-old-indent.el similarity index 99% rename from elpa/js2-mode-20160409.1113/js2-old-indent.el rename to elpa/js2-mode-20160626.2025/js2-old-indent.el index d8932d6..f336005 100644 --- a/elpa/js2-mode-20160409.1113/js2-old-indent.el +++ b/elpa/js2-mode-20160626.2025/js2-old-indent.el @@ -131,7 +131,7 @@ switch statement body are indented one additional level." followed by an opening brace.") (defconst js2-indent-operator-re - (concat "[-+*/%<>&^|?:.]\\([^-+*/]\\|$\\)\\|!?=\\|" + (concat "[-+*/%<>&^|?:.]\\([^-+*/.]\\|$\\)\\|!?=\\|" (regexp-opt '("in" "instanceof") 'symbols)) "Regular expression matching operators that affect indentation of continued expressions.") diff --git a/elpa/json-mode-20151116.2000/json-mode-pkg.el b/elpa/json-mode-20151116.2000/json-mode-pkg.el deleted file mode 100644 index 6e10799..0000000 --- a/elpa/json-mode-20151116.2000/json-mode-pkg.el +++ /dev/null @@ -1 +0,0 @@ -(define-package "json-mode" "20151116.2000" "Major mode for editing JSON files" '((json-reformat "0.0.5") (json-snatcher "1.0.0")) :url "https://github.com/joshwnj/json-mode") diff --git a/elpa/json-mode-20151116.2000/json-mode-autoloads.el b/elpa/json-mode-20160601.356/json-mode-autoloads.el similarity index 89% rename from elpa/json-mode-20151116.2000/json-mode-autoloads.el rename to elpa/json-mode-20160601.356/json-mode-autoloads.el index 6da37e4..8807f67 100644 --- a/elpa/json-mode-20151116.2000/json-mode-autoloads.el +++ b/elpa/json-mode-20160601.356/json-mode-autoloads.el @@ -3,8 +3,8 @@ ;;; Code: (add-to-list 'load-path (or (file-name-directory #$) (car load-path))) -;;;### (autoloads nil "json-mode" "json-mode.el" (22297 19821 80013 -;;;;;; 273000)) +;;;### (autoloads nil "json-mode" "json-mode.el" (22387 29360 294055 +;;;;;; 690000)) ;;; Generated autoloads from json-mode.el (autoload 'json-mode "json-mode" "\ diff --git a/elpa/json-mode-20160601.356/json-mode-pkg.el b/elpa/json-mode-20160601.356/json-mode-pkg.el new file mode 100644 index 0000000..29d99d1 --- /dev/null +++ b/elpa/json-mode-20160601.356/json-mode-pkg.el @@ -0,0 +1 @@ +(define-package "json-mode" "20160601.356" "Major mode for editing JSON files" '((json-reformat "0.0.5") (json-snatcher "1.0.0")) :url "https://github.com/joshwnj/json-mode") diff --git a/elpa/json-mode-20151116.2000/json-mode.el b/elpa/json-mode-20160601.356/json-mode.el similarity index 96% rename from elpa/json-mode-20151116.2000/json-mode.el rename to elpa/json-mode-20160601.356/json-mode.el index 91feee9..ab13bad 100644 --- a/elpa/json-mode-20151116.2000/json-mode.el +++ b/elpa/json-mode-20160601.356/json-mode.el @@ -4,7 +4,7 @@ ;; Author: Josh Johnston ;; URL: https://github.com/joshwnj/json-mode -;; Package-Version: 20151116.2000 +;; Package-Version: 20160601.356 ;; Version: 1.6.0 ;; Package-Requires: ((json-reformat "0.0.5") (json-snatcher "1.0.0")) @@ -92,7 +92,8 @@ (defun json-mode-beautify () "Beautify / pretty-print the active region (or the entire buffer if no active region)." (interactive) - (let ((json-reformat:indent-width js-indent-level)) + (let ((json-reformat:indent-width js-indent-level) + (json-reformat:pretty-string? t)) (if (use-region-p) (json-reformat-region (region-beginning) (region-end)) (json-reformat-region (buffer-end -1) (buffer-end 1))))) diff --git a/elpa/magit-20160425.430/magit.info b/elpa/magit-20160425.430/magit.info deleted file mode 100644 index 75f1f65..0000000 --- a/elpa/magit-20160425.430/magit.info +++ /dev/null @@ -1,166 +0,0 @@ -This is magit.info, produced by makeinfo version 5.2 from magit.texi. - -Magit is an interface to the version control system Git, implemented as -an Emacs package. Magit aspires to be a complete Git porcelain. While -we cannot (yet) claim that Magit wraps and improves upon each and every -Git command, it is complete enough to allow even experienced Git users -to perform almost all of their daily version control tasks directly from -within Emacs. While many fine Git clients exist, only Magit and Git -itself deserve to be called porcelains. - - Copyright (C) 2015-2016 Jonas Bernoulli - - You can redistribute this document 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. - - This document 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. -INFO-DIR-SECTION Emacs -START-INFO-DIR-ENTRY -* Magit: (magit). Using Git from Emacs with Magit. -END-INFO-DIR-ENTRY - - -Indirect: -magit.info-1: 1222 -magit.info-2: 323028 - -Tag Table: -(Indirect) -Node: Top1222 -Node: Introduction6180 -Node: Installation10873 -Node: Updating from an older release11248 -Node: Installing from an Elpa archive12843 -Node: Installing from the Git repository14182 -Node: Post-installation tasks16978 -Node: Getting started18367 -Node: Interface concepts24102 -Node: Modes and Buffers24376 -Node: Switching Buffers26122 -Node: Naming Buffers29186 -Node: Quitting Windows32021 -Node: Automatic Refreshing of Magit Buffers33653 -Node: Automatic Saving of File-Visiting Buffers36421 -Node: Automatic Reverting of File-Visiting Buffers37606 -Node: Risk of Reverting Automatically42602 -Node: Sections44985 -Node: Section movement45926 -Node: Section visibility49853 -Node: Section hooks53444 -Node: Section types and values55725 -Node: Section options56995 -Node: Popup buffers and prefix commands57467 -Node: Completion and confirmation58781 -Node: Running Git61687 -Node: Viewing Git output61923 -Node: Running Git manually62923 -Node: Git executable65049 -Node: Global Git arguments67056 -Node: Inspecting67863 -Node: Status buffer68990 -Node: Status sections71513 -Node: Status header sections76922 -Node: Status options79481 -Node: Logging80205 -Node: Refreshing logs82734 -Node: Log Buffer84119 -Node: Select from log87208 -Node: Reflog88148 -Node: Diffing88626 -Node: Refreshing diffs91438 -Node: Diff buffer94419 -Node: Diff options96321 -Node: Revision buffer98077 -Node: Ediffing99032 -Node: References buffer102490 -Node: References sections107200 -Node: Bisecting108075 -Node: Visiting blobs109571 -Node: Blaming110080 -Node: Manipulating113400 -Node: Repository setup113692 -Node: Staging and unstaging114732 -Node: Staging from file-visiting buffers118627 -Node: Applying119795 -Node: Committing121438 -Node: Initiating a commit122021 -Node: Editing commit messages125333 -Node: Branching135729 -Node: Merging148543 -Node: Rebasing150627 -Node: Editing rebase sequences153575 -Node: Rebase sequence log156609 -Node: Cherry picking163353 -Node: Reverting164959 -Node: Resetting166322 -Node: Stashing167832 -Node: Transferring171006 -Node: Remotes171244 -Node: Fetching172530 -Node: Pulling173896 -Node: Pushing174742 -Node: Creating and sending patches179486 -Node: Applying patches180181 -Node: Miscellaneous181179 -Node: Tagging181470 -Node: Notes182255 -Node: Submodules184780 -Node: Common commands186100 -Node: Wip modes187848 -Node: Minor mode for buffers visiting files194584 -Node: Minor mode for buffers visiting blobs197078 -Node: Customizing197883 -Node: Per-repository configuration199555 -Node: Essential settings201189 -Node: Safety201513 -Node: Performance203346 -Node: Plumbing210806 -Node: Calling Git211434 -Node: Getting a value from Git212957 -Node: Calling Git for effect216061 -Node: Section plumbing222565 -Node: Creating sections222793 -Node: Section selection226692 -Node: Matching sections228372 -Node: Refreshing buffers233574 -Node: Conventions236709 -Node: Confirmation and completion236886 -Node: Theming Faces237784 -Node: FAQ245935 -Node: Magit is slow247494 -Node: I changed several thousand files at once and now Magit is unusable247695 -Node: I am having problems committing248411 -Node: Diffs are collapsed after un-/staging248857 -Node: I don't understand how branching and pushing work250335 -Node: I don't like the key binding in v24250710 -Node: I cannot install the pre-requisites for Magit v2251049 -Node: I am using an Emacs release older than v244251514 -Node: I am using a Git release older than v194253127 -Node: I am using MS Windows and cannot push with Magit254114 -Node: I am using OS X and SOMETHING works in shell but not in Magit254718 -Node: How to install the gitman info manual?255509 -Node: How can I show Git's output?258050 -Node: Diffs contain control sequences258837 -Node: Expanding a file to show the diff causes it to disappear259842 -Node: Point is wrong in the ‘COMMIT_EDITMSG’ buffer260377 -Node: Can Magit be used as ‘ediff-version-control-package’?261415 -Node: How to show diffs for gpg-encrypted files?263459 -Node: Emacs 245 hangs when loading Magit264056 -Node: ‘Symbol's value as function is void --some’264631 -Node: Where is the branch manager264963 -Node: Keystroke Index265254 -Node: Command Index293045 -Node: Function Index323028 -Node: Variable Index335224 - -End Tag Table - - -Local Variables: -coding: utf-8 -End: diff --git a/elpa/magit-20160425.430/magit.info-2 b/elpa/magit-20160425.430/magit.info-2 deleted file mode 100644 index 8c8e2ef..0000000 Binary files a/elpa/magit-20160425.430/magit.info-2 and /dev/null differ diff --git a/elpa/magit-20160425.430/AUTHORS.md b/elpa/magit-20160624.2127/AUTHORS.md similarity index 99% rename from elpa/magit-20160425.430/AUTHORS.md rename to elpa/magit-20160624.2127/AUTHORS.md index 1d345e9..5049582 100644 --- a/elpa/magit-20160425.430/AUTHORS.md +++ b/elpa/magit-20160624.2127/AUTHORS.md @@ -59,6 +59,7 @@ Contributors - Andriy Kmit' - Andy Sawyer - Barak A. Pearlmutter +- Bart Bakker - Bastian Beischer - Ben Walton - Bradley Wright diff --git a/elpa/magit-20160425.430/COPYING b/elpa/magit-20160624.2127/COPYING similarity index 100% rename from elpa/magit-20160425.430/COPYING rename to elpa/magit-20160624.2127/COPYING diff --git a/elpa/magit-20160425.430/dir b/elpa/magit-20160624.2127/dir similarity index 100% rename from elpa/magit-20160425.430/dir rename to elpa/magit-20160624.2127/dir diff --git a/elpa/magit-20160425.430/git-rebase.el b/elpa/magit-20160624.2127/git-rebase.el similarity index 91% rename from elpa/magit-20160425.430/git-rebase.el rename to elpa/magit-20160624.2127/git-rebase.el index ba9e291..9b38b33 100644 --- a/elpa/magit-20160425.430/git-rebase.el +++ b/elpa/magit-20160624.2127/git-rebase.el @@ -206,9 +206,8 @@ (interactive) (git-rebase-set-action "fixup")) -(defconst git-rebase-line - "^\\(#?\\(?:[fprse]\\|pick\\|reword\\|edit\\|squash\\|fixup\\|exec\\)\\) \ -\\(?:\\([^ \n]+\\) \\(.*\\)\\)?") +(defvar-local git-rebase-line nil) +(defvar-local git-rebase-comment-re nil) (defun git-rebase-set-action (action) (goto-char (line-beginning-position)) @@ -299,9 +298,9 @@ current line." (interactive) (goto-char (line-beginning-position)) (when (and (looking-at git-rebase-line) - (not (eq (char-after) ?#))) + (not (eq (char-after) (string-to-char comment-start)))) (let ((inhibit-read-only t)) - (insert ?#)) + (insert comment-start)) (when git-rebase-auto-advance (forward-line)))) @@ -325,7 +324,8 @@ remove the command on the current line, if any." (let ((inhibit-read-only t) initial command) (unless arg (goto-char (line-beginning-position)) - (when (looking-at "^#?\\(e\\|exec\\) \\(.*\\)") + (when (looking-at (concat git-rebase-comment-re "?" + "\\(e\\|exec\\) \\(.*\\)")) (setq initial (match-string-no-properties 2)))) (setq command (read-shell-command "Execute: " initial)) (pcase (list command initial) @@ -377,10 +377,16 @@ Rebase files are generated when you run 'git rebase -i' or run the rebase. See the documentation for git-rebase (e.g., by running 'man git-rebase' at the command line) for details." :group 'git-rebase + (setq comment-start (or (magit-get "core.commentChar") "#")) + (setq git-rebase-comment-re (concat "^" (regexp-quote comment-start))) + (setq git-rebase-line + (concat "^\\(" (regexp-quote comment-start) "?" + "\\(?:[fprse]\\|pick\\|reword\\|edit\\|squash\\|fixup\\|exec\\)\\) " + "\\(?:\\([^ \n]+\\) \\(.*\\)\\)?")) (setq font-lock-defaults '(git-rebase-mode-font-lock-keywords t t)) (unless git-rebase-show-instructions (let ((inhibit-read-only t)) - (flush-lines "^\\($\\|#\\)"))) + (flush-lines git-rebase-comment-re))) (with-editor-mode 1) (when git-rebase-confirm-cancel (add-hook 'with-editor-cancel-query-functions @@ -403,6 +409,12 @@ running 'man git-rebase' at the command line) for details." (--when-let (cdr (assq 'stash with-editor-cancel-alist)) (magit-stash-apply it))) +(defun git-rebase-match-comment-line (limit) + (re-search-forward (concat git-rebase-comment-re ".*") limit t)) + +(defun git-rebase-match-killed-action (limit) + (re-search-forward (concat git-rebase-comment-re "[^ \n].*") limit t)) + (defconst git-rebase-mode-font-lock-keywords `(("^\\([efprs]\\|pick\\|reword\\|edit\\|squash\\|fixup\\) \\([^ \n]+\\) \\(.*\\)" (1 'font-lock-keyword-face) @@ -411,8 +423,8 @@ running 'man git-rebase' at the command line) for details." ("^\\(exec\\) \\(.*\\)" (1 'font-lock-keyword-face) (2 'git-rebase-description)) - ("^#.*" 0 'font-lock-comment-face) - ("^#[^ \n].*" 0 'git-rebase-killed-action t)) + (git-rebase-match-comment-line 0 'font-lock-comment-face) + (git-rebase-match-killed-action 0 'git-rebase-killed-action t)) "Font lock keywords for Git-Rebase mode.") (defun git-rebase-mode-show-keybindings () @@ -424,12 +436,17 @@ By default, this is the same except for the \"pick\" command." (save-excursion (goto-char (point-min)) (when (and git-rebase-show-instructions - (re-search-forward "^# Commands:\n" nil t)) + (re-search-forward + (concat git-rebase-comment-re " Commands:\n") + nil t)) (--each git-rebase-command-descriptions - (insert (format "# %-8s %s\n" + (insert (format "%s %-8s %s\n" + comment-start (substitute-command-keys (format "\\[%s]" (car it))) (cdr it)))) - (while (re-search-forward "^#\\( ?\\)\\([^,],\\) \\([^ ]+\\) = " nil t) + (while (re-search-forward (concat git-rebase-comment-re + "\\( ?\\)\\([^,],\\) \\([^ ]+\\) = ") + nil t) (let ((cmd (intern (concat "git-rebase-" (match-string 3))))) (if (not (fboundp cmd)) (delete-region (line-beginning-position) (1+ (line-end-position))) diff --git a/elpa/magit-20160425.430/magit-apply.el b/elpa/magit-20160624.2127/magit-apply.el similarity index 90% rename from elpa/magit-20160425.430/magit-apply.el rename to elpa/magit-20160624.2127/magit-apply.el index d1770ad..ea8e341 100644 --- a/elpa/magit-20160425.430/magit-apply.el +++ b/elpa/magit-20160624.2127/magit-apply.el @@ -40,6 +40,9 @@ (declare-function magit-checkout-stage 'magit) (declare-function magit-checkout-read-stage 'magit) (defvar auto-revert-verbose) +;; For `magit-stage-untracked' +(declare-function magit-submodule-add 'magit-submodule) +(declare-function magit-submodule-read-name 'magit-submodule) (require 'dired) @@ -67,12 +70,25 @@ information see command `magit-reverse-in-index'." :group 'magit-commands :type 'boolean) +(defcustom magit-reverse-atomically nil + "Whether to reverse changes atomically. + +If some changes can be reversed while others cannot, then nothing +is reversed if the value of this option is non-nil. But when it +is nil, then the changes that can be reversed are reversed and +for the other changes diff files are created that contain the +rejected reversals." + :package-version '(magit . "2.7.0") + :group 'magit-commands + :type 'boolean) + ;;; Commands ;;;; Apply (defun magit-apply (&rest args) - "Apply the change at point. -With a prefix argument and if necessary, attempt a 3-way merge." + "Apply the change at point to the working tree. +With a prefix argument fallback to a 3-way merge. Doing +so causes the change to be applied to the index as well." (interactive (and current-prefix-arg (list "--3way"))) (--when-let (magit-apply--get-selection) (pcase (list (magit-diff-type) (magit-diff-scope)) @@ -175,12 +191,14 @@ With a prefix argument and if necessary, attempt a 3-way merge." ;;;; Stage -(defun magit-stage () - "Add the change at point to the staging area." - (interactive) +(defun magit-stage (&optional intent) + "Add the change at point to the staging area. +With a prefix argument, INTENT, and an untracked file (or files) +at point, stage the file but not its content." + (interactive "P") (--when-let (magit-apply--get-selection) (pcase (list (magit-diff-type) (magit-diff-scope)) - (`(untracked ,_) (magit-stage-untracked)) + (`(untracked ,_) (magit-stage-untracked intent)) (`(unstaged region) (magit-apply-region it "--cached")) (`(unstaged hunk) (magit-apply-hunk it "--cached")) (`(unstaged hunks) (magit-apply-hunks it "--cached")) @@ -232,7 +250,7 @@ ignored) files. (mapc #'magit-turn-on-auto-revert-mode-if-desired files)) (magit-wip-commit-after-apply files " after stage")) -(defun magit-stage-untracked () +(defun magit-stage-untracked (&optional intent) (let* ((section (magit-current-section)) (files (pcase (magit-diff-scope) (`file (list (magit-section-value section))) @@ -245,7 +263,8 @@ ignored) files. (push file plain))) (magit-wip-commit-before-change files " before stage") (when plain - (magit-run-git "add" "--" plain) + (magit-run-git "add" (and intent "--intent-to-add") + "--" plain) (when magit-auto-revert-mode (mapc #'magit-turn-on-auto-revert-mode-if-desired plain))) (dolist (repo repos) @@ -253,7 +272,12 @@ ignored) files. (goto-char (magit-section-start (magit-get-section `((file . ,repo) (untracked) (status))))) - (call-interactively 'magit-submodule-add))) + (magit-submodule-add + (let ((default-directory + (file-name-as-directory (expand-file-name repo)))) + (magit-get "remote" (or (magit-get-remote) "origin") "url")) + repo + (magit-submodule-read-name repo)))) (magit-wip-commit-after-apply files " after stage"))) ;;;; Unstage @@ -345,7 +369,7 @@ without requiring confirmation." (magit-section-parent-value section))) (progn (let ((inhibit-magit-refresh t)) (funcall apply section "--reverse" "--cached") - (funcall apply section "--reverse")) + (funcall apply section "--reverse" "--reject")) (magit-refresh)) (funcall apply section "--reverse" "--index")))) @@ -366,7 +390,7 @@ without requiring confirmation." (magit-section-parent-value section))) (progn (let ((inhibit-magit-refresh t)) (funcall apply sections "--reverse" "--cached") - (funcall apply sections "--reverse")) + (funcall apply sections "--reverse" "--reject")) (magit-refresh)) (funcall apply sections "--reverse" "--index"))))) @@ -472,9 +496,10 @@ without requiring confirmation." (setq sections (--filter (not (member (magit-section-value it) binaries)) sections))) - (if (= (length sections) 1) - (magit-discard-apply (car sections) 'magit-apply-diff) - (magit-discard-apply-n sections 'magit-apply-diffs)) + (cond ((= (length sections) 1) + (magit-discard-apply (car sections) 'magit-apply-diff)) + (sections + (magit-discard-apply-n sections 'magit-apply-diffs))) (when binaries (let ((modified (magit-modified-files t))) (setq binaries (--separate (member it modified) binaries))) @@ -489,7 +514,9 @@ without requiring confirmation." ;;;; Reverse (defun magit-reverse (&rest args) - "Reverse the change at point in the working tree." + "Reverse the change at point in the working tree. +With a prefix argument fallback to a 3-way merge. Doing +so causes the change to be applied to the index as well." (interactive (and current-prefix-arg (list "--3way"))) (--when-let (magit-apply--get-selection) (pcase (list (magit-diff-type) (magit-diff-scope)) @@ -504,18 +531,18 @@ without requiring confirmation." (defun magit-reverse-region (section args) (when (magit-confirm 'reverse "Reverse region") - (apply 'magit-apply-region section "--reverse" args))) + (magit-reverse-apply section 'magit-apply-region args))) (defun magit-reverse-hunk (section args) (when (magit-confirm 'reverse "Reverse hunk") - (apply 'magit-apply-hunk section "--reverse" args))) + (magit-reverse-apply section 'magit-apply-hunk args))) (defun magit-reverse-hunks (sections args) (when (magit-confirm 'reverse (format "Reverse %s hunks from %s" (length sections) (magit-section-parent-value (car sections)))) - (magit-apply-hunks sections "--reverse" args))) + (magit-reverse-apply sections 'magit-apply-hunks args))) (defun magit-reverse-file (section args) (magit-reverse-files (list section) args)) @@ -526,11 +553,17 @@ without requiring confirmation." (--separate (member (magit-section-value it) bs) sections))] (when (magit-confirm-files 'reverse (mapcar #'magit-section-value sections)) (if (= (length sections) 1) - (magit-apply-diff (car sections) "--reverse" args) - (magit-apply-diffs sections "--reverse" args))) + (magit-reverse-apply (car sections) 'magit-apply-diff args) + (magit-reverse-apply sections 'magit-apply-diffs args))) (when binaries (user-error "Cannot reverse binary files")))) +(defun magit-reverse-apply (section:s apply args) + (funcall apply section:s "--reverse" args + (and (not magit-reverse-atomically) + (not (member "--3way" args)) + "--reject"))) + (defun magit-reverse-in-index (&rest args) "Reverse the change at point in the index but not the working tree. diff --git a/elpa/magit-20160425.430/magit-autoloads.el b/elpa/magit-20160624.2127/magit-autoloads.el similarity index 92% rename from elpa/magit-20160425.430/magit-autoloads.el rename to elpa/magit-20160624.2127/magit-autoloads.el index 5b1c309..8e88270 100644 --- a/elpa/magit-20160425.430/magit-autoloads.el +++ b/elpa/magit-20160624.2127/magit-autoloads.el @@ -3,8 +3,8 @@ ;;; Code: (add-to-list 'load-path (or (file-name-directory #$) (car load-path))) -;;;### (autoloads nil "git-rebase" "git-rebase.el" (22303 19282 518177 -;;;;;; 224000)) +;;;### (autoloads nil "git-rebase" "git-rebase.el" (22387 29359 694521 +;;;;;; 736000)) ;;; Generated autoloads from git-rebase.el (autoload 'git-rebase-mode "git-rebase" "\ @@ -23,7 +23,7 @@ running 'man git-rebase' at the command line) for details. ;;;*** -;;;### (autoloads nil "magit" "magit.el" (22303 19282 578177 178000)) +;;;### (autoloads nil "magit" "magit.el" (22387 29359 782453 339000)) ;;; Generated autoloads from magit.el (autoload 'magit-status "magit" "\ @@ -124,6 +124,13 @@ Create and checkout BRANCH at branch or revision START-POINT. \(fn BRANCH START-POINT &optional ARGS)" t nil) +(autoload 'magit-branch-orphan "magit" "\ +Create and checkout an orphan BRANCH with contents from revision START-POINT. + +\(git checkout --orphan [ARGS] BRANCH START-POINT). + +\(fn BRANCH START-POINT &optional ARGS)" t nil) + (autoload 'magit-branch-spinoff "magit" "\ Create new branch from the unpushed commits. @@ -176,6 +183,11 @@ With prefix, forces the rename even if NEW already exists. \(fn OLD NEW &optional FORCE)" t nil) +(autoload 'magit-branch-config-popup "magit" "\ +Popup console for setting branch variables. + +\(fn BRANCH)" t nil) + (autoload 'magit-edit-branch*description "magit" "\ Edit the description of the current branch. With a prefix argument edit the description of another branch. @@ -378,6 +390,16 @@ Reset the head, index, and working tree to COMMIT. \(git reset --hard REVISION) \(fn COMMIT)" t nil) + +(autoload 'magit-worktree-checkout "magit" "\ + + +\(fn PATH BRANCH)" t nil) + +(autoload 'magit-worktree-branch "magit" "\ +Create a new BRANCH and check it out in a new worktree at PATH. + +\(fn PATH BRANCH START-POINT &optional FORCE)" t nil) (autoload 'magit-tag-popup "magit" nil t) (autoload 'magit-tag "magit" "\ @@ -449,6 +471,15 @@ Run the command in the top-level directory of the current repository. \(fn)" t nil) +(autoload 'magit-list-repositories "magit" "\ +Display a list of repositories. + +Use the options `magit-repository-directories' +and `magit-repository-directories-depth' to +control which repositories are displayed. + +\(fn)" t nil) + (autoload 'magit-version "magit" "\ Return the version of Magit currently in use. When called interactive also show the used versions of Magit, @@ -458,8 +489,8 @@ Git, and Emacs in the echo area. ;;;*** -;;;### (autoloads nil "magit-apply" "magit-apply.el" (22303 19282 -;;;;;; 530177 215000)) +;;;### (autoloads nil "magit-apply" "magit-apply.el" (22387 29359 +;;;;;; 714506 191000)) ;;; Generated autoloads from magit-apply.el (autoload 'magit-stage-file "magit-apply" "\ @@ -495,8 +526,8 @@ Remove all changes from the staging area. ;;;*** -;;;### (autoloads nil "magit-autorevert" "magit-autorevert.el" (22303 -;;;;;; 19282 474177 259000)) +;;;### (autoloads nil "magit-autorevert" "magit-autorevert.el" (22387 +;;;;;; 29359 654552 825000)) ;;; Generated autoloads from magit-autorevert.el (defvar magit-revert-buffers t) @@ -524,8 +555,8 @@ See `auto-revert-mode' for more information on Auto-Revert mode. ;;;*** -;;;### (autoloads nil "magit-bisect" "magit-bisect.el" (22303 19282 -;;;;;; 526177 218000)) +;;;### (autoloads nil "magit-bisect" "magit-bisect.el" (22387 29359 +;;;;;; 710509 300000)) ;;; Generated autoloads from magit-bisect.el (autoload 'magit-bisect-popup "magit-bisect" nil t) @@ -576,8 +607,8 @@ bisect run'. ;;;*** -;;;### (autoloads nil "magit-blame" "magit-blame.el" (22303 19282 -;;;;;; 566177 187000)) +;;;### (autoloads nil "magit-blame" "magit-blame.el" (22387 29359 +;;;;;; 762468 884000)) ;;; Generated autoloads from magit-blame.el (autoload 'magit-blame-popup "magit-blame" nil t) @@ -601,8 +632,8 @@ only arguments available from `magit-blame-popup' should be used. ;;;*** -;;;### (autoloads nil "magit-commit" "magit-commit.el" (22303 19282 -;;;;;; 482177 252000)) +;;;### (autoloads nil "magit-commit" "magit-commit.el" (22387 29359 +;;;;;; 662546 607000)) ;;; Generated autoloads from magit-commit.el (autoload 'magit-commit "magit-commit" "\ @@ -684,10 +715,24 @@ Create a squash commit targeting COMMIT and instantly rebase. ;;;*** -;;;### (autoloads nil "magit-diff" "magit-diff.el" (22303 19282 562177 -;;;;;; 190000)) +;;;### (autoloads nil "magit-diff" "magit-diff.el" (22387 29359 754475 +;;;;;; 101000)) ;;; Generated autoloads from magit-diff.el +(autoload 'magit-diff-popup "magit-diff" "\ +Popup console for diff commands. + +\(fn ARG)" t nil) + +(autoload 'magit-diff-buffer-file-popup "magit-diff" "\ +Popup console for diff commands. + +This is a variant of `magit-diff-popup' which shows the same popup +but which limits the diff to the file being visited in the current +buffer. + +\(fn)" t nil) + (autoload 'magit-diff-dwim "magit-diff" "\ Show changes for the thing at point. @@ -736,6 +781,11 @@ be committed. \(fn &optional ARGS FILES)" t nil) +(autoload 'magit-diff-buffer-file "magit-diff" "\ +Show diff for the blob or file visited in the current buffer. + +\(fn)" t nil) + (autoload 'magit-diff-paths "magit-diff" "\ Show changes between any two files on disk. @@ -750,8 +800,8 @@ for a revision. ;;;*** -;;;### (autoloads nil "magit-ediff" "magit-ediff.el" (22303 19282 -;;;;;; 554177 196000)) +;;;### (autoloads nil "magit-ediff" "magit-ediff.el" (22387 29359 +;;;;;; 746481 319000)) ;;; Generated autoloads from magit-ediff.el (autoload 'magit-ediff-popup "magit-ediff" nil t) @@ -839,8 +889,8 @@ stash that were staged. ;;;*** -;;;### (autoloads nil "magit-extras" "magit-extras.el" (22303 19282 -;;;;;; 490177 246000)) +;;;### (autoloads nil "magit-extras" "magit-extras.el" (22387 29359 +;;;;;; 666543 498000)) ;;; Generated autoloads from magit-extras.el (autoload 'magit-run-git-gui "magit-extras" "\ @@ -910,10 +960,19 @@ on a position in a file-visiting buffer. ;;;*** -;;;### (autoloads nil "magit-log" "magit-log.el" (22303 19282 558177 -;;;;;; 193000)) +;;;### (autoloads nil "magit-log" "magit-log.el" (22387 29359 750478 +;;;;;; 210000)) ;;; Generated autoloads from magit-log.el +(autoload 'magit-log-buffer-file-popup "magit-log" "\ +Popup console for log commands. + +This is a variant of `magit-log-popup' which shows the same popup +but which limits the log to the file being visited in the current +buffer. + +\(fn)" t nil) + (autoload 'magit-log-current "magit-log" "\ Show log for the current branch. When `HEAD' is detached or with a prefix argument show log for @@ -979,8 +1038,8 @@ Show commits in a branch that are not merged in the upstream branch. ;;;*** -;;;### (autoloads nil "magit-remote" "magit-remote.el" (22303 19282 -;;;;;; 594177 165000)) +;;;### (autoloads nil "magit-remote" "magit-remote.el" (22387 29359 +;;;;;; 798440 903000)) ;;; Generated autoloads from magit-remote.el (autoload 'magit-clone "magit-remote" "\ @@ -1212,8 +1271,8 @@ is asked to pull. START has to be reachable from that commit. ;;;*** -;;;### (autoloads nil "magit-sequence" "magit-sequence.el" (22303 -;;;;;; 19282 586177 172000)) +;;;### (autoloads nil "magit-sequence" "magit-sequence.el" (22387 +;;;;;; 29359 786450 230000)) ;;; Generated autoloads from magit-sequence.el (autoload 'magit-sequencer-continue "magit-sequence" "\ @@ -1341,8 +1400,10 @@ Reword a single older commit using rebase. (autoload 'magit-rebase-continue "magit-sequence" "\ Restart the current rebasing operation. +In some cases this pops up a commit message buffer for you do +edit. With a prefix argument the old message is reused as-is. -\(fn)" t nil) +\(fn &optional NOEDIT)" t nil) (autoload 'magit-rebase-skip "magit-sequence" "\ Skip the current commit and restart the current rebase operation. @@ -1361,8 +1422,8 @@ Abort the current rebase operation, restoring the original branch. ;;;*** -;;;### (autoloads nil "magit-stash" "magit-stash.el" (22303 19282 -;;;;;; 546177 202000)) +;;;### (autoloads nil "magit-stash" "magit-stash.el" (22387 29359 +;;;;;; 734490 646000)) ;;; Generated autoloads from magit-stash.el (autoload 'magit-stash-popup "magit-stash" nil t) @@ -1461,8 +1522,8 @@ Show all diffs of a stash in a buffer. ;;;*** -;;;### (autoloads nil "magit-submodule" "magit-submodule.el" (22303 -;;;;;; 19282 606177 156000)) +;;;### (autoloads nil "magit-submodule" "magit-submodule.el" (22387 +;;;;;; 29359 818425 358000)) ;;; Generated autoloads from magit-submodule.el (autoload 'magit-submodule-popup "magit-submodule" nil t) @@ -1478,6 +1539,11 @@ PATH also becomes the name. \(fn URL &optional PATH NAME)" t nil) +(autoload 'magit-submodule-read-name "magit-submodule" "\ + + +\(fn PATH)" nil nil) + (autoload 'magit-submodule-setup "magit-submodule" "\ Clone and register missing submodules and checkout appropriate commits. @@ -1542,8 +1608,45 @@ These sections can be expanded to show the respective commits. ;;;*** -;;;### (autoloads nil "magit-wip" "magit-wip.el" (22303 19282 502177 -;;;;;; 236000)) +;;;### (autoloads nil "magit-subtree" "magit-subtree.el" (22387 29359 +;;;;;; 702515 518000)) +;;; Generated autoloads from magit-subtree.el + (autoload 'magit-subtree-popup "magit-subtree" nil t) + +(autoload 'magit-subtree-add "magit-subtree" "\ +Add COMMIT from REPOSITORY as a new subtree at PREFIX. + +\(fn PREFIX REPOSITORY COMMIT ARGS)" t nil) + +(autoload 'magit-subtree-add-commit "magit-subtree" "\ +Add COMMIT as a new subtree at PREFIX. + +\(fn PREFIX COMMIT ARGS)" t nil) + +(autoload 'magit-subtree-merge "magit-subtree" "\ +Merge COMMIT into the PREFIX subtree. + +\(fn PREFIX COMMIT ARGS)" t nil) + +(autoload 'magit-subtree-pull "magit-subtree" "\ +Pull COMMIT from REPOSITORY into the PREFIX subtree. + +\(fn PREFIX REPOSITORY COMMIT ARGS)" t nil) + +(autoload 'magit-subtree-push "magit-subtree" "\ +Extract the history of the subtree PREFIX and push it to REF on REPOSITORY. + +\(fn PREFIX REPOSITORY REF ARGS)" t nil) + +(autoload 'magit-subtree-split "magit-subtree" "\ +Extract the history of the subtree PREFIX. + +\(fn PREFIX COMMIT ARGS)" t nil) + +;;;*** + +;;;### (autoloads nil "magit-wip" "magit-wip.el" (22387 29359 674537 +;;;;;; 281000)) ;;; Generated autoloads from magit-wip.el (defvar magit-wip-after-save-mode nil "\ @@ -1610,7 +1713,7 @@ command which is about to be called are committed. ;;;### (autoloads nil nil ("magit-core.el" "magit-git.el" "magit-mode.el" ;;;;;; "magit-pkg.el" "magit-process.el" "magit-section.el" "magit-utils.el") -;;;;;; (22303 19282 617769 719000)) +;;;;;; (22387 29359 834918 545000)) ;;;*** diff --git a/elpa/magit-20160425.430/magit-autorevert.el b/elpa/magit-20160624.2127/magit-autorevert.el similarity index 99% rename from elpa/magit-20160425.430/magit-autorevert.el rename to elpa/magit-20160624.2127/magit-autorevert.el index 5c4b16f..5a3027c 100644 --- a/elpa/magit-20160425.430/magit-autorevert.el +++ b/elpa/magit-20160624.2127/magit-autorevert.el @@ -147,9 +147,9 @@ and code surrounding the definition of this function." ;; had been established, so consult the value of both variables. (if (and magit-auto-revert-mode magit-revert-buffers) (let ((start (current-time))) - (message "Turning on magit-auto-revert-mode...") + (magit-message "Turning on magit-auto-revert-mode...") (magit-auto-revert-mode 1) - (message + (magit-message "Turning on magit-auto-revert-mode...done%s" (let ((elapsed (float-time (time-subtract (current-time) start)))) (if (> elapsed 0.2) diff --git a/elpa/magit-20160425.430/magit-bisect.el b/elpa/magit-20160624.2127/magit-bisect.el similarity index 89% rename from elpa/magit-20160425.430/magit-bisect.el rename to elpa/magit-20160624.2127/magit-bisect.el index 3956a97..41f8d91 100644 --- a/elpa/magit-20160425.430/magit-bisect.el +++ b/elpa/magit-20160624.2127/magit-bisect.el @@ -135,18 +135,20 @@ bisect run'." (defun magit-insert-bisect-output () "While bisecting, insert section with output from `git bisect'." (when (magit-bisect-in-progress-p) - (let ((lines - (or (magit-file-lines (magit-git-dir "BISECT_CMD_OUTPUT")) - (list "Bisecting: (no saved bisect output)" - "It appears you have invoked `git bisect' from a shell." - "There is nothing wrong with that, we just cannot display" - "anything useful here. Consult the shell output instead."))) - (done-re "^[a-z0-9]\\{40\\} is the first bad commit$")) - (magit-insert-section (bisect-output t) + (let* ((lines + (or (magit-file-lines (magit-git-dir "BISECT_CMD_OUTPUT")) + (list "Bisecting: (no saved bisect output)" + "It appears you have invoked `git bisect' from a shell." + "There is nothing wrong with that, we just cannot display" + "anything useful here. Consult the shell output instead."))) + (done-re "^\\([a-z0-9]\\{40\\}\\) is the first bad commit$") + (bad-line (or (and (string-match done-re (car lines)) + (pop lines)) + (--first (string-match done-re it) lines)))) + (magit-insert-section ((eval (if bad-line 'commit 'bisect-output)) + (and bad-line (match-string 1 bad-line))) (magit-insert-heading - (propertize (or (and (string-match done-re (car lines)) (pop lines)) - (--first (string-match done-re it) lines) - (pop lines)) + (propertize (or bad-line (pop lines)) 'face 'magit-section-heading)) (dolist (line lines) (insert line "\n")))) diff --git a/elpa/magit-20160425.430/magit-blame.el b/elpa/magit-20160624.2127/magit-blame.el similarity index 99% rename from elpa/magit-20160425.430/magit-blame.el rename to elpa/magit-20160624.2127/magit-blame.el index 4af7bb7..cd08a70 100644 --- a/elpa/magit-20160425.430/magit-blame.el +++ b/elpa/magit-20160624.2127/magit-blame.el @@ -486,7 +486,9 @@ then also kill the buffer." (defun magit-blame-copy-hash () "Save hash of the current chunk's commit to the kill ring." (interactive) - (kill-new (message "%s" (magit-blame-chunk-get :hash)))) + (if (use-region-p) + (copy-region-as-kill nil nil 'region) + (kill-new (message "%s" (magit-blame-chunk-get :hash))))) (defun magit-blame-chunk-get (key &optional pos) (--when-let (magit-blame-overlay-at pos) diff --git a/elpa/magit-20160425.430/magit-commit.el b/elpa/magit-20160624.2127/magit-commit.el similarity index 95% rename from elpa/magit-20160425.430/magit-commit.el rename to elpa/magit-20160624.2127/magit-commit.el index 3119aa7..255eb2d 100644 --- a/elpa/magit-20160425.430/magit-commit.el +++ b/elpa/magit-20160624.2127/magit-commit.el @@ -300,19 +300,24 @@ depending on the value of option `magit-commit-squash-confirm'." (user-error "Nothing staged")))) (defun magit-commit-diff () - (--when-let (and git-commit-mode - magit-commit-show-diff - (pcase last-command - (`magit-commit - (apply-partially 'magit-diff-staged nil)) - (`magit-commit-amend 'magit-diff-while-amending) - (`magit-commit-reword 'magit-diff-while-amending))) + (-when-let (fn (and git-commit-mode + magit-commit-show-diff + (pcase last-command + (`magit-commit + (apply-partially 'magit-diff-staged nil)) + (`magit-commit-amend 'magit-diff-while-amending) + (`magit-commit-reword 'magit-diff-while-amending)))) + (-when-let (diff-buffer (magit-mode-get-buffer 'magit-diff-mode)) + ;; This window just started displaying the commit message + ;; buffer. Without this that buffer would immediately be + ;; replaced with the diff buffer. See #2632. + (unrecord-window-buffer nil diff-buffer)) (condition-case nil (let ((magit-inhibit-save-previous-winconf 'unset) (magit-display-buffer-noselect t) (inhibit-quit nil)) (message "Diffing changes to be committed (C-g to abort diffing)") - (funcall it (car (magit-diff-arguments)))) + (funcall fn (car (magit-diff-arguments)))) (quit)))) ;; Mention `magit-diff-while-committing' because that's diff --git a/elpa/magit-20160425.430/magit-core.el b/elpa/magit-20160624.2127/magit-core.el similarity index 100% rename from elpa/magit-20160425.430/magit-core.el rename to elpa/magit-20160624.2127/magit-core.el diff --git a/elpa/magit-20160425.430/magit-diff.el b/elpa/magit-20160624.2127/magit-diff.el similarity index 97% rename from elpa/magit-20160425.430/magit-diff.el rename to elpa/magit-20160624.2127/magit-diff.el index 5c55844..a2749aa 100644 --- a/elpa/magit-20160425.430/magit-diff.el +++ b/elpa/magit-20160624.2127/magit-diff.el @@ -171,6 +171,15 @@ many spaces. Otherwise, highlight neither." :group 'magit-diff :type 'boolean) +;;;; File Diff + +(defcustom magit-diff-buffer-file-locked t + "Whether `magit-diff-buffer-file' uses a decicated buffer." + :package-version '(magit . "2.7.0") + :group 'magit-commands + :group 'magit-diff + :type 'boolean) + ;;;; Revision Mode (defgroup magit-revision nil @@ -547,6 +556,7 @@ and https://debbugs.gnu.org/cgi/bugreport.cgi?bug=7847." (nth 3 magit-refresh-args))) (list (default-value 'magit-diff-arguments) nil))))) +;;;###autoload (defun magit-diff-popup (arg) "Popup console for diff commands." (interactive "P") @@ -563,22 +573,23 @@ and https://debbugs.gnu.org/cgi/bugreport.cgi?bug=7847." (default-value 'magit-diff-arguments)))) (magit-invoke-popup 'magit-diff-popup nil arg))) -(defun magit-diff-buffer-file-popup (arg) - "Popup console for diff commans. +;;;###autoload +(defun magit-diff-buffer-file-popup () + "Popup console for diff commands. This is a variant of `magit-diff-popup' which shows the same popup but which limits the diff to the file being visited in the current buffer." - (interactive "P") + (interactive) (-if-let (file (magit-file-relative-name)) (let ((magit-diff-arguments (magit-popup-import-file-args (-if-let (buffer (magit-mode-get-buffer 'magit-diff-mode)) (with-current-buffer buffer - (nth 2 magit-refresh-args)) + (nth 3 magit-refresh-args)) (default-value 'magit-diff-arguments)) (list file)))) - (magit-invoke-popup 'magit-diff-popup nil arg)) + (magit-invoke-popup 'magit-diff-popup nil nil)) (user-error "Buffer isn't visiting a file"))) (defun magit-diff-refresh-popup (arg) @@ -776,6 +787,22 @@ be committed." (defun magit-diff-while-amending (&optional args files) (magit-diff-setup "HEAD^" (list "--cached") args files)) +;;;###autoload +(defun magit-diff-buffer-file () + "Show diff for the blob or file visited in the current buffer." + (interactive) + (require 'magit) + (-if-let (file (magit-file-relative-name)) + (magit-mode-setup-internal #'magit-diff-mode + (list (or magit-buffer-refname + (magit-get-current-branch) + "HEAD") + nil + (cadr (magit-diff-arguments)) + (list file)) + magit-diff-buffer-file-locked) + (user-error "Buffer isn't visiting a file"))) + ;;;###autoload (defun magit-diff-paths (a b) "Show changes between any two files on disk." @@ -964,6 +991,15 @@ which, as the name suggests always visits the actual file." (rev (cond (force-worktree nil) ((derived-mode-p 'magit-revision-mode) (car magit-refresh-args)) + ((derived-mode-p 'magit-stash-mode) + (magit-section-case + (file (-> it + magit-section-parent + magit-section-value)) + (hunk (-> it + magit-section-parent + magit-section-parent + magit-section-value)))) ((derived-mode-p 'magit-diff-mode) (--when-let (car magit-refresh-args) (and (string-match "\\.\\.\\([^.].*\\)?[ \t]*\\'" it) @@ -1109,7 +1145,8 @@ commit or stash at point, then prompt for a commit." ((derived-mode-p 'git-rebase-mode) (save-excursion (goto-char (line-beginning-position)) - (--if-let (and (looking-at git-rebase-line) + (--if-let (and git-rebase-line + (looking-at git-rebase-line) (match-string 2)) (setq rev it cmd 'magit-show-commit @@ -1124,15 +1161,12 @@ commit or stash at point, then prompt for a commit." (stash (setq rev (magit-section-value it) cmd 'magit-stash-show - buf (magit-mode-get-buffer 'magit-diff-mode)))))) + buf (magit-mode-get-buffer 'magit-stash-mode)))))) (if rev (if (and buf (setq win (get-buffer-window buf)) (with-current-buffer buf - (equal (if (eq cmd 'magit-stash-show) - (concat rev "^2^.." rev) - rev) - (car magit-refresh-args)))) + (equal rev (car magit-refresh-args)))) (with-selected-window win (condition-case nil (funcall fn) @@ -1591,6 +1625,9 @@ or a ref which is not a branch, then it inserts nothing." (progn (backward-delete-char 2) (insert "(no message)\n")) (goto-char beg) + (while (search-forward "\r\n" nil t) ; Remove trailing CRs. + (delete-region (match-beginning 0) (1+ (match-beginning 0)))) + (goto-char beg) (forward-line) (put-text-property beg (point) 'face 'magit-section-secondary-heading) (magit-insert-heading) diff --git a/elpa/magit-20160425.430/magit-ediff.el b/elpa/magit-20160624.2127/magit-ediff.el similarity index 100% rename from elpa/magit-20160425.430/magit-ediff.el rename to elpa/magit-20160624.2127/magit-ediff.el diff --git a/elpa/magit-20160425.430/magit-extras.el b/elpa/magit-20160624.2127/magit-extras.el similarity index 100% rename from elpa/magit-20160425.430/magit-extras.el rename to elpa/magit-20160624.2127/magit-extras.el diff --git a/elpa/magit-20160425.430/magit-git.el b/elpa/magit-20160624.2127/magit-git.el similarity index 97% rename from elpa/magit-20160425.430/magit-git.el rename to elpa/magit-20160624.2127/magit-git.el index 37cfa10..548dc0b 100644 --- a/elpa/magit-20160425.430/magit-git.el +++ b/elpa/magit-20160624.2127/magit-git.el @@ -187,7 +187,7 @@ change the upstream and many which create new branches." (defvar magit--refresh-cache nil) (defmacro magit--with-refresh-cache (key &rest body) - (declare (indent 1)) + (declare (indent 1) (debug (form body))) (let ((k (cl-gensym))) `(if magit--refresh-cache (let ((,k ,key)) @@ -1029,6 +1029,31 @@ where COMMITS is the number of commits in TAG but not in REV." (list (match-string 1 it))) (magit-git-items "ls-files" "-z" "--stage"))) +(defun magit-list-worktrees () + (let (worktrees worktree) + (dolist (line (let ((magit-git-standard-options + ;; KLUDGE At least in v2.8.3 this triggers a segfault. + (remove "--no-pager" magit-git-standard-options))) + (magit-git-lines "worktree" "list" "--porcelain"))) + (cond ((string-prefix-p "worktree" line) + (push (setq worktree (list (substring line 9) nil nil nil)) + worktrees)) + ((string-equal line "bare") + (let* ((default-directory (car worktree)) + (wt (and (not (magit-get-boolean "core.bare")) + (magit-get "core.worktree")))) + (if (and wt (file-exists-p (expand-file-name wt))) + (progn (setf (nth 0 worktree) (expand-file-name wt)) + (setf (nth 2 worktree) (magit-rev-parse "HEAD")) + (setf (nth 3 worktree) (magit-get-current-branch))) + (setf (nth 1 worktree) t)))) + ((string-prefix-p "HEAD" line) + (setf (nth 2 worktree) (substring line 5))) + ((string-prefix-p "branch" line) + (setf (nth 3 worktree) (substring line 18))) + ((string-equal line "detached")))) + (nreverse worktrees))) + (defun magit-ref-p (rev) (or (car (member rev (magit-list-refs))) (car (member rev (magit-list-refnames))))) @@ -1162,7 +1187,7 @@ Return a list of two integers: (A>B B>A)." (declare (indent 2) (debug (form form body))) (let ((file (cl-gensym "file"))) `(let ((,file (magit-convert-git-filename - (magit-git-dir (make-temp-name "index.magit."))))) + (make-temp-name (magit-git-dir "index.magit."))))) (setq ,file (or (file-remote-p ,file 'localname) ,file)) (unwind-protect (progn (--when-let ,tree @@ -1416,9 +1441,14 @@ Return a list of two integers: (A>B B>A)." (defun magit-set (val &rest keys) "Set Git config settings specified by KEYS to VAL." - (if val - (magit-git-string "config" (mapconcat 'identity keys ".") val) - (magit-git-string "config" "--unset" (mapconcat 'identity keys ".")))) + (let ((key (mapconcat 'identity keys "."))) + (if val + (magit-git-success "config" key val) + (magit-git-success "config" "--unset" key)) + val)) + +(gv-define-setter magit-get (val &rest keys) + `(magit-set ,val ,@keys)) ;;; magit-git.el ends soon diff --git a/elpa/magit-20160425.430/magit-log.el b/elpa/magit-20160624.2127/magit-log.el similarity index 97% rename from elpa/magit-20160425.430/magit-log.el rename to elpa/magit-20160624.2127/magit-log.el index 8c68ef7..6d1fc91 100644 --- a/elpa/magit-20160425.430/magit-log.el +++ b/elpa/magit-20160624.2127/magit-log.el @@ -172,6 +172,15 @@ This is useful if you use really long branch names." "Face for the date part of the log output." :group 'magit-faces) +;;;; File Log + +(defcustom magit-log-buffer-file-locked t + "Whether `magit-log-buffer-file' uses a decicated buffer." + :package-version '(magit . "2.7.0") + :group 'magit-commands + :group 'magit-log + :type 'boolean) + ;;;; Select Mode (defcustom magit-log-select-arguments '("-n256" "--decorate") @@ -405,6 +414,25 @@ the upstream isn't ahead of the current branch) show." (default-value 'magit-log-arguments)))) (magit-invoke-popup 'magit-log-popup nil arg))) +;;;###autoload +(defun magit-log-buffer-file-popup () + "Popup console for log commands. + +This is a variant of `magit-log-popup' which shows the same popup +but which limits the log to the file being visited in the current +buffer." + (interactive) + (-if-let (file (magit-file-relative-name)) + (let ((magit-log-arguments + (magit-popup-import-file-args + (-if-let (buffer (magit-mode-get-buffer 'magit-log-mode)) + (with-current-buffer buffer + (nth 2 magit-refresh-args)) + (default-value 'magit-log-arguments)) + (list file)))) + (magit-invoke-popup 'magit-log-popup nil nil)) + (user-error "Buffer isn't visiting a file"))) + (defun magit-log-refresh-popup (arg) "Popup console for changing log arguments in the current buffer." (interactive "P") @@ -572,20 +600,24 @@ With a prefix argument or when `--follow' is part of (1- (line-number-at-pos (region-beginning))) (1- (line-number-at-pos (region-end)))) (list current-prefix-arg))) + (require 'magit) (-if-let (file (magit-file-relative-name)) - (magit-mode-setup #'magit-log-mode - (list (or magit-buffer-refname - (magit-get-current-branch) "HEAD")) - (let ((args (car (magit-log-arguments)))) - (when (and follow (not (member "--follow" args))) - (push "--follow" args)) - (when (and beg end) - (setq args (cons (format "-L%s,%s:%s" beg end file) - (cl-delete "-L" args :test - 'string-prefix-p))) - (setq file nil)) - args) - (and file (list file))) + (magit-mode-setup-internal + #'magit-log-mode + (list (list (or magit-buffer-refname + (magit-get-current-branch) + "HEAD")) + (let ((args (car (magit-log-arguments)))) + (when (and follow (not (member "--follow" args))) + (push "--follow" args)) + (when (and beg end) + (setq args (cons (format "-L%s,%s:%s" beg end file) + (cl-delete "-L" args :test + 'string-prefix-p))) + (setq file nil)) + args) + (and file (list file))) + magit-log-buffer-file-locked) (user-error "Buffer isn't visiting a file")) (magit-log-goto-same-commit)) @@ -599,6 +631,7 @@ With a prefix argument or when `--follow' is part of (defun magit-reflog (ref) "Display the reflog of a branch." (interactive (list (magit-read-local-branch-or-ref "Show reflog for"))) + (require 'magit) (magit-mode-setup #'magit-reflog-mode ref magit-reflog-arguments)) ;;;###autoload @@ -1138,13 +1171,13 @@ commit as argument." (interactive) (let ((fun magit-log-select-pick-function) (rev (magit-commit-at-point))) - (kill-buffer (current-buffer)) + (quit-restore-window nil 'kill) (funcall fun rev))) (defun magit-log-select-quit () "Abort selecting a commit, don't act on any commit." (interactive) - (kill-buffer (current-buffer)) + (quit-restore-window nil 'kill) (when magit-log-select-quit-function (funcall magit-log-select-quit-function))) @@ -1179,6 +1212,7 @@ Type \\[magit-cherry-pick-popup] to apply the commit at point. (let ((head (magit-read-branch "Cherry head"))) (list head (magit-read-other-branch "Cherry upstream" head (magit-get-upstream-branch head))))) + (require 'magit) (magit-mode-setup #'magit-cherry-mode upstream head)) (defun magit-cherry-refresh-buffer (_upstream _head) diff --git a/elpa/magit-20160425.430/magit-mode.el b/elpa/magit-20160624.2127/magit-mode.el similarity index 82% rename from elpa/magit-20160425.430/magit-mode.el rename to elpa/magit-20160624.2127/magit-mode.el index ea701a3..6a0b1ac 100644 --- a/elpa/magit-20160425.430/magit-mode.el +++ b/elpa/magit-20160624.2127/magit-mode.el @@ -102,6 +102,10 @@ which in turn uses the function specified here." :package-version '(magit . "2.3.0") :group 'magit-modes :type '(radio (function-item magit-display-buffer-traditional) + (function-item magit-display-buffer-same-window-except-diff-v1) + (function-item magit-display-buffer-fullframe-status-v1) + (function-item magit-display-buffer-fullframe-status-topleft-v1) + (function-item magit-display-buffer-fullcolumn-most-v1) (function-item display-buffer) (function :tag "Function"))) @@ -330,6 +334,7 @@ starts complicating other things, then it will be removed." (define-key map "m" 'magit-merge-popup) (define-key map "M" 'magit-remote-popup) (define-key map "o" 'magit-submodule-popup) + (define-key map "O" 'magit-subtree-popup) (define-key map "P" 'magit-push-popup) (define-key map "r" 'magit-rebase-popup) (define-key map "R" 'magit-file-rename) @@ -337,7 +342,7 @@ starts complicating other things, then it will be removed." (define-key map "T" 'magit-notes-popup) (define-key map "\r" 'magit-visit-thing) (define-key map [C-return] 'magit-visit-thing) - (define-key map [M-return] 'magit-dired-jump) + (define-key map "\M-\r" 'magit-dired-jump) (define-key map "\s" 'magit-diff-show-or-scroll-up) (define-key map "\d" 'magit-diff-show-or-scroll-down) (define-key map "s" 'magit-stage-file) @@ -481,7 +486,15 @@ Magit is documented in info node `(magit)'." (defun magit-mode-setup (mode &rest args) "Setup up a MODE buffer using ARGS to generate its content." - (let ((buffer (magit-mode-get-buffer mode t)) + (magit-mode-setup-internal mode args)) + +(defun magit-mode-setup-internal (mode args &optional locked) + "Setup up a MODE buffer using ARGS to generate its content. +When optional LOCKED is non-nil, then create a buffer that is +locked to its value, which is derived from MODE and ARGS." + (let ((buffer (magit-mode-get-buffer + mode t nil + (and locked (magit-buffer-lock-value mode args)))) (section (magit-current-section))) (with-current-buffer buffer (setq magit-previous-section section) @@ -525,6 +538,105 @@ and `magit-post-display-buffer-hook'." '(display-buffer-same-window) nil))) ; display in another window +(defun magit-display-buffer-same-window-except-diff-v1 (buffer) + "Display BUFFER in the selected window except for some modes. +If a buffer's `major-mode' derives from `magit-diff-mode' or +`magit-process-mode', display it in another window. Display all +other buffers in the selected window." + (display-buffer + buffer (if (with-current-buffer buffer + (derived-mode-p 'magit-diff-mode 'magit-process-mode)) + nil ; display in another window + '(display-buffer-same-window)))) + +(defun magit--display-buffer-fullframe (buffer alist) + (-when-let (window (or (display-buffer-reuse-window buffer alist) + (display-buffer-same-window buffer alist) + (display-buffer-pop-up-window buffer alist) + (display-buffer-use-some-window buffer alist))) + (delete-other-windows window) + window)) + +(defun magit-display-buffer-fullframe-status-v1 (buffer) + "Display BUFFER, filling entire frame if BUFFER is a status buffer. +Otherwise, behave like `magit-display-buffer-traditional'." + (if (eq (with-current-buffer buffer major-mode) + 'magit-status-mode) + (display-buffer buffer '(magit--display-buffer-fullframe)) + (magit-display-buffer-traditional buffer))) + +(defun magit--display-buffer-topleft (buffer alist) + (or (display-buffer-reuse-window buffer alist) + (-when-let (window2 (display-buffer-pop-up-window buffer alist)) + (let ((window1 (get-buffer-window)) + (buffer1 (current-buffer)) + (buffer2 (window-buffer window2)) + (w2-quit-restore (window-parameter window2 'quit-restore))) + (set-window-buffer window1 buffer2) + (set-window-buffer window2 buffer1) + (select-window window2) + ;; Swap some window state that `magit-mode-quit-window' and + ;; `quit-restore-window' inspect. + (set-window-prev-buffers window2 (cdr (window-prev-buffers window1))) + (set-window-prev-buffers window1 nil) + (set-window-parameter window2 'magit-dedicated + (window-parameter window1 'magit-dedicated)) + (set-window-parameter window1 'magit-dedicated t) + (set-window-parameter window1 'quit-restore + (list 'window 'window + (nth 2 w2-quit-restore) + (nth 3 w2-quit-restore))) + (set-window-parameter window2 'quit-restore nil) + window1)))) + +(defun magit-display-buffer-fullframe-status-topleft-v1 (buffer) + "Display BUFFER, filling entire frame if BUFFER is a status buffer. +When BUFFER derives from `magit-diff-mode' or +`magit-process-mode', try to display BUFFER to the top or left of +the current buffer rather than to the bottom or right, as +`magit-display-buffer-fullframe-status-v1' would. Whether the +split is made vertically or horizontally is determined by +`split-window-preferred-function'." + (display-buffer + buffer + (cond ((eq (with-current-buffer buffer major-mode) + 'magit-status-mode) + '(magit--display-buffer-fullframe)) + ((with-current-buffer buffer + (derived-mode-p 'magit-diff-mode 'magit-process-mode)) + '(magit--display-buffer-topleft)) + (t + '(display-buffer-same-window))))) + +(defun magit--display-buffer-fullcolumn (buffer alist) + (-when-let (window (or (display-buffer-reuse-window buffer alist) + (display-buffer-same-window buffer alist) + (display-buffer-below-selected buffer alist))) + (delete-other-windows-vertically window) + window)) + +(defun magit-display-buffer-fullcolumn-most-v1 (buffer) + "Display BUFFER using the full column except in some cases. +For most cases where BUFFER's `major-mode' derives from +`magit-mode', display it in the selected window and grow that +window to the full height of the frame, deleting other windows in +that column as necessary. However, display BUFFER in another +window if 1) BUFFER's mode derives from `magit-process-mode', or +2) BUFFER's mode derives from `magit-diff-mode', provided that +the mode of the current buffer derives from `magit-log-mode' or +`magit-cherry-mode'." + (display-buffer + buffer + (cond ((and (derived-mode-p 'magit-log-mode 'magit-cherry-mode) + (with-current-buffer buffer + (derived-mode-p 'magit-diff-mode))) + nil) + ((with-current-buffer buffer + (derived-mode-p 'magit-process-mode)) + nil) + (t + '(magit--display-buffer-fullcolumn))))) + (defun magit-maybe-set-dedicated () "Mark the selected window as dedicated if appropriate. @@ -554,26 +666,30 @@ thinking a buffer belongs to a repo that it doesn't.") (defvar-local magit-buffer-locked-p nil) (put 'magit-buffer-locked-p 'permanent-local t) -(defun magit-mode-get-buffer (mode &optional create frame) +(defun magit-mode-get-buffer (mode &optional create frame value) (-if-let (topdir (magit-toplevel)) (or (--first (with-current-buffer it (and (eq major-mode mode) (equal magit--default-directory topdir) - (not magit-buffer-locked-p))) + (if value + (and magit-buffer-locked-p + (equal (magit-buffer-lock-value) value)) + (not magit-buffer-locked-p)))) (if frame (-map #'window-buffer (window-list (unless (eq frame t) frame))) (buffer-list))) (and create (let ((default-directory topdir)) - (magit-generate-new-buffer mode)))) + (magit-generate-new-buffer mode value)))) (user-error "Not inside a Git repository"))) -(defun magit-generate-new-buffer (mode) - (let* ((name (funcall magit-generate-buffer-name-function mode)) +(defun magit-generate-new-buffer (mode &optional value) + (let* ((name (funcall magit-generate-buffer-name-function mode value)) (buffer (generate-new-buffer name))) (with-current-buffer buffer - (setq magit--default-directory default-directory)) + (setq magit--default-directory default-directory) + (setq magit-buffer-locked-p (and value t))) (when magit-uniquify-buffer-names (add-to-list 'uniquify-list-buffers-directory-modes mode) (with-current-buffer buffer @@ -599,12 +715,12 @@ thinking a buffer belongs to a repo that it doesn't.") (?t . ,(if magit-uniquify-buffer-names (file-name-nondirectory (directory-file-name default-directory)) - default-directory)))))) + (abbreviate-file-name default-directory))))))) (defun magit-toggle-buffer-lock () "Lock the current buffer to its value or unlock it. -Locking a buffer to its value, prevents it from being reused to +Locking a buffer to its value prevents it from being reused to display another value. The name of a locked buffer contains its value, which allows telling it apart from other locked buffers and the unlocked buffer. @@ -621,38 +737,53 @@ latter is displayed in its place." (if magit-buffer-locked-p (-if-let (unlocked (magit-mode-get-buffer major-mode)) (let ((locked (current-buffer))) - (set-buffer unlocked) + (switch-to-buffer unlocked nil t) (kill-buffer locked)) (setq magit-buffer-locked-p nil) (rename-buffer (funcall magit-generate-buffer-name-function major-mode))) - (setq magit-buffer-locked-p - (cond ((memq major-mode '(magit-cherry-mode - magit-log-mode - magit-reflog-mode - magit-refs-mode - magit-revision-mode - magit-stash-mode - magit-stashes-mode)) - (car magit-refresh-args)) - ((eq major-mode 'magit-diff-mode) - (let ((rev (nth 0 magit-refresh-args)) - (args (nth 1 magit-refresh-args))) - (cond - ((member "--no-index" args) - (nth 3 magit-refresh-args)) - (rev (if args (cons rev args) rev)) - (t (if (member "--cached" args) "staged" "unstaged"))))))) - (if magit-buffer-locked-p - (let ((name (funcall magit-generate-buffer-name-function - major-mode magit-buffer-locked-p))) - (-if-let (locked (get-buffer name)) - (let ((unlocked (current-buffer))) - (set-buffer locked) - (kill-buffer unlocked)) - (rename-buffer name))) + (-if-let (value (magit-buffer-lock-value)) + (-if-let (locked (magit-mode-get-buffer major-mode nil nil value)) + (let ((unlocked (current-buffer))) + (switch-to-buffer locked nil t) + (kill-buffer unlocked)) + (setq magit-buffer-locked-p t) + (rename-buffer (funcall magit-generate-buffer-name-function + major-mode value))) (user-error "Buffer has no value it could be locked to")))) +(cl-defun magit-buffer-lock-value + (&optional (mode major-mode) + (args magit-refresh-args)) + (cl-case mode + (magit-cherry-mode + (-let [(upstream head) args] + (concat head ".." upstream))) + (magit-diff-mode + (-let [(rev-or-range const _args files) args] + (nconc (cons (or rev-or-range + (if (member "--cached" const) + (progn (setq const (delete "--cached" const)) + 'staged) + 'unstaged)) + const) + (and files (cons "--" files))))) + (magit-log-mode + (-let [(revs _args files) args] + (if (and revs files) + (append revs (cons "--" files)) + (append revs files)))) + (magit-refs-mode + (-let [(ref args) args] + (cons (or ref "HEAD") args))) + (magit-revision-mode + (-let [(rev __const _args files) args] + (if files (cons rev files) (list rev)))) + ((magit-reflog-mode ; (ref ~args) + magit-stash-mode ; (stash _const _args _files) + magit-stashes-mode) ; (ref) + (car args)))) + (defun magit-mode-bury-buffer (&optional kill-buffer) "Bury the current buffer. With a prefix argument, kill the buffer instead. @@ -818,13 +949,15 @@ Run hooks `magit-pre-refresh-hook' and `magit-post-refresh-hook'." This function is intended to be added to `after-save-hook'. If the status buffer does not exist or the file being visited in -the current buffer isn't inside a repository, then do nothing. +the current buffer isn't inside the working tree of a repository, +then do nothing. Note that refreshing a Magit buffer is done by re-creating its contents from scratch, which can be slow in large repositories. If you are not satisfied with Magit's performance, then you should obviously not add this function to that hook." - (unless disable-magit-save-buffers + (when (and (not disable-magit-save-buffers) + (magit-inside-worktree-p)) (--when-let (ignore-errors (magit-mode-get-buffer 'magit-status-mode)) (add-to-list 'magit-after-save-refresh-buffers it) (add-hook 'post-command-hook 'magit-after-save-refresh-buffers)))) diff --git a/elpa/magit-20160425.430/magit-pkg.el b/elpa/magit-20160624.2127/magit-pkg.el similarity index 62% rename from elpa/magit-20160425.430/magit-pkg.el rename to elpa/magit-20160624.2127/magit-pkg.el index 3284180..ba00ebf 100644 --- a/elpa/magit-20160425.430/magit-pkg.el +++ b/elpa/magit-20160624.2127/magit-pkg.el @@ -1,10 +1,10 @@ -(define-package "magit" "20160425.430" "A Git porcelain inside Emacs" +(define-package "magit" "20160624.2127" "A Git porcelain inside Emacs" '((emacs "24.4") (async "20150909.2257") (dash "20151021.113") (with-editor "20160408.201") - (git-commit "20160414.251") - (magit-popup "20160414.251")) + (git-commit "20160425.430") + (magit-popup "20160512.328")) :url "https://github.com/magit/magit" :keywords '("git" "tools" "vc")) ;; Local Variables: diff --git a/elpa/magit-20160425.430/magit-process.el b/elpa/magit-20160624.2127/magit-process.el similarity index 98% rename from elpa/magit-20160425.430/magit-process.el rename to elpa/magit-20160624.2127/magit-process.el index 1a4015c..c8cea6c 100644 --- a/elpa/magit-20160425.430/magit-process.el +++ b/elpa/magit-20160624.2127/magit-process.el @@ -227,7 +227,9 @@ optional NODISPLAY is non-nil also display it." (when magit-process-log-max (magit-process-truncate-log)) (magit-process-mode) - (let ((inhibit-read-only t)) + (let ((inhibit-read-only t) + (magit-insert-section--parent nil) + (magit-insert-section--oldroot nil)) (make-local-variable 'text-property-default-nonsticky) (magit-insert-section (processbuf) (insert "\n"))))) @@ -506,7 +508,8 @@ Magit status buffer." (defun magit-process-insert-section (pwd program args &optional errcode errlog) (let ((inhibit-read-only t) - (magit-insert-section--parent magit-root-section)) + (magit-insert-section--parent magit-root-section) + (magit-insert-section--oldroot nil)) (goto-char (1- (point-max))) (magit-insert-section (process) (insert (if errcode @@ -811,10 +814,10 @@ as argument." (--when-let (magit-section-content section) (when (re-search-backward magit-process-error-message-re it t) - (match-string 1)))))) + (match-string-no-properties 1)))))) "Git failed"))) (if magit-process-raise-error - (signal 'magit-git-error (format "%s (in %s)" msg default-dir)) + (signal 'magit-git-error (list (format "%s (in %s)" msg default-dir))) (--when-let (magit-mode-get-buffer 'magit-status-mode) (setq magit-this-error msg)) (message "%s ... [%s buffer %s for details]" msg diff --git a/elpa/magit-20160425.430/magit-remote.el b/elpa/magit-20160624.2127/magit-remote.el similarity index 93% rename from elpa/magit-20160425.430/magit-remote.el rename to elpa/magit-20160624.2127/magit-remote.el index 489f4d4..b509644 100644 --- a/elpa/magit-20160425.430/magit-remote.el +++ b/elpa/magit-20160624.2127/magit-remote.el @@ -61,20 +61,28 @@ Then show the status buffer for the new repository." (and (string-match "\\([^./]+\\)\\(\\.git\\)?$" url) (match-string 1 url)))))) (setq directory (file-name-as-directory (expand-file-name directory))) - (message "Cloning %s..." repository) - (when (= (magit-call-git "clone" repository - ;; Stop cygwin git making a "c:" directory. - (magit-convert-git-filename directory)) - 0) - (let ((default-directory directory)) - (when (or (eq magit-clone-set-remote.pushDefault t) - (and magit-clone-set-remote.pushDefault - (y-or-n-p "Set `remote.pushDefault' to \"origin\"? "))) - (magit-call-git "config" "remote.pushDefault" "origin")) - (unless magit-clone-set-remote-head - (magit-remote-unset-head "origin"))) - (message "Cloning %s...done" repository) - (magit-status-internal directory))) + (magit-run-git-async "clone" repository + ;; Stop cygwin git making a "c:" directory. + (magit-convert-git-filename directory)) + ;; Don't refresh the buffer we're calling from. + (process-put magit-this-process 'inhibit-refresh t) + (set-process-sentinel + magit-this-process + (lambda (process event) + (when (memq (process-status process) '(exit signal)) + (let ((magit-process-raise-error t)) + (magit-process-sentinel process event))) + (when (and (eq (process-status process) 'exit) + (= (process-exit-status process) 0)) + (let ((default-directory directory)) + (when (or (eq magit-clone-set-remote.pushDefault t) + (and magit-clone-set-remote.pushDefault + (y-or-n-p "Set `remote.pushDefault' to \"origin\"? "))) + (setf (magit-get "remote.pushDefault") "origin")) + (unless magit-clone-set-remote-head + (magit-remote-unset-head "origin"))) + (with-current-buffer (process-get process 'command-buf) + (magit-status-internal directory)))))) ;;; Setup @@ -120,7 +128,7 @@ the variable isn't already set." ((or `(ask ,_) `(ask-if-unset nil)) (y-or-n-p (format "Set `remote.pushDefault' to \"%s\"? " remote)))) (progn (magit-call-git "remote" "add" "-f" remote url) - (magit-call-git "config" "remote.pushDefault" remote) + (setf (magit-get "remote.pushDefault") remote) (magit-refresh)) (magit-run-git-async "remote" "add" "-f" remote url))) @@ -178,7 +186,9 @@ Delete the symbolic-ref \"refs/remotes//HEAD\"." 'magit-commands :man-page "git-fetch" :switches '((?p "Prune deleted branches" "--prune")) - :actions '("Fetch from" + :actions '("Configure" + (?C "variables..." magit-branch-config-popup) + "Fetch from" (?p magit-get-push-remote magit-fetch-from-pushremote) (?u magit-get-remote magit-fetch-from-upstream) (?e "elsewhere" magit-fetch) @@ -271,9 +281,11 @@ removed on the respective remote." "Popup console for pull commands." 'magit-commands :man-page "git-pull" - :variables '((?r "branch.%s.rebase" + :variables '("Configure" + (?r "branch.%s.rebase" magit-cycle-branch*rebase - magit-pull-format-branch*rebase)) + magit-pull-format-branch*rebase) + (?C "variables..." magit-branch-config-popup)) :actions '((lambda () (--if-let (magit-get-current-branch) (concat @@ -315,10 +327,11 @@ missing. To add them use something like: \\='magit-fetch-from-push-remote ?F))" 'magit-commands :man-page "git-pull" - :variables '("Pull variables" + :variables '("Configure" (?r "branch.%s.rebase" magit-cycle-branch*rebase - magit-pull-format-branch*rebase)) + magit-pull-format-branch*rebase) + (?C "variables..." magit-branch-config-popup)) :actions '((lambda () (--if-let (magit-get-current-branch) (concat @@ -366,7 +379,9 @@ missing. To add them use something like: "Pull from the upstream of the current branch." (interactive (list (magit-pull-arguments))) (--if-let (magit-get-upstream-branch) - (magit-git-pull it args) + (progn (run-hooks 'magit-credential-hook) + (magit-run-git-with-editor + "pull" args (car (magit-split-branch-name it)))) (--if-let (magit-get-current-branch) (user-error "No upstream is configured for %s" it) (user-error "No branch is checked out")))) @@ -416,7 +431,9 @@ removed after restarting Emacs." (?d "Dry run" "--dry-run") ,@(and (not magit-push-current-set-remote-if-missing) '((?u "Set upstream" "--set-upstream")))) - :actions '((lambda () + :actions '("Configure" + (?C "variables..." magit-branch-config-popup) + (lambda () (--when-let (magit-get-current-branch) (concat (propertize "Push " 'face 'magit-popup-heading) (propertize it 'face 'magit-branch-local) @@ -460,13 +477,12 @@ the push-remote can be changed before pushed to it." (magit-get-current-branch))))))) (--if-let (magit-get-current-branch) (progn (when push-remote - (magit-call-git - "config" - (if (eq magit-push-current-set-remote-if-missing 'default) - "remote.pushDefault" - (format "branch.%s.pushRemote" - (magit-get-current-branch))) - push-remote)) + (setf (magit-get + (if (eq magit-push-current-set-remote-if-missing 'default) + "remote.pushDefault" + (format "branch.%s.pushRemote" + (magit-get-current-branch)))) + push-remote)) (-if-let (remote (magit-get-push-remote it)) (if (member remote (magit-list-remotes)) (magit-git-push it (concat remote "/" it) args) diff --git a/elpa/magit-20160425.430/magit-section.el b/elpa/magit-20160624.2127/magit-section.el similarity index 99% rename from elpa/magit-20160425.430/magit-section.el rename to elpa/magit-20160624.2127/magit-section.el index 93f2c50..e08db1a 100644 --- a/elpa/magit-20160425.430/magit-section.el +++ b/elpa/magit-20160624.2127/magit-section.el @@ -544,9 +544,10 @@ Conditions can take the following forms: also recursively all their child sections. TYPE matches TYPE regardless of its parents. -Each TYPE is a symbol. Note that is not necessary to specify all -TYPEs up to the root section as printed by `magit-describe-type', -unless of course your want to be that precise." +Each TYPE is a symbol. Note that it is not necessary to specify +all TYPEs up to the root section as printed by +`magit-describe-type', unless of course you want to be that +precise." ;; When recursing SECTION actually is a type list. Matching ;; macros also pass such a list instead of a section struct. (let ((types (if (magit-section-p section) diff --git a/elpa/magit-20160425.430/magit-sequence.el b/elpa/magit-20160624.2127/magit-sequence.el similarity index 96% rename from elpa/magit-20160425.430/magit-sequence.el rename to elpa/magit-20160624.2127/magit-sequence.el index a75e715..d610ab9 100644 --- a/elpa/magit-20160425.430/magit-sequence.el +++ b/elpa/magit-20160624.2127/magit-sequence.el @@ -443,13 +443,22 @@ START has to be selected from a list of recent commits." "perl -i -p -e '++$x if not $x and s/^pick/reword/'")) ;;;###autoload -(defun magit-rebase-continue () - "Restart the current rebasing operation." - (interactive) +(defun magit-rebase-continue (&optional noedit) + "Restart the current rebasing operation. +In some cases this pops up a commit message buffer for you do +edit. With a prefix argument the old message is reused as-is." + (interactive "P") (if (magit-rebase-in-progress-p) (if (magit-anything-unstaged-p t) (user-error "Cannot continue rebase with unstaged changes") - (magit-run-git-sequencer "rebase" "--continue")) + (if noedit + (let ((process-environment process-environment)) + (push "GIT_EDITOR=true" process-environment) + (magit-run-git-async "rebase" "--continue") + (set-process-sentinel magit-this-process + #'magit-sequencer-process-sentinel) + magit-this-process) + (magit-run-git-sequencer "rebase" "--continue"))) (user-error "No rebase in progress"))) ;;;###autoload @@ -565,7 +574,10 @@ If no such sequence is in progress, do nothing." (dolist (line (nreverse (magit-file-lines (magit-git-dir "rebase-merge/git-rebase-todo")))) - (when (string-match "^\\([^# ]+\\) \\([^ ]+\\) .*$" line) + (when (string-match (format "^\\([^%c ]+\\) \\([^ ]+\\) .*$" + (string-to-char + (or (magit-get "core.commentChar") "#"))) + line) (magit-bind-match-strings (action hash) line (magit-sequence-insert-commit action hash 'magit-sequence-pick))))) diff --git a/elpa/magit-20160425.430/magit-stash.el b/elpa/magit-20160624.2127/magit-stash.el similarity index 100% rename from elpa/magit-20160425.430/magit-stash.el rename to elpa/magit-20160624.2127/magit-stash.el diff --git a/elpa/magit-20160425.430/magit-submodule.el b/elpa/magit-20160624.2127/magit-submodule.el similarity index 82% rename from elpa/magit-20160425.430/magit-submodule.el rename to elpa/magit-20160624.2127/magit-submodule.el index e83bf10..db5faf6 100644 --- a/elpa/magit-20160425.430/magit-submodule.el +++ b/elpa/magit-20160624.2127/magit-submodule.el @@ -1,6 +1,6 @@ ;;; magit-submodule.el --- submodule support for Magit -*- lexical-binding: t -*- -;; Copyright (C) 2011-2015 The Magit Project Contributors +;; Copyright (C) 2011-2016 The Magit Project Contributors ;; ;; You should have received a copy of the AUTHORS.md file which ;; lists all contributors. If not, see http://magit.vc/authors. @@ -52,35 +52,40 @@ Optional NAME is the name of the submodule. If it is nil, then PATH also becomes the name." (interactive (magit-with-toplevel - (let ((path (magit-completing-read "Add submodules at path" - (magit-untracked-files) - #'magit-git-repo-p nil nil nil - (magit-section-when [file untracked] - (file-relative-name - (magit-section-value it) - default-directory))))) - (unless path - (user-error "No path selected")) - (list (magit-read-string-ns - "Remote url" - (let ((default-directory (file-name-as-directory - (expand-file-name path)))) - (magit-get "remote" (or (magit-get-remote) "origin") "url"))) + (let* ((url (magit-read-string-ns "Add submodule (remote url)")) + (path (let ((read-file-name-function #'read-file-name-default)) + (directory-file-name + (file-relative-name + (read-directory-name + "Add submodules at path: " nil nil nil + (and (string-match "\\([^./]+\\)\\(\\.git\\)?$" url) + (match-string 1 url)))))))) + (list url (directory-file-name path) - (magit-read-string-ns - "Name submodule" nil nil - (or (--keep (-let [(var val) (split-string it "=")] - (and (equal val path) - (cadr (split-string var "\\.")))) - (magit-git-lines "config" "--list" "-f" ".gitmodules")) - (directory-file-name path))))))) + (magit-submodule-read-name path))))) (magit-run-git "submodule" "add" (and name (list "--name" name)) url path)) +;;;###autoload +(defun magit-submodule-read-name (path) + (setq path (directory-file-name (file-relative-name path))) + (push (file-name-nondirectory path) minibuffer-history) + (magit-read-string-ns + "Submodule name" nil (cons 'minibuffer-history 2) + (or (--keep (-let [(var val) (split-string it "=")] + (and (equal val path) + (cadr (split-string var "\\.")))) + (magit-git-lines "config" "--list" "-f" ".gitmodules")) + path))) + ;;;###autoload (defun magit-submodule-setup () "Clone and register missing submodules and checkout appropriate commits." (interactive) - (magit-submodule-update t)) + (magit-with-toplevel + (--if-let (--filter (not (file-exists-p (expand-file-name ".git" it))) + (magit-get-submodules)) + (magit-run-git-async "submodule" "update" "--init" "--" it) + (message "All submodules already setup")))) ;;;###autoload (defun magit-submodule-init () @@ -137,10 +142,12 @@ For each section insert the path and the output of `git describe --tags'." (expand-file-name (file-name-as-directory module)))) (magit-insert-section (file module t) (insert (format "%-25s " module)) - (let ((beg (point))) - (magit-git-insert "describe" "--tags") - (when (eq (point) beg) - (insert ?\n)))))))))) + (--when-let (magit-git-string "describe" "--tags") + (when (string-match-p "\\`[0-9]" it) + (insert ?\s)) + (insert it)) + (insert ?\n))))) + (insert ?\n)))) ;;;###autoload (defun magit-insert-modules-unpulled-from-upstream () diff --git a/elpa/magit-20160624.2127/magit-subtree.el b/elpa/magit-20160624.2127/magit-subtree.el new file mode 100644 index 0000000..843147f --- /dev/null +++ b/elpa/magit-20160624.2127/magit-subtree.el @@ -0,0 +1,143 @@ +;;; magit-subtree.el --- subtree support for Magit -*- lexical-binding: t -*- + +;; Copyright (C) 2011-2016 The Magit Project Contributors +;; +;; You should have received a copy of the AUTHORS.md file which +;; lists all contributors. If not, see http://magit.vc/authors. + +;; Author: Jonas Bernoulli +;; Maintainer: Jonas Bernoulli + +;; Magit 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, or (at your option) +;; any later version. +;; +;; Magit 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 Magit. If not, see http://www.gnu.org/licenses. + +;;; Code: + +(require 'magit) + +;;;###autoload (autoload 'magit-subtree-popup "magit-subtree" nil t) +(magit-define-popup magit-subtree-popup + "Popup console for subtree commands." + 'magit-commands + :man-page "git-subtree" + :switches '("Switches for add, merge, push, and pull" + (?s "Squash" "--squash") + "Switches for split" + (?i "Ignore joins" "--ignore-joins") + (?j "Rejoin" "--rejoin")) + :options '("Options" + (?p "Prefix" "--prefix=" magit-subtree-read-prefix) + "Options for add, merge, and pull" + (?m "Message" "--message=") + "Options for split" + (?a "Annotate" "--annotate=") + (?b "Branch" "--branch=") + (?o "Onto" "--onto=" magit-read-branch-or-commit)) + :actions '((?a "Add" magit-subtree-add) + (?m "Merge" magit-subtree-merge) + (?p "Push" magit-subtree-push) + (?c "Add commit" magit-subtree-add-commit) + (?f "Pull" magit-subtree-pull) + (?s "Split" magit-subtree-split)) + :max-action-columns 3) + +(defun magit-subtree-prefix (prompt) + (--if-let (--first (string-prefix-p "--prefix=" it) + (magit-subtree-arguments)) + (substring it 9) + (magit-subtree-read-prefix prompt))) + +(defun magit-subtree-read-prefix (prompt &optional default) + (let* ((insert-default-directory nil) + (topdir (magit-toplevel)) + (prefix (read-directory-name (concat prompt ": ") topdir default))) + (if (file-name-absolute-p prefix) + ;; At least `ido-mode's variant is not compatible. + (if (string-prefix-p topdir prefix) + (file-relative-name prefix topdir) + (user-error "%s isn't inside the repository at %s" prefix topdir)) + prefix))) + +(defun magit-subtree-args () + (-filter (lambda (arg) + (if (eq this-command 'magit-subtree-split) + (or (equal arg "--ignore-joins") + (equal arg "--rejoin") + (string-prefix-p "--annotate=" arg) + (string-prefix-p "--branch=" arg) + (string-prefix-p "--onto=" arg)) + (or (equal arg "--squash") + (and (string-prefix-p "--message=" arg) + (not (eq this-command 'magit-subtree-push)))))) + (magit-subtree-arguments))) + +(defun magit-git-subtree (subcmd prefix &rest args) + (magit-run-git-async "subtree" subcmd (concat "--prefix=" prefix) args)) + +;;;###autoload +(defun magit-subtree-add (prefix repository commit args) + "Add COMMIT from REPOSITORY as a new subtree at PREFIX." + (interactive (list (magit-subtree-prefix "Add subtree") + (magit-read-string-ns "Repository") + (magit-read-string-ns "Commit") + (magit-subtree-args))) + (magit-git-subtree "add" prefix args repository commit)) + +;;;###autoload +(defun magit-subtree-add-commit (prefix commit args) + "Add COMMIT as a new subtree at PREFIX." + (interactive (list (magit-subtree-prefix "Add subtree") + (magit-read-string-ns "Commit") + (magit-subtree-args))) + (magit-git-subtree "add" prefix args commit)) + +;;;###autoload +(defun magit-subtree-merge (prefix commit args) + "Merge COMMIT into the PREFIX subtree." + (interactive (list (magit-subtree-prefix "Merge into subtree") + (magit-read-string-ns "Commit") + (magit-subtree-args))) + (magit-git-subtree "merge" prefix args commit)) + +;;;###autoload +(defun magit-subtree-pull (prefix repository commit args) + "Pull COMMIT from REPOSITORY into the PREFIX subtree." + (interactive (list (magit-subtree-prefix "Pull into subtree") + (magit-read-string-ns "From repository") + (magit-read-string-ns "Commit") + (magit-subtree-args))) + (magit-git-subtree "pull" prefix args repository commit)) + +;;;###autoload +(defun magit-subtree-push (prefix repository ref args) + "Extract the history of the subtree PREFIX and push it to REF on REPOSITORY." + (interactive (list (magit-subtree-prefix "Push subtree") + (magit-read-string-ns "To repository") + (magit-read-string-ns "To reference") + (magit-subtree-args))) + (magit-git-subtree "push" prefix args repository ref)) + +;;;###autoload +(defun magit-subtree-split (prefix commit args) + "Extract the history of the subtree PREFIX." + (interactive (list (magit-subtree-prefix "Split subtree") + (magit-read-string-ns "Commit") + (magit-subtree-args))) + (magit-git-subtree "split" prefix args commit)) + +;;; magit-subtree.el ends soon +(provide 'magit-subtree) +;; Local Variables: +;; indent-tabs-mode: nil +;; End: +;;; magit-subtree.el ends here diff --git a/elpa/magit-20160425.430/magit-utils.el b/elpa/magit-20160624.2127/magit-utils.el similarity index 92% rename from elpa/magit-20160425.430/magit-utils.el rename to elpa/magit-20160624.2127/magit-utils.el index d988fd6..330420c 100644 --- a/elpa/magit-20160425.430/magit-utils.el +++ b/elpa/magit-20160624.2127/magit-utils.el @@ -163,6 +163,29 @@ Global settings: (const stage-all-changes) (const unstage-all-changes) (const safe-with-wip)))) +(defcustom magit-no-message nil + "A list of messages Magit should not display. + +Magit displays most echo area messages using `message', but a few +are displayed using `magit-message' instead, which takes the same +arguments as the former, FORMAT-STRING and ARGS. `magit-message' +forgoes printing a message if any member of this list is a prefix +of the respective FORMAT-STRING. + +If Magit prints a message which causes you grief, then please +first investigate whether there is another option which can be +used to suppress it. If that is not the case, then ask the Magit +maintainers to start using `magit-message' instead of `message' +in that case. We are not proactively replacing all uses of +`message' with `magit-message', just in case someone *might* find +some of these messages useless. + +Messages which can currently be suppressed using this option are: +* \"Turning on magit-auto-revert-mode...\"" + :package-version '(magit . "2.7.1") + :group 'magit + :type '(repeat string)) + (defcustom magit-ellipsis ?… "Character used to abbreviate text." :package-version '(magit . "2.1.0") @@ -414,6 +437,14 @@ and https://github.com/magit/magit/issues/2295." (and (file-directory-p filename) (file-accessible-directory-p filename))) +(defun magit-message (format-string &rest args) + "Display a message at the bottom of the screen, or not. +Like `message', except that if the users configured option +`magit-no-message' to prevent the message corresponding to +FORMAT-STRING to be displayed, then don't." + (unless (--first (string-prefix-p it format-string) magit-no-message) + (apply #'message format-string args))) + ;;; magit-utils.el ends soon (provide 'magit-utils) ;; Local Variables: diff --git a/elpa/magit-20160425.430/magit-wip.el b/elpa/magit-20160624.2127/magit-wip.el similarity index 100% rename from elpa/magit-20160425.430/magit-wip.el rename to elpa/magit-20160624.2127/magit-wip.el diff --git a/elpa/magit-20160425.430/magit.el b/elpa/magit-20160624.2127/magit.el similarity index 86% rename from elpa/magit-20160425.430/magit.el rename to elpa/magit-20160624.2127/magit.el index 07c6cc5..9a07ab7 100644 --- a/elpa/magit-20160425.430/magit.el +++ b/elpa/magit-20160624.2127/magit.el @@ -16,7 +16,7 @@ ;; Rémi Vanicat ;; Yann Hodique -;; Package-Requires: ((emacs "24.4") (async "20150909.2257") (dash "20151021.113") (with-editor "20160408.201") (git-commit "20160414.251") (magit-popup "20160414.251")) +;; Package-Requires: ((emacs "24.4") (async "20150909.2257") (dash "20151021.113") (with-editor "20160408.201") (git-commit "20160425.430") (magit-popup "20160512.328")) ;; Keywords: git tools vc ;; Homepage: https://github.com/magit/magit @@ -93,8 +93,8 @@ "Hook run to insert headers into the status buffer. This hook is run by `magit-insert-status-headers', which in turn -has to be a member of `magit-insert-status-sections' to be used -at all." +has to be a member of `magit-status-sections-hook' to be used at +all." :package-version '(magit . "2.1.0") :group 'magit-status :type 'hook @@ -279,22 +279,66 @@ prefer the former, then you should add branches such as \"master\", :group 'magit-commands :type '(repeat string)) +(defcustom magit-branch-popup-show-variables t + "Whether the `magit-branch-popup' shows Git variables. +This defaults to t to avoid changing key bindings. When set to +nil, no variables are displayed directly in this popup, instead +the sub-popup `magit-branch-config-popup' has to be used to view +and change branch related variables." + :package-version '(magit . "2.7.0") + :group 'magit-commands + :type 'boolean) + (defcustom magit-repository-directories nil - "Directories containing Git repositories. -Magit checks these directories for Git repositories and offers -them as choices when `magit-status' is used with a prefix -argument." + "List of directories that are or contain Git repositories. +Each element has the form (DIRECTORY . DEPTH) or, for backward +compatibility, just DIRECTORY. DIRECTORY has to be a directory +or a directory file-name, a string. DEPTH, an integer, specifies +the maximum depth to look for Git repositories. If it is 0, then +only add DIRECTORY itself. For elements that are strings, the +value of option `magit-repository-directories-depth' specifies +the depth." + :package-version '(magit . "2.7.1") :group 'magit - :type '(repeat string)) + :type '(repeat (choice (cons directory (integer :tag "Depth")) directory))) (defcustom magit-repository-directories-depth 3 "The maximum depth to look for Git repositories. -When looking for a Git repository below the directories in -`magit-repository-directories', only descend this many levels -deep." +This option is obsolete and only used for elements of the option +`magit-repository-directories' (which see) that don't specify the +depth directly." :group 'magit :type 'integer) +(defcustom magit-repolist-columns + '(("Name" 25 magit-repolist-column-ident nil) + ("Version" 25 magit-repolist-column-version nil) + ("LU" 3 magit-repolist-column-unpushed-to-upstream (:right-align t)) + ("Path" 99 magit-repolist-column-path)) + "List of columns displayed by `magit-list-repositories'. + +Each element has the form (HEADER WIDTH FORMAT PROPS). + +HEADER is the string displayed in the header. WIDTH is the width +of the column. FORMAT is a function that is called with one +argument, the repository identification (usually its basename), +and with `default-directory' bound to the toplevel of its working +tree. It has to return a string to be inserted or nil. PROPS is +an alist that supports the keys ~:right-align~ and ~:pad-right~." + :package-version '(magit . "2.7.1") + :group 'magit-commands + :type `(repeat (list :tag "Column" + (string :tag "Header Label") + (integer :tag "Column Width") + (function :tag "Inserter Function") + (repeat :tag "Properties" + (list (choice :tag "Property" + (const :right-align) + (const :pad-right) + (symbol)) + (sexp :tag "Value")))))) + ;;;; Faces (defface magit-header-line @@ -820,13 +864,13 @@ Insert a header line with the name and description of the current branch. The description is taken from the Git variable `branch..description'; if that is undefined then no header line is inserted at all." - (let ((branch (magit-get-current-branch))) - (--when-let (magit-git-lines - "config" (format "branch.%s.description" branch)) - (magit-insert-section (branchdesc branch t) - (magit-insert-heading branch ": " (car it)) - (insert (mapconcat 'identity (cdr it) "\n")) - (insert "\n\n"))))) + (-when-let* ((branch (magit-get-current-branch)) + (desc (magit-get "branch" branch "description")) + (desc-lines (split-string desc "\n"))) + (magit-insert-section (branchdesc branch t) + (magit-insert-heading branch ": " (car desc-lines)) + (insert (mapconcat 'identity (cdr desc-lines) "\n")) + (insert "\n\n")))) (defconst magit-refs-branch-line-re (concat "^" @@ -845,10 +889,14 @@ line is inserted at all." "\\] \\)?" "\\(?3:.*\\)")) ; message +(defconst magit-refs-symref-line-re "^ \\([^ ]+\\) +-> \\(.+\\)") + (defvar magit-refs-local-branch-format "%4c %-25n %U%m\n" "Format used for local branches in refs buffers.") (defvar magit-refs-remote-branch-format "%4c %-25n %m\n" "Format used for remote branches in refs buffers.") +(defvar magit-refs-symref-format "%4c %-25n -> %m\n" + "Format used for symrefs in refs buffers.") (defvar magit-refs-tags-format "%4c %-25n %m\n" "Format used for tags in refs buffers.") (defvar magit-refs-indent-cherry-lines 3 @@ -927,14 +975,18 @@ reference, but it is not checked out." (branches (magit-list-local-branch-names))) (dolist (line (magit-git-lines "branch" "-vv" (cadr magit-refresh-args))) - (when (string-match magit-refs-branch-line-re line) + (cond + ((string-match magit-refs-branch-line-re line) (magit-bind-match-strings (branch hash message upstream ahead behind gone) line (when (string-match-p "(HEAD detached" branch) (setq branch nil)) (magit-insert-branch branch magit-refs-local-branch-format current branches - 'magit-branch-local hash message upstream ahead behind gone))))) + 'magit-branch-local hash message upstream ahead behind gone))) + ((string-match magit-refs-symref-line-re line) + (magit-bind-match-strings (symref ref) line + (magit-insert-symref symref ref 'magit-branch-local)))))) (insert ?\n))) (defun magit-insert-remote-branches () @@ -950,12 +1002,16 @@ reference, but it is not checked out." (branches (magit-list-local-branch-names))) (dolist (line (magit-git-lines "branch" "-vvr" (cadr magit-refresh-args))) - (when (string-match magit-refs-branch-line-re line) + (cond + ((string-match magit-refs-branch-line-re line) (magit-bind-match-strings (branch hash message) line (when (string-match-p (format "^%s/" remote) branch) (magit-insert-branch branch magit-refs-remote-branch-format current branches - 'magit-branch-remote hash message)))))) + 'magit-branch-remote hash message)))) + ((string-match magit-refs-symref-line-re line) + (magit-bind-match-strings (symref ref) line + (magit-insert-symref symref ref 'magit-branch-remote)))))) (insert ?\n)))) (defun magit-insert-branch (branch format &rest args) @@ -1015,6 +1071,18 @@ reference, but it is not checked out." (magit-refs-format-margin branch)) (magit-refs-insert-cherry-commits head branch section))) +(defun magit-insert-symref (symref ref face) + "For internal use, don't add to a hook." + (magit-insert-section (commit symref) + (insert + (format-spec (if magit-refs-show-commit-count + magit-refs-symref-format + (replace-regexp-in-string "%[0-9]\\([cC]\\)" "%1\\1" + magit-refs-symref-format t)) + `((?c . "") + (?n . ,(propertize symref 'face face)) + (?m . ,(propertize ref 'face face))))))) + (defvar magit-tag-section-map (let ((map (make-sparse-keymap))) (define-key map [remap magit-visit-thing] 'magit-visit-ref) @@ -1273,52 +1341,31 @@ Non-interactively DIRECTORY is (re-)initialized unconditionally." "Popup console for branch commands." 'magit-commands :man-page "git-branch" - :variables '("Configure existing branches" - (?d "branch.%s.description" - magit-edit-branch*description - magit-format-branch*description) - (?u "branch.%s.merge" - magit-set-branch*merge/remote - magit-format-branch*merge/remote) - (?r "branch.%s.rebase" - magit-cycle-branch*rebase - magit-format-branch*rebase) - (?p "branch.%s.pushRemote" - magit-cycle-branch*pushRemote - magit-format-branch*pushRemote) - "Configure repository defaults" - (?\M-r "pull.rebase" - magit-cycle-pull.rebase - magit-format-pull.rebase) - (?\M-p "remote.pushDefault" - magit-cycle-remote.pushDefault - magit-format-remote.pushDefault) - "Configure branch creation" - (?U "branch.autoSetupMerge" - magit-cycle-branch*autoSetupMerge - magit-format-branch*autoSetupMerge) - (?R "branch.autoSetupRebase" - magit-cycle-branch*autoSetupRebase - magit-format-branch*autoSetupRebase)) - :actions '((?c "Create and checkout" magit-branch-and-checkout) - (?b "Checkout" magit-checkout) - (?n "Create" magit-branch) - (?m "Rename" magit-branch-rename) - (?s "Create spin-off" magit-branch-spinoff) - (?x "Reset" magit-branch-reset) nil - (?k "Delete" magit-branch-delete)) + :actions '((?b "Checkout" magit-checkout) + (?n "Create new branch" magit-branch) + (?C "Configure..." magit-branch-config-popup) + (?c "Checkout new branch" magit-branch-and-checkout) + (?s "Create new spin-off" magit-branch-spinoff) + (?m "Rename" magit-branch-rename) + (?w "Checkout new worktree" magit-worktree-checkout) + (?W "Create new worktree" magit-worktree-branch) + (?x "Reset" magit-branch-reset) nil nil + (?k "Delete" magit-branch-delete)) :default-action 'magit-checkout - :max-action-columns 2 + :max-action-columns 3 :setup-function 'magit-branch-popup-setup) +(defvar magit-branch-config-variables) + (defun magit-branch-popup-setup (val def) (magit-popup-default-setup val def) - (use-local-map (copy-keymap magit-popup-mode-map)) - (dolist (ev (-filter #'magit-popup-event-p (magit-popup-get :variables))) - (local-set-key (vector (magit-popup-event-key ev)) - 'magit-invoke-popup-action))) - -;;;;; Branch Actions + (when magit-branch-popup-show-variables + (magit-popup-put :variables (magit-popup-convert-variables + val magit-branch-config-variables)) + (use-local-map (copy-keymap magit-popup-mode-map)) + (dolist (ev (-filter #'magit-popup-event-p (magit-popup-get :variables))) + (local-set-key (vector (magit-popup-event-key ev)) + 'magit-invoke-popup-action)))) ;;;###autoload (defun magit-checkout (revision) @@ -1355,16 +1402,25 @@ changes. (magit-call-git "branch" (concat "--set-upstream-to=" it) branch)) (magit-refresh))) +;;;###autoload +(defun magit-branch-orphan (branch start-point &optional args) + "Create and checkout an orphan BRANCH with contents from revision START-POINT. +\n(git checkout --orphan [ARGS] BRANCH START-POINT)." + (interactive (magit-branch-read-args "Create and checkout orphan branch")) + (magit-run-git "checkout" "--orphan" args branch start-point)) + (defun magit-branch-read-args (prompt) (let ((args (magit-branch-arguments)) start branch) (cond (magit-branch-read-upstream-first (setq start (magit-read-starting-point prompt)) (setq branch (magit-read-string-ns "Branch name" - (and (member start (magit-list-remote-branch-names)) - (mapconcat #'identity - (cdr (split-string start "/")) - "/"))))) + (let ((def (mapconcat #'identity + (cdr (split-string start "/")) + "/"))) + (and (member start (magit-list-remote-branch-names)) + (not (member def (magit-list-local-branch-names))) + def))))) (t (setq branch (magit-read-string-ns "Branch name")) (setq start (magit-read-starting-point prompt)))) @@ -1522,12 +1578,83 @@ With prefix, forces the rename even if NEW already exists. (interactive (let ((branch (magit-read-local-branch "Rename branch"))) (list branch - (magit-read-string-ns (format "Rename branch '%s' to" branch)) + (magit-read-string-ns (format "Rename branch '%s' to" branch) + nil 'magit-revision-history) current-prefix-arg))) (unless (string= old new) (magit-run-git "branch" (if force "-M" "-m") old new))) -;;;;; Branch Variables +;;;;; Branch Config Popup + +(defvar magit-branch-config-branch nil) + +;;;###autoload +(defun magit-branch-config-popup (branch) + "Popup console for setting branch variables." + (interactive + (list (if (or current-prefix-arg + (and (eq magit-current-popup 'magit-branch-popup) + magit-branch-popup-show-variables)) + (magit-read-local-branch "Configure branch") + (magit-get-current-branch)))) + (let ((magit-branch-config-branch branch)) + (magit-invoke-popup 'magit-branch-config-popup nil nil))) + +(defvar magit-branch-config-variables + '((lambda () + (concat + (propertize "Configure " 'face 'magit-popup-heading) + (propertize (magit-branch-config-branch) 'face 'magit-branch-local))) + (?d "branch.%s.description" + magit-edit-branch*description + magit-format-branch*description) + (?u "branch.%s.merge" + magit-set-branch*merge/remote + magit-format-branch*merge/remote) + (?r "branch.%s.rebase" + magit-cycle-branch*rebase + magit-format-branch*rebase) + (?p "branch.%s.pushRemote" + magit-cycle-branch*pushRemote + magit-format-branch*pushRemote) + "Configure repository defaults" + (?\M-r "pull.rebase" + magit-cycle-pull.rebase + magit-format-pull.rebase) + (?\M-p "remote.pushDefault" + magit-cycle-remote.pushDefault + magit-format-remote.pushDefault) + "Configure branch creation" + (?U "branch.autoSetupMerge" + magit-cycle-branch*autoSetupMerge + magit-format-branch*autoSetupMerge) + (?R "branch.autoSetupRebase" + magit-cycle-branch*autoSetupRebase + magit-format-branch*autoSetupRebase))) + +(defvar magit-branch-config-popup + `(:man-page "git-branch" + :variables ,magit-branch-config-variables + :default-action magit-checkout + :setup-function magit-branch-config-popup-setup)) + +(defun magit-branch-config-popup-setup (val def) + (magit-popup-default-setup val def) + (setq-local magit-branch-config-branch magit-branch-config-branch) + (use-local-map (copy-keymap magit-popup-mode-map)) + (dolist (ev (-filter #'magit-popup-event-p (magit-popup-get :variables))) + (local-set-key (vector (magit-popup-event-key ev)) + 'magit-invoke-popup-action))) + +(defun magit-branch-config-branch (&optional prompt) + (if prompt + (or (and (not current-prefix-arg) + (or magit-branch-config-branch + (magit-get-current-branch))) + (magit-read-local-branch prompt)) + (or magit-branch-config-branch + (magit-get-current-branch) + ""))) ;;;###autoload (defun magit-edit-branch*description (branch) @@ -1536,10 +1663,7 @@ With a prefix argument edit the description of another branch. The description for the branch named NAME is stored in the Git variable `branch..description'." - (interactive - (list (or (and (not current-prefix-arg) - (magit-get-current-branch)) - (magit-read-local-branch "Edit branch description")))) + (interactive (list (magit-branch-config-branch "Edit branch description"))) (magit-run-git-with-editor "branch" "--edit-description" branch)) (defun magit-edit-branch*description-check-buffers () @@ -1554,7 +1678,7 @@ variable `branch..description'." (add-hook 'find-file-hook 'magit-edit-branch*description-check-buffers) (defun magit-format-branch*description () - (let* ((branch (or (magit-get-current-branch) "")) + (let* ((branch (magit-branch-config-branch)) (width (+ (length branch) 19)) (var (format "branch.%s.description" branch))) (concat var " " (make-string (- width (length var)) ?\s) @@ -1580,23 +1704,20 @@ Non-interactively, when UPSTREAM is non-nil, then always set it as the new upstream, regardless of whether another upstream was already set. When nil, then always unset." (interactive - (let ((branch (or (and (not current-prefix-arg) - (magit-get-current-branch)) - (magit-read-local-branch "Change upstream of branch")))) + (let ((branch (magit-branch-config-branch "Change upstream of branch"))) (list branch (and (not (magit-get-upstream-branch branch)) (magit-read-upstream-branch))))) (if upstream - (-let (((remote . merge) (magit-split-branch-name upstream)) - (branch (magit-get-current-branch))) - (magit-call-git "config" (format "branch.%s.remote" branch) remote) - (magit-call-git "config" (format "branch.%s.merge" branch) - (concat "refs/heads/" merge))) + (-let (((remote . merge) (magit-split-branch-name upstream))) + (setf (magit-get (format "branch.%s.remote" branch)) remote) + (setf (magit-get (format "branch.%s.merge" branch)) + (concat "refs/heads/" merge))) (magit-call-git "branch" "--unset-upstream" branch)) (when (called-interactively-p 'any) (magit-refresh))) (defun magit-format-branch*merge/remote () - (let* ((branch (or (magit-get-current-branch) "")) + (let* ((branch (magit-branch-config-branch)) (width (+ (length branch) 20)) (varM (format "branch.%s.merge" branch)) (varR (format "branch.%s.remote" branch)) @@ -1626,16 +1747,14 @@ When `false' then pulling is done by merging. When that variable is undefined then the value of `pull.rebase' is used instead. It defaults to `false'." - (interactive - (list (or (and (not current-prefix-arg) - (magit-get-current-branch)) - (magit-read-local-branch "Cycle branch..rebase for")))) + (interactive (list (magit-branch-config-branch + "Cycle branch..rebase for"))) (magit-popup-set-variable (format "branch.%s.rebase" branch) '("true" "false") "false" "pull.rebase")) (defun magit-format-branch*rebase () - (let ((branch (or (magit-get-current-branch) ""))) + (let ((branch (magit-branch-config-branch))) (magit-popup-format-variable (format "branch.%s.rebase" branch) '("true" "false") "false" "pull.rebase" @@ -1653,16 +1772,14 @@ to be the name of an existing remote. If that variable is undefined, then the value of the Git variable `remote.pushDefault' is used instead, provided that it is defined, which by default it is not." - (interactive - (list (or (and (not current-prefix-arg) - (magit-get-current-branch)) - (magit-read-local-branch "Cycle branch..pushRemote for")))) + (interactive (list (magit-branch-config-branch + "Cycle branch..pushRemote for"))) (magit-popup-set-variable (format "branch.%s.pushRemote" branch) (magit-list-remotes) "remote.pushDefault")) (defun magit-format-branch*pushRemote () - (let ((branch (or (magit-get-current-branch) ""))) + (let ((branch (magit-branch-config-branch))) (magit-popup-format-variable (format "branch.%s.pushRemote" branch) (magit-list-remotes) nil "remote.pushDefault" @@ -2057,6 +2174,99 @@ If DEFAULT is non-nil, use this as the default value instead of (car (member (or default (magit-current-file)) files)))))) ;;; Miscellaneous +;;;; Worktree + +;;;###autoload +(defun magit-worktree-checkout (path branch) + (interactive + (let ((branch (magit-read-local-branch "Checkout"))) + (list (read-directory-name (format "Checkout %s in new worktree: " branch)) + branch))) + "Checkout BRANCH in a new worktree at PATH." + (magit-run-git "worktree" "add" path branch) + (magit-diff-visit-directory path)) + +;;;###autoload +(defun magit-worktree-branch (path branch start-point &optional force) + "Create a new BRANCH and check it out in a new worktree at PATH." + (interactive + `(,(read-directory-name "Create worktree: ") + ,@(butlast (magit-branch-read-args "Create and checkout branch")) + ,current-prefix-arg)) + (magit-run-git "worktree" "add" (if force "-B" "-b") branch path start-point) + (magit-diff-visit-directory path)) + +(defun magit-worktree-delete (worktree) + "Delete a worktree, defaulting to the worktree at point. +The primary worktree cannot be deleted." + (interactive + (list (magit-completing-read "Delete worktree" + (cdr (magit-list-worktrees)) + nil t nil nil + (magit-section-when (worktree))))) + (if (file-directory-p (expand-file-name ".git" worktree)) + (user-error "Deleting %s would delete the shared .git directory" worktree) + (let ((primary (file-name-as-directory (caar (magit-list-worktrees))))) + (when (if magit-delete-by-moving-to-trash + (magit-confirm-files 'trash (list "worktree")) + (magit-confirm-files 'delete (list "worktree"))) + (let ((delete-by-moving-to-trash magit-delete-by-moving-to-trash)) + (delete-directory worktree t magit-delete-by-moving-to-trash)) + (if (file-exists-p default-directory) + (magit-run-git "worktree" "prune") + (let ((default-directory primary)) + (magit-run-git "worktree" "prune"))))))) + +(defun magit-worktree-status (worktree) + "Show the status for the worktree at point. +If there is no worktree at point, then read one in the +minibuffer. If the worktree at point is the one whose +status is already being displayed in the current buffer, +then show it in Dired instead." + (interactive + (list (or (magit-section-when (worktree)) + (magit-completing-read + "Show status for worktree" + (cl-delete (directory-file-name (magit-toplevel)) + (magit-list-worktrees) + :test #'equal :key #'car))))) + (magit-diff-visit-directory worktree)) + +(defvar magit-worktree-section-map + (let ((map (make-sparse-keymap))) + (define-key map [remap magit-visit-thing] 'magit-worktree-status) + (define-key map [remap magit-delete-thing] 'magit-worktree-delete) + map) + "Keymap for `worktree' sections.") + +(defun magit-insert-worktrees () + "Insert sections for all worktrees. +If there is only one worktree, then insert nothing." + (let ((worktrees (magit-list-worktrees))) + (when (> (length worktrees) 1) + (magit-insert-section (worktrees) + (magit-insert-heading "Worktrees:") + (let* ((cols + (mapcar (-lambda ((path barep commit branch)) + (cons (cond + (branch (propertize branch + 'face 'magit-branch-local)) + (commit (propertize (magit-rev-abbrev commit) + 'face 'magit-hash)) + (barep "(bare)")) + path)) + worktrees)) + (align (1+ (-max (--map (string-width (car it)) cols))))) + (pcase-dolist (`(,head . ,path) cols) + (magit-insert-section (worktree path) + (insert head) + (indent-to align) + (insert (let ((r (file-relative-name path)) + (a (abbreviate-file-name path))) + (if (< (string-width r) (string-width a)) r a))) + (insert ?\n)))) + (insert ?\n))))) + ;;;; Tag ;;;###autoload (autoload 'magit-tag-popup "magit" nil t) @@ -2280,13 +2490,15 @@ the current repository." (magit-define-popup magit-file-popup "Popup console for Magit commands in file-visiting buffers." :actions '((?s "Stage" magit-stage-file) - (?d "Diff" magit-diff-buffer-file-popup) + (?d "Diff" magit-diff-buffer-file) + (?l "Log" magit-log-buffer-file) (?b "Blame" magit-blame-popup) (?u "Unstage" magit-unstage-file) - (?l "Log" magit-log-buffer-file) + (?D "Diff..." magit-diff-buffer-file-popup) + (?L "Log..." magit-log-buffer-file-popup) (?p "Find blob" magit-blob-previous) (?c "Commit" magit-commit-popup)) - :max-action-columns 3) + :max-action-columns 4) (defvar magit-file-mode-lighter "") @@ -2514,7 +2726,102 @@ Run the command in the top-level directory of the current repository. nil 'magit-git-command-history) dir))) -;;;; Read Repository +;;;; Repository List + +;;;###autoload +(defun magit-list-repositories () + "Display a list of repositories. + +Use the options `magit-repository-directories' +and `magit-repository-directories-depth' to +control which repositories are displayed." + (interactive) + (with-current-buffer (get-buffer-create "*Magit Repositories*") + (magit-repolist-mode) + (setq tabulated-list-entries + (mapcar (-lambda ((id . path)) + (let ((default-directory path)) + (list path + (vconcat (--map (or (funcall (nth 2 it) id) "") + magit-repolist-columns))))) + (magit-list-repos-uniquify + (--map (cons (file-name-nondirectory (directory-file-name it)) + it) + (magit-list-repos))))) + (tabulated-list-print) + (switch-to-buffer (current-buffer)))) + +(defvar magit-repolist-mode-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map tabulated-list-mode-map) + (define-key map "g" 'magit-list-repositories) + (define-key map "\r" 'magit-repolist-status) + map) + "Local keymap for Magit-Repolist mode buffers.") + +(defun magit-repolist-status (&optional _button) + "Show the status for the repository at point." + (interactive) + (--if-let (tabulated-list-get-id) + (magit-status-internal it) + (user-error "There is no repository at point"))) + +(define-derived-mode magit-repolist-mode tabulated-list-mode "Repos" + "Major mode for browsing a list of Git repositories." + (setq x-stretch-cursor nil) + (setq tabulated-list-padding 0) + (setq tabulated-list-sort-key (cons "Name" nil)) + (setq tabulated-list-format + (vconcat (mapcar (-lambda ((title width _fn props)) + (nconc (list title width t) + (-flatten props))) + magit-repolist-columns))) + (tabulated-list-init-header)) + +(defun magit-repolist-column-ident (id) + "Insert the identification of the repository. +Usually this is just its basename." + id) + +(defun magit-repolist-column-path (_id) + "Insert the absolute path of the repository." + (abbreviate-file-name default-directory)) + +(defun magit-repolist-column-version (_id) + "Insert a description of the repository's `HEAD' revision." + (let ((v (or (magit-git-string "describe" "--tags") + ;; If there are no tags, use the date in MELPA format. + (magit-git-string "show" "--no-patch" "--format=%cd-g%h" + "--date=format:%Y%m%d.%H%M")))) + (if (string-match-p "\\`[0-9]" v) + (concat " " v) + v))) + +(defun magit-repolist-column-unpulled-from-upstream (_id) + "Insert number of upstream commits not in the current branch." + (--when-let (magit-get-upstream-branch) + (let ((n (cadr (magit-rev-diff-count "HEAD" it)))) + (propertize (number-to-string n) 'face (if (> n 0) 'bold 'shadow))))) + +(defun magit-repolist-column-unpulled-from-pushremote (_id) + "Insert number of commits in the push branch but not the current branch." + (--when-let (magit-get-push-branch) + (when (magit-rev-parse-p it) + (let ((n (cadr (magit-rev-diff-count "HEAD" it)))) + (propertize (number-to-string n) 'face (if (> n 0) 'bold 'shadow)))))) + +(defun magit-repolist-column-unpushed-to-upstream (_id) + "Insert number of commits in the current branch but not its upstream." + (--when-let (magit-get-upstream-branch) + (let ((n (car (magit-rev-diff-count "HEAD" it)))) + (propertize (number-to-string n) 'face (if (> n 0) 'bold 'shadow))))) + +(defun magit-repolist-column-unpushed-to-pushremote (_id) + "Insert number of commits in the current branch but not its push branch." + (--when-let (magit-get-push-branch) + (when (magit-rev-parse-p it) + (let ((n (car (magit-rev-diff-count "HEAD" it)))) + (propertize (number-to-string n) 'face (if (> n 0) 'bold 'shadow)))))) (defun magit-read-repository (&optional read-directory-name) "Read a Git repository in the minibuffer, with completion. @@ -2530,7 +2837,9 @@ With prefix argument simply read a directory name using `read-directory-name'." (if (and (not read-directory-name) magit-repository-directories) (let* ((repos (magit-list-repos-uniquify - (--map (cons (file-name-nondirectory it) it) + (--map (cons (file-name-nondirectory + (directory-file-name it)) + it) (magit-list-repos)))) (reply (magit-completing-read "Git repository" repos))) (file-name-as-directory @@ -2543,7 +2852,9 @@ With prefix argument simply read a directory name using (or (magit-toplevel) default-directory))))) (defun magit-list-repos () - (--mapcat (magit-list-repos-1 it magit-repository-directories-depth) + (--mapcat (if (consp it) + (magit-list-repos-1 (car it) (cdr it)) + (magit-list-repos-1 it magit-repository-directories-depth)) magit-repository-directories)) (defun magit-list-repos-1 (directory depth) @@ -2569,7 +2880,7 @@ With prefix argument simply read a directory name using key "\\" (file-name-nondirectory (directory-file-name - (substring it 0 (- (length key)))))) + (substring it 0 (- (1+ (length key))))))) it) value)))))) dict) @@ -2718,7 +3029,7 @@ When the region is active, then save that to the `kill-ring', like `kill-ring-save' would, instead of behaving as described above." (interactive) - (if (region-active-p) + (if (use-region-p) (copy-region-as-kill (mark) (point) 'region) (-when-let* ((section (magit-current-section)) (value (magit-section-value section))) @@ -2761,7 +3072,7 @@ When the region is active, then save that to the `kill-ring', like `kill-ring-save' would, instead of behaving as described above." (interactive) - (if (region-active-p) + (if (use-region-p) (copy-region-as-kill (mark) (point) 'region) (-when-let (rev (cond ((memq major-mode '(magit-cherry-mode magit-log-select-mode @@ -2826,7 +3137,7 @@ Git, and Emacs in the echo area." (gitdir (expand-file-name ".git" (file-name-directory (directory-file-name topdir)))) - (static (expand-file-name "magit-version.el" topdir))) + (static (locate-library "magit-version.el" nil (list topdir)))) (or (progn (push 'repo debug) (when (and (file-exists-p gitdir) @@ -2836,14 +3147,14 @@ Git, and Emacs in the echo area." (push t debug) ;; Inside the repo the version file should only exist ;; while running make. - (unless noninteractive + (when (and static (not noninteractive)) (ignore-errors (delete-file static))) (setq magit-version (let ((default-directory topdir)) (magit-git-string "describe" "--tags" "--dirty"))))) (progn (push 'static debug) - (when (file-exists-p static) + (when (and static (file-exists-p static)) (push t debug) (load-file static) magit-version)) @@ -2974,6 +3285,7 @@ doesn't find the executable, then consult the info node (require 'magit-blame) (unless (load "magit-autoloads" t t) (require 'magit-submodule) + (require 'magit-subtree) (require 'magit-ediff) (require 'magit-extras) (require 'git-rebase))) diff --git a/elpa/magit-20160624.2127/magit.info b/elpa/magit-20160624.2127/magit.info new file mode 100644 index 0000000..569a420 --- /dev/null +++ b/elpa/magit-20160624.2127/magit.info @@ -0,0 +1,175 @@ +This is magit.info, produced by makeinfo version 5.2 from magit.texi. + +Magit is an interface to the version control system Git, implemented as +an Emacs package. Magit aspires to be a complete Git porcelain. While +we cannot (yet) claim that Magit wraps and improves upon each and every +Git command, it is complete enough to allow even experienced Git users +to perform almost all of their daily version control tasks directly from +within Emacs. While many fine Git clients exist, only Magit and Git +itself deserve to be called porcelains. + + Copyright (C) 2015-2016 Jonas Bernoulli + + You can redistribute this document 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. + + This document 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. +INFO-DIR-SECTION Emacs +START-INFO-DIR-ENTRY +* Magit: (magit). Using Git from Emacs with Magit. +END-INFO-DIR-ENTRY + + +Indirect: +magit.info-1: 1222 +magit.info-2: 312586 + +Tag Table: +(Indirect) +Node: Top1222 +Node: Introduction6389 +Node: Installation11082 +Node: Updating from an older release11457 +Node: Installing from an Elpa archive13052 +Node: Installing from the Git repository14391 +Node: Post-installation tasks17187 +Node: Getting started18576 +Node: Interface concepts24311 +Node: Modes and Buffers24585 +Node: Switching Buffers26330 +Node: Naming Buffers30988 +Node: Quitting Windows33823 +Node: Automatic Refreshing of Magit Buffers35455 +Node: Automatic Saving of File-Visiting Buffers38223 +Node: Automatic Reverting of File-Visiting Buffers39408 +Node: Risk of Reverting Automatically44404 +Node: Sections46787 +Node: Section movement47728 +Node: Section visibility51655 +Node: Section hooks55246 +Node: Section types and values57527 +Node: Section options58797 +Node: Popup buffers and prefix commands59269 +Node: Completion and confirmation60583 +Node: Running Git63489 +Node: Viewing Git output63725 +Node: Running Git manually64725 +Node: Git executable66851 +Node: Global Git arguments68858 +Node: Inspecting69665 +Node: Status buffer70812 +Node: Status sections73677 +Node: Status header sections79086 +Node: Status options81643 +Node: Repository list82367 +Node: Logging84504 +Node: Refreshing logs87242 +Node: Log Buffer88627 +Node: Select from log91716 +Node: Reflog92656 +Node: Diffing93134 +Node: Refreshing diffs96154 +Node: Diff buffer99135 +Node: Diff options101037 +Node: Revision buffer102793 +Node: Ediffing103748 +Node: References buffer107338 +Node: References sections112048 +Node: Bisecting112923 +Node: Visiting blobs114419 +Node: Blaming114928 +Node: Manipulating118248 +Node: Repository setup118564 +Node: Staging and unstaging119604 +Node: Staging from file-visiting buffers123693 +Node: Applying124861 +Node: Committing126754 +Node: Initiating a commit127337 +Node: Editing commit messages130649 +Node: Branching141045 +Node: The two remotes141245 +Node: The branch popup143789 +Node: The branch config popup149878 +Node: Merging155784 +Node: Resolving conflicts157952 +Ref: orgradiotarget1159037 +Node: Rebasing162909 +Node: Editing rebase sequences166550 +Node: Information about in-progress rebase169580 +Ref: Information about in-progress rebase-Footnote-1176416 +Node: Cherry picking177002 +Node: Reverting178608 +Node: Resetting179971 +Node: Stashing181483 +Node: Transferring184657 +Node: Remotes184895 +Node: Fetching186181 +Node: Pulling187547 +Node: Pushing188393 +Node: Creating and sending patches193137 +Node: Applying patches193832 +Node: Miscellaneous194830 +Node: Tagging195133 +Node: Notes195918 +Node: Submodules198443 +Node: Subtree199755 +Node: Common commands201003 +Node: Wip modes202748 +Node: Minor mode for buffers visiting files209484 +Node: Minor mode for buffers visiting blobs212958 +Node: Customizing213763 +Node: Per-repository configuration215435 +Node: Essential settings217069 +Node: Safety217393 +Node: Performance219226 +Node: Plumbing227185 +Node: Calling Git227813 +Node: Getting a value from Git229336 +Node: Calling Git for effect232440 +Node: Section plumbing238944 +Node: Creating sections239172 +Node: Section selection243071 +Node: Matching sections244751 +Node: Refreshing buffers249960 +Node: Conventions253095 +Node: Confirmation and completion253272 +Node: Theming Faces254170 +Node: FAQ262321 +Node: Magit is slow263934 +Node: I changed several thousand files at once and now Magit is unusable264135 +Node: I am having problems committing264851 +Node: Diffs are collapsed after un-/staging265297 +Node: I don't understand how branching and pushing work266775 +Node: I don't like the key binding in v24267150 +Node: I cannot install the pre-requisites for Magit v2267489 +Node: I am using an Emacs release older than v244267954 +Node: I am using a Git release older than v194269567 +Node: I am using MS Windows and cannot push with Magit270554 +Node: I am using OS X and SOMETHING works in shell but not in Magit271158 +Node: How to install the gitman info manual?271949 +Node: How can I show Git's output?274490 +Node: Diffs contain control sequences275277 +Node: Expanding a file to show the diff causes it to disappear276282 +Node: Point is wrong in the ‘COMMIT_EDITMSG’ buffer276817 +Node: The mode-line information isn't always up-to-date277847 +Node: Can Magit be used as ‘ediff-version-control-package’?278915 +Node: How to show diffs for gpg-encrypted files?280959 +Node: Emacs 245 hangs when loading Magit281556 +Node: Symbol's value as function is void ‘--some’282131 +Node: Where is the branch manager282465 +Node: Keystroke Index282756 +Node: Command Index312586 +Node: Function Index342376 +Node: Variable Index356051 + +End Tag Table + + +Local Variables: +coding: utf-8 +End: diff --git a/elpa/magit-20160425.430/magit.info-1 b/elpa/magit-20160624.2127/magit.info-1 similarity index 89% rename from elpa/magit-20160425.430/magit.info-1 rename to elpa/magit-20160624.2127/magit.info-1 index 71e27ad..4e69838 100644 --- a/elpa/magit-20160425.430/magit.info-1 +++ b/elpa/magit-20160624.2127/magit.info-1 @@ -120,6 +120,7 @@ Running Git Inspecting * Status buffer:: +* Repository list:: * Logging:: * Diffing:: * Ediffing:: @@ -164,6 +165,7 @@ Manipulating * Committing:: * Branching:: * Merging:: +* Resolving conflicts:: * Rebasing:: * Cherry picking:: * Resetting:: @@ -182,12 +184,19 @@ Committing * Editing commit messages:: +Branching + +* The two remotes:: +* The branch popup:: +* The branch config popup:: + + Rebasing * Editing rebase sequences:: -* Rebase sequence log:: +* Information about in-progress rebase:: Cherry picking @@ -210,6 +219,7 @@ Miscellaneous * Tagging:: * Notes:: * Submodules:: +* Subtree:: * Common commands:: * Wip modes:: * Minor mode for buffers visiting files:: @@ -272,10 +282,11 @@ FAQ * Diffs contain control sequences:: * Expanding a file to show the diff causes it to disappear:: * Point is wrong in the ‘COMMIT_EDITMSG’ buffer:: +* The mode-line information isn't always up-to-date:: * Can Magit be used as ‘ediff-version-control-package’?:: * How to show diffs for gpg-encrypted files?:: * Emacs 24.5 hangs when loading Magit: Emacs 245 hangs when loading Magit. -* ‘Symbol's value as function is void --some’:: +* Symbol's value as function is void ‘--some’:: * Where is the branch manager::  @@ -704,7 +715,7 @@ buffers whose major-modes derive from ‘magit-mode’. This command locks the current buffer to its value or if the buffer is already locked, then it unlocks it. - Locking a buffer to its value, prevents it from being reused to + Locking a buffer to its value prevents it from being reused to display another value. The name of a locked buffer contains its value, which allows telling it apart from other locked buffers and the unlocked buffer. @@ -757,6 +768,13 @@ File: magit.info, Node: Switching Buffers, Next: Naming Buffers, Up: Modes an function should call ‘display-buffer’ with that buffer as first and a list of display actions as second argument. + Magit provides several functions, listed below, that are suitable + values for this option. If you want to use different rules, then a + good way of doing that is to start with a copy of one of these + functions and then adjust it to your needs. More functions to + choose from will likely be added in the future, and eventually the + default will change. + Instead of using a wrapper around ‘display-buffer’, that function itself can be used here, in which case the display actions have to be specified by adding them to ‘display-buffer-alist’ instead. @@ -772,10 +790,36 @@ File: magit.info, Node: Switching Buffers, Next: Naming Buffers, Up: Modes an over the code base but now all the rules are contained in this one function (except for the "noselect" special case mentioned above). - If you want to use different rules, then a good way of doing that - is to start with a copy of this function and then adjust it to your - needs. More functions to choose from will be added in the future, - and eventually the default will change. + -- Function: magit-display-buffer-same-window-except-diff-v1 + + This function displays most buffers in the currently selected + window. If a buffer’s mode derives from ‘magit-diff-mode’ or + ‘magit-process-mode’, it is displayed in another window. + + -- Function: magit-display-buffer-fullframe-status-v1 + + This function fills the entire frame when displaying a status + buffer. Otherwise, it behaves like + ‘magit-display-buffer-traditional’. + + -- Function: magit-display-buffer-fullframe-status-topleft-v1 + + This function fills the entire frame when displaying a status + buffer. It behaves like ‘magit-display-buffer-fullframe-status-v1’ + except that it displays buffers that derive from ‘magit-diff-mode’ + or ‘magit-process-mode’ to the top or left of the current buffer + rather than to the bottom or right. As a result, Magit buffers + tend to pop up on the same side as they would if + ‘magit-display-buffer-traditional’ were in use. + + -- Function: magit-display-buffer-fullcolumn-most-v1 + + This function displays most buffers so that they fill the entire + height of the frame. However, the buffer is displayed in another + window if 1) the buffer’s mode derives from ‘magit-process-mode’, + or 2) the buffer’s mode derives from ‘magit-diff-mode’, provided + that the mode of the current buffer derives from ‘magit-log-mode’ + or ‘magit-cherry-mode’. -- User Option: magit-pre-display-buffer-hook @@ -1773,6 +1817,7 @@ described later. * Menu: * Status buffer:: +* Repository list:: * Logging:: * Diffing:: * Ediffing:: @@ -1782,7 +1827,7 @@ described later. * Blaming::  -File: magit.info, Node: Status buffer, Next: Logging, Up: Inspecting +File: magit.info, Node: Status buffer, Next: Repository list, Up: Inspecting 5.1 Status buffer ================= @@ -1813,15 +1858,20 @@ that it should be bound globally. We recommend using ‘C-x g’: -- User Option: magit-repository-directories - Directories containing Git repositories. Magit checks these - directories for Git repositories and offers them as choices when - ‘magit-status’ is used with a prefix argument. + List of directories that are or contain Git repositories. Each + element has the form ‘(DIRECTORY . DEPTH)’ or, for backward + compatibility, just DIRECTORY. DIRECTORY has to be a directory or a + directory file-name, a string. DEPTH, an integer, specifies the + maximum depth to look for Git repositories. If it is 0, then only + add DIRECTORY itself. For elements that are strings, the value of + option ‘magit-repository-directories-depth’ specifies the depth. -- User Option: magit-repository-directories-depth - The maximum depth to look for Git repositories. When looking for a - Git repository below the directories in - ‘magit-repository-directories’, only descend this many levels deep. + The maximum depth to look for Git repositories. This option is + obsolete and only used for elements of the option + ‘magit-repository-directories’ (which see) that don’t specify the + depth directly. -- Command: ido-enter-magit-status @@ -2032,7 +2082,7 @@ variable. Hook run to insert headers sections into the status buffer. This hook is run by ‘magit-insert-status-headers’, which in turn - has to be a member of ‘magit-insert-status-sections’ to be used at + has to be a member of ‘magit-status-sections-hook’ to be used at all. By default the following functions are members of the above hook: @@ -2110,9 +2160,73 @@ File: magit.info, Node: Status options, Prev: Status header sections, Up: Sta buffers.  -File: magit.info, Node: Logging, Next: Diffing, Prev: Status buffer, Up: Inspecting +File: magit.info, Node: Repository list, Next: Logging, Prev: Status buffer, Up: Inspecting -5.2 Logging +5.2 Repository list +=================== + + -- Command: magit-list-repositories + + This command displays a list of repositories. + + The options ‘magit-repository-directories’ and + ‘magit-repository-directories-depth’ control which repositories are + displayed. + + -- User Option: magit-repolist-columns + + This option controls what columns are displayed by the command + ‘magit-list-repositories’ and how they are displayed. + + Each element has the form ‘(HEADER WIDTH FORMAT PROPS)’. + + HEADER is the string displayed in the header. WIDTH is the width + of the column. FORMAT is a function that is called with one + argument, the repository identification (usually its basename), and + with ‘default-directory’ bound to the toplevel of its working tree. + It has to return a string to be inserted or nil. PROPS is an alist + that supports the keys ‘:right-align’ and ‘:pad-right’. + + The following functions can be added to the above option: + + -- Function: magit-repolist-column-ident + + This function inserts the identification of the repository. + Usually this is just its basename. + + -- Function: magit-repolist-column-path + + This function inserts the absolute path of the repository. + + -- Function: magit-repolist-column-version + + This function inserts a description of the repository’s ‘HEAD’ + revision. + + -- Function: magit-repolist-column-unpulled-from-upstream + + This function inserts the number of upstream commits not in the + current branch. + + -- Function: magit-repolist-column-unpulled-from-pushremote + + This function inserts the number of commits in the push branch but + not the current branch. + + -- Function: magit-repolist-column-unpushed-to-upstream + + This function inserts the number of commits in the current branch + but not its upstream. + + -- Function: magit-repolist-column-unpushed-to-pushremote + + This function inserts the number of commits in the current branch + but not its push branch. + + +File: magit.info, Node: Logging, Next: Diffing, Prev: Repository list, Up: Inspecting + +5.3 Logging =========== The status buffer contains logs for the unpushed and unpulled commits, @@ -2180,6 +2294,10 @@ Reflog: Reflog. Show log for the file visited in the current buffer. + Two additional commands that show the log for the file or blob that +is being visited in the current buffer exists, see *note Minor mode for +buffers visiting files: Minor mode for buffers visiting files. + * Menu: * Refreshing logs:: @@ -2190,7 +2308,7 @@ Reflog: Reflog.  File: magit.info, Node: Refreshing logs, Next: Log Buffer, Up: Logging -5.2.1 Refreshing logs +5.3.1 Refreshing logs --------------------- The prefix command ‘magit-log-refresh-popup’, on ‘L’, can be used to @@ -2230,7 +2348,7 @@ the status buffer.  File: magit.info, Node: Log Buffer, Next: Select from log, Prev: Refreshing logs, Up: Logging -5.2.2 Log Buffer +5.3.2 Log Buffer ---------------- ‘L’ (‘magit-log-refresh-popup’) @@ -2314,7 +2432,7 @@ File: magit.info, Node: Log Buffer, Next: Select from log, Prev: Refreshing l  File: magit.info, Node: Select from log, Next: Reflog, Prev: Log Buffer, Up: Logging -5.2.3 Select from log +5.3.3 Select from log --------------------- When the user has to select a recent commit that is reachable from @@ -2340,7 +2458,7 @@ is used for selection:  File: magit.info, Node: Reflog, Prev: Select from log, Up: Logging -5.2.4 Reflog +5.3.4 Reflog ------------ Also see *note (gitman)git-reflog:: . @@ -2363,7 +2481,7 @@ Logging: Logging.  File: magit.info, Node: Diffing, Next: Ediffing, Prev: Logging, Up: Inspecting -5.3 Diffing +5.4 Diffing =========== The status buffer contains diffs for the staged and unstaged commits, @@ -2436,6 +2554,10 @@ another buffer: Show all diffs of a stash in a buffer. + Two additional commands that show the diff for the file or blob that +is being visited in the current buffer exists, see *note Minor mode for +buffers visiting files: Minor mode for buffers visiting files. + * Menu: * Refreshing diffs:: @@ -2446,7 +2568,7 @@ another buffer:  File: magit.info, Node: Refreshing diffs, Next: Diff buffer, Up: Diffing -5.3.1 Refreshing diffs +5.4.1 Refreshing diffs ---------------------- The prefix command ‘magit-diff-refresh-popup’, on ‘D’, can be used to @@ -2534,7 +2656,7 @@ without having to using one of the diff popups.  File: magit.info, Node: Diff buffer, Next: Diff options, Prev: Refreshing diffs, Up: Diffing -5.3.2 Diff buffer +5.4.2 Diff buffer ----------------- ‘RET’ (‘magit-diff-visit-file’) @@ -2586,7 +2708,7 @@ File: magit.info, Node: Diff buffer, Next: Diff options, Prev: Refreshing dif  File: magit.info, Node: Diff options, Next: Revision buffer, Prev: Diff buffer, Up: Diffing -5.3.3 Diff options +5.4.3 Diff options ------------------ -- User Option: magit-diff-refine-hunk @@ -2634,7 +2756,7 @@ File: magit.info, Node: Diff options, Next: Revision buffer, Prev: Diff buffe  File: magit.info, Node: Revision buffer, Prev: Diff options, Up: Diffing -5.3.4 Revision buffer +5.4.4 Revision buffer --------------------- -- User Option: magit-revision-insert-related-refs @@ -2660,9 +2782,12 @@ File: magit.info, Node: Revision buffer, Prev: Diff options, Up: Diffing  File: magit.info, Node: Ediffing, Next: References buffer, Prev: Diffing, Up: Inspecting -5.4 Ediffing +5.5 Ediffing ============ +This section describes how to enter Ediff from Magit buffers. For +information on how to use Ediff itself, see *note (ediff)Top::. + ‘e’ (‘magit-ediff-dwim’) Compare, stage, or resolve using Ediff. @@ -2755,7 +2880,7 @@ File: magit.info, Node: Ediffing, Next: References buffer, Prev: Diffing, Up  File: magit.info, Node: References buffer, Next: Bisecting, Prev: Ediffing, Up: Inspecting -5.5 References buffer +5.6 References buffer ===================== ‘y’ (‘magit-show-refs-popup’) @@ -2886,7 +3011,7 @@ accustomed to that inconsistency we are keeping it that way.  File: magit.info, Node: References sections, Up: References buffer -5.5.1 References sections +5.6.1 References sections ------------------------- The contents of references buffers is controlled using the hook @@ -2915,7 +3040,7 @@ used for the status buffer.  File: magit.info, Node: Bisecting, Next: Visiting blobs, Prev: References buffer, Up: Inspecting -5.6 Bisecting +5.7 Bisecting ============= Also see *note (gitman)git-bisect:: . @@ -2967,7 +3092,7 @@ commands instead.  File: magit.info, Node: Visiting blobs, Next: Blaming, Prev: Bisecting, Up: Inspecting -5.7 Visiting blobs +5.8 Visiting blobs ================== ‘M-x magit-find-file’ (‘magit-find-file’) @@ -2983,7 +3108,7 @@ File: magit.info, Node: Visiting blobs, Next: Blaming, Prev: Bisecting, Up:  File: magit.info, Node: Blaming, Prev: Visiting blobs, Up: Inspecting -5.8 Blaming +5.9 Blaming =========== Also see *note (gitman)git-blame:: . @@ -3096,6 +3221,7 @@ File: magit.info, Node: Manipulating, Next: Transferring, Prev: Inspecting, * Committing:: * Branching:: * Merging:: +* Resolving conflicts:: * Rebasing:: * Cherry picking:: * Resetting:: @@ -3164,6 +3290,10 @@ Ediffing. Add the change at point to the staging area. + With a prefix argument and an untracked file (or files) at point, + stage the file but not its content. This makes it possible to + stage only a subset of the new file’s changes. + ‘S’ (‘magit-stage-modified’) Stage all changes to files modified in the worktree. Stage all new @@ -3288,6 +3418,9 @@ variants. Apply the change at point to the working tree. + With a prefix argument fallback to a 3-way merge. Doing so causes + the change to be applied to the index as well. + ‘k’ (‘magit-discard’) Remove the change at point from the working tree. @@ -3296,6 +3429,9 @@ variants. Reverse the change at point in the working tree. + With a prefix argument fallback to a 3-way merge. Doing so causes + the change to be applied to the index as well. + With a prefix argument all apply variants attempt a 3-way merge when appropriate (i.e. when ‘git apply’ is used internally). @@ -3676,6 +3812,18 @@ File: magit.info, Node: Branching, Next: Merging, Prev: Committing, Up: Mani 6.5 Branching ============= +* Menu: + +* The two remotes:: +* The branch popup:: +* The branch config popup:: + + +File: magit.info, Node: The two remotes, Next: The branch popup, Up: Branching + +6.5.1 The two remotes +--------------------- + The upstream branch of some local branch is the branch into which the commits on that local branch should eventually be merged, usually something like ‘origin/master’. For the ‘master’ branch itself the @@ -3712,18 +3860,176 @@ unpushed and unpulled for both the push-remote and the upstream. It’s fairly simple to configure these two remotes. The values of all the variables that are related to fetching, pulling, and pushing (as well as some other branch-related variables) can be inspected and -changed in the branching popup. It is also possible to set the -push-remote and/or upstream while pushing (see *note Pushing: Pushing.). +changed using the popup ‘magit-branch-config-popup’, which is a +sub-popup of many popups that deal with branches. It is also possible +to set the push-remote and/or upstream while pushing (see *note Pushing: +Pushing.). + + +File: magit.info, Node: The branch popup, Next: The branch config popup, Prev: The two remotes, Up: Branching + +6.5.2 The branch popup +---------------------- + +The popup ‘magit-branch-popup’ is used to create and checkout branches, +and to make changes to existing branches. It is not used to fetch, +pull, merge, rebase, or push branches, i.e. this popup deals with +branches themselves, not with the commits reachable from them. Those +features are available from separate popups. ‘b’ (‘magit-branch-popup’) This prefix command shows the following suffix commands in a popup - buffer. It also displays the values of the following variables and - allows changing their values. + buffer. + + By default it also displays the values of some branch-related Git + variables and allows changing their values, just like the + specialized ‘magit-branch-config-popup’ does. + + -- User Option: magit-branch-popup-show-variables + + Whether the ‘magit-branch-popup’ shows Git variables. This + defaults to t to avoid changing key bindings. When set to nil, no + variables are displayed directly in this popup, and the sub-popup + ‘magit-branch-config-popup’ has to be used indead to view and + change branch related variables. + +‘b b’ (‘magit-checkout’) + + Checkout a revision read in the minibuffer and defaulting to the + branch or arbitrary revision at point. If the revision is a local + branch then that becomes the current branch. If it is something + else then ‘HEAD’ becomes detached. Checkout fails if the working + tree or the staging area contain changes. + +‘b n’ (‘magit-branch’) + + Create a new branch. The user is asked for a branch or arbitrary + revision to use as the starting point of the new branch. When a + branch name is provided, then that becomes the upstream branch of + the new branch. The name of the new branch is also read in the + minibuffer. + + Also see option ‘magit-branch-prefer-remote-upstream’. + +‘b c’ (‘magit-branch-and-checkout’) + + This command creates a new branch like ‘magit-branch’, but then + also checks it out. + + Also see option ‘magit-branch-prefer-remote-upstream’. + +‘b s’ (‘magit-branch-spinoff’) + + This command creates and checks out a new branch starting at and + tracking the current branch. That branch in turn is reset to the + last commit it shares with its upstream. If the current branch has + no upstream or no unpushed commits, then the new branch is created + anyway and the previously current branch is not touched. + + This is useful to create a feature branch after work has already + began on the old branch (likely but not necessarily "master"). + + If the current branch is a member of the value of option + ‘magit-branch-prefer-remote-upstream’ (which see), then the current + branch will be used as the starting point as usual, but the + upstream of the starting-point may be used as the upstream of the + new branch, instead of the starting-point itself. + +‘b x’ (‘magit-branch-reset’) + + This command resets a branch, defaulting to the branch at point, to + the tip of another branch or any other commit. + + When the branch being reset is the current branch, then a hard + reset is performed. If there are any uncommitted changes, then the + user has to confirming the reset because those changes would be + lost. + + This is useful when you have started work on a feature branch but + realize it’s all crap and want to start over. + + When resetting to another branch and a prefix argument is used, + then the target branch is set as the upstream of the branch that is + being reset. + +‘b k’ (‘magit-branch-delete’) + + Delete one or multiple branches. If the region marks multiple + branches, then offer to delete those. Otherwise, prompt for a + single branch to be deleted, defaulting to the branch at point. + +‘b r’ (‘magit-branch-rename’) + + Rename a branch. The branch and the new name are read in the + minibuffer. With prefix argument the branch is renamed even if + that name conflicts with an existing branch. + + -- User Option: magit-branch-read-upstream-first + + When creating a branch, whether to read the upstream branch before + the name of the branch that is to be created. The default is + ‘nil’, and I recommend you leave it at that. + + -- User Option: magit-branch-prefer-remote-upstream + + This option specifies whether remote upstreams are favored over + local upstreams when creating new branches. + + When a new branch is created, Magit offers the branch, commit, or + stash as the default starting point of the new branch. If there is + no such thing at point, then it falls back to offer the current + branch as starting-point. The user may then accept that default or + pick something else. + + If the chosen starting-point is a branch, then it may also be set + as the upstream of the new branch, depending on the value of the + Git variable ‘branch.autoSetupMerge’. By default this is done for + remote branches, but not for local branches. + + You might prefer to always use some remote branch as upstream. If + the chosen starting-point is (1) a local branch, (2) whose name is + a member of the value of this option, (3) the upstream of that + local branch is a remote branch with the same name, and (4) that + remote branch can be fast-forwarded to the local branch, then the + chosen branch is used as starting-point, but its own upstream is + used as the upstream of the new branch. + + Assuming the chosen branch matches these conditions you would end + up with with e.g.: + + feature --upstream--> origin/master + + instead of + + feature --upstream--> master --upstream--> origin/master + + Which you prefer is a matter of personal preference. If you do + prefer the former, then you should add branches such as ‘master’, + ‘next’, and ‘maint’ to the value of this options. + + +File: magit.info, Node: The branch config popup, Prev: The branch popup, Up: Branching + +6.5.3 The branch config popup +----------------------------- + + -- Command: magit-branch-popup + + This prefix command shows the following branch-related Git + variables in a popup buffer. The values can be changed from that + buffer. + + This popup is a sub-popup of several popups that deal with + branches, including ‘magit-branch-popup’, ‘magit-pull-popup’, + ‘magit-fetch-popup’, ‘magit-pull-and-fetch-popup’, and + ‘magit-push-popup’. In all of these popups "C" is bound to this + popup. The following variables are used to configure a specific branch. The values are being displayed for the current branch (if any). To change -the value for another branch use a prefix argument. +the value for another branch invoke ‘magit-branch-config-popup’ with a +prefix argument. -- Variable: branch.NAME.merge @@ -3852,127 +4158,14 @@ e.g.: ‘magit-read-starting-point’, which includes all commands that change the upstream and many which create new branches. -‘b b’ (‘magit-checkout’) - - Checkout a revision read in the minibuffer and defaulting to the - branch or arbitrary revision at point. If the revision is a local - branch then that becomes the current branch. If it is something - else then ‘HEAD’ becomes detached. Checkout fails if the working - tree or the staging area contain changes. - -‘b n’ (‘magit-branch’) - - Create a new branch. The user is asked for a branch or arbitrary - revision to use as the starting point of the new branch. When a - branch name is provided, then that becomes the upstream branch of - the new branch. The name of the new branch is also read in the - minibuffer. - - Also see option ‘magit-branch-prefer-remote-upstream’. - -‘b c’ (‘magit-branch-and-checkout’) - - This command creates a new branch like ‘magit-branch’, but then - also checks it out. - - Also see option ‘magit-branch-prefer-remote-upstream’. - -‘b s’ (‘magit-branch-spinoff’) - - This command creates and checks out a new branch starting at and - tracking the current branch. That branch in turn is reset to the - last commit it shares with its upstream. If the current branch has - no upstream or no unpushed commits, then the new branch is created - anyway and the previously current branch is not touched. - - This is useful to create a feature branch after work has already - began on the old branch (likely but not necessarily "master"). - - If the current branch is a member of the value of option - ‘magit-branch-prefer-remote-upstream’ (which see), then the current - branch will be used as the starting point as usual, but the - upstream of the starting-point may be used as the upstream of the - new branch, instead of the starting-point itself. - -‘b x’ (‘magit-branch-reset’) - - This command resets a branch, defaulting to the branch at point, to - the tip of another branch or any other commit. - - When the branch being reset is the current branch, then a hard - reset is performed. If there are any uncommitted changes, then the - user has to confirming the reset because those changes would be - lost. - - This is useful when you have started work on a feature branch but - realize it’s all crap and want to start over. - - When resetting to another branch and a prefix argument is used, - then the target branch is set as the upstream of the branch that is - being reset. - -‘b d’ (‘magit-branch-delete’) - - Delete one or multiple branches. If the region marks multiple - branches, then offer to delete those. Otherwise, prompt for a - single branch to be deleted, defaulting to the branch at point. - -‘b r’ (‘magit-branch-rename’) - - Rename a branch. The branch and the new name are read in the - minibuffer. With prefix argument the branch is renamed even if - that name conflicts with an existing branch. - - -- User Option: magit-branch-read-upstream-first - - When creating a branch, whether to read the upstream branch before - the name of the branch that is to be created. The default is - ‘nil’, and I recommend you leave it at that. - - -- User Option: magit-branch-prefer-remote-upstream - - This option specifies whether remote upstreams are favored over - local upstreams when creating new branches. - - When a new branch is created, Magit offers the branch, commit, or - stash as the default starting point of the new branch. If there is - no such thing at point, then it falls back to offer the current - branch as starting-point. The user may then accept that default or - pick something else. - - If the chosen starting-point is a branch, then it may also be set - as the upstream of the new branch, depending on the value of the - Git variable ‘branch.autoSetupMerge’. By default this is done for - remote branches, but not for local branches. - - You might prefer to always use some remote branch as upstream. If - the chosen starting-point is (1) a local branch, (2) whose name is - a member of the value of this option, (3) the upstream of that - local branch is a remote branch with the same name, and (4) that - remote branch can be fast-forwarded to the local branch, then the - chosen branch is used as starting-point, but its own upstream is - used as the upstream of the new branch. - - Assuming the chosen branch matches these conditions you would end - up with with e.g.: - - feature --upstream--> origin/master - - instead of - - feature --upstream--> master --upstream--> origin/master - - Which you prefer is a matter of personal preference. If you do - prefer the former, then you should add branches such as ‘master’, - ‘next’, and ‘maint’ to the value of this options. -  -File: magit.info, Node: Merging, Next: Rebasing, Prev: Branching, Up: Manipulating +File: magit.info, Node: Merging, Next: Resolving conflicts, Prev: Branching, Up: Manipulating 6.6 Merging =========== -Also see *note (gitman)git-merge:: . +Also see *note (gitman)git-merge:: . For information on how to resolve +merge conflicts see the next section. ‘m’ (‘magit-merge-popup’) @@ -4027,12 +4220,122 @@ commands instead. Abort the current merge operation.  -File: magit.info, Node: Rebasing, Next: Cherry picking, Prev: Merging, Up: Manipulating +File: magit.info, Node: Resolving conflicts, Next: Rebasing, Prev: Merging, Up: Manipulating -6.7 Rebasing +6.7 Resolving conflicts +======================= + +When merging branches (or otherwise combining or changing history) +conflicts can occur. If you edited two completely different parts of +the same file in two branches and then merge one of these branches into +the other, then Git can resolve that on its own, but if you edit the +same area of a file, then a human is required to decide how the two +versions, or "sides of the conflict", are to be combined into one. + + Here we can only provide a brief introduction to the subject and +point you toward some tools that can help. If you are new to this, then +please also consult Git’s own documentation as well as other resources. + + If a file has conflicts and Git cannot resolve them by itself, then +it puts both versions into the affected file along with special markers +whose purpose is to denote the boundaries of the unresolved part of the +file and between the different versions. These boundary lines begin +with the strings "<<<<", "|||||||", "=======", and ">>>>" and are +followed by information about the source of the respective versions, +e.g.: + + <<<<<<< HEAD + Take the blue pill. + ======= + Take the red pill. + >>>>>>> feature + + In this case you have chosen to take the red pill on one bracnh and +on another you picked the blue pill. Now that you are merging these two +diverging branches, Git cannot possibly know which pill you want to +take. + + To resolve that conflict you have to create a version of the affected +area of the file by keeping only one of the sides, possibly by editing +it in order to bring in the changes from the other side, remove the +other versions as well as the markers, and then stage the result. A +possible resolution might be: + + Take both pills. + + Often it is useful to see not only the two sides of the conflict but +also the "original" version from before the same area of the file was +modified twice on different branches. Instruct Git to insert that +version as well by running this command once: + + git config --global merge.conflictStyle diff3 + + The above conflict might then have looked like this: + + <<<<<<< HEAD + Take the blue pill. + ||||||| merged common ancestors + Take either the blue or the red pill, but not both. + ======= + Take the red pill. + >>>>>>> feature + + If that were the case, then the above conflict resolution would not +have been correct, which demonstrates why seeing the original version +alongside the conflicting versions can be useful. + + You can perform the conflict resolution completely by hand, but Emacs +also provides some packages that help in the process: Smerge, Ediff +(*note (ediff)Top::), and Emerge (*note (emacs)Emerge::). Magit does +not provide its own tools for conflict resolution, but it does make +using Smerge and Ediff more convenient. (Ediff supersedes Emerge, so +you probably don’t want to use the latter anyway.) + + In the Magit status buffer, files with unresolved conflicts are +listed in the "Unstaged changes" and/or "Staged changes" sections. They +are prefixed with the word "unmerged", which in this context essentially +is a synonym for "unresolved". + + Pressing ‘RET’ while point is on such a file section shows a buffer +visiting that file, turns on ‘smerge-mode’ in that buffer, and places +point inside the first area with conflicts. You should then resolve +that conflict using regular edit commands and/or Smerge commands. + + Unfortunately Smerge does not have a manual, but you can get a list +of commands and binding ‘C-c ^ C-h’ and press ‘RET’ while point is on a +command name to read its documentation. + + Normally you would edit one version and then tell Smerge to keep only +that version. Use ‘C-c ^ m’ (‘smerge-keep-mine)’ to keep the "HEAD" +version or ‘C-c ^ o’ (‘smerge-keep-other’) to keep the version that +follows "|||||||". Then use ‘C-c ^ n’ to move to the next conflicting +area in the same file. Once you are done resolving conflicts, return to +the Magit status buffer. The file should now be shown as "modified", no +longer as "unmerged", because Smerge automatically stages the file when +you save the buffer after resolving the last conflict. + + Alternatively you could use Ediff, which uses separate buffers for +the different versions of the file. To resolve conflicts in a file +using Ediff press ‘e’ while point is on such a file in the status +buffer. + + Ediff can be used for other purposes as well. For more information +on how to enter Ediff from Magit, see *note Ediffing: Ediffing. +Explaining how to use Ediff is beyond the scope of this manual, instead +see *note (ediff)Top::. + + If you are unsure whether you should Smerge or Ediff, then use the +former. It is much easier to understand and use, and except for truely +complex conflicts, the latter is usually overkill. + + +File: magit.info, Node: Rebasing, Next: Cherry picking, Prev: Resolving conflicts, Up: Manipulating + +6.8 Rebasing ============ -Also see *note (gitman)git-rebase:: . +Also see *note (gitman)git-rebase:: . For information on how to resolve +conflicts that occur during rebases see the preceding section. ‘r’ (‘magit-rebase-popup’) @@ -4042,6 +4345,14 @@ Also see *note (gitman)git-rebase:: . When no rebase is in progress, then the popup buffer features the following commands. + Using one of these commands _starts_ a rebase sequence. Git might +then stop somewhere along the way, either because you told it to do so, +or because applying a commit failed due to a conflict. When that +happens, then the status buffer shows information about the rebase +sequence which is in progress in a section similar to a log section. +See *note Information about in-progress rebase: Information about +in-progress rebase. + ‘r p’ (‘magit-rebase-onto-pushremote’) Rebase the current branch onto ‘branch..pushRemote’. If that @@ -4102,6 +4413,9 @@ commands instead. Restart the current rebasing operation. + In some cases this pops up a commit message buffer for you do edit. + With a prefix argument the old message is reused as-is. + ‘r s’ (‘magit-rebase-skip’) Skip the current commit and restart the current rebase operation. @@ -4117,23 +4431,23 @@ commands instead. * Menu: * Editing rebase sequences:: -* Rebase sequence log:: +* Information about in-progress rebase::  -File: magit.info, Node: Editing rebase sequences, Next: Rebase sequence log, Up: Rebasing +File: magit.info, Node: Editing rebase sequences, Next: Information about in-progress rebase, Up: Rebasing -6.7.1 Editing rebase sequences +6.8.1 Editing rebase sequences ------------------------------ ‘C-c C-c’ (‘with-editor-finish’) Finish the current editing session by returning with exit code 0. - Git then creates the commit using the message it finds in the file. + Git then uses the rebase instructions it finds in the file. ‘C-c C-k’ (‘with-editor-cancel’) Cancel the current editing session by returning with exit code 1. - Git then cancels the commit, but leaves the file untouched. + Git then forgoes starting the rebase sequence. ‘RET’ (‘git-rebase-show-commit’) @@ -4226,10 +4540,10 @@ File: magit.info, Node: Editing rebase sequences, Next: Rebase sequence log, Whether confirmation is required to cancel.  -File: magit.info, Node: Rebase sequence log, Prev: Editing rebase sequences, Up: Rebasing +File: magit.info, Node: Information about in-progress rebase, Prev: Editing rebase sequences, Up: Rebasing -6.7.2 Rebase sequence log -------------------------- +6.8.2 Information about in-progress rebase +------------------------------------------ While a rebase sequence is in progress, the status buffer features a section which lists the commits that have already been applied as well @@ -4304,9 +4618,9 @@ shown in different colors to indicate the status of the commits. indicates that you reset to an earlier commit (and that this commit therefore is no longer reachable from ‘HEAD’), but that it might still be possible to create a new commit with the exact same tree - or at least the same patch-id, without manually editing any file. - Or at the very least that there are some uncommitted remaining, - which may or may not originate from that commit. + or at least the same patch-id (1), without manually editing any + file. Or at the very least that there are some uncommitted + remaining, which may or may not originate from that commit. • When a commit is prefixed with ‘goal’, then that indicates that it is still possible to create a commit with the exact @@ -4358,10 +4672,22 @@ Most importantly these sequences only support "picking" a commit but not other actions such as "rewording", and they do not keep track of the commits which have already been applied. + ---------- Footnotes ---------- + + (1) The patch-id is a hash of the _changes_ introduced by commit. It +differs from hash of the commit itself, which is a hash of the result of +applying that change (i.e. the resulting trees and blobs) as well as +author and committer information, the commit message, and the hashes of +the parents of the commit. The patch-id hash on the other hand is +created only from the added and removed lines, even line numbers and +whitespace are created when calculating the hash. The patch-ids of two +commits can be used to answer the question "Do these two commits make +the same change?". +  File: magit.info, Node: Cherry picking, Next: Resetting, Prev: Rebasing, Up: Manipulating -6.8 Cherry picking +6.9 Cherry picking ================== Also see *note (gitman)git-cherry-pick:: . @@ -4413,7 +4739,7 @@ features these commands instead.  File: magit.info, Node: Reverting, Up: Cherry picking -6.8.1 Reverting +6.9.1 Reverting --------------- ‘V’ (‘magit-revert-popup’) @@ -4456,8 +4782,8 @@ features these commands instead.  File: magit.info, Node: Resetting, Next: Stashing, Prev: Cherry picking, Up: Manipulating -6.9 Resetting -============= +6.10 Resetting +============== Also see *note (gitman)git-reset:: . @@ -4500,7 +4826,7 @@ Also see *note (gitman)git-reset:: .  File: magit.info, Node: Stashing, Prev: Resetting, Up: Manipulating -6.10 Stashing +6.11 Stashing ============= Also see *note (gitman)git-stash:: . @@ -4920,6 +5246,7 @@ File: magit.info, Node: Miscellaneous, Next: Customizing, Prev: Transferring, * Tagging:: * Notes:: * Submodules:: +* Subtree:: * Common commands:: * Wip modes:: * Minor mode for buffers visiting files:: @@ -5028,7 +5355,7 @@ following suffix commands, instead of those listed above. Abort the current notes ref merge.  -File: magit.info, Node: Submodules, Next: Common commands, Prev: Notes, Up: Miscellaneous +File: magit.info, Node: Submodules, Next: Subtree, Prev: Notes, Up: Miscellaneous 8.3 Submodules ============== @@ -5073,9 +5400,54 @@ Also see *note (gitman)git-submodule:: . Unregister the submodule at PATH.  -File: magit.info, Node: Common commands, Next: Wip modes, Prev: Submodules, Up: Miscellaneous +File: magit.info, Node: Subtree, Next: Common commands, Prev: Submodules, Up: Miscellaneous -8.4 Common commands +8.4 Subtree +=========== + +Also see *note (gitman)git-subtree:: . + +‘O’ (‘magit-tree-popup’) + + This prefix command shows the following suffix commands along with + the appropriate infix arguments in a popup buffer. + + Most infix arguments only apply to some of the ‘git subtree’ +subcommands. When an argument that does not apply to the invoked +command is set, then it is silently ignored. + + When the ‘--prefix’ argument is set in the popup buffer, then that is +used. Otherwise the prefix is read in the minibuffer. + +‘O a’ (‘magit-subtree-add’) + + Add COMMIT from REPOSITORY as a new subtree at PREFIX. + +‘O c’ (‘magit-subtree-add-commit’) + + Add COMMIT as a new subtree at PREFIX. + +‘O m’ (‘magit-subtree-merge’) + + Merge COMMIT into the PREFIX subtree. + +‘O f’ (‘magit-subtree-pull’) + + Pull COMMIT from REPOSITORY into the PREFIX subtree. + +‘O p’ (‘magit-subtree-push’) + + Extract the history of the subtree PREFIX and push it to REF on + REPOSITORY. + +‘O s’ (‘magit-subtree-split’) + + Extract the history of the subtree PREFIX. + + +File: magit.info, Node: Common commands, Next: Wip modes, Prev: Subtree, Up: Miscellaneous + +8.5 Common commands =================== These are some of the commands that can be used in all buffers whose @@ -5115,7 +5487,7 @@ above.  File: magit.info, Node: Wip modes, Next: Minor mode for buffers visiting files, Prev: Common commands, Up: Miscellaneous -8.5 Wip modes +8.6 Wip modes ============= Git keeps *committed* changes around long enough for users to recover @@ -5272,7 +5644,7 @@ files are being committed.  File: magit.info, Node: Minor mode for buffers visiting files, Next: Minor mode for buffers visiting blobs, Prev: Wip modes, Up: Miscellaneous -8.6 Minor mode for buffers visiting files +8.7 Minor mode for buffers visiting files ========================================= The ‘magit-file-mode’ enables certain Magit features in file-visiting @@ -5280,7 +5652,7 @@ buffers belonging to a Git repository. It should be enabled globally using ‘global-magit-file-mode’. Currently this mode only establishes a few key bindings, but this might be extended in the future. - -- User Option: global-magit-file-mode + -- User Option: magit-file-mode Whether to establish certain Magit key bindings in all file-visiting buffers belonging to a Git repository. This @@ -5308,7 +5680,7 @@ few key bindings, but this might be extended in the future. appropriate infix arguments in a popup buffer. See *note Initiating a commit: Initiating a commit. -‘C-c M-g d’ (‘magit-diff-buffer-file-popup’) +‘C-c M-g D’ (‘magit-diff-buffer-file-popup’) This prefix command shows the same suffix commands and infix arguments in a popup buffer as ‘magit-diff-popup’. But this @@ -5316,12 +5688,35 @@ few key bindings, but this might be extended in the future. visited file is automatically used in the popup to limit the diff to that file. +‘C-c M-g d’ (‘magit-diff-buffer-file’) + + This command shows the diff for the file of blob that the current + buffer visits. Renames are followed when a prefix argument is used + or when ‘--follow’ is part of ‘magit-diff-arguments’. + + -- User Option: magit-diff-buffer-file-locked + + This option controls whether ‘magit-diff-buffer-file’ uses a + decicated buffer. See *note Modes and Buffers: Modes and Buffers. + +‘C-c M-g L’ (‘magit-log-buffer-file-popup’) + + This prefix command shows the same suffix commands and infix + arguments in a popup buffer as ‘magit-log-popup’. But this variant + has to be called from a file-visiting buffer and the visited file + is automatically used in the popup to limit the log to that file. + ‘C-c M-g l’ (‘magit-log-buffer-file’) This command shows the log for the file of blob that the current buffer visits. Renames are followed when a prefix argument is used or when ‘--follow’ is part of ‘magit-log-arguments’. + -- User Option: magit-log-buffer-file-locked + + This option controls whether ‘magit-log-buffer-file’ uses a + decicated buffer. See *note Modes and Buffers: Modes and Buffers. + ‘C-c M-g b’ (‘magit-blame-popup’) This prefix command shows the ‘magit-blame’ suffix command along @@ -5335,7 +5730,7 @@ few key bindings, but this might be extended in the future.  File: magit.info, Node: Minor mode for buffers visiting blobs, Prev: Minor mode for buffers visiting files, Up: Miscellaneous -8.7 Minor mode for buffers visiting blobs +8.8 Minor mode for buffers visiting blobs ========================================= The ‘magit-blob-mode’ enables certain Magit features in blob-visiting @@ -5658,6 +6053,21 @@ but doing it this way has the advantage that you usually get to see the diff, which is useful because it increases the odds that you spot potential issues. +The built-in VC Package +....................... + +Emacs comes with a version control interface called "VC", see *note +(emacs)Version Control::. It is enabled be default and if you don’t use +it in addition to Magit, then you should disable it to keep it from +performing unnecessary work: + + (setq vc-handled-backends nil) + + You can also disable its use only for Git but keep using it when +using another version control system: + + (setq vc-handled-backends (delq 'Git vc-handled-backends)) +  File: magit.info, Node: Plumbing, Next: FAQ, Prev: Customizing, Up: Top @@ -6130,9 +6540,10 @@ File: magit.info, Node: Matching sections, Prev: Section selection, Up: Secti • ‘TYPE’ matches TYPE regardless of its parents. - Each TYPE is a symbol. Note that is not necessary to specify all - TYPEs up to the root section as printed by ‘magit-describe-type’, - unless of course your want to be that precise. + Each TYPE is a symbol. Note that it is not necessary to specify + all TYPEs up to the root section as printed by + ‘magit-describe-type’, unless of course you want to be that + precise. -- Function: magit-section-when condition &rest body @@ -6482,10 +6893,11 @@ made it into the manual yet, see * Diffs contain control sequences:: * Expanding a file to show the diff causes it to disappear:: * Point is wrong in the ‘COMMIT_EDITMSG’ buffer:: +* The mode-line information isn't always up-to-date:: * Can Magit be used as ‘ediff-version-control-package’?:: * How to show diffs for gpg-encrypted files?:: * Emacs 24.5 hangs when loading Magit: Emacs 245 hangs when loading Magit. -* ‘Symbol's value as function is void --some’:: +* Symbol's value as function is void ‘--some’:: * Where is the branch manager::  @@ -6537,7 +6949,7 @@ that prevents the update from taking very long under certain circumstances, e.g. when showing the difference for hundrets of changes files. - For that reason the variable ‘magit-diff-expansion-treshhold’ was + For that reason the variable ‘magit-diff-expansion-threshold’ was added, defaulting to one second. If it takes longer than that to recreate a Magit buffer, then no further diff sections are expanded because that’s one of the steps that take the longest. If a diff is not @@ -6546,7 +6958,7 @@ expanded, then some work can be delayed until it actually is. You can then still expand sections manually, but when you refresh the complete buffer explicitly using ‘g’ or by performing an action which triggers a refresh, then previously expanded diffs could be collapsed. -You can set ‘magit-diff-expansion-treshhold’ to a higher value to +You can set ‘magit-diff-expansion-threshold’ to a higher value to prevent that from happening.  @@ -6764,7 +7176,7 @@ probably set that variable for a reason, and should therefore only undo that setting in Magit by customizing ‘magit-git-global-arguments’.  -File: magit.info, Node: Point is wrong in the ‘COMMIT_EDITMSG’ buffer, Next: Can Magit be used as ‘ediff-version-control-package’?, Prev: Expanding a file to show the diff causes it to disappear, Up: FAQ +File: magit.info, Node: Point is wrong in the ‘COMMIT_EDITMSG’ buffer, Next: The mode-line information isn't always up-to-date, Prev: Expanding a file to show the diff causes it to disappear, Up: FAQ A.16 Point is wrong in the ‘COMMIT_EDITMSG’ buffer ================================================== @@ -6788,9 +7200,35 @@ help: (pointback-mode -1))))  -File: magit.info, Node: Can Magit be used as ‘ediff-version-control-package’?, Next: How to show diffs for gpg-encrypted files?, Prev: Point is wrong in the ‘COMMIT_EDITMSG’ buffer, Up: FAQ +File: magit.info, Node: The mode-line information isn't always up-to-date, Next: Can Magit be used as ‘ediff-version-control-package’?, Prev: Point is wrong in the ‘COMMIT_EDITMSG’ buffer, Up: FAQ -A.17 Can Magit be used as ‘ediff-version-control-package’? +A.17 The mode-line information isn’t always up-to-date +====================================================== + +Magit is not responsible for the version control information that is +being displayed in the mode-line and looks something like ‘Git-master’. +The built-in "Version Control" package, also known as "VC", updates that +information, and can be told to do so more often: + + (setq auto-revert-check-vc-info t) + + But doing so isn’t good for performance. For more (overly +optimistic) information see *note (emacs)VC Mode Line::. + + If you don’t really care about seeing that information in the +mode-line, but just don’t want to see _incorrect_ information, then +consider disabling VC when using Git: + + (setq vc-handled-backends (delq 'Git vc-handled-backends)) + + Or to disable it completely: + + (setq vc-handled-backends nil) + + +File: magit.info, Node: Can Magit be used as ‘ediff-version-control-package’?, Next: How to show diffs for gpg-encrypted files?, Prev: The mode-line information isn't always up-to-date, Up: FAQ + +A.18 Can Magit be used as ‘ediff-version-control-package’? ========================================================== No, it cannot. For that to work the functions ‘ediff-magit-internal’ @@ -6825,7 +7263,7 @@ only shows yet-to-be resolved conflicts.  File: magit.info, Node: How to show diffs for gpg-encrypted files?, Next: Emacs 245 hangs when loading Magit, Prev: Can Magit be used as ‘ediff-version-control-package’?, Up: FAQ -A.18 How to show diffs for gpg-encrypted files? +A.19 How to show diffs for gpg-encrypted files? =============================================== Git supports showing diffs for encrypted files, but has to be told to do @@ -6836,9 +7274,9 @@ affects the diffs displayed inside Magit. echo "*.gpg filter=gpg diff=gpg" > .gitattributes  -File: magit.info, Node: Emacs 245 hangs when loading Magit, Next: ‘Symbol's value as function is void --some’, Prev: How to show diffs for gpg-encrypted files?, Up: FAQ +File: magit.info, Node: Emacs 245 hangs when loading Magit, Next: Symbol's value as function is void ‘--some’, Prev: How to show diffs for gpg-encrypted files?, Up: FAQ -A.19 Emacs 24.5 hangs when loading Magit +A.20 Emacs 24.5 hangs when loading Magit ======================================== This is actually triggered by loading Tramp. See @@ -6848,17 +7286,17 @@ can work around the problem by setting Google’s ‘8.8.8.8’) may also be sufficient to work around the issue.  -File: magit.info, Node: ‘Symbol's value as function is void --some’, Next: Where is the branch manager, Prev: Emacs 245 hangs when loading Magit, Up: FAQ +File: magit.info, Node: Symbol's value as function is void ‘--some’, Next: Where is the branch manager, Prev: Emacs 245 hangs when loading Magit, Up: FAQ -A.20 ‘Symbol's value as function is void --some’ +A.21 Symbol’s value as function is void ‘--some’ ================================================ Update ‘dash’, restart Emacs, and then it will be defined.  -File: magit.info, Node: Where is the branch manager, Prev: ‘Symbol's value as function is void --some’, Up: FAQ +File: magit.info, Node: Where is the branch manager, Prev: Symbol's value as function is void ‘--some’, Up: FAQ -A.21 Where is the branch manager +A.22 Where is the branch manager ================================ ‘y’ is bound to the command that shows the "refs buffer", the successor @@ -6911,20 +7349,20 @@ Appendix B Keystroke Index * A a <1>: Cherry picking. (line 43) * A s: Cherry picking. (line 39) * B: Bisecting. (line 8) -* b: Branching. (line 45) +* b: The branch popup. (line 12) * B b: Bisecting. (line 31) -* b b: Branching. (line 182) -* b c: Branching. (line 200) -* b d: Branching. (line 241) +* b b: The branch popup. (line 29) +* b c: The branch popup. (line 47) * B g: Bisecting. (line 36) * B k: Bisecting. (line 41) -* b n: Branching. (line 190) +* b k: The branch popup. (line 88) +* b n: The branch popup. (line 37) * B r: Bisecting. (line 47) -* b r: Branching. (line 247) +* b r: The branch popup. (line 94) * B s: Bisecting. (line 16) -* b s: Branching. (line 207) +* b s: The branch popup. (line 54) * B u: Bisecting. (line 24) -* b x: Branching. (line 224) +* b x: The branch popup. (line 71) * c: Initiating a commit. (line 8) * c <1>: Editing rebase sequences. (line 72) @@ -6977,15 +7415,19 @@ Appendix B Keystroke Index * C-c M-g: Minor mode for buffers visiting files. (line 19) * C-c M-g b: Minor mode for buffers visiting files. - (line 53) + (line 76) * C-c M-g c: Minor mode for buffers visiting files. (line 33) -* C-c M-g d: Minor mode for buffers visiting files. +* C-c M-g D: Minor mode for buffers visiting files. (line 39) -* C-c M-g l: Minor mode for buffers visiting files. +* C-c M-g d: Minor mode for buffers visiting files. (line 47) +* C-c M-g L: Minor mode for buffers visiting files. + (line 58) +* C-c M-g l: Minor mode for buffers visiting files. + (line 65) * C-c M-g p: Minor mode for buffers visiting files. - (line 59) + (line 82) * C-c M-g s: Minor mode for buffers visiting files. (line 24) * C-c M-g u: Minor mode for buffers visiting files. @@ -7017,18 +7459,18 @@ Appendix B Keystroke Index * DEL <2>: Blaming. (line 44) * DEL <3>: Editing rebase sequences. (line 28) -* e: Ediffing. (line 6) -* E: Ediffing. (line 18) +* e: Ediffing. (line 9) +* E: Ediffing. (line 21) * e <1>: Editing rebase sequences. (line 55) -* E c: Ediffing. (line 62) -* E i: Ediffing. (line 54) -* E m: Ediffing. (line 32) -* E r: Ediffing. (line 23) -* E s: Ediffing. (line 45) -* E u: Ediffing. (line 50) -* E w: Ediffing. (line 58) -* E z: Ediffing. (line 66) +* E c: Ediffing. (line 65) +* E i: Ediffing. (line 57) +* E m: Ediffing. (line 35) +* E r: Ediffing. (line 26) +* E s: Ediffing. (line 48) +* E u: Ediffing. (line 53) +* E w: Ediffing. (line 61) +* E z: Ediffing. (line 69) * f: Editing rebase sequences. (line 63) * f <1>: Fetching. (line 11) @@ -7049,7 +7491,7 @@ Appendix B Keystroke Index (line 31) * j: Diff buffer. (line 38) * k: Viewing Git output. (line 19) -* k <1>: Applying. (line 37) +* k <1>: Applying. (line 40) * k <2>: Editing rebase sequences. (line 68) * k <3>: Stashing. (line 92) @@ -7069,16 +7511,16 @@ Appendix B Keystroke Index * L s: Refreshing logs. (line 21) * L t: Refreshing logs. (line 36) * L w: Refreshing logs. (line 28) -* m: Merging. (line 8) +* m: Merging. (line 9) * M: Remotes. (line 8) -* m a: Merging. (line 56) +* m a: Merging. (line 57) * M a: Remotes. (line 13) -* m e: Merging. (line 29) +* m e: Merging. (line 30) * M k: Remotes. (line 28) -* m m: Merging. (line 16) -* m m <1>: Merging. (line 51) -* m n: Merging. (line 36) -* m p: Merging. (line 43) +* m m: Merging. (line 17) +* m m <1>: Merging. (line 52) +* m n: Merging. (line 37) +* m p: Merging. (line 44) * M r: Remotes. (line 18) * M u: Remotes. (line 23) * M-1: Section visibility. (line 34) @@ -7112,11 +7554,11 @@ Appendix B Keystroke Index * M-x magit-reset-hard: Resetting. (line 32) * M-x magit-reset-head: Resetting. (line 21) * M-x magit-reset-index: Staging and unstaging. - (line 84) + (line 88) * M-x magit-reset-index <1>: Resetting. (line 14) * M-x magit-reset-soft: Resetting. (line 26) * M-x magit-reverse-in-index: Staging and unstaging. - (line 59) + (line 63) * M-x magit-stage-file: Staging from file-visiting buffers. (line 10) * M-x magit-toggle-buffer-lock: Modes and Buffers. (line 17) @@ -7132,12 +7574,19 @@ Appendix B Keystroke Index * n <3>: Minor mode for buffers visiting blobs. (line 16) * o: Submodules. (line 8) +* O: Subtree. (line 8) * o a: Submodules. (line 13) +* O a: Subtree. (line 20) * o b: Submodules. (line 19) +* O c: Subtree. (line 24) * o f: Submodules. (line 37) +* O f: Subtree. (line 32) * o i: Submodules. (line 24) * o i <1>: Submodules. (line 41) +* O m: Subtree. (line 28) +* O p: Subtree. (line 36) * o s: Submodules. (line 33) +* O s: Subtree. (line 41) * o u: Submodules. (line 28) * p: Section movement. (line 10) * p <1>: Blaming. (line 62) @@ -7160,21 +7609,21 @@ Appendix B Keystroke Index * q <2>: Blaming. (line 70) * q <3>: Minor mode for buffers visiting blobs. (line 20) -* r: Rebasing. (line 8) +* r: Rebasing. (line 9) * r <1>: Editing rebase sequences. (line 51) -* r a: Rebasing. (line 84) -* r e: Rebasing. (line 25) -* r e <1>: Rebasing. (line 80) -* r f: Rebasing. (line 57) -* r i: Rebasing. (line 53) -* r m: Rebasing. (line 61) -* r o: Rebasing. (line 31) -* r p: Rebasing. (line 16) -* r r: Rebasing. (line 72) -* r s: Rebasing. (line 76) -* r u: Rebasing. (line 21) -* r w: Rebasing. (line 65) +* r a: Rebasing. (line 96) +* r e: Rebasing. (line 34) +* r e <1>: Rebasing. (line 92) +* r f: Rebasing. (line 66) +* r i: Rebasing. (line 62) +* r m: Rebasing. (line 70) +* r o: Rebasing. (line 40) +* r p: Rebasing. (line 25) +* r r: Rebasing. (line 81) +* r s: Rebasing. (line 88) +* r u: Rebasing. (line 30) +* r w: Rebasing. (line 74) * RET: Diff buffer. (line 6) * RET <1>: References buffer. (line 99) * RET <2>: Blaming. (line 29) @@ -7183,7 +7632,7 @@ Appendix B Keystroke Index * s: Staging and unstaging. (line 29) * S: Staging and unstaging. - (line 33) + (line 37) * s <1>: Editing rebase sequences. (line 59) * s-: Section visibility. (line 22) @@ -7208,10 +7657,10 @@ Appendix B Keystroke Index * T T: Notes. (line 13) * TAB: Section visibility. (line 9) * u: Staging and unstaging. - (line 40) + (line 44) * U: Staging and unstaging. - (line 49) -* v: Applying. (line 41) + (line 53) +* v: Applying. (line 44) * V: Reverting. (line 6) * V A: Reverting. (line 30) * V a: Reverting. (line 38) @@ -7256,408 +7705,3 @@ Appendix B Keystroke Index * z z: Stashing. (line 13) * z Z: Stashing. (line 39) - -File: magit.info, Node: Command Index, Next: Function Index, Prev: Keystroke Index, Up: Top - -Appendix C Command Index -************************ - -[index] -* Menu: - -* auto-revert-mode: Automatic Reverting of File-Visiting Buffers. - (line 62) -* forward-line: Editing rebase sequences. - (line 39) -* git-commit-ack: Editing commit messages. - (line 128) -* git-commit-cc: Editing commit messages. - (line 144) -* git-commit-next-message: Editing commit messages. - (line 45) -* git-commit-prev-message: Editing commit messages. - (line 39) -* git-commit-reported: Editing commit messages. - (line 148) -* git-commit-review: Editing commit messages. - (line 132) -* git-commit-save-message: Editing commit messages. - (line 35) -* git-commit-signoff: Editing commit messages. - (line 136) -* git-commit-suggested: Editing commit messages. - (line 153) -* git-commit-test: Editing commit messages. - (line 140) -* git-rebase-backward-line: Editing rebase sequences. - (line 35) -* git-rebase-edit: Editing rebase sequences. - (line 55) -* git-rebase-exec: Editing rebase sequences. - (line 76) -* git-rebase-fixup: Editing rebase sequences. - (line 63) -* git-rebase-insert: Editing rebase sequences. - (line 85) -* git-rebase-kill-line: Editing rebase sequences. - (line 68) -* git-rebase-move-line-down: Editing rebase sequences. - (line 47) -* git-rebase-move-line-up: Editing rebase sequences. - (line 43) -* git-rebase-pick: Editing rebase sequences. - (line 72) -* git-rebase-reword: Editing rebase sequences. - (line 51) -* git-rebase-show-commit: Editing rebase sequences. - (line 16) -* git-rebase-squash: Editing rebase sequences. - (line 59) -* git-rebase-undo: Editing rebase sequences. - (line 89) -* ido-enter-magit-status: Status buffer. (line 42) -* magit-am-abort: Applying patches. (line 31) -* magit-am-apply-maildir: Applying patches. (line 19) -* magit-am-apply-patches: Applying patches. (line 13) -* magit-am-continue: Applying patches. (line 23) -* magit-am-popup: Applying patches. (line 8) -* magit-am-skip: Applying patches. (line 27) -* magit-apply: Applying. (line 33) -* magit-bisect-bad: Bisecting. (line 31) -* magit-bisect-good: Bisecting. (line 36) -* magit-bisect-popup: Bisecting. (line 8) -* magit-bisect-reset: Bisecting. (line 47) -* magit-bisect-run: Bisecting. (line 24) -* magit-bisect-skip: Bisecting. (line 41) -* magit-bisect-start: Bisecting. (line 16) -* magit-blame: Blaming. (line 8) -* magit-blame-copy-hash: Blaming. (line 75) -* magit-blame-next-chunk: Blaming. (line 54) -* magit-blame-next-chunk-same-commit: Blaming. (line 58) -* magit-blame-popup: Blaming. (line 24) -* magit-blame-popup <1>: Minor mode for buffers visiting files. - (line 53) -* magit-blame-previous-chunk: Blaming. (line 62) -* magit-blame-previous-chunk-same-commit: Blaming. (line 66) -* magit-blame-quit: Blaming. (line 70) -* magit-blame-toggle-headings: Blaming. (line 79) -* magit-blob-next: Minor mode for buffers visiting blobs. - (line 16) -* magit-blob-previous: Minor mode for buffers visiting files. - (line 59) -* magit-blob-previous <1>: Minor mode for buffers visiting blobs. - (line 12) -* magit-branch: Branching. (line 190) -* magit-branch-and-checkout: Branching. (line 200) -* magit-branch-delete: Branching. (line 241) -* magit-branch-popup: Branching. (line 45) -* magit-branch-rename: Branching. (line 247) -* magit-branch-reset: Branching. (line 224) -* magit-branch-spinoff: Branching. (line 207) -* magit-checkout: Branching. (line 182) -* magit-checkout-file: Resetting. (line 37) -* magit-cherry: Logging. (line 62) -* magit-cherry-apply: Cherry picking. (line 22) -* magit-cherry-pick: Cherry picking. (line 16) -* magit-cherry-pick-popup: Cherry picking. (line 8) -* magit-clone: Repository setup. (line 16) -* magit-commit: Initiating a commit. (line 13) -* magit-commit-amend: Initiating a commit. (line 18) -* magit-commit-augment: Initiating a commit. (line 66) -* magit-commit-extend: Initiating a commit. (line 22) -* magit-commit-fixup: Initiating a commit. (line 42) -* magit-commit-instant-fixup: Initiating a commit. (line 50) -* magit-commit-instant-squash: Initiating a commit. (line 62) -* magit-commit-popup: Initiating a commit. (line 8) -* magit-commit-popup <1>: Minor mode for buffers visiting files. - (line 33) -* magit-commit-reword: Initiating a commit. (line 32) -* magit-commit-squash: Initiating a commit. (line 54) -* magit-copy-buffer-revision: Common commands. (line 21) -* magit-copy-section-value: Common commands. (line 10) -* magit-describe-section: Section types and values. - (line 13) -* magit-describe-section <1>: Matching sections. (line 6) -* magit-diff: Diffing. (line 29) -* magit-diff-buffer-file-popup: Minor mode for buffers visiting files. - (line 39) -* magit-diff-default-context: Refreshing diffs. (line 62) -* magit-diff-dwim: Diffing. (line 25) -* magit-diff-flip-revs: Refreshing diffs. (line 45) -* magit-diff-less-context: Refreshing diffs. (line 54) -* magit-diff-more-context: Refreshing diffs. (line 58) -* magit-diff-paths: Diffing. (line 59) -* magit-diff-popup: Diffing. (line 20) -* magit-diff-refresh: Refreshing diffs. (line 16) -* magit-diff-refresh-popup: Refreshing diffs. (line 11) -* magit-diff-save-default-arguments: Refreshing diffs. (line 28) -* magit-diff-set-default-arguments: Refreshing diffs. (line 21) -* magit-diff-show-or-scroll-down: Log Buffer. (line 37) -* magit-diff-show-or-scroll-down <1>: Blaming. (line 44) -* magit-diff-show-or-scroll-down <2>: Editing rebase sequences. - (line 28) -* magit-diff-show-or-scroll-up: Log Buffer. (line 27) -* magit-diff-show-or-scroll-up <1>: Blaming. (line 34) -* magit-diff-show-or-scroll-up <2>: Editing rebase sequences. - (line 21) -* magit-diff-staged: Diffing. (line 49) -* magit-diff-switch-range-type: Refreshing diffs. (line 40) -* magit-diff-toggle-refine-hunk: Refreshing diffs. (line 36) -* magit-diff-unstaged: Diffing. (line 55) -* magit-diff-visit-file: Diff buffer. (line 6) -* magit-diff-visit-file-worktree: Diff buffer. (line 21) -* magit-diff-while-committing: Refreshing diffs. (line 70) -* magit-diff-while-committing <1>: Editing commit messages. - (line 57) -* magit-diff-worktree: Diffing. (line 43) -* magit-discard: Applying. (line 37) -* magit-dispatch-popup: Popup buffers and prefix commands. - (line 20) -* magit-ediff-compare: Ediffing. (line 23) -* magit-ediff-dwim: Ediffing. (line 6) -* magit-ediff-popup: Ediffing. (line 18) -* magit-ediff-resolve: Ediffing. (line 32) -* magit-ediff-show-commit: Ediffing. (line 62) -* magit-ediff-show-staged: Ediffing. (line 54) -* magit-ediff-show-stash: Ediffing. (line 66) -* magit-ediff-show-unstaged: Ediffing. (line 50) -* magit-ediff-show-working-tree: Ediffing. (line 58) -* magit-ediff-stage: Ediffing. (line 45) -* magit-fetch: Fetching. (line 24) -* magit-fetch-all: Fetching. (line 38) -* magit-fetch-branch: Fetching. (line 28) -* magit-fetch-from-pushremote: Fetching. (line 16) -* magit-fetch-from-upstream: Fetching. (line 20) -* magit-fetch-popup: Fetching. (line 11) -* magit-fetch-refspec: Fetching. (line 33) -* magit-file-popup: Minor mode for buffers visiting files. - (line 19) -* magit-find-file: Visiting blobs. (line 6) -* magit-find-file-other-window: Visiting blobs. (line 11) -* magit-format-patch: Creating and sending patches. - (line 11) -* magit-git-command: Running Git manually. - (line 24) -* magit-git-command-topdir: Running Git manually. - (line 19) -* magit-go-backward: Log Buffer. (line 19) -* magit-go-backward <1>: Refreshing diffs. (line 80) -* magit-go-forward: Log Buffer. (line 23) -* magit-go-forward <1>: Refreshing diffs. (line 84) -* magit-init: Repository setup. (line 6) -* magit-jump-to-diffstat-or-diff: Diff buffer. (line 38) -* magit-kill-this-buffer: Minor mode for buffers visiting blobs. - (line 20) -* magit-log: Logging. (line 37) -* magit-log-all: Logging. (line 56) -* magit-log-all-branches: Logging. (line 52) -* magit-log-branches: Logging. (line 48) -* magit-log-buffer-file: Logging. (line 67) -* magit-log-buffer-file <1>: Minor mode for buffers visiting files. - (line 47) -* magit-log-bury-buffer: Log Buffer. (line 12) -* magit-log-current: Logging. (line 31) -* magit-log-double-commit-limit: Log Buffer. (line 53) -* magit-log-half-commit-limit: Log Buffer. (line 57) -* magit-log-head: Logging. (line 44) -* magit-log-popup: Logging. (line 26) -* magit-log-refresh: Refreshing logs. (line 16) -* magit-log-refresh-popup: Refreshing logs. (line 11) -* magit-log-refresh-popup <1>: Log Buffer. (line 6) -* magit-log-save-default-arguments: Refreshing logs. (line 28) -* magit-log-select-pick: Select from log. (line 14) -* magit-log-select-quit: Select from log. (line 20) -* magit-log-set-default-arguments: Refreshing logs. (line 21) -* magit-log-toggle-commit-limit: Log Buffer. (line 47) -* magit-merge: Merging. (line 16) -* magit-merge <1>: Merging. (line 51) -* magit-merge-abort: Merging. (line 56) -* magit-merge-editmsg: Merging. (line 29) -* magit-merge-nocommit: Merging. (line 36) -* magit-merge-popup: Merging. (line 8) -* magit-merge-preview: Merging. (line 43) -* magit-mode-bury-buffer: Quitting Windows. (line 6) -* magit-notes-edit: Notes. (line 13) -* magit-notes-merge: Notes. (line 56) -* magit-notes-merge-abort: Notes. (line 70) -* magit-notes-merge-commit: Notes. (line 65) -* magit-notes-popup: Notes. (line 8) -* magit-notes-prune: Notes. (line 29) -* magit-notes-remove: Notes. (line 21) -* magit-notes-set-display-refs: Notes. (line 44) -* magit-notes-set-ref: Notes. (line 33) -* magit-patch-popup: Creating and sending patches. - (line 6) -* magit-pop-revision-stack: Editing commit messages. - (line 63) -* magit-process: Viewing Git output. (line 11) -* magit-process-kill: Viewing Git output. (line 19) -* magit-pull: Pulling. (line 24) -* magit-pull-from-pushremote: Pulling. (line 16) -* magit-pull-from-upstream: Pulling. (line 20) -* magit-pull-popup: Pulling. (line 11) -* magit-push: Pushing. (line 39) -* magit-push-current: Pushing. (line 35) -* magit-push-current-to-pushremote: Pushing. (line 16) -* magit-push-current-to-upstream: Pushing. (line 26) -* magit-push-implicitly args: Pushing. (line 73) -* magit-push-matching: Pushing. (line 53) -* magit-push-popup: Pushing. (line 11) -* magit-push-refspecs: Pushing. (line 44) -* magit-push-tag: Pushing. (line 65) -* magit-push-tags: Pushing. (line 59) -* magit-push-to-remote remote args: Pushing. (line 84) -* magit-rebase: Rebasing. (line 25) -* magit-rebase-abort: Rebasing. (line 84) -* magit-rebase-autosquash: Rebasing. (line 57) -* magit-rebase-continue: Rebasing. (line 72) -* magit-rebase-edit: Rebasing. (line 80) -* magit-rebase-edit-commit: Rebasing. (line 61) -* magit-rebase-interactive: Rebasing. (line 53) -* magit-rebase-onto-pushremote: Rebasing. (line 16) -* magit-rebase-onto-upstream: Rebasing. (line 21) -* magit-rebase-popup: Rebasing. (line 8) -* magit-rebase-reword-commit: Rebasing. (line 65) -* magit-rebase-skip: Rebasing. (line 76) -* magit-rebase-subset: Rebasing. (line 31) -* magit-reflog-current: Reflog. (line 11) -* magit-reflog-head: Reflog. (line 19) -* magit-reflog-other: Reflog. (line 15) -* magit-refresh: Automatic Refreshing of Magit Buffers. - (line 22) -* magit-refresh-all: Automatic Refreshing of Magit Buffers. - (line 31) -* magit-remote-add: Remotes. (line 13) -* magit-remote-popup: Remotes. (line 8) -* magit-remote-remove: Remotes. (line 28) -* magit-remote-rename: Remotes. (line 18) -* magit-remote-set-url: Remotes. (line 23) -* magit-request-pull: Creating and sending patches. - (line 17) -* magit-reset: Resetting. (line 8) -* magit-reset-hard: Resetting. (line 32) -* magit-reset-head: Resetting. (line 21) -* magit-reset-index: Staging and unstaging. - (line 84) -* magit-reset-index <1>: Resetting. (line 14) -* magit-reset-soft: Resetting. (line 26) -* magit-reverse: Applying. (line 41) -* magit-reverse-in-index: Staging and unstaging. - (line 59) -* magit-revert: Reverting. (line 14) -* magit-revert-no-commit: Reverting. (line 20) -* magit-revert-popup: Reverting. (line 6) -* magit-run-git-gui: Running Git manually. - (line 59) -* magit-run-gitk: Running Git manually. - (line 47) -* magit-run-gitk-all: Running Git manually. - (line 51) -* magit-run-gitk-branches: Running Git manually. - (line 55) -* magit-run-popup: Running Git manually. - (line 12) -* magit-section-backward: Section movement. (line 10) -* magit-section-backward-siblings: Section movement. (line 20) -* magit-section-cycle: Section visibility. (line 13) -* magit-section-cycle-diffs: Section visibility. (line 17) -* magit-section-cycle-global: Section visibility. (line 22) -* magit-section-forward: Section movement. (line 16) -* magit-section-forward-siblings: Section movement. (line 26) -* magit-section-hide: Section visibility. (line 51) -* magit-section-hide-children: Section visibility. (line 66) -* magit-section-show: Section visibility. (line 47) -* magit-section-show-children: Section visibility. (line 60) -* magit-section-show-headings: Section visibility. (line 55) -* magit-section-show-level-1: Section visibility. (line 26) -* magit-section-show-level-1-all: Section visibility. (line 34) -* magit-section-show-level-2: Section visibility. (line 27) -* magit-section-show-level-2-all: Section visibility. (line 35) -* magit-section-show-level-3: Section visibility. (line 28) -* magit-section-show-level-3-all: Section visibility. (line 36) -* magit-section-show-level-4: Section visibility. (line 29) -* magit-section-show-level-4-all: Section visibility. (line 37) -* magit-section-toggle: Section visibility. (line 9) -* magit-section-toggle-children: Section visibility. (line 70) -* magit-section-up: Section movement. (line 31) -* magit-sequence-abort: Cherry picking. (line 43) -* magit-sequence-abort <1>: Reverting. (line 38) -* magit-sequence-continue: Cherry picking. (line 35) -* magit-sequence-continue <1>: Reverting. (line 30) -* magit-sequence-skip: Cherry picking. (line 39) -* magit-sequence-skip <1>: Reverting. (line 34) -* magit-shell-command: Running Git manually. - (line 38) -* magit-shell-command-topdir: Running Git manually. - (line 33) -* magit-show-commit: Diffing. (line 67) -* magit-show-commit <1>: Blaming. (line 29) -* magit-show-refs: References buffer. (line 24) -* magit-show-refs-current: References buffer. (line 19) -* magit-show-refs-head: References buffer. (line 14) -* magit-show-refs-popup: References buffer. (line 6) -* magit-snapshot: Stashing. (line 39) -* magit-snapshot-index: Stashing. (line 46) -* magit-snapshot-worktree: Stashing. (line 51) -* magit-stage: Staging and unstaging. - (line 29) -* magit-stage-file: Staging from file-visiting buffers. - (line 10) -* magit-stage-file <1>: Minor mode for buffers visiting files. - (line 24) -* magit-stage-modified: Staging and unstaging. - (line 33) -* magit-stash: Stashing. (line 13) -* magit-stash-apply: Stashing. (line 58) -* magit-stash-branch: Stashing. (line 84) -* magit-stash-clear: Stashing. (line 92) -* magit-stash-drop: Stashing. (line 71) -* magit-stash-format-patch: Stashing. (line 88) -* magit-stash-index: Stashing. (line 20) -* magit-stash-keep-index: Stashing. (line 32) -* magit-stash-list: Stashing. (line 76) -* magit-stash-pop: Stashing. (line 64) -* magit-stash-popup: Stashing. (line 8) -* magit-stash-show: Diffing. (line 72) -* magit-stash-show <1>: Stashing. (line 80) -* magit-stash-worktree: Stashing. (line 25) -* magit-status: Status buffer. (line 22) -* magit-submodule-add: Submodules. (line 13) -* magit-submodule-fetch: Fetching. (line 42) -* magit-submodule-fetch <1>: Submodules. (line 37) -* magit-submodule-init: Submodules. (line 24) -* magit-submodule-init <1>: Submodules. (line 41) -* magit-submodule-popup: Submodules. (line 8) -* magit-submodule-setup: Submodules. (line 19) -* magit-submodule-sync: Submodules. (line 33) -* magit-submodule-update: Submodules. (line 28) -* magit-tag: Tagging. (line 13) -* magit-tag-delete: Tagging. (line 18) -* magit-tag-popup: Tagging. (line 8) -* magit-tag-prune: Tagging. (line 24) -* magit-toggle-buffer-lock: Modes and Buffers. (line 17) -* magit-toggle-margin: Refreshing logs. (line 36) -* magit-unstage: Staging and unstaging. - (line 40) -* magit-unstage-all: Staging and unstaging. - (line 49) -* magit-unstage-file: Staging from file-visiting buffers. - (line 18) -* magit-unstage-file <1>: Minor mode for buffers visiting files. - (line 28) -* magit-version: Git executable. (line 17) -* magit-visit-ref: References buffer. (line 99) -* magit-wip-commit: Wip modes. (line 129) -* magit-wip-log: Wip modes. (line 69) -* magit-wip-log-current: Wip modes. (line 77) -* scroll-down: Diff buffer. (line 48) -* scroll-up: Diff buffer. (line 44) -* with-editor-cancel: Editing commit messages. - (line 24) -* with-editor-cancel <1>: Editing rebase sequences. - (line 11) -* with-editor-finish: Editing commit messages. - (line 19) -* with-editor-finish <1>: Editing rebase sequences. - (line 6) - diff --git a/elpa/magit-20160624.2127/magit.info-2 b/elpa/magit-20160624.2127/magit.info-2 new file mode 100644 index 0000000..4e22bb8 Binary files /dev/null and b/elpa/magit-20160624.2127/magit.info-2 differ diff --git a/elpa/magit-gh-pulls-20160413.1451/magit-gh-pulls-pkg.el b/elpa/magit-gh-pulls-20160413.1451/magit-gh-pulls-pkg.el deleted file mode 100644 index d808d20..0000000 --- a/elpa/magit-gh-pulls-20160413.1451/magit-gh-pulls-pkg.el +++ /dev/null @@ -1 +0,0 @@ -(define-package "magit-gh-pulls" "20160413.1451" "GitHub pull requests extension for Magit" '((emacs "24") (gh "0.9.1") (magit "2.1.0") (pcache "0.2.3") (s "1.6.1")) :url "https://github.com/sigma/magit-gh-pulls" :keywords '("git" "tools")) diff --git a/elpa/magit-gh-pulls-20160413.1451/magit-gh-pulls-autoloads.el b/elpa/magit-gh-pulls-20160513.310/magit-gh-pulls-autoloads.el similarity index 86% rename from elpa/magit-gh-pulls-20160413.1451/magit-gh-pulls-autoloads.el rename to elpa/magit-gh-pulls-20160513.310/magit-gh-pulls-autoloads.el index f5c9406..c318b04 100644 --- a/elpa/magit-gh-pulls-20160413.1451/magit-gh-pulls-autoloads.el +++ b/elpa/magit-gh-pulls-20160513.310/magit-gh-pulls-autoloads.el @@ -3,8 +3,8 @@ ;;; Code: (add-to-list 'load-path (or (file-name-directory #$) (car load-path))) -;;;### (autoloads nil "magit-gh-pulls" "magit-gh-pulls.el" (22297 -;;;;;; 19803 997314 423000)) +;;;### (autoloads nil "magit-gh-pulls" "magit-gh-pulls.el" (22387 +;;;;;; 29358 559405 127000)) ;;; Generated autoloads from magit-gh-pulls.el (autoload 'magit-gh-pulls-mode "magit-gh-pulls" "\ diff --git a/elpa/magit-gh-pulls-20160513.310/magit-gh-pulls-pkg.el b/elpa/magit-gh-pulls-20160513.310/magit-gh-pulls-pkg.el new file mode 100644 index 0000000..9cd1d70 --- /dev/null +++ b/elpa/magit-gh-pulls-20160513.310/magit-gh-pulls-pkg.el @@ -0,0 +1 @@ +(define-package "magit-gh-pulls" "20160513.310" "GitHub pull requests extension for Magit" '((emacs "24") (gh "0.9.1") (magit "2.1.0") (pcache "0.2.3") (s "1.6.1")) :url "https://github.com/sigma/magit-gh-pulls" :keywords '("git" "tools")) diff --git a/elpa/magit-gh-pulls-20160413.1451/magit-gh-pulls.el b/elpa/magit-gh-pulls-20160513.310/magit-gh-pulls.el similarity index 97% rename from elpa/magit-gh-pulls-20160413.1451/magit-gh-pulls.el rename to elpa/magit-gh-pulls-20160513.310/magit-gh-pulls.el index 76caa9f..baf5acd 100644 --- a/elpa/magit-gh-pulls-20160413.1451/magit-gh-pulls.el +++ b/elpa/magit-gh-pulls-20160513.310/magit-gh-pulls.el @@ -4,7 +4,7 @@ ;; Author: Yann Hodique ;; Keywords: git tools -;; Package-Version: 20160413.1451 +;; Package-Version: 20160513.310 ;; Version: 0.5.2 ;; URL: https://github.com/sigma/magit-gh-pulls ;; Package-Requires: ((emacs "24") (gh "0.9.1") (magit "2.1.0") (pcache "0.2.3") (s "1.6.1")) @@ -411,8 +411,8 @@ option, or inferred from remotes." editor which is responsible for continuing the flow." (let* ((current (magit-get-current-branch)) (current-default (magit-gh-pulls-get-remote-default)) - (base-branch (magit-read-other-branch-or-commit "Base" nil current-default)) - (head-branch (magit-read-other-branch-or-commit "Head" nil current))) + (base-branch (magit-read-branch-or-commit "Base" current-default)) + (head-branch (magit-read-branch-or-commit "Head" current))) (let* ((head-remote (concat (magit-get-remote base-branch) "/" head-branch)) (pushed-p (and (magit-branch-p head-remote) (null (magit-git-lines "diff" (concat head-remote ".." head-branch)))))) @@ -441,6 +441,12 @@ option, or inferred from remotes." (req (make-instance 'gh-pulls-request :head head :base base :body body :title title))) (funcall callback api user proj req)))))) +(defun magit-gh-pulls-pr-template-file () + "Returns the path to the PULL_REQUEST_TEMPLATE file in the + current repository. Returns nil if there is not a pull request + template file." + (car (directory-files (magit-toplevel) t "^PULL_REQUEST_TEMPLATE"))) + (defun magit-gh-pulls-init-pull-editor (api user proj default-title default-body base head callback) "Create a new buffer for editing this pull request and switch to it. The context needed to finalize the @@ -455,7 +461,10 @@ option, or inferred from remotes." (other-window 1) (switch-to-buffer buffer) (funcall 'magit-gh-pulls-editor-mode) - (insert (or default-title "") "\n\n" default-body) + (if (magit-gh-pulls-pr-template-file) + (progn (insert (or default-title "") "\n\n") + (insert-file-contents (magit-gh-pulls-pr-template-file))) + (insert (or default-title "") "\n\n" default-body)) (goto-char (point-min)) (message "Opening pull request editor. C-c C-c to finish, C-c C-k to quit.") (setq-local magit-gh-pulls-editor-context context) diff --git a/elpa/magit-popup-20160425.430/dir b/elpa/magit-popup-20160606.1041/dir similarity index 100% rename from elpa/magit-popup-20160425.430/dir rename to elpa/magit-popup-20160606.1041/dir diff --git a/elpa/magit-popup-20160425.430/magit-popup-autoloads.el b/elpa/magit-popup-20160606.1041/magit-popup-autoloads.el similarity index 90% rename from elpa/magit-popup-20160425.430/magit-popup-autoloads.el rename to elpa/magit-popup-20160606.1041/magit-popup-autoloads.el index 804b67f..791f2c9 100644 --- a/elpa/magit-popup-20160425.430/magit-popup-autoloads.el +++ b/elpa/magit-popup-20160606.1041/magit-popup-autoloads.el @@ -4,7 +4,7 @@ (add-to-list 'load-path (or (file-name-directory #$) (car load-path))) ;;;### (autoloads nil nil ("magit-popup-pkg.el" "magit-popup.el") -;;;;;; (22303 19280 862120 891000)) +;;;;;; (22387 29358 286310 943000)) ;;;*** diff --git a/elpa/magit-popup-20160425.430/magit-popup-pkg.el b/elpa/magit-popup-20160606.1041/magit-popup-pkg.el similarity index 67% rename from elpa/magit-popup-20160425.430/magit-popup-pkg.el rename to elpa/magit-popup-20160606.1041/magit-popup-pkg.el index a2a86cd..9d6c1c4 100644 --- a/elpa/magit-popup-20160425.430/magit-popup-pkg.el +++ b/elpa/magit-popup-20160606.1041/magit-popup-pkg.el @@ -1,4 +1,4 @@ -(define-package "magit-popup" "20160425.430" "Define prefix-infix-suffix command combos" +(define-package "magit-popup" "20160606.1041" "Define prefix-infix-suffix command combos" '((emacs "24.4") (async "20150909.2257") (dash "20151021.113")) diff --git a/elpa/magit-popup-20160425.430/magit-popup.el b/elpa/magit-popup-20160606.1041/magit-popup.el similarity index 97% rename from elpa/magit-popup-20160425.430/magit-popup.el rename to elpa/magit-popup-20160606.1041/magit-popup.el index 6119f7c..830a0d4 100644 --- a/elpa/magit-popup-20160425.430/magit-popup.el +++ b/elpa/magit-popup-20160606.1041/magit-popup.el @@ -66,6 +66,7 @@ (declare-function magit-call-git 'magit-process) (declare-function magit-git-string 'magit-git) (declare-function magit-refresh 'magit-mode) +(declare-function magit-get 'magit-git) (declare-function magit-set 'magit-git) ;; For branch actions. @@ -291,6 +292,8 @@ Don't confuse this with `magit-current-popup'.") This is intended for internal use only. Don't confuse this with `magit-current-popup-args'.") +(defvar-local magit-previous-popup nil) + (defun magit-popup-get (prop) "While a popup is active, get the value of PROP." (if (memq prop '(:switches :options :variables :actions)) @@ -470,7 +473,7 @@ usually specified in that order): Members of VALUE may also be nil. This should only be used together with `:max-action-columns' and allows having gaps in - the action grit, which can help arranging actions sensibly. + the action grid, which can help arranging actions sensibly. `:default-action' The default action of the popup which is used directly instead @@ -806,6 +809,9 @@ TYPE is one of `:action', `:sequence-action', `:switch', or (interactive (list last-command-event)) (let ((action (magit-popup-lookup event :actions)) (variable (magit-popup-lookup event :variables))) + (when (and variable (not (magit-popup-event-arg variable))) + (setq action variable) + (setq variable nil)) (if (or action variable) (let ((magit-current-popup magit-this-popup) (magit-current-popup-args (magit-popup-get-args)) @@ -817,16 +823,17 @@ TYPE is one of `:action', `:sequence-action', `:switch', or (unless action (magit-refresh-popup-buffer))) (if (eq event ?q) - (magit-popup-quit) + (progn (magit-popup-quit) + (when magit-previous-popup + (magit-popup-mode-setup magit-previous-popup nil))) (user-error "%c isn't bound to any action" event))))) (defun magit-popup-set-variable (variable choices &optional default other) - (--if-let (--if-let (magit-git-string "config" "--local" variable) - (cadr (member it choices)) - (car choices)) - (magit-set it variable) - (magit-call-git "config" "--unset" variable)) + (magit-set (--if-let (magit-git-string "config" "--local" variable) + (cadr (member it choices)) + (car choices)) + variable) (magit-refresh) (message "%s %s" variable (magit-popup-format-variable-1 variable choices default other))) @@ -954,7 +961,7 @@ and are defined in `magit-popup-mode-map' (which see)." (split-window-below) (other-window 1) (with-no-warnings ; display-buffer-function is obsolete - (let ((display-buffer-alist nil) + (let ((display-buffer-alist '(("" display-buffer-use-some-window))) (display-buffer-function nil)) (describe-function function))) (fit-window-to-buffer) @@ -1012,6 +1019,7 @@ restored." val (plist-get def :actions))))) (defun magit-popup-mode-setup (popup mode) + (setq magit-previous-popup magit-current-popup) (let ((val (symbol-value (plist-get (symbol-value popup) :variable))) (def (symbol-value popup))) (magit-popup-mode-display-buffer (get-buffer-create @@ -1142,12 +1150,14 @@ of events shared by all popups and before point is adjusted.") 'type type 'event (magit-popup-event-key ev))) (defun magit-popup-format-variable-button (type ev) - (list (format-spec - (button-type-get type 'format) - `((?k . ,(propertize (magit-popup-event-keydsc ev) - 'face 'magit-popup-key)) - (?d . ,(funcall (magit-popup-event-arg ev))))) - 'type type 'event (magit-popup-event-key ev))) + (if (not (magit-popup-event-arg ev)) + (magit-popup-format-action-button 'magit-popup-action-button ev) + (list (format-spec + (button-type-get type 'format) + `((?k . ,(propertize (magit-popup-event-keydsc ev) + 'face 'magit-popup-key)) + (?d . ,(funcall (magit-popup-event-arg ev))))) + 'type type 'event (magit-popup-event-key ev)))) (defun magit-popup-format-variable (variable choices &optional default other width) @@ -1157,12 +1167,14 @@ of events shared by all popups and before point is adjusted.") (defun magit-popup-format-variable-1 (variable choices &optional default other) + "Print popup entry for git VARIABLE with possible CHOICES. +DEFAULT is git's default choice for VARIABLE. OTHER is a git +variable whose value may be used as a default." (let ((local (magit-git-string "config" "--local" variable)) (global (magit-git-string "config" "--global" variable))) (when other - (--if-let (magit-git-string "config" other) - (setq other (concat other ":" it)) - (setq other nil))) + (setq other (--when-let (magit-get other) + (concat other ":" it)))) (concat (propertize "[" 'face 'magit-popup-disabled-argument) (mapconcat diff --git a/elpa/magit-popup-20160425.430/magit-popup.info b/elpa/magit-popup-20160606.1041/magit-popup.info similarity index 100% rename from elpa/magit-popup-20160425.430/magit-popup.info rename to elpa/magit-popup-20160606.1041/magit-popup.info diff --git a/elpa/markdown-mode-20160409.650/markdown-mode-pkg.el b/elpa/markdown-mode-20160409.650/markdown-mode-pkg.el deleted file mode 100644 index 910d08c..0000000 --- a/elpa/markdown-mode-20160409.650/markdown-mode-pkg.el +++ /dev/null @@ -1 +0,0 @@ -(define-package "markdown-mode" "20160409.650" "Major mode for Markdown-formatted text" '((emacs "24") (cl-lib "0.5")) :url "http://jblevins.org/projects/markdown-mode/" :keywords '("markdown" "github flavored markdown" "itex")) diff --git a/elpa/markdown-mode-20160409.650/markdown-mode-autoloads.el b/elpa/markdown-mode-20160610.1745/markdown-mode-autoloads.el similarity index 88% rename from elpa/markdown-mode-20160409.650/markdown-mode-autoloads.el rename to elpa/markdown-mode-20160610.1745/markdown-mode-autoloads.el index dbec9ec..6ab35c4 100644 --- a/elpa/markdown-mode-20160409.650/markdown-mode-autoloads.el +++ b/elpa/markdown-mode-20160610.1745/markdown-mode-autoloads.el @@ -3,8 +3,8 @@ ;;; Code: (add-to-list 'load-path (or (file-name-directory #$) (car load-path))) -;;;### (autoloads nil "markdown-mode" "markdown-mode.el" (22297 19801 -;;;;;; 343360 509000)) +;;;### (autoloads nil "markdown-mode" "markdown-mode.el" (22387 29357 +;;;;;; 564180 716000)) ;;; Generated autoloads from markdown-mode.el (autoload 'markdown-mode "markdown-mode" "\ diff --git a/elpa/markdown-mode-20160610.1745/markdown-mode-pkg.el b/elpa/markdown-mode-20160610.1745/markdown-mode-pkg.el new file mode 100644 index 0000000..518fe59 --- /dev/null +++ b/elpa/markdown-mode-20160610.1745/markdown-mode-pkg.el @@ -0,0 +1 @@ +(define-package "markdown-mode" "20160610.1745" "Major mode for Markdown-formatted text" '((emacs "24") (cl-lib "0.5")) :url "http://jblevins.org/projects/markdown-mode/" :keywords '("markdown" "github flavored markdown" "itex")) diff --git a/elpa/markdown-mode-20160409.650/markdown-mode.el b/elpa/markdown-mode-20160610.1745/markdown-mode.el similarity index 96% rename from elpa/markdown-mode-20160409.650/markdown-mode.el rename to elpa/markdown-mode-20160610.1745/markdown-mode.el index 18d3c91..6140a4f 100644 --- a/elpa/markdown-mode-20160409.650/markdown-mode.el +++ b/elpa/markdown-mode-20160610.1745/markdown-mode.el @@ -33,7 +33,7 @@ ;; Maintainer: Jason R. Blevins ;; Created: May 24, 2007 ;; Version: 2.1 -;; Package-Version: 20160409.650 +;; Package-Version: 20160610.1745 ;; Package-Requires: ((emacs "24") (cl-lib "0.5")) ;; Keywords: Markdown, GitHub Flavored Markdown, itex ;; URL: http://jblevins.org/projects/markdown-mode/ @@ -58,35 +58,93 @@ ;;; Commentary: ;; markdown-mode is a major mode for editing [Markdown][]-formatted -;; text. markdown-mode is free software, licensed -;; under the GNU GPL. +;; text. The latest stable version is markdown-mode 2.1, released on +;; January 9, 2016. See the [release notes][] for details. +;; markdown-mode is free software, licensed under the GNU GPL. + +;; ![Markdown Mode Screenshot](http://jblevins.org/projects/markdown-mode/screenshots/20160108-001.png) + +;; [Markdown]: http://daringfireball.net/projects/markdown/ +;; [release notes]: http://jblevins.org/projects/markdown-mode/rev-2-1 + +;;; Installation: + +;; The recommended way to install markdown-mode is to install the package +;; from [MELPA Stable](https://stable.melpa.org/#/markdown-mode) +;; using `package.el'. First, configure `package.el' and the MELPA Stable +;; repository by adding the following to your `.emacs', `init.el', +;; or equivalent startup file: + +;; (require 'package) +;; (add-to-list 'package-archives +;; '("melpa-stable" . "https://stable.melpa.org/packages/")) +;; (package-initialize) + +;; Then, after restarting Emacs or evaluating the above statements, issue +;; the following command: `M-x package-install RET markdown-mode RET`. +;; When installed this way, the major modes `markdown-mode' and `gfm-mode' +;; will be autoloaded and `markdown-mode' will be used for file names +;; ending in either `.md` or `.markdown`. ;; -;; [Markdown]: http://daringfireball.net/projects/markdown/ +;; Alternatively, if you manage loading packages with [use-package][] +;; then you can automatically install and configure `markdown-mode' by +;; adding a declaration such as this one to your init file (as an +;; example; adjust settings as desired): ;; -;; The latest stable version is markdown-mode 2.1, released on January 9, 2016: +;; (use-package markdown-mode +;; :ensure t +;; :commands (markdown-mode gfm-mode) +;; :mode (("README\\.md\\'" . gfm-mode) +;; ("\\.md\\'" . markdown-mode) +;; ("\\.markdown\\'" . markdown-mode)) +;; :init (setq markdown-command "multimarkdown")) + +;; [MELPA Stable]: http://stable.melpa.org/ +;; [use-package]: https://github.com/jwiegley/use-package + +;; **Direct Download** + +;; Alternatively you can manually download and install markdown-mode. +;; First, download the [latest stable version][markdown-mode.el] and +;; save the file where Emacs can find it (i.e., a directory in your +;; `load-path'). You can then configure `markdown-mode' and `gfm-mode' +;; to load automatically by adding the following to your init file: + +;; (autoload 'markdown-mode "markdown-mode" +;; "Major mode for editing Markdown files" t) +;; (add-to-list 'auto-mode-alist '("\\.markdown\\'" . markdown-mode)) +;; (add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode)) ;; -;; * [markdown-mode.el][] -;; * [Screenshot][][^theme] -;; * [Release notes][] -;; -;; [markdown-mode.el]: http://jblevins.org/projects/markdown-mode/markdown-mode.el -;; [Screenshot]: http://jblevins.org/projects/markdown-mode/screenshots/20160108-001.png -;; [Release notes]: http://jblevins.org/projects/markdown-mode/rev-2-1 -;; -;; [^theme]: The theme used in the screenshot is -;; [color-theme-twilight](https://github.com/crafterm/twilight-emacs). -;; -;; The latest development version can be obtained from the Git -;; repository at or from -;; [GitHub][]: -;; -;; git clone git://jblevins.org/git/markdown-mode.git +;; (autoload 'gfm-mode "markdown-mode" +;; "Major mode for editing GitHub Flavored Markdown files" t) +;; (add-to-list 'auto-mode-alist '("README\\.md\\'" . gfm-mode)) + +;; [markdown-mode.el]: http://jblevins.org/projects/markdown-mode/markdown-mode.el + +;; **Development Version** + +;; To follow or contribute to markdown-mode development, you can +;; browse or clone the Git repository +;; [on GitHub](https://github.com/jrblevin/markdown-mode): + ;; git clone https://github.com/jrblevin/markdown-mode.git + +;; If you prefer to install and use the development version, which may +;; become unstable at some times, you can either clone the Git +;; repository as above or install markdown-mode from +;; [MELPA](https://melpa.org/#/markdown-mode). ;; -;; [devel.el]: http://jblevins.org/git/markdown-mode.git/plain/markdown-mode.el -;; [GitHub]: https://github.com/jrblevin/markdown-mode/ +;; If you clone the repository directly, then make sure that Emacs can +;; find it by adding the following line to your startup file: ;; -;; markdown-mode is also available in several package managers, including: +;; (add-to-list 'load-path "/path/to/markdown-mode/repository") + +;; **Packaged Installation** + +;; markdown-mode is also available in several package managers. You +;; may want to confirm that the package you install contains the +;; latest stable version first (and please notify the package +;; maintainer if not). ;; ;; * Debian Linux: [elpa-markdown-mode][] and [emacs-goodies-el][] ;; * Ubuntu Linux: [elpa-markdown-mode][elpa-ubuntu] and [emacs-goodies-el][emacs-goodies-el-ubuntu] @@ -105,22 +163,8 @@ ;; [macports-ticket]: http://trac.macports.org/ticket/35716 ;; [freebsd-port]: http://svnweb.freebsd.org/ports/head/textproc/markdown-mode.el -;;; Installation: +;; **Dependencies** -;; Make sure to place `markdown-mode.el` somewhere in the load-path and add -;; the following lines to your `.emacs` file to associate markdown-mode -;; with `.text`, `.markdown`, and `.md` files: -;; -;; (autoload 'markdown-mode "markdown-mode" -;; "Major mode for editing Markdown files" t) -;; (add-to-list 'auto-mode-alist '("\\.text\\'" . markdown-mode)) -;; (add-to-list 'auto-mode-alist '("\\.markdown\\'" . markdown-mode)) -;; (add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode)) -;; -;; There is no official Markdown file extension, nor is there even a -;; _de facto_ standard, so you can easily add, change, or remove any -;; of the file extensions above as needed. -;; ;; `markdown-mode' depends on `cl-lib', which has been bundled with ;; GNU Emacs since 24.3. Users of GNU Emacs 24.1 and 24.2 can install ;; `cl-lib' with `package.el'. @@ -515,6 +559,15 @@ ;; asymmetric header styling, placing header characters only on ;; the left of headers (default: `nil'). ;; +;; * `markdown-header-scaling' - set to a non-nil value to use +;; a variable-pitch font for headings where the size corresponds +;; to the level of the heading (default: `nil'). +;; +;; * `markdown-header-scaling-values' - list of scaling values, +;; relative to baseline, for headers of levels one through six, +;; used when `markdown-header-scaling' is non-nil +;; (default: `(list 1.8 1.4 1.2 1.0 1.0 1.0)`). +;; ;; * `markdown-list-indent-width' - depth of indentation for lists ;; when inserting, promoting, and demoting list items (default: 4). ;; @@ -890,11 +943,13 @@ (require 'outline) (require 'thingatpt) (require 'cl-lib) +(require 'url-parse) (defvar jit-lock-start) (defvar jit-lock-end) (declare-function eww-open-file "eww") +(declare-function url-path-and-query "url-parse") ;;; Constants ================================================================= @@ -1223,7 +1278,7 @@ Group 2 matches only the label, without the surrounding markup. Group 3 matches the closing square bracket.") (defconst markdown-regex-header - "^\\(?:\\(.+?\\)\n\\(?:\\(=+\\)\\|\\(-+\\)\\)\\|\\(#+\\)[ \t]+\\(.*?\\)[ \t]*\\(#*\\)\\)$" + "^\\(?:\\([^\r\n- ].*\\)\n\\(?:\\(=+\\)\\|\\(-+\\)\\)\\|\\(#+\\)[ \t]+\\(.*?\\)[ \t]*\\(#*\\)\\)$" "Regexp identifying Markdown headings. Group 1 matches the text of a setext heading. Group 2 matches the underline of a level-1 setext heading. @@ -1232,40 +1287,8 @@ Group 4 matches the opening hash marks of an atx heading. Group 5 matches the text, without surrounding whitespace, of an atx heading. Group 6 matches the closing hash marks of an atx heading.") -(defconst markdown-regex-header-1-atx - "^\\(#\\)[ \t]+\\(.*?\\)[ \t]*\\(#*\\)$" - "Regular expression for level 1 atx-style (hash mark) headers.") - -(defconst markdown-regex-header-2-atx - "^\\(##\\)[ \t]+\\(.*?\\)[ \t]*\\(#*\\)$" - "Regular expression for level 2 atx-style (hash mark) headers.") - -(defconst markdown-regex-header-3-atx - "^\\(###\\)[ \t]+\\(.*?\\)[ \t]*\\(#*\\)$" - "Regular expression for level 3 atx-style (hash mark) headers.") - -(defconst markdown-regex-header-4-atx - "^\\(####\\)[ \t]+\\(.*?\\)[ \t]*\\(#*\\)$" - "Regular expression for level 4 atx-style (hash mark) headers.") - -(defconst markdown-regex-header-5-atx - "^\\(#####\\)[ \t]+\\(.*?\\)[ \t]*\\(#*\\)$" - "Regular expression for level 5 atx-style (hash mark) headers.") - -(defconst markdown-regex-header-6-atx - "^\\(######\\)[ \t]+\\(.*?\\)[ \t]*\\(#*\\)$" - "Regular expression for level 6 atx-style (hash mark) headers.") - -(defconst markdown-regex-header-1-setext - "^\\(.*\\)\n\\(=+\\)$" - "Regular expression for level 1 setext-style (underline) headers.") - -(defconst markdown-regex-header-2-setext - "^\\(.*\\)\n\\(-+\\)$" - "Regular expression for level 2 setext-style (underline) headers.") - (defconst markdown-regex-header-setext - "^\\(.+\\)\n\\(\\(?:=\\|-\\)+\\)$" + "^\\([^\r\n- ].*\\)\n\\(=+\\|-+\\)$" "Regular expression for generic setext-style (underline) headers.") (defconst markdown-regex-header-atx @@ -1436,9 +1459,17 @@ missing." 3 "[ ]?\\([^[:space:]]+\\|{[^}]*}\\)?\\([[:space:]]*?\\)$") "Regular expression for matching Pandoc tildes.") -(defconst markdown-regex-multimarkdown-metadata - "^\\([[:alpha:]][[:alpha:] _-]*?\\)\\(:[ \t]*\\)\\(.*\\)$" - "Regular expression for matching MultiMarkdown metadata.") +(defconst markdown-regex-declarative-metadata + "^\\([[:alpha:]][[:alpha:] _-]*?\\)\\([:=][ \t]*\\)\\(.*\\)$" + "Regular expression for matching declarative metadata statements. +This matches MultiMarkdown metadata as well as YAML and TOML +assignments such as the following: + + variable: value + +or + + variable = value") (defconst markdown-regex-pandoc-metadata "^\\(%\\)\\([ \t]*\\)\\(.*\\(?:\n[ \t]+.*\\)*\\)" @@ -1490,7 +1521,7 @@ Function is called repeatedly until it returns nil. For details, see (code-match (markdown-code-block-at-pos end)) (new-end (or (and code-match (cl-second code-match)) new-end))) (unless (and (eq new-start start) (eq new-end end)) - (cons new-start new-end)))))) + (cons new-start (min new-end (point-max)))))))) (defun markdown-font-lock-extend-region-function (start end _) "Used in `jit-lock-after-change-extend-region-functions'. @@ -1884,7 +1915,7 @@ start which was previously propertized." (save-excursion (goto-char start) (cl-loop - while (re-search-forward markdown-regex-multimarkdown-metadata end t) + while (re-search-forward markdown-regex-declarative-metadata end t) do (when (get-text-property (match-beginning 0) 'markdown-yaml-metadata-section) (put-text-property (match-beginning 1) (match-end 1) @@ -2104,41 +2135,6 @@ START and END delimit region to propertize." "Base face for headers hash delimiter." :group 'markdown-faces) -(defface markdown-header-face - '((t (:inherit font-lock-function-name-face :weight bold))) - "Base face for headers." - :group 'markdown-faces) - -(defface markdown-header-face-1 - '((t (:inherit markdown-header-face))) - "Face for level-1 headers." - :group 'markdown-faces) - -(defface markdown-header-face-2 - '((t (:inherit markdown-header-face))) - "Face for level-2 headers." - :group 'markdown-faces) - -(defface markdown-header-face-3 - '((t (:inherit markdown-header-face))) - "Face for level-3 headers." - :group 'markdown-faces) - -(defface markdown-header-face-4 - '((t (:inherit markdown-header-face))) - "Face for level-4 headers." - :group 'markdown-faces) - -(defface markdown-header-face-5 - '((t (:inherit markdown-header-face))) - "Face for level-5 headers." - :group 'markdown-faces) - -(defface markdown-header-face-6 - '((t (:inherit markdown-header-face))) - "Face for level-6 headers." - :group 'markdown-faces) - (defface markdown-inline-code-face '((t (:inherit font-lock-constant-face))) "Face for inline code." @@ -2229,6 +2225,68 @@ START and END delimit region to propertize." "Face for mouse highlighting." :group 'markdown-faces) +(defcustom markdown-header-scaling nil + "Whether to use variable-height faces for headers. +When non-nil, `markdown-header-face' will inherit from +`variable-pitch' and the scaling values in +`markdown-header-scaling-values' will be applied to +headers of levels one through six respectively." + :type 'boolean + :initialize 'custom-initialize-default + :set (lambda (symbol value) + (set-default symbol value) + (markdown-update-header-faces value)) + :group 'markdown-faces) + +(defcustom markdown-header-scaling-values + '(1.8 1.4 1.2 1.0 1.0 1.0) + "List of scaling values for headers of level one through six. +Used when `markdown-header-scaling' is non-nil." + :type 'list + :initialize 'custom-initialize-default + :set (lambda (symbol value) + (set-default symbol value) + (markdown-update-header-faces markdown-header-scaling value)) + :group 'markdown-faces) + +(defun markdown-make-header-faces () + "Build the faces used for Markdown headers." + (defface markdown-header-face + `((t (:inherit (,(when markdown-header-scaling 'variable-pitch) + font-lock-function-name-face) + :weight bold))) + "Base face for headers." + :group 'markdown-faces) + (dotimes (num 6) + (let* ((num1 (1+ num)) + (face-name (intern (format "markdown-header-face-%s" num1))) + (scale (if markdown-header-scaling + (float (nth num markdown-header-scaling-values)) + 1.0))) + (eval + `(defface ,face-name + '((t (:inherit markdown-header-face :height ,scale))) + (format "Face for level %s headers. + +You probably don't want to customize this face directly. Instead +you can customize the base face `markdown-header-face' or the +variable-height variable `markdown-header-scaling'." ,num1) + :group 'markdown-faces))))) + +(markdown-make-header-faces) + +(defun markdown-update-header-faces (&optional scaling scaling-values) + "Update header faces, depending on if header SCALING is desired. +If so, use given list of SCALING-VALUES relative to the baseline +size of `markdown-header-face'." + (dotimes (num 6) + (let* ((face-name (intern (format "markdown-header-face-%s" (1+ num)))) + (scale (cond ((not scaling) 1.0) + (scaling-values (float (nth num scaling-values))) + (t (float (nth num markdown-header-scaling-values)))))) + (unless (get face-name 'saved-face) ; Don't update customized faces + (set-face-attribute face-name nil :height scale))))) + (defun markdown-syntactic-face (state) "Return font-lock face for characters with given STATE. See `font-lock-syntactic-face-function' for details." @@ -2276,7 +2334,7 @@ See `font-lock-syntactic-face-function' for details." (markdown-match-heading-1-atx . ((4 markdown-header-delimiter-face) (5 markdown-header-face-1) (6 markdown-header-delimiter-face))) - (markdown-match-multimarkdown-metadata . ((1 markdown-metadata-key-face) + (markdown-match-declarative-metadata . ((1 markdown-metadata-key-face) (2 markdown-markup-face) (3 markdown-metadata-value-face))) (markdown-match-pandoc-metadata . ((1 markdown-markup-face) @@ -3071,9 +3129,9 @@ is \"\n\n\"" t)) (t nil)))) -(defun markdown-match-multimarkdown-metadata (last) - "Match MultiMarkdown metadata from the point to LAST." - (markdown-match-generic-metadata markdown-regex-multimarkdown-metadata last)) +(defun markdown-match-declarative-metadata (last) + "Match declarative metadata from the point to LAST." + (markdown-match-generic-metadata markdown-regex-declarative-metadata last)) (defun markdown-match-pandoc-metadata (last) "Match Pandoc metadata from the point to LAST." @@ -3777,17 +3835,11 @@ if three backquotes inserted at the beginning of line." "Web-Ontology-Language" "WebIDL" "X10" "XC" "XML" "XPages" "XProc" "XQuery" "XS" "XSLT" "Xojo" "Xtend" "YAML" "Yacc" "Zephir" "Zimpl" "desktop" "eC" "edn" "fish" "mupad" "nesC" "ooc" "reStructuredText" "wisp" "xBase") - "Language specifiers recognized by github's syntax highlighting features.") + "Language specifiers recognized by GitHub's syntax highlighting features.") (defvar markdown-gfm-used-languages nil - "Languages in GFM code blocks which are not explicitly declared. -Known language are declared in -`markdown-gfm-recognized-languages' and -`markdown-gfm-additional-languages'.") + "Language names used in GFM code blocks.") (make-variable-buffer-local 'markdown-gfm-used-languages) -(defvar markdown-gfm-last-used-language nil - "Last language used in the current buffer in GFM code blocks.") -(make-variable-buffer-local 'markdown-gfm-last-used-language) (defun markdown-trim-whitespace (str) (markdown-replace-regexp-in-string @@ -3812,13 +3864,10 @@ Known language are declared in (if markdown-gfm-downcase-languages (cl-mapcar #'downcase given-corpus) given-corpus)))) -(defun markdown-add-language-if-new (lang) - (let* ((cleaned-lang (markdown-clean-language-string lang)) - (find-result - (cl-find cleaned-lang (markdown-gfm-get-corpus) - :test #'equal))) - (setq markdown-gfm-last-used-language cleaned-lang) - (unless find-result (push cleaned-lang markdown-gfm-used-languages)))) +(defun markdown-gfm-add-used-language (lang) + "Clean LANG and add to list of used languages." + (add-to-list 'markdown-gfm-used-languages + (markdown-clean-language-string lang))) (defun markdown-insert-gfm-code-block (&optional lang) "Insert GFM code block for language LANG. @@ -3832,12 +3881,12 @@ automatically in order to have the correct markup." (markdown-clean-language-string (completing-read (format "Programming language [%s]: " - (or markdown-gfm-last-used-language "none")) + (or (car markdown-gfm-used-languages) "none")) (markdown-gfm-get-corpus) nil 'confirm nil 'markdown-gfm-language-history)) (quit ""))))) - (unless (string= lang "") (markdown-add-language-if-new lang)) + (unless (string= lang "") (markdown-gfm-add-used-language lang)) (when (> (length lang) 0) (setq lang (concat " " lang))) (if (markdown-use-region-p) (let ((b (region-beginning)) (e (region-end))) @@ -3876,7 +3925,7 @@ automatically in order to have the correct markup." (when (and (match-beginning 2) (match-end 2)) (buffer-substring-no-properties (match-beginning 2) (match-end 2))))) - do (progn (when lang (markdown-add-language-if-new lang)) + do (progn (when lang (markdown-gfm-add-used-language lang)) (goto-char (next-single-property-change (point) prop))))))) @@ -5485,9 +5534,21 @@ Derived from `org-end-of-subtree'." (defun markdown-outline-fix-visibility () "Hide any false positive headings that should not be shown. For example, headings inside preformatted code blocks may match -`outline-regexp' but should not be shown as headings when cycling." +`outline-regexp' but should not be shown as headings when cycling. +Also, the ending --- line in metadata blocks appears to be a +setext header, but should not be folded." (save-excursion (goto-char (point-min)) + ;; Unhide any false positives in metadata blocks + (when (markdown-text-property-at-point 'markdown-yaml-metadata-begin) + (let* ((body (progn (forward-line) + (markdown-text-property-at-point + 'markdown-yaml-metadata-section))) + (end (progn (goto-char (cl-second body)) + (markdown-text-property-at-point + 'markdown-yaml-metadata-end)))) + (outline-flag-region (point-min) (1+ (cl-second end)) nil))) + ;; Hide any false positives in code blocks (unless (outline-on-heading-p) (outline-next-visible-heading 1)) (while (< (point) (point-max)) @@ -6101,9 +6162,25 @@ not at a link or the link reference is not defined returns nil." (t nil))) (defun markdown-follow-link-at-point () - "Open the current non-wiki link in a browser." + "Open the current non-wiki link. +If the link is a complete URL, open in browser with `browse-url'. +Otherwise, open with `find-file' after stripping anchor and/or query string." (interactive) - (if (markdown-link-p) (browse-url (markdown-link-link)) + (if (markdown-link-p) + (let* ((link (markdown-link-link)) + (struct (url-generic-parse-url link)) + (full (url-fullness struct)) + (file link)) + ;; Parse URL, determine fullness, strip query string + (if (fboundp 'url-path-and-query) + (setq file (car (url-path-and-query struct))) + (when (and (setq file (url-filename struct)) + (string-match "\\?" file)) + (setq file (substring file 0 (match-beginning 0))))) + ;; Open full URLs in browser, files in Emacs + (if full + (browse-url link) + (when (and file (> (length file) 0)) (find-file file)))) (error "Point is not at a Markdown link or URI"))) diff --git a/elpa/nyan-mode-20160425.1737/img/nyan-frame-1.xpm b/elpa/nyan-mode-20160429.1323/img/nyan-frame-1.xpm similarity index 100% rename from elpa/nyan-mode-20160425.1737/img/nyan-frame-1.xpm rename to elpa/nyan-mode-20160429.1323/img/nyan-frame-1.xpm diff --git a/elpa/nyan-mode-20160425.1737/img/nyan-frame-2.xpm b/elpa/nyan-mode-20160429.1323/img/nyan-frame-2.xpm similarity index 100% rename from elpa/nyan-mode-20160425.1737/img/nyan-frame-2.xpm rename to elpa/nyan-mode-20160429.1323/img/nyan-frame-2.xpm diff --git a/elpa/nyan-mode-20160425.1737/img/nyan-frame-3.xpm b/elpa/nyan-mode-20160429.1323/img/nyan-frame-3.xpm similarity index 100% rename from elpa/nyan-mode-20160425.1737/img/nyan-frame-3.xpm rename to elpa/nyan-mode-20160429.1323/img/nyan-frame-3.xpm diff --git a/elpa/nyan-mode-20160425.1737/img/nyan-frame-4.xpm b/elpa/nyan-mode-20160429.1323/img/nyan-frame-4.xpm similarity index 100% rename from elpa/nyan-mode-20160425.1737/img/nyan-frame-4.xpm rename to elpa/nyan-mode-20160429.1323/img/nyan-frame-4.xpm diff --git a/elpa/nyan-mode-20160425.1737/img/nyan-frame-5.xpm b/elpa/nyan-mode-20160429.1323/img/nyan-frame-5.xpm similarity index 100% rename from elpa/nyan-mode-20160425.1737/img/nyan-frame-5.xpm rename to elpa/nyan-mode-20160429.1323/img/nyan-frame-5.xpm diff --git a/elpa/nyan-mode-20160425.1737/img/nyan-frame-6.xpm b/elpa/nyan-mode-20160429.1323/img/nyan-frame-6.xpm similarity index 100% rename from elpa/nyan-mode-20160425.1737/img/nyan-frame-6.xpm rename to elpa/nyan-mode-20160429.1323/img/nyan-frame-6.xpm diff --git a/elpa/nyan-mode-20160425.1737/img/nyan.xpm b/elpa/nyan-mode-20160429.1323/img/nyan.xpm similarity index 100% rename from elpa/nyan-mode-20160425.1737/img/nyan.xpm rename to elpa/nyan-mode-20160429.1323/img/nyan.xpm diff --git a/elpa/nyan-mode-20160425.1737/img/outerspace.xpm b/elpa/nyan-mode-20160429.1323/img/outerspace.xpm similarity index 100% rename from elpa/nyan-mode-20160425.1737/img/outerspace.xpm rename to elpa/nyan-mode-20160429.1323/img/outerspace.xpm diff --git a/elpa/nyan-mode-20160425.1737/img/rainbow.xpm b/elpa/nyan-mode-20160429.1323/img/rainbow.xpm similarity index 100% rename from elpa/nyan-mode-20160425.1737/img/rainbow.xpm rename to elpa/nyan-mode-20160429.1323/img/rainbow.xpm diff --git a/elpa/nyan-mode-20160425.1737/mus/nyanlooped.mp3 b/elpa/nyan-mode-20160429.1323/mus/nyanlooped.mp3 similarity index 100% rename from elpa/nyan-mode-20160425.1737/mus/nyanlooped.mp3 rename to elpa/nyan-mode-20160429.1323/mus/nyanlooped.mp3 diff --git a/elpa/nyan-mode-20160425.1737/nyan-mode-autoloads.el b/elpa/nyan-mode-20160429.1323/nyan-mode-autoloads.el similarity index 84% rename from elpa/nyan-mode-20160425.1737/nyan-mode-autoloads.el rename to elpa/nyan-mode-20160429.1323/nyan-mode-autoloads.el index bb9250e..7c29697 100644 --- a/elpa/nyan-mode-20160425.1737/nyan-mode-autoloads.el +++ b/elpa/nyan-mode-20160429.1323/nyan-mode-autoloads.el @@ -3,8 +3,8 @@ ;;; Code: (add-to-list 'load-path (or (file-name-directory #$) (car load-path))) -;;;### (autoloads nil "nyan-mode" "nyan-mode.el" (22303 19279 998179 -;;;;;; 176000)) +;;;### (autoloads nil "nyan-mode" "nyan-mode.el" (22387 29356 944663 +;;;;;; 923000)) ;;; Generated autoloads from nyan-mode.el (defvar nyan-mode nil "\ @@ -27,8 +27,8 @@ option `scroll-bar-mode'. ;;;*** -;;;### (autoloads nil nil ("nyan-mode-pkg.el") (22303 19280 74749 -;;;;;; 222000)) +;;;### (autoloads nil nil ("nyan-mode-pkg.el") (22387 29357 56682 +;;;;;; 748000)) ;;;*** diff --git a/elpa/nyan-mode-20160425.1737/nyan-mode-pkg.el b/elpa/nyan-mode-20160429.1323/nyan-mode-pkg.el similarity index 78% rename from elpa/nyan-mode-20160425.1737/nyan-mode-pkg.el rename to elpa/nyan-mode-20160429.1323/nyan-mode-pkg.el index c2bfa3e..8017c8b 100644 --- a/elpa/nyan-mode-20160425.1737/nyan-mode-pkg.el +++ b/elpa/nyan-mode-20160429.1323/nyan-mode-pkg.el @@ -1,4 +1,4 @@ -(define-package "nyan-mode" "20160425.1737" "Nyan Cat shows position in current buffer in mode-line." 'nil :url "https://github.com/TeMPOraL/nyan-mode/" :keywords +(define-package "nyan-mode" "20160429.1323" "Nyan Cat shows position in current buffer in mode-line." 'nil :url "https://github.com/TeMPOraL/nyan-mode/" :keywords '("nyan" "cat" "lulz" "scrolling" "pop tart cat" "build something amazing")) ;; Local Variables: ;; no-byte-compile: t diff --git a/elpa/nyan-mode-20160425.1737/nyan-mode.el b/elpa/nyan-mode-20160429.1323/nyan-mode.el similarity index 98% rename from elpa/nyan-mode-20160425.1737/nyan-mode.el rename to elpa/nyan-mode-20160429.1323/nyan-mode.el index 418e3ff..0e1048c 100644 --- a/elpa/nyan-mode-20160425.1737/nyan-mode.el +++ b/elpa/nyan-mode-20160429.1323/nyan-mode.el @@ -4,7 +4,7 @@ ;; Author: Jacek "TeMPOraL" Zlydach ;; URL: https://github.com/TeMPOraL/nyan-mode/ -;; Version: 1.1.0 +;; Version: 1.1.1 ;; Keywords: nyan, cat, lulz, scrolling, pop tart cat, build something amazing ;; This file is not part of GNU Emacs. @@ -187,6 +187,10 @@ This can be t or nil." "(  >三ワ< )" "(   三>ワ<)" "(  >三ワ< )" "( >ワ三<  )"]]) +(defun nyan-toggle-wavy-trail () + "Toggle the trail to look more like the original Nyan Cat animation." + (interactive) + (setq nyan-wavy-trail (not nyan-wavy-trail))) (defun nyan-swich-anim-frame () (setq nyan-current-frame (% (+ 1 nyan-current-frame) 6)) diff --git a/elpa/pcache-20151109.639/pcache-pkg.el b/elpa/pcache-20151109.639/pcache-pkg.el deleted file mode 100644 index edc6507..0000000 --- a/elpa/pcache-20151109.639/pcache-pkg.el +++ /dev/null @@ -1 +0,0 @@ -(define-package "pcache" "20151109.639" "persistent caching for Emacs." '((eieio "1.3"))) diff --git a/elpa/pcache-20151109.639/pcache-autoloads.el b/elpa/pcache-20160624.736/pcache-autoloads.el similarity index 82% rename from elpa/pcache-20151109.639/pcache-autoloads.el rename to elpa/pcache-20160624.736/pcache-autoloads.el index 5adeb47..ccfe73e 100644 --- a/elpa/pcache-20151109.639/pcache-autoloads.el +++ b/elpa/pcache-20160624.736/pcache-autoloads.el @@ -3,7 +3,7 @@ ;;; Code: (add-to-list 'load-path (or (file-name-directory #$) (car load-path))) -;;;### (autoloads nil nil ("pcache.el") (22221 60696 480763 960000)) +;;;### (autoloads nil nil ("pcache.el") (22387 29356 175133 516000)) ;;;*** diff --git a/elpa/pcache-20160624.736/pcache-pkg.el b/elpa/pcache-20160624.736/pcache-pkg.el new file mode 100644 index 0000000..2b46aa9 --- /dev/null +++ b/elpa/pcache-20160624.736/pcache-pkg.el @@ -0,0 +1 @@ +(define-package "pcache" "20160624.736" "persistent caching for Emacs." '((eieio "1.3"))) diff --git a/elpa/pcache-20151109.639/pcache.el b/elpa/pcache-20160624.736/pcache.el similarity index 88% rename from elpa/pcache-20151109.639/pcache.el rename to elpa/pcache-20160624.736/pcache.el index e853502..bf867a3 100644 --- a/elpa/pcache-20151109.639/pcache.el +++ b/elpa/pcache-20160624.736/pcache.el @@ -4,8 +4,8 @@ ;; Author: Yann Hodique ;; Keywords: -;; Package-Version: 20151109.639 -;; Version: 0.3.2 +;; Package-Version: 20160624.736 +;; Version: 0.4.0 ;; Package-Requires: ((eieio "1.3")) ;; This file is free software; you can redistribute it and/or modify @@ -67,7 +67,7 @@ (defconst pcache-default-save-delay 300) -(defconst pcache-version-constant "0.3") +(defconst pcache-version-constant "0.4") (defclass pcache-repository (eieio-persistent eieio-named) ((version :initarg :version :initform nil) @@ -97,8 +97,7 @@ (let* ((pcache-avoid-recursion t) (*pcache-repository-name* newname) (obj (eieio-persistent-read path 'pcache-repository t))) - (and (or (equal (oref obj :version) - (oref-default (object-class obj) version-constant)) + (and (or (pcache-validate-repo obj) (error "wrong version")) (puthash newname obj *pcache-repositories*) obj)) @@ -108,14 +107,29 @@ (unless (file-exists-p dir) (make-directory dir t)) (oset obj :file path) + (oset obj :version (oref-default obj version-constant)) (puthash newname obj *pcache-repositories*) obj)))) +(defun pcache-validate-repo (cache) + (and + (equal (oref cache :version) + (oref-default (object-class cache) version-constant)) + (hash-table-p (oref cache :entries)) + (every + (lambda (entry) + (and (object-of-class-p entry (oref cache :entry-cls)) + (or (null (oref entry :value-cls)) + (object-of-class-p + (oref entry :value) (oref entry :value-cls))))) + (hash-table-values (oref cache :entries))))) + (defclass pcache-entry () ((timestamp :initarg :timestamp :initform (float-time (current-time))) (ttl :initarg :ttl :initform nil) - (value :initarg :value :initform nil))) + (value :initarg :value :initform nil) + (value-cls :initarg :value-cls :initform nil))) (defmethod pcache-entry-valid-p ((entry pcache-entry)) (let ((ttl (oref entry :ttl))) @@ -146,7 +160,10 @@ (entry (or (and (eieio-object-p value) (object-of-class-p value 'pcache-entry) value) - (make-instance (oref cache :entry-cls) :value value)))) + (make-instance + (oref cache :entry-cls) + :value value + :value-cls (and (object-p value) (object-class value)))))) (when ttl (oset entry :ttl ttl)) (prog1 diff --git a/elpa/popup-20160409.2133/popup-pkg.el b/elpa/popup-20160409.2133/popup-pkg.el deleted file mode 100644 index ece9f3d..0000000 --- a/elpa/popup-20160409.2133/popup-pkg.el +++ /dev/null @@ -1 +0,0 @@ -(define-package "popup" "20160409.2133" "Visual Popup User Interface" '((cl-lib "0.5")) :keywords '("lisp")) diff --git a/elpa/popup-20160409.2133/popup-autoloads.el b/elpa/popup-20160531.425/popup-autoloads.el similarity index 82% rename from elpa/popup-20160409.2133/popup-autoloads.el rename to elpa/popup-20160531.425/popup-autoloads.el index b1f938b..cfdb055 100644 --- a/elpa/popup-20160409.2133/popup-autoloads.el +++ b/elpa/popup-20160531.425/popup-autoloads.el @@ -3,7 +3,7 @@ ;;; Code: (add-to-list 'load-path (or (file-name-directory #$) (car load-path))) -;;;### (autoloads nil nil ("popup.el") (22297 20819 833559 734000)) +;;;### (autoloads nil nil ("popup.el") (22387 29355 788583 154000)) ;;;*** diff --git a/elpa/popup-20160531.425/popup-pkg.el b/elpa/popup-20160531.425/popup-pkg.el new file mode 100644 index 0000000..f43647d --- /dev/null +++ b/elpa/popup-20160531.425/popup-pkg.el @@ -0,0 +1 @@ +(define-package "popup" "20160531.425" "Visual Popup User Interface" '((cl-lib "0.5")) :keywords '("lisp")) diff --git a/elpa/popup-20160409.2133/popup.el b/elpa/popup-20160531.425/popup.el similarity index 99% rename from elpa/popup-20160409.2133/popup.el rename to elpa/popup-20160531.425/popup.el index f4abe34..b358946 100644 --- a/elpa/popup-20160409.2133/popup.el +++ b/elpa/popup-20160531.425/popup.el @@ -4,7 +4,7 @@ ;; Author: Tomohiro Matsuyama ;; Keywords: lisp -;; Package-Version: 20160409.2133 +;; Package-Version: 20160531.425 ;; Version: 0.5.3 ;; Package-Requires: ((cl-lib "0.5")) @@ -180,7 +180,7 @@ buffer." :prefix "popup-") (defface popup-face - '((t (:background "lightgray" :foreground "black"))) + '((t (:inherit default :background "lightgray" :foreground "black"))) "Face for popup." :group 'popup) @@ -869,7 +869,7 @@ Pages up through POPUP." ;;; Popup Incremental Search (defface popup-isearch-match - '((t (:background "sky blue"))) + '((t (:inherit default :background "sky blue"))) "Popup isearch match face." :group 'popup) @@ -1101,7 +1101,7 @@ PROMPT is a prompt string when reading events during event loop." :group 'popup) (defface popup-menu-selection-face - '((t (:background "steelblue" :foreground "white"))) + '((t (:inherit default :background "steelblue" :foreground "white"))) "Face for popup menu selection." :group 'popup) diff --git a/elpa/projectile-20160420.1508/projectile-pkg.el b/elpa/projectile-20160420.1508/projectile-pkg.el deleted file mode 100644 index 1d569da..0000000 --- a/elpa/projectile-20160420.1508/projectile-pkg.el +++ /dev/null @@ -1 +0,0 @@ -(define-package "projectile" "20160420.1508" "Manage and navigate projects in Emacs easily" '((dash "2.11.0") (pkg-info "0.4")) :url "https://github.com/bbatsov/projectile" :keywords '("project" "convenience")) diff --git a/elpa/projectile-20160420.1508/projectile-autoloads.el b/elpa/projectile-20160623.23/projectile-autoloads.el similarity index 99% rename from elpa/projectile-20160420.1508/projectile-autoloads.el rename to elpa/projectile-20160623.23/projectile-autoloads.el index 33130e6..ccdc871 100644 --- a/elpa/projectile-20160420.1508/projectile-autoloads.el +++ b/elpa/projectile-20160623.23/projectile-autoloads.el @@ -3,8 +3,8 @@ ;;; Code: (add-to-list 'load-path (or (file-name-directory #$) (car load-path))) -;;;### (autoloads nil "projectile" "projectile.el" (22297 53344 702923 -;;;;;; 54000)) +;;;### (autoloads nil "projectile" "projectile.el" (22387 29354 998184 +;;;;;; 979000)) ;;; Generated autoloads from projectile.el (autoload 'projectile-version "projectile" "\ diff --git a/elpa/projectile-20160623.23/projectile-pkg.el b/elpa/projectile-20160623.23/projectile-pkg.el new file mode 100644 index 0000000..dee373a --- /dev/null +++ b/elpa/projectile-20160623.23/projectile-pkg.el @@ -0,0 +1 @@ +(define-package "projectile" "20160623.23" "Manage and navigate projects in Emacs easily" '((dash "2.11.0") (pkg-info "0.4")) :url "https://github.com/bbatsov/projectile" :keywords '("project" "convenience")) diff --git a/elpa/projectile-20160420.1508/projectile.el b/elpa/projectile-20160623.23/projectile.el similarity index 99% rename from elpa/projectile-20160420.1508/projectile.el rename to elpa/projectile-20160623.23/projectile.el index a0bc8cf..6840cba 100644 --- a/elpa/projectile-20160420.1508/projectile.el +++ b/elpa/projectile-20160623.23/projectile.el @@ -4,7 +4,7 @@ ;; Author: Bozhidar Batsov ;; URL: https://github.com/bbatsov/projectile -;; Package-Version: 20160420.1508 +;; Package-Version: 20160623.23 ;; Keywords: project, convenience ;; Version: 0.14.0-cvs ;; Package-Requires: ((dash "2.11.0") (pkg-info "0.4")) @@ -281,6 +281,7 @@ If variable `projectile-project-name' is non-nil, this function will not be used "Cargo.toml" ; Cargo project file "mix.exs" ; Elixir mix project file "stack.yaml" ; Haskell's stack tool based project + "info.rkt" ; Racket package description file "TAGS" ; etags/ctags are usually in the root of project "GTAGS" ; GNU Global tags ) @@ -1830,8 +1831,9 @@ a COMPILE-CMD, a TEST-CMD, and a RUN-CMD." (projectile-register-project-type 'haskell-stack '("stack.yaml") "stack build" "stack build --test") (projectile-register-project-type 'haskell-cabal #'projectile-cabal "cabal build" "cabal test") (projectile-register-project-type 'rust-cargo '("Cargo.toml") "cargo build" "cargo test") -(projectile-register-project-type 'r '("DESCRIPTION") "R CMD INSTALL ." (concat "R CMD check -o " temporary-file-directory " .")) +(projectile-register-project-type 'r '("DESCRIPTION") "R CMD INSTALL --with-keep.source ." (concat "R CMD check -o " temporary-file-directory " .")) (projectile-register-project-type 'go #'projectile-go "go build ./..." "go test ./...") +(projectile-register-project-type 'racket '("info.rkt") nil "raco test .") (defun projectile-cabal () "Check if a project contains *.cabal files but no stack.yaml file." @@ -1986,7 +1988,8 @@ It assumes the test/ folder is at the same level as src/." ((member project-type '(rails-test ruby-test lein-test boot-clj go)) "_test") ((member project-type '(scons)) "test") ((member project-type '(maven symfony)) "Test") - ((member project-type '(gradle gradlew grails)) "Spec"))) + ((member project-type '(gradle gradlew grails)) "Spec") + ((member project-type '(sbt)) "Spec"))) (defun projectile-dirname-matching-count (a b) "Count matching dirnames ascending file paths." @@ -2536,7 +2539,7 @@ Should be set via .dir-locals.el.") "Run external or Elisp compilation command CMD." (if (functionp cmd) (funcall cmd) - (compilation-start cmd))) + (compile cmd))) ;;;###autoload (defun projectile-compile-project (arg &optional dir) diff --git a/elpa/s-20160405.920/s-pkg.el b/elpa/s-20160405.920/s-pkg.el deleted file mode 100644 index 93c45f8..0000000 --- a/elpa/s-20160405.920/s-pkg.el +++ /dev/null @@ -1 +0,0 @@ -(define-package "s" "20160405.920" "The long lost Emacs string manipulation library." 'nil :keywords '("strings")) diff --git a/elpa/s-20160405.920/s-autoloads.el b/elpa/s-20160508.2357/s-autoloads.el similarity index 81% rename from elpa/s-20160405.920/s-autoloads.el rename to elpa/s-20160508.2357/s-autoloads.el index fc44b10..a7ee288 100644 --- a/elpa/s-20160405.920/s-autoloads.el +++ b/elpa/s-20160508.2357/s-autoloads.el @@ -3,7 +3,7 @@ ;;; Code: (add-to-list 'load-path (or (file-name-directory #$) (car load-path))) -;;;### (autoloads nil nil ("s.el") (22297 19799 771141 952000)) +;;;### (autoloads nil nil ("s.el") (22387 29354 325039 556000)) ;;;*** diff --git a/elpa/s-20160508.2357/s-pkg.el b/elpa/s-20160508.2357/s-pkg.el new file mode 100644 index 0000000..e04771c --- /dev/null +++ b/elpa/s-20160508.2357/s-pkg.el @@ -0,0 +1 @@ +(define-package "s" "20160508.2357" "The long lost Emacs string manipulation library." 'nil :keywords '("strings")) diff --git a/elpa/s-20160405.920/s.el b/elpa/s-20160508.2357/s.el similarity index 98% rename from elpa/s-20160405.920/s.el rename to elpa/s-20160508.2357/s.el index 04b678b..e381256 100644 --- a/elpa/s-20160405.920/s.el +++ b/elpa/s-20160508.2357/s.el @@ -4,7 +4,7 @@ ;; Author: Magnar Sveen ;; Version: 1.10.0 -;; Package-Version: 20160405.920 +;; Package-Version: 20160508.2357 ;; Keywords: strings ;; This program is free software; you can redistribute it and/or modify @@ -334,13 +334,13 @@ This is a simple wrapper around the built-in `string-match-p'." (replace-regexp-in-string (regexp-quote old) new s t t)) (defun s--aget (alist key) - (cdr (assoc key alist))) + (cdr (assoc-string key alist))) (defun s-replace-all (replacements s) "REPLACEMENTS is a list of cons-cells. Each `car` is replaced with `cdr` in S." (replace-regexp-in-string (regexp-opt (mapcar 'car replacements)) (lambda (it) (s--aget replacements it)) - s)) + s t t)) (defun s-downcase (s) "Convert S to lower case. @@ -430,7 +430,7 @@ SUBEXP-DEPTH is 0 by default." (< pos (length string))) (let ((m (match-end subexp-depth))) (push (cons (match-beginning subexp-depth) (match-end subexp-depth)) result) - (setq pos m))) + (setq pos (match-end 0)))) (nreverse result))) (defun s-match (regexp s &optional start) @@ -559,7 +559,7 @@ transformation." (if extra (funcall replacer var extra) (funcall replacer var)))))) - (if v v (signal 's-format-resolve md))) + (if v (format "%s" v) (signal 's-format-resolve md))) (set-match-data replacer-match-data)))) template ;; Need literal to make sure it works t t) diff --git a/elpa/sass-mode-20150508.2012/sass-mode-autoloads.el b/elpa/sass-mode-20160506.2045/sass-mode-autoloads.el similarity index 85% rename from elpa/sass-mode-20150508.2012/sass-mode-autoloads.el rename to elpa/sass-mode-20160506.2045/sass-mode-autoloads.el index ccc4c07..0c494a8 100644 --- a/elpa/sass-mode-20150508.2012/sass-mode-autoloads.el +++ b/elpa/sass-mode-20160506.2045/sass-mode-autoloads.el @@ -3,8 +3,8 @@ ;;; Code: (add-to-list 'load-path (or (file-name-directory #$) (car load-path))) -;;;### (autoloads nil "sass-mode" "sass-mode.el" (22297 19798 145416 -;;;;;; 39000)) +;;;### (autoloads nil "sass-mode" "sass-mode.el" (22387 29353 663230 +;;;;;; 563000)) ;;; Generated autoloads from sass-mode.el (autoload 'sass-mode "sass-mode" "\ diff --git a/elpa/sass-mode-20150508.2012/sass-mode-pkg.el b/elpa/sass-mode-20160506.2045/sass-mode-pkg.el similarity index 68% rename from elpa/sass-mode-20150508.2012/sass-mode-pkg.el rename to elpa/sass-mode-20160506.2045/sass-mode-pkg.el index 310a0bc..6d137e2 100644 --- a/elpa/sass-mode-20150508.2012/sass-mode-pkg.el +++ b/elpa/sass-mode-20160506.2045/sass-mode-pkg.el @@ -1 +1 @@ -(define-package "sass-mode" "20150508.2012" "Major mode for editing Sass files" '((haml-mode "3.0.15") (cl-lib "0.5")) :url "http://github.com/nex3/haml/tree/master" :keywords '("markup" "language" "css")) +(define-package "sass-mode" "20160506.2045" "Major mode for editing Sass files" '((haml-mode "3.0.15") (cl-lib "0.5")) :url "http://github.com/nex3/haml/tree/master" :keywords '("markup" "language" "css")) diff --git a/elpa/sass-mode-20150508.2012/sass-mode.el b/elpa/sass-mode-20160506.2045/sass-mode.el similarity index 86% rename from elpa/sass-mode-20150508.2012/sass-mode.el rename to elpa/sass-mode-20160506.2045/sass-mode.el index fa859e3..c40409a 100644 --- a/elpa/sass-mode-20150508.2012/sass-mode.el +++ b/elpa/sass-mode-20160506.2045/sass-mode.el @@ -4,7 +4,7 @@ ;; Author: Natalie Weizenbaum ;; URL: http://github.com/nex3/haml/tree/master -;; Package-Version: 20150508.2012 +;; Package-Version: 20160506.2045 ;; Version: 3.0.16 ;; Created: 2007-03-15 ;; By: Natalie Weizenbaum @@ -214,6 +214,16 @@ LIMIT is the limit of the search." if (looking-at opener) return nil finally return t)) +(defun sass--remove-leading-indent () + "Reindent buffer so that the first line content begins in the first column. +This assumes that the buffer is valid SASS source, such that no +subsequent line has a lesser indent." + (let ((min-indent nil)) + (goto-char (point-min)) + (back-to-indentation) + (setq min-indent (1- (point))) + (indent-rigidly (point-min) (point-max) (- min-indent)))) + ;; Command (defun sass-output-region (start end) @@ -221,15 +231,27 @@ LIMIT is the limit of the search." Called from a program, START and END specify the region to indent." (interactive "r") (let ((output-buffer "*sass-output*") - (errors-buffer "*sass-errors*")) - (shell-command-on-region start end "sass --stdin" - output-buffer - nil - errors-buffer) - (when (fboundp 'css-mode) - (with-current-buffer output-buffer - (css-mode))) - (switch-to-buffer-other-window output-buffer))) + (errors-buffer "*sass-errors*") + (region-contents (buffer-substring start end))) + (let ((exit-code + (with-temp-buffer + (insert region-contents) + (newline-and-indent) + (sass--remove-leading-indent) + (shell-command-on-region (point-min) (point-max) "sass --stdin" + output-buffer + nil + errors-buffer + t)))) + + (if (zerop exit-code) + (progn + (when (fboundp 'css-mode) + (with-current-buffer output-buffer + (css-mode))) + (switch-to-buffer-other-window output-buffer)) + (with-current-buffer errors-buffer + (view-mode)))))) (defun sass-output-buffer () "Displays the CSS output for entire buffer." diff --git a/elpa/yaml-mode-20160426.138/yaml-mode-pkg.el b/elpa/yaml-mode-20160426.138/yaml-mode-pkg.el deleted file mode 100644 index c83fab4..0000000 --- a/elpa/yaml-mode-20160426.138/yaml-mode-pkg.el +++ /dev/null @@ -1 +0,0 @@ -(define-package "yaml-mode" "20160426.138" "Major mode for editing YAML files" '((emacs "24.1")) :keywords '("data" "yaml")) diff --git a/elpa/yaml-mode-20160426.138/yaml-mode-autoloads.el b/elpa/yaml-mode-20160528.1400/yaml-mode-autoloads.el similarity index 88% rename from elpa/yaml-mode-20160426.138/yaml-mode-autoloads.el rename to elpa/yaml-mode-20160528.1400/yaml-mode-autoloads.el index 9531010..f92644c 100644 --- a/elpa/yaml-mode-20160426.138/yaml-mode-autoloads.el +++ b/elpa/yaml-mode-20160528.1400/yaml-mode-autoloads.el @@ -3,8 +3,8 @@ ;;; Code: (add-to-list 'load-path (or (file-name-directory #$) (car load-path))) -;;;### (autoloads nil "yaml-mode" "yaml-mode.el" (22303 19278 842180 -;;;;;; 72000)) +;;;### (autoloads nil "yaml-mode" "yaml-mode.el" (22387 29353 323496 +;;;;;; 917000)) ;;; Generated autoloads from yaml-mode.el (let ((loads (get 'yaml 'custom-loads))) (if (member '"yaml-mode" loads) nil (put 'yaml 'custom-loads (cons '"yaml-mode" loads)))) diff --git a/elpa/yaml-mode-20160528.1400/yaml-mode-pkg.el b/elpa/yaml-mode-20160528.1400/yaml-mode-pkg.el new file mode 100644 index 0000000..a3b53ec --- /dev/null +++ b/elpa/yaml-mode-20160528.1400/yaml-mode-pkg.el @@ -0,0 +1 @@ +(define-package "yaml-mode" "20160528.1400" "Major mode for editing YAML files" '((emacs "24.1")) :keywords '("data" "yaml")) diff --git a/elpa/yaml-mode-20160426.138/yaml-mode.el b/elpa/yaml-mode-20160528.1400/yaml-mode.el similarity index 99% rename from elpa/yaml-mode-20160426.138/yaml-mode.el rename to elpa/yaml-mode-20160528.1400/yaml-mode.el index 483ad28..fde60ac 100644 --- a/elpa/yaml-mode-20160426.138/yaml-mode.el +++ b/elpa/yaml-mode-20160528.1400/yaml-mode.el @@ -6,8 +6,8 @@ ;; Marshall T. Vandegrift ;; Maintainer: Vasilij Schneidermann ;; Package-Requires: ((emacs "24.1")) +;; Package-Version: 20160528.1400 ;; Keywords: data yaml -;; Package-Version: 20160426.138 ;; Version: 0.0.12 ;; This file is not part of Emacs @@ -79,6 +79,7 @@ (defcustom yaml-indent-offset 2 "*Amount of offset per level of indentation." :type 'integer + :safe 'natnump :group 'yaml) (defcustom yaml-backspace-function 'backward-delete-char-untabify