Update Emacs packages
This is a massive diff that I had to do in a hurry - when leaving Urbint. I'm pretty sure that most of these are updating Emacs packages, but I'm not positive.
This commit is contained in:
parent
de97c7bcd0
commit
9da3ffee41
1361 changed files with 16539 additions and 16483 deletions
|
@ -1,2 +0,0 @@
|
|||
;;; -*- no-byte-compile: t -*-
|
||||
(define-package "ace-window" "20180607.1223" "Quickly switch windows." '((avy "0.2.0")))
|
|
@ -3,8 +3,8 @@
|
|||
;;; Code:
|
||||
(add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path))))
|
||||
|
||||
;;;### (autoloads nil "ace-window" "ace-window.el" (23377 60991 457690
|
||||
;;;;;; 292000))
|
||||
;;;### (autoloads nil "ace-window" "ace-window.el" (23450 31954 980877
|
||||
;;;;;; 496000))
|
||||
;;; Generated autoloads from ace-window.el
|
||||
|
||||
(autoload 'ace-select-window "ace-window" "\
|
|
@ -0,0 +1,2 @@
|
|||
;;; -*- no-byte-compile: t -*-
|
||||
(define-package "ace-window" "20180814.1516" "Quickly switch windows." '((avy "0.2.0")) :commit "d93e16b52ee7c1b6c9df599060e7077b4e46cbf8" :keywords '("window" "location") :authors '(("Oleh Krehel" . "ohwoeowho@gmail.com")) :maintainer '("Oleh Krehel" . "ohwoeowho@gmail.com") :url "https://github.com/abo-abo/ace-window")
|
|
@ -5,7 +5,7 @@
|
|||
;; Author: Oleh Krehel <ohwoeowho@gmail.com>
|
||||
;; Maintainer: Oleh Krehel <ohwoeowho@gmail.com>
|
||||
;; URL: https://github.com/abo-abo/ace-window
|
||||
;; Package-Version: 20180607.1223
|
||||
;; Package-Version: 20180814.1516
|
||||
;; Version: 0.9.0
|
||||
;; Package-Requires: ((avy "0.2.0"))
|
||||
;; Keywords: window, location
|
||||
|
@ -560,8 +560,13 @@ window."
|
|||
;;* Utility
|
||||
(unless (fboundp 'frame-position)
|
||||
(defun frame-position (&optional frame)
|
||||
(cons (frame-parameter frame 'left)
|
||||
(frame-parameter frame 'top))))
|
||||
(let ((pl (frame-parameter frame 'left))
|
||||
(pt (frame-parameter frame 'top)))
|
||||
(when (consp pl)
|
||||
(setq pl (eval pl)))
|
||||
(when (consp pt)
|
||||
(setq pt (eval pt)))
|
||||
(cons pl pt))))
|
||||
|
||||
(defun aw-window< (wnd1 wnd2)
|
||||
"Return true if WND1 is less than WND2.
|
Binary file not shown.
|
@ -1,2 +0,0 @@
|
|||
;;; -*- no-byte-compile: t -*-
|
||||
(define-package "alert" "20180403.38" "Growl-style notification system for Emacs" '((gntp "0.1") (log4e "0.3.0")))
|
|
@ -3,7 +3,7 @@
|
|||
;;; Code:
|
||||
(add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path))))
|
||||
|
||||
;;;### (autoloads nil "alert" "alert.el" (23377 61297 758177 48000))
|
||||
;;;### (autoloads nil "alert" "alert.el" (23450 31954 18242 818000))
|
||||
;;; Generated autoloads from alert.el
|
||||
|
||||
(autoload 'alert-add-rule "alert" "\
|
|
@ -0,0 +1,2 @@
|
|||
;;; -*- no-byte-compile: t -*-
|
||||
(define-package "alert" "20180827.422" "Growl-style notification system for Emacs" '((gntp "0.1") (log4e "0.3.0")) :commit "fe494d1e80e308f7db7273bf02281757fdf86e6f" :keywords '("notification" "emacs" "message") :authors '(("John Wiegley" . "jwiegley@gmail.com")) :maintainer '("John Wiegley" . "jwiegley@gmail.com") :url "https://github.com/jwiegley/alert")
|
|
@ -6,7 +6,7 @@
|
|||
;; Created: 24 Aug 2011
|
||||
;; Updated: 16 Mar 2015
|
||||
;; Version: 1.2
|
||||
;; Package-Version: 20180403.38
|
||||
;; Package-Version: 20180827.422
|
||||
;; Package-Requires: ((gntp "0.1") (log4e "0.3.0"))
|
||||
;; Keywords: notification emacs message
|
||||
;; X-URL: https://github.com/jwiegley/alert
|
||||
|
@ -552,12 +552,14 @@ fringe gets colored whenever people chat on BitlBee:
|
|||
(alert-legacy-log-notify mes sev len)
|
||||
;; when we get here you better be using log4e or have your logging
|
||||
;; functions defined
|
||||
(if (fboundp func)
|
||||
(apply func (list mes))
|
||||
(when (fboundp 'log4e:deflogger)
|
||||
(unless (fboundp func)
|
||||
(when (fboundp 'log4e:deflogger)
|
||||
(log4e:deflogger "alert" "%t [%l] %m" "%H:%M:%S")
|
||||
(when (functionp 'alert--log-set-level)
|
||||
(alert--log-set-level alert-log-level)))))))
|
||||
(alert--log-set-level alert-log-level)))
|
||||
(alert--log-enable-logging))
|
||||
(when (fboundp func)
|
||||
(apply func (list mes))))))
|
||||
|
||||
(defun alert-legacy-log-notify (mes sev len)
|
||||
(with-current-buffer
|
Binary file not shown.
|
@ -3,8 +3,8 @@
|
|||
;;; Code:
|
||||
(add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path))))
|
||||
|
||||
;;;### (autoloads nil "all-the-icons" "all-the-icons.el" (23377 61284
|
||||
;;;;;; 887385 430000))
|
||||
;;;### (autoloads nil "all-the-icons" "all-the-icons.el" (23450 31952
|
||||
;;;;;; 470907 276000))
|
||||
;;; Generated autoloads from all-the-icons.el
|
||||
|
||||
(autoload 'all-the-icons-icon-for-file "all-the-icons" "\
|
||||
|
@ -47,7 +47,7 @@ When FAMILY is non-nil, limit the candidates to the icon set matching it.
|
|||
;;;***
|
||||
|
||||
;;;### (autoloads nil nil ("all-the-icons-faces.el" "all-the-icons-pkg.el")
|
||||
;;;;;; (23377 61284 888696 545000))
|
||||
;;;;;; (23450 31952 473170 601000))
|
||||
|
||||
;;;***
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
(define-package "all-the-icons" "20180125.1557" "A library for inserting Developer icons"
|
||||
'((emacs "24.3")
|
||||
(memoize "1.0.1"))
|
||||
:keywords
|
||||
'("convenient" "lisp")
|
||||
:authors
|
||||
'(("Dominic Charlesworth" . "dgc336@gmail.com"))
|
||||
:maintainer
|
||||
'("Dominic Charlesworth" . "dgc336@gmail.com")
|
||||
:url "https://github.com/domtronn/all-the-icons.el")
|
||||
;; Local Variables:
|
||||
;; no-byte-compile: t
|
||||
;; End:
|
Binary file not shown.
|
@ -1,9 +0,0 @@
|
|||
(define-package "all-the-icons" "20180125.757" "A library for inserting Developer icons"
|
||||
'((emacs "24.3")
|
||||
(memoize "1.0.1"))
|
||||
:keywords
|
||||
'("convenient" "lisp")
|
||||
:url "https://github.com/domtronn/all-the-icons.el")
|
||||
;; Local Variables:
|
||||
;; no-byte-compile: t
|
||||
;; End:
|
|
@ -1,2 +0,0 @@
|
|||
;;; -*- no-byte-compile: t -*-
|
||||
(define-package "all-the-icons-ivy" "20180225.630" "Shows icons while using ivy and counsel" '((emacs "24.4") (all-the-icons "2.4.0") (ivy "0.8.0")))
|
|
@ -4,7 +4,7 @@
|
|||
(add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path))))
|
||||
|
||||
;;;### (autoloads nil "all-the-icons-ivy" "all-the-icons-ivy.el"
|
||||
;;;;;; (23377 61297 57158 640000))
|
||||
;;;;;; (23450 31951 347705 761000))
|
||||
;;; Generated autoloads from all-the-icons-ivy.el
|
||||
|
||||
(autoload 'all-the-icons-ivy-setup "all-the-icons-ivy" "\
|
|
@ -0,0 +1,2 @@
|
|||
;;; -*- no-byte-compile: t -*-
|
||||
(define-package "all-the-icons-ivy" "20180826.2016" "Shows icons while using ivy and counsel" '((emacs "24.4") (all-the-icons "2.4.0") (ivy "0.8.0")) :commit "7baba16410e78ca3c7a564c3731baa75b2e8d93a" :keywords '("faces") :authors '(("asok")) :maintainer '("asok"))
|
|
@ -3,8 +3,8 @@
|
|||
;; Copyright (C) 2017 asok
|
||||
|
||||
;; Author: asok
|
||||
;; Version: 0.2.0
|
||||
;; Package-Version: 20180225.630
|
||||
;; Version: 0.3.0
|
||||
;; Package-Version: 20180826.2016
|
||||
;; Keywords: faces
|
||||
;; Package-Requires: ((emacs "24.4") (all-the-icons "2.4.0") (ivy "0.8.0"))
|
||||
|
||||
|
@ -49,7 +49,13 @@
|
|||
|
||||
|
||||
(defcustom all-the-icons-ivy-file-commands
|
||||
'(counsel-find-file counsel-projectile-find-file counsel-projectile-find-dir)
|
||||
'(counsel-find-file
|
||||
counsel-file-jump
|
||||
counsel-recentf
|
||||
counsel-projectile
|
||||
counsel-projectile-find-file
|
||||
counsel-projectile-find-dir
|
||||
counsel-git)
|
||||
"Commands to use with `all-the-icons-ivy-file-transformer'."
|
||||
:type '(repeat function)
|
||||
:group 'all-the-icons-ivy)
|
Binary file not shown.
|
@ -121,7 +121,7 @@
|
|||
((:url . "https://github.com/Malabarba/beacon")
|
||||
(:keywords "convenience"))])
|
||||
(brief .
|
||||
[(5 84)
|
||||
[(5 85)
|
||||
nil "Brief Editor Emulator" single
|
||||
((:url . "http://elpa.gnu.org/packages/brief.html")
|
||||
(:keywords "brief" "emulations" "crisp"))])
|
||||
|
@ -389,7 +389,7 @@
|
|||
((:keywords "convenience" "languages")
|
||||
(:url . "https://github.com/joaotavora/eglot"))])
|
||||
(el-search .
|
||||
[(1 7 7)
|
||||
[(1 7 9)
|
||||
((emacs
|
||||
(25))
|
||||
(stream
|
||||
|
@ -433,15 +433,17 @@
|
|||
((:keywords "convenience")
|
||||
(:url . "https://github.com/ergoemacs/ergoemacs-mode"))])
|
||||
(excorporate .
|
||||
[(0 7 6)
|
||||
[(0 7 7)
|
||||
((emacs
|
||||
(24 1))
|
||||
(fsm
|
||||
(0 2))
|
||||
(soap-client
|
||||
(3 1 1))
|
||||
(3 1 4))
|
||||
(url-http-ntlm
|
||||
(2 0 3)))
|
||||
(2 0 3))
|
||||
(nadvice
|
||||
(0 2)))
|
||||
"Exchange integration" tar
|
||||
((:keywords "calendar")
|
||||
(:url . "http://elpa.gnu.org/packages/excorporate.html"))])
|
||||
|
@ -769,6 +771,11 @@
|
|||
"Random-access singly-linked lists" single
|
||||
((:url . "http://elpa.gnu.org/packages/myers.html")
|
||||
(:keywords "list" "containers"))])
|
||||
(nadvice .
|
||||
[(0 2)
|
||||
nil "Forward compatibility for Emacs-24.4's nadvice" single
|
||||
((:url . "http://elpa.gnu.org/packages/nadvice.html")
|
||||
(:keywords))])
|
||||
(nameless .
|
||||
[(1 0 2)
|
||||
((emacs
|
||||
|
@ -990,7 +997,9 @@
|
|||
(cl-lib
|
||||
(0 5))
|
||||
(cl-generic
|
||||
(0 3)))
|
||||
(0 3))
|
||||
(cl-print
|
||||
(1 0)))
|
||||
"A collaborative editing framework for Emacs" tar
|
||||
((:keywords "rudel" "collaboration")
|
||||
(:url . "http://rudel.sourceforge.net/"))])
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -3,7 +3,7 @@
|
|||
;;; Code:
|
||||
(add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path))))
|
||||
|
||||
;;;### (autoloads nil "async" "async.el" (23377 61605 799563 818000))
|
||||
;;;### (autoloads nil "async" "async.el" (23450 31950 26704 505000))
|
||||
;;; 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" (23377
|
||||
;;;;;; 61605 797595 754000))
|
||||
;;;### (autoloads nil "async-bytecomp" "async-bytecomp.el" (23450
|
||||
;;;;;; 31950 40006 745000))
|
||||
;;; Generated autoloads from async-bytecomp.el
|
||||
|
||||
(autoload 'async-byte-recompile-directory "async-bytecomp" "\
|
||||
|
@ -104,8 +104,8 @@ Same as `byte-compile-file' but asynchronous.
|
|||
|
||||
;;;***
|
||||
|
||||
;;;### (autoloads nil "dired-async" "dired-async.el" (23377 61605
|
||||
;;;;;; 793062 430000))
|
||||
;;;### (autoloads nil "dired-async" "dired-async.el" (23450 31950
|
||||
;;;;;; 36575 113000))
|
||||
;;; Generated autoloads from dired-async.el
|
||||
|
||||
(defvar dired-async-mode nil "\
|
||||
|
@ -145,8 +145,8 @@ Run ‘dired-do-rename’ asynchronously.
|
|||
|
||||
;;;***
|
||||
|
||||
;;;### (autoloads nil nil ("async-pkg.el" "smtpmail-async.el") (23377
|
||||
;;;;;; 61605 801409 281000))
|
||||
;;;### (autoloads nil nil ("async-pkg.el" "smtpmail-async.el") (23450
|
||||
;;;;;; 31950 43131 348000))
|
||||
|
||||
;;;***
|
||||
|
Binary file not shown.
|
@ -1,4 +1,4 @@
|
|||
(define-package "async" "20180527.1030" "Asynchronous processing in Emacs" 'nil :keywords
|
||||
(define-package "async" "20180527.1730" "Asynchronous processing in Emacs" 'nil :keywords
|
||||
'("async")
|
||||
:url "https://github.com/jwiegley/emacs-async")
|
||||
;; Local Variables:
|
|
@ -1,2 +0,0 @@
|
|||
;;; -*- no-byte-compile: t -*-
|
||||
(define-package "avy" "20180615.801" "Jump to arbitrary positions in visible text and select text quickly." '((emacs "24.1") (cl-lib "0.5")))
|
|
@ -3,7 +3,7 @@
|
|||
;;; Code:
|
||||
(add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path))))
|
||||
|
||||
;;;### (autoloads nil "avy" "avy.el" (23377 60991 205495 602000))
|
||||
;;;### (autoloads nil "avy" "avy.el" (23450 31948 899920 751000))
|
||||
;;; Generated autoloads from avy.el
|
||||
|
||||
(autoload 'avy-goto-char "avy" "\
|
||||
|
@ -161,6 +161,11 @@ When BOTTOM-UP is non-nil, display avy candidates from top to bottom
|
|||
|
||||
\(fn &optional OFFSET BOTTOM-UP)" t nil)
|
||||
|
||||
(autoload 'avy-goto-end-of-line "avy" "\
|
||||
Call `avy-goto-line' and move to the end of the line.
|
||||
|
||||
\(fn &optional ARG)" t nil)
|
||||
|
||||
(autoload 'avy-copy-line "avy" "\
|
||||
Copy a selected line above the current line.
|
||||
ARG lines can be used.
|
|
@ -0,0 +1,2 @@
|
|||
;;; -*- no-byte-compile: t -*-
|
||||
(define-package "avy" "20180814.2121" "Jump to arbitrary positions in visible text and select text quickly." '((emacs "24.1") (cl-lib "0.5")) :commit "a29558d22ce9af163b7959da663a22fcedc9c163" :keywords '("point" "location") :authors '(("Oleh Krehel" . "ohwoeowho@gmail.com")) :maintainer '("Oleh Krehel" . "ohwoeowho@gmail.com") :url "https://github.com/abo-abo/avy")
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
;; Author: Oleh Krehel <ohwoeowho@gmail.com>
|
||||
;; URL: https://github.com/abo-abo/avy
|
||||
;; Package-Version: 20180615.801
|
||||
;; Package-Version: 20180814.2121
|
||||
;; Version: 0.4.0
|
||||
;; Package-Requires: ((emacs "24.1") (cl-lib "0.5"))
|
||||
;; Keywords: point, location
|
||||
|
@ -79,29 +79,39 @@ keys different than the following: a, e, i, o, u, y"
|
|||
(character :tag "char")
|
||||
(symbol :tag "non-printing key"))))
|
||||
|
||||
(defconst avy--key-type
|
||||
'(choice :tag "Command"
|
||||
(const avy-goto-char)
|
||||
(const avy-goto-char-2)
|
||||
(const avy-isearch)
|
||||
(const avy-goto-line)
|
||||
(const avy-goto-subword-0)
|
||||
(const avy-goto-subword-1)
|
||||
(const avy-goto-word-0)
|
||||
(const avy-goto-word-1)
|
||||
(const avy-copy-line)
|
||||
(const avy-copy-region)
|
||||
(const avy-move-line)
|
||||
(const avy-move-region)
|
||||
(const avy-kill-whole-line)
|
||||
(const avy-kill-region)
|
||||
(const avy-kill-ring-save-whole-line)
|
||||
(const avy-kill-ring-save-region)
|
||||
(function :tag "Other command")))
|
||||
|
||||
(defcustom avy-keys-alist nil
|
||||
"Alist of avy-jump commands to `avy-keys' overriding the default `avy-keys'."
|
||||
:type '(alist
|
||||
:key-type (choice :tag "Command"
|
||||
(const avy-goto-char)
|
||||
(const avy-goto-char-2)
|
||||
(const avy-isearch)
|
||||
(const avy-goto-line)
|
||||
(const avy-goto-subword-0)
|
||||
(const avy-goto-subword-1)
|
||||
(const avy-goto-word-0)
|
||||
(const avy-goto-word-1)
|
||||
(const avy-copy-line)
|
||||
(const avy-copy-region)
|
||||
(const avy-move-line)
|
||||
(const avy-move-region)
|
||||
(const avy-kill-whole-line)
|
||||
(const avy-kill-region)
|
||||
(const avy-kill-ring-save-whole-line)
|
||||
(const avy-kill-ring-save-region)
|
||||
(function :tag "Other command"))
|
||||
:type `(alist
|
||||
:key-type ,avy--key-type
|
||||
:value-type (repeat :tag "Keys" character)))
|
||||
|
||||
(defcustom avy-orders-alist '((avy-goto-char . avy-order-closest))
|
||||
"Alist of candidate ordering functions.
|
||||
Usually, candidates appear in their point position order."
|
||||
:type `(alist
|
||||
:key-type ,avy--key-type
|
||||
:value-type function))
|
||||
|
||||
(defcustom avy-words
|
||||
'("am" "by" "if" "is" "it" "my" "ox" "up"
|
||||
"ace" "act" "add" "age" "ago" "aim" "air" "ale" "all" "and" "ant" "any"
|
||||
|
@ -363,11 +373,22 @@ SEQ-LEN is how many elements of KEYS it takes to identify a match."
|
|||
lst (cdr lst))))))
|
||||
(nreverse path-alist)))
|
||||
|
||||
(defun avy-order-closest (x)
|
||||
(abs (- (caar x) (point))))
|
||||
|
||||
(defvar avy-command nil
|
||||
"Store the current command symbol.
|
||||
E.g. 'avy-goto-line or 'avy-goto-char.")
|
||||
|
||||
(defun avy-tree (lst keys)
|
||||
"Coerce LST into a balanced tree.
|
||||
The degree of the tree is the length of KEYS.
|
||||
KEYS are placed appropriately on internal nodes."
|
||||
(let ((len (length keys)))
|
||||
(let* ((len (length keys))
|
||||
(order-fn (cdr (assq avy-command avy-orders-alist)))
|
||||
(lst (if order-fn
|
||||
(cl-sort lst #'< :key order-fn)
|
||||
lst)))
|
||||
(cl-labels
|
||||
((rd (ls)
|
||||
(let ((ln (length ls)))
|
||||
|
@ -606,10 +627,6 @@ multiple DISPLAY-FN invocations."
|
|||
Commands using `avy-with' macro can be resumed."
|
||||
(interactive))
|
||||
|
||||
(defvar avy-command nil
|
||||
"Store the current command symbol.
|
||||
E.g. 'avy-goto-line or 'avy-goto-char.")
|
||||
|
||||
(defmacro avy-with (command &rest body)
|
||||
"Set `avy-keys' according to COMMAND and execute BODY.
|
||||
Set `avy-style' according to COMMMAND as well."
|
||||
|
@ -1413,6 +1430,10 @@ Which one depends on variable `subword-mode'."
|
|||
|
||||
(defvar visual-line-mode)
|
||||
|
||||
(defcustom avy-indent-line-overlay nil
|
||||
"When non-nil, `avy-goto-line' will display the line overlay next to the first non-whitespace character of each line."
|
||||
:type 'boolean)
|
||||
|
||||
(defun avy--line-cands (&optional arg beg end bottom-up)
|
||||
"Get candidates for selecting a line.
|
||||
The window scope is determined by `avy-all-windows'.
|
||||
|
@ -1432,7 +1453,10 @@ When BOTTOM-UP is non-nil, display avy candidates from top to bottom"
|
|||
(push (cons
|
||||
(if (eq avy-style 'post)
|
||||
(line-end-position)
|
||||
(point))
|
||||
(save-excursion
|
||||
(when avy-indent-line-overlay
|
||||
(skip-chars-forward " \t"))
|
||||
(point)))
|
||||
(selected-window)) candidates))
|
||||
(if visual-line-mode
|
||||
(progn
|
||||
|
@ -1616,6 +1640,13 @@ When BOTTOM-UP is non-nil, display avy candidates from top to bottom"
|
|||
(const :tag "Above" above)
|
||||
(const :tag "Below" below)))
|
||||
|
||||
;;;###autoload
|
||||
(defun avy-goto-end-of-line (&optional arg)
|
||||
"Call `avy-goto-line' and move to the end of the line."
|
||||
(interactive "p")
|
||||
(avy-goto-line arg)
|
||||
(end-of-line))
|
||||
|
||||
;;;###autoload
|
||||
(defun avy-copy-line (arg)
|
||||
"Copy a selected line above the current line.
|
Binary file not shown.
|
@ -1,2 +0,0 @@
|
|||
;;; -*- no-byte-compile: t -*-
|
||||
(define-package "bind-key" "20180512.2130" "A simple way to manage personal keybindings" 'nil)
|
|
@ -3,8 +3,8 @@
|
|||
;;; Code:
|
||||
(add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path))))
|
||||
|
||||
;;;### (autoloads nil "bind-key" "bind-key.el" (23377 60538 663260
|
||||
;;;;;; 569000))
|
||||
;;;### (autoloads nil "bind-key" "bind-key.el" (23450 31947 947671
|
||||
;;;;;; 528000))
|
||||
;;; Generated autoloads from bind-key.el
|
||||
|
||||
(autoload 'bind-key "bind-key" "\
|
|
@ -0,0 +1,2 @@
|
|||
;;; -*- no-byte-compile: t -*-
|
||||
(define-package "bind-key" "20180513.430" "A simple way to manage personal keybindings" 'nil :commit "3fb8f39f5901a4c0ef7887283e56e60b541675ea" :keywords '("keys" "keybinding" "config" "dotemacs") :authors '(("John Wiegley" . "johnw@newartisans.com")) :maintainer '("John Wiegley" . "johnw@newartisans.com") :url "https://github.com/jwiegley/use-package")
|
|
@ -7,7 +7,7 @@
|
|||
;; Created: 16 Jun 2012
|
||||
;; Modified: 29 Nov 2017
|
||||
;; Version: 2.4
|
||||
;; Package-Version: 20180512.2130
|
||||
;; Package-Version: 20180513.430
|
||||
;; Keywords: keys keybinding config dotemacs
|
||||
;; URL: https://github.com/jwiegley/use-package
|
||||
|
Binary file not shown.
|
@ -1,14 +0,0 @@
|
|||
(define-package "cider" "20180719.542" "Clojure Interactive Development Environment that Rocks"
|
||||
'((emacs "25")
|
||||
(clojure-mode "5.7.0")
|
||||
(pkg-info "0.4")
|
||||
(queue "0.1.1")
|
||||
(spinner "1.7")
|
||||
(seq "2.16")
|
||||
(sesman "0.1.1"))
|
||||
:keywords
|
||||
'("languages" "clojure" "cider")
|
||||
:url "http://www.github.com/clojure-emacs/cider")
|
||||
;; Local Variables:
|
||||
;; no-byte-compile: t
|
||||
;; End:
|
|
@ -3,7 +3,7 @@
|
|||
;;; Code:
|
||||
(add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path))))
|
||||
|
||||
;;;### (autoloads nil "cider" "cider.el" (23377 61664 804060 975000))
|
||||
;;;### (autoloads nil "cider" "cider.el" (23450 31943 257069 372000))
|
||||
;;; Generated autoloads from cider.el
|
||||
|
||||
(autoload 'cider-version "cider" "\
|
||||
|
@ -101,8 +101,8 @@ Start a connection of any type interactively.
|
|||
|
||||
;;;***
|
||||
|
||||
;;;### (autoloads nil "cider-apropos" "cider-apropos.el" (23377 61664
|
||||
;;;;;; 770864 524000))
|
||||
;;;### (autoloads nil "cider-apropos" "cider-apropos.el" (23450 31943
|
||||
;;;;;; 250662 276000))
|
||||
;;; Generated autoloads from cider-apropos.el
|
||||
|
||||
(autoload 'cider-apropos "cider-apropos" "\
|
||||
|
@ -138,8 +138,8 @@ Shortcut for (cider-apropos-select <query> nil t).
|
|||
|
||||
;;;***
|
||||
|
||||
;;;### (autoloads nil "cider-browse-ns" "cider-browse-ns.el" (23377
|
||||
;;;;;; 61664 768380 279000))
|
||||
;;;### (autoloads nil "cider-browse-ns" "cider-browse-ns.el" (23450
|
||||
;;;;;; 31943 249079 688000))
|
||||
;;; Generated autoloads from cider-browse-ns.el
|
||||
|
||||
(autoload 'cider-browse-ns "cider-browse-ns" "\
|
||||
|
@ -155,7 +155,7 @@ List all loaded namespaces in BUFFER.
|
|||
;;;***
|
||||
|
||||
;;;### (autoloads nil "cider-browse-spec" "cider-browse-spec.el"
|
||||
;;;;;; (23377 61664 797512 30000))
|
||||
;;;;;; (23450 31943 285210 198000))
|
||||
;;; Generated autoloads from cider-browse-spec.el
|
||||
|
||||
(autoload 'cider-browse-spec "cider-browse-spec" "\
|
||||
|
@ -173,8 +173,8 @@ No filter applied if the regexp is the empty string.
|
|||
|
||||
;;;***
|
||||
|
||||
;;;### (autoloads nil "cider-cheatsheet" "cider-cheatsheet.el" (23377
|
||||
;;;;;; 61664 799996 355000))
|
||||
;;;### (autoloads nil "cider-cheatsheet" "cider-cheatsheet.el" (23450
|
||||
;;;;;; 31943 288051 894000))
|
||||
;;; Generated autoloads from cider-cheatsheet.el
|
||||
|
||||
(autoload 'cider-cheatsheet "cider-cheatsheet" "\
|
||||
|
@ -186,8 +186,8 @@ When you make it to a Clojure var its doc buffer gets displayed.
|
|||
|
||||
;;;***
|
||||
|
||||
;;;### (autoloads nil "cider-classpath" "cider-classpath.el" (23377
|
||||
;;;;;; 61664 806586 783000))
|
||||
;;;### (autoloads nil "cider-classpath" "cider-classpath.el" (23450
|
||||
;;;;;; 31943 271013 238000))
|
||||
;;; Generated autoloads from cider-classpath.el
|
||||
|
||||
(autoload 'cider-classpath "cider-classpath" "\
|
||||
|
@ -202,8 +202,8 @@ Open a classpath entry.
|
|||
|
||||
;;;***
|
||||
|
||||
;;;### (autoloads nil "cider-debug" "cider-debug.el" (23377 61664
|
||||
;;;;;; 769634 161000))
|
||||
;;;### (autoloads nil "cider-debug" "cider-debug.el" (23450 31943
|
||||
;;;;;; 269492 83000))
|
||||
;;; Generated autoloads from cider-debug.el
|
||||
|
||||
(autoload 'cider-debug-defun-at-point "cider-debug" "\
|
||||
|
@ -219,8 +219,8 @@ a number of keys will be prompted to the user.
|
|||
|
||||
;;;***
|
||||
|
||||
;;;### (autoloads nil "cider-find" "cider-find.el" (23377 61664 796304
|
||||
;;;;;; 526000))
|
||||
;;;### (autoloads nil "cider-find" "cider-find.el" (23450 31943 268063
|
||||
;;;;;; 602000))
|
||||
;;; Generated autoloads from cider-find.el
|
||||
|
||||
(autoload 'cider-find-var "cider-find" "\
|
||||
|
@ -233,6 +233,11 @@ thing at point.
|
|||
|
||||
\(fn &optional ARG VAR LINE)" t nil)
|
||||
|
||||
(autoload 'cider-find-dwim-at-mouse "cider-find" "\
|
||||
Find and display variable or resource at mouse EVENT.
|
||||
|
||||
\(fn EVENT)" t nil)
|
||||
|
||||
(autoload 'cider-find-dwim "cider-find" "\
|
||||
Find and display the SYMBOL-FILE at point.
|
||||
SYMBOL-FILE could be a var or a resource. If thing at point is empty then
|
||||
|
@ -279,8 +284,8 @@ thing at point.
|
|||
|
||||
;;;***
|
||||
|
||||
;;;### (autoloads nil "cider-format" "cider-format.el" (23377 61664
|
||||
;;;;;; 755199 681000))
|
||||
;;;### (autoloads nil "cider-format" "cider-format.el" (23450 31943
|
||||
;;;;;; 275392 561000))
|
||||
;;; Generated autoloads from cider-format.el
|
||||
|
||||
(autoload 'cider-format-region "cider-format" "\
|
||||
|
@ -317,8 +322,8 @@ Format the EDN data of the last sexp.
|
|||
|
||||
;;;***
|
||||
|
||||
;;;### (autoloads nil "cider-grimoire" "cider-grimoire.el" (23377
|
||||
;;;;;; 61664 785871 442000))
|
||||
;;;### (autoloads nil "cider-grimoire" "cider-grimoire.el" (23450
|
||||
;;;;;; 31943 282389 333000))
|
||||
;;; Generated autoloads from cider-grimoire.el
|
||||
|
||||
(autoload 'cider-grimoire-web "cider-grimoire" "\
|
||||
|
@ -341,8 +346,8 @@ opposite of what that option dictates.
|
|||
|
||||
;;;***
|
||||
|
||||
;;;### (autoloads nil "cider-inspector" "cider-inspector.el" (23377
|
||||
;;;;;; 61664 783382 910000))
|
||||
;;;### (autoloads nil "cider-inspector" "cider-inspector.el" (23450
|
||||
;;;;;; 31943 243754 126000))
|
||||
;;; Generated autoloads from cider-inspector.el
|
||||
|
||||
(autoload 'cider-inspect-last-sexp "cider-inspector" "\
|
||||
|
@ -378,7 +383,7 @@ current buffer's namespace.
|
|||
;;;***
|
||||
|
||||
;;;### (autoloads nil "cider-macroexpansion" "cider-macroexpansion.el"
|
||||
;;;;;; (23377 61664 801273 463000))
|
||||
;;;;;; (23450 31943 283758 481000))
|
||||
;;; Generated autoloads from cider-macroexpansion.el
|
||||
|
||||
(autoload 'cider-macroexpand-1 "cider-macroexpansion" "\
|
||||
|
@ -395,8 +400,8 @@ Invoke \\=`macroexpand-all\\=` on the expression preceding point.
|
|||
|
||||
;;;***
|
||||
|
||||
;;;### (autoloads nil "cider-mode" "cider-mode.el" (23377 61664 773443
|
||||
;;;;;; 195000))
|
||||
;;;### (autoloads nil "cider-mode" "cider-mode.el" (23450 31943 236744
|
||||
;;;;;; 916000))
|
||||
;;; Generated autoloads from cider-mode.el
|
||||
|
||||
(defvar cider-mode-line '(:eval (format " cider[%s]" (cider--modeline-info))) "\
|
||||
|
@ -423,10 +428,33 @@ Minor mode for REPL interaction from a Clojure buffer.
|
|||
|
||||
;;;***
|
||||
|
||||
;;;### (autoloads nil "cider-ns" "cider-ns.el" (23377 61664 775924
|
||||
;;;;;; 562000))
|
||||
;;;### (autoloads nil "cider-ns" "cider-ns.el" (23450 31943 261868
|
||||
;;;;;; 186000))
|
||||
;;; Generated autoloads from cider-ns.el
|
||||
|
||||
(autoload 'cider-ns-reload "cider-ns" "\
|
||||
Send a (require 'ns :reload) to the REPL.
|
||||
|
||||
With an argument PROMPT, it prompts for a namespace name. This is the
|
||||
Clojure out of the box reloading experience and does not rely on
|
||||
org.clojure/tools.namespace. See Commentary of this file for a longer list
|
||||
of differences. From the Clojure doc: \":reload forces loading of all the
|
||||
identified libs even if they are already loaded\".
|
||||
|
||||
\(fn &optional PROMPT)" t nil)
|
||||
|
||||
(autoload 'cider-ns-reload-all "cider-ns" "\
|
||||
Send a (require 'ns :reload-all) to the REPL.
|
||||
|
||||
With an argument PROMPT, it prompts for a namespace name. This is the
|
||||
Clojure out of the box reloading experience and does not rely on
|
||||
org.clojure/tools.namespace. See Commentary of this file for a longer list
|
||||
of differences. From the Clojure doc: \":reload-all implies :reload and
|
||||
also forces loading of all libs that the identified libs directly or
|
||||
indirectly load via require\".
|
||||
|
||||
\(fn &optional PROMPT)" t nil)
|
||||
|
||||
(autoload 'cider-ns-refresh "cider-ns" "\
|
||||
Reload modified and unloaded namespaces on the classpath.
|
||||
|
||||
|
@ -446,10 +474,12 @@ refresh functions (defined in `cider-ns-refresh-before-fn' and
|
|||
|
||||
\(fn &optional MODE)" t nil)
|
||||
|
||||
(define-obsolete-function-alias 'cider-refresh 'cider-ns-refresh "0.18")
|
||||
|
||||
;;;***
|
||||
|
||||
;;;### (autoloads nil "cider-profile" "cider-profile.el" (23377 61664
|
||||
;;;;;; 764574 111000))
|
||||
;;;### (autoloads nil "cider-profile" "cider-profile.el" (23450 31943
|
||||
;;;;;; 260359 378000))
|
||||
;;; Generated autoloads from cider-profile.el
|
||||
|
||||
(autoload 'cider-profile-samples "cider-profile" "\
|
||||
|
@ -499,7 +529,7 @@ Clear any collected profile data.
|
|||
;;;***
|
||||
|
||||
;;;### (autoloads nil "cider-repl-history" "cider-repl-history.el"
|
||||
;;;;;; (23377 61664 794990 521000))
|
||||
;;;;;; (23450 31943 238481 545000))
|
||||
;;; Generated autoloads from cider-repl-history.el
|
||||
|
||||
(autoload 'cider-repl-history "cider-repl-history" "\
|
||||
|
@ -509,8 +539,8 @@ Display items in the CIDER command history in another buffer.
|
|||
|
||||
;;;***
|
||||
|
||||
;;;### (autoloads nil "cider-scratch" "cider-scratch.el" (23377 61664
|
||||
;;;;;; 778379 441000))
|
||||
;;;### (autoloads nil "cider-scratch" "cider-scratch.el" (23450 31943
|
||||
;;;;;; 263445 43000))
|
||||
;;; Generated autoloads from cider-scratch.el
|
||||
|
||||
(autoload 'cider-scratch "cider-scratch" "\
|
||||
|
@ -520,8 +550,8 @@ Go to the scratch buffer named `cider-scratch-buffer-name'.
|
|||
|
||||
;;;***
|
||||
|
||||
;;;### (autoloads nil "cider-selector" "cider-selector.el" (23377
|
||||
;;;;;; 61664 805380 173000))
|
||||
;;;### (autoloads nil "cider-selector" "cider-selector.el" (23450
|
||||
;;;;;; 31943 272524 257000))
|
||||
;;; Generated autoloads from cider-selector.el
|
||||
|
||||
(autoload 'cider-selector "cider-selector" "\
|
||||
|
@ -535,8 +565,8 @@ See `def-cider-selector-method' for defining new methods.
|
|||
|
||||
;;;***
|
||||
|
||||
;;;### (autoloads nil "cider-test" "cider-test.el" (23377 61664 798770
|
||||
;;;;;; 508000))
|
||||
;;;### (autoloads nil "cider-test" "cider-test.el" (23450 31943 232877
|
||||
;;;;;; 761000))
|
||||
;;; Generated autoloads from cider-test.el
|
||||
|
||||
(defvar cider-auto-test-mode nil "\
|
||||
|
@ -560,8 +590,8 @@ nothing if no tests are defined or if the file failed to load.
|
|||
|
||||
;;;***
|
||||
|
||||
;;;### (autoloads nil "cider-tracing" "cider-tracing.el" (23377 61664
|
||||
;;;;;; 774719 690000))
|
||||
;;;### (autoloads nil "cider-tracing" "cider-tracing.el" (23450 31943
|
||||
;;;;;; 245586 221000))
|
||||
;;; Generated autoloads from cider-tracing.el
|
||||
|
||||
(autoload 'cider-toggle-trace-var "cider-tracing" "\
|
||||
|
@ -580,8 +610,8 @@ Defaults to the current ns. With prefix arg QUERY, prompts for a ns.
|
|||
|
||||
;;;***
|
||||
|
||||
;;;### (autoloads nil "cider-util" "cider-util.el" (23377 61664 802813
|
||||
;;;;;; 332000))
|
||||
;;;### (autoloads nil "cider-util" "cider-util.el" (23450 31943 281050
|
||||
;;;;;; 359000))
|
||||
;;; Generated autoloads from cider-util.el
|
||||
|
||||
(autoload 'cider-view-manual "cider-util" "\
|
||||
|
@ -595,7 +625,7 @@ View the manual in your default browser.
|
|||
;;;;;; "cider-completion.el" "cider-connection.el" "cider-doc.el"
|
||||
;;;;;; "cider-eldoc.el" "cider-eval.el" "cider-overlays.el" "cider-pkg.el"
|
||||
;;;;;; "cider-popup.el" "cider-repl.el" "cider-resolve.el" "cider-stacktrace.el"
|
||||
;;;;;; "nrepl-client.el" "nrepl-dict.el") (23377 61664 793689 575000))
|
||||
;;;;;; "nrepl-client.el" "nrepl-dict.el") (23450 31943 286612 426000))
|
||||
|
||||
;;;***
|
||||
|
|
@ -368,7 +368,7 @@ is nil, use `cider-load-file-handler'."
|
|||
;;; Sync Requests
|
||||
|
||||
(defcustom cider-filtered-namespaces-regexps
|
||||
'("^cider.nrepl" "^refactor-nrepl" "^clojure.tools.nrepl")
|
||||
'("^cider.nrepl" "^refactor-nrepl" "^clojure.tools.nrepl" "^nrepl")
|
||||
"List of regexps used to filter out some vars/symbols/namespaces.
|
||||
When nil, nothing is filtered out. Otherwise, all namespaces matching any
|
||||
regexp from this list are dropped out of the \"ns-list\" op. Also,
|
Binary file not shown.
|
@ -286,10 +286,13 @@ If no local or remote file exists, return nil."
|
|||
(defun cider-find-file (url)
|
||||
"Return a buffer visiting the file URL if it exists, or nil otherwise.
|
||||
If URL has a scheme prefix, it must represent a fully-qualified file path
|
||||
or an entry within a zip/jar archive. If URL doesn't contain a scheme
|
||||
prefix and is an absolute path, it is treated as such. Finally, if URL is
|
||||
relative, it is expanded within each of the open Clojure buffers till an
|
||||
existing file ending with URL has been found."
|
||||
or an entry within a zip/jar archive. If AVFS (archive virtual file
|
||||
system; see online docs) is mounted the archive entry is opened inside the
|
||||
AVFS directory, otherwise the entry is archived into a temporary read-only
|
||||
buffer. If URL doesn't contain a scheme prefix and is an absolute path, it
|
||||
is treated as such. Finally, if URL is relative, it is expanded within each
|
||||
of the open Clojure buffers till an existing file ending with URL has been
|
||||
found."
|
||||
(require 'arc-mode)
|
||||
(cond ((string-match "^file:\\(.+\\)" url)
|
||||
(when-let* ((file (cider--url-to-file (match-string 1 url)))
|
||||
|
@ -297,42 +300,39 @@ existing file ending with URL has been found."
|
|||
(find-file-noselect path)))
|
||||
((string-match "^\\(jar\\|zip\\):\\(file:.+\\)!/\\(.+\\)" url)
|
||||
(when-let* ((entry (match-string 3 url))
|
||||
(file (cider--url-to-file (match-string 2 url)))
|
||||
(path (cider--file-path file))
|
||||
;; It is used for targeting useless intermediate buffer.
|
||||
;; That buffer is made by (find-file path) below.
|
||||
;; It has the name which is the last part of the path.
|
||||
(trash (replace-regexp-in-string "^/.+/" "" path))
|
||||
(name (format "%s:%s" path entry)))
|
||||
(or (find-buffer-visiting name)
|
||||
(if (tramp-tramp-file-p path)
|
||||
(progn
|
||||
;; Use emacs built in archiving.
|
||||
;; This makes a list of files in archived Zip or Jar.
|
||||
;; That list buffer is useless after jumping to the
|
||||
;; buffer which has the real definition.
|
||||
;; It'll be removed by (kill-buffer trash) below.
|
||||
(find-file path)
|
||||
(goto-char (point-min))
|
||||
;; Make sure the file path is followed by a newline to
|
||||
;; prevent eg. clj matching cljs.
|
||||
(search-forward (concat entry "\n"))
|
||||
;; moves up to matching line
|
||||
(forward-line -1)
|
||||
(archive-extract)
|
||||
;; Remove useless buffer made by (find-file path) above.
|
||||
(kill-buffer trash)
|
||||
(current-buffer))
|
||||
;; Use external zip program to just extract the single file
|
||||
(with-current-buffer (generate-new-buffer
|
||||
(file-name-nondirectory entry))
|
||||
(archive-zip-extract path entry)
|
||||
(set-visited-file-name name)
|
||||
(setq-local default-directory (file-name-directory path))
|
||||
(setq-local buffer-read-only t)
|
||||
(set-buffer-modified-p nil)
|
||||
(set-auto-mode)
|
||||
(current-buffer))))))
|
||||
(file (cider--url-to-file (match-string 2 url)))
|
||||
(path (cider--file-path file))
|
||||
(name (format "%s:%s" path entry))
|
||||
(avfs (format "%s%s#uzip/%s"
|
||||
(expand-file-name (or (getenv "AVFSBASE") "~/.avfs/"))
|
||||
path entry)))
|
||||
(cond
|
||||
;; 1) use avfs
|
||||
((file-exists-p avfs)
|
||||
(find-file-noselect avfs))
|
||||
;; 2) already uncompressed
|
||||
((find-buffer-visiting name))
|
||||
;; 3) on remotes use Emacs built-in archiving
|
||||
((tramp-tramp-file-p path)
|
||||
(find-file path)
|
||||
(goto-char (point-min))
|
||||
;; anchor to eol to prevent eg. clj matching cljs.
|
||||
(re-search-forward (concat entry "$"))
|
||||
(let ((archive-buffer (current-buffer)))
|
||||
(archive-extract)
|
||||
(kill-buffer archive-buffer))
|
||||
(current-buffer))
|
||||
;; 4) Use external zip program to extract a single file
|
||||
(t
|
||||
(with-current-buffer (generate-new-buffer
|
||||
(file-name-nondirectory entry))
|
||||
(archive-zip-extract path entry)
|
||||
(set-visited-file-name name)
|
||||
(setq-local default-directory (file-name-directory path))
|
||||
(setq-local buffer-read-only t)
|
||||
(set-buffer-modified-p nil)
|
||||
(set-auto-mode)
|
||||
(current-buffer))))))
|
||||
(t (if-let* ((path (cider--file-path url)))
|
||||
(find-file-noselect path)
|
||||
(unless (file-name-absolute-p url)
|
Binary file not shown.
|
@ -31,7 +31,16 @@
|
|||
|
||||
(require 'nrepl-client)
|
||||
(require 'cl-lib)
|
||||
(require 'format-spec)
|
||||
(require 'sesman)
|
||||
(require 'sesman-browser)
|
||||
|
||||
(defcustom cider-session-name-template "%J:%h:%p"
|
||||
"Format string to use for session names.
|
||||
See `cider-format-connection-params' for available format characters."
|
||||
:type 'string
|
||||
:group 'cider
|
||||
:package-version '(cider . "0.18.0"))
|
||||
|
||||
(defcustom cider-connection-message-fn #'cider-random-words-of-inspiration
|
||||
"The function to use to generate the message displayed on connect.
|
||||
|
@ -83,29 +92,47 @@ PARAMS is a plist containing :host, :port, :server and other parameters for
|
|||
"Ensure there is a linked CIDER session."
|
||||
(sesman-ensure-session 'CIDER))
|
||||
|
||||
(defun cider--gather-connect-params (params proc-buffer)
|
||||
(defun cider--session-server (session)
|
||||
"Return server buffer for SESSION or nil if there is no server."
|
||||
(seq-some (lambda (r)
|
||||
(buffer-local-value 'nrepl-server-buffer r))
|
||||
(cdr session)))
|
||||
|
||||
(defun cider--gather-session-params (session)
|
||||
"Gather all params for a SESSION."
|
||||
(let (params)
|
||||
(dolist (repl (cdr session))
|
||||
(setq params (cider--gather-connect-params params repl)))
|
||||
(when-let* ((server (cider--session-server session)))
|
||||
(setq params (cider--gather-connect-params params server)))
|
||||
params))
|
||||
|
||||
(defun cider--gather-connect-params (&optional params proc-buffer)
|
||||
"Gather all relevant connection parameters into PARAMS plist.
|
||||
PROC-BUFFER is either server or client buffer."
|
||||
(with-current-buffer proc-buffer
|
||||
(unless nrepl-endpoint
|
||||
(error "This is not a REPL or SERVER buffer; is there an active REPL?"))
|
||||
(let ((server-buf (if (nrepl-server-p proc-buffer)
|
||||
proc-buffer
|
||||
nrepl-server-buffer)))
|
||||
(cl-loop for l on nrepl-endpoint by #'cddr
|
||||
do (setq params (plist-put params (car l) (cadr l))))
|
||||
(setq params (thread-first params
|
||||
(plist-put :project-dir nrepl-project-dir)))
|
||||
(when (buffer-live-p server-buf)
|
||||
PROC-BUFFER is either server or client buffer, defaults to current buffer."
|
||||
(let ((proc-buffer (or proc-buffer (current-buffer))))
|
||||
(with-current-buffer proc-buffer
|
||||
(unless nrepl-endpoint
|
||||
(error "This is not a REPL or SERVER buffer; is there an active REPL?"))
|
||||
(let ((server-buf (if (nrepl-server-p proc-buffer)
|
||||
proc-buffer
|
||||
nrepl-server-buffer)))
|
||||
(cl-loop for l on nrepl-endpoint by #'cddr
|
||||
do (setq params (plist-put params (car l) (cadr l))))
|
||||
(setq params (thread-first params
|
||||
(plist-put :server (get-buffer-process server-buf))
|
||||
(plist-put :server-command nrepl-server-command))))
|
||||
;; repl-specific parameters (do not pollute server params!)
|
||||
(when (nrepl-server-p proc-buffer)
|
||||
(setq params (thread-first params
|
||||
(plist-put :repl-type cider-repl-type)
|
||||
(plist-put :repl-init-function cider-repl-init-function))))
|
||||
params)))
|
||||
(plist-put :project-dir nrepl-project-dir)))
|
||||
(when (buffer-live-p server-buf)
|
||||
(setq params (thread-first params
|
||||
(plist-put :server (get-buffer-process server-buf))
|
||||
(plist-put :server-command nrepl-server-command))))
|
||||
;; repl-specific parameters (do not pollute server params!)
|
||||
(unless (nrepl-server-p proc-buffer)
|
||||
(setq params (thread-first params
|
||||
(plist-put :session-name cider-session-name)
|
||||
(plist-put :repl-type cider-repl-type)
|
||||
(plist-put :cljs-repl-type cider-cljs-repl-type)
|
||||
(plist-put :repl-init-function cider-repl-init-function))))
|
||||
params))))
|
||||
|
||||
(defun cider--close-buffer (buffer)
|
||||
"Close the BUFFER and kill its associated process (if any)."
|
||||
|
@ -183,17 +210,22 @@ FORMAT is a format string to compile with ARGS and display on the REPL."
|
|||
"Can't determine Clojure's version. CIDER requires Clojure %s (or newer)."
|
||||
cider-minimum-clojure-version)))
|
||||
|
||||
(defvar cider-required-middleware-version)
|
||||
(defun cider--check-middleware-compatibility ()
|
||||
"CIDER frontend/backend compatibility check.
|
||||
Retrieve the underlying connection's CIDER-nREPL version and checks if the
|
||||
middleware used is compatible with CIDER. If not, will display a warning
|
||||
message in the REPL area."
|
||||
(let* ((version-dict (nrepl-aux-info "cider-version" (cider-current-repl)))
|
||||
(middleware-version (nrepl-dict-get version-dict "version-string" "not installed")))
|
||||
(unless (equal cider-version middleware-version)
|
||||
(middleware-version (nrepl-dict-get version-dict "version-string")))
|
||||
(cond
|
||||
((null middleware-version)
|
||||
(cider-emit-manual-warning "troubleshooting/#cider-complains-of-the-cider-nrepl-version"
|
||||
"CIDER's version (%s) does not match cider-nrepl's version (%s). Things will break!"
|
||||
cider-version middleware-version))))
|
||||
"CIDER requires cider-nrepl to be fully functional. Many things will not work without it!"))
|
||||
((version< middleware-version cider-required-middleware-version)
|
||||
(cider-emit-manual-warning "troubleshooting/#cider-complains-of-the-cider-nrepl-version"
|
||||
"CIDER %s requires cider-nrepl %s+, but you're currently using cider-nrepl %s. Things will break!"
|
||||
cider-version cider-required-middleware-version middleware-version)))))
|
||||
|
||||
(declare-function cider-interactive-eval-handler "cider-eval")
|
||||
;; TODO: Use some null handler here
|
||||
|
@ -307,28 +339,37 @@ about this buffer (like variable `cider-repl-type')."
|
|||
|
||||
;;; Cider's Connection Management UI
|
||||
|
||||
(defun cider-quit ()
|
||||
"Quit the currently active CIDER connection."
|
||||
(defun cider-quit (&optional repl)
|
||||
"Quit the CIDER connection associated with REPL.
|
||||
REPL defaults to the current REPL."
|
||||
(interactive)
|
||||
(cider-ensure-connected)
|
||||
(let ((connection (cider-current-repl)))
|
||||
(cider--close-connection connection))
|
||||
(let ((repl (or repl
|
||||
(sesman-browser-get 'object)
|
||||
(cider-current-repl nil 'ensure))))
|
||||
(cider--close-connection repl))
|
||||
;; if there are no more connections we can kill all ancillary buffers
|
||||
(unless (cider-connected-p)
|
||||
(cider-close-ancillary-buffers)))
|
||||
(cider-close-ancillary-buffers))
|
||||
;; need this to refresh sesman browser
|
||||
(run-hooks 'sesman-post-command-hook))
|
||||
|
||||
(defun cider-restart ()
|
||||
"Restart the currently active CIDER connection.
|
||||
Don't restart the server or other connections within the same session. Use
|
||||
`sesman-restart' to restart the entire session."
|
||||
(defun cider-restart (&optional repl)
|
||||
"Restart CIDER connection associated with REPL.
|
||||
REPL defaults to the current REPL. Don't restart the server or other
|
||||
connections within the same session. Use `sesman-restart' to restart the
|
||||
entire session."
|
||||
(interactive)
|
||||
(let* ((repl (or (cider-current-repl)
|
||||
(user-error "No linked REPL")))
|
||||
(params (thread-first (cider--gather-connect-params nil repl)
|
||||
(let* ((repl (or repl
|
||||
(sesman-browser-get 'object)
|
||||
(cider-current-repl nil 'ensure)))
|
||||
(params (thread-first ()
|
||||
(cider--gather-connect-params repl)
|
||||
(plist-put :session-name (sesman-session-name-for-object 'CIDER repl))
|
||||
(plist-put :repl-buffer repl))))
|
||||
(cider--close-connection repl 'no-kill)
|
||||
(cider-nrepl-connect params)))
|
||||
(cider-nrepl-connect params)
|
||||
;; need this to refresh sesman browser
|
||||
(run-hooks 'sesman-post-command-hook)))
|
||||
|
||||
(defun cider-close-ancillary-buffers ()
|
||||
"Close buffers that are shared across connections."
|
||||
|
@ -337,11 +378,15 @@ Don't restart the server or other connections within the same session. Use
|
|||
(when (get-buffer buf-name)
|
||||
(kill-buffer buf-name))))
|
||||
|
||||
(defun cider-describe-current-connection ()
|
||||
"Display information about the current connection."
|
||||
(defun cider-describe-connection (&optional repl)
|
||||
"Display information about the connection associated with REPL.
|
||||
REPL defaults to the current REPL."
|
||||
(interactive)
|
||||
(message "%s" (cider--connection-info (cider-current-repl nil 'ensure))))
|
||||
(define-obsolete-function-alias 'cider-display-connection-info 'cider-describe-current-connection "0.18.0")
|
||||
(let ((repl (or repl
|
||||
(sesman-browser-get 'object)
|
||||
(cider-current-repl nil 'ensure))))
|
||||
(message "%s" (cider--connection-info repl))))
|
||||
(define-obsolete-function-alias 'cider-display-connection-info 'cider-describe-connection "0.18.0")
|
||||
|
||||
(defconst cider-nrepl-session-buffer "*cider-nrepl-session*")
|
||||
|
||||
|
@ -370,16 +415,33 @@ Don't restart the server or other connections within the same session. Use
|
|||
|
||||
;;; Sesman's Session-Wise Management UI
|
||||
|
||||
(cl-defmethod sesman-project ((_system (eql CIDER)))
|
||||
(clojure-project-dir (cider-current-dir)))
|
||||
|
||||
(cl-defmethod sesman-more-relevant-p ((_system (eql CIDER)) session1 session2)
|
||||
(sesman-more-recent-p (cdr session1) (cdr session2)))
|
||||
|
||||
(defvar cider-sesman-browser-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(define-key map (kbd "j q") #'cider-quit)
|
||||
(define-key map (kbd "j k") #'cider-quit)
|
||||
(define-key map (kbd "j r") #'cider-restart)
|
||||
(define-key map (kbd "j d") #'cider-describe-connection)
|
||||
(define-key map (kbd "j i") #'cider-describe-connection)
|
||||
(define-key map (kbd "C-c C-q") #'cider-quit)
|
||||
(define-key map (kbd "C-c C-q") #'cider-quit)
|
||||
(define-key map (kbd "C-c C-r") #'cider-restart)
|
||||
(define-key map (kbd "C-c M-r") #'cider-restart)
|
||||
(define-key map (kbd "C-c C-d") #'cider-describe-connection)
|
||||
(define-key map (kbd "C-c M-d") #'cider-describe-connection)
|
||||
(define-key map (kbd "C-c C-i") #'cider-describe-connection)
|
||||
map)
|
||||
"Map active on REPL objects in sesman browser.")
|
||||
|
||||
(cl-defmethod sesman-session-info ((_system (eql CIDER)) session)
|
||||
(interactive "P")
|
||||
(let ((repl (cadr session)))
|
||||
(format "\t%s: %s\n\tREPLS: %s"
|
||||
(if (buffer-local-value 'nrepl-server-buffer repl) "SERVER" "CONNECTION")
|
||||
(cider--connection-info repl t)
|
||||
(mapconcat #'buffer-name (cdr session) ", "))))
|
||||
(list :objects (cdr session)
|
||||
:map cider-sesman-browser-map))
|
||||
|
||||
(declare-function cider "cider")
|
||||
(cl-defmethod sesman-start-session ((_system (eql CIDER)))
|
||||
|
@ -394,50 +456,107 @@ Fallback on `cider' command."
|
|||
(cider-close-ancillary-buffers)))
|
||||
|
||||
(cl-defmethod sesman-restart-session ((_system (eql CIDER)) session)
|
||||
(let* ((repls (cdr session))
|
||||
(s-buf (seq-some (lambda (r)
|
||||
(buffer-local-value 'nrepl-server-buffer r))
|
||||
repls))
|
||||
(s-params (cider--gather-connect-params nil s-buf))
|
||||
(ses-name (car session)))
|
||||
;; 1) kill all connections, but keep the buffers
|
||||
(mapc (lambda (conn)
|
||||
(cider--close-connection conn 'no-kill))
|
||||
repls)
|
||||
;; 2) kill the server
|
||||
(message "Waiting for CIDER server to quit...")
|
||||
(nrepl-kill-server-buffer s-buf)
|
||||
;; 3) start server
|
||||
(nrepl-start-server-process
|
||||
(plist-get s-params :project-dir)
|
||||
(plist-get s-params :server-command)
|
||||
(lambda (server-buf)
|
||||
;; 4) restart the repls reusing the buffer
|
||||
(dolist (r repls)
|
||||
(cider-nrepl-connect
|
||||
(thread-first ()
|
||||
(cider--gather-connect-params r)
|
||||
;; server params (:port, :project-dir etc) have precedence
|
||||
(cider--gather-connect-params server-buf)
|
||||
(plist-put :session-name ses-name)
|
||||
(plist-put :repl-buffer r))))
|
||||
(message "Restarted CIDER %s session" ses-name)))))
|
||||
(let* ((ses-name (car session))
|
||||
(repls (cdr session))
|
||||
(srv-buf (cider--session-server session)))
|
||||
(if srv-buf
|
||||
;; session with a server
|
||||
(let ((s-params (cider--gather-connect-params nil srv-buf)))
|
||||
;; 1) kill all connections, but keep the buffers
|
||||
(mapc (lambda (conn)
|
||||
(cider--close-connection conn 'no-kill))
|
||||
repls)
|
||||
;; 2) kill the server
|
||||
(nrepl-kill-server-buffer srv-buf)
|
||||
;; 3) start server
|
||||
(nrepl-start-server-process
|
||||
(plist-get s-params :project-dir)
|
||||
(plist-get s-params :server-command)
|
||||
(lambda (server-buf)
|
||||
;; 4) restart the repls reusing the buffer
|
||||
(dolist (r repls)
|
||||
(cider-nrepl-connect
|
||||
(thread-first ()
|
||||
(cider--gather-connect-params r)
|
||||
;; server params (:port, :project-dir etc) have precedence
|
||||
(cider--gather-connect-params server-buf)
|
||||
(plist-put :session-name ses-name)
|
||||
(plist-put :repl-buffer r))))
|
||||
(sesman-browser-revert-all 'CIDER)
|
||||
(message "Restarted CIDER %s session" ses-name))))
|
||||
;; server-less session
|
||||
(dolist (r repls)
|
||||
(cider--close-connection r 'no-kill)
|
||||
(cider-nrepl-connect
|
||||
(thread-first ()
|
||||
(cider--gather-connect-params r)
|
||||
(plist-put :session-name ses-name)
|
||||
(plist-put :repl-buffer r)))))))
|
||||
|
||||
(defun cider-new-session-name (params)
|
||||
"Create new session name given plist of connection PARAMS."
|
||||
(let* ((dir (or (plist-get params :project-dir)
|
||||
(clojure-project-dir (cider-current-dir))
|
||||
default-directory))
|
||||
(host (plist-get params :host))
|
||||
;; showing host:port on remotes only
|
||||
(host-port (if (not (or (null host)
|
||||
(equal host "localhost")
|
||||
(equal host "127.0.0.1")))
|
||||
(format ":%s:%s" host (plist-get params :port))
|
||||
""))
|
||||
(root-name (file-name-nondirectory (directory-file-name dir)))
|
||||
(name (format "%s%s" root-name host-port))
|
||||
(defun cider-format-connection-params (template params)
|
||||
"Format PARAMS with TEMPLATE string.
|
||||
The following formats can be used in TEMPLATE string:
|
||||
|
||||
%h - host
|
||||
%H - remote host, empty for local hosts
|
||||
%p - port
|
||||
%j - short project name, or directory name if no project
|
||||
%J - long project name including parent dir name
|
||||
%r - REPL type (clj or cljs)
|
||||
%S - type of the ClojureScript runtime (Nashorn, Node, Figwheel etc.)
|
||||
%s - session name as defined by `cider-session-name-template'.
|
||||
|
||||
In case some values are empty, extra separators (: and -) are automatically
|
||||
removed."
|
||||
(let* ((dir (directory-file-name
|
||||
(abbreviate-file-name
|
||||
(or (plist-get params :project-dir)
|
||||
(clojure-project-dir (cider-current-dir))
|
||||
default-directory))))
|
||||
(short-proj (file-name-nondirectory (directory-file-name dir)))
|
||||
(parent-dir (ignore-errors
|
||||
(thread-first dir file-name-directory
|
||||
directory-file-name file-name-nondirectory
|
||||
file-name-as-directory)))
|
||||
(long-proj (format "%s%s" (or parent-dir "") short-proj))
|
||||
;; use `dir` if it is shorter than `long-proj` or `short-proj`
|
||||
(short-proj (if (>= (length short-proj) (length dir))
|
||||
dir
|
||||
short-proj))
|
||||
(long-proj (if (>= (length long-proj) (length dir))
|
||||
dir
|
||||
long-proj))
|
||||
(port (or (plist-get params :port) ""))
|
||||
(host (or (plist-get params :host) "localhost"))
|
||||
(remote-host (if (member host '("localhost" "127.0.0.1"))
|
||||
""
|
||||
host))
|
||||
(repl-type (or (plist-get params :repl-type) "unknown"))
|
||||
(cljs-repl-type (or (and (equal repl-type "cljs")
|
||||
(plist-get params :cljs-repl-type))
|
||||
""))
|
||||
(specs `((?h . ,host)
|
||||
(?H . ,remote-host)
|
||||
(?p . ,port)
|
||||
(?j . ,short-proj)
|
||||
(?J . ,long-proj)
|
||||
(?r . ,repl-type)
|
||||
(?S . ,cljs-repl-type)))
|
||||
(ses-name (or (plist-get params :session-name)
|
||||
(format-spec cider-session-name-template specs)))
|
||||
(specs (append `((?s . ,ses-name)) specs)))
|
||||
(thread-last (format-spec template specs)
|
||||
;; remove extraneous separators
|
||||
(replace-regexp-in-string "\\([:-]\\)[:-]+" "\\1")
|
||||
(replace-regexp-in-string "\\(^[:-]\\)\\|\\([:-]$\\)" "")
|
||||
(replace-regexp-in-string "[:-]\\([])*]\\)" "\\1"))))
|
||||
|
||||
(defun cider-make-session-name (params)
|
||||
"Create new session name given plist of connection PARAMS.
|
||||
Session name can be customized with `cider-session-name-template'."
|
||||
(let* ((root-name (cider-format-connection-params cider-session-name-template params))
|
||||
(other-names (mapcar #'car (sesman-sessions 'CIDER)))
|
||||
(name root-name)
|
||||
(i 2))
|
||||
(while (member name other-names)
|
||||
(setq name (concat root-name "#" (number-to-string i))
|
||||
|
@ -447,6 +566,9 @@ Fallback on `cider' command."
|
|||
|
||||
;;; REPL Buffer Init
|
||||
|
||||
(defvar-local cider-cljs-repl-type nil
|
||||
"The type of the CLJS runtime (Nashorn, Node etc.)")
|
||||
|
||||
(defvar-local cider-repl-type nil
|
||||
"The type of this REPL buffer, usually either \"clj\" or \"cljs\".")
|
||||
|
||||
|
@ -478,16 +600,20 @@ Assume that the current buffer is a REPL."
|
|||
(null mode-name))
|
||||
(setq cider-repl-type type)
|
||||
(setq mode-name (format "REPL[%s]" type))
|
||||
(rename-buffer (nrepl-repl-buffer-name))
|
||||
(when (and nrepl-log-messages nrepl-messages-buffer)
|
||||
(let ((mbuf-name (nrepl-messages-buffer-name (current-buffer))))
|
||||
(let ((params (cider--gather-connect-params)))
|
||||
;; We need to set current name to something else temporarily to avoid
|
||||
;; false name duplication in `nrepl-repl-buffer-name`.
|
||||
(rename-buffer (generate-new-buffer-name "*dummy-cider-repl-buffer*"))
|
||||
(rename-buffer (nrepl-repl-buffer-name params))
|
||||
(when (and nrepl-log-messages nrepl-messages-buffer)
|
||||
(with-current-buffer nrepl-messages-buffer
|
||||
(rename-buffer mbuf-name)))))))
|
||||
(rename-buffer (nrepl-messages-buffer-name params))))))))
|
||||
|
||||
(declare-function cider-default-err-handler "cider-eval")
|
||||
(declare-function cider-repl-mode "cider-repl")
|
||||
(declare-function cider-repl--state-handler "cider-repl")
|
||||
(declare-function cider-repl-reset-markers "cider-repl")
|
||||
(defvar-local cider-session-name nil)
|
||||
(defvar-local cider-repl-init-function nil)
|
||||
(defun cider-repl-create (params)
|
||||
"Create new repl buffer.
|
||||
|
@ -498,18 +624,23 @@ function with the repl buffer set as current."
|
|||
;; Connection might not have been set as yet. Please don't send requests in
|
||||
;; this function, but use cider--connected-handler instead.
|
||||
(let ((buffer (or (plist-get params :repl-buffer)
|
||||
(get-buffer-create (generate-new-buffer-name "*cider-uninitialized-repl*")))))
|
||||
(get-buffer-create (generate-new-buffer-name "*cider-uninitialized-repl*"))))
|
||||
(ses-name (or (plist-get params :session-name)
|
||||
(cider-make-session-name params))))
|
||||
(with-current-buffer buffer
|
||||
(let ((ses-name (or (plist-get params :session-name)
|
||||
(cider-new-session-name params))))
|
||||
(sesman-add-object 'CIDER ses-name buffer t))
|
||||
(setq-local sesman-system 'CIDER)
|
||||
(setq-local default-directory (or (plist-get params :project-dir) default-directory))
|
||||
;; creates a new session if session with ses-name doesn't already exist
|
||||
(sesman-add-object 'CIDER ses-name buffer 'allow-new)
|
||||
(unless (derived-mode-p 'cider-repl-mode)
|
||||
(cider-repl-mode))
|
||||
(setq nrepl-err-handler #'cider-default-err-handler
|
||||
;; used as a new-repl marker in cider-set-repl-type
|
||||
mode-name nil
|
||||
cider-session-name ses-name
|
||||
nrepl-project-dir (plist-get params :project-dir)
|
||||
;; REPLs start with clj and then "upgrade" to a different type
|
||||
cider-repl-type "clj"
|
||||
cider-repl-type (plist-get params :repl-type)
|
||||
;; ran at the end of cider--connected-handler
|
||||
cider-repl-init-function (plist-get params :repl-init-function))
|
||||
(cider-repl-reset-markers)
|
||||
|
@ -521,6 +652,17 @@ function with the repl buffer set as current."
|
|||
|
||||
;;; Current/other REPLs
|
||||
|
||||
(defun cider--no-repls-user-error (type)
|
||||
"Throw \"No REPL\" user error customized for TYPE."
|
||||
(let ((type (cond
|
||||
((equal type "multi")
|
||||
"clj or cljs")
|
||||
((listp type)
|
||||
(mapconcat #'identity type " or "))
|
||||
(type))))
|
||||
(user-error "No %s REPLs in current session \"%s\""
|
||||
type (car (sesman-current-session 'CIDER)))))
|
||||
|
||||
(defun cider-current-repl (&optional type ensure)
|
||||
"Get the most recent REPL of TYPE from the current session.
|
||||
TYPE is either \"clj\", \"cljs\" or \"multi\". When nil, infer the type
|
||||
|
@ -541,22 +683,30 @@ session."
|
|||
(member b repls))
|
||||
(buffer-list)))))
|
||||
(if (and ensure (null repl))
|
||||
(user-error "No %s REPL in current session (%s)"
|
||||
type (car (sesman-current-session 'CIDER)))
|
||||
(cider--no-repls-user-error type)
|
||||
repl))))
|
||||
|
||||
(defun cider--match-repl-type (type buffer)
|
||||
"Return non-nil if TYPE matches BUFFER's REPL type."
|
||||
(let ((buffer-repl-type (cider-repl-type buffer)))
|
||||
(cond ((null buffer-repl-type) nil)
|
||||
((or (null type) (equal type "multi")) t)
|
||||
((listp type) (member buffer-repl-type type))
|
||||
(t (string= type buffer-repl-type)))))
|
||||
|
||||
(defun cider-repls (&optional type ensure)
|
||||
"Return cider REPLs of TYPE from the current session.
|
||||
If TYPE is nil or \"multi\", return all repls. If ENSURE is non-nil, throw
|
||||
an error if no linked session exists."
|
||||
If TYPE is nil or \"multi\", return all repls. If TYPE is a list of types,
|
||||
return only REPLs of type contained in the list. If ENSURE is non-nil,
|
||||
throw an error if no linked session exists."
|
||||
(let ((repls (cdr (if ensure
|
||||
(sesman-ensure-session 'CIDER)
|
||||
(sesman-current-session 'CIDER)))))
|
||||
(if (or (null type) (equal type "multi"))
|
||||
repls
|
||||
(seq-filter (lambda (b)
|
||||
(string= type (cider-repl-type b)))
|
||||
repls))))
|
||||
(or (seq-filter (lambda (b)
|
||||
(cider--match-repl-type type b))
|
||||
repls)
|
||||
(when ensure
|
||||
(cider--no-repls-user-error type)))))
|
||||
|
||||
(defun cider-map-repls (which function)
|
||||
"Call FUNCTION once for each appropriate REPL as indicated by WHICH.
|
||||
|
@ -569,7 +719,8 @@ the following keywords:
|
|||
:clj-strict (:cljs-strict) - Map over clj (cljs) REPLs but signal a
|
||||
`user-error' in `clojurescript-mode' (`clojure-mode'). Use this for
|
||||
commands only supported in Clojure (ClojureScript).
|
||||
Error is signaled if no REPL buffer of specified type exists."
|
||||
Error is signaled if no REPL buffers of specified type exist in current
|
||||
session."
|
||||
(declare (indent 1))
|
||||
(let ((cur-type (cider-repl-type-for-buffer)))
|
||||
(cl-case which
|
||||
|
@ -580,7 +731,9 @@ Error is signaled if no REPL buffer of specified type exists."
|
|||
(let* ((type (cl-case which
|
||||
((:clj :clj-strict) "clj")
|
||||
((:cljs :cljs-strict) "cljs")
|
||||
(:auto cur-type)))
|
||||
(:auto (if (equal cur-type "multi")
|
||||
'("clj" "cljs")
|
||||
cur-type))))
|
||||
(repls (cider-repls type 'ensure)))
|
||||
(mapcar function repls))))
|
||||
|
||||
|
@ -598,7 +751,7 @@ Error is signaled if no REPL buffer of specified type exists."
|
|||
(define-obsolete-function-alias 'cider-repl-buffers 'cider-repls "0.18")
|
||||
(define-obsolete-function-alias 'cider-current-session 'cider-nrepl-eval-session "0.18")
|
||||
(define-obsolete-function-alias 'cider-current-tooling-session 'cider-nrepl-tooling-session "0.18")
|
||||
(define-obsolete-function-alias 'cider-display-connection-info 'cider-describe-current-connection "0.18")
|
||||
(define-obsolete-function-alias 'cider-display-connection-info 'cider-describe-connection "0.18")
|
||||
(define-obsolete-function-alias 'nrepl-connection-buffer-name 'nrepl-repl-buffer-name "0.18")
|
||||
(define-obsolete-function-alias 'cider-repl-set-type 'cider-set-repl-type "0.18")
|
||||
|
Binary file not shown.
|
@ -602,7 +602,7 @@ is a coordinate measure in sexps."
|
|||
code ns original-id
|
||||
(if (and line column)
|
||||
"you edited the code"
|
||||
"your tools.nrepl version is older than 0.2.11"))
|
||||
"your nREPL version is older than 0.2.11"))
|
||||
(save-excursion
|
||||
(cider--debug-move-point coor)
|
||||
(point-marker)))))))))
|
Binary file not shown.
|
@ -980,7 +980,22 @@ passing arguments."
|
|||
(form (format "(%s)" fn-name)))
|
||||
(cider-read-and-eval (cons form (length form)))))
|
||||
|
||||
;; Eval keymap
|
||||
;; Eval keymaps
|
||||
(defvar cider-eval-pprint-commands-map
|
||||
(let ((map (define-prefix-command 'cider-eval-pprint-commands-map)))
|
||||
;; single key bindings defined last for display in menu
|
||||
(define-key map (kbd "e") #'cider-pprint-eval-last-sexp)
|
||||
(define-key map (kbd "d") #'cider-pprint-eval-defun-at-point)
|
||||
(define-key map (kbd "c e") #'cider-pprint-eval-last-sexp-to-comment)
|
||||
(define-key map (kbd "c d") #'cider-pprint-eval-defun-to-comment)
|
||||
|
||||
;; duplicates with C- for convenience
|
||||
(define-key map (kbd "C-e") #'cider-pprint-eval-last-sexp)
|
||||
(define-key map (kbd "C-d") #'cider-pprint-eval-defun-at-point)
|
||||
(define-key map (kbd "C-c e") #'cider-pprint-eval-last-sexp-to-comment)
|
||||
(define-key map (kbd "C-c C-e") #'cider-pprint-eval-last-sexp-to-comment)
|
||||
(define-key map (kbd "C-c d") #'cider-pprint-eval-defun-to-comment)
|
||||
(define-key map (kbd "C-c C-d") #'cider-pprint-eval-defun-to-comment)))
|
||||
|
||||
(defvar cider-eval-commands-map
|
||||
(let ((map (define-prefix-command 'cider-eval-commands-map)))
|
||||
|
@ -989,13 +1004,14 @@ passing arguments."
|
|||
(define-key map (kbd "r") #'cider-eval-region)
|
||||
(define-key map (kbd "n") #'cider-eval-ns-form)
|
||||
(define-key map (kbd "d") #'cider-eval-defun-at-point)
|
||||
(define-key map (kbd "f") #'cider-eval-last-sexp)
|
||||
(define-key map (kbd "e") #'cider-eval-last-sexp)
|
||||
(define-key map (kbd "v") #'cider-eval-sexp-at-point)
|
||||
(define-key map (kbd "o") #'cider-eval-sexp-up-to-point)
|
||||
(define-key map (kbd ".") #'cider-read-and-eval-defun-at-point)
|
||||
(define-key map (kbd "z") #'cider-eval-defun-up-to-point)
|
||||
(define-key map (kbd "c") #'cider-eval-last-sexp-in-context)
|
||||
(define-key map (kbd "b") #'cider-eval-sexp-at-point-in-context)
|
||||
(define-key map (kbd "f") 'cider-eval-pprint-commands-map)
|
||||
|
||||
;; duplicates with C- for convenience
|
||||
(define-key map (kbd "C-w") #'cider-eval-last-sexp-and-replace)
|
||||
|
@ -1008,7 +1024,8 @@ passing arguments."
|
|||
(define-key map (kbd "C-.") #'cider-read-and-eval-defun-at-point)
|
||||
(define-key map (kbd "C-z") #'cider-eval-defun-up-to-point)
|
||||
(define-key map (kbd "C-c") #'cider-eval-last-sexp-in-context)
|
||||
(define-key map (kbd "C-b") #'cider-eval-sexp-at-point-in-context)))
|
||||
(define-key map (kbd "C-b") #'cider-eval-sexp-at-point-in-context)
|
||||
(define-key map (kbd "C-f") 'cider-eval-pprint-commands-map)))
|
||||
|
||||
(defun cider--file-string (file)
|
||||
"Read the contents of a FILE and return as a string."
|
Binary file not shown.
|
@ -59,13 +59,29 @@ the results to be displayed in a different window. The default value is
|
|||
thing at point."
|
||||
(interactive "P")
|
||||
(cider-ensure-op-supported "info")
|
||||
(if var
|
||||
(cider--find-var var line)
|
||||
(funcall (cider-prompt-for-symbol-function arg)
|
||||
"Symbol"
|
||||
(if (cider--open-other-window-p arg)
|
||||
#'cider--find-var-other-window
|
||||
#'cider--find-var))))
|
||||
(let ((orig-buff (current-buffer))
|
||||
(session (sesman-current-session 'CIDER)))
|
||||
(if var
|
||||
(cider--find-var var line)
|
||||
(funcall (cider-prompt-for-symbol-function arg)
|
||||
"Symbol"
|
||||
(if (cider--open-other-window-p arg)
|
||||
#'cider--find-var-other-window
|
||||
#'cider--find-var)))
|
||||
(when (and (not (eq orig-buff (current-buffer)))
|
||||
session)
|
||||
(sesman-link-session 'CIDER session))))
|
||||
|
||||
;;;###autoload
|
||||
(defun cider-find-dwim-at-mouse (event)
|
||||
"Find and display variable or resource at mouse EVENT."
|
||||
(interactive "e")
|
||||
(cider-ensure-op-supported "info")
|
||||
(if-let* ((symbol-file (save-excursion
|
||||
(mouse-set-point event)
|
||||
(cider-symbol-at-point 'look-back))))
|
||||
(cider-find-dwim symbol-file)
|
||||
(user-error "No variable or resource here")))
|
||||
|
||||
(defun cider--find-dwim (symbol-file callback &optional other-window)
|
||||
"Find the SYMBOL-FILE at point.
|
Binary file not shown.
|
@ -297,7 +297,7 @@ If invoked with a prefix ARG eval the expression after inserting it."
|
|||
["Quit" cider-quit :active (cider-connected-p)]
|
||||
["Restart" cider-restart :active (cider-connected-p)]
|
||||
"--"
|
||||
["Connection info" cider-describe-current-connection
|
||||
["Connection info" cider-describe-connection
|
||||
:active (cider-connected-p)]
|
||||
["Select any CIDER buffer" cider-selector]
|
||||
"--"
|
||||
|
@ -348,10 +348,13 @@ If invoked with a prefix ARG eval the expression after inserting it."
|
|||
["Insert ns form in REPL" cider-insert-ns-form-in-repl]
|
||||
"--"
|
||||
["Load this buffer" cider-load-buffer]
|
||||
["Load this buffer and switch to REPL" cider-load-buffer-and-switch-to-repl-buffer]
|
||||
["Load another file" cider-load-file]
|
||||
["Recursively load all files in directory" cider-load-all-files]
|
||||
["Load all project files" cider-load-all-project-ns]
|
||||
["Refresh loaded code" cider-ns-refresh]
|
||||
["Require and reload" cider-ns-reload]
|
||||
["Require and reload all" cider-ns-reload-all]
|
||||
["Run project (-main function)" cider-run])
|
||||
"Menu for CIDER mode eval commands.")
|
||||
|
||||
|
@ -410,6 +413,8 @@ If invoked with a prefix ARG eval the expression after inserting it."
|
|||
|
||||
|
||||
(declare-function cider-ns-refresh "cider-ns")
|
||||
(declare-function cider-ns-reload "cider-ns")
|
||||
(declare-function cider-ns-reload-all "cider-ns")
|
||||
(declare-function cider-browse-ns "cider-browse-ns")
|
||||
(declare-function cider-eval-ns-form "cider-eval")
|
||||
(declare-function cider-repl-set-ns "cider-repl")
|
||||
|
@ -427,6 +432,8 @@ If invoked with a prefix ARG eval the expression after inserting it."
|
|||
(define-key map (kbd "M-n") #'cider-repl-set-ns)
|
||||
(define-key map (kbd "r") #'cider-ns-refresh)
|
||||
(define-key map (kbd "M-r") #'cider-ns-refresh)
|
||||
(define-key map (kbd "l") #'cider-ns-reload)
|
||||
(define-key map (kbd "M-l") #'cider-ns-reload-all)
|
||||
map)
|
||||
"CIDER NS keymap.")
|
||||
|
||||
|
@ -440,11 +447,20 @@ If invoked with a prefix ARG eval the expression after inserting it."
|
|||
(declare-function cider-find-resource "cider-find")
|
||||
(declare-function cider-find-keyword "cider-find")
|
||||
(declare-function cider-find-var "cider-find")
|
||||
(declare-function cider-find-dwim-at-mouse "cider-find")
|
||||
|
||||
(defconst cider--has-many-mouse-buttons (not (memq window-system '(mac ns)))
|
||||
"Non-nil if system binds forward and back buttons to <mouse-8> and <mouse-9>.
|
||||
|
||||
As it stands Emacs fires these events on <mouse-8> and <mouse-9> on 'x' and
|
||||
'w32'systems while on macOS it presents them on <mouse-4> and <mouse-5>.")
|
||||
|
||||
(defconst cider-mode-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(define-key map (kbd "C-c C-d") 'cider-doc-map)
|
||||
(define-key map (kbd "M-.") #'cider-find-var)
|
||||
(define-key map (kbd (if cider--has-many-mouse-buttons "<mouse-8>" "<mouse-4>")) #'xref-pop-marker-stack)
|
||||
(define-key map (kbd (if cider--has-many-mouse-buttons "<mouse-9>" "<mouse-5>")) #'cider-find-dwim-at-mouse)
|
||||
(define-key map (kbd "C-c C-.") #'cider-find-ns)
|
||||
(define-key map (kbd "C-c C-:") #'cider-find-keyword)
|
||||
(define-key map (kbd "M-,") #'cider-pop-back)
|
||||
|
@ -454,13 +470,13 @@ If invoked with a prefix ARG eval the expression after inserting it."
|
|||
(define-key map (kbd "C-c C-c") #'cider-eval-defun-at-point)
|
||||
(define-key map (kbd "C-x C-e") #'cider-eval-last-sexp)
|
||||
(define-key map (kbd "C-c C-e") #'cider-eval-last-sexp)
|
||||
(define-key map (kbd "C-c C-p") #'cider-pprint-eval-last-sexp)
|
||||
(define-key map (kbd "C-c C-f") #'cider-pprint-eval-defun-at-point)
|
||||
(define-key map (kbd "C-c C-v") 'cider-eval-commands-map)
|
||||
(define-key map (kbd "C-c C-j") 'cider-insert-commands-map)
|
||||
(define-key map (kbd "C-c M-;") #'cider-eval-defun-to-comment)
|
||||
(define-key map (kbd "C-c M-e") #'cider-eval-last-sexp-to-repl)
|
||||
(define-key map (kbd "C-c M-p") #'cider-insert-last-sexp-in-repl)
|
||||
(define-key map (kbd "C-c C-p") #'cider-pprint-eval-last-sexp)
|
||||
(define-key map (kbd "C-c C-f") #'cider-pprint-eval-defun-at-point)
|
||||
(define-key map (kbd "C-c M-:") #'cider-read-and-eval)
|
||||
(define-key map (kbd "C-c C-u") #'cider-undef)
|
||||
(define-key map (kbd "C-c C-m") #'cider-macroexpand-1)
|
||||
|
@ -479,7 +495,7 @@ If invoked with a prefix ARG eval the expression after inserting it."
|
|||
(define-key map (kbd "C-c ,") 'cider-test-commands-map)
|
||||
(define-key map (kbd "C-c C-t") 'cider-test-commands-map)
|
||||
(define-key map (kbd "C-c M-s") #'cider-selector)
|
||||
(define-key map (kbd "C-c M-d") #'cider-describe-current-connection)
|
||||
(define-key map (kbd "C-c M-d") #'cider-describe-connection)
|
||||
(define-key map (kbd "C-c C-=") 'cider-profile-map)
|
||||
(define-key map (kbd "C-c C-q") #'cider-quit)
|
||||
(define-key map (kbd "C-c M-r") #'cider-restart)
|
||||
|
@ -527,7 +543,8 @@ re-visited."
|
|||
|
||||
(defun cider--get-symbol-indent (symbol-name)
|
||||
"Return the indent metadata for SYMBOL-NAME in the current namespace."
|
||||
(let* ((ns (cider-current-ns)))
|
||||
(let* ((ns (let ((clojure-cache-ns t)) ; we force ns caching here for performance reasons
|
||||
(cider-current-ns))))
|
||||
(if-let* ((meta (cider-resolve-var ns symbol-name))
|
||||
(indent (or (nrepl-dict-get meta "style/indent")
|
||||
(nrepl-dict-get meta "indent"))))
|
Binary file not shown.
|
@ -22,8 +22,38 @@
|
|||
|
||||
;;; Commentary:
|
||||
|
||||
;; Smart code refresh functionality based on ideas
|
||||
;; fromhttp://thinkrelevance.com/blog/2013/06/04/clojure-workflow-reloaded
|
||||
;; Smart code refresh functionality based on ideas from:
|
||||
;; http://thinkrelevance.com/blog/2013/06/04/clojure-workflow-reloaded
|
||||
;;
|
||||
;; Note that refresh with clojure.tools.namespace.repl is a smarter way to
|
||||
;; reload code: the traditional way to reload Clojure code without restarting
|
||||
;; the JVM is (require ... :reload) or an editor/IDE feature that does the same
|
||||
;; thing.
|
||||
;;
|
||||
;; This has several problems:
|
||||
;;
|
||||
;; If you modify two namespaces which depend on each other, you must remember to
|
||||
;; reload them in the correct order to avoid compilation errors.
|
||||
;;
|
||||
;; If you remove definitions from a source file and then reload it, those
|
||||
;; definitions are still available in memory. If other code depends on those
|
||||
;; definitions, it will continue to work but will break the next time you
|
||||
;; restart the JVM.
|
||||
;;
|
||||
;; If the reloaded namespace contains defmulti, you must also reload all of the
|
||||
;; associated defmethod expressions.
|
||||
;;
|
||||
;; If the reloaded namespace contains defprotocol, you must also reload any
|
||||
;; records or types implementing that protocol and replace any existing
|
||||
;; instances of those records/types with new instances.
|
||||
;;
|
||||
;; If the reloaded namespace contains macros, you must also reload any
|
||||
;; namespaces which use those macros.
|
||||
;;
|
||||
;; If the running program contains functions which close over values in the
|
||||
;; reloaded namespace, those closed-over values are not updated (This is common
|
||||
;; in web applications which construct the "handler stack" as a composition of
|
||||
;; functions.)
|
||||
|
||||
;;; Code:
|
||||
|
||||
|
@ -33,6 +63,7 @@
|
|||
(require 'cider-popup)
|
||||
(require 'cider-stacktrace)
|
||||
|
||||
(define-obsolete-variable-alias 'cider-save-files-on-cider-ns-refresh 'cider-ns-save-files-on-refresh "0.18")
|
||||
(defcustom cider-ns-save-files-on-refresh 'prompt
|
||||
"Controls whether to prompt to save Clojure files on `cider-ns-refresh'.
|
||||
If nil, files are not saved.
|
||||
|
@ -44,10 +75,9 @@ If t, save the files without confirmation."
|
|||
:group 'cider
|
||||
:package-version '(cider . "0.15.0"))
|
||||
|
||||
(define-obsolete-variable-alias 'cider-save-files-on-cider-ns-refresh 'cider-ns-save-files-on-refresh "0.18")
|
||||
|
||||
(defconst cider-ns-refresh-log-buffer "*cider-ns-refresh-log*")
|
||||
|
||||
(define-obsolete-variable-alias 'cider-refresh-show-log-buffer 'cider-ns-refresh-show-log-buffer "0.18")
|
||||
(defcustom cider-ns-refresh-show-log-buffer nil
|
||||
"Controls when to display the refresh log buffer.
|
||||
If non-nil, the log buffer will be displayed every time `cider-ns-refresh' is
|
||||
|
@ -59,8 +89,7 @@ displayed in the echo area."
|
|||
:group 'cider
|
||||
:package-version '(cider . "0.10.0"))
|
||||
|
||||
(define-obsolete-variable-alias 'cider-refresh-show-log-buffer 'cider-ns-refresh-show-log-buffer "0.18")
|
||||
|
||||
(define-obsolete-variable-alias 'cider-refresh-before-fn 'cider-ns-refresh-before-fn "0.18")
|
||||
(defcustom cider-ns-refresh-before-fn nil
|
||||
"Clojure function for `cider-ns-refresh' to call before reloading.
|
||||
If nil, nothing will be invoked before reloading. Must be a
|
||||
|
@ -70,8 +99,7 @@ prevent reloading from occurring."
|
|||
:group 'cider
|
||||
:package-version '(cider . "0.10.0"))
|
||||
|
||||
(define-obsolete-variable-alias 'cider-refresh-before-fn 'cider-ns-refresh-before-fn "0.18")
|
||||
|
||||
(define-obsolete-variable-alias 'cider-refresh-after-fn 'cider-ns-refresh-after-fn "0.18")
|
||||
(defcustom cider-ns-refresh-after-fn nil
|
||||
"Clojure function for `cider-ns-refresh' to call after reloading.
|
||||
If nil, nothing will be invoked after reloading. Must be a
|
||||
|
@ -80,8 +108,6 @@ namespace-qualified function of zero arity."
|
|||
:group 'cider
|
||||
:package-version '(cider . "0.10.0"))
|
||||
|
||||
(define-obsolete-variable-alias 'cider-refresh-after-fn 'cider-ns-refresh-after-fn "0.18")
|
||||
|
||||
(defun cider-ns-refresh--handle-response (response log-buffer)
|
||||
"Refresh LOG-BUFFER with RESPONSE."
|
||||
(nrepl-dbind-response response (out err reloading status error error-ns after before)
|
||||
|
@ -149,6 +175,37 @@ Its behavior is controlled by `cider-save-files-on-cider-ns-refresh'."
|
|||
(file-truename default-directory)
|
||||
(eq system-type 'windows-nt))))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun cider-ns-reload (&optional prompt)
|
||||
"Send a (require 'ns :reload) to the REPL.
|
||||
|
||||
With an argument PROMPT, it prompts for a namespace name. This is the
|
||||
Clojure out of the box reloading experience and does not rely on
|
||||
org.clojure/tools.namespace. See Commentary of this file for a longer list
|
||||
of differences. From the Clojure doc: \":reload forces loading of all the
|
||||
identified libs even if they are already loaded\"."
|
||||
(interactive "P")
|
||||
(let ((ns (if prompt
|
||||
(string-remove-prefix "'" (read-from-minibuffer "Namespace: " (clojure-find-ns)))
|
||||
(clojure-find-ns))))
|
||||
(cider-interactive-eval (format "(require '%s :reload)" ns))))
|
||||
|
||||
;;;###autoload
|
||||
(defun cider-ns-reload-all (&optional prompt)
|
||||
"Send a (require 'ns :reload-all) to the REPL.
|
||||
|
||||
With an argument PROMPT, it prompts for a namespace name. This is the
|
||||
Clojure out of the box reloading experience and does not rely on
|
||||
org.clojure/tools.namespace. See Commentary of this file for a longer list
|
||||
of differences. From the Clojure doc: \":reload-all implies :reload and
|
||||
also forces loading of all libs that the identified libs directly or
|
||||
indirectly load via require\"."
|
||||
(interactive "P")
|
||||
(let ((ns (if prompt
|
||||
(string-remove-prefix "'" (read-from-minibuffer "Namespace: " (clojure-find-ns)))
|
||||
(clojure-find-ns))))
|
||||
(cider-interactive-eval (format "(require '%s :reload-all)" ns))))
|
||||
|
||||
;;;###autoload
|
||||
(defun cider-ns-refresh (&optional mode)
|
||||
"Reload modified and unloaded namespaces on the classpath.
|
||||
|
@ -201,6 +258,7 @@ refresh functions (defined in `cider-ns-refresh-before-fn' and
|
|||
(cider-ns-refresh--handle-response response log-buffer))
|
||||
conn))))))
|
||||
|
||||
;;;###autoload
|
||||
(define-obsolete-function-alias 'cider-refresh 'cider-ns-refresh "0.18")
|
||||
|
||||
(provide 'cider-ns)
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue