From a7c9c819705297e7cd9344031e06b74a46b8cb5b Mon Sep 17 00:00:00 2001 From: Mathias De Wachter Date: Sat, 9 Aug 2014 18:23:18 +0200 Subject: [PATCH] added lots of files --- elpa/archives/melpa-stable/archive-contents | 2 + .../auto-complete-autoloads.el | 66 + .../auto-complete-config.el | 521 ++ .../auto-complete-config.elc | Bin 0 -> 16119 bytes .../auto-complete-pkg.el | 2 + .../auto-complete-pkg.elc | Bin 0 -> 647 bytes .../auto-complete.el | 2101 +++++ .../auto-complete.elc | Bin 0 -> 63173 bytes .../auto-complete-20140803.2118/dict/ada-mode | 72 + .../auto-complete-20140803.2118/dict/c++-mode | 84 + elpa/auto-complete-20140803.2118/dict/c-mode | 44 + .../dict/caml-mode | 231 + .../dict/clojure-mode | 580 ++ .../dict/clojurescript-mode | 475 + .../auto-complete-20140803.2118/dict/coq-mode | 278 + .../auto-complete-20140803.2118/dict/css-mode | 874 ++ .../dict/erlang-mode | 216 + elpa/auto-complete-20140803.2118/dict/go-mode | 25 + .../dict/haskell-mode | 679 ++ .../dict/java-mode | 53 + .../dict/javascript-mode | 148 + .../auto-complete-20140803.2118/dict/lua-mode | 21 + .../auto-complete-20140803.2118/dict/php-mode | 6144 +++++++++++++ .../dict/python-mode | 378 + .../auto-complete-20140803.2118/dict/qml-mode | 183 + .../dict/ruby-mode | 181 + .../dict/scheme-mode | 216 + .../dict/sclang-mode | 1481 ++++ elpa/auto-complete-20140803.2118/dict/sh-mode | 182 + .../auto-complete-20140803.2118/dict/tcl-mode | 172 + elpa/auto-complete-20140803.2118/dict/ts-mode | 797 ++ .../dict/tuareg-mode | 231 + .../dict/verilog-mode | 313 + elpa/cider-0.7.0/cider-autoloads.el | 128 + elpa/cider-0.7.0/cider-client.el | 235 + elpa/cider-0.7.0/cider-client.elc | Bin 0 -> 8801 bytes elpa/cider-0.7.0/cider-doc.el | 377 + elpa/cider-0.7.0/cider-doc.elc | Bin 0 -> 12126 bytes elpa/cider-0.7.0/cider-eldoc.el | 134 + elpa/cider-0.7.0/cider-eldoc.elc | Bin 0 -> 3760 bytes elpa/cider-0.7.0/cider-inspector.el | 235 + elpa/cider-0.7.0/cider-inspector.elc | Bin 0 -> 9000 bytes elpa/cider-0.7.0/cider-interaction.el | 1697 ++++ elpa/cider-0.7.0/cider-interaction.elc | Bin 0 -> 62687 bytes elpa/cider-0.7.0/cider-macroexpansion.el | 191 + elpa/cider-0.7.0/cider-macroexpansion.elc | Bin 0 -> 7616 bytes elpa/cider-0.7.0/cider-mode.el | 154 + elpa/cider-0.7.0/cider-mode.elc | Bin 0 -> 5801 bytes elpa/cider-0.7.0/cider-pkg.el | 8 + elpa/cider-0.7.0/cider-pkg.elc | Bin 0 -> 788 bytes elpa/cider-0.7.0/cider-repl.el | 1082 +++ elpa/cider-0.7.0/cider-repl.elc | Bin 0 -> 40424 bytes elpa/cider-0.7.0/cider-scratch.el | 71 + elpa/cider-0.7.0/cider-scratch.elc | Bin 0 -> 4530 bytes elpa/cider-0.7.0/cider-selector.el | 160 + elpa/cider-0.7.0/cider-selector.elc | Bin 0 -> 7660 bytes elpa/cider-0.7.0/cider-stacktrace.el | 542 ++ elpa/cider-0.7.0/cider-stacktrace.elc | Bin 0 -> 20227 bytes elpa/cider-0.7.0/cider-test.el | 449 + elpa/cider-0.7.0/cider-test.elc | Bin 0 -> 15593 bytes elpa/cider-0.7.0/cider-util.el | 194 + elpa/cider-0.7.0/cider-util.elc | Bin 0 -> 6353 bytes elpa/cider-0.7.0/cider.el | 192 + elpa/cider-0.7.0/cider.elc | Bin 0 -> 5173 bytes elpa/cider-0.7.0/nrepl-client.el | 993 +++ elpa/cider-0.7.0/nrepl-client.elc | Bin 0 -> 38220 bytes elpa/cl-lib-0.5/cl-lib-autoloads.el | 25 + elpa/cl-lib-0.5/cl-lib-pkg.el | 1 + elpa/cl-lib-0.5/cl-lib-pkg.elc | Bin 0 -> 603 bytes elpa/cl-lib-0.5/cl-lib.el | 410 + elpa/cl-lib-0.5/cl-lib.elc | Bin 0 -> 4540 bytes .../clojure-cheatsheet-autoloads.el | 29 + .../clojure-cheatsheet-pkg.el | 1 + .../clojure-cheatsheet-pkg.elc | Bin 0 -> 680 bytes .../clojure-cheatsheet.el | 602 ++ .../clojure-cheatsheet.elc | Bin 0 -> 18991 bytes .../clojure-mode-autoloads.el | 33 + .../clojure-mode-pkg.el | 1 + .../clojure-mode-pkg.elc | Bin 0 -> 625 bytes .../clojure-mode-20140804.823/clojure-mode.el | 1093 +++ .../clojure-mode.elc | Bin 0 -> 31152 bytes .../clojurescript-mode-autoloads.el | 31 + .../clojurescript-mode-pkg.el | 1 + .../clojurescript-mode-pkg.elc | Bin 0 -> 631 bytes .../clojurescript-mode.el | 79 + .../clojurescript-mode.elc | Bin 0 -> 4210 bytes elpa/dash-20140717.547/dash-autoloads.el | 18 + elpa/dash-20140717.547/dash-pkg.el | 1 + elpa/dash-20140717.547/dash-pkg.elc | Bin 0 -> 605 bytes elpa/dash-20140717.547/dash.el | 1783 ++++ elpa/dash-20140717.547/dash.elc | Bin 0 -> 59273 bytes .../elisp-slime-nav-autoloads.el | 58 + .../elisp-slime-nav-pkg.el | 1 + .../elisp-slime-nav-pkg.elc | Bin 0 -> 673 bytes .../elisp-slime-nav.el | 116 + .../elisp-slime-nav.elc | Bin 0 -> 4084 bytes elpa/epl-20140620.218/epl-autoloads.el | 18 + elpa/epl-20140620.218/epl-pkg.el | 1 + elpa/epl-20140620.218/epl-pkg.elc | Bin 0 -> 606 bytes elpa/epl-20140620.218/epl.el | 566 ++ elpa/epl-20140620.218/epl.elc | Bin 0 -> 27774 bytes .../find-file-in-project-autoloads.el | 47 + .../find-file-in-project-pkg.el | 1 + .../find-file-in-project-pkg.elc | Bin 0 -> 656 bytes .../find-file-in-project.el | 184 + .../find-file-in-project.elc | Bin 0 -> 4646 bytes .../git-commit-mode-autoloads.el | 35 + .../git-commit-mode-pkg.el | 1 + .../git-commit-mode-pkg.elc | Bin 0 -> 649 bytes .../git-commit-mode.el | 662 ++ .../git-commit-mode.elc | Bin 0 -> 25034 bytes .../git-rebase-mode-autoloads.el | 36 + .../git-rebase-mode-pkg.el | 1 + .../git-rebase-mode-pkg.elc | Bin 0 -> 646 bytes .../git-rebase-mode.el | 378 + .../git-rebase-mode.elc | Bin 0 -> 13641 bytes elpa/helm-20140808.2300/emacs-helm.sh | 78 + elpa/helm-20140808.2300/helm-adaptive.el | 243 + elpa/helm-20140808.2300/helm-adaptive.elc | Bin 0 -> 7248 bytes elpa/helm-20140808.2300/helm-aliases.el | 921 ++ elpa/helm-20140808.2300/helm-aliases.elc | Bin 0 -> 48474 bytes elpa/helm-20140808.2300/helm-apt.el | 272 + elpa/helm-20140808.2300/helm-apt.elc | Bin 0 -> 10948 bytes elpa/helm-20140808.2300/helm-autoloads.el | 1379 +++ elpa/helm-20140808.2300/helm-bbdb.el | 185 + elpa/helm-20140808.2300/helm-bbdb.elc | Bin 0 -> 5083 bytes elpa/helm-20140808.2300/helm-bookmark.el | 799 ++ elpa/helm-20140808.2300/helm-bookmark.elc | Bin 0 -> 24859 bytes elpa/helm-20140808.2300/helm-buffers.el | 784 ++ elpa/helm-20140808.2300/helm-buffers.elc | Bin 0 -> 26216 bytes elpa/helm-20140808.2300/helm-call-tree.el | 128 + elpa/helm-20140808.2300/helm-call-tree.elc | Bin 0 -> 4038 bytes elpa/helm-20140808.2300/helm-color.el | 163 + elpa/helm-20140808.2300/helm-color.elc | Bin 0 -> 5667 bytes elpa/helm-20140808.2300/helm-command.el | 200 + elpa/helm-20140808.2300/helm-command.elc | Bin 0 -> 6070 bytes elpa/helm-20140808.2300/helm-config.el | 1557 ++++ elpa/helm-20140808.2300/helm-config.elc | Bin 0 -> 40956 bytes elpa/helm-20140808.2300/helm-dabbrev.el | 311 + elpa/helm-20140808.2300/helm-dabbrev.elc | Bin 0 -> 13855 bytes elpa/helm-20140808.2300/helm-elisp-package.el | 170 + .../helm-20140808.2300/helm-elisp-package.elc | Bin 0 -> 5273 bytes elpa/helm-20140808.2300/helm-elisp.el | 752 ++ elpa/helm-20140808.2300/helm-elisp.elc | Bin 0 -> 24441 bytes elpa/helm-20140808.2300/helm-elscreen.el | 79 + elpa/helm-20140808.2300/helm-elscreen.elc | Bin 0 -> 2059 bytes elpa/helm-20140808.2300/helm-emms.el | 186 + elpa/helm-20140808.2300/helm-emms.elc | Bin 0 -> 5425 bytes elpa/helm-20140808.2300/helm-eshell.el | 236 + elpa/helm-20140808.2300/helm-eshell.elc | Bin 0 -> 7080 bytes elpa/helm-20140808.2300/helm-eval.el | 177 + elpa/helm-20140808.2300/helm-eval.elc | Bin 0 -> 5791 bytes elpa/helm-20140808.2300/helm-external.el | 215 + elpa/helm-20140808.2300/helm-external.elc | Bin 0 -> 6927 bytes elpa/helm-20140808.2300/helm-files.el | 2882 ++++++ elpa/helm-20140808.2300/helm-files.elc | Bin 0 -> 100550 bytes elpa/helm-20140808.2300/helm-firefox.el | 124 + elpa/helm-20140808.2300/helm-firefox.elc | Bin 0 -> 3433 bytes elpa/helm-20140808.2300/helm-font.el | 177 + elpa/helm-20140808.2300/helm-font.elc | Bin 0 -> 5212 bytes elpa/helm-20140808.2300/helm-gentoo.el | 258 + elpa/helm-20140808.2300/helm-gentoo.elc | Bin 0 -> 8833 bytes elpa/helm-20140808.2300/helm-grep.el | 1196 +++ elpa/helm-20140808.2300/helm-grep.elc | Bin 0 -> 39378 bytes elpa/helm-20140808.2300/helm-help.el | 1487 ++++ elpa/helm-20140808.2300/helm-help.elc | Bin 0 -> 51558 bytes elpa/helm-20140808.2300/helm-imenu.el | 170 + elpa/helm-20140808.2300/helm-imenu.elc | Bin 0 -> 4621 bytes elpa/helm-20140808.2300/helm-info.el | 144 + elpa/helm-20140808.2300/helm-info.elc | Bin 0 -> 4380 bytes elpa/helm-20140808.2300/helm-locate.el | 325 + elpa/helm-20140808.2300/helm-locate.elc | Bin 0 -> 10350 bytes elpa/helm-20140808.2300/helm-man.el | 102 + elpa/helm-20140808.2300/helm-man.elc | Bin 0 -> 2839 bytes elpa/helm-20140808.2300/helm-match-plugin.el | 437 + elpa/helm-20140808.2300/helm-match-plugin.elc | Bin 0 -> 14652 bytes elpa/helm-20140808.2300/helm-misc.el | 402 + elpa/helm-20140808.2300/helm-misc.elc | Bin 0 -> 11948 bytes elpa/helm-20140808.2300/helm-mode.el | 1042 +++ elpa/helm-20140808.2300/helm-mode.elc | Bin 0 -> 30662 bytes elpa/helm-20140808.2300/helm-net.el | 607 ++ elpa/helm-20140808.2300/helm-net.elc | Bin 0 -> 19534 bytes elpa/helm-20140808.2300/helm-org.el | 185 + elpa/helm-20140808.2300/helm-org.elc | Bin 0 -> 5847 bytes elpa/helm-20140808.2300/helm-pkg.el | 1 + elpa/helm-20140808.2300/helm-pkg.elc | Bin 0 -> 628 bytes elpa/helm-20140808.2300/helm-plugin.el | 342 + elpa/helm-20140808.2300/helm-plugin.elc | Bin 0 -> 10526 bytes elpa/helm-20140808.2300/helm-regexp.el | 621 ++ elpa/helm-20140808.2300/helm-regexp.elc | Bin 0 -> 23134 bytes elpa/helm-20140808.2300/helm-ring.el | 378 + elpa/helm-20140808.2300/helm-ring.elc | Bin 0 -> 10567 bytes elpa/helm-20140808.2300/helm-semantic.el | 156 + elpa/helm-20140808.2300/helm-semantic.elc | Bin 0 -> 4260 bytes elpa/helm-20140808.2300/helm-sys.el | 295 + elpa/helm-20140808.2300/helm-sys.elc | Bin 0 -> 8947 bytes elpa/helm-20140808.2300/helm-tags.el | 339 + elpa/helm-20140808.2300/helm-tags.elc | Bin 0 -> 11043 bytes elpa/helm-20140808.2300/helm-utils.el | 948 ++ elpa/helm-20140808.2300/helm-utils.elc | Bin 0 -> 33686 bytes elpa/helm-20140808.2300/helm-w3m.el | 149 + elpa/helm-20140808.2300/helm-w3m.elc | Bin 0 -> 3894 bytes elpa/helm-20140808.2300/helm-yaoddmuse.el | 171 + elpa/helm-20140808.2300/helm-yaoddmuse.elc | Bin 0 -> 4717 bytes elpa/helm-20140808.2300/helm.el | 4695 ++++++++++ elpa/helm-20140808.2300/helm.elc | Bin 0 -> 167738 bytes .../highlight-indentation-autoloads.el | 44 + .../highlight-indentation-pkg.el | 1 + .../highlight-indentation-pkg.elc | Bin 0 -> 665 bytes .../highlight-indentation.el | 156 + .../highlight-indentation.elc | Bin 0 -> 6370 bytes .../idle-highlight-mode-autoloads.el | 29 + .../idle-highlight-mode-pkg.el | 1 + .../idle-highlight-mode-pkg.elc | Bin 0 -> 653 bytes .../idle-highlight-mode.el | 115 + .../idle-highlight-mode.elc | Bin 0 -> 3270 bytes .../ido-ubiquitous-autoloads.el | 49 + .../ido-ubiquitous-pkg.el | 1 + .../ido-ubiquitous-pkg.elc | Bin 0 -> 648 bytes .../ido-ubiquitous.el | 868 ++ .../ido-ubiquitous.elc | Bin 0 -> 29123 bytes .../inf-ruby-autoloads.el | 103 + elpa/inf-ruby-20140809.416/inf-ruby-pkg.el | 1 + elpa/inf-ruby-20140809.416/inf-ruby-pkg.elc | Bin 0 -> 616 bytes elpa/inf-ruby-20140809.416/inf-ruby.el | 721 ++ elpa/inf-ruby-20140809.416/inf-ruby.elc | Bin 0 -> 23267 bytes elpa/magit-20140807.909/AUTHORS.md | 174 + elpa/magit-20140807.909/README.md | 325 + elpa/magit-20140807.909/dir | 18 + elpa/magit-20140807.909/magit-autoloads.el | 601 ++ elpa/magit-20140807.909/magit-blame.el | 307 + elpa/magit-20140807.909/magit-blame.elc | Bin 0 -> 8408 bytes elpa/magit-20140807.909/magit-key-mode.el | 735 ++ elpa/magit-20140807.909/magit-key-mode.elc | Bin 0 -> 22159 bytes elpa/magit-20140807.909/magit-pkg.el | 6 + elpa/magit-20140807.909/magit-pkg.elc | Bin 0 -> 693 bytes elpa/magit-20140807.909/magit-wip.el | 142 + elpa/magit-20140807.909/magit-wip.elc | Bin 0 -> 7709 bytes elpa/magit-20140807.909/magit.el | 7854 +++++++++++++++++ elpa/magit-20140807.909/magit.elc | Bin 0 -> 440287 bytes elpa/magit-20140807.909/magit.info | 1565 ++++ .../paredit-autoloads.el | 40 + elpa/paredit-20140128.1248/paredit-pkg.el | 1 + elpa/paredit-20140128.1248/paredit-pkg.elc | Bin 0 -> 619 bytes elpa/paredit-20140128.1248/paredit.el | 2919 ++++++ elpa/paredit-20140128.1248/paredit.elc | Bin 0 -> 82118 bytes .../pkg-info-autoloads.el | 131 + elpa/pkg-info-20140610.630/pkg-info-pkg.el | 1 + elpa/pkg-info-20140610.630/pkg-info-pkg.elc | Bin 0 -> 623 bytes elpa/pkg-info-20140610.630/pkg-info.el | 279 + elpa/pkg-info-20140610.630/pkg-info.elc | Bin 0 -> 8762 bytes elpa/popup-20140207.1702/popup-autoloads.el | 18 + elpa/popup-20140207.1702/popup-pkg.el | 1 + elpa/popup-20140207.1702/popup-pkg.elc | Bin 0 -> 620 bytes elpa/popup-20140207.1702/popup.el | 1411 +++ elpa/popup-20140207.1702/popup.elc | Bin 0 -> 73625 bytes .../projectile-autoloads.el | 85 + .../projectile-20140808.941/projectile-pkg.el | 1 + .../projectile-pkg.elc | Bin 0 -> 679 bytes elpa/projectile-20140808.941/projectile.el | 2255 +++++ elpa/projectile-20140808.941/projectile.elc | Bin 0 -> 92679 bytes .../rainbow-delimiters-autoloads.el | 56 + .../rainbow-delimiters-pkg.el | 1 + .../rainbow-delimiters-pkg.elc | Bin 0 -> 678 bytes .../rainbow-delimiters.el | 475 + .../rainbow-delimiters.elc | Bin 0 -> 18304 bytes .../rainbow-delimiters-autoloads.el | 61 + .../rainbow-delimiters-pkg.el | 1 + .../rainbow-delimiters-pkg.elc | Bin 0 -> 692 bytes .../rainbow-delimiters.el | 662 ++ .../rainbow-delimiters.elc | Bin 0 -> 25747 bytes elpa/s-20140714.707/s-autoloads.el | 18 + elpa/s-20140714.707/s-pkg.el | 1 + elpa/s-20140714.707/s-pkg.elc | Bin 0 -> 613 bytes elpa/s-20140714.707/s.el | 597 ++ elpa/s-20140714.707/s.elc | Bin 0 -> 18363 bytes elpa/smex-20140425.1314/smex-autoloads.el | 38 + elpa/smex-20140425.1314/smex-pkg.el | 1 + elpa/smex-20140425.1314/smex-pkg.elc | Bin 0 -> 632 bytes elpa/smex-20140425.1314/smex.el | 459 + elpa/smex-20140425.1314/smex.elc | Bin 0 -> 12936 bytes .../starter-kit-autoloads.el | 43 + .../starter-kit-defuns.el | 166 + .../starter-kit-defuns.elc | Bin 0 -> 4696 bytes .../starter-kit-misc.el | 160 + .../starter-kit-misc.elc | Bin 0 -> 3660 bytes .../starter-kit-pkg.el | 7 + .../starter-kit-pkg.elc | Bin 0 -> 751 bytes elpa/starter-kit-20130904.1547/starter-kit.el | 75 + .../starter-kit-20130904.1547/starter-kit.elc | Bin 0 -> 1637 bytes .../starter-kit-bindings-autoloads.el | 84 + .../starter-kit-bindings-pkg.el | 1 + .../starter-kit-bindings-pkg.elc | Bin 0 -> 681 bytes .../starter-kit-bindings.el | 124 + .../starter-kit-bindings.elc | Bin 0 -> 2366 bytes .../starter-kit-lisp-autoloads.el | 54 + .../starter-kit-lisp-pkg.el | 1 + .../starter-kit-lisp-pkg.elc | Bin 0 -> 702 bytes .../starter-kit-lisp.el | 98 + .../starter-kit-lisp.elc | Bin 0 -> 2399 bytes .../starter-kit-ruby-autoloads.el | 65 + .../starter-kit-ruby-pkg.el | 1 + .../starter-kit-ruby-pkg.elc | Bin 0 -> 687 bytes .../starter-kit-ruby.el | 105 + .../starter-kit-ruby.elc | Bin 0 -> 2824 bytes 305 files changed, 80585 insertions(+) create mode 100644 elpa/archives/melpa-stable/archive-contents create mode 100644 elpa/auto-complete-20140803.2118/auto-complete-autoloads.el create mode 100644 elpa/auto-complete-20140803.2118/auto-complete-config.el create mode 100644 elpa/auto-complete-20140803.2118/auto-complete-config.elc create mode 100644 elpa/auto-complete-20140803.2118/auto-complete-pkg.el create mode 100644 elpa/auto-complete-20140803.2118/auto-complete-pkg.elc create mode 100644 elpa/auto-complete-20140803.2118/auto-complete.el create mode 100644 elpa/auto-complete-20140803.2118/auto-complete.elc create mode 100644 elpa/auto-complete-20140803.2118/dict/ada-mode create mode 100644 elpa/auto-complete-20140803.2118/dict/c++-mode create mode 100644 elpa/auto-complete-20140803.2118/dict/c-mode create mode 100644 elpa/auto-complete-20140803.2118/dict/caml-mode create mode 100644 elpa/auto-complete-20140803.2118/dict/clojure-mode create mode 100644 elpa/auto-complete-20140803.2118/dict/clojurescript-mode create mode 100644 elpa/auto-complete-20140803.2118/dict/coq-mode create mode 100644 elpa/auto-complete-20140803.2118/dict/css-mode create mode 100644 elpa/auto-complete-20140803.2118/dict/erlang-mode create mode 100644 elpa/auto-complete-20140803.2118/dict/go-mode create mode 100644 elpa/auto-complete-20140803.2118/dict/haskell-mode create mode 100644 elpa/auto-complete-20140803.2118/dict/java-mode create mode 100644 elpa/auto-complete-20140803.2118/dict/javascript-mode create mode 100644 elpa/auto-complete-20140803.2118/dict/lua-mode create mode 100644 elpa/auto-complete-20140803.2118/dict/php-mode create mode 100644 elpa/auto-complete-20140803.2118/dict/python-mode create mode 100644 elpa/auto-complete-20140803.2118/dict/qml-mode create mode 100644 elpa/auto-complete-20140803.2118/dict/ruby-mode create mode 100644 elpa/auto-complete-20140803.2118/dict/scheme-mode create mode 100644 elpa/auto-complete-20140803.2118/dict/sclang-mode create mode 100644 elpa/auto-complete-20140803.2118/dict/sh-mode create mode 100644 elpa/auto-complete-20140803.2118/dict/tcl-mode create mode 100644 elpa/auto-complete-20140803.2118/dict/ts-mode create mode 100644 elpa/auto-complete-20140803.2118/dict/tuareg-mode create mode 100644 elpa/auto-complete-20140803.2118/dict/verilog-mode create mode 100644 elpa/cider-0.7.0/cider-autoloads.el create mode 100644 elpa/cider-0.7.0/cider-client.el create mode 100644 elpa/cider-0.7.0/cider-client.elc create mode 100644 elpa/cider-0.7.0/cider-doc.el create mode 100644 elpa/cider-0.7.0/cider-doc.elc create mode 100644 elpa/cider-0.7.0/cider-eldoc.el create mode 100644 elpa/cider-0.7.0/cider-eldoc.elc create mode 100644 elpa/cider-0.7.0/cider-inspector.el create mode 100644 elpa/cider-0.7.0/cider-inspector.elc create mode 100644 elpa/cider-0.7.0/cider-interaction.el create mode 100644 elpa/cider-0.7.0/cider-interaction.elc create mode 100644 elpa/cider-0.7.0/cider-macroexpansion.el create mode 100644 elpa/cider-0.7.0/cider-macroexpansion.elc create mode 100644 elpa/cider-0.7.0/cider-mode.el create mode 100644 elpa/cider-0.7.0/cider-mode.elc create mode 100644 elpa/cider-0.7.0/cider-pkg.el create mode 100644 elpa/cider-0.7.0/cider-pkg.elc create mode 100644 elpa/cider-0.7.0/cider-repl.el create mode 100644 elpa/cider-0.7.0/cider-repl.elc create mode 100644 elpa/cider-0.7.0/cider-scratch.el create mode 100644 elpa/cider-0.7.0/cider-scratch.elc create mode 100644 elpa/cider-0.7.0/cider-selector.el create mode 100644 elpa/cider-0.7.0/cider-selector.elc create mode 100644 elpa/cider-0.7.0/cider-stacktrace.el create mode 100644 elpa/cider-0.7.0/cider-stacktrace.elc create mode 100644 elpa/cider-0.7.0/cider-test.el create mode 100644 elpa/cider-0.7.0/cider-test.elc create mode 100644 elpa/cider-0.7.0/cider-util.el create mode 100644 elpa/cider-0.7.0/cider-util.elc create mode 100644 elpa/cider-0.7.0/cider.el create mode 100644 elpa/cider-0.7.0/cider.elc create mode 100644 elpa/cider-0.7.0/nrepl-client.el create mode 100644 elpa/cider-0.7.0/nrepl-client.elc create mode 100644 elpa/cl-lib-0.5/cl-lib-autoloads.el create mode 100644 elpa/cl-lib-0.5/cl-lib-pkg.el create mode 100644 elpa/cl-lib-0.5/cl-lib-pkg.elc create mode 100644 elpa/cl-lib-0.5/cl-lib.el create mode 100644 elpa/cl-lib-0.5/cl-lib.elc create mode 100644 elpa/clojure-cheatsheet-20140316.1520/clojure-cheatsheet-autoloads.el create mode 100644 elpa/clojure-cheatsheet-20140316.1520/clojure-cheatsheet-pkg.el create mode 100644 elpa/clojure-cheatsheet-20140316.1520/clojure-cheatsheet-pkg.elc create mode 100644 elpa/clojure-cheatsheet-20140316.1520/clojure-cheatsheet.el create mode 100644 elpa/clojure-cheatsheet-20140316.1520/clojure-cheatsheet.elc create mode 100644 elpa/clojure-mode-20140804.823/clojure-mode-autoloads.el create mode 100644 elpa/clojure-mode-20140804.823/clojure-mode-pkg.el create mode 100644 elpa/clojure-mode-20140804.823/clojure-mode-pkg.elc create mode 100644 elpa/clojure-mode-20140804.823/clojure-mode.el create mode 100644 elpa/clojure-mode-20140804.823/clojure-mode.elc create mode 100644 elpa/clojurescript-mode-0.5/clojurescript-mode-autoloads.el create mode 100644 elpa/clojurescript-mode-0.5/clojurescript-mode-pkg.el create mode 100644 elpa/clojurescript-mode-0.5/clojurescript-mode-pkg.elc create mode 100644 elpa/clojurescript-mode-0.5/clojurescript-mode.el create mode 100644 elpa/clojurescript-mode-0.5/clojurescript-mode.elc create mode 100644 elpa/dash-20140717.547/dash-autoloads.el create mode 100644 elpa/dash-20140717.547/dash-pkg.el create mode 100644 elpa/dash-20140717.547/dash-pkg.elc create mode 100644 elpa/dash-20140717.547/dash.el create mode 100644 elpa/dash-20140717.547/dash.elc create mode 100644 elpa/elisp-slime-nav-20140619.254/elisp-slime-nav-autoloads.el create mode 100644 elpa/elisp-slime-nav-20140619.254/elisp-slime-nav-pkg.el create mode 100644 elpa/elisp-slime-nav-20140619.254/elisp-slime-nav-pkg.elc create mode 100644 elpa/elisp-slime-nav-20140619.254/elisp-slime-nav.el create mode 100644 elpa/elisp-slime-nav-20140619.254/elisp-slime-nav.elc create mode 100644 elpa/epl-20140620.218/epl-autoloads.el create mode 100644 elpa/epl-20140620.218/epl-pkg.el create mode 100644 elpa/epl-20140620.218/epl-pkg.elc create mode 100644 elpa/epl-20140620.218/epl.el create mode 100644 elpa/epl-20140620.218/epl.elc create mode 100644 elpa/find-file-in-project-20140603.1619/find-file-in-project-autoloads.el create mode 100644 elpa/find-file-in-project-20140603.1619/find-file-in-project-pkg.el create mode 100644 elpa/find-file-in-project-20140603.1619/find-file-in-project-pkg.elc create mode 100644 elpa/find-file-in-project-20140603.1619/find-file-in-project.el create mode 100644 elpa/find-file-in-project-20140603.1619/find-file-in-project.elc create mode 100644 elpa/git-commit-mode-20140605.520/git-commit-mode-autoloads.el create mode 100644 elpa/git-commit-mode-20140605.520/git-commit-mode-pkg.el create mode 100644 elpa/git-commit-mode-20140605.520/git-commit-mode-pkg.elc create mode 100644 elpa/git-commit-mode-20140605.520/git-commit-mode.el create mode 100644 elpa/git-commit-mode-20140605.520/git-commit-mode.elc create mode 100644 elpa/git-rebase-mode-20140605.520/git-rebase-mode-autoloads.el create mode 100644 elpa/git-rebase-mode-20140605.520/git-rebase-mode-pkg.el create mode 100644 elpa/git-rebase-mode-20140605.520/git-rebase-mode-pkg.elc create mode 100644 elpa/git-rebase-mode-20140605.520/git-rebase-mode.el create mode 100644 elpa/git-rebase-mode-20140605.520/git-rebase-mode.elc create mode 100755 elpa/helm-20140808.2300/emacs-helm.sh create mode 100644 elpa/helm-20140808.2300/helm-adaptive.el create mode 100644 elpa/helm-20140808.2300/helm-adaptive.elc create mode 100644 elpa/helm-20140808.2300/helm-aliases.el create mode 100644 elpa/helm-20140808.2300/helm-aliases.elc create mode 100644 elpa/helm-20140808.2300/helm-apt.el create mode 100644 elpa/helm-20140808.2300/helm-apt.elc create mode 100644 elpa/helm-20140808.2300/helm-autoloads.el create mode 100644 elpa/helm-20140808.2300/helm-bbdb.el create mode 100644 elpa/helm-20140808.2300/helm-bbdb.elc create mode 100644 elpa/helm-20140808.2300/helm-bookmark.el create mode 100644 elpa/helm-20140808.2300/helm-bookmark.elc create mode 100644 elpa/helm-20140808.2300/helm-buffers.el create mode 100644 elpa/helm-20140808.2300/helm-buffers.elc create mode 100644 elpa/helm-20140808.2300/helm-call-tree.el create mode 100644 elpa/helm-20140808.2300/helm-call-tree.elc create mode 100644 elpa/helm-20140808.2300/helm-color.el create mode 100644 elpa/helm-20140808.2300/helm-color.elc create mode 100644 elpa/helm-20140808.2300/helm-command.el create mode 100644 elpa/helm-20140808.2300/helm-command.elc create mode 100644 elpa/helm-20140808.2300/helm-config.el create mode 100644 elpa/helm-20140808.2300/helm-config.elc create mode 100644 elpa/helm-20140808.2300/helm-dabbrev.el create mode 100644 elpa/helm-20140808.2300/helm-dabbrev.elc create mode 100644 elpa/helm-20140808.2300/helm-elisp-package.el create mode 100644 elpa/helm-20140808.2300/helm-elisp-package.elc create mode 100644 elpa/helm-20140808.2300/helm-elisp.el create mode 100644 elpa/helm-20140808.2300/helm-elisp.elc create mode 100644 elpa/helm-20140808.2300/helm-elscreen.el create mode 100644 elpa/helm-20140808.2300/helm-elscreen.elc create mode 100644 elpa/helm-20140808.2300/helm-emms.el create mode 100644 elpa/helm-20140808.2300/helm-emms.elc create mode 100644 elpa/helm-20140808.2300/helm-eshell.el create mode 100644 elpa/helm-20140808.2300/helm-eshell.elc create mode 100644 elpa/helm-20140808.2300/helm-eval.el create mode 100644 elpa/helm-20140808.2300/helm-eval.elc create mode 100644 elpa/helm-20140808.2300/helm-external.el create mode 100644 elpa/helm-20140808.2300/helm-external.elc create mode 100644 elpa/helm-20140808.2300/helm-files.el create mode 100644 elpa/helm-20140808.2300/helm-files.elc create mode 100644 elpa/helm-20140808.2300/helm-firefox.el create mode 100644 elpa/helm-20140808.2300/helm-firefox.elc create mode 100644 elpa/helm-20140808.2300/helm-font.el create mode 100644 elpa/helm-20140808.2300/helm-font.elc create mode 100644 elpa/helm-20140808.2300/helm-gentoo.el create mode 100644 elpa/helm-20140808.2300/helm-gentoo.elc create mode 100644 elpa/helm-20140808.2300/helm-grep.el create mode 100644 elpa/helm-20140808.2300/helm-grep.elc create mode 100644 elpa/helm-20140808.2300/helm-help.el create mode 100644 elpa/helm-20140808.2300/helm-help.elc create mode 100644 elpa/helm-20140808.2300/helm-imenu.el create mode 100644 elpa/helm-20140808.2300/helm-imenu.elc create mode 100644 elpa/helm-20140808.2300/helm-info.el create mode 100644 elpa/helm-20140808.2300/helm-info.elc create mode 100644 elpa/helm-20140808.2300/helm-locate.el create mode 100644 elpa/helm-20140808.2300/helm-locate.elc create mode 100644 elpa/helm-20140808.2300/helm-man.el create mode 100644 elpa/helm-20140808.2300/helm-man.elc create mode 100644 elpa/helm-20140808.2300/helm-match-plugin.el create mode 100644 elpa/helm-20140808.2300/helm-match-plugin.elc create mode 100644 elpa/helm-20140808.2300/helm-misc.el create mode 100644 elpa/helm-20140808.2300/helm-misc.elc create mode 100644 elpa/helm-20140808.2300/helm-mode.el create mode 100644 elpa/helm-20140808.2300/helm-mode.elc create mode 100644 elpa/helm-20140808.2300/helm-net.el create mode 100644 elpa/helm-20140808.2300/helm-net.elc create mode 100644 elpa/helm-20140808.2300/helm-org.el create mode 100644 elpa/helm-20140808.2300/helm-org.elc create mode 100644 elpa/helm-20140808.2300/helm-pkg.el create mode 100644 elpa/helm-20140808.2300/helm-pkg.elc create mode 100644 elpa/helm-20140808.2300/helm-plugin.el create mode 100644 elpa/helm-20140808.2300/helm-plugin.elc create mode 100644 elpa/helm-20140808.2300/helm-regexp.el create mode 100644 elpa/helm-20140808.2300/helm-regexp.elc create mode 100644 elpa/helm-20140808.2300/helm-ring.el create mode 100644 elpa/helm-20140808.2300/helm-ring.elc create mode 100644 elpa/helm-20140808.2300/helm-semantic.el create mode 100644 elpa/helm-20140808.2300/helm-semantic.elc create mode 100644 elpa/helm-20140808.2300/helm-sys.el create mode 100644 elpa/helm-20140808.2300/helm-sys.elc create mode 100644 elpa/helm-20140808.2300/helm-tags.el create mode 100644 elpa/helm-20140808.2300/helm-tags.elc create mode 100644 elpa/helm-20140808.2300/helm-utils.el create mode 100644 elpa/helm-20140808.2300/helm-utils.elc create mode 100644 elpa/helm-20140808.2300/helm-w3m.el create mode 100644 elpa/helm-20140808.2300/helm-w3m.elc create mode 100644 elpa/helm-20140808.2300/helm-yaoddmuse.el create mode 100644 elpa/helm-20140808.2300/helm-yaoddmuse.elc create mode 100644 elpa/helm-20140808.2300/helm.el create mode 100644 elpa/helm-20140808.2300/helm.elc create mode 100644 elpa/highlight-indentation-20131207.835/highlight-indentation-autoloads.el create mode 100644 elpa/highlight-indentation-20131207.835/highlight-indentation-pkg.el create mode 100644 elpa/highlight-indentation-20131207.835/highlight-indentation-pkg.elc create mode 100644 elpa/highlight-indentation-20131207.835/highlight-indentation.el create mode 100644 elpa/highlight-indentation-20131207.835/highlight-indentation.elc create mode 100644 elpa/idle-highlight-mode-20120920.948/idle-highlight-mode-autoloads.el create mode 100644 elpa/idle-highlight-mode-20120920.948/idle-highlight-mode-pkg.el create mode 100644 elpa/idle-highlight-mode-20120920.948/idle-highlight-mode-pkg.elc create mode 100644 elpa/idle-highlight-mode-20120920.948/idle-highlight-mode.el create mode 100644 elpa/idle-highlight-mode-20120920.948/idle-highlight-mode.elc create mode 100644 elpa/ido-ubiquitous-20140526.1306/ido-ubiquitous-autoloads.el create mode 100644 elpa/ido-ubiquitous-20140526.1306/ido-ubiquitous-pkg.el create mode 100644 elpa/ido-ubiquitous-20140526.1306/ido-ubiquitous-pkg.elc create mode 100644 elpa/ido-ubiquitous-20140526.1306/ido-ubiquitous.el create mode 100644 elpa/ido-ubiquitous-20140526.1306/ido-ubiquitous.elc create mode 100644 elpa/inf-ruby-20140809.416/inf-ruby-autoloads.el create mode 100644 elpa/inf-ruby-20140809.416/inf-ruby-pkg.el create mode 100644 elpa/inf-ruby-20140809.416/inf-ruby-pkg.elc create mode 100644 elpa/inf-ruby-20140809.416/inf-ruby.el create mode 100644 elpa/inf-ruby-20140809.416/inf-ruby.elc create mode 100644 elpa/magit-20140807.909/AUTHORS.md create mode 100644 elpa/magit-20140807.909/README.md create mode 100644 elpa/magit-20140807.909/dir create mode 100644 elpa/magit-20140807.909/magit-autoloads.el create mode 100644 elpa/magit-20140807.909/magit-blame.el create mode 100644 elpa/magit-20140807.909/magit-blame.elc create mode 100644 elpa/magit-20140807.909/magit-key-mode.el create mode 100644 elpa/magit-20140807.909/magit-key-mode.elc create mode 100644 elpa/magit-20140807.909/magit-pkg.el create mode 100644 elpa/magit-20140807.909/magit-pkg.elc create mode 100644 elpa/magit-20140807.909/magit-wip.el create mode 100644 elpa/magit-20140807.909/magit-wip.elc create mode 100644 elpa/magit-20140807.909/magit.el create mode 100644 elpa/magit-20140807.909/magit.elc create mode 100644 elpa/magit-20140807.909/magit.info create mode 100644 elpa/paredit-20140128.1248/paredit-autoloads.el create mode 100644 elpa/paredit-20140128.1248/paredit-pkg.el create mode 100644 elpa/paredit-20140128.1248/paredit-pkg.elc create mode 100644 elpa/paredit-20140128.1248/paredit.el create mode 100644 elpa/paredit-20140128.1248/paredit.elc create mode 100644 elpa/pkg-info-20140610.630/pkg-info-autoloads.el create mode 100644 elpa/pkg-info-20140610.630/pkg-info-pkg.el create mode 100644 elpa/pkg-info-20140610.630/pkg-info-pkg.elc create mode 100644 elpa/pkg-info-20140610.630/pkg-info.el create mode 100644 elpa/pkg-info-20140610.630/pkg-info.elc create mode 100644 elpa/popup-20140207.1702/popup-autoloads.el create mode 100644 elpa/popup-20140207.1702/popup-pkg.el create mode 100644 elpa/popup-20140207.1702/popup-pkg.elc create mode 100644 elpa/popup-20140207.1702/popup.el create mode 100644 elpa/popup-20140207.1702/popup.elc create mode 100644 elpa/projectile-20140808.941/projectile-autoloads.el create mode 100644 elpa/projectile-20140808.941/projectile-pkg.el create mode 100644 elpa/projectile-20140808.941/projectile-pkg.elc create mode 100644 elpa/projectile-20140808.941/projectile.el create mode 100644 elpa/projectile-20140808.941/projectile.elc create mode 100644 elpa/rainbow-delimiters-1.3.21/rainbow-delimiters-autoloads.el create mode 100644 elpa/rainbow-delimiters-1.3.21/rainbow-delimiters-pkg.el create mode 100644 elpa/rainbow-delimiters-1.3.21/rainbow-delimiters-pkg.elc create mode 100644 elpa/rainbow-delimiters-1.3.21/rainbow-delimiters.el create mode 100644 elpa/rainbow-delimiters-1.3.21/rainbow-delimiters.elc create mode 100644 elpa/rainbow-delimiters-20140713.1131/rainbow-delimiters-autoloads.el create mode 100644 elpa/rainbow-delimiters-20140713.1131/rainbow-delimiters-pkg.el create mode 100644 elpa/rainbow-delimiters-20140713.1131/rainbow-delimiters-pkg.elc create mode 100644 elpa/rainbow-delimiters-20140713.1131/rainbow-delimiters.el create mode 100644 elpa/rainbow-delimiters-20140713.1131/rainbow-delimiters.elc create mode 100644 elpa/s-20140714.707/s-autoloads.el create mode 100644 elpa/s-20140714.707/s-pkg.el create mode 100644 elpa/s-20140714.707/s-pkg.elc create mode 100644 elpa/s-20140714.707/s.el create mode 100644 elpa/s-20140714.707/s.elc create mode 100644 elpa/smex-20140425.1314/smex-autoloads.el create mode 100644 elpa/smex-20140425.1314/smex-pkg.el create mode 100644 elpa/smex-20140425.1314/smex-pkg.elc create mode 100644 elpa/smex-20140425.1314/smex.el create mode 100644 elpa/smex-20140425.1314/smex.elc create mode 100644 elpa/starter-kit-20130904.1547/starter-kit-autoloads.el create mode 100644 elpa/starter-kit-20130904.1547/starter-kit-defuns.el create mode 100644 elpa/starter-kit-20130904.1547/starter-kit-defuns.elc create mode 100644 elpa/starter-kit-20130904.1547/starter-kit-misc.el create mode 100644 elpa/starter-kit-20130904.1547/starter-kit-misc.elc create mode 100644 elpa/starter-kit-20130904.1547/starter-kit-pkg.el create mode 100644 elpa/starter-kit-20130904.1547/starter-kit-pkg.elc create mode 100644 elpa/starter-kit-20130904.1547/starter-kit.el create mode 100644 elpa/starter-kit-20130904.1547/starter-kit.elc create mode 100644 elpa/starter-kit-bindings-20120101.1955/starter-kit-bindings-autoloads.el create mode 100644 elpa/starter-kit-bindings-20120101.1955/starter-kit-bindings-pkg.el create mode 100644 elpa/starter-kit-bindings-20120101.1955/starter-kit-bindings-pkg.elc create mode 100644 elpa/starter-kit-bindings-20120101.1955/starter-kit-bindings.el create mode 100644 elpa/starter-kit-bindings-20120101.1955/starter-kit-bindings.elc create mode 100644 elpa/starter-kit-lisp-20120504.1225/starter-kit-lisp-autoloads.el create mode 100644 elpa/starter-kit-lisp-20120504.1225/starter-kit-lisp-pkg.el create mode 100644 elpa/starter-kit-lisp-20120504.1225/starter-kit-lisp-pkg.elc create mode 100644 elpa/starter-kit-lisp-20120504.1225/starter-kit-lisp.el create mode 100644 elpa/starter-kit-lisp-20120504.1225/starter-kit-lisp.elc create mode 100644 elpa/starter-kit-ruby-20120202.1132/starter-kit-ruby-autoloads.el create mode 100644 elpa/starter-kit-ruby-20120202.1132/starter-kit-ruby-pkg.el create mode 100644 elpa/starter-kit-ruby-20120202.1132/starter-kit-ruby-pkg.elc create mode 100644 elpa/starter-kit-ruby-20120202.1132/starter-kit-ruby.el create mode 100644 elpa/starter-kit-ruby-20120202.1132/starter-kit-ruby.elc diff --git a/elpa/archives/melpa-stable/archive-contents b/elpa/archives/melpa-stable/archive-contents new file mode 100644 index 000000000..c3c3913ff --- /dev/null +++ b/elpa/archives/melpa-stable/archive-contents @@ -0,0 +1,2 @@ + +(1 (zygospore . [(0 0 3) nil "reversible C-x 1 (delete-other-windows)" single ((:url . "https://github.com/louiskottmann/zygospore.el"))]) (zenburn-theme . [(2 0) nil "A low contrast color theme for Emacs." single ((:url . "http://github.com/bbatsov/zenburn-emacs"))]) (yasnippet . [(0 8 0) nil "Yet another snippet extension for Emacs." tar ((:url . "http://github.com/capitaomorte/yasnippet") (:keywords "convenience" "emulation"))]) (yascroll . [(0 1) nil "Yet Another Scroll Bar Mode" single ((:keywords "convenience"))]) (yagist . [(0 8 9) ((json (1 2 0))) "Yet Another Emacs integration for gist.github.com" single ((:url . "https://github.com/mhayashi1120/yagist.el/raw/master/yagist.el") (:keywords "gist" "git" "github" "paste" "pastie" "pastebin"))]) (yafolding . [(0 1 4) nil "Yet another folding extension for Emacs" single ((:keywords "folding"))]) (xterm-color . [(1 0) nil "ANSI & XTERM 256 color support" single nil]) (xcscope . [(1 1) nil "cscope interface for (X)Emacs" single ((:url . "https://github.com/dkogan/xcscope.el") (:keywords "languages" "c"))]) (ws-butler . [(0 3) nil "Unobtrusively remove trailing whitespace." single ((:url . "https://github.com/lewang/ws-butler"))]) (writeroom-mode . [(2 5) nil "Minor mode for distraction-free writing" tar ((:keywords "text"))]) (writegood-mode . [(2 0) nil "Polish up poor writing on the fly" single ((:url . "http://github.com/bnbeckwith/writegood-mode") (:keywords "writing" "weasel-words" "grammar"))]) (wrap-region . [(0 7 3) ((dash (1 0 3))) "Wrap text with punctation or tag" single ((:url . "http://github.com/rejeep/wrap-region") (:keywords "speed" "convenience"))]) (wonderland . [(0 1 1) ((dash (2 0 0)) (dash-functional (1 0 0)) (multi (2 0 0)) (emacs (24))) "declarative configuration for Emacsen" single ((:url . "http://github.com/kurisuwhyte/emacs-wonderland") (:keywords "configuration" "profile" "wonderland"))]) (wispjs-mode . [(0 2 0) ((clojure-mode (0))) "Major mode for Wisp code." single ((:url . "https://github.com/krisajenkins/wispjs-mode"))]) (wisp-mode . [(0 6 1) nil "Tools for wisp: the Whitespace-to-Lisp preprocessor" single ((:keywords "languages" "lisp"))]) (window-numbering . [(1 1 2) nil "No description available." single nil]) (window-layout . [(1 2) nil "window layout manager" single ((:keywords "window" "layout"))]) (window-end-visible . [(0 1 0) nil "Find the last visible point in a window" single ((:url . "http://github.com/rolandwalker/window-end-visible") (:keywords "extensions"))]) (wiki-nav . [(1 0 0) ((button-lock (1 0 0)) (nav-flash (1 0 0))) "Simple file navigation using [[WikiStrings]]" single ((:url . "http://github.com/rolandwalker/button-lock") (:keywords "mouse" "button" "hypermedia" "navigation"))]) (whitespace-cleanup-mode . [(0 8) nil "Intelligently call whitespace-cleanup on save" single ((:url . "https://github.com/purcell/whitespace-cleanup-mode") (:keywords "convenience"))]) (weechat . [(0 2) ((s (1 3 1)) (cl-lib (0 2)) (emacs (24)) (tracking (1 2))) "Chat via WeeChat's relay protocol in Emacs" tar nil]) (wcheck-mode . [(2014 6 21) nil "General interface for text checkers" tar nil]) (wacspace . [(0 4 2) ((dash (1 2 0)) (cl-lib (0 2))) "The WACky WorkSPACE manager for emACS" tar nil]) (vlf . [(1 5) nil "View Large Files" tar ((:url . "https://github.com/m00natic/vlfi") (:keywords "large files" "utilities"))]) (vim-region . [(0 3 0) ((expand-region (20140127))) "Select region as vim" single ((:url . "https://github.com/ongaeshi/emacs-vim-region"))]) (vector-utils . [(0 1 2) nil "Vector-manipulation utility functions" single ((:url . "http://github.com/rolandwalker/vector-utils") (:keywords "extensions"))]) (vcomp . [(0 3 1) nil "compare version strings" single ((:url . "https://github.com/tarsius/vcomp") (:keywords "versions"))]) (utop . [(1 14) ((emacs (24))) "Universal toplevel for OCaml" single ((:url . "https://github.com/diml/utop") (:keywords "ocaml" "languages"))]) (use-package . [(20140601) ((bind-key (1 0)) (diminish (0 44))) "A use-package declaration for simplifying your .emacs" single ((:url . "https://github.com/jwiegley/use-package") (:keywords "dotemacs" "startup" "speed" "config" "package"))]) (unicode-whitespace . [(0 2 4) ((ucs-utils (0 7 6)) (persistent-soft (0 8 8)) (pcache (0 2 3))) "teach whitespace-mode about fancy characters" single ((:url . "http://github.com/rolandwalker/unicode-whitespace") (:keywords "faces" "wp" "interface"))]) (unicode-progress-reporter . [(0 5 4) ((emacs (24 1 0)) (ucs-utils (0 7 6)) (persistent-soft (0 8 8)) (pcache (0 2 3))) "Progress-reporter with fancy characters" single ((:url . "http://github.com/rolandwalker/unicode-progress-reporter") (:keywords "interface"))]) (unicode-fonts . [(0 4 2) ((font-utils (0 7 2)) (ucs-utils (0 8 0)) (list-utils (0 4 2)) (persistent-soft (0 8 8)) (pcache (0 2 3))) "Configure Unicode fonts" single ((:url . "http://github.com/rolandwalker/unicode-fonts") (:keywords "i18n" "faces" "frames" "wp" "interface"))]) (unicode-enbox . [(0 1 4) ((string-utils (0 3 2)) (ucs-utils (0 7 6)) (persistent-soft (0 8 8)) (pcache (0 2 3))) "Surround a string with box-drawing characters" single ((:url . "http://github.com/rolandwalker/unicode-enbox") (:keywords "extensions" "interface"))]) (unfill . [(0 1) nil "The inverse of fill-paragraph and fill-region" single ((:keywords "utilities"))]) (underwater-theme . [(1 1 0) nil "A gentle, deep blue color theme" single ((:keywords "faces"))]) (ucs-utils . [(0 8 0) ((persistent-soft (0 8 8)) (pcache (0 2 3)) (list-utils (0 4 2))) "Utilities for Unicode characters" tar ((:url . "http://github.com/rolandwalker/ucs-utils") (:keywords "i18n" "extensions"))]) (typo . [(1 1) nil "Minor mode for typographic editing" single ((:url . "https://github.com/jorgenschaefer/typoel") (:keywords "convenience" "wp"))]) (twittering-mode . [(2 0 0) nil "Major mode for Twitter" single ((:url . "http://twmode.sf.net/") (:keywords "twitter" "web"))]) (twilight-anti-bright-theme . [(0 1 1) nil "A soothing Emacs 24 light-on-dark theme" single ((:url . "https://github.com/jimeh/twilight-anti-bright-theme.el") (:keywords "themes"))]) (tup-mode . [(1 3 1) nil "Major mode for editing files for Tup" single ((:url . "https://github.com/ejmr/tup-mode"))]) (tumble . [(1 5) nil "an Tumblr mode for Emacs" single ((:keywords "tumblr"))]) (tuareg . [(2 0 8) ((caml (3 12 0 1))) "OCaml mode for Emacs." tar ((:url . "http://forge.ocamlcore.org/projects/tuareg/") (:keywords "ocaml" "languages"))]) (ttrss . [(1 7 5) ((emacs (23 1))) "Tiny Tiny RSS elisp bindings" single ((:url . "https://github.com/pedros/ttrss.el") (:keywords "news" "local"))]) (truthy . [(0 2 8) ((list-utils (0 4 2))) "Test the content of a value" single ((:url . "http://github.com/rolandwalker/truthy") (:keywords "extensions"))]) (traad . [(0 4) nil "emacs interface to the traad refactoring server." single ((:url . "https://github.com/abingham/traad"))]) (thrift . [(0 9 1) nil "No description available." single nil]) (theme-changer . [(2 1 0) nil "Sunrise/Sunset Theme Changer for Emacs" single ((:url . "https://github.com/hadronzoo/theme-changer") (:keywords "color-theme" "deftheme" "solar" "sunrise" "sunset"))]) (textmate-to-yas . [(0 21) nil "Import Textmate macros into yasnippet syntax" tar ((:url . "https://github.com/mlf176f2/textmate-to-yas.el/") (:keywords "yasnippet" "textmate"))]) (textmate . [(1) nil "No description available." single nil]) (test-case-mode . [(0 1 9) nil "unit test front-end" single ((:url . "http://nschum.de/src/emacs/test-case-mode/") (:keywords "tools"))]) (terraform-mode . [(0 1) ((cl-lib (0 5))) "Major mode for terraform configuration file" single ((:url . "https://github.com/syohex/emacs-terraform-mode"))]) (tern-auto-complete . [(0 6 2) ((tern (0 0 1)) (auto-complete (1 4)) (cl-lib (0 5)) (emacs (24))) "Tern Completion by auto-complete.el" single nil]) (tern . [(0 6 2) ((json (1 2)) (cl-lib (0 5)) (emacs (24))) "Tern-powered JavaScript integration" single ((:url . "http://ternjs.net/"))]) (tempbuf . [(1 4) nil "kill unused buffers in the background" single ((:keywords "convenience"))]) (tagedit . [(1 4 0) ((s (1 3 1)) (dash (1 0 3))) "Some paredit-like features for html-mode" single ((:keywords "convenience"))]) (tabbar-ruler . [(0 40) ((tabbar (2 0 1))) "Pretty tabbar, autohide, use both tabbar/ruler" tar ((:url . "http://github.com/mlf176f2/tabbar-ruler.el") (:keywords "tabbar" "ruler mode" "menu" "tool bar."))]) (syntactic-sugar . [(0 9 4) nil "Effect-free forms such as if/then/else" single ((:url . "http://github.com/rolandwalker/syntactic-sugar") (:keywords "extensions"))]) (swift-mode . [(0 2 0) ((emacs (24 1))) "Major-mode for Apple's Swift programming language." single nil]) (svg-mode-line-themes . [(0 1 1) ((xmlgen (0 4))) "SVG-based themes for mode-line" tar ((:url . "https://github.com/sabof/svg-mode-line-themes"))]) (suomalainen-kalenteri . [(2014 6 15) nil "Finnish national and Christian holidays for calendar" tar nil]) (sudden-death . [(0 2) nil "Totsuzen-no-Shi" single ((:url . "https://github.com/yewton/sudden-death.el"))]) (subshell-proc . [(0 1) nil "Functions for working with comints" single ((:url . "https://github.com/andrewmains12/subshell-proc"))]) (stumpwm-mode . [(0 9 8) nil "special lisp mode for evaluating code into running stumpwm" single ((:keywords "comm" "lisp" "tools"))]) (stripe-buffer . [(0 2 2) ((cl-lib (1 0))) "Use a different background for even and odd lines" single ((:url . "https://github.com/sabof/stripe-buffer"))]) (string-utils . [(0 3 2) ((list-utils (0 4 2))) "String-manipulation utilities" single ((:url . "http://github.com/rolandwalker/string-utils") (:keywords "extensions"))]) (string-edit . [(0 1 0) ((dash (1 2 0))) "Avoid escape nightmares by editing string in separate buffer" single nil]) (stgit . [(0 17 1) nil "No description available." single nil]) (stekene-theme . [(1 0 8) ((emacs (24))) "The stekene dark and light color themes." tar nil]) (starter-kit-ruby . [(2 0 3) ((inf-ruby (2 2 1)) (starter-kit (2 0 1))) "Saner defaults and goodies for Ruby" single ((:url . "http://www.emacswiki.org/cgi-bin/wiki/StarterKit") (:keywords "convenience"))]) (starter-kit-perl . [(2 0 3) nil "Some helpful Perl code" single nil]) (starter-kit-lisp . [(2 0 3) ((starter-kit (2 0 2)) (elisp-slime-nav (0 1))) "Saner defaults and goodies for lisp languages" single ((:url . "http://www.emacswiki.org/cgi-bin/wiki/StarterKit") (:keywords "convenience"))]) (starter-kit-js . [(2 0 3) ((starter-kit (2 0 1))) "Saner defaults and goodies for Javascript" single ((:url . "http://www.emacswiki.org/cgi-bin/wiki/StarterKit") (:keywords "convenience"))]) (starter-kit-eshell . [(2 0 3) nil "Saner defaults and goodies: eshell tweaks" single ((:url . "http://www.emacswiki.org/cgi-bin/wiki/StarterKit") (:keywords "convenience"))]) (starter-kit-bindings . [(2 0 3) ((starter-kit (2 0 2))) "Saner defaults and goodies: bindings" single ((:url . "http://www.emacswiki.org/cgi-bin/wiki/StarterKit") (:keywords "convenience"))]) (starter-kit . [(2 0 3) ((paredit (22)) (idle-highlight-mode (1 1 1)) (find-file-in-project (3 0)) (smex (1 1 1)) (ido-ubiquitous (0 3)) (magit (0 8 1))) "Saner defaults and goodies." tar nil]) (stan-snippets . [(2 4 1) ((yasnippet (0 8 0)) (stan-mode (2 4 1))) "Yasnippets for Stan" tar ((:url . "http://github.com/stan-dev/stan-mode") (:keywords "languages"))]) (stan-mode . [(2 4 1) nil "Major mode for editing Stan files" tar ((:url . "http://github.com/stan-dev/stan-mode") (:keywords "languanges"))]) (sprintly-mode . [(0 0 4) ((furl (0 0 2))) "Major mode for dealing with sprint.ly" single ((:url . "https://github.com/sprintly/sprintly-mode"))]) (sparql-mode . [(0 9 2) nil "Edit and interactively evaluate SPARQL queries." tar ((:url . "https://github.com/ljos/sparql-mode"))]) (sourcemap . [(0 1) ((cl-lib (0 5)) (emacs (24))) "Sourcemap parser" single ((:url . "https://github.com/syohex/emacs-sourcemap"))]) (solarized-theme . [(1 1 0) ((dash (2 6 0))) "The Solarized color theme, ported to Emacs." tar nil]) (smex . [(3 0) nil "M-x interface with Ido-style fuzzy matching." single ((:url . "http://github.com/nonsequitur/smex/") (:keywords "convenience" "usability"))]) (smeargle . [(0 1) ((cl-lib (0 5)) (emacs (24))) "Highlighting region by last updated time" single ((:url . "https://github.com/syohex/emacs-smeargle"))]) (smartscan . [(0 2) nil "Jumps between other symbols found at point" single ((:keywords "extensions"))]) (smartrep . [(0 0 3) nil "Support sequential operation which omitted prefix keys." single ((:url . "https://github.com/myuhe/smartrep.el") (:keywords "convenience"))]) (smart-tabs-mode . [(1 0) nil "Intelligently indent with tabs, align with spaces!" single ((:url . "http://www.emacswiki.org/emacs/SmartTabs") (:keywords "languages"))]) (smart-mode-line . [(2 5 3) ((emacs (24 3)) (dash (2 2 0))) "A color coded smart mode-line." tar ((:url . "http://github.com/Bruce-Connor/smart-mode-line") (:keywords "mode-line" "faces" "theme" "themes"))]) (slime-volleyball . [(1 1) nil "An SVG Slime Volleyball Game" tar ((:keywords "games"))]) (slime-ritz . [(0 6 0) nil "slime extensions for ritz" single ((:url . "https://github.com/pallet/ritz") (:keywords "languages" "lisp" "slime"))]) (slime-company . [(0 6) ((slime (2 3 2)) (company (0 7))) "slime completion backend for company mode" single ((:keywords "convenience" "lisp" "abbrev"))]) (slime . [(2 9) ((cl-lib (0 5))) "Superior Lisp Interaction Mode for Emacs" tar ((:url . "https://github.com/slime/slime") (:keywords "languages" "lisp" "slime"))]) (slim-mode . [(1 1) nil "Major mode for editing Slim files" single ((:url . "http://github.com/minad/emacs-slim") (:keywords "markup" "language"))]) (slamhound . [(1 5 4) nil "Rip Clojure namespaces apart and rebuild them." single ((:url . "https://github.com/technomancy/slamhound") (:keywords "tools" "lisp"))]) (skewer-mode . [(1 6 1) ((simple-httpd (1 4 0)) (js2-mode (20090723)) (emacs (24))) "live browser JavaScript, CSS, and HTML interaction" tar nil]) (skewer-less . [(0 2) ((skewer-mode (1 5 3))) "Skewer support for live LESS stylesheet updates" single ((:keywords "languages" "tools"))]) (skeletor . [(1 4) ((s (1 7 0)) (f (0 14 0)) (dash (2 2 0)) (cl-lib (0 3)) (emacs (24 1))) "Provides project skeletons for Emacs" tar nil]) (simplezen . [(0 1 1) nil "A simple subset of zencoding-mode for Emacs." single nil]) (simpleclip . [(1 0 0) nil "Simplified access to the system clipboard" single ((:url . "http://github.com/rolandwalker/simpleclip") (:keywords "convenience"))]) (simple-httpd . [(1 4 5) ((cl-lib (0 3))) "pure elisp HTTP server" single ((:url . "https://github.com/skeeto/emacs-http-server"))]) (shut-up . [(0 3 1) ((cl-lib (0 3)) (emacs (24))) "Shut up would you!" single ((:url . "http://github.com/rejeep/shut-up.el"))]) (shm . [(1 0 1) nil "No description available." tar nil]) (shell-pop . [(0 3) nil "helps you to use shell easily on Emacs. Only one key action to work." single ((:url . "http://github.com/kyagi/shell-pop-el") (:keywords "shell" "terminal" "tools"))]) (shampoo . [(0 0 1) nil "Shampoo, a remote Smalltalk developemnt" tar nil]) (session . [(2 3 1) nil "use variables, registers and buffer places across sessions" single ((:url . "http://emacs-session.sourceforge.net/") (:keywords "session" "session management" "desktop" "data" "tools"))]) (serverspec . [(0 0 4) ((dash (2 6 0)) (s (1 9 0)) (f (0 16 2)) (helm (1 6 1))) "Serverspec minor mode" tar ((:url . "http://101000lab.org"))]) (servant . [(0 3 0) ((s (1 8 0)) (dash (2 2 0)) (f (0 11 0)) (ansi (0 3 0)) (commander (0 5 0)) (epl (0 2)) (shut-up (0 2 1)) (web-server (0 0 1))) "ELPA server written in Emacs Lisp" tar ((:url . "http://github.com/rejeep/servant.el") (:keywords "elpa" "server"))]) (sekka . [(1 5 5) nil "No description available." single nil]) (scss-mode . [(0 5 0) nil "Major mode for editing SCSS files" single ((:url . "https://github.com/antonj/scss-mode") (:keywords "scss" "css" "mode"))]) (scheme-here . [(0 6) nil "cmuscheme extension for multiple inferior processes" single ((:url . "https://github.com/zhaov/scheme-here") (:keywords "scheme"))]) (scala-mode . [(2 11 2) nil "Major mode for editing Scala code." tar ((:keywords "scala" "languages" "oop"))]) (save-sexp . [(0 2 0) nil "save variables in files using setter forms like `setq'" tar ((:url . "https://github.com/tarsius/save-sexp") (:keywords "convenience"))]) (sauron . [(0 10) nil "Track (erc/org/dbus/...) events and react to them." tar nil]) (sackspace . [(0 8 2) nil "A better backspace" single ((:url . "http://github.com/cofi/sackspace.el") (:keywords "delete" "convenience"))]) (s . [(1 9 0) nil "The long lost Emacs string manipulation library." single ((:keywords "strings"))]) (rvm . [(1 3 0) nil "Emacs integration for rvm" single ((:url . "http://www.emacswiki.org/emacs/RvmEl") (:keywords "ruby" "rvm"))]) (rust-mode . [(0 11 0) nil "A major emacs mode for editing Rust source code" single ((:url . "https://github.com/rust-lang/rust") (:keywords "languages"))]) (ruby-tools . [(0 1 2) nil "Collection of handy functions for ruby-mode." tar nil]) (ruby-test-mode . [(1 0) nil "Minor mode for Behaviour and Test Driven" single ((:keywords "ruby" "unit" "test" "rspec"))]) (ruby-hash-syntax . [(0 3) nil "Toggle ruby hash syntax between classic and 1.9 styles" single ((:url . "https://github.com/purcell/ruby-hash-syntax") (:keywords "languages"))]) (ruby-end . [(0 4 0) nil "Automatic insertion of end blocks for Ruby" single ((:url . "http://github.com/rejeep/ruby-end") (:keywords "speed" "convenience" "ruby"))]) (ruby-compilation . [(2 10) ((inf-ruby (2 2 1))) "run a ruby process in a compilation buffer" single ((:url . "https://github.com/eschulte/rinari") (:keywords "test" "convenience"))]) (rtags . [(1 1) nil "No description available." tar nil]) (rsense . [(0 3) nil "RSense client for Emacs" single ((:keywords "convenience"))]) (roguel-ike . [(0 1) ((popup (0 5 0))) "A coffee-break roguelike" tar nil]) (rnc-mode . [(1 0 6) nil "A major mode for editing RELAX NG Compact syntax." single nil]) (rinari . [(2 10) ((ruby-mode (1 0)) (inf-ruby (2 2 1)) (ruby-compilation (0 8)) (jump (2 0))) "Rinari Is Not A Rails IDE" single ((:url . "https://github.com/eschulte/rinari") (:keywords "ruby" "rails" "project" "convenience" "web"))]) (reveal-in-finder . [(0 3 1) nil "Reveal the file associated with the buffer in the OS X Finder" single ((:url . "https://github.com/kaz-yos/elisp") (:keywords "os x" "finder"))]) (request-deferred . [(0 1 0) nil "Wrap request.el by deferred" single nil]) (request . [(0 1 0) nil "Compatible layer for URL request in Emacs" single nil]) (req-package . [(0 5) ((use-package (1 0)) (dash (2 7 0)) (log4e (0 2 0))) "A use-package wrapper for package runtime dependencies management" single ((:url . "https://github.com/edvorg/req-package") (:keywords "dotemacs" "startup" "speed" "config" "package"))]) (relax . [(0 2) ((json (1 2))) "For browsing and interacting with CouchDB" single ((:url . "http://github.com/technomancy/relax.el") (:keywords "database" "http"))]) (relative-line-numbers . [(0 2 6) ((emacs (24))) "Display relative line numbers on the margin" single ((:url . "https://github.com/Fanael/relative-line-numbers"))]) (rbenv . [(0 0 3) nil "Emacs integration for rbenv" single ((:url . "https://github.com/senny/rbenv.el") (:keywords "ruby" "rbenv"))]) (rase . [(1 1) nil "Run At Sun Event daemon" single ((:url . "https://github.com/m00natic/rase/") (:keywords "solar" "sunrise" "sunset" "midday" "midnight"))]) (rainbow-identifiers . [(0 2 1) ((emacs (24))) "Highlight identifiers according to their names" single ((:url . "https://github.com/Fanael/rainbow-identifiers"))]) (rainbow-delimiters . [(1 3 7) nil "Highlight nested parens, brackets, braces a different color at each depth." single ((:url . "http://github.com/jlr/rainbow-delimiters/raw/master/rainbow-delimiters.el") (:keywords "faces" "convenience" "lisp" "matching" "tools" "rainbow" "rainbow parentheses" "rainbow parens"))]) (r-autoyas . [(0 28) nil "Provides automatically created yasnippets for R function argument lists." tar ((:url . "https://github.com/mlf176f2/r-autoyas.el") (:keywords "r" "yasnippet"))]) (quickrun . [(2 0 6) nil "Run commands quickly" single ((:url . "https://github.com/syohex/emacs-quickrun"))]) (qml-mode . [(0 1) nil "Major mode for editing QT Declarative (QML) code." single ((:url . "https://github.com/coldnew/qml-mode") (:keywords "qml" "qt" "qt declarative"))]) (qiita . [(0 0 1) nil "No description available." single nil]) (pyvenv . [(1 3) nil "Python virtual environment interface" single ((:url . "http://github.com/jorgenschaefer/pyvenv") (:keywords "python" "virtualenv" "tools"))]) (python-environment . [(0 0 1) ((deferred (0 3 1))) "virtualenv API for Emacs Lisp" tar ((:keywords "applications" "tools"))]) (pushbullet . [(0 5 2) ((grapnel (0 5 2)) (json (1 2))) "Emacs client for the PushBullet Android app" single ((:url . "http://www.github.com/theanalyst/revolver") (:keywords "convenience"))]) (puppet-mode . [(0 3) ((emacs (24 1)) (cl-lib (0 5)) (pkg-info (0 4))) "Major mode for Puppet manifests" single ((:url . "https://github.com/lunaryorn/puppet-mode") (:keywords "languages"))]) (pungi . [(0 9 5) ((jedi (0 2 0 -3 2))) "Integrates jedi with virtualenv and buildout python environments" single ((:keywords "convenience"))]) (projectile . [(0 11 0) ((s (1 6 0)) (dash (1 5 0)) (pkg-info (0 4))) "Manage and navigate projects in Emacs easily" single ((:url . "https://github.com/bbatsov/projectile") (:keywords "project" "convenience"))]) (project-root . [(0 7) nil "Define a project root and take actions based upon it." single nil]) (project-persist . [(0 3) nil "A minor mode to allow loading and saving of project settings." tar nil]) (project-explorer . [(0 13 4) ((cl-lib (0 3)) (es-lib (0 3)) (es-windows (0 1)) (emacs (24))) "A project explorer sidebar" single ((:url . "https://github.com/sabof/project-explorer"))]) (prodigy . [(0 6 0) ((s (1 8 0)) (dash (2 4 0)) (f (0 14 0)) (emacs (24))) "Manage external services from within Emacs" single ((:url . "http://github.com/rejeep/prodigy.el"))]) (processing-mode . [(1 0) ((yasnippet (0 8 0))) "Major mode for Processing 2.0" single ((:keywords "languages" "snippets"))]) (pretty-mode . [(2 0 2) nil "Redisplay parts of the buffer as pretty symbols." single ((:url . "https://github.com/akatov/pretty-mode") (:keywords "pretty" "unicode" "symbols"))]) (powerline . [(2 2) ((cl-lib (0 2))) "Rewrite of Powerline" tar ((:url . "http://github.com/milkypostman/powerline/") (:keywords "mode-line"))]) (pov-mode . [(3 3) nil "Major mode for editing POV-Ray scene files." tar nil]) (popwin . [(0 6 2) nil "Popup Window Manager." single ((:keywords "convenience"))]) (popup . [(0 5 0) ((cl-lib (0 3))) "Visual Popup User Interface" single ((:keywords "lisp"))]) (plenv . [(0 32) nil "A plenv wrapper for Emacs" single ((:keywords "emacs" "perl"))]) (pkgbuild-mode . [(0 11) nil "Interface to the ArchLinux package manager" single nil]) (pkg-info . [(0 5) ((dash (1 6 0)) (epl (0 4))) "Information about packages" single ((:url . "https://github.com/lunaryorn/pkg-info.el") (:keywords "convenience"))]) (phpunit . [(0 2 0) nil "Launch PHP unit tests using phpunit" single ((:url . "https://github.com/nlamirault/phpunit.el") (:keywords "php" "tests" "phpunit"))]) (php-mode . [(1 13 5) nil "Major mode for editing PHP code" single ((:url . "https://github.com/ejmr/php-mode"))]) (php-auto-yasnippets . [(2 3 1) ((php-mode (1 11)) (yasnippet (0 8 0))) "Creates snippets for PHP functions" tar ((:url . "https://github.com/ejmr/php-auto-yasnippets"))]) (phi-search-mc . [(2 1) ((phi-search (2 0 0)) (multiple-cursors (1 2 1))) "multiple-cursors extension for phi-search" single ((:url . "https://github.com/knu/phi-search-mc.el") (:keywords "search" "cursors"))]) (ph . [(0 1 0) ((emacs (24 3))) "A global minor mode for managing multiple projects." tar nil]) (perspective . [(1 9) nil "switch between named \"perspectives\" of the editor" single ((:url . "http://github.com/nex3/perspective-el") (:keywords "workspace" "convenience" "frames"))]) (persp-projectile . [(0 11 0) ((perspective (1 9)) (projectile (0 11 0)) (cl-lib (0 3))) "Perspective integration with Projectile" single ((:keywords "project" "convenience"))]) (persp-mode . [(0 9 98) ((workgroups (0 2 0))) "\"perspectives\" + save/load + shared among frames." single ((:url . "https://github.com/Bad-ptr/persp-mode.el") (:keywords "perspectives"))]) (persistent-soft . [(0 8 8) ((pcache (0 2 3)) (list-utils (0 4 2))) "Persistent storage, returning nil on failure" single ((:url . "http://github.com/rolandwalker/persistent-soft") (:keywords "data" "extensions"))]) (pcache . [(0 2 4) ((eieio (1 3))) "persistent caching for Emacs" single nil]) (pastehub . [(0 5 2) nil "A client for the PasteHub cloud service" single ((:url . "https://github.com/kiyoka/pastehub"))]) (paste-kde . [(0 6) ((web (0 3 6))) "paste text to KDE's pastebin service" single ((:keywords "comm" "convenience" "tools"))]) (password-store . [(1 6 3) ((dash (1 5 0)) (f (0 11 0)) (s (1 9 0))) "Password store (pass) support" single ((:keywords "pass"))]) (passthword . [(1 3) ((cl-lib (0 5))) "Simple password manager" single nil]) (parent-mode . [(2 0) ((emacs (24))) "get major mode's parent modes" single ((:url . "https://github.com/Fanael/parent-mode"))]) (parenface . [(1 1) nil "Provide a face for parens in lisp modes." single]) (paren-face . [(0 1 0) nil "a face for parentheses in lisp modes" single ((:url . "http://github.com/tarsius/paren-face"))]) (paredit-everywhere . [(0 4) ((paredit (22))) "Enable some paredit features in non-lisp buffers" single ((:keywords "languages" "convenience"))]) (paredit . [(23) nil "minor mode for editing parentheses" single ((:keywords "lisp"))]) (paradox . [(1 0 2) ((emacs (24 1)) (tabulated-list (1 0)) (package (1 0)) (dash (2 6 0)) (cl-lib (1 0)) (json (1 3))) "A modern Packages Menu. Colored, with package ratings, and customizable." tar ((:url . "http://github.com/Bruce-Connor/paradox") (:keywords "package" "packages" "mode-line"))]) (pangu-spacing . [(0 4) nil "Minor-mode to add space between Chinese and English characters." single ((:url . "http://github.com/coldnew/pangu-spacing"))]) (pandoc-mode . [(2 5 4) nil "Minor mode for interacting with Pandoc" tar ((:keywords "text" "pandoc"))]) (pallet . [(0 6) ((cask (0 6))) "A package management tool for Emacs, using Cask." tar nil]) (page-break-lines . [(0 9) nil "Display ugly ^L page breaks as tidy horizontal lines" single ((:url . "https://github.com/purcell/page-break-lines") (:keywords "convenience" "faces"))]) (packed . [(0 3 4) ((cl-lib (0 2)) (magit (1 1 1))) "Package manager agnostic Emacs Lisp package utilities" tar nil]) (outshine . [(1 0) nil "No description available." single nil]) (outorg . [(1 0) nil "No description available." single nil]) (osx-plist . [(1 0 0) nil "Apple plist file parser" single ((:keywords "convenience"))]) (osx-location . [(0 1) nil "Watch and respond to changes in geographical location on OS X" tar nil]) (osx-browse . [(0 8 8) ((string-utils (0 3 2)) (browse-url-dwim (0 6 6))) "Web browsing helpers for OS X" single ((:url . "http://github.com/rolandwalker/osx-browse") (:keywords "hypermedia" "external"))]) (orglink . [(0 2 1) ((dash (1 3 2)) (org (8 0))) "use Org Mode links in other modes" single ((:url . "http://github.com/tarsius/orglink") (:keywords "hypertext"))]) (orgbox . [(0 5 0) ((org (8 0)) (cl-lib (0 5))) "Mailbox-like task scheduling Org." single ((:url . "https://github.com/yasuhito/orgbox") (:keywords "org"))]) (org-trello . [(0 4 8) ((db (0 0 6)) (s (1 7 0)) (esxml (0 3 0)) (elnode (0 9 9 7 6)) (request (0 2 0)) (dash (2 5 0))) "Minor mode to synchronize org-mode buffer and trello board" tar nil]) (org-toodledo . [(2 16) nil "Toodledo integration for Emacs Org mode" tar ((:keywords "outlines" "data"))]) (org-readme . [(20130322 926) ((http-post-simple (1 0)) (yaoddmuse (0 1 1)) (header2 (21 0)) (lib-requires (21 0))) "Integrates Readme.org and Commentary/Change-logs." tar ((:url . "https://github.com/mlf176f2/org-readme") (:keywords "header2" "readme.org" "emacswiki" "git"))]) (org-protocol-jekyll . [(0 1) nil "Jekyll's handler for org-protocol" single nil]) (org-pomodoro . [(1 3 1) ((alert (0 5 10))) "Pomodoro implementation for org-mode." tar nil]) (org-page . [(0 41) ((ht (1 5)) (mustache (0 22)) (htmlize (1 47)) (org (8))) "a static site generator based on org mode" tar nil]) (org-outlook . [(0 11) nil "Outlook org" tar ((:url . "https://github.com/mlf176f2/org-outlook.el") (:keywords "org-outlook"))]) (org-magit . [(0 2 0) ((magit (0 8)) (org (6 1))) "basic support for magit links" single ((:keywords "git" "magit" "outlines"))]) (org-mac-iCal . [(7 9 3 5) nil "Imports events from iCal.app to the Emacs diary" single ((:keywords "outlines" "calendar"))]) (org-journal . [(1 5 2) nil "a simple org-mode based journaling mode" single ((:url . "http://github.com/bastibe/emacs-journal"))]) (org-elisp-help . [(0 1 0) ((cl-lib (0 2)) (org (8 0))) "org links to emacs-lisp documentation" single ((:url . "http://tarsius.github.com/org-elisp-help") (:keywords "org" "remember" "lisp"))]) (org-bullets . [(0 2 2) nil "Show bullets in org-mode as UTF-8 characters" single ((:url . "https://github.com/sabof/org-bullets"))]) (org-agenda-property . [(1 3 1) ((emacs (24 2))) "Display org properties in the agenda buffer." single ((:url . "http://github.com/Bruce-Connor/org-agenda-property") (:keywords "calendar"))]) (operate-on-number . [(1 1 0) nil "Operate on number at point with arithmetic functions" single ((:url . "https://github.com/knu/operate-on-number.el") (:keywords "editing"))]) (octomacs . [(0 0 1) nil "Octopress interface for Emacs" single ((:url . "http://technosorcery.net"))]) (object-registry . [(1 2 0) ((cl-lib (0 2))) "track data items by various instance slots" single ((:url . "https://github.com/tarsius/object-registry") (:keywords "data" "oo"))]) (ob-translate . [(0 1 2) ((google-translate (0 4)) (org (8))) "Translation of text blocks in org-mode." single ((:url . "https://github.com/krisajenkins/ob-translate") (:keywords "org" "babel" "translate" "translation"))]) (ob-sml . [(0 2) ((sml-mode (6 4))) "org-babel functions for template evaluation" single ((:url . "http://orgmode.org") (:keywords "literate programming" "reproducible research"))]) (o-blog . [(2 0) nil "" tar ((:keywords "emacs"))]) (nvm . [(0 0 3) ((s (1 8 0)) (dash (2 4 0)) (f (0 14 0))) "Manage Node versions within Emacs" single ((:url . "http://github.com/rejeep/nvm.el") (:keywords "node" "nvm"))]) (nsis-mode . [(0 44) nil "NSIS-mode" tar ((:url . "http://github.com/mlf176f2/nsis-mode") (:keywords "nsis"))]) (nrepl-sync . [(0 3 1) ((cider (0 6))) "connect to nrepl port and eval .sync.clj." single ((:url . "https://github.com/phillord/lein-sync"))]) (nrepl-ritz . [(0 6 0) ((nrepl (0 1 5))) "nrepl extensions for ritz" single ((:url . "https://github.com/pallet/ritz") (:keywords "languages" "lisp" "nrepl"))]) (notmuch . [(0 18 1) nil "No description available." tar nil]) (nose . [(0 1 1) nil "Easy Python test running in Emacs" single ((:keywords "nose" "python" "testing"))]) (nodejs-repl . [(0 0 2) nil "Run Node.js REPL" single nil]) (nix-mode . [(1 7) nil "No description available." single nil]) (ninja-mode . [(1 5 1) nil "Major mode for editing .ninja files" single nil]) (neotree . [(0 2) nil "A emacs tree plugin like NerdTree for Vim" single ((:url . "https://github.com/jaypei/emacs-neotree"))]) (nemerle . [(1 2) nil "major mode for editing nemerle programs" single ((:keywords "nemerle" "mode" "languages"))]) (ncl-mode . [(0 98) nil "No description available." tar nil]) (navorski . [(0 2 3) ((dash (1 5 0)) (multi-term (0 8 14))) "Helping you live in the terminal, like Viktor did." single ((:keywords "terminal"))]) (navi-mode . [(1 0) nil "No description available." single nil]) (nav-flash . [(1 1 0) nil "Briefly highlight the current line" single ((:url . "http://github.com/rolandwalker/nav-flash") (:keywords "extensions" "navigation" "interface"))]) (mykie . [(0 2 1) nil "Command multiplexer: Register multiple functions to a keybind" tar ((:url . "https://github.com/yuutayamada/mykie-el") (:keywords "emacs" "configuration" "keybind"))]) (multiple-cursors . [(1 3 0) nil "Multiple cursors for Emacs." tar nil]) (multi-web-mode . [(0 2 1) nil "multiple major mode support for web editing" tar ((:keywords "convenience" "languages" "wp"))]) (multi . [(2 0 1) ((emacs (24))) "Clojure-style multi-methods for emacs lisp" single ((:url . "http://github.com/kurisuwhyte/emacs-multi") (:keywords "multimethod" "generic" "predicate" "dispatch"))]) (moz . [(1 1 0) nil "Lets current buffer interact with inferior mozilla." single ((:url . "http://github.com/bard/mozrepl/raw/master/chrome/content/moz.el"))]) (move-dup . [(0 2 1) nil "Eclipse-like moving and duplicating lines or rectangles." single ((:keywords "convenience" "wp"))]) (morlock . [(0 4 0) nil "more font-lock keywords for elisp" single ((:url . "http://github.com/tarsius/morlock") (:keywords "convenience"))]) (mode-line-debug . [(1 2 1) nil "show status of `debug-on-error' in the mode-line" single ((:url . "https://github.com/tarsius/mode-line-debug") (:keywords "convenience" "lisp"))]) (mode-icons . [(0 1 0) nil "Show icons for modes" tar ((:url . "http://ryuslash.org/projects/mode-icons.html") (:keywords "multimedia"))]) (mocker . [(0 3 0) ((eieio (1 3)) (el-x (0 2 4))) "mocking framework for emacs" single ((:keywords "lisp" "testing"))]) (mmm-mode . [(0 5 1) nil "Allow Multiple Major Modes in a buffer" tar ((:url . "https://github.com/purcell/mmm-mode") (:keywords "convenience" "faces" "languages" "tools"))]) (mmm-mako . [(1 1) ((mmm-mode (0 4 8))) "MMM submode class for Mako Templates" single ((:url . "https://bitbucket.org/pjenvey/mmm-mako"))]) (minimal-session-saver . [(0 6 2) nil "Very lean session saver" single ((:url . "http://github.com/rolandwalker/minimal-session-saver") (:keywords "tools" "frames" "project"))]) (miniedit . [(2 0) nil "Enhanced editing for minibuffer fields." single nil]) (minibuffer-cua . [(1 0 0) nil "Make CUA mode's S-up/S-down work in minibuffer" single ((:url . "https://github.com/knu/minibuffer-cua.el") (:keywords "completion" "editing"))]) (minibuffer-complete-cycle . [(1 25 20130814) nil "Cycle through the *Completions* buffer" single ((:url . "https://github.com/knu/minibuffer-complete-cycle") (:keywords "completion"))]) (milkode . [(0 3) nil "Command line search and direct jump with Milkode" tar ((:keywords "milkode" "search" "grep" "jump" "keyword"))]) (migemo . [(1 9 1) nil "Japanese incremental search through dynamic pattern expansion" single ((:url . "https://github.com/emacs-jp/migemo"))]) (mew . [(6 6) nil "Messaging in the Emacs World" tar nil]) (merlin . [(1 6) nil "Mode for Merlin, an assistant for OCaml." single ((:url . "http://github.com/the-lambda-church/merlin") (:keywords "ocaml" "languages"))]) (mentor . [(0 1) nil "Control rtorrent from GNU Emacs" tar ((:keywords "bittorrent" "rtorrent"))]) (mc-extras . [(1 0 3) ((multiple-cursors (1 2 1))) "Extra functions for multiple-cursors mode." tar ((:url . "https://github.com/knu/mc-extras.el") (:keywords "editing" "cursors"))]) (maxframe . [(0 5) nil "No description available." single nil]) (marmalade . [(0 0 4) ((furl (0 0 2))) "Elisp interface for the Emacs Lisp package server." single ((:url . "http://code.google.com/p/marmalade"))]) (markdown-toc . [(0 0 6) ((s (1 7 0)) (dash (2 5 0)) (markdown-mode (2 0))) "A simple TOC generator for markdown file" tar nil]) (markdown-mode . [(2 0) nil "Emacs Major mode for Markdown-formatted text files" single ((:url . "http://jblevins.org/projects/markdown-mode/") (:keywords "markdown" "github flavored markdown" "itex"))]) (mark-tools . [(0 3) nil "Some simple tools to access the mark-ring in Emacs" single ((:url . "https://github.com/stsquad/emacs-mark-tools"))]) (map-regexp . [(0 3 0) ((cl-lib (0 2))) "map over matches of a regular expression" single ((:url . "https://github.com/tarsius/map-regexp") (:keywords "convenience"))]) (map-progress . [(0 5 0) nil "mapping macros that report progress" single ((:url . "https://github.com/tarsius/map-progress/") (:keywords "convenience"))]) (mallard-mode . [(0 3 0) nil "Major mode for editing Mallard files" tar ((:url . "https://github.com/jhradilek/emacs-mallard-mode") (:keywords "xml" "mallard"))]) (malinka . [(0 2 0) ((s (1 9 0)) (dash (2 4 0)) (f (0 11 0)) (cl-lib (0 3)) (rtags (0 0)) (projectile (0 11 0))) "A C/C++ project configuration package for Emacs" single ((:url . "https://github.com/LefterisJP/malinka") (:keywords "c" "c++" "project-management"))]) (malabar-mode . [(20140303 946) ((fringe-helper (1 0 1))) "A better Java mode for Emacs" tar ((:url . "http://www.github.com/m0smith/malabar-mode") (:keywords "java" "maven" "language" "malabar"))]) (makey . [(0 3) ((cl-lib (0 2))) "interactive commandline mode" single nil]) (make-color . [(0 4) nil "Alternative to picking color - update fg/bg color by pressing r/g/b/... keys" single ((:url . "http://github.com/alezost/make-color.el") (:keywords "color"))]) (magit-tramp . [(0 1 0) ((magit (1 2 0))) "git method for TRAMP" single ((:url . "https://github.com/sigma/magit-tramp"))]) (magit-topgit . [(90140807) ((cl-lib (0 3)) (magit (1 3 0))) "topgit plug-in for Magit" single ((:keywords "vc" "tools"))]) (magit-svn . [(90140807) ((cl-lib (0 3)) (magit (1 3 0))) "git-svn plug-in for Magit" single ((:keywords "vc" "tools"))]) (magit-stgit . [(90140807) ((cl-lib (0 3)) (magit (1 3 0))) "StGit plug-in for Magit" single ((:keywords "vc" "tools"))]) (magit-push-remote . [(0 5 0) ((magit (1 3 0))) "push remote support for Magit" single ((:url . "https://github.com/tarsius/magit-push-remote") (:keywords "convenience"))]) (magit-gitflow . [(1 0 0) ((magit (1 3 0))) "gitflow extension for magit" single ((:url . "https://github.com/jtatarik/magit-gitflow") (:keywords "vc" "tools"))]) (magit-gh-pulls . [(0 3) ((gh (0 4 3)) (magit (1 1 0))) "GitHub pull requests extension for Magit" single ((:keywords "tools"))]) (magit-find-file . [(1 0 8) ((magit (1 2 0))) "completing-read over all files in Git" single ((:url . "https://github.com/bradleywright/magit-find-file.el") (:keywords "git"))]) (magit-annex . [(0 10 0) ((cl-lib (0 3)) (magit (1 2 0))) "Use git annex within magit" single ((:url . "https://github.com/kyleam/magit-annex") (:keywords "magit" "git-annex"))]) (magit . [(90140807) ((cl-lib (0 3)) (git-commit-mode (0 14 0)) (git-rebase-mode (0 14 0))) "control Git from Emacs" tar ((:keywords "vc" "tools"))]) (macrostep . [(0 7) nil "interactive macro stepper for Emacs Lisp" single ((:url . "https://github.com/joddie/macrostep") (:keywords "lisp" "languages" "macro" "debugging"))]) (macro-math . [(1 0) nil "in-buffer mathematical operations" single ((:url . "http://nschum.de/src/emacs/macro-math/") (:keywords "convenience"))]) (m-buffer . [(0 4) ((dash (2 5 0)) (emacs (24 3))) "Buffer Manipulation Functions" single nil]) (lua-mode . [(20140514) nil "a major-mode for editing Lua scripts" single ((:url . "http://immerrr.github.com/lua-mode") (:keywords "languages" "processes" "tools"))]) (love-minor-mode . [(1 1) nil "Minor mode for working on LÖVE projects" single ((:url . "https://github.com/ejmr/love-minor-mode"))]) (logito . [(0 1) ((eieio (1 3))) "logging library for Emacs" single ((:keywords "lisp" "tool"))]) (logalimacs . [(1 0 0) nil "Front-end to logaling-command for Ruby gems" single ((:url . "https://github.com/logaling/logalimacs"))]) (log4j-mode . [(1 3) nil "major mode for viewing log files" single ((:keywords "log" "log4j" "java"))]) (literate-coffee-mode . [(0 2) ((coffee-mode (0 5 0))) "major-mode for Literate CoffeeScript" single ((:url . "https://github.com/syohex/emacs-literate-coffee-mode"))]) (list-utils . [(0 4 2) nil "List-manipulation utility functions" single ((:url . "http://github.com/rolandwalker/list-utils") (:keywords "extensions"))]) (lispyscript-mode . [(0 3 5) nil "Major mode for LispyScript code." single ((:url . "https://github.com/krisajenkins/lispyscript-mode") (:keywords "lisp" "languages"))]) (lispy . [(0 13 0) ((helm (1 5 3)) (ace-jump-mode (2 0)) (s (1 4 0)) (noflet (0 0 10)) (multiple-cursors (1 3 0)) (iedit (0 97))) "vi-like Paredit" tar nil]) (linum-relative . [(0 4) nil "display relative line number in emacs." single ((:url . "http://github.com/coldnew/linum-relative") (:keywords "converience"))]) (linked-buffer . [(0 3) nil "No description available." tar nil]) (link . [(1 10) nil "No description available." single nil]) (lingr . [(0 2) nil "Lingr Client for GNU Emacs" single ((:url . "http://github.com/lugecy/lingr-el") (:keywords "chat" "client" "internet"))]) (lfe-mode . [(0 8) nil "Lisp Flavoured Erlang mode" tar nil]) (less-css-mode . [(0 18) nil "Major mode for editing LESS CSS files (lesscss.org)" single ((:url . "https://github.com/purcell/less-css-mode") (:keywords "less" "css" "mode"))]) (ledger-mode . [(3 0 3) nil "Helper code for use with the \"ledger\" command-line tool" tar nil]) (latex-extra . [(1 7 5) ((auctex (11 86 1))) "Adds several useful functionalities to LaTeX-mode." single ((:url . "http://github.com/Bruce-Connor/latex-extra") (:keywords "tex"))]) (langtool . [(1 2 1) nil "Grammer check utility using LanguageTool" single ((:url . "https://github.com/mhayashi1120/Emacs-langtool/raw/master/langtool.el") (:keywords "docs"))]) (know-your-http-well . [(0 2 0) nil "Look up the meaning of HTTP headers, methods, relations, status codes" tar nil]) (kivy-mode . [(1 8 0) nil "Emacs major mode for editing Kivy files" single nil]) (killer . [(0 2 2) nil "kill and delete text" single ((:url . "http://github.com/tarsius/killer") (:keywords "convenience"))]) (kill-ring-search . [(1 1) nil "incremental search for the kill ring" single ((:url . "http://nschum.de/src/emacs/kill-ring-search/") (:keywords "convenience" "matching"))]) (keymap-utils . [(0 4 4) ((cl-lib (0 2))) "Keymap utilities" tar nil]) (keydef . [(1 15) nil "a simpler way to define keys, with kbd syntax" single ((:keywords "convenience" "lisp" "customization" "keyboard" "keys"))]) (keychain-environment . [(2 0 1) nil "load keychain environment variables" single ((:url . "https://github.com/tarsius/keychain-environment") (:keywords "gnupg" "pgp" "ssh"))]) (key-combo . [(1 2) nil "map key sequence to commands" tar ((:url . "https://github.com/uk-ar/key-combo") (:keywords "keyboard" "input"))]) (jump-to-line . [(0 2 0) nil "Jump to line number at point." single ((:keywords "jump" "line" "back" "file" "ruby" "csharp" "python" "perl"))]) (jump . [(2 3) ((findr (0 7)) (inflections (1 1))) "build functions which contextually jump between files" single ((:url . "http://github.com/eschulte/jump.el/tree/master") (:keywords "project" "convenience" "navigation"))]) (jsx-mode . [(0 1 10) nil "major mode for JSX" single ((:url . "https://github.com/jsx/jsx-mode.el"))]) (json-mode . [(1 1 0) nil "Major mode for editing JSON files" single ((:url . "https://github.com/joshwnj/json-mode"))]) (js3-mode . [(1 1 0) nil "An improved JavaScript editing mode" tar ((:keywords "javascript" "languages"))]) (js2-refactor . [(0 6 1) ((js2-mode (20101228)) (multiple-cursors (1 0 0)) (dash (1 0 0)) (s (1 0 0)) (yasnippet (20130218))) "A JavaScript refactoring library for emacs." tar nil]) (js2-mode . [(20140114) ((emacs (24 1))) "Improved JavaScript editing mode" tar ((:url . "https://github.com/mooz/js2-mode/") (:keywords "languages" "javascript"))]) (jedi . [(0 1 2) ((epc (0 1 0)) (auto-complete (1 4))) "Python auto-completion for Emacs" tar nil]) (jabber . [(0 8 92) nil "A Jabber client for Emacs." tar nil]) (j-mode . [(1 1 1) nil "Major mode for editing J programs" tar ((:url . "http://github.com/zellio/j-mode") (:keywords "j" "langauges"))]) (ix . [(0 7) ((grapnel (0 5 3))) "Emacs client for http://ix.io pastebin" single ((:url . "http://www.github.com/theanalyst/ix.el"))]) (irony . [(0 1 0) ((cl-lib (0 5))) "C/C++ minor mode powered by libclang" tar ((:url . "https://github.com/Sarcasm/irony-mode") (:keywords "c" "convenience" "tools"))]) (ir-black-theme . [(1 0 1) nil "Port of ir-black theme" single ((:keywords "faces"))]) (instapaper . [(0 9 5) nil "No description available." single nil]) (insert-shebang . [(0 9 3) nil "Insert shebang line automatically." single ((:url . "http://github.com/psachin/insert-shebang") (:keywords "shebang" "tool" "convenience"))]) (inline-crypt . [(0 1 4) nil "Simple inline encryption via openssl" tar nil]) (initsplit . [(1 6) nil "No description available." single nil]) (inflections . [(2 3) nil "convert english words between singular and plural" single ((:url . "https://github.com/eschulte/jump.el") (:keywords "ruby" "rails" "languages" "oop"))]) (inf-ruby . [(2 2 4) nil "Run a ruby process in a buffer" single ((:url . "http://github.com/nonsequitur/inf-ruby") (:keywords "languages" "ruby"))]) (import-popwin . [(0 8) ((popwin (0 6)) (cl-lib (0 5))) "popwin buffer near by import statements with popwin" single ((:url . "https://github.com/syohex/emacs-import-popwin"))]) (immutant-server . [(1 2 0) nil "Run your Immutant server in Emacs" single ((:url . "http://www.github.com/leathekd/immutant-server.el"))]) (ignoramus . [(0 7 0) nil "Ignore backups, build files, et al." single ((:url . "http://github.com/rolandwalker/ignoramus") (:keywords "convenience" "tools"))]) (iflipb . [(1 2) nil "interactively flip between recently visited buffers" single ((:url . "http://hg.rosdahl.net/iflipb"))]) (idris-mode . [(0 9 14) ((emacs (24))) "Major mode for editing Idris code" tar ((:url . "https://github.com/idris-hackers/idris-mode") (:keywords "languages"))]) (ido-ubiquitous . [(2 13) ((emacs (24 1))) "Use ido (nearly) everywhere." single ((:url . "https://github.com/DarwinAwardWinner/ido-ubiquitous") (:keywords "convenience"))]) (ido-load-library . [(0 2 0) ((persistent-soft (0 8 8)) (pcache (0 2 3))) "Load-library alternative using ido-completing-read" single ((:url . "http://github.com/rolandwalker/ido-load-library") (:keywords "maint" "completion"))]) (ido-complete-space-or-hyphen . [(1 1) nil "No description available." single nil]) (idle-highlight-mode . [(1 1 3) nil "highlight the word the point is on" single ((:url . "http://www.emacswiki.org/cgi-bin/wiki/IdleHighlight") (:keywords "convenience"))]) (identica-mode . [(1 3 1) nil "Major mode API client for status.net open microblogging" tar ((:url . "http://blog.gabrielsaldana.org/identica-mode-for-emacs/") (:keywords "identica" "web"))]) (ibuffer-vc . [(0 7) ((cl-lib (0 2))) "Group ibuffer's list by VC project, or show VC status" single ((:url . "http://github.com/purcell/ibuffer-vc") (:keywords "themes"))]) (hyde . [(0 2) nil "No description available." tar nil]) (httprepl . [(1 1) ((s (1 9 0)) (dash (2 5 0)) (emacs (24))) "An HTTP REPL" single ((:url . "https://github.com/gregsexton/httprepl.el") (:keywords "http" "repl"))]) (httpcode . [(0 1) nil "explains the meaning of an HTTP status code" single ((:url . "http://github.com/rspivak/httpcode.el"))]) (hl-todo . [(1 3 1) nil "highlight TODO keywords" single ((:url . "http://github.com/tarsius/hl-todo") (:keywords "convenience"))]) (hl-sexp . [(1 0 0) nil "highlight the current sexp" single ((:keywords "faces" "frames" "emulation"))]) (hl-sentence . [(3) nil "highlight a sentence based on customizable face" single ((:url . "http://github.com/milkypostman/hl-sentence") (:keywords "highlighting"))]) (historyf . [(0 0 8) nil "file history library like browser" single ((:url . "https://github.com/k1LoW/emacs-historyf"))]) (hippie-namespace . [(0 5 8) nil "Special treatment for namespace prefixes in hippie-expand" single ((:url . "http://github.com/rolandwalker/hippie-namespace") (:keywords "convenience" "lisp" "tools" "completion"))]) (hippie-expand-slime . [(0 1) nil "Hook slime's completion into hippie-expand" single ((:url . "https://github.com/purcell/hippie-expand-slime"))]) (highlight-symbol . [(1 2) nil "automatic and manual symbol highlighting" single ((:url . "http://nschum.de/src/emacs/highlight-symbol/") (:keywords "faces" "matching"))]) (highlight-parentheses . [(1 0 2) nil "highlight surrounding parentheses" single ((:url . "http://nschum.de/src/emacs/highlight-parentheses/") (:keywords "faces" "matching"))]) (highlight-numbers . [(0 2) ((emacs (24)) (parent-mode (2 0))) "Highlight numbers in source code" single ((:url . "https://github.com/Fanael/highlight-numbers"))]) (highlight-defined . [(0 1 5) ((emacs (24))) "Syntax highlighting of known Elisp symbols" single ((:url . "https://github.com/Fanael/highlight-defined"))]) (highlight-blocks . [(0 1 4) ((emacs (24))) "Highlight the blocks point is in" single ((:url . "https://github.com/Fanael/highlight-blocks"))]) (helm-themes . [(0 3) ((helm (1 0))) "Color theme selection with helm interface" single ((:url . "https://github.com/syohex/emacs-helm-themes"))]) (helm-spaces . [(0 2) ((helm (1 0)) (spaces (0 1 0))) "helm sources for spaces" single ((:url . "https://github.com/yasuyk/helm-spaces") (:keywords "helm" "frames" "convenience"))]) (helm-robe . [(0 1) ((helm (1 0))) "completing read function for robe" single ((:url . "https://github.com/syohex/emacs-helm-robe"))]) (helm-pydoc . [(0 6) ((helm (1 0)) (cl-lib (0 5))) "pydoc with helm interface" tar ((:url . "https://github.com/syohex/emacs-helm-pydoc"))]) (helm-projectile . [(0 11 0) ((helm (1 4 0)) (projectile (0 11 0)) (cl-lib (0 3))) "Helm integration for Projectile" single ((:url . "https://github.com/bbatsov/projectile") (:keywords "project" "convenience"))]) (helm-proc . [(0 0 4) ((helm (1 6 0))) "Helm interface for managing system processes" tar nil]) (helm-perldoc . [(0 7) ((helm (1 0)) (deferred (0 3 1)) (cl-lib (0 5))) "perldoc with helm interface" tar ((:url . "https://github.com/syohex/emacs-helm-perldoc"))]) (helm-package . [(0 2) ((helm (1 0)) (cl-lib (0 3))) "Listing ELPA packages with helm interface" single ((:url . "https://github.com/syohex/emacs-helm-package"))]) (helm-open-github . [(0 11) ((helm (1 0)) (gh (1 0)) (cl-lib (0 5))) "Utilities of Opening Github Page" single ((:url . "https://github.com/syohex/emacs-helm-open-github"))]) (helm-hayoo . [(0 0 5) ((helm (1 6 0)) (json (1 2)) (haskell-mode (13 7))) "Source and configured helm for searching hayoo" single ((:keywords "helm"))]) (helm-gtags . [(1 2 8) ((helm (1 5 6)) (cl-lib (0 5))) "GNU GLOBAL helm interface" single ((:url . "https://github.com/syohex/emacs-helm-gtags"))]) (helm-github-stars . [(1 1 1) ((helm (1 5 5))) "Helm integration for your starred repositories on github" single ((:keywords "helm" "github" "stars"))]) (helm-ghq . [(1 2 0) ((helm (1 6 2))) "ghq with helm interface" single ((:url . "https://github.com/masutaka/emacs-helm-ghq"))]) (helm-descbinds . [(1 7 1) nil "Yet Another `describe-bindings' with `helm'." single ((:keywords "helm" "help"))]) (helm-dash . [(1 0 0) ((helm (0 0 0))) "Helm extension to search dash docsets" single ((:keywords "docs"))]) (helm-backup . [(0 2 0) ((helm (1 5 5)) (s (1 8 0))) "Backup each file change using git" single ((:url . "http://github.com/antham/helm-backup") (:keywords "backup"))]) (helm-ag . [(0 25) ((helm (1 5 6)) (cl-lib (0 5))) "the silver searcher with helm interface" single ((:url . "https://github.com/syohex/emacs-helm-ag"))]) (helm-ack . [(0 12) ((helm (1 0)) (cl-lib (0 5))) "Ack command with helm interface" single ((:url . "https://github.com/syohex/emacs-helm-ack"))]) (helm . [(1 6 3) nil "Helm is an Emacs incremental and narrowing framework" tar nil]) (header-button . [(0 3 0) nil "clickable buttons in header lines" single ((:url . "https://github.com/emacsattic/header-button") (:keywords "extensions"))]) (haskell-mode . [(13 10) nil "A Haskell editing mode" tar nil]) (hardhat . [(0 4 4) ((ignoramus (0 7 0))) "Protect against clobbering user-writable files" single ((:url . "http://github.com/rolandwalker/hardhat") (:keywords "convenience"))]) (haml-mode . [(3 1 5) ((ruby-mode (1 0))) "Major mode for editing Haml files" single ((:url . "http://github.com/nex3/haml/tree/master") (:keywords "markup" "language" "html"))]) (ham-mode . [(1 1 1) ((html-to-markdown (1 2)) (markdown-mode (2 0))) "Html As Markdown. Transparently edit an html file using markdown." single ((:url . "http://github.com/Bruce-Connor/ham-mode") (:keywords "convenience" "emulation" "wp"))]) (hackernews . [(0 2) ((json (1 2))) "Access the hackernews aggregator from Emacs" tar nil]) (guru-mode . [(0 2) nil "Become an Emacs guru" single ((:url . "https://github.com/bbatsov/guru-mode") (:keywords "convenience"))]) (gruber-darker-theme . [(0 6) nil "Gruber Darker color theme for Emacs 24." single ((:url . "http://github.com/rexim/gruber-darker-theme"))]) (groovy-mode . [(201311291207.0) nil "Groovy mode derived mode" tar nil]) (grizzl . [(0 1 1) nil "Fuzzy Search Library & Completing Read" tar nil]) (grin . [(1 0) nil "run grin and grind (python replacements for grep and find) putting hits in a grep buffer" single ((:url . "http://bitbucket.org/dariusp686/emacs-grin") (:keywords "python" "grin" "grind" "grep" "find"))]) (grass-mode . [(0 1) ((cl-lib (0 2))) "Provides Emacs modes for interacting with the GRASS GIS program" single ((:keywords "grass" "gis"))]) (grapnel . [(0 5 3) nil "HTTP request lib with flexible callback dispatch" single ((:url . "http://www.github.com/leathekd/grapnel"))]) (graphene . [(1 0) ((auto-complete (20130330)) (smartparens (20130329)) (multi-web-mode (20130205)) (smex (20120915)) (sr-speedbar (20130309)) (project-persist (20130309)) (exec-path-from-shell (20121108))) "A set of defaults targeted at GUI text editor diaspora." tar nil]) (gradle-mode . [(0 5 4) ((s (1 8 0))) "Gradle integration with Emacs' compile" single ((:url . "http://github.com/jacobono/emacs-gradle-mode") (:keywords "gradle"))]) (goto-gem . [(1 2) ((s (1 9 0))) "Open dired in gem directory" single ((:keywords "gemfile" "convenience"))]) (google-translate . [(0 9 2) nil "Emacs interface to Google Translate." tar nil]) (google-this . [(1 8) nil "A set of functions and bindings to google under point." single ((:url . "http://github.com/Bruce-Connor/emacs-google-this") (:keywords "convenience" "hypermedia"))]) (golden-ratio . [(0 0 4) nil "Automatic resizing of Emacs windows to the golden ratio" single ((:keywords "window" "resizing"))]) (go-eldoc . [(0 17) ((go-mode (0)) (cl-lib (0 5))) "eldoc for go-mode" single ((:url . "https://github.com/syohex/emacs-go-eldoc"))]) (go-direx . [(0 3) ((direx (0 1 -3)) (cl-lib (0 5))) "Tree style source code viewer for Go language" single ((:url . "https://github.com/syohex/emacs-go-direx"))]) (gnus-desktop-notify . [(1 4) ((gnus (1 0))) "Gnus Desktop Notification global minor mode" single ((:url . "http://www.thregr.org/~wavexx/hacks/gnus-desktop-notify/"))]) (gnuplot . [(0 6 1) nil "No description available." tar nil]) (gmail-message-mode . [(1 3 1) ((ham-mode (1 0))) "A major-mode for editing gmail messages using markdown syntax." single ((:url . "http://github.com/Bruce-Connor/gmail-message-mode") (:keywords "mail" "convenience" "emulation"))]) (gitignore-mode . [(0 15 0) nil "Major mode for editing .gitignore files" single ((:url . "https://github.com/magit/git-modes") (:keywords "convenience" "vc" "git"))]) (gitconfig-mode . [(0 15 0) nil "Major mode for editing .gitconfig files" single ((:url . "https://github.com/magit/git-modes") (:keywords "convenience" "vc" "git"))]) (gitconfig . [(1 0 0) nil "Emacs lisp interface to work with git-config variables" single ((:keywords "git" "gitconfig" "git-config"))]) (gitattributes-mode . [(0 15 0) nil "Major mode for editing .gitattributes files" single ((:url . "https://github.com/magit/git-modes") (:keywords "convenience" "vc" "git"))]) (git-timemachine . [(1 5) ((cl-lib (0 5))) "Walk through git revisions of a file" single ((:url . "https://github.com/pidu/git-timemachine") (:keywords "git"))]) (git-rebase-mode . [(0 15 0) nil "Major mode for editing git rebase files" single ((:url . "https://github.com/magit/git-modes") (:keywords "convenience" "vc" "git"))]) (git-messenger . [(0 13) ((popup (0 5 0))) "Pop up last commit information of current line" single ((:url . "https://github.com/syohex/emacs-git-messenger"))]) (git-link . [(0 0 2) nil "Get the GitHub/Bitbucket/Gitorious URL for a buffer location" single ((:url . "http://github.com/sshaw/git-link"))]) (git-gutter-fringe . [(0 20) ((git-gutter (0 71)) (fringe-helper (0 1 1)) (cl-lib (0 5)) (emacs (24))) "Fringe version of git-gutter.el" single ((:url . "https://github.com/syohex/emacs-git-gutter-fringe"))]) (git-gutter-fringe+ . [(0 1) ((git-gutter+ (0 1)) (fringe-helper (20130519 1641))) "Fringe version of git-gutter+.el" single ((:url . "https://github.com/nonsequitur/git-gutter-fringe-plus"))]) (git-gutter . [(0 72) ((cl-lib (0 5)) (emacs (24))) "Port of Sublime Text plugin GitGutter" single ((:url . "https://github.com/syohex/emacs-git-gutter"))]) (git-gutter+ . [(0 2) nil "Manage Git hunks straight from the buffer" single ((:url . "https://github.com/nonsequitur/git-gutter-plus"))]) (git-commit-mode . [(0 15 0) nil "Major mode for editing git commit messages" single ((:url . "https://github.com/magit/git-modes") (:keywords "convenience" "vc" "git"))]) (git-auto-commit-mode . [(4 2 2) nil "Emacs Minor mode to automatically commit and push" single ((:url . "http://ryuslash.org/projects/git-auto-commit-mode/") (:keywords "vc"))]) (git . [(0 1 1) ((s (1 7 0)) (dash (2 2 0)) (f (0 10 0))) "An Elisp API for programmatically using Git" single ((:url . "http://github.com/rejeep/git.el") (:keywords "git"))]) (gist . [(1 1 0) ((eieio (1 3)) (gh (0 7 0)) (tabulated-list (0))) "Emacs integration for gist.github.com" single ((:keywords "gist" "git" "github" "paste" "pastie" "pastebin"))]) (ghc . [(4 1 6) nil "Sub mode for Haskell mode" tar nil]) (gh . [(0 8 0) ((eieio (1 3)) (pcache (0 2 4)) (logito (0 1))) "A GitHub library for Emacs" tar nil]) (ggtags . [(0 8 5) ((emacs (24)) (cl-lib (0 5))) "emacs frontend to GNU Global source code tagging system" single ((:url . "https://github.com/leoliu/ggtags") (:keywords "tools" "convenience"))]) (ggo-mode . [(20130521) nil "Gengetopt major mode" single ((:keywords "extensions" "convenience" "local"))]) (geiser . [(0 5) nil "GNU Emacs and Scheme talk to each other" tar nil]) (gather . [(1 0 5) nil "Gather string in buffer." single ((:url . "https://github.com/mhayashi1120/Emacs-gather/raw/master/gather.el") (:keywords "matching" "convenience" "tools"))]) (fwb-cmds . [(0 4 0) nil "misc frame, window and buffer commands" single ((:url . "http://github.com/tarsius/fwb-cmds") (:keywords "convenience"))]) (fvwm-mode . [(1 6 4) nil "major mode for editing Fvwm configuration files" single ((:keywords "files"))]) (fuzzy . [(0 1) nil "Fuzzy Matching" single ((:keywords "convenience"))]) (full-ack . [(1 0) nil "a front-end for ack" single ((:url . "http://nschum.de/src/emacs/full-ack/") (:keywords "tools" "matching"))]) (fuel . [(0 96) nil "No description available." tar nil]) (fringe-helper . [(1 0 1) nil "helper functions for fringe bitmaps" single ((:url . "http://nschum.de/src/emacs/fringe-helper/") (:keywords "lisp"))]) (frame-restore . [(0 5) ((emacs (24 1))) "Restore Emacs frame" single ((:url . "https://github.com/lunaryorn/frame-restore.el") (:keywords "frames" "convenience"))]) (fountain-mode . [(1 3 2) ((s (1 9 0))) "Major mode for screenwriting in Fountain markup" single ((:url . "https://github.com/rnkn/fountain-mode/") (:keywords "wp"))]) (font-utils . [(0 7 2) ((persistent-soft (0 8 8)) (pcache (0 2 3))) "Utility functions for working with fonts" single ((:url . "http://github.com/rolandwalker/font-utils") (:keywords "extensions"))]) (fold-this . [(0 2 0) nil "Just fold this region please" single ((:keywords "convenience"))]) (fold-dwim-org . [(0 6) ((fold-dwim (1 2))) "Fold DWIM bound to org key-strokes." single ((:url . "https://github.com/mlf176f2/fold-dwim-org") (:keywords "folding" "emacs" "org-mode"))]) (fold-dwim . [(1 2) nil "No description available." single nil]) (fm . [(1 0) nil "follow mode for compilation/output buffers" single ((:keywords "outlines"))]) (flyspell-lazy . [(0 6 6) nil "Improve flyspell responsiveness using idle timers" single ((:url . "http://github.com/rolandwalker/flyspell-lazy") (:keywords "spelling"))]) (flymake-shell . [(0 8) ((flymake-easy (0 1))) "A flymake syntax-checker for shell scripts" single ((:url . "https://github.com/purcell/flymake-shell"))]) (flymake-sass . [(0 6) ((flymake-easy (0 1))) "Flymake handler for sass files" single ((:url . "https://github.com/purcell/flymake-sass"))]) (flymake-ruby . [(0 8) ((flymake-easy (0 1))) "A flymake handler for ruby-mode files" single ((:url . "https://github.com/purcell/flymake-ruby"))]) (flymake-python-pyflakes . [(0 9) ((flymake-easy (0 8))) "A flymake handler for python-mode files using pyflakes (or flake8)" single ((:url . "https://github.com/purcell/flymake-python-pyflakes"))]) (flymake-php . [(0 5) ((flymake-easy (0 1))) "A flymake handler for php-mode files" single ((:url . "https://github.com/purcell/flymake-php"))]) (flymake-perlcritic . [(1 0 3) ((flymake (0 3))) "Flymake handler for Perl to invoke Perl::Critic" tar ((:url . "https://github.com/illusori/emacs-flymake-perlcritic"))]) (flymake-json . [(0 1) ((flymake-easy (0 1))) "A flymake handler for json using jsonlint" single ((:url . "https://github.com/purcell/flymake-json"))]) (flymake-jslint . [(0 23) nil "Flymake support for javascript using jslint" single ((:url . "https://github.com/purcell/flymake-jslint"))]) (flymake-hlint . [(0 2) ((flymake-easy (0 1))) "A flymake handler for haskell-mode files using hlint" single ((:url . "https://github.com/purcell/flymake-hlint"))]) (flymake-haskell-multi . [(0 3) ((flymake-easy (0 1))) "Syntax-check haskell-mode using both ghc and hlint" tar nil]) (flymake-haml . [(0 8) ((flymake-easy (0 1))) "A flymake handler for haml files" single ((:url . "https://github.com/purcell/flymake-haml"))]) (flymake-gjshint . [(0 0 6) nil "A flymake handler for javascript using both jshint and gjslint" single ((:keywords "flymake" "javascript" "jshint" "gjslint"))]) (flymake-easy . [(0 9) nil "Helpers for easily building flymake checkers" single ((:url . "https://github.com/purcell/flymake-easy") (:keywords "convenience" "internal"))]) (flymake-css . [(0 3) ((flymake-easy (0 1))) "Flymake support for css using csslint" single ((:url . "https://github.com/purcell/flymake-css"))]) (flymake-coffee . [(0 12) ((flymake-easy (0 1))) "A flymake handler for coffee script" single ((:url . "https://github.com/purcell/flymake-coffee"))]) (flycheck-ledger . [(0 4) ((flycheck (0 15))) "Flycheck integration for ledger files" single ((:keywords "convenience" "languages" "tools"))]) (flycheck-hdevtools . [(0 3) ((flycheck (0 15))) "A flycheck checker for Haskell using hdevtools" single ((:url . "https://github.com/flycheck/flycheck-hdevtools") (:keywords "convenience" "languages" "tools"))]) (flycheck-haskell . [(0 4) ((flycheck (0 16)) (haskell-mode (13 7)) (dash (2 4 0)) (f (0 11 0))) "Flycheck: Cabal projects and sandboxes" single ((:url . "https://github.com/flycheck/flycheck-haskell") (:keywords "tools" "convenience"))]) (flycheck-dmd-dub . [(0 4) nil "Sets flycheck-dmd-include-paths from dub package information" single ((:url . "http://github.com/atilaneves/flycheck-dmd-dub") (:keywords "languages"))]) (flycheck-color-mode-line . [(0 2) ((flycheck (0 13)) (dash (1 2)) (emacs (24 1))) "Change mode line color with Flycheck status" single ((:keywords "convenience" "language" "tools"))]) (flycheck-cask . [(0 1) ((flycheck (0 14)) (dash (2 0 0)) (f (0 6 0))) "Cask support in Flycheck" single ((:url . "https://github.com/flycheck/flycheck-cask") (:keywords "tools" "convenience"))]) (flycheck . [(0 19) ((s (1 9 0)) (dash (2 4 0)) (f (0 11 0)) (pkg-info (0 4)) (cl-lib (0 3)) (emacs (24 1))) "Modern on-the-fly syntax checking for GNU Emacs" tar ((:url . "https://flycheck.readthedocs.org") (:keywords "convenience" "languages" "tools"))]) (flx-ido . [(0 5) ((flx (0 1)) (cl-lib (0 3))) "flx integration for ido" single ((:url . "https://github.com/lewang/flx"))]) (flx . [(0 5) ((cl-lib (0 3))) "fuzzy matching with good sorting" single ((:url . "https://github.com/lewang/flx"))]) (floobits . [(1 5 8) ((json (1 2)) (highlight (0))) "Floobits plugin for real-time collaborative editing" tar ((:url . "http://github.com/Floobits/floobits-emacs") (:keywords "comm" "tools"))]) (fixmee . [(0 8 4) ((button-lock (1 0 0)) (nav-flash (1 0 0)) (back-button (0 6 0)) (smartrep (0 0 3)) (string-utils (0 3 2)) (tabulated-list (0))) "Quickly navigate to FIXME notices in code" single ((:url . "http://github.com/rolandwalker/fixmee") (:keywords "navigation" "convenience"))]) (fiplr . [(0 2 4) ((grizzl (0 1 0))) "Fuzzy Search for Files in Projects" tar nil]) (find-file-in-repository . [(1 2) nil "Quickly find files in a git, mercurial or other repository" single ((:url . "https://github.com/hoffstaetter/find-file-in-repository") (:keywords "files" "convenience" "repository" "project" "source control"))]) (find-file-in-project . [(3 3) nil "Find files in a project quickly." single ((:url . "http://www.emacswiki.org/cgi-bin/wiki/FindFileInProject") (:keywords "project" "convenience"))]) (finalize . [(1 0 0) ((emacs (24 1)) (cl-lib (0 3)) (eieio (1 4))) "finalizers for Emacs Lisp" tar nil]) (fill-column-indicator . [(1 81) nil "Graphically indicate the fill column" tar ((:keywords "convenience"))]) (fastnav . [(1 0 7) nil "Fast navigation and editing routines." single ((:keywords "nav" "fast" "fastnav" "navigation"))]) (fasm-mode . [(0 1 9) nil "Fasm major mode" single ((:url . "https://github.com/Fanael/fasm-mode"))]) (fancy-narrow . [(0 9 4) nil "narrow-to-region with more eye candy." single ((:url . "http://github.com/Bruce-Connor/fancy-narrow-region") (:keywords "faces" "convenience"))]) (fancy-battery . [(0 2) ((emacs (24 1))) "Fancy battery display" single ((:url . "https://github.com/lunaryorn/fancy-battery.el") (:keywords "convenience" "tools" "hardware"))]) (factlog . [(0 0 1) nil "File activity logger" single nil]) (fabric . [(0 1 0) nil "Launch Fabric using Emacs" tar ((:url . "https://github.com/nlamirault/fabric.el") (:keywords "python" "fabric"))]) (f . [(0 16 2) ((s (1 7 0)) (dash (2 2 0))) "Modern API for working with files and directories" single ((:url . "http://github.com/rejeep/f.el") (:keywords "files" "directories"))]) (eyebrowse . [(0 2 1) ((dash (2 4 0)) (s (1 4 0)) (emacs (24))) "Easy window config switching" single ((:url . "https://github.com/wasamasa/eyebrowse") (:keywords "convenience"))]) (extend-dnd . [(0 5) nil "R drag and Drop" tar ((:url . "https://github.com/mlf176f2/extend-dnd") (:keywords "extend" "drag and drop"))]) (express . [(0 6 0) ((string-utils (0 3 2))) "Alternatives to `message'" single ((:url . "http://github.com/rolandwalker/express") (:keywords "extensions" "message" "interface"))]) (expand-region . [(0 10 0) nil "Increase selected region by semantic units." tar nil]) (exec-path-from-shell . [(1 8) nil "Get environment variables such as $PATH from the shell" single ((:url . "https://github.com/purcell/exec-path-from-shell") (:keywords "environment"))]) (eww-lnum . [(1 0) nil "Operations using link numbers" single ((:url . "https://github.com/m00natic/eww-lnum") (:keywords "eww" "browse" "conkeror"))]) (evm . [(0 4 1) ((dash (2 3 0)) (f (0 13 0))) "Emacs Version Manager" single ((:url . "http://github.com/rejeep/evm"))]) (evil-visualstar . [(0 0 1) ((evil (0))) "Starts a * or # search from the visual selection" single ((:url . "https://github.com/bling/evil-visualstar") (:keywords "evil" "vim" "visualstar"))]) (evil-space . [(0 0 2) ((evil (1 0 0))) "Repeat motion in Evil. Correct the behaviour of what SPC should do." single ((:url . "http://github.com/linktohack/evil-space") (:keywords "space" "repeat" "motion"))]) (evil-numbers . [(0 4) nil "increment/decrement numbers like in vim" single ((:url . "http://github.com/cofi/evil-numbers") (:keywords "numbers" "increment" "decrement" "octal" "hex" "binary"))]) (evil-nerd-commenter . [(1 5 2) nil "Comment/uncomment lines efficiently. Like Nerd Commenter in Vim" tar nil]) (evil-matchit . [(1 3 2) nil "Vim matchit ported into Emacs (requires EVIL)" tar nil]) (evil-leader . [(0 4 2) ((evil (0))) "let there be " single ((:url . "http://github.com/cofi/evil-leader") (:keywords "evil" "vim-emulation" "leader"))]) (evil-jumper . [(0 0 1) ((evil (0))) "Jump like vimmers do!" single ((:url . "https://github.com/bling/evil-jumper") (:keywords "evil" "vim" "jumplist" "jump" "list"))]) (evil-args . [(1 0) ((evil (1 0 8))) "Motions and text objects for delimited arguments in Evil." single ((:url . "http://github.com/wcsmith/evil-args") (:keywords "evil" "vim-emulation"))]) (evil . [(1 0 9) ((undo-tree (0 6 3)) (goto-last-change (1 2))) "Extensible Vi layer for Emacs." tar nil]) (eval-sexp-fu . [(0 4 0) nil "Tiny functionality enhancements for evaluating sexps." single ((:keywords "lisp" "highlight" "convenience"))]) (esup . [(0 4) nil "the Emacs StartUp Profiler (ESUP)" single ((:url . "http://github.com/jschaf/esup") (:keywords "emacs-lisp" "elisp" "profile" "startup"))]) (ess-smart-underscore . [(0 79) nil "Ess Smart Underscore" tar ((:url . "http://github.com/mlf176f2/ess-smart-underscore.el") (:keywords "ess" "underscore"))]) (ess . [(13 9) nil "No description available." tar nil]) (espuds . [(0 2 6) ((s (1 7 0)) (dash (2 2 0)) (noflet (0 0 10)) (f (0 12 1))) "Ecukes step definitions" single ((:url . "http://github.com/ecukes/espuds") (:keywords "test"))]) (es-windows . [(0 3) ((cl-lib (0 3)) (emacs (24))) "Window-management utilities" single ((:url . "https://github.com/sabof/es-windows"))]) (es-mode . [(3 0 0) nil "A major mode for editing Elasticsearch queries" tar ((:url . "http://www.github.com/dakrone/es-mode") (:keywords "elasticsearch"))]) (ert-runner . [(0 6 3) ((s (1 6 1)) (dash (1 8 0)) (f (0 10 0)) (commander (0 2 0)) (ansi (0 1 0)) (shut-up (0 1 0))) "Opinionated Ert testing workflow" tar ((:url . "http://github.com/rejeep/ert-runner.el") (:keywords "test"))]) (ert-async . [(0 1 0) nil "Async support for ERT" single ((:url . "http://github.com/rejeep/ert-async.el") (:keywords "test"))]) (ergoemacs-mode . [(5 14 7 3) ((emacs (24 1)) (undo-tree (0 6 5))) "Emacs mode based on common modern interface and ergonomics." tar ((:url . "https://github.com/ergoemacs/ergoemacs-mode") (:keywords "convenience"))]) (ercn . [(1 0 2) nil "Flexible ERC notifications" single ((:url . "http://www.github.com/leathekd/ercn"))]) (erc-hl-nicks . [(1 3 0) nil "ERC nick highlighter that ignores uniquifying chars when colorizing" single ((:url . "http://www.github.com/leathekd/erc-hl-nicks"))]) (erc-crypt . [(1 0) nil "Symmetric Encryption for ERC" single ((:keywords "application"))]) (epl . [(0 7) ((cl-lib (0 3))) "Emacs Package Library" single ((:url . "http://github.com/cask/epl") (:keywords "convenience"))]) (epc . [(0 1 0) ((concurrent (0 3 1)) (ctable (0 1 0))) "A RPC stack for the Emacs Lisp" tar ((:url . "https://github.com/kiwanami/emacs-epc") (:keywords "lisp" "rpc"))]) (enotify . [(0 1 3) nil "No description available." tar nil]) (emmet-mode . [(1 0 8) nil "Unofficial Emmet's support for emacs" single ((:url . "https://github.com/smihica/emmet-mode") (:keywords "convenience"))]) (emamux . [(0 12) ((cl-lib (0 5))) "Interact with tmux" single ((:url . "https://github.com/syohex/emacs-emamux"))]) (emacsql . [(1 0 2) ((emacs (24 3)) (cl-lib (0 3)) (finalize (1 0 0))) "high-level SQL database front-end" tar ((:url . "https://github.com/skeeto/emacsql"))]) (emacsc . [(1 2 20131027) nil "helper for emacsc(1)" tar ((:url . "https://github.com/knu/emacsc") (:keywords "tools"))]) (emacs-setup . [(1 0) nil "Package for maintaining your emacs configuration. Clean up your .emacs!" tar nil]) (emacs-eclim . [(0 2) nil "No description available." tar nil]) (elx . [(0 9 6) ((emacs (24 3 50))) "extract information from Emacs Lisp libraries" single ((:url . "https://github.com/tarsius/elx") (:keywords "docs" "libraries" "packages"))]) (elpy . [(1 5 0) ((company (0 8 2)) (find-file-in-project (3 3)) (highlight-indentation (0 5 0)) (idomenu (0 1)) (pyvenv (1 3)) (yasnippet (0 8 0))) "Emacs Python Development Environment" tar nil]) (elpa-audit . [(0 4) nil "Handy functions for inspecting and comparing package archives" single ((:url . "https://github.com/purcell/elpa-audit") (:keywords "maint"))]) (elmine . [(0 3) nil "No description available." single nil]) (elixir-mode . [(1 4 1) nil "Major mode for editing Elixir files" tar ((:url . "https://github.com/elixir-lang/emacs-elixir") (:keywords "languages" "elixir"))]) (elixir-mix . [(0 3 0) nil "Emacs integration for Elixir's mix" single ((:url . "http://github.com/tonini/elixir-mix.el") (:keywords "elixir" "mix" "elixir-mix"))]) (elisp-slime-nav . [(0 7) ((cl-lib (0 2))) "Make M-. and M-, work in elisp like they do in slime" single ((:url . "https://github.com/purcell/elisp-slime-nav") (:keywords "navigation" "slime" "elisp" "emacs-lisp"))]) (elfeed-web . [(1 1 1) ((simple-httpd (1 4 3)) (elfeed (1 0 1)) (emacs (24 1))) "web interface to Elfeed" tar nil]) (elfeed . [(1 1 1) ((emacs (24 1))) "an Emacs Atom/RSS feed reader" tar nil]) (el-x . [(0 3 0) nil "main entry point for el-x package" tar ((:keywords "lisp"))]) (el-spice . [(0 2 2) ((thingatpt+ (0))) "Extra spice for emacs lisp programming" tar ((:url . "https://github.com/vedang/el-spice") (:keywords "configuration"))]) (el-mock . [(1 25 0) nil "Tiny Mock and Stub framework in Emacs Lisp" single ((:url . "http://github.com/rejeep/el-mock.el") (:keywords "lisp" "testing" "unittest"))]) (el-get . [(5 1) nil "Manage the external elisp bits and pieces you depend upon" tar ((:url . "http://www.emacswiki.org/emacs/el-get") (:keywords "emacs" "package" "elisp" "install" "elpa" "git" "git-svn" "bzr" "cvs" "svn" "darcs" "hg" "apt-get" "fink" "pacman" "http" "http-tar" "emacswiki"))]) (el-autoyas . [(0 5) nil "Automatically create Emacs-Lisp Yasnippets" tar ((:url . "https://github.com/mlf176f2/el-autoyas.el") (:keywords "emacs" "lisp" "mode" "yasnippet"))]) (ein . [(0 2 0) ((websocket (0 9)) (auto-complete (1 4))) "Emacs IPython Notebook" tar nil]) (eide . [(2 0 0) nil "Emacs-IDE" tar ((:url . "http://emacs-ide.tuxfamily.org/"))]) (egison-mode . [(3 3 10) nil "Egison editing mode" single ((:url . "https://github.com/egisatoshi/egison3/blob/master/elisp/egison-mode.el"))]) (edts . [(0 1 0) nil "No description available." tar nil]) (editorconfig . [(0 3) nil "EditorConfig Emacs extension" single ((:url . "http://github.com/editorconfig/editorconfig-emacs#readme"))]) (edit-server . [(1 13) nil "server that responds to edit requests from Chrome" single ((:url . "https://github.com/stsquad/emacs_chrome"))]) (edit-list . [(0 3) nil "edit a single list" single ((:url . "http://mwolson.org/static/dist/elisp/edit-list.el"))]) (edbi . [(0 1 2) ((concurrent (0 3 1)) (ctable (0 1 1)) (epc (0 1 1))) "Emacs Database Interface" tar nil]) (ecukes . [(0 6 15) ((commander (0 6 1)) (espuds (0 2 2)) (ansi (0 3 0)) (dash (2 2 0)) (s (1 8 0)) (f (0 11 0))) "Cucumber for Emacs." tar nil]) (ecb . [(2 -3 24) nil "a code browser for Emacs" tar ((:keywords "browser" "code" "programming" "tools"))]) (ebib . [(1 15 6) nil "a BibTeX database manager" tar ((:keywords "text" "bibtex"))]) (easy-kill-extras . [(0 9 1) ((easy-kill (0 9 4))) "Extra functions for easy-kill." single ((:url . "https://github.com/knu/easy-kill-extras.el") (:keywords "killing" "convenience"))]) (easy-kill . [(0 9 3) ((emacs (24)) (cl-lib (0 5))) "kill & mark things easily" tar ((:url . "https://github.com/leoliu/easy-kill") (:keywords "killing" "convenience"))]) (e2wm-R . [(0 4) ((e2wm (1 2))) "some e2wm plugin and perspective for GNU R" single ((:keywords "window manager" "convenience" "e2wm"))]) (e2wm . [(1 3) nil "simple window manager for emacs" tar ((:keywords "tools" "window manager"))]) (dynamic-fonts . [(0 6 4) ((font-utils (0 7 0)) (persistent-soft (0 8 8)) (pcache (0 2 3))) "Set faces based on available fonts" single ((:url . "http://github.com/rolandwalker/dynamic-fonts") (:keywords "faces" "frames"))]) (dvorak-mode . [(1 0 0) nil "Switch to dvorak layout easily" single ((:url . "https://github.com/proofit404/dvorak-mode"))]) (ducpel . [(0 1) ((cl-lib (0 5))) "Logic game with sokoban elements" tar ((:url . "https://github.com/alezost/ducpel") (:keywords "games"))]) (drupal-spell . [(0 2 2) nil "Aspell extra dictionary for Drupal" tar ((:url . "https://github.com/arnested/drupal-spell") (:keywords "wp"))]) (drupal-mode . [(0 5 0) ((php-mode (1 5 0))) "Advanced minor mode for Drupal development" tar ((:url . "https://github.com/arnested/drupal-mode") (:keywords "programming" "php" "drupal"))]) (drag-stuff . [(0 1 0) nil "Drag stuff (lines, words, region, etc...) around" tar nil]) (dispass . [(1 1 2) nil "Emacs wrapper for DisPass" single ((:url . "http://projects.ryuslash.org/dispass.el/") (:keywords "processes"))]) (discover . [(0 3) ((makey (0 3))) "discover more of Emacs" single nil]) (dired-k . [(0 10) ((cl-lib (0 5)) (emacs (24))) "highlight dired buffer by file size, modified time, git status" tar ((:url . "https://github.com/syohex/emacs-dired-k"))]) (dired-efap . [(0 8) nil "Edit Filename At Point in a dired buffer" single ((:keywords "dired" "environment" "files" "renaming"))]) (diminish . [(0 44) nil "Diminished modes are minor modes with no modeline display" single ((:url . "http://www.eskimo.com/~seldon") (:keywords "extensions" "diminish" "minor" "codeprose"))]) (dim-autoload . [(1 1 2) nil "dim complete autoload cookie lines" single ((:url . "http://github.com/tarsius/dim-autoload") (:keywords "convenience"))]) (digistar-mode . [(0 2) nil "major mode for Digistar scripts" single ((:keywords "languages"))]) (dictionary . [(1 10) nil "No description available." single nil]) (desktop-registry . [(1 2 0) nil "Keep a central registry of desktop files" single ((:url . "http://projects.ryuslash.org/desktop-registry/") (:keywords "convenience"))]) (demangle-mode . [(1 0) ((emacs (24)) (cl-lib (0 1))) "Automatically demangle C++ symbols" single ((:keywords "c" "tools"))]) (deft . [(0 5 1) nil "quickly browse, filter, and edit plain text notes" single ((:url . "http://jblevins.org/projects/deft/") (:keywords "plain text" "notes" "simplenote" "notational velocity"))]) (deferred . [(0 3 2) nil "Simple asynchronous functions for emacs lisp" single ((:url . "https://github.com/kiwanami/emacs-deferred") (:keywords "deferred" "async"))]) (dedicated . [(1 0 0) nil "A very simple minor mode for dedicated buffers" single ((:keywords "dedicated" "buffer"))]) (dash-functional . [(2 8 0) ((dash (2 0 0)) (emacs (24))) "Collection of useful combinators for Emacs Lisp" single ((:keywords "lisp" "functions" "combinators"))]) (dash . [(2 8 0) nil "A modern list library for Emacs" single ((:keywords "lists"))]) (dart-mode . [(0 9) nil "Major mode for editing Dart files" single ((:url . "http://code.google.com/p/dart-mode") (:keywords "language"))]) (d-mode . [(2 0 6) nil "D Programming Language mode for (X)Emacs" single ((:keywords "d" "programming" "language" "emacs" "cc-mode"))]) (cython-mode . [(0 21 1 1) nil "Major mode for editing Cython files" single nil]) (cyberpunk-theme . [(1 10) nil "Cyberpunk Color Theme" single ((:keywords "color" "theme" "cyberpunk"))]) (cuda-mode . [(1 0 0) nil "NVIDIA CUDA Major Mode" single ((:keywords "c" "languages"))]) (ctags-update . [(0 2 0) nil "(auto) update TAGS in parent directory using exuberant-ctags" single ((:url . "https://github.com/jixiuf/helm-etags-plus") (:keywords "exuberant-ctags" "etags"))]) (ctags . [(1 1 1) nil "No description available." single nil]) (ctable . [(0 1 2) nil "Table component for Emacs Lisp" single ((:url . "https://github.com/kiwanami/emacs-ctable") (:keywords "table"))]) (cryptol-mode . [(0 1 0) nil "Cryptol major mode for Emacs" single ((:url . "http://github.com/thoughtpolice/cryptol-mode") (:keywords "cryptol" "cryptography"))]) (creds . [(0 0 6 1) ((s (1 9 0)) (dash (2 5 0))) "A parser credentials file library (not limited to credentials entries)" tar nil]) (cpputils-cmake . [(0 4 14) nil "Easy real time C++ syntax check and intellisense if you use CMake" tar nil]) (cperl-mode . [(6 2) nil "Perl code editing commands for Emacs" single ((:keywords "languages" "perl"))]) (connection . [(1 10) nil "No description available." single nil]) (conkeror-minor-mode . [(1 6 1) nil "Mode for editing conkeror javascript files." single ((:url . "http://github.com/BruceConnor/conkeror-minor-mode") (:keywords "programming" "tools"))]) (concurrent . [(0 3 2) ((deferred (0 3 1))) "Concurrent utility functions for emacs lisp" single ((:url . "https://github.com/kiwanami/emacs-deferred/blob/master/README-concurrent.markdown") (:keywords "deferred" "async" "concurrent"))]) (company-tern . [(0 2 0) ((company (0 8 0)) (tern (0 0 1)) (dash (2 8 0)) (dash-functional (2 8 0)) (s (1 9 0)) (cl-lib (0 5 0))) "Tern backend for company-mode" single ((:url . "https://github.com/proofit404/company-tern"))]) (company-ghc . [(0 0 8) ((cl-lib (0 5)) (company (0 8 0)) (ghc (4 1 1)) (emacs (24))) "company-mode ghc-mod backend" single ((:url . "https://github.com/iquiw/company-ghc") (:keywords "haskell" "completion"))]) (company . [(0 8 2) ((emacs (24 1)) (cl-lib (0 5))) "Modular text completion framework" tar ((:url . "http://company-mode.github.io/") (:keywords "abbrev" "convenience" "matching"))]) (commander . [(0 7 0) ((s (1 6 0)) (dash (2 0 0)) (cl-lib (0 3)) (f (0 6 1))) "Emacs command line parser" single ((:url . "http://github.com/rejeep/commander.el") (:keywords "cli" "argv"))]) (colorsarenice-theme . [(1 0 12) ((emacs (24))) "A color theme." tar nil]) (color-theme-sanityinc-tomorrow . [(1 13) nil "A version of Chris Kempson's various Tomorrow themes" tar nil]) (color-theme-sanityinc-solarized . [(2 27) nil "A version of Ethan Schoonover's Solarized themes" tar nil]) (coffee-mode . [(0 5 5) ((emacs (24 1)) (cl-lib (0 5))) "Major mode to edit CoffeeScript files in Emacs" single ((:url . "http://github.com/defunkt/coffee-mode") (:keywords "coffeescript" "major" "mode"))]) (cmake-mode . [(3 0 1) nil "major-mode for editing CMake sources" single nil]) (cm-mode . [(1 1) nil "Minor mode for CriticMarkup" single ((:keywords "text" "markdown"))]) (clojure-test-mode . [(2 2 0) ((clojure-mode (1 7)) (cider (0 4 0))) "Minor mode for Clojure tests" single ((:url . "http://emacswiki.org/cgi-bin/wiki/ClojureTestMode") (:keywords "languages" "lisp" "test"))]) (clojure-mode . [(2 2 0) nil "Major mode for Clojure code" single ((:url . "http://github.com/clojure-emacs/clojure-mode") (:keywords "languages" "lisp"))]) (clojure-cheatsheet . [(0 2 2) ((helm (1 5 3)) (cider (0 1 8))) "The Clojure Cheatsheet for Emacs" single ((:url . "https://github.com/krisajenkins/clojure-cheatsheet") (:keywords "clojure" "nrepl" "cheatsheet" "helm"))]) (clj-refactor . [(0 12 0) ((s (1 8 0)) (dash (2 4 0)) (yasnippet (0 6 1)) (paredit (22)) (multiple-cursors (1 2 2))) "A collection of clojure refactoring functions" single ((:keywords "convenience"))]) (clips-mode . [(0 7) nil "Major mode for editing CLIPS code and REPL" tar nil]) (cl-lib-highlight . [(1 0 0) ((cl-lib (0 3))) "full cl-lib font-lock highlighting" single ((:url . "https://github.com/skeeto/cl-lib-highlight"))]) (cider . [(0 7 0) ((clojure-mode (2 0 0)) (cl-lib (0 3)) (dash (2 4 1)) (pkg-info (0 4)) (emacs (24))) "Clojure Integrated Development Environment and REPL" tar ((:url . "http://www.github.com/clojure-emacs/cider") (:keywords "languages" "clojure" "cider"))]) (charmap . [(0 0 1) nil "Unicode table for Emacs" single ((:url . "https://github.com/lateau/charmap") (:keywords "unicode" "character" "ucs"))]) (cfengine-code-style . [(3 6 1) nil "C code style for CFEngine project." single ((:url . "https://github.com/cfengine/core"))]) (cerbere . [(0 1 0) ((s (1 9 0)) (f (0 16 0)) (go-mode (20140409)) (pkg-info (0 5))) "Unit testing in Emacs for several programming languages" tar ((:url . "https://github.com/nlamirault/cerbere") (:keywords "python" "go" "php" "tests" "tdd"))]) (cdlatex . [(4 7) nil "Fast input methods for LaTeX environments and math" single ((:keywords "tex"))]) (cask . [(0 7 0) ((s (1 8 0)) (dash (2 2 0)) (f (0 16 0)) (epl (0 5)) (shut-up (0 1 0)) (cl-lib (0 3)) (package-build (0 1))) "Cask: Project management for Emacs package development" tar ((:url . "http://github.com/cask/cask") (:keywords "speed" "convenience"))]) (calfw . [(1 3) nil "Calendar view framework on Emacs" tar ((:keywords "calendar"))]) (cake2 . [(2 1 0) ((dash (2 6 0)) (s (1 9 0)) (f (0 16 2)) (ht (2 0)) (json (1 2)) (cake-inflector (1 1 0)) (historyf (0 0 8)) (anything (1 3 9))) "CakePHP2 Minor Mode" tar ((:url . "http://code.101000lab.org"))]) (cake-inflector . [(1 1 1) ((s (1 9 0))) "Lazy porting CakePHP infrector.php to el" single ((:url . "https://github.com/k1LoW/emacs-cake-inflector"))]) (cake . [(1 4 3) ((cake-inflector (1 1 0)) (historyf (0 0 8)) (anything (1 3 9))) "CakePHP Minor Mode" tar ((:url . "https://github.com/k1LoW/emacs-cake"))]) (cacoo . [(2 1 2) ((concurrent (0 3 1))) "Minor mode for Cacoo : http://cacoo.com" tar nil]) (button-lock . [(1 0 0) nil "Clickable text defined by regular expression" single ((:url . "http://github.com/rolandwalker/button-lock") (:keywords "mouse" "button" "hypermedia" "extensions"))]) (bundler . [(1 1 0) ((inf-ruby (2 1))) "Interact with Bundler from Emacs" single ((:url . "http://github.com/tobiassvn/") (:keywords "bundler" "ruby"))]) (bug-reference-github . [(0 2 0) nil "Automatically set `bug-reference-url-format' in Github repositories." single ((:url . "https://github.com/arnested/bug-reference-github") (:keywords "programming" "tools"))]) (bufshow . [(0 1 0) nil "No description available." single nil]) (buffer-utils . [(0 1 0) nil "Buffer-manipulation utility functions" single ((:url . "http://github.com/rolandwalker/buffer-utils") (:keywords "extensions"))]) (browse-url-dwim . [(0 6 8) ((string-utils (0 3 2))) "Context-sensitive external browse URL or Internet search" single ((:url . "http://github.com/rolandwalker/browse-url-dwim") (:keywords "hypermedia"))]) (browse-kill-ring . [(1 6 0) nil "interactively insert items from kill-ring" single ((:url . "https://github.com/browse-kill-ring/browse-kill-ring") (:keywords "convenience"))]) (bog . [(0 6 0) ((org (8 0 0)) (dash (2 5 0))) "Extensions for research notes in Org mode" single ((:url . "https://github.com/kyleam/bog") (:keywords "bibtex" "org-mode"))]) (birds-of-paradise-plus-theme . [(0 1 1) nil "A brown/orange light-on-dark theme for Emacs 24 (deftheme)." single ((:url . "https://github.com/jimeh/birds-of-paradise-plus-theme.el") (:keywords "themes"))]) (bind-key . [(20140601) nil "A simple way to manage personal keybindings" single ((:url . "https://github.com/jwiegley/use-package") (:keywords "keys" "keybinding" "config" "dotemacs"))]) (beeminder . [(1 0 0) nil "Emacs interface for Beeminder" single ((:keywords "beeminder"))]) (bbdb2erc . [(0 1 3) ((bbdb (3 0))) "make bbdb show if pal is online with ERC, click i to chat" single ((:keywords "irc" "contacts" "chat" "client" "internet"))]) (bbdb-vcard . [(0 3) nil "vCard import/export for BBDB" tar ((:url . "http://github.com/trebb/bbdb-vcard") (:keywords "data" "calendar" "mail" "news"))]) (bbcode-mode . [(2 0 0) nil "Major mode for writing BBCode markup" single ((:url . "https://github.com/ejmr/bbcode-mode"))]) (back-button . [(0 6 6) ((nav-flash (1 0 0)) (smartrep (0 0 3)) (ucs-utils (0 7 2)) (persistent-soft (0 8 8)) (pcache (0 2 3))) "Visual navigation through mark rings" single ((:url . "http://github.com/rolandwalker/back-button") (:keywords "convenience" "navigation" "interface"))]) (babel . [(1 4) nil "interface to web translation services such as Babelfish" single ((:keywords "translation" "web"))]) (autopair . [(0 6 1) ((cl-lib (0 3))) "Automagically pair braces and quotes like TextMate" single ((:url . "http://autopair.googlecode.com") (:keywords "convenience" "emulations"))]) (auto-shell-command . [(1 0 0) ((deferred (20130312)) (popwin (20130329))) "Run the shell command asynchronously that you specified when you save the file." single ((:keywords "shell" "save" "async" "deferred" "auto"))]) (auto-indent-mode . [(0 126) nil "Auto indent Minor mode" tar ((:url . "https://github.com/mlf176f2/auto-indent-mode.el/") (:keywords "auto" "indentation"))]) (auto-dictionary . [(1 1) nil "automatic dictionary switcher for flyspell" single ((:url . "http://nschum.de/src/emacs/auto-dictionary/") (:keywords "wp"))]) (auto-complete-exuberant-ctags . [(0 0 7) ((auto-complete (1 4 0))) "Exuberant ctags auto-complete.el source" single ((:url . "http://code.101000lab.org") (:keywords "anto-complete" "exuberant ctags"))]) (auto-complete-clang-async . [(0 5) nil "Auto Completion source for clang for GNU Emacs" single ((:keywords "completion" "convenience"))]) (auto-complete . [(1 4 0) ((popup (0 5 0))) "Auto Completion for GNU Emacs" tar nil]) (auto-compile . [(1 2 1) ((cl-lib (0 2)) (packed (0 3 4))) "automatically compile Emacs Lisp libraries" single ((:url . "http://tarsius.github.com/auto-compile") (:keywords "compile" "convenience" "lisp"))]) (aurel . [(0 6) nil "Search, get info, vote and download AUR packages" single ((:url . "https://github.com/alezost/aurel") (:keywords "tools"))]) (apples-mode . [(0 0 2) nil "Major mode for editing and executing AppleScript code" tar ((:keywords "applescript" "languages"))]) (anzu . [(0 36) ((cl-lib (0 5)) (emacs (24))) "Show number of matches in mode-line while searching" single ((:url . "https://github.com/syohex/emacs-anzu"))]) (anything-replace-string . [(0 9 2) ((anything (1 3 9))) "`replace-string' and `query-replace' `anything.el' interface" single ((:url . "http://code.101000lab.org"))]) (anything-exuberant-ctags . [(0 1 2) ((anything (1 3 9))) "Exuberant ctags anything.el interface" single ((:url . "http://code.101000lab.org") (:keywords "anything" "exuberant ctags"))]) (anything . [(1 3 9) nil "open anything / QuickSilver-like candidate-selection framework" tar ((:url . "http://repo.or.cz/w/anything-config.git") (:keywords "files" "frames" "help" "matching" "outlines" "processes" "tools" "convenience" "anything"))]) (anyins . [(0 1 1) nil "Insert content at multiple places from shell command or kill-ring" single ((:url . "http://github.com/antham/anyins") (:keywords "insert" "rectangular"))]) (anti-zenburn-theme . [(2 1) nil "Low-contrast Zenburn-inverted theme" single ((:url . "https://github.com/m00natic/anti-zenburn-theme"))]) (ansible . [(0 0 2) ((s (1 9 0)) (f (0 16 2))) "Ansible minor mode" tar ((:url . "http://101000lab.org"))]) (ansi . [(0 2 1) ((s (1 6 1)) (dash (1 5 0))) "Turn string into ansi strings" single ((:url . "http://github.com/rejeep/ansi") (:keywords "color" "ansi"))]) (angular-snippets . [(0 2 3) ((s (1 4 0)) (dash (1 2 0))) "Yasnippets for AngularJS" tar nil]) (anaphora . [(1 0 0) nil "anaphoric macros providing implicit temp variables" single ((:url . "http://github.com/rolandwalker/anaphora") (:keywords "extensions"))]) (anaconda-mode . [(0 1 0) nil "No description available." tar nil]) (alect-themes . [(0 6) nil "Configurable color themes (light, dark and black) for Emacs 24" tar nil]) (ag . [(0 44) nil "A front-end for ag ('the silver searcher'), the C ack replacement." single nil]) (aes . [(0 6) nil "Implementation of AES" single ((:url . "https://github.com/gaddhi/aes") (:keywords "data" "tools"))]) (adoc-mode . [(0 6 2) ((markup-faces (1 0 0))) "a major-mode for editing AsciiDoc files in Emacs" single ((:url . "https://github.com/sensorflo/adoc-mode/wiki") (:keywords "wp" "asciidoc"))]) (actionscript-mode . [(7 2 2) nil "A simple mode for editing Actionscript 3 files" single ((:keywords "language" "modes"))]) (ack-menu . [(0 2 3) nil "No description available." tar]) (ack-and-a-half . [(1 2 0) nil "Yet another front-end for ack" single ((:url . "http://technosorcery.net"))]) (ace-window . [(0 4 0) ((ace-jump-mode (2 0))) "Quickly switch windows using `ace-jump-mode'." single ((:url . "https://github.com/abo-abo/ace-window") (:keywords "cursor" "window" "location"))]) (ace-jump-mode . [(2 0) nil "a quick cursor location minor mode for emacs" single ((:url . "https://github.com/winterTTr/ace-jump-mode/") (:keywords "motion" "location" "cursor"))]) (ac-slime . [(0 5) nil "An auto-complete source using slime completions" single ((:url . "https://github.com/purcell/ac-slime"))]) (ac-octave . [(0 4) ((auto-complete (1 4 0))) "An auto-complete source for Octave" single ((:url . "https://github.com/coldnew/ac-octave") (:keywords "octave" "auto-complete" "completion"))]) (ac-nrepl . [(0 21) ((cider (0 1)) (auto-complete (1 4))) "auto-complete sources for Clojure using nrepl completions" single ((:url . "https://github.com/purcell/ac-nrepl") (:keywords "languages" "clojure" "nrepl"))]) (ac-ispell . [(0 6) ((auto-complete (1 4))) "ispell completion source for auto-complete" single ((:url . "https://github.com/syohex/emacs-ac-ispell"))]) (ac-inf-ruby . [(0 4) ((inf-ruby (2 3 2)) (auto-complete (1 4))) "Enable auto-complete in inf-ruby sessions" single ((:keywords "languages" "tools"))]) (ac-helm . [(2 1) ((helm (20130328)) (auto-complete (1 4 0)) (popup (0 5 0))) "Auto Complete with Helm" single ((:keywords "completion" "convenience" "helm"))]) (ac-geiser . [(0 1) ((geiser (0 5)) (auto-complete (1 4))) "Auto-complete backend for geiser" tar nil]) (ac-etags . [(0 6) ((auto-complete (1 4))) "etags/ctags completion source for auto-complete" single ((:url . "https://github.com/syohex/emacs-ac-etags"))]) (ac-cider . [(0 2 0) ((cider (0 6 0)) (auto-complete (1 4))) "Clojure auto-complete sources using CIDER" single ((:url . "https://github.com/clojure-emacs/ac-cider") (:keywords "languages" "clojure" "nrepl" "cider" "compliment"))]) (ac-cake2 . [(1 0 1) ((cake2 (1 1 2)) (auto-complete (1 4 0))) "CakePHP 2 Minor Mode auto-complete.el source" single ((:url . "http://code.101000lab.org"))]) (ac-cake . [(1 0 0) ((cake (1 4 2)) (auto-complete (1 4))) "CakePHP Minor Mode auto-complete.el source" single ((:url . "http://code.101000lab.org"))]) (abc-mode . [(20140225 944) nil "Major mode for editing abc music files" single ((:keywords "local" "docs"))])) diff --git a/elpa/auto-complete-20140803.2118/auto-complete-autoloads.el b/elpa/auto-complete-20140803.2118/auto-complete-autoloads.el new file mode 100644 index 000000000..09372168c --- /dev/null +++ b/elpa/auto-complete-20140803.2118/auto-complete-autoloads.el @@ -0,0 +1,66 @@ +;;; auto-complete-autoloads.el --- automatically extracted autoloads +;; +;;; Code: + + +;;;### (autoloads (global-auto-complete-mode auto-complete-mode auto-complete) +;;;;;; "auto-complete" "auto-complete.el" (21478 16695 0 0)) +;;; Generated autoloads from auto-complete.el + +(autoload 'auto-complete "auto-complete" "\ +Start auto-completion at current point. + +\(fn &optional SOURCES)" t nil) + +(autoload 'auto-complete-mode "auto-complete" "\ +AutoComplete mode + +\(fn &optional ARG)" t nil) + +(defvar global-auto-complete-mode nil "\ +Non-nil if Global-Auto-Complete mode is enabled. +See the command `global-auto-complete-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 `global-auto-complete-mode'.") + +(custom-autoload 'global-auto-complete-mode "auto-complete" nil) + +(autoload 'global-auto-complete-mode "auto-complete" "\ +Toggle Auto-Complete mode in all buffers. +With prefix ARG, enable Global-Auto-Complete mode if ARG is positive; +otherwise, disable it. If called from Lisp, enable the mode if +ARG is omitted or nil. + +Auto-Complete mode is enabled in all buffers where +`auto-complete-mode-maybe' would do it. +See `auto-complete-mode' for more information on Auto-Complete mode. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (ac-config-default) "auto-complete-config" "auto-complete-config.el" +;;;;;; (21478 16695 0 0)) +;;; Generated autoloads from auto-complete-config.el + +(autoload 'ac-config-default "auto-complete-config" "\ + + +\(fn)" nil nil) + +;;;*** + +;;;### (autoloads nil nil ("auto-complete-pkg.el") (21478 16695 123947 +;;;;;; 0)) + +;;;*** + +(provide 'auto-complete-autoloads) +;; Local Variables: +;; version-control: never +;; no-byte-compile: t +;; no-update-autoloads: t +;; coding: utf-8 +;; End: +;;; auto-complete-autoloads.el ends here diff --git a/elpa/auto-complete-20140803.2118/auto-complete-config.el b/elpa/auto-complete-20140803.2118/auto-complete-config.el new file mode 100644 index 000000000..40e63bc8a --- /dev/null +++ b/elpa/auto-complete-20140803.2118/auto-complete-config.el @@ -0,0 +1,521 @@ +;;; auto-complete-config.el --- auto-complete additional configuations + +;; Copyright (C) 2009, 2010 Tomohiro Matsuyama + +;; Author: Tomohiro Matsuyama +;; Keywords: convenience +;; Version: 1.4 + +;; 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: + +(eval-when-compile + (require 'cl)) + +(require 'auto-complete) + + + +;;;; Additional sources + +;; imenu + +(defvar ac-imenu-index nil) + +(ac-clear-variable-every-10-minutes 'ac-imenu-index) + +(defun ac-imenu-candidates () + (loop with i = 0 + with stack = (progn + (unless (local-variable-p 'ac-imenu-index) + (make-local-variable 'ac-imenu-index)) + (or ac-imenu-index + (setq ac-imenu-index + (ignore-errors + (with-no-warnings + (imenu--make-index-alist)))))) + with result + while (and stack (or (not (integerp ac-limit)) + (< i ac-limit))) + for node = (pop stack) + if (consp node) + do + (let ((car (car node)) + (cdr (cdr node))) + (if (consp cdr) + (mapc (lambda (child) + (push child stack)) + cdr) + (when (and (stringp car) + (string-match (concat "^" (regexp-quote ac-prefix)) car)) + ;; Remove extra characters + (if (string-match "^.*\\(()\\|=\\|<>\\)$" car) + (setq car (substring car 0 (match-beginning 1)))) + (push car result) + (incf i)))) + finally return (nreverse result))) + +(ac-define-source imenu + '((depends imenu) + (candidates . ac-imenu-candidates) + (symbol . "s"))) + +;; gtags + +(defface ac-gtags-candidate-face + '((t (:inherit ac-candidate-face :foreground "navy"))) + "Face for gtags candidate" + :group 'auto-complete) + +(defface ac-gtags-selection-face + '((t (:inherit ac-selection-face :background "navy"))) + "Face for the gtags selected candidate." + :group 'auto-complete) + +(defun ac-gtags-candidate () + (ignore-errors + (split-string (shell-command-to-string (format "global -ciq %s" ac-prefix)) "\n"))) + +(ac-define-source gtags + '((candidates . ac-gtags-candidate) + (candidate-face . ac-gtags-candidate-face) + (selection-face . ac-gtags-selection-face) + (requires . 3) + (symbol . "s"))) + +;; yasnippet + +(defface ac-yasnippet-candidate-face + '((t (:inherit ac-candidate-face + :background "sandybrown" :foreground "black"))) + "Face for yasnippet candidate." + :group 'auto-complete) + +(defface ac-yasnippet-selection-face + '((t (:inherit ac-selection-face :background "coral3"))) + "Face for the yasnippet selected candidate." + :group 'auto-complete) + +(defun ac-yasnippet-table-hash (table) + (cond + ((fboundp 'yas/snippet-table-hash) + (yas/snippet-table-hash table)) + ((fboundp 'yas/table-hash) + (yas/table-hash table)))) + +(defun ac-yasnippet-table-parent (table) + (cond + ((fboundp 'yas/snippet-table-parent) + (yas/snippet-table-parent table)) + ((fboundp 'yas/table-parent) + (yas/table-parent table)))) + +(defun ac-yasnippet-candidate-1 (table) + (with-no-warnings + (let ((hashtab (ac-yasnippet-table-hash table)) + (parent (ac-yasnippet-table-parent table)) + candidates) + (maphash (lambda (key value) + (push key candidates)) + hashtab) + (setq candidates (all-completions ac-prefix (nreverse candidates))) + (if parent + (setq candidates + (append candidates (ac-yasnippet-candidate-1 parent)))) + candidates))) + +(defun ac-yasnippet-candidates () + (with-no-warnings + (cond (;; 0.8 onwards + (fboundp 'yas-active-keys) + (all-completions ac-prefix (yas-active-keys))) + (;; >0.6.0 + (fboundp 'yas/get-snippet-tables) + (apply 'append (mapcar 'ac-yasnippet-candidate-1 + (condition-case nil + (yas/get-snippet-tables major-mode) + (wrong-number-of-arguments + (yas/get-snippet-tables))))) + ) + (t + (let ((table + (if (fboundp 'yas/snippet-table) + ;; <0.6.0 + (yas/snippet-table major-mode) + ;; 0.6.0 + (yas/current-snippet-table)))) + (if table + (ac-yasnippet-candidate-1 table))))))) + +(ac-define-source yasnippet + '((depends yasnippet) + (candidates . ac-yasnippet-candidates) + (action . yas/expand) + (candidate-face . ac-yasnippet-candidate-face) + (selection-face . ac-yasnippet-selection-face) + (symbol . "a"))) + +;; semantic + +(defun ac-semantic-candidates (prefix) + (with-no-warnings + (delete "" ; semantic sometimes returns an empty string + (mapcar (lambda (elem) + (cons (semantic-tag-name elem) + (semantic-tag-clone elem))) + (ignore-errors + (or (semantic-analyze-possible-completions + (semantic-analyze-current-context)) + (senator-find-tag-for-completion prefix))))))) + +(defun ac-semantic-doc (symbol) + (with-no-warnings + (let* ((proto (semantic-format-tag-summarize-with-file symbol nil t)) + (doc (semantic-documentation-for-tag symbol)) + (res proto)) + (when doc + (setq res (concat res "\n\n" doc))) + res))) + +(ac-define-source semantic + '((available . (or (require 'semantic-ia nil t) + (require 'semantic/ia nil t))) + (candidates . (ac-semantic-candidates ac-prefix)) + (document . ac-semantic-doc) + (prefix . cc-member) + (requires . 0) + (symbol . "m"))) + +(ac-define-source semantic-raw + '((available . (or (require 'semantic-ia nil t) + (require 'semantic/ia nil t))) + (candidates . (ac-semantic-candidates ac-prefix)) + (document . ac-semantic-doc) + (symbol . "s"))) + +;; eclim + +(defun ac-eclim-candidates () + (with-no-warnings + (loop for c in (eclim/java-complete) + collect (nth 1 c)))) + +(ac-define-source eclim + '((candidates . ac-eclim-candidates) + (prefix . c-dot) + (requires . 0) + (symbol . "f"))) + +;; css + +;; Copied from company-css.el +(defconst ac-css-property-alist + ;; see http://www.w3.org/TR/CSS21/propidx.html + '(("azimuth" angle "left-side" "far-left" "left" "center-left" "center" + "center-right" "right" "far-right" "right-side" "behind" "leftwards" + "rightwards") + ("background" background-color background-image background-repeat + background-attachment background-position) + ("background-attachment" "scroll" "fixed") + ("background-color" color "transparent") + ("background-image" uri "none") + ("background-position" percentage length "left" "center" "right" percentage + length "top" "center" "bottom" "left" "center" "right" "top" "center" + "bottom") + ("background-repeat" "repeat" "repeat-x" "repeat-y" "no-repeat") + ("border" border-width border-style border-color) + ("border-bottom" border) + ("border-bottom-color" border-color) + ("border-bottom-style" border-style) + ("border-bottom-width" border-width) + ("border-collapse" "collapse" "separate") + ("border-color" color "transparent") + ("border-left" border) + ("border-left-color" border-color) + ("border-left-style" border-style) + ("border-left-width" border-width) + ("border-right" border) + ("border-right-color" border-color) + ("border-right-style" border-style) + ("border-right-width" border-width) + ("border-spacing" length length) + ("border-style" border-style) + ("border-top" border) + ("border-top-color" border-color) + ("border-top-style" border-style) + ("border-top-width" border-width) + ("border-width" border-width) + ("bottom" length percentage "auto") + ("caption-side" "top" "bottom") + ("clear" "none" "left" "right" "both") + ("clip" shape "auto") + ("color" color) + ("content" "normal" "none" string uri counter "attr()" "open-quote" + "close-quote" "no-open-quote" "no-close-quote") + ("counter-increment" identifier integer "none") + ("counter-reset" identifier integer "none") + ("cue" cue-before cue-after) + ("cue-after" uri "none") + ("cue-before" uri "none") + ("cursor" uri "*" "auto" "crosshair" "default" "pointer" "move" "e-resize" + "ne-resize" "nw-resize" "n-resize" "se-resize" "sw-resize" "s-resize" + "w-resize" "text" "wait" "help" "progress") + ("direction" "ltr" "rtl") + ("display" "inline" "block" "list-item" "run-in" "inline-block" "table" + "inline-table" "table-row-group" "table-header-group" "table-footer-group" + "table-row" "table-column-group" "table-column" "table-cell" + "table-caption" "none") + ("elevation" angle "below" "level" "above" "higher" "lower") + ("empty-cells" "show" "hide") + ("float" "left" "right" "none") + ("font" font-style font-variant font-weight font-size "/" line-height + font-family "caption" "icon" "menu" "message-box" "small-caption" + "status-bar") + ("font-family" family-name generic-family) + ("font-size" absolute-size relative-size length percentage) + ("font-style" "normal" "italic" "oblique") + ("font-variant" "normal" "small-caps") + ("font-weight" "normal" "bold" "bolder" "lighter" "100" "200" "300" "400" + "500" "600" "700" "800" "900") + ("height" length percentage "auto") + ("left" length percentage "auto") + ("letter-spacing" "normal" length) + ("line-height" "normal" number length percentage) + ("list-style" list-style-type list-style-position list-style-image) + ("list-style-image" uri "none") + ("list-style-position" "inside" "outside") + ("list-style-type" "disc" "circle" "square" "decimal" "decimal-leading-zero" + "lower-roman" "upper-roman" "lower-greek" "lower-latin" "upper-latin" + "armenian" "georgian" "lower-alpha" "upper-alpha" "none") + ("margin" margin-width) + ("margin-bottom" margin-width) + ("margin-left" margin-width) + ("margin-right" margin-width) + ("margin-top" margin-width) + ("max-height" length percentage "none") + ("max-width" length percentage "none") + ("min-height" length percentage) + ("min-width" length percentage) + ("orphans" integer) + ("outline" outline-color outline-style outline-width) + ("outline-color" color "invert") + ("outline-style" border-style) + ("outline-width" border-width) + ("overflow" "visible" "hidden" "scroll" "auto") + ("padding" padding-width) + ("padding-bottom" padding-width) + ("padding-left" padding-width) + ("padding-right" padding-width) + ("padding-top" padding-width) + ("page-break-after" "auto" "always" "avoid" "left" "right") + ("page-break-before" "auto" "always" "avoid" "left" "right") + ("page-break-inside" "avoid" "auto") + ("pause" time percentage) + ("pause-after" time percentage) + ("pause-before" time percentage) + ("pitch" frequency "x-low" "low" "medium" "high" "x-high") + ("pitch-range" number) + ("play-during" uri "mix" "repeat" "auto" "none") + ("position" "static" "relative" "absolute" "fixed") + ("quotes" string string "none") + ("richness" number) + ("right" length percentage "auto") + ("speak" "normal" "none" "spell-out") + ("speak-header" "once" "always") + ("speak-numeral" "digits" "continuous") + ("speak-punctuation" "code" "none") + ("speech-rate" number "x-slow" "slow" "medium" "fast" "x-fast" "faster" + "slower") + ("stress" number) + ("table-layout" "auto" "fixed") + ("text-align" "left" "right" "center" "justify") + ("text-decoration" "none" "underline" "overline" "line-through" "blink") + ("text-indent" length percentage) + ("text-transform" "capitalize" "uppercase" "lowercase" "none") + ("top" length percentage "auto") + ("unicode-bidi" "normal" "embed" "bidi-override") + ("vertical-align" "baseline" "sub" "super" "top" "text-top" "middle" + "bottom" "text-bottom" percentage length) + ("visibility" "visible" "hidden" "collapse") + ("voice-family" specific-voice generic-voice "*" specific-voice + generic-voice) + ("volume" number percentage "silent" "x-soft" "soft" "medium" "loud" + "x-loud") + ("white-space" "normal" "pre" "nowrap" "pre-wrap" "pre-line") + ("widows" integer) + ("width" length percentage "auto") + ("word-spacing" "normal" length) + ("z-index" "auto" integer)) + "A list of CSS properties and their possible values.") + +(defconst ac-css-value-classes + '((absolute-size "xx-small" "x-small" "small" "medium" "large" "x-large" + "xx-large") + (border-style "none" "hidden" "dotted" "dashed" "solid" "double" "groove" + "ridge" "inset" "outset") + (color "aqua" "black" "blue" "fuchsia" "gray" "green" "lime" "maroon" "navy" + "olive" "orange" "purple" "red" "silver" "teal" "white" "yellow" + "rgb") + (counter "counter") + (family-name "Courier" "Helvetica" "Times") + (generic-family "serif" "sans-serif" "cursive" "fantasy" "monospace") + (generic-voice "male" "female" "child") + (margin-width "auto") ;; length percentage + (relative-size "larger" "smaller") + (shape "rect") + (uri "url")) + "A list of CSS property value classes and their contents.") + +(defconst ac-css-pseudo-classes + '("active" "after" "before" "first" "first-child" "first-letter" "first-line" + "focus" "hover" "lang" "left" "link" "right" "visited") + "Identifiers for CSS pseudo-elements and pseudo-classes.") + +(defvar ac-css-property nil + "Current editing property.") + +(defun ac-css-prefix () + (when (save-excursion (re-search-backward "\\_<\\(.+?\\)\\_>\\s *:[^;]*\\=" nil t)) + (setq ac-css-property (match-string 1)) + (or (ac-prefix-symbol) (point)))) + +(defun ac-css-property-candidates () + (let ((list (assoc-default ac-css-property ac-css-property-alist))) + (if list + (loop with seen + with value + while (setq value (pop list)) + if (symbolp value) + do (unless (memq value seen) + (push value seen) + (setq list + (append list + (or (assoc-default value ac-css-value-classes) + (assoc-default (symbol-name value) ac-css-property-alist))))) + else collect value) + ac-css-pseudo-classes))) + +(ac-define-source css-property + '((candidates . ac-css-property-candidates) + (prefix . ac-css-prefix) + (requires . 0))) + +;; slime +(ac-define-source slime + '((depends slime) + (candidates . (car (slime-simple-completions ac-prefix))) + (symbol . "s") + (cache))) + +;; ghc-mod +(ac-define-source ghc-mod + '((depends ghc) + (candidates . (ghc-select-completion-symbol)) + (symbol . "s") + (cache))) + + + +;;;; Not maintained sources + +;; ropemacs + +(defvar ac-ropemacs-loaded nil) +(defun ac-ropemacs-require () + (with-no-warnings + (unless ac-ropemacs-loaded + (pymacs-load "ropemacs" "rope-") + (if (boundp 'ropemacs-enable-autoimport) + (setq ropemacs-enable-autoimport t)) + (setq ac-ropemacs-loaded t)))) + +(defun ac-ropemacs-setup () + (ac-ropemacs-require) + ;(setq ac-sources (append (list 'ac-source-ropemacs) ac-sources)) + (setq ac-omni-completion-sources '(("\\." ac-source-ropemacs)))) + +(defun ac-ropemacs-initialize () + (autoload 'pymacs-apply "pymacs") + (autoload 'pymacs-call "pymacs") + (autoload 'pymacs-eval "pymacs" nil t) + (autoload 'pymacs-exec "pymacs" nil t) + (autoload 'pymacs-load "pymacs" nil t) + (add-hook 'python-mode-hook 'ac-ropemacs-setup) + t) + +(defvar ac-ropemacs-completions-cache nil) +(defvar ac-source-ropemacs + '((init + . (lambda () + (setq ac-ropemacs-completions-cache + (mapcar + (lambda (completion) + (concat ac-prefix completion)) + (ignore-errors + (rope-completions)))))) + (candidates . ac-ropemacs-completions-cache))) + +;; rcodetools + +(defvar ac-source-rcodetools + '((init . (lambda () + (require 'rcodetools) + (condition-case x + (save-excursion + (rct-exec-and-eval rct-complete-command-name "--completion-emacs-icicles")) + (error) (setq rct-method-completion-table nil)))) + (candidates . (lambda () + (all-completions + ac-prefix + (mapcar + (lambda (completion) + (replace-regexp-in-string "\t.*$" "" (car completion))) + rct-method-completion-table)))))) + + + +;;;; Default settings + +(defun ac-common-setup () + ;(add-to-list 'ac-sources 'ac-source-filename) + ) + +(defun ac-emacs-lisp-mode-setup () + (setq ac-sources (append '(ac-source-features ac-source-functions ac-source-yasnippet ac-source-variables ac-source-symbols) ac-sources))) + +(defun ac-cc-mode-setup () + (setq ac-sources (append '(ac-source-yasnippet ac-source-gtags) ac-sources))) + +(defun ac-ruby-mode-setup ()) + +(defun ac-css-mode-setup () + (setq ac-sources (append '(ac-source-css-property) ac-sources))) + +;;;###autoload +(defun ac-config-default () + (setq-default ac-sources '(ac-source-abbrev ac-source-dictionary ac-source-words-in-same-mode-buffers)) + (add-hook 'emacs-lisp-mode-hook 'ac-emacs-lisp-mode-setup) + (add-hook 'c-mode-common-hook 'ac-cc-mode-setup) + (add-hook 'ruby-mode-hook 'ac-ruby-mode-setup) + (add-hook 'css-mode-hook 'ac-css-mode-setup) + (add-hook 'auto-complete-mode-hook 'ac-common-setup) + (global-auto-complete-mode t)) + +(provide 'auto-complete-config) +;;; auto-complete-config.el ends here diff --git a/elpa/auto-complete-20140803.2118/auto-complete-config.elc b/elpa/auto-complete-20140803.2118/auto-complete-config.elc new file mode 100644 index 0000000000000000000000000000000000000000..e90d0ce5f5af7cdc06b11314778d7632b099ab75 GIT binary patch literal 16119 zcmd5@`IFm5cAg(cQdw(T@+P)-H!a9po{^2wkeoxu+G|PWR9w4TNy<*;2UDAXV3ULe z0u+upoc!_mzSjquAZH}SNh(t{M5E8w@9x(RPrv>1i@({~*}3`j=~MNhT&}WQPu1j7 zEtBRO{MYeclJt35zBn9306Mv#MOG875H= z|E1Pd{Sb3JJkZM|tq-OTb-qd-CT&y3DVEB0qhpRdd~`TE7!C%HdTnW0%(D4`&SmPX zP~UPMb%uE}05Uu}7#$3x?L2E1D#-!gs>znw&q;$0^}$VP{9%#R2Bx;wwVGZQ$udjT zv`p)!%8GgYC0eVxQOR_Q&HHr*j}L~AH|Cg@n4>5g1?ZXto!e#>KSE6rK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 diff --git a/elpa/auto-complete-20140803.2118/auto-complete.el b/elpa/auto-complete-20140803.2118/auto-complete.el new file mode 100644 index 000000000..088f09608 --- /dev/null +++ b/elpa/auto-complete-20140803.2118/auto-complete.el @@ -0,0 +1,2101 @@ +;;; auto-complete.el --- Auto Completion for GNU Emacs + +;; Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013 Tomohiro Matsuyama + +;; Author: Tomohiro Matsuyama +;; URL: http://cx4a.org/software/auto-complete +;; Keywords: completion, convenience +;; Version: 1.4.0 + +;; 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: +;; +;; This extension provides a way to complete with popup menu like: +;; +;; def-!- +;; +-----------------+ +;; |defun::::::::::::| +;; |defvar | +;; |defmacro | +;; | ... | +;; +-----------------+ +;; +;; You can complete by typing and selecting menu. +;; +;; Entire documents are located in doc/ directory. +;; Take a look for information. +;; +;; Enjoy! + +;;; Code: + + + +(defconst ac-version "1.4.0") + +(eval-when-compile + (require 'cl)) + +(require 'popup) + +;;;; Global stuff + +(defun ac-error (&optional var) + "Report an error and disable `auto-complete-mode'." + (ignore-errors + (message "auto-complete error: %s" var) + (auto-complete-mode -1) + var)) + + + +;;;; Customization + +(defgroup auto-complete nil + "Auto completion." + :group 'completion + :prefix "ac-") + +(defcustom ac-delay 0.1 + "Delay to completions will be available." + :type 'float + :group 'auto-complete) + +(defcustom ac-auto-show-menu 0.8 + "Non-nil means completion menu will be automatically shown." + :type '(choice (const :tag "Yes" t) + (const :tag "Never" nil) + (float :tag "Timer")) + :group 'auto-complete) + +(defcustom ac-show-menu-immediately-on-auto-complete t + "Non-nil means menu will be showed immediately on `auto-complete'." + :type 'boolean + :group 'auto-complete) + +(defcustom ac-expand-on-auto-complete t + "Non-nil means expand whole common part on first time `auto-complete'." + :type 'boolean + :group 'auto-complete) + +(defcustom ac-disable-faces '(font-lock-comment-face font-lock-string-face font-lock-doc-face) + "Non-nil means disable automatic completion on specified faces." + :type '(repeat symbol) + :group 'auto-complete) + +(defcustom ac-stop-flymake-on-completing t + "Non-nil means disble flymake temporarily on completing." + :type 'boolean + :group 'auto-complete) + +(defcustom ac-flycheck-poll-completion-end-interval 0.5 + "Polling interval to restart automatically flycheck's checking after completion is end." + :type 'float + :group 'auto-complete) + +(defcustom ac-use-fuzzy (and (locate-library "fuzzy") t) + "Non-nil means use fuzzy matching." + :type 'boolean + :group 'auto-complete) + +(defcustom ac-fuzzy-cursor-color "red" + "Cursor color in fuzzy mode." + :type 'string + :group 'auto-complete) + +(defcustom ac-use-comphist t + "Non-nil means use intelligent completion history." + :type 'boolean + :group 'auto-complete) + +(defcustom ac-comphist-threshold 0.7 + "Percentage of ignoring low scored candidates." + :type 'float + :group 'auto-complete) + +(defcustom ac-comphist-file + (expand-file-name (concat (if (boundp 'user-emacs-directory) + user-emacs-directory + "~/.emacs.d/") + "/ac-comphist.dat")) + "Completion history file name." + :type 'string + :group 'auto-complete) + +(defcustom ac-user-dictionary nil + "User defined dictionary" + :type '(repeat string) + :group 'auto-complete) + +(defcustom ac-dictionary-files '("~/.dict") + "Dictionary files." + :type '(repeat string) + :group 'auto-complete) +(defvaralias 'ac-user-dictionary-files 'ac-dictionary-files) + +(defcustom ac-dictionary-directories + (ignore-errors + (when load-file-name + (let ((installed-dir (file-name-directory load-file-name))) + (loop for name in '("ac-dict" "dict") + for dir = (concat installed-dir name) + if (file-directory-p dir) + collect dir)))) + "Dictionary directories." + :type '(repeat string) + :group 'auto-complete) + +(defcustom ac-use-quick-help t + "Non-nil means use quick help." + :type 'boolean + :group 'auto-complete) + +(defcustom ac-quick-help-delay 1.5 + "Delay to show quick help." + :type 'float + :group 'auto-complete) + +(defcustom ac-menu-height 10 + "Max height of candidate menu." + :type 'integer + :group 'auto-complete) +(defvaralias 'ac-candidate-menu-height 'ac-menu-height) + +(defcustom ac-quick-help-height 20 + "Max height of quick help." + :type 'integer + :group 'auto-complete) + +(defcustom ac-quick-help-prefer-pos-tip t + "Prefer native tooltip with pos-tip than overlay popup for displaying quick help." + :type 'boolean + :group 'auto-complete) +(defvaralias 'ac-quick-help-prefer-x 'ac-quick-help-prefer-pos-tip) + +(defcustom ac-candidate-limit nil + "Limit number of candidates. Non-integer means no limit." + :type 'integer + :group 'auto-complete) +(defvaralias 'ac-candidate-max 'ac-candidate-limit) + +(defcustom ac-modes + '(emacs-lisp-mode lisp-mode lisp-interaction-mode + slime-repl-mode + c-mode cc-mode c++-mode go-mode + java-mode malabar-mode clojure-mode clojurescript-mode scala-mode + scheme-mode + ocaml-mode tuareg-mode coq-mode haskell-mode agda-mode agda2-mode + perl-mode cperl-mode python-mode ruby-mode lua-mode tcl-mode + ecmascript-mode javascript-mode js-mode js2-mode php-mode css-mode + makefile-mode sh-mode fortran-mode f90-mode ada-mode + xml-mode sgml-mode + ts-mode + sclang-mode + verilog-mode + qml-mode) + "Major modes `auto-complete-mode' can run on." + :type '(repeat symbol) + :group 'auto-complete) + +(defcustom ac-compatible-packages-regexp + "^ac-" + "Regexp to indicate what packages can work with auto-complete." + :type 'string + :group 'auto-complete) + +(defcustom ac-non-trigger-commands + '(*table--cell-self-insert-command + electric-buffer-list) + "Commands that can't be used as triggers of `auto-complete'." + :type '(repeat symbol) + :group 'auto-complete) + +(defcustom ac-trigger-commands + '(self-insert-command) + "Trigger commands that specify whether `auto-complete' should start or not." + :type '(repeat symbol) + :group 'auto-complete) + +(defcustom ac-trigger-commands-on-completing + '(delete-backward-char + backward-delete-char + backward-delete-char-untabify + ;; autopair + autopair-backspace + ;; paredit + paredit-backward-delete + paredit-backward-delete-word) + "Trigger commands that specify whether `auto-complete' should continue or not." + :type '(repeat symbol) + :group 'auto-complete) + +(defcustom ac-trigger-key nil + "Non-nil means `auto-complete' will start by typing this key. +If you specify this TAB, for example, `auto-complete' will start by typing TAB, +and if there is no completions, an original command will be fallbacked." + :type '(choice (const :tag "None" nil) + (string :tag "Key")) + :group 'auto-complete + :set (lambda (symbol value) + (set-default symbol value) + (when (and value + (fboundp 'ac-set-trigger-key)) + (ac-set-trigger-key value)))) + +(defcustom ac-auto-start 2 + "Non-nil means completion will be started automatically. +Positive integer means if a length of a word you entered is larger than the value, +completion will be started automatically. +If you specify `nil', never be started automatically." + :type '(choice (const :tag "Yes" t) + (const :tag "Never" nil) + (integer :tag "Require")) + :group 'auto-complete) + +(defcustom ac-stop-words nil + "List of string to stop completion." + :type '(repeat string) + :group 'auto-complete) +(defvaralias 'ac-ignores 'ac-stop-words) + +(defcustom ac-use-dictionary-as-stop-words t + "Non-nil means a buffer related dictionary will be thought of as stop words." + :type 'boolean + :group 'auto-complete) + +(defcustom ac-ignore-case 'smart + "Non-nil means auto-complete ignores case. +If this value is `smart', auto-complete ignores case only when +a prefix doen't contain any upper case letters." + :type '(choice (const :tag "Yes" t) + (const :tag "Smart" smart) + (const :tag "No" nil)) + :group 'auto-complete) + +(defcustom ac-dwim t + "Non-nil means `auto-complete' works based on Do What I Mean." + :type 'boolean + :group 'auto-complete) + +(defcustom ac-use-menu-map nil + "Non-nil means a special keymap `ac-menu-map' on completing menu will be used." + :type 'boolean + :group 'auto-complete) + +(defcustom ac-use-overriding-local-map nil + "Non-nil means `overriding-local-map' will be used to hack for overriding key events on auto-completion." + :type 'boolean + :group 'auto-complete) + +(defcustom ac-disable-inline nil + "Non-nil disable inline completion visibility" + :type 'boolean + :group 'auto-complete) + +(defcustom ac-candidate-menu-min 1 + "Number of candidates required to display menu" + :type 'integer + :group 'auto-complete) + +(defcustom ac-max-width nil + "Maximum width for auto-complete menu to have" + :type '(choice (const :tag "No limit" nil) + (const :tag "Character Limit" 25) + (const :tag "Window Ratio Limit" 0.5)) + :group 'auto-complete) + +(defface ac-completion-face + '((t (:foreground "darkgray" :underline t))) + "Face for inline completion" + :group 'auto-complete) + +(defface ac-candidate-face + '((t (:inherit popup-face))) + "Face for candidate." + :group 'auto-complete) + +(defface ac-candidate-mouse-face + '((t (:inherit popup-menu-mouse-face))) + "Mouse face for candidate." + :group 'auto-complete) + +(defface ac-selection-face + '((t (:inherit popup-menu-selection-face))) + "Face for selected candidate." + :group 'auto-complete) + +(defvar auto-complete-mode-hook nil + "Hook for `auto-complete-mode'.") + + + +;;;; Internal variables + +(defvar auto-complete-mode nil + "Dummy variable to suppress compiler warnings.") + +(defvar ac-cursor-color nil + "Old cursor color.") + +(defvar ac-inline nil + "Inline completion instance.") + +(defvar ac-menu nil + "Menu instance.") + +(defvar ac-show-menu nil + "Flag to show menu on timer tick.") + +(defvar ac-last-completion nil + "Cons of prefix marker and selected item of last completion.") + +(defvar ac-quick-help nil + "Quick help instance") + +(defvar ac-completing nil + "Non-nil means `auto-complete-mode' is now working on completion.") + +(defvar ac-buffer nil + "Buffer where auto-complete is started.") + +(defvar ac-point nil + "Start point of prefix.") + +(defvar ac-last-point nil + "Last point of updating pattern.") + +(defvar ac-prefix nil + "Prefix string.") +(defvaralias 'ac-target 'ac-prefix) + +(defvar ac-selected-candidate nil + "Last selected candidate.") + +(defvar ac-common-part nil + "Common part string of meaningful candidates. +If there is no common part, this will be nil.") + +(defvar ac-whole-common-part nil + "Common part string of whole candidates. +If there is no common part, this will be nil.") + +(defvar ac-prefix-overlay nil + "Overlay for prefix string.") + +(defvar ac-timer nil + "Completion idle timer.") + +(defvar ac-show-menu-timer nil + "Show menu idle timer.") + +(defvar ac-quick-help-timer nil + "Quick help idle timer.") + +(defvar ac-triggered nil + "Flag to update.") + +(defvar ac-limit nil + "Limit number of candidates for each sources.") + +(defvar ac-candidates nil + "Current candidates.") + +(defvar ac-candidates-cache nil + "Candidates cache for individual sources.") + +(defvar ac-fuzzy-enable nil + "Non-nil means fuzzy matching is enabled.") + +(defvar ac-dwim-enable nil + "Non-nil means DWIM completion will be allowed.") + +(defvar ac-mode-map (make-sparse-keymap) + "Auto-complete mode map. It is also used for trigger key command. See also `ac-trigger-key'.") + +(defvar ac-completing-map + (let ((map (make-sparse-keymap))) + (define-key map "\t" 'ac-expand) + (define-key map [tab] 'ac-expand) + (define-key map "\r" 'ac-complete) + (define-key map [return] 'ac-complete) + (define-key map (kbd "M-TAB") 'auto-complete) + + (define-key map "\M-n" 'ac-next) + (define-key map "\M-p" 'ac-previous) + (define-key map [down] 'ac-next) + (define-key map [up] 'ac-previous) + + (define-key map [f1] 'ac-help) + (define-key map [M-f1] 'ac-persist-help) + (define-key map (kbd "C-?") 'ac-help) + (define-key map (kbd "C-M-?") 'ac-persist-help) + + (define-key map [C-down] 'ac-quick-help-scroll-down) + (define-key map [C-up] 'ac-quick-help-scroll-up) + (define-key map "\C-\M-n" 'ac-quick-help-scroll-down) + (define-key map "\C-\M-p" 'ac-quick-help-scroll-up) + + (dotimes (i 9) + (let ((symbol (intern (format "ac-complete-select-%d" (1+ i))))) + (fset symbol + `(lambda () + (interactive) + (when (and (ac-menu-live-p) (popup-select ac-menu ,i)) + (ac-complete)))) + (define-key map (read-kbd-macro (format "M-%s" (1+ i))) symbol))) + + map) + "Keymap for completion.") +(defvaralias 'ac-complete-mode-map 'ac-completing-map) + +(defvar ac-menu-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map ac-completing-map) + (define-key map "\C-n" 'ac-next) + (define-key map "\C-p" 'ac-previous) + (define-key map "\C-s" 'ac-isearch) + (define-key map [mouse-1] 'ac-mouse-1) + (define-key map [down-mouse-1] 'ac-ignore) + (define-key map [mouse-4] 'ac-mouse-4) + (define-key map [mouse-5] 'ac-mouse-5) + map) + "Keymap for completion on completing menu.") + +(defvar ac-current-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map ac-completing-map) + map)) + +(defvar ac-match-function 'all-completions + "Default match function.") + +(defvar ac-prefix-definitions + '((symbol . ac-prefix-symbol) + (file . ac-prefix-file) + (valid-file . ac-prefix-valid-file) + (c-dot . ac-prefix-c-dot) + (c-dot-ref . ac-prefix-c-dot-ref) + (cc-member . ac-prefix-cc-member)) + "Prefix definitions for common use.") + +(defvar ac-sources '(ac-source-words-in-same-mode-buffers) + "Sources for completion.") +(make-variable-buffer-local 'ac-sources) + +(defvar ac-compiled-sources nil + "Compiled source of `ac-sources'.") + +(defvar ac-current-sources nil + "Current working sources. This is sublist of `ac-compiled-sources'.") + +(defvar ac-omni-completion-sources nil + "Do not use this anymore.") + +(defvar ac-current-prefix-def nil) + +(defvar ac-ignoring-prefix-def nil) + + + +;;;; Intelligent completion history + +(defvar ac-comphist nil + "Database of completion history.") + +(defsubst ac-comphist-make-tab () + (make-hash-table :test 'equal)) + +(defsubst ac-comphist-tab (db) + (nth 0 db)) + +(defsubst ac-comphist-cache (db) + (nth 1 db)) + +(defun ac-comphist-make (&optional tab) + (list (or tab (ac-comphist-make-tab)) (make-hash-table :test 'equal :weakness t))) + +(defun ac-comphist-get (db string &optional create) + (let* ((tab (ac-comphist-tab db)) + (index (gethash string tab))) + (when (and create (null index)) + (setq index (make-vector (length string) 0)) + (puthash string index tab)) + index)) + +(defun ac-comphist-add (db string prefix) + (setq prefix (min prefix (1- (length string)))) + (when (<= 0 prefix) + (setq string (substring-no-properties string)) + (let ((stat (ac-comphist-get db string t))) + (incf (aref stat prefix)) + (remhash string (ac-comphist-cache db))))) + +(defun ac-comphist-score (db string prefix) + (setq prefix (min prefix (1- (length string)))) + (if (<= 0 prefix) + (let ((cache (gethash string (ac-comphist-cache db)))) + (or (and cache (aref cache prefix)) + (let ((stat (ac-comphist-get db string)) + (score 0.0)) + (when stat + (loop for p from 0 below (length string) + ;; sigmoid function + with a = 5 + with b = (/ 700.0 a) ; bounds for avoiding range error in `exp' + with d = (/ 6.0 a) + for x = (max (- b) (min b (- d (abs (- prefix p))))) + for r = (/ 1.0 (1+ (exp (* (- a) x)))) + do + (incf score (* (aref stat p) r)))) + ;; Weight by distance + (incf score (max 0.0 (- 0.3 (/ (- (length string) prefix) 100.0)))) + (unless cache + (setq cache (make-vector (length string) nil)) + (puthash string cache (ac-comphist-cache db))) + (aset cache prefix score) + score))) + 0.0)) + +(defun ac-comphist-sort (db collection prefix &optional threshold) + (let (result + (n 0) + (total 0) + (cur 0)) + (setq result (mapcar (lambda (a) + (when (and cur threshold) + (if (>= cur (* total threshold)) + (setq cur nil) + (incf n) + (incf cur (cdr a)))) + (car a)) + (sort (mapcar (lambda (string) + (let ((score (ac-comphist-score db string prefix))) + (incf total score) + (cons string score))) + collection) + (lambda (a b) (< (cdr b) (cdr a)))))) + (if threshold + (cons n result) + result))) + +(defun ac-comphist-serialize (db) + (let (alist) + (maphash (lambda (k v) + (push (cons k v) alist)) + (ac-comphist-tab db)) + (list alist))) + +(defun ac-comphist-deserialize (sexp) + (condition-case nil + (ac-comphist-make (let ((tab (ac-comphist-make-tab))) + (mapc (lambda (cons) + (puthash (car cons) (cdr cons) tab)) + (nth 0 sexp)) + tab)) + (error (message "Invalid comphist db.") nil))) + +(defun ac-comphist-init () + (ac-comphist-load) + (add-hook 'kill-emacs-hook 'ac-comphist-save)) + +(defun ac-comphist-load () + (interactive) + (let ((db (if (file-exists-p ac-comphist-file) + (ignore-errors + (with-temp-buffer + (insert-file-contents ac-comphist-file) + (goto-char (point-min)) + (ac-comphist-deserialize (read (current-buffer)))))))) + (setq ac-comphist (or db (ac-comphist-make))))) + +(defun ac-comphist-save () + (interactive) + (require 'pp) + (ignore-errors + (with-temp-buffer + (pp (ac-comphist-serialize ac-comphist) (current-buffer)) + (write-region (point-min) (point-max) ac-comphist-file)))) + + + +;;;; Dictionary +(defvar ac-buffer-dictionary nil) +(defvar ac-file-dictionary (make-hash-table :test 'equal)) + +(defun ac-clear-dictionary-cache () + (interactive) + (dolist (buffer (buffer-list)) + (with-current-buffer buffer + (if (local-variable-p 'ac-buffer-dictionary) + (kill-local-variable 'ac-buffer-dictionary)))) + (clrhash ac-file-dictionary)) + +(defun ac-file-dictionary (filename) + (let ((cache (gethash filename ac-file-dictionary 'none))) + (if (and cache (not (eq cache 'none))) + cache + (let (result) + (ignore-errors + (with-temp-buffer + (insert-file-contents filename) + (setq result (split-string (buffer-string) "\n" t)))) + (puthash filename result ac-file-dictionary) + result)))) + +(defun ac-mode-dictionary (mode) + (loop for name in (cons (symbol-name mode) + (ignore-errors (list (file-name-extension (buffer-file-name))))) + append (loop for dir in ac-dictionary-directories + for file = (concat dir "/" name) + if (file-exists-p file) + append (ac-file-dictionary file)))) + +(defun ac-buffer-dictionary (&optional buffer) + (with-current-buffer (or buffer (current-buffer)) + (if (local-variable-p 'ac-buffer-dictionary) + ac-buffer-dictionary + (make-local-variable 'ac-buffer-dictionary) + (setq ac-buffer-dictionary + (apply 'append + ac-user-dictionary + (ac-mode-dictionary major-mode) + (mapcar 'ac-file-dictionary ac-dictionary-files)))))) + + + +;;;; Auto completion internals + +(defun ac-menu-at-wrapper-line-p () + "Return non-nil if current line is long and wrapped to next visual line." + (and (not truncate-lines) + (eq (line-beginning-position) + (save-excursion + (vertical-motion 1) + (line-beginning-position))))) + +(defun ac-stop-word-p (word) + (or (member word ac-stop-words) + (if ac-use-dictionary-as-stop-words + (member word (ac-buffer-dictionary))))) + +(defun ac-prefix-default () + "Same as `ac-prefix-symbol' but ignore a number prefix." + (let ((start (ac-prefix-symbol))) + (when start + (loop with end = (point) + for pos from start below end + for c = (char-after pos) + if (not (and (<= ?0 c) (<= c ?9))) + return start)))) + +(defun ac-prefix-symbol () + "Default prefix definition function." + (require 'thingatpt) + (car-safe (bounds-of-thing-at-point 'symbol))) + +(defun ac-prefix-file () + "File prefix." + (let ((point (re-search-backward "[\"<>' \t\r\n]" nil t))) + (if point (1+ point)))) + +(defsubst ac-windows-remote-file-p (file) + (and (memq system-type '(ms-dos windows-nt cygwin)) + (string-match-p "\\`\\(?://\\|\\\\\\\\\\)" file))) + +(defun ac-prefix-valid-file () + "Existed (or to be existed) file prefix." + (let* ((line-beg (line-beginning-position)) + (end (point)) + (start (or (let ((point (re-search-backward "[\"<>'= \t\r\n]" line-beg t))) + (if point (1+ point))) + line-beg)) + (file (buffer-substring start end))) + (if (and file (or (string-match "^/" file) + (and (setq file (and (string-match "^[^/]*/" file) + (match-string 0 file))) + (file-directory-p file)))) + (unless (ac-windows-remote-file-p file) + start)))) + +(defun ac-prefix-c-dot () + "C-like languages dot(.) prefix." + (if (re-search-backward "\\.\\(\\(?:[a-zA-Z0-9][_a-zA-Z0-9]*\\)?\\)\\=" nil t) + (match-beginning 1))) + +(defun ac-prefix-c-dot-ref () + "C-like languages dot(.) and reference(->) prefix." + (if (re-search-backward "\\(?:\\.\\|->\\)\\(\\(?:[a-zA-Z0-9][_a-zA-Z0-9]*\\)?\\)\\=" nil t) + (match-beginning 1))) + +(defun ac-prefix-cc-member () + "C-like languages member(.)(->)(::) prefix." + (when (re-search-backward "\\(?:\\.\\|->\\|::\\)\\(\\(?:[a-zA-Z0-9][_a-zA-Z0-9]*\\)?\\)\\=" nil t) + (match-beginning 1))) + +(defun ac-define-prefix (name prefix) + "Define new prefix definition. +You can not use it in source definition like (prefix . `NAME')." + (push (cons name prefix) ac-prefix-definitions)) + +(defun ac-match-substring (prefix candidates) + (loop with regexp = (regexp-quote prefix) + for candidate in candidates + if (string-match regexp candidate) + collect candidate)) + +(defsubst ac-source-entity (source) + (if (symbolp source) + (symbol-value source) + source)) + +(defun ac-source-available-p (source) + (if (and (symbolp source) + (get source 'available)) + (eq (get source 'available) t) + (let* ((src (ac-source-entity source)) + (avail-pair (assq 'available src)) + (avail-cond (cdr avail-pair)) + (available (and (if avail-pair + (cond + ((symbolp avail-cond) + (funcall avail-cond)) + ((listp avail-cond) + (eval avail-cond))) + t) + (loop for feature in (assoc-default 'depends src) + unless (require feature nil t) return nil + finally return t)))) + (if (symbolp source) + (put source 'available (if available t 'no))) + available))) + +(defun ac-compile-sources (sources) + "Compiled `SOURCES' into expanded sources style." + (loop for source in sources + if (ac-source-available-p source) + do + (setq source (ac-source-entity source)) + ;; prefix + (let* ((prefix (assoc 'prefix source)) + (real (assoc-default (cdr prefix) ac-prefix-definitions))) + (cond + (real + (add-to-list 'source (cons 'prefix real))) + ((null prefix) + (add-to-list 'source (cons 'prefix 'ac-prefix-default))))) + ;; match + (let ((match (assq 'match source))) + (cond + ((eq (cdr match) 'substring) + (setcdr match 'ac-match-substring)))) + and collect source)) + +(defun ac-compiled-sources () + (or ac-compiled-sources + (setq ac-compiled-sources + (ac-compile-sources ac-sources)))) + +(defsubst ac-menu-live-p () + (popup-live-p ac-menu)) + +(defun ac-menu-create (point width height) + (setq ac-menu + (popup-create point width height + :around t + :face 'ac-candidate-face + :max-width ac-max-width + :mouse-face 'ac-candidate-mouse-face + :selection-face 'ac-selection-face + :symbol t + :scroll-bar t + :margin-left 1 + :keymap ac-menu-map + ))) + +(defun ac-menu-delete () + (when ac-menu + (popup-delete ac-menu) + (setq ac-menu))) + +(defsubst ac-inline-overlay () + (nth 0 ac-inline)) + +(defsubst ac-inline-live-p () + (and ac-inline (ac-inline-overlay) t)) + +(defun ac-inline-show (point string) + (unless ac-inline + (setq ac-inline (list nil))) + (save-excursion + (let ((overlay (ac-inline-overlay)) + (width 0) + (string-width (string-width string)) + (length 0) + (original-string string)) + ;; Calculate string space to show completion + (goto-char point) + (let (c) + (while (and (not (eolp)) + (< width string-width) + (setq c (char-after)) + (not (eq c ?\t))) ; special case for tab + (incf width (char-width c)) + (incf length) + (forward-char))) + + ;; Show completion + (goto-char point) + (cond + ((= width 0) + ;; End-of-line + ;; Do nothing + ) + ((<= width string-width) + ;; No space to show + ;; Do nothing + ) + ((> width string-width) + ;; Need to fill space + (setq string (concat string (make-string (- width string-width) ? ))))) + (setq string (propertize string 'face 'ac-completion-face)) + (if overlay + (progn + (move-overlay overlay point (+ point length)) + (overlay-put overlay 'invisible nil)) + (setq overlay (make-overlay point (+ point length))) + (setf (nth 0 ac-inline) overlay) + (overlay-put overlay 'priority 9999) + ;; Help prefix-overlay in some cases + (overlay-put overlay 'keymap ac-current-map)) + ;; TODO no width but char + (if (eq length 0) + ;; Case: End-of-line + (progn + (put-text-property 0 1 'cursor t string) + (overlay-put overlay 'after-string string)) + (let ((display (substring string 0 1)) + (after-string (substring string 1))) + (overlay-put overlay 'display display) + (overlay-put overlay 'after-string after-string))) + (overlay-put overlay 'string original-string)))) + +(defun ac-inline-delete () + (when (ac-inline-live-p) + (ac-inline-hide) + (delete-overlay (ac-inline-overlay)) + (setq ac-inline nil))) + +(defun ac-inline-hide () + (when (ac-inline-live-p) + (let ((overlay (ac-inline-overlay)) + (buffer-undo-list t)) + (when overlay + (move-overlay overlay (point-min) (point-min)) + (overlay-put overlay 'invisible t) + (overlay-put overlay 'display nil) + (overlay-put overlay 'after-string nil))))) + +(defun ac-inline-update () + (if (and ac-completing ac-prefix (stringp ac-common-part)) + (let ((common-part-length (length ac-common-part)) + (prefix-length (length ac-prefix))) + (if (> common-part-length prefix-length) + (progn + (ac-inline-hide) + (ac-inline-show (point) (substring ac-common-part prefix-length))) + (ac-inline-delete))) + (ac-inline-delete))) + +(defun ac-put-prefix-overlay () + (unless ac-prefix-overlay + (let (newline) + ;; Insert newline to make sure that cursor always on the overlay + (when (eobp) + (popup-save-buffer-state + (insert "\n")) + (setq newline t)) + (setq ac-prefix-overlay (make-overlay ac-point (1+ (point)) nil t t)) + (overlay-put ac-prefix-overlay 'priority 9999) + (overlay-put ac-prefix-overlay 'keymap (make-sparse-keymap)) + (overlay-put ac-prefix-overlay 'newline newline)))) + +(defun ac-remove-prefix-overlay () + (when ac-prefix-overlay + (when (overlay-get ac-prefix-overlay 'newline) + ;; Remove inserted newline + (popup-save-buffer-state + (goto-char (point-max)) + (if (eq (char-before) ?\n) + (delete-char -1)))) + (delete-overlay ac-prefix-overlay))) + +(defun ac-activate-completing-map () + (if (and ac-show-menu ac-use-menu-map) + (set-keymap-parent ac-current-map ac-menu-map)) + (when (and ac-use-overriding-local-map + (null overriding-terminal-local-map)) + (setq overriding-terminal-local-map ac-current-map)) + (when ac-prefix-overlay + (set-keymap-parent (overlay-get ac-prefix-overlay 'keymap) ac-current-map))) + +(defun ac-deactivate-completing-map () + (set-keymap-parent ac-current-map ac-completing-map) + (when (and ac-use-overriding-local-map + (eq overriding-terminal-local-map ac-current-map)) + (setq overriding-terminal-local-map nil)) + (when ac-prefix-overlay + (set-keymap-parent (overlay-get ac-prefix-overlay 'keymap) nil))) + +(defsubst ac-selected-candidate () + (if ac-menu + (popup-selected-item ac-menu))) + +(defun ac-prefix (requires ignore-list) + (loop with current = (point) + with point + with prefix-def + with sources + for source in (ac-compiled-sources) + for prefix = (assoc-default 'prefix source) + for req = (or (assoc-default 'requires source) requires 1) + + if (null prefix-def) + do + (unless (member prefix ignore-list) + (save-excursion + (setq point (cond + ((symbolp prefix) + (funcall prefix)) + ((stringp prefix) + (and (re-search-backward (concat prefix "\\=") nil t) + (or (match-beginning 1) (match-beginning 0)))) + ((stringp (car-safe prefix)) + (let ((regexp (nth 0 prefix)) + (end (nth 1 prefix)) + (group (nth 2 prefix))) + (and (re-search-backward (concat regexp "\\=") nil t) + (funcall (if end 'match-end 'match-beginning) + (or group 0))))) + (t + (eval prefix)))) + (if (and point + (integerp req) + (< (- current point) req)) + (setq point nil)) + (if point + (setq prefix-def prefix)))) + + if (equal prefix prefix-def) do (push source sources) + + finally return + (and point (list prefix-def point (nreverse sources))))) + +(defun ac-init () + "Initialize current sources to start completion." + (setq ac-candidates-cache nil) + (loop for source in ac-current-sources + for function = (assoc-default 'init source) + if function do + (save-excursion + (cond + ((functionp function) + (funcall function)) + (t + (eval function)))))) + +(defun ac-candidates-1 (source) + (let* ((do-cache (assq 'cache source)) + (function (assoc-default 'candidates source)) + (action (assoc-default 'action source)) + (document (assoc-default 'document source)) + (symbol (assoc-default 'symbol source)) + (ac-limit (or (assoc-default 'limit source) ac-limit)) + (face (or (assoc-default 'face source) (assoc-default 'candidate-face source))) + (selection-face (assoc-default 'selection-face source)) + (cache (and do-cache (assq source ac-candidates-cache))) + (candidates (cdr cache))) + (unless cache + (setq candidates (save-excursion + (cond + ((functionp function) + (funcall function)) + (t + (eval function))))) + ;; Convert (name value) format candidates into name with text properties. + (setq candidates (mapcar (lambda (candidate) + (if (consp candidate) + (propertize (car candidate) 'value (cdr candidate)) + candidate)) + candidates)) + (when do-cache + (push (cons source candidates) ac-candidates-cache))) + (setq candidates (funcall (or (assoc-default 'match source) + ac-match-function) + ac-prefix candidates)) + ;; Remove extra items regarding to ac-limit + (if (and (integerp ac-limit) (> ac-limit 1) (> (length candidates) ac-limit)) + (setcdr (nthcdr (1- ac-limit) candidates) nil)) + ;; Put candidate properties + (setq candidates (mapcar (lambda (candidate) + (popup-item-propertize candidate + 'action action + 'symbol symbol + 'document document + 'popup-face face + 'selection-face selection-face)) + candidates)) + candidates)) + +(defun ac-candidates () + "Produce candidates for current sources." + (loop with completion-ignore-case = (or (eq ac-ignore-case t) + (and (eq ac-ignore-case 'smart) + (let ((case-fold-search nil)) (not (string-match "[[:upper:]]" ac-prefix))))) + with case-fold-search = completion-ignore-case + with prefix-len = (length ac-prefix) + for source in ac-current-sources + append (ac-candidates-1 source) into candidates + finally return + (progn + (delete-dups candidates) + (if (and ac-use-comphist ac-comphist) + (if ac-show-menu + (let* ((pair (ac-comphist-sort ac-comphist candidates prefix-len ac-comphist-threshold)) + (n (car pair)) + (result (cdr pair)) + (cons (if (> n 0) (nthcdr (1- n) result))) + (cdr (cdr cons))) + (if cons (setcdr cons nil)) + (setq ac-common-part (try-completion ac-prefix result)) + (setq ac-whole-common-part (try-completion ac-prefix candidates)) + (if cons (setcdr cons cdr)) + result) + (setq candidates (ac-comphist-sort ac-comphist candidates prefix-len)) + (setq ac-common-part (if candidates (popup-x-to-string (car candidates)))) + (setq ac-whole-common-part (try-completion ac-prefix candidates)) + candidates) + (setq ac-common-part (try-completion ac-prefix candidates)) + (setq ac-whole-common-part ac-common-part) + candidates)))) + +(defun ac-update-candidates (cursor scroll-top) + "Update candidates of menu to `ac-candidates' and redraw it." + (setf (popup-cursor ac-menu) cursor + (popup-scroll-top ac-menu) scroll-top) + (setq ac-dwim-enable (= (length ac-candidates) 1)) + (if ac-candidates + (progn + (setq ac-completing t) + (ac-activate-completing-map)) + (setq ac-completing nil) + (ac-deactivate-completing-map)) + (unless ac-disable-inline + (ac-inline-update)) + (popup-set-list ac-menu ac-candidates) + (if (and (not ac-fuzzy-enable) + (<= (length ac-candidates) ac-candidate-menu-min)) + (popup-hide ac-menu) + (if ac-show-menu + (popup-draw ac-menu)))) + +(defun ac-reposition () + "Force to redraw candidate menu with current `ac-candidates'." + (let ((cursor (popup-cursor ac-menu)) + (scroll-top (popup-scroll-top ac-menu)) + (height (popup-height ac-menu))) + (ac-menu-delete) + (ac-menu-create ac-point (popup-preferred-width ac-candidates) height) + (ac-update-candidates cursor scroll-top))) + +(defun ac-cleanup () + "Cleanup auto completion." + (if ac-cursor-color + (set-cursor-color ac-cursor-color)) + (when (and ac-use-comphist ac-comphist) + (when (and (null ac-selected-candidate) + (member ac-prefix ac-candidates)) + ;; Assume candidate is selected by just typing + (setq ac-selected-candidate ac-prefix) + (setq ac-last-point ac-point)) + (when ac-selected-candidate + (ac-comphist-add ac-comphist + ac-selected-candidate + (if ac-last-point + (- ac-last-point ac-point) + (length ac-prefix))))) + (ac-deactivate-completing-map) + (ac-remove-prefix-overlay) + (ac-remove-quick-help) + (ac-inline-delete) + (ac-menu-delete) + (ac-cancel-timer) + (ac-cancel-show-menu-timer) + (ac-cancel-quick-help-timer) + (setq ac-cursor-color nil + ac-inline nil + ac-show-menu nil + ac-menu nil + ac-completing nil + ac-point nil + ac-last-point nil + ac-prefix nil + ac-prefix-overlay nil + ac-selected-candidate nil + ac-common-part nil + ac-whole-common-part nil + ac-triggered nil + ac-limit nil + ac-candidates nil + ac-candidates-cache nil + ac-fuzzy-enable nil + ac-dwim-enable nil + ac-compiled-sources nil + ac-current-sources nil + ac-current-prefix-def nil + ac-ignoring-prefix-def nil)) + +(defsubst ac-abort () + "Abort completion." + (ac-cleanup)) + +(defun ac-expand-string (string &optional remove-undo-boundary) + "Expand `STRING' into the buffer and update `ac-prefix' to `STRING'. +This function records deletion and insertion sequences by `undo-boundary'. +If `remove-undo-boundary' is non-nil, this function also removes `undo-boundary' +that have been made before in this function. When `buffer-undo-list' is +`t', `remove-undo-boundary' has no effect." + (when (eq buffer-undo-list t) + (setq remove-undo-boundary nil)) + (when (not (equal string (buffer-substring ac-point (point)))) + (undo-boundary) + ;; We can't use primitive-undo since it undoes by + ;; groups, divided by boundaries. + ;; We don't want boundary between deletion and insertion. + ;; So do it manually. + ;; Delete region silently for undo: + (if remove-undo-boundary + (progn + (let (buffer-undo-list) + (save-excursion + (delete-region ac-point (point)))) + (setq buffer-undo-list + (nthcdr 2 buffer-undo-list))) + (delete-region ac-point (point))) + (insert (substring-no-properties string)) + ;; Sometimes, possible when omni-completion used, (insert) added + ;; to buffer-undo-list strange record about position changes. + ;; Delete it here: + (when (and remove-undo-boundary + (integerp (cadr buffer-undo-list))) + (setcdr buffer-undo-list (nthcdr 2 buffer-undo-list))) + (undo-boundary) + (setq ac-selected-candidate string) + (setq ac-prefix string))) + +(defun ac-set-trigger-key (key) + "Set `ac-trigger-key' to `KEY'. It is recommemded to use this function instead of calling `setq'." + ;; Remove old mapping + (when ac-trigger-key + (define-key ac-mode-map (read-kbd-macro ac-trigger-key) nil)) + + ;; Make new mapping + (setq ac-trigger-key key) + (when key + (define-key ac-mode-map (read-kbd-macro key) 'ac-trigger-key-command))) + +(defun ac-set-timer () + (unless ac-timer + (setq ac-timer (run-with-idle-timer ac-delay ac-delay 'ac-update-greedy)))) + +(defun ac-cancel-timer () + (when (timerp ac-timer) + (cancel-timer ac-timer) + (setq ac-timer nil))) + +(defun ac-update (&optional force) + (when (and auto-complete-mode + ac-prefix + (or ac-triggered + force) + (not isearch-mode)) + (ac-put-prefix-overlay) + (setq ac-candidates (ac-candidates)) + (let ((preferred-width (popup-preferred-width ac-candidates))) + ;; Reposition if needed + (when (or (null ac-menu) + (>= (popup-width ac-menu) preferred-width) + (<= (popup-width ac-menu) (- preferred-width 10)) + (and (> (popup-direction ac-menu) 0) + (ac-menu-at-wrapper-line-p))) + (ac-inline-hide) ; Hide overlay to calculate correct column + (ac-remove-quick-help) + (ac-menu-delete) + (ac-menu-create ac-point preferred-width ac-menu-height))) + (ac-update-candidates 0 0) + t)) + +(defun ac-update-greedy (&optional force) + (let (result) + (while (when (and (setq result (ac-update force)) + (null ac-candidates)) + (add-to-list 'ac-ignoring-prefix-def ac-current-prefix-def) + (ac-start :force-init t) + ac-current-prefix-def)) + result)) + +(defun ac-set-show-menu-timer () + (when (and (or (integerp ac-auto-show-menu) (floatp ac-auto-show-menu)) + (null ac-show-menu-timer)) + (setq ac-show-menu-timer (run-with-idle-timer ac-auto-show-menu ac-auto-show-menu 'ac-show-menu)))) + +(defun ac-cancel-show-menu-timer () + (when (timerp ac-show-menu-timer) + (cancel-timer ac-show-menu-timer) + (setq ac-show-menu-timer nil))) + +(defun ac-show-menu () + (when (not (eq ac-show-menu t)) + (setq ac-show-menu t) + (ac-inline-hide) + (ac-remove-quick-help) + (ac-update t))) + +(defun ac-help (&optional persist) + (interactive "P") + (when ac-menu + (popup-menu-show-help ac-menu persist))) + +(defun ac-persist-help () + (interactive) + (ac-help t)) + +(defun ac-last-help (&optional persist) + (interactive "P") + (when ac-last-completion + (popup-item-show-help (cdr ac-last-completion) persist))) + +(defun ac-last-persist-help () + (interactive) + (ac-last-help t)) + +(defun ac-set-quick-help-timer () + (when (and ac-use-quick-help + (null ac-quick-help-timer)) + (setq ac-quick-help-timer (run-with-idle-timer ac-quick-help-delay ac-quick-help-delay 'ac-quick-help)))) + +(defun ac-cancel-quick-help-timer () + (when (timerp ac-quick-help-timer) + (cancel-timer ac-quick-help-timer) + (setq ac-quick-help-timer nil))) + +(defun ac-pos-tip-show-quick-help (menu &optional item &rest args) + (let* ((point (plist-get args :point)) + (around nil) + (parent-offset (popup-offset menu)) + (doc (popup-menu-documentation menu item))) + (when (stringp doc) + (if (popup-hidden-p menu) + (setq around t) + (setq point nil)) + (with-no-warnings + (pos-tip-show doc + 'popup-tip-face + (or point + (and menu + (popup-child-point menu parent-offset)) + (point)) + nil 300 + popup-tip-max-width + nil nil + (and (not around) 0)) + (unless (plist-get args :nowait) + (clear-this-command-keys) + (unwind-protect + (push (read-event (plist-get args :prompt)) unread-command-events) + (pos-tip-hide)) + t))))) + +(defun ac-quick-help-use-pos-tip-p () + (and ac-quick-help-prefer-pos-tip + window-system + (featurep 'pos-tip))) + +(defun ac-quick-help (&optional force) + (interactive) + ;; TODO don't use FORCE + (when (and (or force + (with-no-warnings + ;; called-interactively-p can take no args + (called-interactively-p)) + ;; ac-isearch'ing + (null this-command)) + (ac-menu-live-p) + (null ac-quick-help)) + (setq ac-quick-help + (funcall (if (ac-quick-help-use-pos-tip-p) + 'ac-pos-tip-show-quick-help + 'popup-menu-show-quick-help) + ac-menu nil + :point ac-point + :height ac-quick-help-height + :nowait t)))) + +(defun ac-remove-quick-help () + (when (ac-quick-help-use-pos-tip-p) + (with-no-warnings + (pos-tip-hide))) + (when ac-quick-help + (popup-delete ac-quick-help) + (setq ac-quick-help nil))) + +(defun ac-last-quick-help () + (interactive) + (when (and ac-last-completion + (eq (marker-buffer (car ac-last-completion)) + (current-buffer))) + (let ((doc (popup-item-documentation (cdr ac-last-completion))) + (point (marker-position (car ac-last-completion)))) + (when (stringp doc) + (if (ac-quick-help-use-pos-tip-p) + (with-no-warnings (pos-tip-show doc nil point nil 300)) + (popup-tip doc + :point point + :around t + :scroll-bar t + :margin t)))))) + +(defmacro ac-define-quick-help-command (name arglist &rest body) + (declare (indent 2)) + `(progn + (defun ,name ,arglist ,@body) + (put ',name 'ac-quick-help-command t))) + +(ac-define-quick-help-command ac-quick-help-scroll-down () + (interactive) + (when ac-quick-help + (popup-scroll-down ac-quick-help))) + +(ac-define-quick-help-command ac-quick-help-scroll-up () + (interactive) + (when ac-quick-help + (popup-scroll-up ac-quick-help))) + + + +;;;; Auto completion isearch + +(defun ac-isearch-callback (list) + (setq ac-dwim-enable (eq (length list) 1))) + +(defun ac-isearch () + (interactive) + (when (ac-menu-live-p) + (ac-cancel-show-menu-timer) + (ac-show-menu) + (if ac-use-quick-help + (let ((popup-menu-show-quick-help-function + (if (ac-quick-help-use-pos-tip-p) + 'ac-pos-tip-show-quick-help + 'popup-menu-show-quick-help))) + (popup-isearch ac-menu + :callback 'ac-isearch-callback + :help-delay ac-quick-help-delay)) + (popup-isearch ac-menu :callback 'ac-isearch-callback)))) + + + +;;;; Auto completion commands + +(defun* auto-complete-1 (&key sources (triggered 'command)) + (let ((menu-live (ac-menu-live-p)) + (inline-live (ac-inline-live-p)) + started) + (ac-abort) + (let ((ac-sources (or sources ac-sources))) + (if (or ac-show-menu-immediately-on-auto-complete + inline-live) + (setq ac-show-menu t)) + (setq started (ac-start :triggered triggered))) + (when (ac-update-greedy t) + ;; TODO Not to cause inline completion to be disrupted. + (if (ac-inline-live-p) + (ac-inline-hide)) + ;; Not to expand when it is first time to complete + (when (and (or (and (not ac-expand-on-auto-complete) + (> (length ac-candidates) 1) + (not menu-live)) + (not (let ((ac-common-part ac-whole-common-part)) + (ac-expand-common)))) + ac-use-fuzzy + (null ac-candidates)) + (ac-fuzzy-complete))) + started)) + +;;;###autoload +(defun auto-complete (&optional sources) + "Start auto-completion at current point." + (interactive) + (auto-complete-1 :sources sources)) + +(defun ac-fuzzy-complete () + "Start fuzzy completion at current point." + (interactive) + (if (not (require 'fuzzy nil t)) + (message "Please install fuzzy.el if you use fuzzy completion") + (unless (ac-menu-live-p) + (ac-start)) + (let ((ac-match-function 'fuzzy-all-completions)) + (unless ac-cursor-color + (setq ac-cursor-color (frame-parameter (selected-frame) 'cursor-color))) + (if ac-fuzzy-cursor-color + (set-cursor-color ac-fuzzy-cursor-color)) + (setq ac-show-menu t) + (setq ac-fuzzy-enable t) + (setq ac-triggered nil) + (ac-update t))) + t) + +(defun ac-next () + "Select next candidate." + (interactive) + (when (ac-menu-live-p) + (when (popup-hidden-p ac-menu) + (ac-show-menu)) + (popup-next ac-menu) + (if (eq this-command 'ac-next) + (setq ac-dwim-enable t)))) + +(defun ac-previous () + "Select previous candidate." + (interactive) + (when (ac-menu-live-p) + (when (popup-hidden-p ac-menu) + (ac-show-menu)) + (popup-previous ac-menu) + (if (eq this-command 'ac-previous) + (setq ac-dwim-enable t)))) + +(defun ac-expand () + "Try expand, and if expanded twice, select next candidate." + (interactive) + (unless (ac-expand-common) + (let ((string (ac-selected-candidate))) + (when string + (when (equal ac-prefix string) + (ac-next) + (setq string (ac-selected-candidate))) + (ac-expand-string string (eq last-command this-command)) + ;; Do reposition if menu at long line + (if (and (> (popup-direction ac-menu) 0) + (ac-menu-at-wrapper-line-p)) + (ac-reposition)) + (setq ac-show-menu t) + string)))) + +(defun ac-expand-common () + "Try to expand meaningful common part." + (interactive) + (if (and ac-dwim ac-dwim-enable) + (ac-complete) + (when (and (ac-inline-live-p) + ac-common-part) + (ac-inline-hide) + (ac-expand-string ac-common-part (eq last-command this-command)) + (setq ac-common-part nil) + t))) + +(defun ac-complete-1 (candidate) + (let ((action (popup-item-property candidate 'action)) + (fallback nil)) + (when candidate + (unless (ac-expand-string candidate) + (setq fallback t)) + ;; Remember to show help later + (when (and ac-point candidate) + (unless ac-last-completion + (setq ac-last-completion (cons (make-marker) nil))) + (set-marker (car ac-last-completion) ac-point ac-buffer) + (setcdr ac-last-completion candidate))) + (ac-abort) + (cond + (action + (funcall action)) + (fallback + (ac-fallback-command))) + candidate)) + +(defun ac-complete () + "Try complete." + (interactive) + (ac-complete-1 (ac-selected-candidate))) + +(defun* ac-start (&key + requires + force-init + (triggered (or ac-triggered t))) + "Start completion." + (interactive) + (if (not auto-complete-mode) + (message "auto-complete-mode is not enabled") + (let* ((info (ac-prefix requires ac-ignoring-prefix-def)) + (prefix-def (nth 0 info)) + (point (nth 1 info)) + (sources (nth 2 info)) + prefix + (init (or force-init (not (eq ac-point point))))) + (if (or (null point) + (progn + (setq prefix (buffer-substring-no-properties point (point))) + (and (not (eq triggered 'command)) + (ac-stop-word-p prefix)))) + (prog1 nil + (ac-abort)) + (unless ac-cursor-color + (setq ac-cursor-color (frame-parameter (selected-frame) 'cursor-color))) + (setq ac-show-menu (or ac-show-menu (if (eq ac-auto-show-menu t) t)) + ac-current-sources sources + ac-buffer (current-buffer) + ac-point point + ac-prefix prefix + ac-limit ac-candidate-limit + ac-triggered triggered + ac-current-prefix-def prefix-def) + (when (or init (null ac-prefix-overlay)) + (ac-init)) + (ac-set-timer) + (ac-set-show-menu-timer) + (ac-set-quick-help-timer) + (ac-put-prefix-overlay) + t)))) + +(defun ac-stop () + "Stop completiong." + (interactive) + (setq ac-selected-candidate nil) + (ac-abort)) + +(defun ac-ignore (&rest ignore) + "Same as `ignore'." + (interactive)) + +(defun ac-mouse-1 (event) + (interactive "e") + (popup-awhen (popup-menu-item-of-mouse-event event) + (ac-complete-1 it))) + +(defun ac-mouse-4 (event) + (interactive "e") + (ac-previous)) + +(defun ac-mouse-5 (event) + (interactive "e") + (ac-next)) + +(defun ac-trigger-key-command (&optional force) + (interactive "P") + (let (started) + (when (or force (ac-trigger-command-p last-command)) + (setq started (auto-complete-1 :triggered 'trigger-key))) + (unless started + (ac-fallback-command 'ac-trigger-key-command)))) + + + +;;;; Basic cache facility + +(defvar ac-clear-variables-every-minute-timer nil) +(defvar ac-clear-variables-after-save nil) +(defvar ac-clear-variables-every-minute nil) +(defvar ac-minutes-counter 0) + +(defun ac-clear-variable-after-save (variable &optional pred) + (add-to-list 'ac-clear-variables-after-save (cons variable pred))) + +(defun ac-clear-variables-after-save () + (dolist (pair ac-clear-variables-after-save) + (if (or (null (cdr pair)) + (funcall (cdr pair))) + (set (car pair) nil)))) + +(defun ac-clear-variable-every-minutes (variable minutes) + (add-to-list 'ac-clear-variables-every-minute (cons variable minutes))) + +(defun ac-clear-variable-every-minute (variable) + (ac-clear-variable-every-minutes variable 1)) + +(defun ac-clear-variable-every-10-minutes (variable) + (ac-clear-variable-every-minutes variable 10)) + +(defun ac-clear-variables-every-minute () + (incf ac-minutes-counter) + (dolist (pair ac-clear-variables-every-minute) + (if (eq (% ac-minutes-counter (cdr pair)) 0) + (set (car pair) nil)))) + + + +;;;; Auto complete mode + +(defun ac-cursor-on-diable-face-p (&optional point) + (memq (get-text-property (or point (point)) 'face) ac-disable-faces)) + +(defun ac-trigger-command-p (command) + "Return non-nil if `COMMAND' is a trigger command." + (and (symbolp command) + (not (memq command ac-non-trigger-commands)) + (or (memq command ac-trigger-commands) + (string-match "self-insert-command" (symbol-name command)) + (string-match "electric" (symbol-name command))))) + +(defun ac-fallback-key-sequence () + (setq unread-command-events + (append (this-single-command-raw-keys) + unread-command-events)) + (read-key-sequence-vector "")) + +(defun ac-fallback-command (&optional except-command) + (let* ((auto-complete-mode nil) + (keys (ac-fallback-key-sequence)) + (command (and keys (key-binding keys)))) + (when (and (commandp command) + (not (eq command except-command))) + (setq this-command command) + (call-interactively command)))) + +(defun ac-compatible-package-command-p (command) + "Return non-nil if `COMMAND' is compatible with auto-complete." + (and (symbolp command) + (string-match ac-compatible-packages-regexp (symbol-name command)))) + +(defun ac-handle-pre-command () + (condition-case var + (if (or (setq ac-triggered (and (not ac-fuzzy-enable) ; ignore key storkes in fuzzy mode + (or (eq this-command 'auto-complete) ; special case + (ac-trigger-command-p this-command) + (and ac-completing + (memq this-command ac-trigger-commands-on-completing))) + (not (ac-cursor-on-diable-face-p)) + (or ac-triggered t))) + (ac-compatible-package-command-p this-command)) + (progn + (if (or (not (symbolp this-command)) + (not (get this-command 'ac-quick-help-command))) + (ac-remove-quick-help)) + ;; Not to cause inline completion to be disrupted. + (ac-inline-hide)) + (ac-abort)) + (error (ac-error var)))) + +(defun ac-handle-post-command () + (condition-case var + (when (and ac-triggered + (or ac-auto-start + ac-completing) + (not isearch-mode)) + (setq ac-last-point (point)) + (ac-start :requires (unless ac-completing ac-auto-start)) + (unless ac-disable-inline + (ac-inline-update))) + (error (ac-error var)))) + +(defvar ac-flycheck-poll-completion-end-timer nil + "Timer to poll end of completion.") + +(defun ac-syntax-checker-workaround () + (if ac-stop-flymake-on-completing + (progn + (make-local-variable 'ac-flycheck-poll-completion-end-timer) + (when (require 'flymake nil t) + (defadvice flymake-on-timer-event (around ac-flymake-stop-advice activate) + (unless ac-completing + ad-do-it))) + (when (require 'flycheck nil t) + (defadvice flycheck-handle-idle-change (around ac-flycheck-stop-advice activate) + (if ac-completing + (setq ac-flycheck-poll-completion-end-timer + (run-at-time ac-flycheck-poll-completion-end-interval + nil + #'flycheck-handle-idle-change)) + ad-do-it)))) + (when (featurep 'flymake) + (ad-disable-advice 'flymake-on-timer-event 'around 'ac-flymake-stop-advice)) + (when (featurep 'flycheck) + (ad-disable-advice 'flycheck-handle-idle-change 'around 'ac-flycheck-stop-advice)))) + +(defun ac-setup () + (if ac-trigger-key + (ac-set-trigger-key ac-trigger-key)) + (if ac-use-comphist + (ac-comphist-init)) + (unless ac-clear-variables-every-minute-timer + (setq ac-clear-variables-every-minute-timer (run-with-timer 60 60 'ac-clear-variables-every-minute))) + (ac-syntax-checker-workaround)) + +;;;###autoload +(define-minor-mode auto-complete-mode + "AutoComplete mode" + :lighter " AC" + :keymap ac-mode-map + :group 'auto-complete + (if auto-complete-mode + (progn + (ac-setup) + (add-hook 'pre-command-hook 'ac-handle-pre-command nil t) + (add-hook 'post-command-hook 'ac-handle-post-command nil t) + (add-hook 'after-save-hook 'ac-clear-variables-after-save nil t) + (run-hooks 'auto-complete-mode-hook)) + (remove-hook 'pre-command-hook 'ac-handle-pre-command t) + (remove-hook 'post-command-hook 'ac-handle-post-command t) + (remove-hook 'after-save-hook 'ac-clear-variables-after-save t) + (ac-abort))) + +(defun auto-complete-mode-maybe () + "What buffer `auto-complete-mode' prefers." + (if (and (not (minibufferp (current-buffer))) + (memq major-mode ac-modes)) + (auto-complete-mode 1))) + +;;;###autoload +(define-global-minor-mode global-auto-complete-mode + auto-complete-mode auto-complete-mode-maybe + :group 'auto-complete) + + + +;;;; Compatibilities with other extensions + +(defun ac-flyspell-workaround () + "Flyspell uses `sit-for' for delaying its process. Unfortunatelly, +it stops auto completion which is trigger with `run-with-idle-timer'. +This workaround avoid flyspell processes when auto completion is being started." + (interactive) + (defadvice flyspell-post-command-hook (around ac-flyspell-workaround activate) + (unless ac-triggered + ad-do-it))) + +(defun ac-linum-workaround () + "linum-mode tries to display the line numbers even for the +completion menu. This workaround stops that annoying behavior." + (interactive) + (defadvice linum-update (around ac-linum-update-workaround activate) + (unless ac-completing + ad-do-it))) + + + +;;;; Standard sources + +(defmacro ac-define-source (name source) + "Source definition macro. It defines a complete command also." + (declare (indent 1)) + `(progn + (defvar ,(intern (format "ac-source-%s" name))) + ;; Use `setq' to reset ac-source-NAME every time + ;; `ac-define-source' is called. This is useful, for example + ;; when evaluating `ac-define-source' using C-M-x (`eval-defun'). + (setq ,(intern (format "ac-source-%s" name)) ,source) + (defun ,(intern (format "ac-complete-%s" name)) () + (interactive) + (auto-complete '(,(intern (format "ac-source-%s" name))))))) + +;; Words in buffer source +(defvar ac-word-index nil) + +(defun ac-candidate-words-in-buffer (point prefix limit) + (let ((i 0) + candidate + candidates + (regexp (concat "\\_<" (regexp-quote prefix) "\\(\\sw\\|\\s_\\)+\\_>"))) + (save-excursion + ;; Search backward + (goto-char point) + (while (and (or (not (integerp limit)) (< i limit)) + (re-search-backward regexp nil t)) + (setq candidate (match-string-no-properties 0)) + (unless (member candidate candidates) + (push candidate candidates) + (incf i))) + ;; Search backward + (goto-char (+ point (length prefix))) + (while (and (or (not (integerp limit)) (< i limit)) + (re-search-forward regexp nil t)) + (setq candidate (match-string-no-properties 0)) + (unless (member candidate candidates) + (push candidate candidates) + (incf i))) + (nreverse candidates)))) + +(defun ac-incremental-update-word-index () + (unless (local-variable-p 'ac-word-index) + (make-local-variable 'ac-word-index)) + (if (null ac-word-index) + (setq ac-word-index (cons nil nil))) + ;; Mark incomplete + (if (car ac-word-index) + (setcar ac-word-index nil)) + (let ((index (cdr ac-word-index)) + (words (ac-candidate-words-in-buffer ac-point ac-prefix (or (and (integerp ac-limit) ac-limit) 10)))) + (dolist (word words) + (unless (member word index) + (push word index) + (setcdr ac-word-index index))))) + +(defun ac-update-word-index-1 () + (unless (local-variable-p 'ac-word-index) + (make-local-variable 'ac-word-index)) + (when (and (not (car ac-word-index)) + (< (buffer-size) 1048576)) + ;; Complete index + (setq ac-word-index + (cons t + (split-string (buffer-substring-no-properties (point-min) (point-max)) + "\\(?:^\\|\\_>\\).*?\\(?:\\_<\\|$\\)"))))) + +(defun ac-update-word-index () + (dolist (buffer (buffer-list)) + (when (or ac-fuzzy-enable + (not (eq buffer (current-buffer)))) + (with-current-buffer buffer + (ac-update-word-index-1))))) + +(defun ac-word-candidates (&optional buffer-pred) + (loop initially (unless ac-fuzzy-enable (ac-incremental-update-word-index)) + for buffer in (buffer-list) + if (and (or (not (integerp ac-limit)) (< (length candidates) ac-limit)) + (if buffer-pred (funcall buffer-pred buffer) t)) + append (funcall ac-match-function + ac-prefix + (and (local-variable-p 'ac-word-index buffer) + (cdr (buffer-local-value 'ac-word-index buffer)))) + into candidates + finally return candidates)) + +(ac-define-source words-in-buffer + '((candidates . ac-word-candidates))) + +(ac-define-source words-in-all-buffer + '((init . ac-update-word-index) + (candidates . ac-word-candidates))) + +(ac-define-source words-in-same-mode-buffers + '((init . ac-update-word-index) + (candidates . (ac-word-candidates + (lambda (buffer) + (derived-mode-p (buffer-local-value 'major-mode buffer))))))) + +;; Lisp symbols source +(defvar ac-symbols-cache nil) +(ac-clear-variable-every-10-minutes 'ac-symbols-cache) + +(defun ac-symbol-file (symbol type) + (if (fboundp 'find-lisp-object-file-name) + (find-lisp-object-file-name symbol type) + (let ((file-name (with-no-warnings + (describe-simplify-lib-file-name + (symbol-file symbol type))))) + (when (equal file-name "loaddefs.el") + ;; Find the real def site of the preloaded object. + (let ((location (condition-case nil + (if (eq type 'defun) + (find-function-search-for-symbol symbol nil + "loaddefs.el") + (find-variable-noselect symbol file-name)) + (error nil)))) + (when location + (with-current-buffer (car location) + (when (cdr location) + (goto-char (cdr location))) + (when (re-search-backward + "^;;; Generated autoloads from \\(.*\\)" nil t) + (setq file-name (match-string 1))))))) + (if (and (null file-name) + (or (eq type 'defun) + (integerp (get symbol 'variable-documentation)))) + ;; It's a object not defined in Elisp but in C. + (if (get-buffer " *DOC*") + (if (eq type 'defun) + (help-C-file-name (symbol-function symbol) 'subr) + (help-C-file-name symbol 'var)) + 'C-source) + file-name)))) + +(defun ac-symbol-documentation (symbol) + (if (stringp symbol) + (setq symbol (intern-soft symbol))) + (ignore-errors + (with-temp-buffer + (let ((standard-output (current-buffer))) + (prin1 symbol) + (princ " is ") + (cond + ((fboundp symbol) + ;; import help-xref-following + (require 'help-mode) + (let ((help-xref-following t) + (major-mode 'help-mode)) ; avoid error in Emacs 24 + (describe-function-1 symbol)) + (buffer-string)) + ((boundp symbol) + (let ((file-name (ac-symbol-file symbol 'defvar))) + (princ "a variable") + (when file-name + (princ " defined in `") + (princ (if (eq file-name 'C-source) + "C source code" + (file-name-nondirectory file-name)))) + (princ "'.\n\n") + (princ (or (documentation-property symbol 'variable-documentation t) + "Not documented.")) + (buffer-string))) + ((facep symbol) + (let ((file-name (ac-symbol-file symbol 'defface))) + (princ "a face") + (when file-name + (princ " defined in `") + (princ (if (eq file-name 'C-source) + "C source code" + (file-name-nondirectory file-name)))) + (princ "'.\n\n") + (princ (or (documentation-property symbol 'face-documentation t) + "Not documented.")) + (buffer-string))) + (t + (let ((doc (documentation-property symbol 'group-documentation t))) + (when doc + (princ "a group.\n\n") + (princ doc) + (buffer-string))))))))) + +(defun ac-symbol-candidates () + (or ac-symbols-cache + (setq ac-symbols-cache + (loop for x being the symbols + if (or (fboundp x) + (boundp x) + (symbol-plist x)) + collect (symbol-name x))))) + +(ac-define-source symbols + '((candidates . ac-symbol-candidates) + (document . ac-symbol-documentation) + (symbol . "s") + (cache))) + +;; Lisp functions source +(defvar ac-functions-cache nil) +(ac-clear-variable-every-10-minutes 'ac-functions-cache) + +(defun ac-function-candidates () + (or ac-functions-cache + (setq ac-functions-cache + (loop for x being the symbols + if (fboundp x) + collect (symbol-name x))))) + +(ac-define-source functions + '((candidates . ac-function-candidates) + (document . ac-symbol-documentation) + (symbol . "f") + (prefix . "(\\(\\(?:\\sw\\|\\s_\\)+\\)") + (cache))) + +;; Lisp variables source +(defvar ac-variables-cache nil) +(ac-clear-variable-every-10-minutes 'ac-variables-cache) + +(defun ac-variable-candidates () + (or ac-variables-cache + (setq ac-variables-cache + (loop for x being the symbols + if (boundp x) + collect (symbol-name x))))) + +(ac-define-source variables + '((candidates . ac-variable-candidates) + (document . ac-symbol-documentation) + (symbol . "v") + (cache))) + +;; Lisp features source +(defvar ac-emacs-lisp-features nil) +(ac-clear-variable-every-10-minutes 'ac-emacs-lisp-features) + +(defun ac-emacs-lisp-feature-candidates () + (or ac-emacs-lisp-features + (if (fboundp 'find-library-suffixes) + (let ((suffix (concat (regexp-opt (find-library-suffixes) t) "\\'"))) + (setq ac-emacs-lisp-features + (append (mapcar 'prin1-to-string features) + (loop for dir in load-path + if (file-directory-p dir) + append (loop for file in (directory-files dir) + if (string-match suffix file) + collect (substring file 0 (match-beginning 0)))))))))) + +(ac-define-source features + '((depends find-func) + (candidates . ac-emacs-lisp-feature-candidates) + (prefix . "require +'\\(\\(?:\\sw\\|\\s_\\)*\\)") + (requires . 0))) + +(defvaralias 'ac-source-emacs-lisp-features 'ac-source-features) + +;; Abbrev source +(ac-define-source abbrev + '((candidates . (mapcar 'popup-x-to-string (append (vconcat local-abbrev-table global-abbrev-table) nil))) + (action . expand-abbrev) + (symbol . "a") + (cache))) + +;; Files in current directory source +(ac-define-source files-in-current-dir + '((candidates . (directory-files default-directory)) + (cache))) + +;; Filename source +(defvar ac-filename-cache nil) + +(defun ac-filename-candidate () + (let (file-name-handler-alist) + (unless (or (and comment-start-skip + (string-match comment-start-skip ac-prefix)) + (file-regular-p ac-prefix)) + (ignore-errors + (loop with dir = (file-name-directory ac-prefix) + with files = (or (assoc-default dir ac-filename-cache) + (let ((files (directory-files dir nil "^[^.]"))) + (push (cons dir files) ac-filename-cache) + files)) + for file in files + for path = (concat dir file) + collect (if (file-directory-p path) + (concat path "/") + path)))))) + +(ac-define-source filename + '((init . (setq ac-filename-cache nil)) + (candidates . ac-filename-candidate) + (prefix . valid-file) + (requires . 0) + (action . ac-start) + (limit . nil))) + +;; Dictionary source +(ac-define-source dictionary + '((candidates . ac-buffer-dictionary) + (symbol . "d"))) + +(provide 'auto-complete) +;;; auto-complete.el ends here diff --git a/elpa/auto-complete-20140803.2118/auto-complete.elc b/elpa/auto-complete-20140803.2118/auto-complete.elc new file mode 100644 index 0000000000000000000000000000000000000000..344675c1f6ebd05cd7299e15ebed6c109382d198 GIT binary patch literal 63173 zcmd7533nUE(f7-9&$$UH9wD-9(>pVQY?HJN8W=2;i74r>YfDvwZyqgPAp<(dabUmuDw6{?2k8JSy)&&_t8fmB{zph$Nj_J zezJR-9Catx`EOkNs=Ie%IDD{qINa+VCc{B;yE{p?Pwpkj)ugd?t<|{JY9(pC(Xu8E zM#H1zfJTxJe;D^h;}2=$!_D4NcW=D8|6%X&xcg!EWHPMn(bZvZ(yOUv{Yt&LnKl|% z%HKA7ht_6)kbI^Fl7}?dX9Q_$v$@%@Z;$$u`$_kZfgMl!NBw_xClnZOp0khN-|vro zFel^QIN3iPbdUOb$^LL}JQ?)|_r@Rabu^wN-Ti%Lo%PeWx|v>`X=8s#8-w8_*&7Zf zT?(H}4r*6;GpKFfzIp3bvUk5b>h4V#2*hk z{oW{<+^1mL^nO{6U-Ul>;FtdI+_`h>`@I9ED-i9~BKWI~&DLhUx^ZrO)ceOtf7DCX zj)%u5#~bG^UvD>(?|R3>5fuhWZ!{W?__3et_s88`km7E6@sEc4y|vBXS~uOpes`R# z(T`WV{L}ioTGZhHw0qbcZ6wv5X1&gT4gO1a(#FswPSV^+*4J&68yh?& z>zCh7Hk0<%_QoB6QXW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-20140803.2118/dict/ada-mode b/elpa/auto-complete-20140803.2118/dict/ada-mode new file mode 100644 index 000000000..bea538fb4 --- /dev/null +++ b/elpa/auto-complete-20140803.2118/dict/ada-mode @@ -0,0 +1,72 @@ +abort +abs +abstract +accept +access +aliased +all +and +array +at +begin +body +case +constant +declare +delay +delta +digits +do +else +elsif +end +entry +exception +exit +for +function +generic +goto +if +in +interface +is +limited +loop +mod +new +not +null +of +or +others +out +overriding +package +pragma +private +procedure +protected +raise +range +record +rem +renames +requeue +return +reverse +select +separate +subtype +synchronized +tagged +task +terminate +then +type +until +use +when +while +with +xor diff --git a/elpa/auto-complete-20140803.2118/dict/c++-mode b/elpa/auto-complete-20140803.2118/dict/c++-mode new file mode 100644 index 000000000..2579e9fec --- /dev/null +++ b/elpa/auto-complete-20140803.2118/dict/c++-mode @@ -0,0 +1,84 @@ +alignas +alignof +and +and_eq +asm +auto +bitand +bitor +bool +break +case +catch +char +char16_t +char32_t +class +compl +const +const_cast +constexpr +continue +decltype +default +delete +do +double +dynamic_cast +else +enum +explicit +export +extern +false +float +for +friend +goto +if +inline +int +long +mutable +namespace +new +noexcept +not +not_eq +nullptr +operator +or +or_eq +private +protected +public +register +reinterpret_cast +return +short +signed +sizeof +static +static_assert +static_cast +struct +switch +template +this +thread_local +throw +true +try +typedef +typeid +typename +union +unsigned +using +virtual +void +volatile +wchar_t +while +xor +xor_eq diff --git a/elpa/auto-complete-20140803.2118/dict/c-mode b/elpa/auto-complete-20140803.2118/dict/c-mode new file mode 100644 index 000000000..ec262c763 --- /dev/null +++ b/elpa/auto-complete-20140803.2118/dict/c-mode @@ -0,0 +1,44 @@ +auto +_Alignas +_Alignof +_Atomic +_Bool +break +case +char +_Complex +const +continue +default +do +double +else +enum +extern +float +for +goto +_Generic +if +_Imaginary +inline +int +long +_Noreturn +register +restrict +return +short +signed +sizeof +static +struct +switch +_Static_assert +typedef +_Thread_local +union +unsigned +void +volatile +while diff --git a/elpa/auto-complete-20140803.2118/dict/caml-mode b/elpa/auto-complete-20140803.2118/dict/caml-mode new file mode 100644 index 000000000..e709f9f62 --- /dev/null +++ b/elpa/auto-complete-20140803.2118/dict/caml-mode @@ -0,0 +1,231 @@ +# OCaml 3.12.1 + +# Keywords +and +as +assert +begin +class +constraint +do +done +downto +else +end +exception +external +false +for +fun +function +functor +if +in +include +inherit +initializer +lazy +let +match +method +module +mutable +new +object +of +open +or +private +rec +sig +struct +then +to +true +try +type +val +virtual +when +while +with + +# Pervasives +! +!= +& +&& +* +** +*. ++ ++. +- +-. +/ +/. +:= +< +<= +<> += +== +> +>= +@ +FP_infinite +FP_nan +FP_normal +FP_subnormal +FP_zero +LargeFile +Open_append +Open_binary +Open_creat +Open_nonblock +Open_rdonly +Open_text +Open_trunc +Open_wronly +Oupen_excl +^ +^^ +abs +abs_float +acos +asin +asr +at_exit +atan +atan2 +bool_of_string +ceil +char_of_int +classify_float +close_in +close_in_noerr +close_out +close_out_noerr +compare +cos +cosh +decr +do_at_exit +epsilon_float +exit +exp +expm1 +failwith +float +float_of_int +float_of_string +floor +flush +flush_all +format +format4 +format_of_string +fpclass +frexp +fst +ignore +in_channel +in_channel_length +incr +infinity +input +input_binary_int +input_byte +input_char +input_line +input_value +int_of_char +int_of_float +int_of_string +invalid_arg +land +ldexp +lnot +log +log10 +log1p +lor +lsl +lsr +lxor +max +max_float +max_int +min +min_float +min_int +mod +mod_float +modf +nan +neg_infinity +not +open_flag +open_in +open_in_bin +open_in_gen +open_out +open_out_bin +open_out_gen +or +out_channel +out_channel_length +output +output_binary_int +output_byte +output_char +output_string +output_value +pos_in +pos_out +pred +prerr_char +prerr_endline +prerr_float +prerr_int +prerr_newline +prerr_string +print_char +print_endline +print_float +print_int +print_newline +print_string +raise +read_float +read_int +read_line +really_input +ref +seek_in +seek_out +set_binary_mode_in +set_binary_mode_out +sin +sinh +snd +sqrt +stderr +stdin +stdout +string_of_bool +string_of_float +string_of_format +string_of_int +succ +tan +tanh +truncate +unsafe_really_input +valid_float_lexem +|| +~ +~+ +~+. +~- +~-. diff --git a/elpa/auto-complete-20140803.2118/dict/clojure-mode b/elpa/auto-complete-20140803.2118/dict/clojure-mode new file mode 100644 index 000000000..eefe33fcb --- /dev/null +++ b/elpa/auto-complete-20140803.2118/dict/clojure-mode @@ -0,0 +1,580 @@ +*agent* +*allow-unresolved-vars* +*assert* +*clojure-version* +*command-line-args* +*compile-files* +*compile-path* +*compiler-options* +*data-readers* +*default-data-reader-fn* +*err* +*file* +*flush-on-newline* +*fn-loader* +*in* +*math-context* +*ns* +*out* +*print-dup* +*print-length* +*print-level* +*print-meta* +*print-readably* +*read-eval* +*source-path* +*unchecked-math* +*use-context-classloader* +*verbose-defrecords* +*warn-on-reflection* +->ArrayChunk +->Vec +->VecNode +->VecSeq +-cache-protocol-fn +-reset-methods +accessor +aclone +add-classpath +add-watch +agent +agent-error +agent-errors +aget +alength +alias +all-ns +alter +alter-meta! +alter-var-root +amap +ancestors +and +apply +areduce +array-map +as-> +aset +aset-boolean +aset-byte +aset-char +aset-double +aset-float +aset-int +aset-long +aset-short +assert +assoc +assoc! +assoc-in +associative? +atom +await +await-for +await1 +bases +bean +bigdec +bigint +biginteger +binding +bit-and +bit-and-not +bit-clear +bit-flip +bit-not +bit-or +bit-set +bit-shift-left +bit-shift-right +bit-test +bit-xor +boolean +boolean-array +booleans +bound-fn +bound-fn* +bound? +butlast +byte +byte-array +bytes +case +cast +char +char-array +char-escape-string +char-name-string +char? +chars +chunk +chunk-append +chunk-buffer +chunk-cons +chunk-first +chunk-next +chunk-rest +chunked-seq? +class +class? +clear-agent-errors +clojure-version +coll? +comment +commute +comp +comparator +compare +compare-and-set! +compile +complement +concat +cond +cond-> +cond->> +condp +conj +conj! +cons +constantly +construct-proxy +contains? +count +counted? +create-ns +create-struct +cycle +dec +dec' +decimal? +declare +default-data-readers +definline +definterface +defmacro +defmethod +defmulti +defn +defn- +defonce +defprotocol +defrecord +defstruct +deftype +delay +delay? +deliver +denominator +deref +derive +descendants +destructure +disj +disj! +dissoc +dissoc! +distinct +distinct? +doall +doc +dorun +doseq +dosync +dotimes +doto +double +double-array +doubles +drop +drop-last +drop-while +dtype +empty +empty? +ensure +enumeration-seq +error-handler +error-mode +eval +even? +every-pred +every? +ex-data +ex-info +extend +extend-class +extend-protocol +extend-type +extenders +extends? +false? +ffirst +file-seq +filter +filterv +find +find-doc +find-keyword +find-ns +find-protocol-impl +find-protocol-method +find-var +first +flatten +float +float-array +float? +floats +flush +fn +fn? +fnext +fnil +for +force +format +frequencies +future +future-call +future-cancel +future-cancelled? +future-done? +future? +gen-class +gen-interface +gensym +get +get-in +get-method +get-proxy-class +get-thread-bindings +get-validator +group-by +hash +hash-combine +hash-map +hash-set +identical? +identity +if-let +if-not +ifn? +import +in-ns +inc +inc' +init-proxy +instance? +int +int-array +integer? +interleave +intern +interpose +into +into-array +ints +io! +isa? +iterate +iterator-seq +juxt +keep +keep-indexed +key +keys +keyword +keyword? +last +lazy-cat +lazy-seq +let +letfn +line-seq +list +list* +list? +load +load-file +load-reader +load-string +loaded-libs +locking +long +long-array +longs +loop +macroexpand +macroexpand-1 +make-array +make-hierarchy +map +map-indexed +map? +mapcat +mapv +max +max-key +memfn +memoize +merge +merge-with +meta +method-sig +methods +min +min-key +mod +munge +name +namespace +namespace-munge +neg? +newline +next +nfirst +nil? +nnext +not +not-any? +not-empty +not-every? +not= +ns +ns-aliases +ns-imports +ns-interns +ns-map +ns-name +ns-publics +ns-refers +ns-resolve +ns-unalias +ns-unmap +nth +nthnext +nthrest +num +number? +numerator +object-array +odd? +or +parents +partial +partition +partition-all +partition-by +pcalls +peek +persistent! +pmap +pop +pop! +pop-thread-bindings +pos? +pr +pr-str +prefer-method +prefers +primitives-classnames +print +print-ctor +print-dup +print-method +print-namespace-doc +print-simple +print-str +printf +println +println-str +prn +prn-str +promise +proxy +proxy-call-with-super +proxy-mappings +proxy-name +proxy-super +push-thread-bindings +pvalues +quot +rand +rand-int +rand-nth +range +ratio? +rational? +rationalize +re-find +re-groups +re-matcher +re-matches +re-pattern +re-seq +read +read-line +read-string +realized? +reduce +reduce-kv +reduced +reduced? +reductions +ref +ref-history-count +ref-max-history +ref-min-history +ref-set +refer +refer-clojure +reify +release-pending-sends +rem +remove +remove-all-methods +remove-method +remove-ns +remove-watch +repeat +repeatedly +replace +replicate +require +reset! +reset-meta! +resolve +rest +restart-agent +resultset-seq +reverse +reversible? +rseq +rsubseq +satisfies? +second +select-keys +send +send-off +send-via +seq +seq? +seque +sequence +sequential? +set +set-agent-send-executor! +set-agent-send-off-executor! +set-error-handler! +set-error-mode! +set-validator! +set? +short +short-array +shorts +shuffle +shutdown-agents +slurp +some +some-> +some->> +some-fn +sort +sort-by +sorted-map +sorted-map-by +sorted-set +sorted-set-by +sorted? +special-form-anchor +special-symbol? +spit +split-at +split-with +str +stream? +string? +struct +struct-map +subs +subseq +subvec +supers +swap! +symbol +symbol? +sync +syntax-symbol-anchor +take +take-last +take-nth +take-while +test +the-ns +thread-bound? +time +to-array +to-array-2d +trampoline +transient +tree-seq +true? +type +unchecked-add +unchecked-add-int +unchecked-byte +unchecked-char +unchecked-dec +unchecked-dec-int +unchecked-divide +unchecked-divide-int +unchecked-double +unchecked-float +unchecked-inc +unchecked-inc-int +unchecked-int +unchecked-long +unchecked-multiply +unchecked-multiply-int +unchecked-negate +unchecked-negate-int +unchecked-remainder +unchecked-remainder-int +unchecked-short +unchecked-subtract +unchecked-subtract-int +underive +unquote +unquote-splicing +update-in +update-proxy +use +val +vals +var-get +var-set +var? +vary-meta +vec +vector +vector-of +vector? +when +when-first +when-let +when-not +while +with-bindings +with-bindings* +with-in-str +with-loading-context +with-local-vars +with-meta +with-open +with-out-str +with-precision +with-redefs +with-redefs-fn +xml-seq +zero? +zipmap \ No newline at end of file diff --git a/elpa/auto-complete-20140803.2118/dict/clojurescript-mode b/elpa/auto-complete-20140803.2118/dict/clojurescript-mode new file mode 100644 index 000000000..16348edb6 --- /dev/null +++ b/elpa/auto-complete-20140803.2118/dict/clojurescript-mode @@ -0,0 +1,475 @@ +*agent* +*clojure-version* +*command-line-args* +*compile-files* +*compile-path* +*err* +*file* +*flush-on-newline* +*in* +*ns* +*out* +*print-dup* +*print-length* +*print-level* +*print-meta* +*print-readably* +*read-eval* +*warn-on-reflection* +accessor +aclone +add-classpath +add-watch +agent +agent-error +agent-errors +aget +alength +alias +all-ns +alter +alter-meta! +alter-var-root +amap +ancestors +and +apply +areduce +array-map +aset +aset-boolean +aset-byte +aset-char +aset-double +aset-float +aset-int +aset-long +aset-short +assert +assoc +assoc! +assoc-in +associative? +atom +await +await-for +bases +bean +bigdec +bigint +binding +bit-and +bit-and-not +bit-clear +bit-flip +bit-not +bit-or +bit-set +bit-shift-left +bit-shift-right +bit-test +bit-xor +boolean +boolean-array +booleans +bound-fn +bound-fn* +butlast +byte +byte-array +bytes +case +cast +char +char-array +char-escape-string +char-name-string +char? +chars +class +class? +clear-agent-errors +clojure-version +coll? +comment +commute +comp +comparator +compare +compare-and-set! +compile +complement +concat +cond +condp +conj +conj! +cons +constantly +construct-proxy +contains? +count +counted? +create-ns +create-struct +cycle +dec +decimal? +declare +definline +defmacro +defmethod +defmulti +defn +defn- +defonce +defprotocol +defstruct +deftype +delay +delay? +deliver +deref +derive +descendants +disj +disj! +dissoc +dissoc! +distinct +distinct? +doall +doc +dorun +doseq +dosync +dotimes +doto +double +double-array +doubles +drop +drop-last +drop-while +dtype +empty +empty? +ensure +enumeration-seq +error-handler +error-mode +eval +even? +every? +extend +extend-class +extend-protocol +extend-type +extenders +extends? +false? +ffirst +file-seq +filter +find +find-doc +find-ns +find-var +first +float +float-array +float? +floats +flush +fn +fn? +fnext +for +force +format +future +future-call +future-cancel +future-cancelled? +future-done? +future? +gen-class +gen-interface +gensym +get +get-in +get-method +get-proxy-class +get-thread-bindings +get-validator +hash +hash-map +hash-set +identical? +identity +if-let +if-not +ifn? +import +in-ns +inc +init-proxy +instance? +int +int-array +integer? +interleave +intern +interpose +into +into-array +ints +io! +isa? +iterate +iterator-seq +juxt +key +keys +keyword +keyword? +last +lazy-cat +lazy-seq +let +letfn +line-seq +list +list* +list? +load +load-file +load-reader +load-string +loaded-libs +locking +long +long-array +longs +loop +macroexpand +macroexpand-1 +make-array +make-hierarchy +map +map? +mapcat +max +max-key +memfn +memoize +merge +merge-with +meta +methods +min +min-key +mod +name +namespace +neg? +newline +next +nfirst +nil? +nnext +not +not-any? +not-empty +not-every? +not= +ns +ns-aliases +ns-imports +ns-interns +ns-map +ns-name +ns-publics +ns-refers +ns-resolve +ns-unalias +ns-unmap +nth +nthnext +num +number? +object-array +odd? +or +parents +partial +partition +pcalls +peek +persistent! +pmap +pop +pop! +pop-thread-bindings +pos? +pr +pr-str +prefer-method +prefers +print +print-namespace-doc +print-str +printf +println +println-str +prn +prn-str +promise +proxy +proxy-mappings +proxy-super +push-thread-bindings +pvalues +quot +rand +rand-int +range +ratio? +rationalize +re-find +re-groups +re-matcher +re-matches +re-pattern +re-seq +read +read-line +read-string +reduce +ref +ref-history-count +ref-max-history +ref-min-history +ref-set +refer +refer-clojure +reify +release-pending-sends +rem +remove +remove-method +remove-ns +remove-watch +repeat +repeatedly +replace +replicate +require +reset! +reset-meta! +resolve +rest +restart-agent +resultset-seq +reverse +reversible? +rseq +rsubseq +satisfies? +second +select-keys +send +send-off +seq +seq? +seque +sequence +sequential? +set +set-error-handler! +set-error-mode! +set-validator! +set? +short +short-array +shorts +shutdown-agents +slurp +some +sort +sort-by +sorted-map +sorted-map-by +sorted-set +sorted-set-by +sorted? +special-form-anchor +special-symbol? +split-at +split-with +str +stream? +string? +struct +struct-map +subs +subseq +subvec +supers +swap! +symbol +symbol? +sync +syntax-symbol-anchor +take +take-last +take-nth +take-while +test +the-ns +time +to-array +to-array-2d +trampoline +transient +tree-seq +true? +type +unchecked-add +unchecked-dec +unchecked-divide +unchecked-inc +unchecked-multiply +unchecked-negate +unchecked-remainder +unchecked-subtract +underive +update-in +update-proxy +use +val +vals +var-get +var-set +var? +vary-meta +vec +vector +vector-of +vector? +when +when-first +when-let +when-not +while +with-bindings +with-bindings* +with-in-str +with-local-vars +with-meta +with-open +with-out-str +with-precision +xml-seq +zero? +zipmap \ No newline at end of file diff --git a/elpa/auto-complete-20140803.2118/dict/coq-mode b/elpa/auto-complete-20140803.2118/dict/coq-mode new file mode 100644 index 000000000..219448faa --- /dev/null +++ b/elpa/auto-complete-20140803.2118/dict/coq-mode @@ -0,0 +1,278 @@ +# Generated by the following form. +# (loop for regexp in (append +# coq-solve-tactics +# coq-keywords +# coq-reserved +# coq-tactics +# coq-tacticals +# (list "Set" "Type" "Prop")) +# append (split-string regexp (regexp-quote "\\s-+")) into words +# finally (loop initially (goto-char (point-max)) +# for word in (delete-dups (sort words 'string<)) +# do (insert word) (newline))) + +Abort +About +Abstract +Add +Admit +Admitted +All +Arguments +AutoInline +Axiom +Bind +Canonical +Cd +Chapter +Check +Close +CoFixpoint +CoInductive +Coercion +Coercions +Comments +Conjecture +Constant +Constructors +Corollary +Declare +Defined +Definition +Delimit +Dependent +Depth +Derive +End +Eval +Export +Extern +Extract +Extraction +Fact +False +Field +File +Fixpoint +Focus +Function +Functional +Goal +Hint +Hypotheses +Hypothesis +Hyps +Identity +If +Immediate +Implicit +Import +Inductive +Infix +Inline +Inlined +Inspect +Inversion +Language +Lemma +Let +Library +Limit +LoadPath +Local +Locate +Ltac +ML +Module +Morphism +Next Obligation +NoInline +Notation +Notations +Obligation +Obligations +Off +On +Opaque +Open +Optimize +Parameter +Parameters +Path +Print +Printing +Program +Proof +Prop +Pwd +Qed +Rec +Record +Recursive +Remark +Remove +Require +Reserved +Reset +Resolve +Rewrite +Ring +Save +Scheme +Scope +Search +SearchAbout +SearchPattern +SearchRewrite +Section +Semi +Set +Setoid +Show +Solve +Sort +Strict +Structure +Synth +Tactic +Test +Theorem +Time +Transparent +True +Type +Undo +Unfocus +Unfold +Unset +Variable +Variables +Width +Wildcard +abstract +absurd +after +apply +as +assert +assumption +at +auto +autorewrite +beta +by +case +cbv +change +clear +clearbody +cofix +coinduction +compare +compute +congruence +constructor +contradiction +cut +cutrewrite +decide +decompose +delta +dependent +dest +destruct +discrR +discriminate +do +double +eapply +eauto +econstructor +eexists +eleft +elim +else +end +equality +esplit +exact +exists +fail +field +first +firstorder +fix +fold +forall +fourier +fun +functional +generalize +hnf +idtac +if +in +induction +info +injection +instantiate +into +intro +intros +intuition +inversion +inversion_clear +iota +lapply +lazy +left +let +linear +load +match +move +omega +pattern +pose +progress +prolog +quote +record +red +refine +reflexivity +rename +repeat +replace +return +rewrite +right +ring +set +setoid +setoid_replace +setoid_rewrite +simpl +simple +simplify_eq +solve +specialize +split +split_Rabs +split_Rmult +stepl +stepr +struct +subst +sum +symmetry +tauto +then +transitivity +trivial +try +unfold +until +using +with +zeta diff --git a/elpa/auto-complete-20140803.2118/dict/css-mode b/elpa/auto-complete-20140803.2118/dict/css-mode new file mode 100644 index 000000000..6ab36ecf2 --- /dev/null +++ b/elpa/auto-complete-20140803.2118/dict/css-mode @@ -0,0 +1,874 @@ +!important +@font-face +@font-feature-values +@keyframes +ActiveBorder +ActiveCaption +Alpha +AppWorkspace +Background +Barn +BasicImage +Blinds +Blur +ButtonFace +ButtonHighlight +ButtonShadow +ButtonText +CaptionText +CheckerBoard +Chroma +Compositor +CradientWipe +DXImageTransform +DropShadow +Emboss +Engrave +Fade +FlipH +FlipV +Glow +Gray +GrayText +Highlight +HighlightText +Hz +ICMFilter +InactiveBorder +InactiveCaption +InactiveCaptionText +InfoBackground +InfoText +Inset +Invert +Iris +Light +MaskFilter +Matrix +Menu +MenuText +Microsoft +MotionBlur +Pixelate +RadialWipe +RandomBars +RandomDissolve +RevealTrans +Scrollbar +Shadow +Slide +Spiral +Stretch +Strips +ThreeDDarkShadow +ThreeDFace +ThreeDHighlight +ThreeDLightShadow +ThreeDShadow +Wave +Wheel +Window +WindowFrame +WindowText +Xray +Zigzag +_azimuth +_background +_background-position-x +_background-position-y +_border +_bottom +_caption +_clear +_clip +_color +_content +_counter +_cue +_cursor +_direction +_display +_elevation +_empty +_filter +_filter:progid:DXImageTransform.Microsoft +_float +_font +_height +_ime +_ime-mode +_layout +_layout-flow +_layout-grid +_layout-grid-char +_layout-grid-line +_layout-grid-mode +_layout-grid-type +_left +_letter +_line +_line-break +_list +_margin +_orphans +_outline +_overflow +_overflow-x +_overflow-y +_padding +_page +_pause +_pitch +_play +_position +_quotes +_richness +_right +_ruby +_ruby-align +_ruby-overhang +_ruby-position +_scrollbar +_scrollbar-3dlight-color +_scrollbar-arrow-color +_scrollbar-base-color +_scrollbar-darkshadow-color +_scrollbar-face-color +_scrollbar-highlight-color +_scrollbar-track-color +_speak +_speech +_stress +_table +_text +_text-align-last +_text-autospace +_text-justify +_text-kashida-space +_text-overflow +_text-underline-position +_top +_unicode +_vertical +_visibility +_voice +_volume +_white +_widows +_width +_word +_word-break +_word-wrap +_writing +_writing-mode +_z +_zoom +above +active +adjust +after +aliceblue +align +align-content +align-items +align-self +always +animation +animation-delay +animation-direction +animation-duration +animation-fill-mode +animation-iteration-count +animation-name +animation-play-state +animation-timing-function +antiquewhite +aqua +aquamarine +armenian +arrow +attachment +auto +autospace +avoid +azimuth +azure +backface-visibility +background +background-attachment +background-clip +background-color +background-image +background-origin +background-position +background-repeat +background-size +bar +base +baseline +before +behind +beige +below +bidi +bidi-override +bisque +black +blanchedalmond +blink +block +blue +blueviolet +bold +bolder +border +border-bottom +border-bottom-color +border-bottom-left-radius +border-bottom-right-radius +border-bottom-style +border-bottom-width +border-collapse +border-color +border-image +border-image-outset +border-image-repeat +border-image-slice +border-image-source +border-image-width +border-left +border-left-color +border-left-style +border-left-width +border-radius +border-right +border-right-color +border-right-style +border-right-width +border-spacing +border-style +border-top +border-top-color +border-top-left-radius +border-top-right-radius +border-top-style +border-top-width +border-width +both +bottom +box +box-decoration-break +box-shadow +box-sizing +break +break-after +break-before +break-inside +brown +burlwood +cadetblue +capitalize +caps +caption +caption-side +cell +cells +center +center-left +center-right +char +chartreuse +chocolate +circle +cjk +cjk-ideographic +clear +clip +close +close-quote +cm +code +collapse +color +column +column-count +column-fill +column-gap +column-rule +column-rule-color +column-rule-style +column-rule-width +column-span +column-width +columns +compact +condensed +content +continuous +coral +cornflowerblue +cornsilk +counter +counter-increment +counter-reset +crimson +crop +cross +crosshair +cue +cue-after +cue-before +cursive +cursor +cyan +darkblue +darkcyan +darkgoldenrod +darkgray +darkgreen +darkkhaki +darkmagenta +darkolivegreen +darkorange +darkorchid +darkred +darksalmon +darkseagreen +darkshadow +darkslateblue +darkslategray +darkturquoise +darkviolet +dashed +decimal +decimal-leading-zero +decoration +deeppink +deepskyblue +default +deg +digits +dimgray +direction +disc +display +dodgerblue +dotted +double +during +e +e-resize +elevation +em +embed +empty +empty-cells +ex +expanded +extra +extra-condensed +extra-expanded +face +family +fantasy +far +far-left +far-right +fast +faster +filter +firebrick +first +first-child +first-letter +first-line +fixed +flex +flex-basis +flex-direction +flex-flow +flex-grow +flex-shrink +flex-wrap +float +floralwhite +flow +focus +font +font-family +font-feature-setting +font-kerning +font-language-override +font-size +font-size-adjust +font-stretch +font-style +font-synthesis +font-variant +font-variant-alternates +font-variant-caps +font-variant-east-asian +font-variant-ligatures +font-variant-numeric +font-variant-position +font-weight +footer +forestgreen +fuchsia +gainsboro +georgian +ghostwhite +gold +goldenrod +gray +greek +green +greenyellow +grid +groove +group +hanging-punctuation +header +hebrew +height +help +hidden +hide +high +higher +hiragana +hiragana-iroha +honeydew +hotpink +hover +hyphens +icon +ideographic +image +image-orientation +image-rendering +image-resolution +ime-mode +in +increment +indent +index +indianred +indigo +inherit +inline +inline-block +inline-table +inset +inside +iroha +italic +item +ivory +justify +justify-content +kHz +kashida +katakana +katakana-iroha +khaki +landscape +lang() +large +larger +last +latin +lavender +lavenderblush +lawngreen +layout +leading +left +left-side +leftwards +lenonchiffon +letter +letter-spacing +level +lightblue +lightcoral +lightcyan +lighter +lightgoldenrodyellow +lightgray +lightgreen +lightgrey +lightpink +lightsalmon +lightseagreen +lightskyblue +lightslategray +lightsteelblue +lightyellow +lime +limegreen +line +line-break +line-height +line-through +linen +link +list +list-item +list-style +list-style-image +list-style-position +list-style-type +loud +low +lower +lower-alpha +lower-greek +lower-latin +lower-roman +lowercase +ltr +magenta +margin +margin-bottom +margin-left +margin-right +margin-top +mark +mark-after +mark-before +marker +marker-offset +marks +maroon +marquee-direction +marquee-play-count +marquee-speed +marquee-style +mask +mask-type +max +max-height +max-width +medium +mediumaquamarine +mediumblue +mediumorchid +mediumpurple +mediumseagreen +mediumslateblue +mediumspringgreen +mediumturquoise +mediumvioletred +menu +message +message-box +middle +midnightblue +min +min-height +min-width +mintcream +mistyrose +mix +mm +moccasin +mode +monospace +move +ms +n +n-resize +naby +narrower +nav-down +nav-index +nav-left +nav-right +nav-up +navajowhite +ne +ne-resize +no +no-close-quote +no-open-quote +no-repeat +none +normal +nowrap +number +numeral +nw +nw-resize +object-fit +object-position +oblique +offset +oldlace +olive +olivedrab +once +opacity +open +open-quote +orange +orangered +orchid +order +orphans +out +outline +outline-color +outline-offset +outline-style +outline-width +outset +outside +overflow +overflow-wrap +overflow-x +overflow-y +overhang +overline +override +padding +padding-bottom +padding-left +padding-right +padding-top +page +page-break-after +page-break-before +page-break-inside +palegoldenrod +palegreen +paleturquoise +palevioletred +papayawhip +pause +pause-after +pause-before +pc +peachpuff +perspective +perspective-origin +peru +phonemes +pink +pitch +pitch-range +play +play-during +plum +pointer +portarait +position +powderblue +pre +pre-line +pre-wrap +progid +progress +pt +punctuation +purple +px +quote +quotes +rad +range +rate +red +relative +repeat +repeat-x +repeat-y +reset +resize +rest +rest-after +rest-before +richness +ridge +right +right-side +rightwards +roman +rosybrown +row +royalblue +rtl +run +run-in +s +s-resize +saddlebrown +salmon +sandybrown +sans-serif +scroll +se +se-resize +seagreen +seashell +semi +semi-condensed +semi-expanded +separate +serif +shadow +show +side +sienna +silent +silever +silver +size +skyblue +slateblue +slategray +slow +slower +small +small-caps +small-caption +smaller +snow +soft +solid +space +spacing +speak +speak-header +speak-numeral +speak-punctuation +specific +specific-voice +speech +speech-rate +spell +spell-out +springgreen +square +static +status +status-bar +steelblue +stress +stretch +style +sub +super +sw +sw-resize +tab-size +table +table-caption +table-cell +table-column +table-column-group +table-footer-group +table-header-group +table-layout +table-row +table-row-group +tan +teal +text +text-align +text-align-last +text-bottom +text-combine-horizontal +text-decoration +text-decoration-color +text-decoration-line +text-decoration-style +text-indent +text-justify +text-orientation +text-overflow +text-shadow +text-top +text-transform +text-underline-position +thick +thin +thistle +through +tomato +top +track +transform +transform-origin +transform-style +transition +transition-delay +transition-duration +transition-property +transition-timing-function +transparent +turquoise +type +ultra +ultra-condensed +ultra-expanded +underline +unicode +unicode-bidi +upper +upper-alpha +upper-latin +upper-roman +uppercase +variant +vertical +vertical-align +violet +visibility +visible +visited +voice +voice-balance +voice-duration +voice-family +voice-pitch +voice-pitch-range +voice-rate +voice-stress +voice-volume +volume +w +w-resize +wait +weight +wheat +white +white-space +whitesmoke +wider +widows +width +word +word-break +word-spacing +word-wrap +wrap +writing-mode +x +x-fast +x-high +x-large +x-loud +x-low +x-slow +x-small +x-soft +xx +xx-large +xx-small +y +yellow +yellowgreen +z +z-index +zero diff --git a/elpa/auto-complete-20140803.2118/dict/erlang-mode b/elpa/auto-complete-20140803.2118/dict/erlang-mode new file mode 100644 index 000000000..960f2b837 --- /dev/null +++ b/elpa/auto-complete-20140803.2118/dict/erlang-mode @@ -0,0 +1,216 @@ +after +begin +catch +case +cond +end +fun +if +let +of +query +receive +try +when +and +andalso +band +bnot +bor +bsl +bsr +bxor +div +not +or +orelse +rem +xor +is_atom +is_binary +is_bitstring +is_boolean +is_float +is_function +is_integer +is_list +is_number +is_pid +is_port +is_record +is_reference +is_tuple +atom +binary +bitstring +boolean +function +integer +list +number +pid +port +record +reference +tuple +abs +adler32 +adler32_combine +alive +apply +atom_to_binary +atom_to_list +binary_to_atom +binary_to_existing_atom +binary_to_list +binary_to_term +bit_size +bitstring_to_list +byte_size +check_process_code +contact_binary +crc32 +crc32_combine +date +decode_packet +delete_module +disconnect_node +element +erase +exit +float +float_to_list +garbage_collect +get +get_keys +group_leader +halt +hd +integer_to_list +internal_bif +iolist_size +iolist_to_binary +is_alive +is_atom +is_binary +is_bitstring +is_boolean +is_float +is_function +is_integer +is_list +is_number +is_pid +is_port +is_process_alive +is_record +is_reference +is_tuple +length +link +list_to_atom +list_to_binary +list_to_bitstring +list_to_existing_atom +list_to_float +list_to_integer +list_to_pid +list_to_tuple +load_module +make_ref +module_loaded +monitor_node +node +node_link +node_unlink +nodes +notalive +now +open_port +pid_to_list +port_close +port_command +port_connect +port_control +pre_loaded +process_flag +process_info +processes +purge_module +put +register +registered +round +self +setelement +size +spawn +spawn_link +spawn_monitor +spawn_opt +split_binary +statistics +term_to_binary +time +throw +tl +trunc +tuple_size +tuple_to_list +unlink +unregister +whereis +append_element +bump_reductions +cancel_timer +demonitor +display +fun_info +fun_to_list +function_exported +get_cookie +get_stacktrace +hash +integer_to_list +is_builtin +list_to_integer +loaded +localtime +localtime_to_universaltime +make_tuple +max +md5 +md5_final +md5_init +md5_update +memory +min +monitor +monitor_node +phash +phash2 +port_call +port_info +port_to_list +ports +process_display +read_timer +ref_to_list +resume_process +send +send_after +send_nosuspend +set_cookie +start_timer +suspend_process +system_flag +system_info +system_monitor +system_profile +trace +trace_delivered +trace_info +trace_pattern +universaltime +universaltime_to_localtime +yield diff --git a/elpa/auto-complete-20140803.2118/dict/go-mode b/elpa/auto-complete-20140803.2118/dict/go-mode new file mode 100644 index 000000000..b943a164c --- /dev/null +++ b/elpa/auto-complete-20140803.2118/dict/go-mode @@ -0,0 +1,25 @@ +break +case +chan +const +continue +default +defer +else +fallthrough +for +func +go +goto +if +import +interface +map +package +range +return +select +struct +switch +type +var diff --git a/elpa/auto-complete-20140803.2118/dict/haskell-mode b/elpa/auto-complete-20140803.2118/dict/haskell-mode new file mode 100644 index 000000000..9ad1b999b --- /dev/null +++ b/elpa/auto-complete-20140803.2118/dict/haskell-mode @@ -0,0 +1,679 @@ +Arrows +BangPatterns +Bool +Bounded +CPP +Char +Complex +ConstrainedClassMethods +Control.Applicative +Control.Arrow +Control.Category +Control.Concurrent +Control.Concurrent.MVar +Control.Concurrent.QSem +Control.Concurrent.QSemN +Control.Concurrent.STM +Control.Concurrent.STM.TArray +Control.Concurrent.STM.TChan +Control.Concurrent.STM.TMVar +Control.Concurrent.STM.TVar +Control.Concurrent.SampleVar +Control.Exception +Control.Exception.Base +Control.Monad +Control.Monad.Cont +Control.Monad.Cont.Class +Control.Monad.Error +Control.Monad.Error.Class +Control.Monad.Fix +Control.Monad.Identity +Control.Monad.Instances +Control.Monad.List +Control.Monad.RWS +Control.Monad.RWS.Class +Control.Monad.RWS.Lazy +Control.Monad.RWS.Strict +Control.Monad.Reader +Control.Monad.Reader.Class +Control.Monad.ST +Control.Monad.ST.Lazy +Control.Monad.ST.Strict +Control.Monad.STM +Control.Monad.State +Control.Monad.State.Class +Control.Monad.State.Lazy +Control.Monad.State.Strict +Control.Monad.Trans +Control.Monad.Writer +Control.Monad.Writer.Class +Control.Monad.Writer.Lazy +Control.Monad.Writer.Strict +Control.OldException +Control.Parallel +Control.Parallel.Strategies +DEPRECATED +Data.Array +Data.Array.Diff +Data.Array.IArray +Data.Array.IO +Data.Array.IO.Internals +Data.Array.MArray +Data.Array.Paralell +Data.Array.Paralell.Arr +Data.Array.Paralell.Base +Data.Array.Paralell.Int +Data.Array.Paralell.Lifted +Data.Array.Paralell.PArray +Data.Array.Paralell.Prelude +Data.Array.Paralell.Prelude.Double +Data.Array.Paralell.Stream +Data.Array.Paralell.Unlifted +Data.Array.Paralell.Unlifted.Distributed +Data.Array.Paralell.Unlifted.Paralell +Data.Array.Paralell.Unlifted.Sqeuential +Data.Array.Paralell.Word8 +Data.Array.ST +Data.Array.Storable +Data.Array.Unboxed +Data.Bits +Data.Bool +Data.ByteString +Data.ByteString.Char8 +Data.ByteString.Fusion +Data.ByteString.Internal +Data.ByteString.Lazy +Data.ByteString.Lazy.Char8 +Data.ByteString.Lazy.Fusion +Data.ByteString.Lazy.Internal +Data.ByteString.Unsafe +Data.Char +Data.Complex +Data.Data +Data.Dynamic +Data.Either +Data.Eq +Data.Fixed +Data.Foldable +Data.Function +Data.Generics +Data.Generics.Aliases +Data.Generics.Basics +Data.Generics.Instances +Data.Generics.Schemes +Data.Generics.Text +Data.Generics.Twins +Data.Graph +Data.HashTable +Data.IORef +Data.Int +Data.IntMap +Data.IntSet +Data.Ix +Data.List +Data.Map +Data.Maybe +Data.Monoid +Data.Ord +Data.Ratio +Data.STRef +Data.STRef.Lazy +Data.STRef.Strict +Data.Sequence +Data.Set +Data.String +Data.Time +Data.Time.Calendar +Data.Time.Calendar.Easter +Data.Time.Calendar.Julian +Data.Time.Calendar.MonthDay +Data.Time.Calendar.OrdinalDate +Data.Time.Calendar.WeekDate +Data.Time.Clock +Data.Time.Clock.POSIX +Data.Time.Clock.TAI +Data.Time.Format +Data.Time.LocalTime +Data.Traversable +Data.Tree +Data.Tuple +Data.Typeable +Data.Unique +Data.Version +Data.Word +Debug.Trace +DeriveDataTypeable +DisambiguateRecordFields +Distribution.Compat.ReadP +Distribution.Compiler +Distribution.InstalledPackageInfo +Distribution.License +Distribution.Make +Distribution.ModuleName +Distribution.Package +Distribution.PackageDescription +Distribution.PackageDescription.Check +Distribution.PackageDescription.Configuration +Distribution.PackageDescription.Parse +Distribution.ParseUtils +Distribution.ReadE +Distribution.Simple +Distribution.Simple.Build +Distribution.Simple.Build.Macros +Distribution.Simple.Build.PathsModule +Distribution.Simple.BuildPaths +Distribution.Simple.Command +Distribution.Simple.Compiler +Distribution.Simple.Configure +Distribution.Simple.GHC +Distribution.Simple.Haddock +Distribution.Simple.Hugs +Distribution.Simple.Install +Distribution.Simple.InstallDirs +Distribution.Simple.JHC +Distribution.Simple.LocalBuildInfo +Distribution.Simple.NHC +Distribution.Simple.PackageIndex +Distribution.Simple.PreProcess +Distribution.Simple.PreProcess.Unlit +Distribution.Simple.Program +Distribution.Simple.Register +Distribution.Simple.Setup +Distribution.Simple.SrcDist +Distribution.Simple.UserHooks +Distribution.Simple.Utils +Distribution.System +Distribution.Text +Distribution.Verbosity +Distribution.Version +Double +EQ +Either +EmptyDataDecls +Enum +Eq +ExistentialQuantification +ExtendedDefaultRules +False +FilePath +FlexibleContexts +FlexibleInstances +Float +Floating +Foreign +Foreign.C +Foreign.C.Error +Foreign.C.String +Foreign.C.Types +Foreign.Concurrent +Foreign.ForeignPtr +Foreign.Marshal +Foreign.Marshal.Alloc +Foreign.Marshal.Array +Foreign.Marshal.Error +Foreign.Marshal.Pool +Foreign.Marshal.Utils +Foreign.Ptr +Foreign.StablePtr +Foreign.Storable +ForeignFunctionInterface +Fractional +FunctionnalDependencies +Functor +GADTs +GHC.Arr +GHC.Bool +GHC.Conc +GHC.ConsoleHandler +GHC.Desugar +GHC.Environment +GHC.Err +GHC.Exts +GHC.Generics +GHC.Handle +GHC.Ordering +GHC.PArr +GHC.Prim +GHC.PrimopWrappers +GHC.Tuple +GHC.Types +GHC.Unicode +GHC.Unit +GT +GeneralizedNewtypeDeriving +Generics +INCLUDE +INLINE +IO +IOError +IOException +ImplicitParams +ImplicitPrelude +ImpredicativeTypes +IncoherentInstances +Int +Integer +Integral +Just +KindSignatures +LANGUAGE +LINE +LT +Language.Haskell.Extension +Language.Haskell.Lexer +Language.Haskell.ParseMonad +Language.Haskell.ParseUtils +Language.Haskell.Parser +Language.Haskell.Pretty +Language.Haskell.Syntax +Language.Haskell.TH +Language.Haskell.TH.Lib +Language.Haskell.TH.Ppr +Language.Haskell.TH.PprLib +Language.Haskell.TH.Quote +Language.Haskell.TH.Syntax +Left +LiberalTypeSynonyms +MagicHash +Maybe +Monad +MonoPatBinds +MonomorphismRestriction +MultiParamTypeClasses +NOINLINE +NamedFieldPuns +Network +Network.BSD +Network.Socket +Network.URI +NewQualifiedOperators +NoArrows +NoBangPatterns +NoCPP +NoConstrainedClassMethods +NoDeriveDataTypeable +NoDisambiguateRecordFields +NoEmptyDataDecls +NoExistentialQuantification +NoExtendedDefaultRules +NoFlexibleContexts +NoFlexibleInstances +NoForeignFunctionInterface +NoFunctionnalDependencies +NoGADTs +NoGeneralizedNewtypeDeriving +NoGenerics +NoImplicitParams +NoImplicitPrelude +NoImpredicativeTypes +NoIncoherentInstances +NoKindSignatures +NoLiberalTypeSynonyms +NoMagicHash +NoMonoPatBinds +NoMonomorphismRestriction +NoMultiParamTypeClasses +NoNamedFieldPuns +NoNewQualifiedOperators +NoOverlappingInstances +NoOverloadedStrings +NoPArr +NoPackageImports +NoParallelListComp +NoPatternGuards +NoPolymorphicComponents +NoQuasiQuotes +NoRank2Types +NoRankNTypes +NoRecordWildCards +NoRecursiveDo +NoRelaxedPolyRec +NoScopedTypeVariables +NoStandaloneDeriving +NoTemplateHaskell +NoTransformListComp +NoTypeFamilies +NoTypeOperators +NoTypeSynonymInstances +NoUnboxedTuples +NoUndecidableInstances +NoUnicodeSyntax +NoUnliftedFFITypes +NoViewPatterns +Nothing +Num +Numeric +OPTIONS_GHC +Ord +Ordering +OverlappingInstances +OverloadedStrings +PArr +PackageImports +ParallelListComp +PatternGuards +PolymorphicComponents +Prelude +QuasiQuotes +RULES +Rank2Types +RankNTypes +Ratio +Read +ReadS +Real +RealFloat +RealFrac +RecordWildCards +RecursiveDo +RelaxedPolyRec +Right +SOURCE +SPECIALIZE +ScopedTypeVariables +ShowS +StandaloneDeriving +String +System.CPUTime +System.Cmd +System.Console.Editline +System.Console.GetOpt +System.Console.Readline +System.Directory +System.Environment +System.Exit +System.FilePath +System.FilePath.Posix +System.FilePath.Windows +System.IO +System.IO.Error +System.IO.Unsafe +System.Info +System.Locale +System.Mem +System.Mem.StableName +System.Mem.Weak +System.Posix +System.Posix.Directory +System.Posix.DynamicLinker +System.Posix.DynamicLinker.Module +System.Posix.DynamicLinker.Prim +System.Posix.Env +System.Posix.Error +System.Posix.Files +System.Posix.IO +System.Posix.Process +System.Posix.Process.Internals +System.Posix.Resource +System.Posix.Semaphore +System.Posix.SharedMem +System.Posix.Signals +System.Posix.Signals.Exts +System.Posix.Temp +System.Posix.Terminal +System.Posix.Time +System.Posix.Types +System.Posix.Unistd +System.Posix.User +System.Process +System.Random +System.Time +System.Timeout +TemplateHaskell +Test.HUnit +Test.HUnit.Base +Test.HUnit.Lang +Test.HUnit.Terminal +Test.HUnit.Text +Test.QuickCheck +Test.QuickCheck.Batch +Test.QuickCheck.Poly +Test.QuickCheck.Utils +Text.Html +Text.Html.BlockTable +Text.ParserCombinators.Parsec +Text.ParserCombinators.Parsec.Char +Text.ParserCombinators.Parsec.Combinator +Text.ParserCombinators.Parsec.Error +Text.ParserCombinators.Parsec.Expr +Text.ParserCombinators.Parsec.Language +Text.ParserCombinators.Parsec.Perm +Text.ParserCombinators.Parsec.Pos +Text.ParserCombinators.Parsec.Prim +Text.ParserCombinators.Parsec.Token +Text.ParserCombinators.ReadP +Text.ParserCombinators.ReadPrec +Text.PrettyPrint +Text.PrettyPrint.HughesPJ +Text.Printf +Text.Read +Text.Read.Lex +Text.Regex.Base +Text.Regex.Base.Context +Text.Regex.Base.Impl +Text.Regex.Base.RegexLike +Text.Regex.Posix +Text.Regex.Posix.ByteString +Text.Regex.Posix.String +Text.Regex.Posix.Wrap +Text.Show +Text.Show.Functions +Text.XHtml +Text.XHtml.Debug +Text.XHtml.Frameset +Text.XHtml.Strict +Text.XHtml.Table +Text.XHtml.Transitional +Trace.Hpc.Mix +Trace.Hpc.Reflect +Trace.Hpc.Tix +Trace.Hpc.Util +TransformListComp +True +TypeFamilies +TypeOperators +TypeSynonymInstances +UNPACK +UnboxedTuples +UndecidableInstances +UnicodeSyntax +UnliftedFFITypes +Unsafe.Coerce +ViewPatterns +WARNING +abs +acos +acosh +all +and +any +appendFile +as +asTypeOf +asin +asinh +atan +atan2 +atanh +break +case +catch +ceiling +class +compare +concat +concatMap +const +cos +cosh +curry +cycle +data +decodeFloat +default +deriving +div +divMod +do +drop +dropWhile +either +elem +else +encodeFloat +enumFrom +enumFromThen +enumFromThenTo +enumFromTo +error +exp +exponent +fail +filter +flip +floatDigits +floatRadix +floatRange +floor +fmap +fold +fold1 +foldr +foldr1 +fromEnum +fromInteger +fromIntegral +fromRational +fst +gcd +getChar +getContents +getLine +head +hiding +id +if +import +in +infix +infixl +infixr +init +instance +intract +ioError +isDenormalized +isIEEE +isInfinite +isNan +isNegativeZero +iterate +last +lcm +length +let +lex +lines +log +logBase +lookup +map +mapM +mapM_ +max +maxBound +maximum +maybe +min +minBound +minimum +mod +module +negate +newtype +not +notElem +null +odd +of +or +otherwise +pi +pred +print +product +properFraction +putChar +putStr +putStrLn +qualified +quot +quotRem +read +readFile +readIO +readList +readLn +readParen +reads +readsPrec +realtoFrac +recip +rem +repeat +replicate +return +reverse +round +scaleFloat +scanl +scanl1 +scanr +scanr1 +seq +sequence +sequence_ +show +showChar +showList +showParen +showString +shows +showsPrec +significand +signum +sin +sinh +snd +span +splitAt +sqrt +subtract +succ +sum +tail +take +takeWhile +tan +tanh +then +toEnum +toInteger +toRational +truncate +type +uncurry +undefined +unlines +until +unwords +unzip +unzip3 +userError +where +words +writeFile +zip +zip3 +zipWith +zipWith3 \ No newline at end of file diff --git a/elpa/auto-complete-20140803.2118/dict/java-mode b/elpa/auto-complete-20140803.2118/dict/java-mode new file mode 100644 index 000000000..125deeb50 --- /dev/null +++ b/elpa/auto-complete-20140803.2118/dict/java-mode @@ -0,0 +1,53 @@ +abstract +assert +boolean +break +byte +case +catch +char +class +const +continue +default +do +double +else +enum +extends +final +finally +float +for +goto +if +implements +import +instanceof +int +interface +long +native +new +package +private +protected +public +return +short +static +strictfp +super +switch +synchronized +this +throw +throws +transient +try +void +volatile +while +@Override +@Deprecated +@SuppressWarnings \ No newline at end of file diff --git a/elpa/auto-complete-20140803.2118/dict/javascript-mode b/elpa/auto-complete-20140803.2118/dict/javascript-mode new file mode 100644 index 000000000..3d83f8439 --- /dev/null +++ b/elpa/auto-complete-20140803.2118/dict/javascript-mode @@ -0,0 +1,148 @@ +Anchor +Area +Array +Boolean +Button +Checkbox +Date +Document +Element +FileUpload +Form +Frame +Function +Hidden +History +Image +Infinity +JavaArray +JavaClass +JavaObject +JavaPackage +Link +Location +Math +MimeType +NaN +Navigator +Number +Object +Option +Packages +Password +Plugin +Radio +RegExp +Reset +Select +String +Submit +Text +Textarea +Window +alert +arguments +assign +blur +break +callee +caller +captureEvents +case +clearInterval +clearTimeout +close +closed +comment +confirm +constructor +continue +default +defaultStatus +delete +do +document +else +escape +eval +export +find +focus +for +frames +function +getClass +history +home +if +import +in +innerHeight +innerWidth +isFinite +isNan +java +label +length +location +locationbar +menubar +moveBy +moveTo +name +navigate +navigator +netscape +new +onBlur +onError +onFocus +onLoad +onUnload +open +opener +outerHeight +outerWidth +pageXoffset +pageYoffset +parent +parseFloat +parseInt +personalbar +print +prompt +prototype +ref +releaseEvents +resizeBy +resizeTo +return +routeEvent +scroll +scrollBy +scrollTo +scrollbars +self +setInterval +setTimeout +status +statusbar +stop +sun +switch +taint +this +toString +toolbar +top +typeof +unescape +untaint +unwatch +valueOf +var +void +watch +while +window +with diff --git a/elpa/auto-complete-20140803.2118/dict/lua-mode b/elpa/auto-complete-20140803.2118/dict/lua-mode new file mode 100644 index 000000000..d0de6a4d7 --- /dev/null +++ b/elpa/auto-complete-20140803.2118/dict/lua-mode @@ -0,0 +1,21 @@ +and +break +do +else +elseif +end +false +for +function +if +in +local +nil +not +or +repeat +return +then +true +until +while diff --git a/elpa/auto-complete-20140803.2118/dict/php-mode b/elpa/auto-complete-20140803.2118/dict/php-mode new file mode 100644 index 000000000..07f2e8986 --- /dev/null +++ b/elpa/auto-complete-20140803.2118/dict/php-mode @@ -0,0 +1,6144 @@ +abs +acos +acosh +addcslashes +addslashes +aggregate +aggregate_info +aggregate_methods +aggregate_methods_by_list +aggregate_methods_by_regexp +aggregate_properties +aggregate_properties_by_list +aggregate_properties_by_regexp +aggregation_info +amqpconnection +amqpexchange +amqpqueue +and +apache_child_terminate +apache_getenv +apache_get_modules +apache_get_version +apache_lookup_uri +apache_note +apache_request_headers +apache_reset_timeout +apache_response_headers +apache_setenv +apc_add +apc_bin_dump +apc_bin_dumpfile +apc_bin_load +apc_bin_loadfile +apc_cache_info +apc_cas +apc_clear_cache +apc_compile_file +apc_dec +apc_define_constants +apc_delete +apc_delete_file +apc_exists +apc_fetch +apc_inc +apciterator +apc_load_constants +apc_sma_info +apc_store +apd_breakpoint +apd_callstack +apd_clunk +apd_continue +apd_croak +apd_dump_function_table +apd_dump_persistent_resources +apd_dump_regular_resources +apd_echo +apd_get_active_symbols +apd_set_pprof_trace +apd_set_session +apd_set_session_trace +apd_set_session_trace_socket +appenditerator +array +arrayaccess +array_change_key_case +array_chunk +array_combine +array_count_values +array_diff +array_diff_assoc +array_diff_key +array_diff_uassoc +array_diff_ukey +array_fill +array_fill_keys +array_filter +array_flip +array_intersect +array_intersect_assoc +array_intersect_key +array_intersect_uassoc +array_intersect_ukey +arrayiterator +array_key_exists +array_keys +array_map +array_merge +array_merge_recursive +array_multisort +arrayobject +array_pad +array_pop +array_product +array_push +array_rand +array_reduce +array_replace +array_replace_recursive +array_reverse +array_search +array_shift +array_slice +array_splice +array_sum +array_udiff +array_udiff_assoc +array_udiff_uassoc +array_uintersect +array_uintersect_assoc +array_uintersect_uassoc +array_unique +array_unshift +array_values +array_walk +array_walk_recursive +arsort +as +asin +asinh +asort +assert +assert_options +atan +atan2 +atanh +badfunctioncallexception +badmethodcallexception +base64_decode +base64_encode +base_convert +basename +bbcode_add_element +bbcode_add_smiley +bbcode_create +bbcode_destroy +bbcode_parse +bbcode_set_arg_parser +bbcode_set_flags +bcadd +bccomp +bcdiv +bcmod +bcmul +bcompiler_load +bcompiler_load_exe +bcompiler_parse_class +bcompiler_read +bcompiler_write_class +bcompiler_write_constant +bcompiler_write_exe_footer +bcompiler_write_file +bcompiler_write_footer +bcompiler_write_function +bcompiler_write_functions_from_file +bcompiler_write_header +bcompiler_write_included_filename +bcpow +bcpowmod +bcscale +bcsqrt +bcsub +bin2hex +bindec +bindtextdomain +bind_textdomain_codeset +break +bson_decode +bson_encode +bumpValue +bzclose +bzcompress +bzdecompress +bzerrno +bzerror +bzerrstr +bzflush +bzopen +bzread +bzwrite +cachingiterator +cairo +cairoantialias +cairocontent +cairocontext +cairo_create +cairoexception +cairoextend +cairofillrule +cairofilter +cairofontface +cairo_font_face_get_type +cairo_font_face_status +cairofontoptions +cairo_font_options_create +cairo_font_options_equal +cairo_font_options_get_antialias +cairo_font_options_get_hint_metrics +cairo_font_options_get_hint_style +cairo_font_options_get_subpixel_order +cairo_font_options_hash +cairo_font_options_merge +cairo_font_options_set_antialias +cairo_font_options_set_hint_metrics +cairo_font_options_set_hint_style +cairo_font_options_set_subpixel_order +cairo_font_options_status +cairofontslant +cairofonttype +cairofontweight +cairoformat +cairo_format_stride_for_width +cairogradientpattern +cairohintmetrics +cairohintstyle +cairoimagesurface +cairo_image_surface_create +cairo_image_surface_create_for_data +cairo_image_surface_create_from_png +cairo_image_surface_get_data +cairo_image_surface_get_format +cairo_image_surface_get_height +cairo_image_surface_get_stride +cairo_image_surface_get_width +cairolineargradient +cairolinecap +cairolinejoin +cairomatrix +cairo_matrix_create_scale +cairo_matrix_create_translate +cairo_matrix_invert +cairo_matrix_multiply +cairo_matrix_rotate +cairo_matrix_transform_distance +cairo_matrix_transform_point +cairo_matrix_translate +cairooperator +cairopath +cairopattern +cairo_pattern_add_color_stop_rgb +cairo_pattern_add_color_stop_rgba +cairo_pattern_create_for_surface +cairo_pattern_create_linear +cairo_pattern_create_radial +cairo_pattern_create_rgb +cairo_pattern_create_rgba +cairo_pattern_get_color_stop_count +cairo_pattern_get_color_stop_rgba +cairo_pattern_get_extend +cairo_pattern_get_filter +cairo_pattern_get_linear_points +cairo_pattern_get_matrix +cairo_pattern_get_radial_circles +cairo_pattern_get_rgba +cairo_pattern_get_surface +cairo_pattern_get_type +cairo_pattern_set_extend +cairo_pattern_set_filter +cairo_pattern_set_matrix +cairo_pattern_status +cairopatterntype +cairopdfsurface +cairo_pdf_surface_create +cairo_pdf_surface_set_size +cairo_ps_get_levels +cairopslevel +cairo_ps_level_to_string +cairopssurface +cairo_ps_surface_create +cairo_ps_surface_dsc_begin_page_setup +cairo_ps_surface_dsc_begin_setup +cairo_ps_surface_dsc_comment +cairo_ps_surface_get_eps +cairo_ps_surface_restrict_to_level +cairo_ps_surface_set_eps +cairo_ps_surface_set_size +cairoradialgradient +cairoscaledfont +cairo_scaled_font_create +cairo_scaled_font_extents +cairo_scaled_font_get_ctm +cairo_scaled_font_get_font_face +cairo_scaled_font_get_font_matrix +cairo_scaled_font_get_font_options +cairo_scaled_font_get_scale_matrix +cairo_scaled_font_get_type +cairo_scaled_font_glyph_extents +cairo_scaled_font_status +cairo_scaled_font_text_extents +cairosolidpattern +cairostatus +cairosubpixelorder +cairosurface +cairo_surface_copy_page +cairo_surface_create_similar +cairo_surface_finish +cairo_surface_flush +cairo_surface_get_content +cairo_surface_get_device_offset +cairo_surface_get_font_options +cairo_surface_get_type +cairo_surface_mark_dirty +cairo_surface_mark_dirty_rectangle +cairosurfacepattern +cairo_surface_set_device_offset +cairo_surface_set_fallback_resolution +cairo_surface_show_page +cairo_surface_status +cairosurfacetype +cairo_surface_write_to_png +cairosvgsurface +cairo_svg_surface_create +cairo_svg_surface_restrict_to_version +cairosvgversion +cairo_svg_version_to_string +cairotoyfontface +calculhmac +calcul_hmac +cal_days_in_month +cal_from_jd +cal_info +__call() +callbackfilteriterator +__callStatic() +call_user_func +call_user_func_array +call_user_method +call_user_method_array +cal_to_jd +case +catch +ceil +cfunction +chdb +chdb_create +chdir +checkdate +checkdnsrr +chgrp +chmod +chop +chown +chr +chroot +chunk_split +class +__CLASS__ +class_alias +class_exists +class_implements +classkit_import +classkit_method_add +classkit_method_copy +classkit_method_redefine +classkit_method_remove +classkit_method_rename +class_parents +clearstatcache +clone +__clone() +closedir +closelog +collator +com +com_addref +com_create_guid +com_event_sink +com_get +com_get_active_object +com_invoke +com_isenum +com_load +com_load_typelib +com_message_pump +compact +com_print_typeinfo +com_propget +com_propput +com_propset +com_release +com_set +connection_aborted +connection_status +connection_timeout +const +constant +construct +__construct() +continue +convert_cyr_string +convert_uudecode +convert_uuencode +copy +cos +cosh +count +countable +count_chars +counter_bump +counter_bump_value +counter_create +counter_get +counter_get_meta +counter_get_named +counter_get_value +counter_reset +counter_reset_value +crack_check +crack_closedict +crack_getlastmessage +crack_opendict +crc32 +create_function +crypt +ctype_alnum +ctype_alpha +ctype_cntrl +ctype_digit +ctype_graph +ctype_lower +ctype_print +ctype_punct +ctype_space +ctype_upper +ctype_xdigit +cubrid_affected_rows +cubrid_bind +cubrid_client_encoding +cubrid_close +cubrid_close_prepare +cubrid_close_request +cubrid_col_get +cubrid_col_size +cubrid_column_names +cubrid_column_types +cubrid_commit +cubrid_connect +cubrid_connect_with_url +cubrid_current_oid +cubrid_data_seek +cubrid_db_name +cubrid_disconnect +cubrid_drop +cubrid_errno +cubrid_error +cubrid_error_code +cubrid_error_code_facility +cubrid_error_msg +cubrid_execute +cubrid_fetch +cubrid_fetch_array +cubrid_fetch_assoc +cubrid_fetch_field +cubrid_fetch_lengths +cubrid_fetch_object +cubrid_fetch_row +cubrid_field_flags +cubrid_field_len +cubrid_field_name +cubrid_field_seek +cubrid_field_table +cubrid_field_type +cubrid_free_result +cubrid_get +cubrid_get_autocommit +cubrid_get_charset +cubrid_get_class_name +cubrid_get_client_info +cubrid_get_db_parameter +cubrid_get_server_info +cubrid_insert_id +cubrid_is_instance +cubrid_list_dbs +cubrid_load_from_glo +cubrid_lob_close +cubrid_lob_export +cubrid_lob_get +cubrid_lob_send +cubrid_lob_size +cubrid_lock_read +cubrid_lock_write +cubrid_move_cursor +cubrid_new_glo +cubrid_next_result +cubrid_num_cols +cubrid_num_fields +cubrid_num_rows +cubrid_ping +cubrid_prepare +cubrid_put +cubrid_query +cubrid_real_escape_string +cubrid_result +cubrid_rollback +cubrid_save_to_glo +cubrid_schema +cubrid_send_glo +cubrid_seq_drop +cubrid_seq_insert +cubrid_seq_put +cubrid_set_add +cubrid_set_autocommit +cubrid_set_db_parameter +cubrid_set_drop +cubrid_unbuffered_query +cubrid_version +curl_close +curl_copy_handle +curl_errno +curl_error +curl_exec +curl_getinfo +curl_init +curl_multi_add_handle +curl_multi_close +curl_multi_exec +curl_multi_getcontent +curl_multi_info_read +curl_multi_init +curl_multi_remove_handle +curl_multi_select +curl_setopt +curl_setopt_array +curl_version +current +cyrus_authenticate +cyrus_bind +cyrus_close +cyrus_connect +cyrus_query +cyrus_unbind +date +date_add +date_create +date_create_from_format +date_date_set +date_default_timezone_get +date_default_timezone_set +date_diff +date_format +date_get_last_errors +dateinterval +date_interval_create_from_date_string +date_interval_format +date_isodate_set +date_modify +date_offset_get +date_parse +date_parse_from_format +dateperiod +date_sub +date_sun_info +date_sunrise +date_sunset +datetime +date_time_set +date_timestamp_get +date_timestamp_set +datetimezone +date_timezone_get +date_timezone_set +db2_autocommit +db2_bind_param +db2_client_info +db2_close +db2_column_privileges +db2_columns +db2_commit +db2_connect +db2_conn_error +db2_conn_errormsg +db2_cursor_type +db2_escape_string +db2_exec +db2_execute +db2_fetch_array +db2_fetch_assoc +db2_fetch_both +db2_fetch_object +db2_fetch_row +db2_field_display_size +db2_field_name +db2_field_num +db2_field_precision +db2_field_scale +db2_field_type +db2_field_width +db2_foreign_keys +db2_free_result +db2_free_stmt +db2_get_option +db2_last_insert_id +db2_lob_read +db2_next_result +db2_num_fields +db2_num_rows +db2_pclose +db2_pconnect +db2_prepare +db2_primary_keys +db2_procedure_columns +db2_procedures +db2_result +db2_rollback +db2_server_info +db2_set_option +db2_special_columns +db2_statistics +db2_stmt_error +db2_stmt_errormsg +db2_table_privileges +db2_tables +dba_close +dba_delete +dba_exists +dba_fetch +dba_firstkey +dba_handlers +dba_insert +dba_key_split +dba_list +dba_nextkey +dba_open +dba_optimize +dba_popen +dba_replace +dbase_add_record +dbase_close +dbase_create +dbase_delete_record +dbase_get_header_info +dbase_get_record +dbase_get_record_with_names +dbase_numfields +dbase_numrecords +dbase_open +dbase_pack +dbase_replace_record +dba_sync +dbplus_add +dbplus_aql +dbplus_chdir +dbplus_close +dbplus_curr +dbplus_errcode +dbplus_errno +dbplus_find +dbplus_first +dbplus_flush +dbplus_freealllocks +dbplus_freelock +dbplus_freerlocks +dbplus_getlock +dbplus_getunique +dbplus_info +dbplus_last +dbplus_lockrel +dbplus_next +dbplus_open +dbplus_prev +dbplus_rchperm +dbplus_rcreate +dbplus_rcrtexact +dbplus_rcrtlike +dbplus_resolve +dbplus_restorepos +dbplus_rkeys +dbplus_ropen +dbplus_rquery +dbplus_rrename +dbplus_rsecindex +dbplus_runlink +dbplus_rzap +dbplus_savepos +dbplus_setindex +dbplus_setindexbynumber +dbplus_sql +dbplus_tcl +dbplus_tremove +dbplus_undo +dbplus_undoprepare +dbplus_unlockrel +dbplus_unselect +dbplus_update +dbplus_xlockrel +dbplus_xunlockrel +dbx_close +dbx_compare +dbx_connect +dbx_error +dbx_escape_string +dbx_fetch_row +dbx_query +dbx_sort +dcgettext +dcngettext +deaggregate +debug_backtrace +debug_print_backtrace +debug_zval_dump +decbin +dechex +declare +decoct +default +define +defined +define_syslog_variables +deg2rad +delete +__destruct() +dgettext +die +dio_close +dio_fcntl +dio_open +dio_read +dio_seek +dio_stat +dio_tcsetattr +dio_truncate +dio_write +dir +__DIR__ +directoryiterator +dirname +diskfreespace +disk_free_space +disk_total_space +dl +dngettext +dns_check_record +dns_get_mx +dns_get_record +do +domainexception +domattr +domattribute_name +domattribute_set_value +domattribute_specified +domattribute_value +domcharacterdata +domcomment +domdocument +domdocument_add_root +domdocument_create_attribute +domdocument_create_cdata_section +domdocument_create_comment +domdocument_create_element +domdocument_create_element_ns +domdocument_create_entity_reference +domdocument_create_processing_instruction +domdocument_create_text_node +domdocument_doctype +domdocument_document_element +domdocument_dump_file +domdocument_dump_mem +domdocumentfragment +domdocument_get_element_by_id +domdocument_get_elements_by_tagname +domdocument_html_dump_mem +domdocumenttype +domdocumenttype_entities +domdocumenttype_internal_subset +domdocumenttype_name +domdocumenttype_notations +domdocumenttype_public_id +domdocumenttype_system_id +domdocument_xinclude +domelement +domelement_get_attribute +domelement_get_attribute_node +domelement_get_elements_by_tagname +domelement_has_attribute +domelement_remove_attribute +domelement_set_attribute +domelement_set_attribute_node +domelement_tagname +domentity +domentityreference +domexception +domimplementation +dom_import_simplexml +domnamednodemap +domnode +domnode_add_namespace +domnode_append_child +domnode_append_sibling +domnode_attributes +domnode_child_nodes +domnode_clone_node +domnode_dump_node +domnode_first_child +domnode_get_content +domnode_has_attributes +domnode_has_child_nodes +domnode_insert_before +domnode_is_blank_node +domnode_last_child +domnodelist +domnode_next_sibling +domnode_node_name +domnode_node_type +domnode_node_value +domnode_owner_document +domnode_parent_node +domnode_prefix +domnode_previous_sibling +domnode_remove_child +domnode_replace_child +domnode_replace_node +domnode_set_content +domnode_set_name +domnode_set_namespace +domnode_unlink_node +domnotation +domprocessinginstruction +domprocessinginstruction_data +domprocessinginstruction_target +domtext +domxml_new_doc +domxml_open_file +domxml_open_mem +domxml_version +domxml_xmltree +domxml_xslt_stylesheet +domxml_xslt_stylesheet_doc +domxml_xslt_stylesheet_file +domxml_xslt_version +domxpath +domxsltstylesheet_process +domxsltstylesheet_result_dump_file +domxsltstylesheet_result_dump_mem +dotnet +dotnet_load +doubleval +each +easter_date +easter_days +echo +else +elseif +empty +emptyiterator +enchant_broker_describe +enchant_broker_dict_exists +enchant_broker_free +enchant_broker_free_dict +enchant_broker_get_error +enchant_broker_init +enchant_broker_list_dicts +enchant_broker_request_dict +enchant_broker_request_pwl_dict +enchant_broker_set_ordering +enchant_dict_add_to_personal +enchant_dict_add_to_session +enchant_dict_check +enchant_dict_describe +enchant_dict_get_error +enchant_dict_is_in_session +enchant_dict_quick_check +enchant_dict_store_replacement +enchant_dict_suggest +end +enddeclare +endfor +endforeach +endif +endswitch +endwhile +ereg +eregi +eregi_replace +ereg_replace +errorexception +error_get_last +error_log +error_reporting +escapeshellarg +escapeshellcmd +eval +event_add +event_base_free +event_base_loop +event_base_loopbreak +event_base_loopexit +event_base_new +event_base_priority_init +event_base_set +event_buffer_base_set +event_buffer_disable +event_buffer_enable +event_buffer_fd_set +event_buffer_free +event_buffer_new +event_buffer_priority_set +event_buffer_read +event_buffer_set_callback +event_buffer_timeout_set +event_buffer_watermark_set +event_buffer_write +event_del +event_free +event_new +event_set +exception +exec +exif_imagetype +exif_read_data +exif_tagname +exif_thumbnail +exit +exp +expect_expectl +expect_popen +explode +expm1 +export +extends +extension_loaded +extract +ezmlm_hash +fam_cancel_monitor +fam_close +fam_monitor_collection +fam_monitor_directory +fam_monitor_file +fam_next_event +fam_open +fam_pending +fam_resume_monitor +fam_suspend_monitor +fbsql_affected_rows +fbsql_autocommit +fbsql_blob_size +fbsql_change_user +fbsql_clob_size +fbsql_close +fbsql_commit +fbsql_connect +fbsql_create_blob +fbsql_create_clob +fbsql_create_db +fbsql_database +fbsql_database_password +fbsql_data_seek +fbsql_db_query +fbsql_db_status +fbsql_drop_db +fbsql_errno +fbsql_error +fbsql_fetch_array +fbsql_fetch_assoc +fbsql_fetch_field +fbsql_fetch_lengths +fbsql_fetch_object +fbsql_fetch_row +fbsql_field_flags +fbsql_field_len +fbsql_field_name +fbsql_field_seek +fbsql_field_table +fbsql_field_type +fbsql_free_result +fbsql_get_autostart_info +fbsql_hostname +fbsql_insert_id +fbsql_list_dbs +fbsql_list_fields +fbsql_list_tables +fbsql_next_result +fbsql_num_fields +fbsql_num_rows +fbsql_password +fbsql_pconnect +fbsql_query +fbsql_read_blob +fbsql_read_clob +fbsql_result +fbsql_rollback +fbsql_rows_fetched +fbsql_select_db +fbsql_set_characterset +fbsql_set_lob_mode +fbsql_set_password +fbsql_set_transaction +fbsql_start_db +fbsql_stop_db +fbsql_tablename +fbsql_table_name +fbsql_username +fbsql_warnings +fclose +fdf_add_doc_javascript +fdf_add_template +fdf_close +fdf_create +fdf_enum_values +fdf_errno +fdf_error +fdf_get_ap +fdf_get_attachment +fdf_get_encoding +fdf_get_file +fdf_get_flags +fdf_get_opt +fdf_get_status +fdf_get_value +fdf_get_version +fdf_header +fdf_next_field_name +fdf_open +fdf_open_string +fdf_remove_item +fdf_save +fdf_save_string +fdf_set_ap +fdf_set_encoding +fdf_set_file +fdf_set_flags +fdf_set_javascript_action +fdf_set_on_import_javascript +fdf_set_opt +fdf_set_status +fdf_set_submit_form_action +fdf_set_target_frame +fdf_set_value +fdf_set_version +feof +fflush +fgetc +fgetcsv +fgets +fgetss +file +__FILE__ +fileatime +filectime +file_exists +file_get_contents +filegroup +fileinode +filemtime +fileowner +fileperms +filepro +filepro_fieldcount +filepro_fieldname +filepro_fieldtype +filepro_fieldwidth +filepro_retrieve +filepro_rowcount +file_put_contents +filesize +filesystemiterator +filetype +filter_has_var +filter_id +filter_input +filter_input_array +filteriterator +filter_list +filter_var +filter_var_array +final +finfo_buffer +finfo_close +finfo_file +finfo_open +finfo_set_flags +floatval +flock +floor +flush +fmod +fnmatch +fopen +for +foreach +forward_static_call +forward_static_call_array +fpassthru +fprintf +fputcsv +fputs +fread +frenchtojd +fribidi_log2vis +fscanf +fseek +fsockopen +fstat +ftell +ftok +ftp_alloc +ftp_cdup +ftp_chdir +ftp_chmod +ftp_close +ftp_connect +ftp_delete +ftp_exec +ftp_fget +ftp_fput +ftp_get +ftp_get_option +ftp_login +ftp_mdtm +ftp_mkdir +ftp_nb_continue +ftp_nb_fget +ftp_nb_fput +ftp_nb_get +ftp_nb_put +ftp_nlist +ftp_pasv +ftp_put +ftp_pwd +ftp_quit +ftp_raw +ftp_rawlist +ftp_rename +ftp_rmdir +ftp_set_option +ftp_site +ftp_size +ftp_ssl_connect +ftp_systype +ftruncate +func_get_arg +func_get_args +func_num_args +function +__FUNCTION__ +function_exists +fwrite +gc_collect_cycles +gc_disable +gc_enable +gc_enabled +gd_info +gearmanclient +gearmanjob +gearmantask +gearmanworker +geoip_continent_code_by_name +geoip_country_code3_by_name +geoip_country_code_by_name +geoip_country_name_by_name +geoip_database_info +geoip_db_avail +geoip_db_filename +geoip_db_get_all_info +geoip_id_by_name +geoip_isp_by_name +geoip_org_by_name +geoip_record_by_name +geoip_region_by_name +geoip_region_name_by_code +geoip_time_zone_by_country_and_region +__get() +getallheaders +get_browser +get_called_class +get_cfg_var +get_class +get_class_methods +get_class_vars +getclosure +getconstant +getconstants +getconstructor +get_current_user +getcwd +getdate +get_declared_classes +get_declared_interfaces +getdefaultproperties +get_defined_constants +get_defined_functions +get_defined_vars +getdoccomment +getendline +getenv +getextension +get_extension_funcs +getextensionname +getfilename +get_headers +gethostbyaddr +gethostbyname +gethostbynamel +gethostname +get_html_translation_table +getimagesize +get_included_files +get_include_path +getinterfacenames +getinterfaces +getlastmod +get_loaded_extensions +get_magic_quotes_gpc +get_magic_quotes_runtime +getMeta +get_meta_tags +getmethod +getmethods +getmodifiers +getmxrr +getmygid +getmyinode +getmypid +getmyuid +getname +getNamed +getnamespacename +get_object_vars +getopt +getparentclass +get_parent_class +getproperties +getproperty +getprotobyname +getprotobynumber +getrandmax +get_required_files +get_resource_type +getrusage +getservbyname +getservbyport +getshortname +getstartline +getstaticproperties +getstaticpropertyvalue +gettext +gettimeofday +gettraitaliases +gettraitnames +gettraits +gettype +getValue +glob +global +globiterator +gmagick +gmagickdraw +gmagickpixel +gmdate +gmmktime +gmp_abs +gmp_add +gmp_and +gmp_clrbit +gmp_cmp +gmp_com +gmp_div +gmp_divexact +gmp_div_q +gmp_div_qr +gmp_div_r +gmp_fact +gmp_gcd +gmp_gcdext +gmp_hamdist +gmp_init +gmp_intval +gmp_invert +gmp_jacobi +gmp_legendre +gmp_mod +gmp_mul +gmp_neg +gmp_nextprime +gmp_or +gmp_perfect_square +gmp_popcount +gmp_pow +gmp_powm +gmp_prob_prime +gmp_random +gmp_scan0 +gmp_scan1 +gmp_setbit +gmp_sign +gmp_sqrt +gmp_sqrtrem +gmp_strval +gmp_sub +gmp_testbit +gmp_xor +gmstrftime +gnupg_adddecryptkey +gnupg_addencryptkey +gnupg_addsignkey +gnupg_cleardecryptkeys +gnupg_clearencryptkeys +gnupg_clearsignkeys +gnupg_decrypt +gnupg_decryptverify +gnupg_encrypt +gnupg_encryptsign +gnupg_export +gnupg_geterror +gnupg_getprotocol +gnupg_import +gnupg_init +gnupg_keyinfo +gnupg_setarmor +gnupg_seterrormode +gnupg_setsignmode +gnupg_sign +gnupg_verify +gopher_parsedir +goto +grapheme_extract +grapheme_stripos +grapheme_stristr +grapheme_strlen +grapheme_strpos +grapheme_strripos +grapheme_strrpos +grapheme_strstr +grapheme_substr +gregoriantojd +gupnp_context_get_host_ip +gupnp_context_get_port +gupnp_context_get_subscription_timeout +gupnp_context_host_path +gupnp_context_new +gupnp_context_set_subscription_timeout +gupnp_context_timeout_add +gupnp_context_unhost_path +gupnp_control_point_browse_start +gupnp_control_point_browse_stop +gupnp_control_point_callback_set +gupnp_control_point_new +gupnp_device_action_callback_set +gupnp_device_info_get +gupnp_device_info_get_service +gupnp_root_device_get_available +gupnp_root_device_get_relative_location +gupnp_root_device_new +gupnp_root_device_set_available +gupnp_root_device_start +gupnp_root_device_stop +gupnp_service_action_get +gupnp_service_action_return +gupnp_service_action_return_error +gupnp_service_action_set +gupnp_service_freeze_notify +gupnp_service_info_get +gupnp_service_info_get_introspection +gupnp_service_introspection_get_state_variable +gupnp_service_notify +gupnp_service_proxy_action_get +gupnp_service_proxy_action_set +gupnp_service_proxy_add_notify +gupnp_service_proxy_callback_set +gupnp_service_proxy_get_subscribed +gupnp_service_proxy_remove_notify +gupnp_service_proxy_set_subscribed +gupnp_service_thaw_notify +gzclose +gzcompress +gzdecode +gzdeflate +gzencode +gzeof +gzfile +gzgetc +gzgets +gzgetss +gzinflate +gzopen +gzpassthru +gzputs +gzread +gzrewind +gzseek +gztell +gzuncompress +gzwrite +halt_compiler +haruannotation +haruannotation_setborderstyle +haruannotation_sethighlightmode +haruannotation_seticon +haruannotation_setopened +harudestination +harudestination_setfit +harudestination_setfitb +harudestination_setfitbh +harudestination_setfitbv +harudestination_setfith +harudestination_setfitr +harudestination_setfitv +harudestination_setxyz +harudoc +harudoc_addpage +harudoc_addpagelabel +harudoc_construct +harudoc_createoutline +harudoc_getcurrentencoder +harudoc_getcurrentpage +harudoc_getencoder +harudoc_getfont +harudoc_getinfoattr +harudoc_getpagelayout +harudoc_getpagemode +harudoc_getstreamsize +harudoc_insertpage +harudoc_loadjpeg +harudoc_loadpng +harudoc_loadraw +harudoc_loadttc +harudoc_loadttf +harudoc_loadtype1 +harudoc_output +harudoc_readfromstream +harudoc_reseterror +harudoc_resetstream +harudoc_save +harudoc_savetostream +harudoc_setcompressionmode +harudoc_setcurrentencoder +harudoc_setencryptionmode +harudoc_setinfoattr +harudoc_setinfodateattr +harudoc_setopenaction +harudoc_setpagelayout +harudoc_setpagemode +harudoc_setpagesconfiguration +harudoc_setpassword +harudoc_setpermission +harudoc_usecnsencodings +harudoc_usecnsfonts +harudoc_usecntencodings +harudoc_usecntfonts +harudoc_usejpencodings +harudoc_usejpfonts +harudoc_usekrencodings +harudoc_usekrfonts +haruencoder +haruencoder_getbytetype +haruencoder_gettype +haruencoder_getunicode +haruencoder_getwritingmode +haruexception +harufont +harufont_getascent +harufont_getcapheight +harufont_getdescent +harufont_getencodingname +harufont_getfontname +harufont_gettextwidth +harufont_getunicodewidth +harufont_getxheight +harufont_measuretext +haruimage +haruimage_getbitspercomponent +haruimage_getcolorspace +haruimage_getheight +haruimage_getsize +haruimage_getwidth +haruimage_setcolormask +haruimage_setmaskimage +haruoutline +haruoutline_setdestination +haruoutline_setopened +harupage +harupage_arc +harupage_begintext +harupage_circle +harupage_closepath +harupage_concat +harupage_createdestination +harupage_createlinkannotation +harupage_createtextannotation +harupage_createurlannotation +harupage_curveto +harupage_curveto2 +harupage_curveto3 +harupage_drawimage +harupage_ellipse +harupage_endpath +harupage_endtext +harupage_eofill +harupage_eofillstroke +harupage_fill +harupage_fillstroke +harupage_getcharspace +harupage_getcmykfill +harupage_getcmykstroke +harupage_getcurrentfont +harupage_getcurrentfontsize +harupage_getcurrentpos +harupage_getcurrenttextpos +harupage_getdash +harupage_getfillingcolorspace +harupage_getflatness +harupage_getgmode +harupage_getgrayfill +harupage_getgraystroke +harupage_getheight +harupage_gethorizontalscaling +harupage_getlinecap +harupage_getlinejoin +harupage_getlinewidth +harupage_getmiterlimit +harupage_getrgbfill +harupage_getrgbstroke +harupage_getstrokingcolorspace +harupage_gettextleading +harupage_gettextmatrix +harupage_gettextrenderingmode +harupage_gettextrise +harupage_gettextwidth +harupage_gettransmatrix +harupage_getwidth +harupage_getwordspace +harupage_lineto +harupage_measuretext +harupage_movetextpos +harupage_moveto +harupage_movetonextline +harupage_rectangle +harupage_setcharspace +harupage_setcmykfill +harupage_setcmykstroke +harupage_setdash +harupage_setflatness +harupage_setfontandsize +harupage_setgrayfill +harupage_setgraystroke +harupage_setheight +harupage_sethorizontalscaling +harupage_setlinecap +harupage_setlinejoin +harupage_setlinewidth +harupage_setmiterlimit +harupage_setrgbfill +harupage_setrgbstroke +harupage_setrotate +harupage_setsize +harupage_setslideshow +harupage_settextleading +harupage_settextmatrix +harupage_settextrenderingmode +harupage_settextrise +harupage_setwidth +harupage_setwordspace +harupage_showtext +harupage_showtextnextline +harupage_stroke +harupage_textout +harupage_textrect +hasconstant +hash +hash_algos +hash_copy +hash_file +hash_final +hash_hmac +hash_hmac_file +hash_init +hash_update +hash_update_file +hash_update_stream +hasmethod +hasproperty +header +header_register_callback +header_remove +headers_list +headers_sent +hebrev +hebrevc +hex2bin +hexdec +highlight_file +highlight_string +htmlentities +html_entity_decode +htmlspecialchars +htmlspecialchars_decode +http_build_cookie +http_build_query +http_build_str +http_build_url +http_cache_etag +http_cache_last_modified +http_chunked_decode +http_date +http_deflate +httpdeflatestream +httpdeflatestream_construct +httpdeflatestream_factory +httpdeflatestream_finish +httpdeflatestream_flush +httpdeflatestream_update +http_get +http_get_request_body +http_get_request_body_stream +http_get_request_headers +http_head +http_inflate +httpinflatestream +httpinflatestream_construct +httpinflatestream_factory +httpinflatestream_finish +httpinflatestream_flush +httpinflatestream_update +http_match_etag +http_match_modified +http_match_request_header +httpmessage +httpmessage_addheaders +httpmessage_construct +httpmessage_detach +httpmessage_factory +httpmessage_fromenv +httpmessage_fromstring +httpmessage_getbody +httpmessage_getheader +httpmessage_getheaders +httpmessage_gethttpversion +httpmessage_getparentmessage +httpmessage_getrequestmethod +httpmessage_getrequesturl +httpmessage_getresponsecode +httpmessage_getresponsestatus +httpmessage_gettype +httpmessage_guesscontenttype +httpmessage_prepend +httpmessage_reverse +httpmessage_send +httpmessage_setbody +httpmessage_setheaders +httpmessage_sethttpversion +httpmessage_setrequestmethod +httpmessage_setrequesturl +httpmessage_setresponsecode +httpmessage_setresponsestatus +httpmessage_settype +httpmessage_tomessagetypeobject +httpmessage_tostring +http_negotiate_charset +http_negotiate_content_type +http_negotiate_language +http_parse_cookie +http_parse_headers +http_parse_message +http_parse_params +http_persistent_handles_clean +http_persistent_handles_count +http_persistent_handles_ident +http_post_data +http_post_fields +http_put_data +http_put_file +http_put_stream +httpquerystring +httpquerystring_construct +httpquerystring_get +httpquerystring_mod +httpquerystring_set +httpquerystring_singleton +httpquerystring_toarray +httpquerystring_tostring +httpquerystring_xlate +http_redirect +httprequest +http_request +httprequest_addcookies +httprequest_addheaders +httprequest_addpostfields +httprequest_addpostfile +httprequest_addputdata +httprequest_addquerydata +httprequest_addrawpostdata +httprequest_addssloptions +http_request_body_encode +httprequest_clearhistory +httprequest_construct +httprequest_enablecookies +httprequest_getcontenttype +httprequest_getcookies +httprequest_getheaders +httprequest_gethistory +httprequest_getmethod +httprequest_getoptions +httprequest_getpostfields +httprequest_getpostfiles +httprequest_getputdata +httprequest_getputfile +httprequest_getquerydata +httprequest_getrawpostdata +httprequest_getrawrequestmessage +httprequest_getrawresponsemessage +httprequest_getrequestmessage +httprequest_getresponsebody +httprequest_getresponsecode +httprequest_getresponsecookies +httprequest_getresponsedata +httprequest_getresponseheader +httprequest_getresponseinfo +httprequest_getresponsemessage +httprequest_getresponsestatus +httprequest_getssloptions +httprequest_geturl +http_request_method_exists +http_request_method_name +http_request_method_register +http_request_method_unregister +httprequestpool +httprequestpool_attach +httprequestpool_construct +httprequestpool_destruct +httprequestpool_detach +httprequestpool_getattachedrequests +httprequestpool_getfinishedrequests +httprequestpool_reset +httprequestpool_send +httprequestpool_socketperform +httprequestpool_socketselect +httprequest_resetcookies +httprequest_send +httprequest_setcontenttype +httprequest_setcookies +httprequest_setheaders +httprequest_setmethod +httprequest_setoptions +httprequest_setpostfields +httprequest_setpostfiles +httprequest_setputdata +httprequest_setputfile +httprequest_setquerydata +httprequest_setrawpostdata +httprequest_setssloptions +httprequest_seturl +httpresponse +httpresponse_capture +http_response_code +httpresponse_getbuffersize +httpresponse_getcache +httpresponse_getcachecontrol +httpresponse_getcontentdisposition +httpresponse_getcontenttype +httpresponse_getdata +httpresponse_getetag +httpresponse_getfile +httpresponse_getgzip +httpresponse_getheader +httpresponse_getlastmodified +httpresponse_getrequestbody +httpresponse_getrequestbodystream +httpresponse_getrequestheaders +httpresponse_getstream +httpresponse_getthrottledelay +httpresponse_guesscontenttype +httpresponse_redirect +httpresponse_send +httpresponse_setbuffersize +httpresponse_setcache +httpresponse_setcachecontrol +httpresponse_setcontentdisposition +httpresponse_setcontenttype +httpresponse_setdata +httpresponse_setetag +httpresponse_setfile +httpresponse_setgzip +httpresponse_setheader +httpresponse_setlastmodified +httpresponse_setstream +httpresponse_setthrottledelay +httpresponse_status +http_send_content_disposition +http_send_content_type +http_send_data +http_send_file +http_send_last_modified +http_send_status +http_send_stream +http_support +http_throttle +hwapi_attribute +hwapi_attribute_key +hwapi_attribute_langdepvalue +hwapi_attribute_value +hwapi_attribute_values +hwapi_checkin +hwapi_checkout +hwapi_children +hwapi_content +hwapi_content_mimetype +hwapi_content_read +hwapi_copy +hwapi_dbstat +hwapi_dcstat +hwapi_dstanchors +hwapi_dstofsrcanchor +hwapi_error_count +hwapi_error_reason +hwapi_find +hwapi_ftstat +hwapi_hgcsp +hwapi_hwstat +hwapi_identify +hwapi_info +hwapi_insert +hwapi_insertanchor +hwapi_insertcollection +hwapi_insertdocument +hwapi_link +hwapi_lock +hwapi_move +hwapi_new_content +hwapi_object +hwapi_object_assign +hwapi_object_attreditable +hwapi_objectbyanchor +hwapi_object_count +hwapi_object_insert +hwapi_object_new +hwapi_object_remove +hwapi_object_title +hwapi_object_value +hwapi_parents +hwapi_reason_description +hwapi_reason_type +hwapi_remove +hwapi_replace +hwapi_setcommittedversion +hwapi_srcanchors +hwapi_srcsofdst +hwapi_unlock +hwapi_user +hwapi_userlist +hw_array2objrec +hw_changeobject +hw_children +hw_childrenobj +hw_close +hw_connect +hw_connection_info +hw_cp +hw_deleteobject +hw_docbyanchor +hw_docbyanchorobj +hw_document_attributes +hw_document_bodytag +hw_document_content +hw_document_setcontent +hw_document_size +hw_dummy +hw_edittext +hw_error +hw_errormsg +hw_free_document +hw_getanchors +hw_getanchorsobj +hw_getandlock +hw_getchildcoll +hw_getchildcollobj +hw_getchilddoccoll +hw_getchilddoccollobj +hw_getobject +hw_getobjectbyquery +hw_getobjectbyquerycoll +hw_getobjectbyquerycollobj +hw_getobjectbyqueryobj +hw_getparents +hw_getparentsobj +hw_getrellink +hw_getremote +hw_getremotechildren +hw_getsrcbydestobj +hw_gettext +hw_getusername +hw_identify +hw_incollections +hw_info +hw_inscoll +hw_insdoc +hw_insertanchors +hw_insertdocument +hw_insertobject +hw_mapid +hw_modifyobject +hw_mv +hw_new_document +hw_objrec2array +hw_output_document +hw_pconnect +hw_pipedocument +hw_root +hw_setlinkroot +hw_stat +hw_unlock +hw_who +hypot +ibase_add_user +ibase_affected_rows +ibase_backup +ibase_blob_add +ibase_blob_cancel +ibase_blob_close +ibase_blob_create +ibase_blob_echo +ibase_blob_get +ibase_blob_import +ibase_blob_info +ibase_blob_open +ibase_close +ibase_commit +ibase_commit_ret +ibase_connect +ibase_db_info +ibase_delete_user +ibase_drop_db +ibase_errcode +ibase_errmsg +ibase_execute +ibase_fetch_assoc +ibase_fetch_object +ibase_fetch_row +ibase_field_info +ibase_free_event_handler +ibase_free_query +ibase_free_result +ibase_gen_id +ibase_maintain_db +ibase_modify_user +ibase_name_result +ibase_num_fields +ibase_num_params +ibase_param_info +ibase_pconnect +ibase_prepare +ibase_query +ibase_restore +ibase_rollback +ibase_rollback_ret +ibase_server_info +ibase_service_attach +ibase_service_detach +ibase_set_event_handler +ibase_timefmt +ibase_trans +ibase_wait_event +iconv +iconv_get_encoding +iconv_mime_decode +iconv_mime_decode_headers +iconv_mime_encode +iconv_set_encoding +iconv_strlen +iconv_strpos +iconv_strrpos +iconv_substr +id3_get_frame_long_name +id3_get_frame_short_name +id3_get_genre_id +id3_get_genre_list +id3_get_genre_name +id3_get_tag +id3_get_version +id3_remove_tag +id3_set_tag +idate +idn_to_ascii +idn_to_unicode +idn_to_utf8 +if +ifx_affected_rows +ifx_blobinfile_mode +ifx_byteasvarchar +ifx_close +ifx_connect +ifx_copy_blob +ifx_create_blob +ifx_create_char +ifx_do +ifx_error +ifx_errormsg +ifx_fetch_row +ifx_fieldproperties +ifx_fieldtypes +ifx_free_blob +ifx_free_char +ifx_free_result +ifx_get_blob +ifx_get_char +ifx_getsqlca +ifx_htmltbl_result +ifx_nullformat +ifx_num_fields +ifx_num_rows +ifx_pconnect +ifx_prepare +ifx_query +ifx_textasvarchar +ifx_update_blob +ifx_update_char +ifxus_close_slob +ifxus_create_slob +ifxus_free_slob +ifxus_open_slob +ifxus_read_slob +ifxus_seek_slob +ifxus_tell_slob +ifxus_write_slob +ignore_user_abort +iis_add_server +iis_get_dir_security +iis_get_script_map +iis_get_server_by_comment +iis_get_server_by_path +iis_get_server_rights +iis_get_service_state +iis_remove_server +iis_set_app_settings +iis_set_dir_security +iis_set_script_map +iis_set_server_rights +iis_start_server +iis_start_service +iis_stop_server +iis_stop_service +image2wbmp +imagealphablending +imageantialias +imagearc +imagechar +imagecharup +imagecolorallocate +imagecolorallocatealpha +imagecolorat +imagecolorclosest +imagecolorclosestalpha +imagecolorclosesthwb +imagecolordeallocate +imagecolorexact +imagecolorexactalpha +imagecolormatch +imagecolorresolve +imagecolorresolvealpha +imagecolorset +imagecolorsforindex +imagecolorstotal +imagecolortransparent +imageconvolution +imagecopy +imagecopymerge +imagecopymergegray +imagecopyresampled +imagecopyresized +imagecreate +imagecreatefromgd +imagecreatefromgd2 +imagecreatefromgd2part +imagecreatefromgif +imagecreatefromjpeg +imagecreatefrompng +imagecreatefromstring +imagecreatefromwbmp +imagecreatefromxbm +imagecreatefromxpm +imagecreatetruecolor +imagedashedline +imagedestroy +imageellipse +imagefill +imagefilledarc +imagefilledellipse +imagefilledpolygon +imagefilledrectangle +imagefilltoborder +imagefilter +imagefontheight +imagefontwidth +imageftbbox +imagefttext +imagegammacorrect +imagegd +imagegd2 +imagegif +imagegrabscreen +imagegrabwindow +imageinterlace +imageistruecolor +imagejpeg +imagelayereffect +imageline +imageloadfont +imagepalettecopy +imagepng +imagepolygon +imagepsbbox +imagepsencodefont +imagepsextendfont +imagepsfreefont +imagepsloadfont +imagepsslantfont +imagepstext +imagerectangle +imagerotate +imagesavealpha +imagesetbrush +imagesetpixel +imagesetstyle +imagesetthickness +imagesettile +imagestring +imagestringup +imagesx +imagesy +imagetruecolortopalette +imagettfbbox +imagettftext +imagetypes +image_type_to_extension +image_type_to_mime_type +imagewbmp +imagexbm +imagick +imagick_adaptiveblurimage +imagick_adaptiveresizeimage +imagick_adaptivesharpenimage +imagick_adaptivethresholdimage +imagick_addimage +imagick_addnoiseimage +imagick_affinetransformimage +imagick_animateimages +imagick_annotateimage +imagick_appendimages +imagick_averageimages +imagick_blackthresholdimage +imagick_blurimage +imagick_borderimage +imagick_charcoalimage +imagick_chopimage +imagick_clear +imagick_clipimage +imagick_clippathimage +imagick_clone +imagick_clutimage +imagick_coalesceimages +imagick_colorfloodfillimage +imagick_colorizeimage +imagick_combineimages +imagick_commentimage +imagick_compareimagechannels +imagick_compareimagelayers +imagick_compareimages +imagick_compositeimage +imagick_construct +imagick_contrastimage +imagick_contraststretchimage +imagick_convolveimage +imagick_cropimage +imagick_cropthumbnailimage +imagick_current +imagick_cyclecolormapimage +imagick_decipherimage +imagick_deconstructimages +imagick_deleteimageartifact +imagick_despeckleimage +imagick_destroy +imagick_displayimage +imagick_displayimages +imagick_distortimage +imagickdraw +imagickdraw_affine +imagickdraw_annotation +imagickdraw_arc +imagickdraw_bezier +imagickdraw_circle +imagickdraw_clear +imagickdraw_clone +imagickdraw_color +imagickdraw_comment +imagickdraw_composite +imagickdraw_construct +imagickdraw_destroy +imagickdraw_ellipse +imagickdraw_getclippath +imagickdraw_getcliprule +imagickdraw_getclipunits +imagickdraw_getfillcolor +imagickdraw_getfillopacity +imagickdraw_getfillrule +imagickdraw_getfont +imagickdraw_getfontfamily +imagickdraw_getfontsize +imagickdraw_getfontstyle +imagickdraw_getfontweight +imagickdraw_getgravity +imagickdraw_getstrokeantialias +imagickdraw_getstrokecolor +imagickdraw_getstrokedasharray +imagickdraw_getstrokedashoffset +imagickdraw_getstrokelinecap +imagickdraw_getstrokelinejoin +imagickdraw_getstrokemiterlimit +imagickdraw_getstrokeopacity +imagickdraw_getstrokewidth +imagickdraw_gettextalignment +imagickdraw_gettextantialias +imagickdraw_gettextdecoration +imagickdraw_gettextencoding +imagickdraw_gettextundercolor +imagickdraw_getvectorgraphics +imagick_drawimage +imagickdraw_line +imagickdraw_matte +imagickdraw_pathclose +imagickdraw_pathcurvetoabsolute +imagickdraw_pathcurvetoquadraticbezierabsolute +imagickdraw_pathcurvetoquadraticbezierrelative +imagickdraw_pathcurvetoquadraticbeziersmoothabsolute +imagickdraw_pathcurvetoquadraticbeziersmoothrelative +imagickdraw_pathcurvetorelative +imagickdraw_pathcurvetosmoothabsolute +imagickdraw_pathcurvetosmoothrelative +imagickdraw_pathellipticarcabsolute +imagickdraw_pathellipticarcrelative +imagickdraw_pathfinish +imagickdraw_pathlinetoabsolute +imagickdraw_pathlinetohorizontalabsolute +imagickdraw_pathlinetohorizontalrelative +imagickdraw_pathlinetorelative +imagickdraw_pathlinetoverticalabsolute +imagickdraw_pathlinetoverticalrelative +imagickdraw_pathmovetoabsolute +imagickdraw_pathmovetorelative +imagickdraw_pathstart +imagickdraw_point +imagickdraw_polygon +imagickdraw_polyline +imagickdraw_pop +imagickdraw_popclippath +imagickdraw_popdefs +imagickdraw_poppattern +imagickdraw_push +imagickdraw_pushclippath +imagickdraw_pushdefs +imagickdraw_pushpattern +imagickdraw_rectangle +imagickdraw_render +imagickdraw_rotate +imagickdraw_roundrectangle +imagickdraw_scale +imagickdraw_setclippath +imagickdraw_setcliprule +imagickdraw_setclipunits +imagickdraw_setfillalpha +imagickdraw_setfillcolor +imagickdraw_setfillopacity +imagickdraw_setfillpatternurl +imagickdraw_setfillrule +imagickdraw_setfont +imagickdraw_setfontfamily +imagickdraw_setfontsize +imagickdraw_setfontstretch +imagickdraw_setfontstyle +imagickdraw_setfontweight +imagickdraw_setgravity +imagickdraw_setstrokealpha +imagickdraw_setstrokeantialias +imagickdraw_setstrokecolor +imagickdraw_setstrokedasharray +imagickdraw_setstrokedashoffset +imagickdraw_setstrokelinecap +imagickdraw_setstrokelinejoin +imagickdraw_setstrokemiterlimit +imagickdraw_setstrokeopacity +imagickdraw_setstrokepatternurl +imagickdraw_setstrokewidth +imagickdraw_settextalignment +imagickdraw_settextantialias +imagickdraw_settextdecoration +imagickdraw_settextencoding +imagickdraw_settextundercolor +imagickdraw_setvectorgraphics +imagickdraw_setviewbox +imagickdraw_skewx +imagickdraw_skewy +imagickdraw_translate +imagick_edgeimage +imagick_embossimage +imagick_encipherimage +imagick_enhanceimage +imagick_equalizeimage +imagick_evaluateimage +imagick_extentimage +imagick_flattenimages +imagick_flipimage +imagick_floodfillpaintimage +imagick_flopimage +imagick_frameimage +imagick_fximage +imagick_gammaimage +imagick_gaussianblurimage +imagick_getcolorspace +imagick_getcompression +imagick_getcompressionquality +imagick_getcopyright +imagick_getfilename +imagick_getfont +imagick_getformat +imagick_getgravity +imagick_gethomeurl +imagick_getimage +imagick_getimagealphachannel +imagick_getimageartifact +imagick_getimagebackgroundcolor +imagick_getimageblob +imagick_getimageblueprimary +imagick_getimagebordercolor +imagick_getimagechanneldepth +imagick_getimagechanneldistortion +imagick_getimagechanneldistortions +imagick_getimagechannelextrema +imagick_getimagechannelmean +imagick_getimagechannelrange +imagick_getimagechannelstatistics +imagick_getimageclipmask +imagick_getimagecolormapcolor +imagick_getimagecolors +imagick_getimagecolorspace +imagick_getimagecompose +imagick_getimagecompression +imagick_getimagecompressionquality +imagick_getimagedelay +imagick_getimagedepth +imagick_getimagedispose +imagick_getimagedistortion +imagick_getimageextrema +imagick_getimagefilename +imagick_getimageformat +imagick_getimagegamma +imagick_getimagegeometry +imagick_getimagegravity +imagick_getimagegreenprimary +imagick_getimageheight +imagick_getimagehistogram +imagick_getimageindex +imagick_getimageinterlacescheme +imagick_getimageinterpolatemethod +imagick_getimageiterations +imagick_getimagelength +imagick_getimagemagicklicense +imagick_getimagematte +imagick_getimagemattecolor +imagick_getimageorientation +imagick_getimagepage +imagick_getimagepixelcolor +imagick_getimageprofile +imagick_getimageprofiles +imagick_getimageproperties +imagick_getimageproperty +imagick_getimageredprimary +imagick_getimageregion +imagick_getimagerenderingintent +imagick_getimageresolution +imagick_getimagesblob +imagick_getimagescene +imagick_getimagesignature +imagick_getimagesize +imagick_getimagetickspersecond +imagick_getimagetotalinkdensity +imagick_getimagetype +imagick_getimageunits +imagick_getimagevirtualpixelmethod +imagick_getimagewhitepoint +imagick_getimagewidth +imagick_getinterlacescheme +imagick_getiteratorindex +imagick_getnumberimages +imagick_getoption +imagick_getpackagename +imagick_getpage +imagick_getpixeliterator +imagick_getpixelregioniterator +imagick_getpointsize +imagick_getquantumdepth +imagick_getquantumrange +imagick_getreleasedate +imagick_getresource +imagick_getresourcelimit +imagick_getsamplingfactors +imagick_getsize +imagick_getsizeoffset +imagick_getversion +imagick_hasnextimage +imagick_haspreviousimage +imagick_identifyimage +imagick_implodeimage +imagick_labelimage +imagick_levelimage +imagick_linearstretchimage +imagick_liquidrescaleimage +imagick_magnifyimage +imagick_mapimage +imagick_mattefloodfillimage +imagick_medianfilterimage +imagick_mergeimagelayers +imagick_minifyimage +imagick_modulateimage +imagick_montageimage +imagick_morphimages +imagick_mosaicimages +imagick_motionblurimage +imagick_negateimage +imagick_newimage +imagick_newpseudoimage +imagick_nextimage +imagick_normalizeimage +imagick_oilpaintimage +imagick_opaquepaintimage +imagick_optimizeimagelayers +imagick_orderedposterizeimage +imagick_paintfloodfillimage +imagick_paintopaqueimage +imagick_painttransparentimage +imagick_pingimage +imagick_pingimageblob +imagick_pingimagefile +imagickpixel +imagickpixel_clear +imagickpixel_construct +imagickpixel_destroy +imagickpixel_getcolor +imagickpixel_getcolorasstring +imagickpixel_getcolorcount +imagickpixel_getcolorvalue +imagickpixel_gethsl +imagickpixel_issimilar +imagickpixeliterator +imagickpixeliterator_clear +imagickpixeliterator_construct +imagickpixeliterator_destroy +imagickpixeliterator_getcurrentiteratorrow +imagickpixeliterator_getiteratorrow +imagickpixeliterator_getnextiteratorrow +imagickpixeliterator_getpreviousiteratorrow +imagickpixeliterator_newpixeliterator +imagickpixeliterator_newpixelregioniterator +imagickpixeliterator_resetiterator +imagickpixeliterator_setiteratorfirstrow +imagickpixeliterator_setiteratorlastrow +imagickpixeliterator_setiteratorrow +imagickpixeliterator_synciterator +imagickpixel_setcolor +imagickpixel_setcolorvalue +imagickpixel_sethsl +imagick_polaroidimage +imagick_posterizeimage +imagick_previewimages +imagick_previousimage +imagick_profileimage +imagick_quantizeimage +imagick_quantizeimages +imagick_queryfontmetrics +imagick_queryfonts +imagick_queryformats +imagick_radialblurimage +imagick_raiseimage +imagick_randomthresholdimage +imagick_readimage +imagick_readimageblob +imagick_readimagefile +imagick_recolorimage +imagick_reducenoiseimage +imagick_removeimage +imagick_removeimageprofile +imagick_render +imagick_resampleimage +imagick_resetimagepage +imagick_resizeimage +imagick_rollimage +imagick_rotateimage +imagick_roundcorners +imagick_sampleimage +imagick_scaleimage +imagick_separateimagechannel +imagick_sepiatoneimage +imagick_setbackgroundcolor +imagick_setcolorspace +imagick_setcompression +imagick_setcompressionquality +imagick_setfilename +imagick_setfirstiterator +imagick_setfont +imagick_setformat +imagick_setgravity +imagick_setimage +imagick_setimagealphachannel +imagick_setimageartifact +imagick_setimagebackgroundcolor +imagick_setimagebias +imagick_setimageblueprimary +imagick_setimagebordercolor +imagick_setimagechanneldepth +imagick_setimageclipmask +imagick_setimagecolormapcolor +imagick_setimagecolorspace +imagick_setimagecompose +imagick_setimagecompression +imagick_setimagecompressionquality +imagick_setimagedelay +imagick_setimagedepth +imagick_setimagedispose +imagick_setimageextent +imagick_setimagefilename +imagick_setimageformat +imagick_setimagegamma +imagick_setimagegravity +imagick_setimagegreenprimary +imagick_setimageindex +imagick_setimageinterlacescheme +imagick_setimageinterpolatemethod +imagick_setimageiterations +imagick_setimagematte +imagick_setimagemattecolor +imagick_setimageopacity +imagick_setimageorientation +imagick_setimagepage +imagick_setimageprofile +imagick_setimageproperty +imagick_setimageredprimary +imagick_setimagerenderingintent +imagick_setimageresolution +imagick_setimagescene +imagick_setimagetickspersecond +imagick_setimagetype +imagick_setimageunits +imagick_setimagevirtualpixelmethod +imagick_setimagewhitepoint +imagick_setinterlacescheme +imagick_setiteratorindex +imagick_setlastiterator +imagick_setoption +imagick_setpage +imagick_setpointsize +imagick_setresolution +imagick_setresourcelimit +imagick_setsamplingfactors +imagick_setsize +imagick_setsizeoffset +imagick_settype +imagick_shadeimage +imagick_shadowimage +imagick_sharpenimage +imagick_shaveimage +imagick_shearimage +imagick_sigmoidalcontrastimage +imagick_sketchimage +imagick_solarizeimage +imagick_spliceimage +imagick_spreadimage +imagick_steganoimage +imagick_stereoimage +imagick_stripimage +imagick_swirlimage +imagick_textureimage +imagick_thresholdimage +imagick_thumbnailimage +imagick_tintimage +imagick_transformimage +imagick_transparentpaintimage +imagick_transposeimage +imagick_transverseimage +imagick_trimimage +imagick_uniqueimagecolors +imagick_unsharpmaskimage +imagick_valid +imagick_vignetteimage +imagick_waveimage +imagick_whitethresholdimage +imagick_writeimage +imagick_writeimagefile +imagick_writeimages +imagick_writeimagesfile +imap_8bit +imap_alerts +imap_append +imap_base64 +imap_binary +imap_body +imap_bodystruct +imap_check +imap_clearflag_full +imap_close +imap_create +imap_createmailbox +imap_delete +imap_deletemailbox +imap_errors +imap_expunge +imap_fetchbody +imap_fetchheader +imap_fetchmime +imap_fetch_overview +imap_fetchstructure +imap_fetchtext +imap_gc +imap_getacl +imap_getmailboxes +imap_get_quota +imap_get_quotaroot +imap_getsubscribed +imap_header +imap_headerinfo +imap_headers +imap_last_error +imap_list +imap_listmailbox +imap_listscan +imap_listsubscribed +imap_lsub +imap_mail +imap_mailboxmsginfo +imap_mail_compose +imap_mail_copy +imap_mail_move +imap_mime_header_decode +imap_msgno +imap_num_msg +imap_num_recent +imap_open +imap_ping +imap_qprint +imap_rename +imap_renamemailbox +imap_reopen +imap_rfc822_parse_adrlist +imap_rfc822_parse_headers +imap_rfc822_write_address +imap_savebody +imap_scan +imap_scanmailbox +imap_search +imap_setacl +imap_setflag_full +imap_set_quota +imap_sort +imap_status +imap_subscribe +imap_thread +imap_timeout +imap_uid +imap_undelete +imap_unsubscribe +imap_utf7_decode +imap_utf7_encode +imap_utf8 +implements +implementsinterface +implode +import_request_variables +in_array +include +include_once +inclued_get_data +inet_ntop +inet_pton +infiniteiterator +ingres_autocommit +ingres_autocommit_state +ingres_charset +ingres_close +ingres_commit +ingres_connect +ingres_cursor +ingres_errno +ingres_error +ingres_errsqlstate +ingres_escape_string +ingres_execute +ingres_fetch_array +ingres_fetch_assoc +ingres_fetch_object +ingres_fetch_proc_return +ingres_fetch_row +ingres_field_length +ingres_field_name +ingres_field_nullable +ingres_field_precision +ingres_field_scale +ingres_field_type +ingres_free_result +ingres_next_error +ingres_num_fields +ingres_num_rows +ingres_pconnect +ingres_prepare +ingres_query +ingres_result_seek +ingres_rollback +ingres_set_environment +ingres_unbuffered_query +ini_alter +ini_get +ini_get_all +ini_restore +ini_set +innamespace +inotify_add_watch +inotify_init +inotify_queue_len +inotify_read +inotify_rm_watch +instanceof +interface +interface_exists +intldateformatter +intl_error_name +intl_get_error_code +intl_get_error_message +intl_is_failure +intval +invalidargumentexception +invoke +__invoke() +invokeargs +ip2long +iptcembed +iptcparse +is_a +isabstract +is_array +is_bool +is_callable +iscloneable +is_dir +isdisabled +is_double +is_executable +is_file +isfinal +is_finite +is_float +is_infinite +isinstance +isinstantiable +is_int +is_integer +isinterface +isinternal +isiterateable +is_link +is_long +is_nan +is_null +is_numeric +is_object +is_readable +is_real +is_resource +is_scalar +isset +__isset() +is_soap_fault +is_string +issubclassof +is_subclass_of +istrait +is_uploaded_file +isuserdefined +is_writable +is_writeable +iterator +iteratoraggregate +iterator_apply +iterator_count +iteratoriterator +iterator_to_array +java_last_exception_clear +java_last_exception_get +jddayofweek +jdmonthname +jdtofrench +jdtogregorian +jdtojewish +jdtojulian +jdtounix +jewishtojd +join +jpeg2wbmp +json_decode +json_encode +json_last_error +jsonserializable +judy +judy_type +judy_version +juliantojd +kadm5_chpass_principal +kadm5_create_principal +kadm5_delete_principal +kadm5_destroy +kadm5_flush +kadm5_get_policies +kadm5_get_principal +kadm5_get_principals +kadm5_init_with_password +kadm5_modify_principal +key +krsort +ksort +ktaglib_id3v2_attachedpictureframe +ktaglib_id3v2_frame +ktaglib_id3v2_tag +ktaglib_mpeg_audioproperties +ktaglib_mpeg_file +ktaglib_tag +lcfirst +lcg_value +lchgrp +lchown +ldap_8859_to_t61 +ldap_add +ldap_bind +ldap_close +ldap_compare +ldap_connect +ldap_count_entries +ldap_delete +ldap_dn2ufn +ldap_err2str +ldap_errno +ldap_error +ldap_explode_dn +ldap_first_attribute +ldap_first_entry +ldap_first_reference +ldap_free_result +ldap_get_attributes +ldap_get_dn +ldap_get_entries +ldap_get_option +ldap_get_values +ldap_get_values_len +ldap_list +ldap_mod_add +ldap_mod_del +ldap_modify +ldap_mod_replace +ldap_next_attribute +ldap_next_entry +ldap_next_reference +ldap_parse_reference +ldap_parse_result +ldap_read +ldap_rename +ldap_sasl_bind +ldap_search +ldap_set_option +ldap_set_rebind_proc +ldap_sort +ldap_start_tls +ldap_t61_to_8859 +ldap_unbind +lengthexception +levenshtein +libxml_clear_errors +libxml_disable_entity_loader +libxmlerror +libxml_get_errors +libxml_get_last_error +libxml_set_streams_context +libxml_use_internal_errors +limititerator +__LINE__ +link +linkinfo +list +locale +localeconv +localtime +log +log10 +log1p +logicexception +long2ip +lstat +ltrim +lua +luaclosure +lzf_compress +lzf_decompress +lzf_optimized_for +magic_quotes_runtime +mail +mailparse_determine_best_xfer_encoding +mailparse_msg_create +mailparse_msg_extract_part +mailparse_msg_extract_part_file +mailparse_msg_extract_whole_part_file +mailparse_msg_free +mailparse_msg_get_part +mailparse_msg_get_part_data +mailparse_msg_get_structure +mailparse_msg_parse +mailparse_msg_parse_file +mailparse_rfc822_parse_addresses +mailparse_stream_encode +mailparse_uudecode_all +main +max +maxdb_affected_rows +maxdb_autocommit +maxdb_bind_param +maxdb_bind_result +maxdb_change_user +maxdb_character_set_name +maxdb_client_encoding +maxdb_close +maxdb_close_long_data +maxdb_commit +maxdb_connect +maxdb_connect_errno +maxdb_connect_error +maxdb_data_seek +maxdb_debug +maxdb_disable_reads_from_master +maxdb_disable_rpl_parse +maxdb_dump_debug_info +maxdb_embedded_connect +maxdb_enable_reads_from_master +maxdb_enable_rpl_parse +maxdb_errno +maxdb_error +maxdb_escape_string +maxdb_execute +maxdb_fetch +maxdb_fetch_array +maxdb_fetch_assoc +maxdb_fetch_field +maxdb_fetch_field_direct +maxdb_fetch_fields +maxdb_fetch_lengths +maxdb_fetch_object +maxdb_fetch_row +maxdb_field_count +maxdb_field_seek +maxdb_field_tell +maxdb_free_result +maxdb_get_client_info +maxdb_get_client_version +maxdb_get_host_info +maxdb_get_metadata +maxdb_get_proto_info +maxdb_get_server_info +maxdb_get_server_version +maxdb_info +maxdb_init +maxdb_insert_id +maxdb_kill +maxdb_master_query +maxdb_more_results +maxdb_multi_query +maxdb_next_result +maxdb_num_fields +maxdb_num_rows +maxdb_options +maxdb_param_count +maxdb_ping +maxdb_prepare +maxdb_query +maxdb_real_connect +maxdb_real_escape_string +maxdb_real_query +maxdb_report +maxdb_rollback +maxdb_rpl_parse_enabled +maxdb_rpl_probe +maxdb_rpl_query_type +maxdb_select_db +maxdb_send_long_data +maxdb_send_query +maxdb_server_end +maxdb_server_init +maxdb_set_opt +maxdb_sqlstate +maxdb_ssl_set +maxdb_stat +maxdb_stmt_affected_rows +maxdb_stmt_bind_param +maxdb_stmt_bind_result +maxdb_stmt_close +maxdb_stmt_close_long_data +maxdb_stmt_data_seek +maxdb_stmt_errno +maxdb_stmt_error +maxdb_stmt_execute +maxdb_stmt_fetch +maxdb_stmt_free_result +maxdb_stmt_init +maxdb_stmt_num_rows +maxdb_stmt_param_count +maxdb_stmt_prepare +maxdb_stmt_reset +maxdb_stmt_result_metadata +maxdb_stmt_send_long_data +maxdb_stmt_sqlstate +maxdb_stmt_store_result +maxdb_store_result +maxdb_thread_id +maxdb_thread_safe +maxdb_use_result +maxdb_warning_count +mb_check_encoding +mb_convert_case +mb_convert_encoding +mb_convert_kana +mb_convert_variables +mb_decode_mimeheader +mb_decode_numericentity +mb_detect_encoding +mb_detect_order +mb_encode_mimeheader +mb_encode_numericentity +mb_encoding_aliases +mb_ereg +mb_eregi +mb_eregi_replace +mb_ereg_match +mb_ereg_replace +mb_ereg_search +mb_ereg_search_getpos +mb_ereg_search_getregs +mb_ereg_search_init +mb_ereg_search_pos +mb_ereg_search_regs +mb_ereg_search_setpos +mb_get_info +mb_http_input +mb_http_output +mb_internal_encoding +mb_language +mb_list_encodings +mb_output_handler +mb_parse_str +mb_preferred_mime_name +mb_regex_encoding +mb_regex_set_options +mb_send_mail +mb_split +mb_strcut +mb_strimwidth +mb_stripos +mb_stristr +mb_strlen +mb_strpos +mb_strrchr +mb_strrichr +mb_strripos +mb_strrpos +mb_strstr +mb_strtolower +mb_strtoupper +mb_strwidth +mb_substitute_character +mb_substr +mb_substr_count +m_checkstatus +m_completeauthorizations +m_connect +m_connectionerror +mcrypt_cbc +mcrypt_cfb +mcrypt_create_iv +mcrypt_decrypt +mcrypt_ecb +mcrypt_enc_get_algorithms_name +mcrypt_enc_get_block_size +mcrypt_enc_get_iv_size +mcrypt_enc_get_key_size +mcrypt_enc_get_modes_name +mcrypt_enc_get_supported_key_sizes +mcrypt_enc_is_block_algorithm +mcrypt_enc_is_block_algorithm_mode +mcrypt_enc_is_block_mode +mcrypt_encrypt +mcrypt_enc_self_test +mcrypt_generic +mcrypt_generic_deinit +mcrypt_generic_end +mcrypt_generic_init +mcrypt_get_block_size +mcrypt_get_cipher_name +mcrypt_get_iv_size +mcrypt_get_key_size +mcrypt_list_algorithms +mcrypt_list_modes +mcrypt_module_close +mcrypt_module_get_algo_block_size +mcrypt_module_get_algo_key_size +mcrypt_module_get_supported_key_sizes +mcrypt_module_is_block_algorithm +mcrypt_module_is_block_algorithm_mode +mcrypt_module_is_block_mode +mcrypt_module_open +mcrypt_module_self_test +mcrypt_ofb +md5 +md5_file +mdecrypt_generic +m_deletetrans +m_destroyconn +m_destroyengine +memcache +memcached +memcache_debug +memory_get_peak_usage +memory_get_usage +messageformatter +metaphone +__METHOD__ +method_exists +m_getcell +m_getcellbynum +m_getcommadelimited +m_getheader +mhash +mhash_count +mhash_get_block_size +mhash_get_hash_name +mhash_keygen_s2k +microtime +mime_content_type +min +ming_keypress +ming_setcubicthreshold +ming_setscale +ming_setswfcompression +ming_useconstants +ming_useswfversion +m_initconn +m_initengine +m_iscommadelimited +mkdir +mktime +m_maxconntimeout +m_monitor +m_numcolumns +m_numrows +money_format +mongo +mongobindata +mongocode +mongocollection +mongoconnectionexception +mongocursor +mongocursorexception +mongocursortimeoutexception +mongodate +mongodb +mongodbref +mongoexception +mongogridfs +mongogridfscursor +mongogridfsexception +mongogridfsfile +mongoid +mongoint32 +mongoint64 +mongolog +mongomaxkey +mongominkey +mongopool +mongoregex +mongotimestamp +move_uploaded_file +m_parsecommadelimited +mqseries_back +mqseries_begin +mqseries_close +mqseries_cmit +mqseries_conn +mqseries_connx +mqseries_disc +mqseries_get +mqseries_inq +mqseries_open +mqseries_put +mqseries_put1 +mqseries_set +mqseries_strerror +m_responsekeys +m_responseparam +m_returnstatus +msession_connect +msession_count +msession_create +msession_destroy +msession_disconnect +msession_find +msession_get +msession_get_array +msession_get_data +msession_inc +msession_list +msession_listvar +msession_lock +msession_plugin +msession_randstr +msession_set +msession_set_array +msession_set_data +msession_timeout +msession_uniq +msession_unlock +m_setblocking +m_setdropfile +m_setip +m_setssl +m_setssl_cafile +m_setssl_files +m_settimeout +msg_get_queue +msg_queue_exists +msg_receive +msg_remove_queue +msg_send +msg_set_queue +msg_stat_queue +msql +msql_affected_rows +msql_close +msql_connect +msql_createdb +msql_create_db +msql_data_seek +msql_dbname +msql_db_query +msql_drop_db +msql_error +msql_fetch_array +msql_fetch_field +msql_fetch_object +msql_fetch_row +msql_fieldflags +msql_field_flags +msql_fieldlen +msql_field_len +msql_fieldname +msql_field_name +msql_field_seek +msql_fieldtable +msql_field_table +msql_fieldtype +msql_field_type +msql_free_result +msql_list_dbs +msql_list_fields +msql_list_tables +msql_numfields +msql_num_fields +msql_numrows +msql_num_rows +msql_pconnect +msql_query +msql_regcase +msql_result +msql_select_db +msql_tablename +m_sslcert_gen_hash +mssql_bind +mssql_close +mssql_connect +mssql_data_seek +mssql_execute +mssql_fetch_array +mssql_fetch_assoc +mssql_fetch_batch +mssql_fetch_field +mssql_fetch_object +mssql_fetch_row +mssql_field_length +mssql_field_name +mssql_field_seek +mssql_field_type +mssql_free_result +mssql_free_statement +mssql_get_last_message +mssql_guid_string +mssql_init +mssql_min_error_severity +mssql_min_message_severity +mssql_next_result +mssql_num_fields +mssql_num_rows +mssql_pconnect +mssql_query +mssql_result +mssql_rows_affected +mssql_select_db +mt_getrandmax +mt_rand +m_transactionssent +m_transinqueue +m_transkeyval +m_transnew +m_transsend +mt_srand +multipleiterator +m_uwait +m_validateidentifier +m_verifyconnection +m_verifysslcert +mysql_affected_rows +mysql_client_encoding +mysql_close +mysql_connect +mysql_create_db +mysql_data_seek +mysql_db_name +mysql_db_query +mysql_drop_db +mysql_errno +mysql_error +mysql_escape_string +mysql_fetch_array +mysql_fetch_assoc +mysql_fetch_field +mysql_fetch_lengths +mysql_fetch_object +mysql_fetch_row +mysql_field_flags +mysql_field_len +mysql_field_name +mysql_field_seek +mysql_field_table +mysql_field_type +mysql_free_result +mysql_get_client_info +mysql_get_host_info +mysql_get_proto_info +mysql_get_server_info +mysqli +mysqli_bind_param +mysqli_bind_result +mysqli_client_encoding +mysqli_connect +mysqli_disable_reads_from_master +mysqli_disable_rpl_parse +mysqli_driver +mysqli_enable_reads_from_master +mysqli_enable_rpl_parse +mysqli_escape_string +mysqli_execute +mysqli_fetch +mysqli_get_metadata +mysqli_master_query +mysql_info +mysql_insert_id +mysqli_param_count +mysqli_report +mysqli_result +mysqli_rpl_parse_enabled +mysqli_rpl_probe +mysqli_rpl_query_type +mysqli_send_long_data +mysqli_send_query +mysqli_set_opt +mysqli_slave_query +mysqli_stmt +mysqli_warning +mysql_list_dbs +mysql_list_fields +mysql_list_processes +mysql_list_tables +mysqlnd_ms_get_stats +mysqlnd_ms_query_is_select +mysqlnd_ms_set_user_pick_server +mysqlnd_qc_change_handler +mysqlnd_qc_clear_cache +mysqlnd_qc_get_cache_info +mysqlnd_qc_get_core_stats +mysqlnd_qc_get_handler +mysqlnd_qc_get_query_trace_log +mysqlnd_qc_set_user_handlers +mysql_num_fields +mysql_num_rows +mysql_pconnect +mysql_ping +mysql_query +mysql_real_escape_string +mysql_result +mysql_select_db +mysql_set_charset +mysql_stat +mysql_tablename +mysql_thread_id +mysql_unbuffered_query +namespace +__NAMESPACE__ +natcasesort +natsort +ncurses_addch +ncurses_addchnstr +ncurses_addchstr +ncurses_addnstr +ncurses_addstr +ncurses_assume_default_colors +ncurses_attroff +ncurses_attron +ncurses_attrset +ncurses_baudrate +ncurses_beep +ncurses_bkgd +ncurses_bkgdset +ncurses_border +ncurses_bottom_panel +ncurses_can_change_color +ncurses_cbreak +ncurses_clear +ncurses_clrtobot +ncurses_clrtoeol +ncurses_color_content +ncurses_color_set +ncurses_curs_set +ncurses_define_key +ncurses_def_prog_mode +ncurses_def_shell_mode +ncurses_delay_output +ncurses_delch +ncurses_deleteln +ncurses_del_panel +ncurses_delwin +ncurses_doupdate +ncurses_echo +ncurses_echochar +ncurses_end +ncurses_erase +ncurses_erasechar +ncurses_filter +ncurses_flash +ncurses_flushinp +ncurses_getch +ncurses_getmaxyx +ncurses_getmouse +ncurses_getyx +ncurses_halfdelay +ncurses_has_colors +ncurses_has_ic +ncurses_has_il +ncurses_has_key +ncurses_hide_panel +ncurses_hline +ncurses_inch +ncurses_init +ncurses_init_color +ncurses_init_pair +ncurses_insch +ncurses_insdelln +ncurses_insertln +ncurses_insstr +ncurses_instr +ncurses_isendwin +ncurses_keyok +ncurses_keypad +ncurses_killchar +ncurses_longname +ncurses_meta +ncurses_mouseinterval +ncurses_mousemask +ncurses_mouse_trafo +ncurses_move +ncurses_move_panel +ncurses_mvaddch +ncurses_mvaddchnstr +ncurses_mvaddchstr +ncurses_mvaddnstr +ncurses_mvaddstr +ncurses_mvcur +ncurses_mvdelch +ncurses_mvgetch +ncurses_mvhline +ncurses_mvinch +ncurses_mvvline +ncurses_mvwaddstr +ncurses_napms +ncurses_newpad +ncurses_new_panel +ncurses_newwin +ncurses_nl +ncurses_nocbreak +ncurses_noecho +ncurses_nonl +ncurses_noqiflush +ncurses_noraw +ncurses_pair_content +ncurses_panel_above +ncurses_panel_below +ncurses_panel_window +ncurses_pnoutrefresh +ncurses_prefresh +ncurses_putp +ncurses_qiflush +ncurses_raw +ncurses_refresh +ncurses_replace_panel +ncurses_reset_prog_mode +ncurses_reset_shell_mode +ncurses_resetty +ncurses_savetty +ncurses_scr_dump +ncurses_scr_init +ncurses_scrl +ncurses_scr_restore +ncurses_scr_set +ncurses_show_panel +ncurses_slk_attr +ncurses_slk_attroff +ncurses_slk_attron +ncurses_slk_attrset +ncurses_slk_clear +ncurses_slk_color +ncurses_slk_init +ncurses_slk_noutrefresh +ncurses_slk_refresh +ncurses_slk_restore +ncurses_slk_set +ncurses_slk_touch +ncurses_standend +ncurses_standout +ncurses_start_color +ncurses_termattrs +ncurses_termname +ncurses_timeout +ncurses_top_panel +ncurses_typeahead +ncurses_ungetch +ncurses_ungetmouse +ncurses_update_panels +ncurses_use_default_colors +ncurses_use_env +ncurses_use_extended_names +ncurses_vidattr +ncurses_vline +ncurses_waddch +ncurses_waddstr +ncurses_wattroff +ncurses_wattron +ncurses_wattrset +ncurses_wborder +ncurses_wclear +ncurses_wcolor_set +ncurses_werase +ncurses_wgetch +ncurses_whline +ncurses_wmouse_trafo +ncurses_wmove +ncurses_wnoutrefresh +ncurses_wrefresh +ncurses_wstandend +ncurses_wstandout +ncurses_wvline +new +newinstance +newinstanceargs +newinstancewithoutconstructor +newt_bell +newt_button +newt_button_bar +newt_centered_window +newt_checkbox +newt_checkbox_get_value +newt_checkbox_set_flags +newt_checkbox_set_value +newt_checkbox_tree +newt_checkbox_tree_add_item +newt_checkbox_tree_find_item +newt_checkbox_tree_get_current +newt_checkbox_tree_get_entry_value +newt_checkbox_tree_get_multi_selection +newt_checkbox_tree_get_selection +newt_checkbox_tree_multi +newt_checkbox_tree_set_current +newt_checkbox_tree_set_entry +newt_checkbox_tree_set_entry_value +newt_checkbox_tree_set_width +newt_clear_key_buffer +newt_cls +newt_compact_button +newt_component_add_callback +newt_component_takes_focus +newt_create_grid +newt_cursor_off +newt_cursor_on +newt_delay +newt_draw_form +newt_draw_root_text +newt_entry +newt_entry_get_value +newt_entry_set +newt_entry_set_filter +newt_entry_set_flags +newt_finished +newt_form +newt_form_add_component +newt_form_add_components +newt_form_add_hot_key +newt_form_destroy +newt_form_get_current +newt_form_run +newt_form_set_background +newt_form_set_height +newt_form_set_size +newt_form_set_timer +newt_form_set_width +newt_form_watch_fd +newt_get_screen_size +newt_grid_add_components_to_form +newt_grid_basic_window +newt_grid_free +newt_grid_get_size +newt_grid_h_close_stacked +newt_grid_h_stacked +newt_grid_place +newt_grid_set_field +newt_grid_simple_window +newt_grid_v_close_stacked +newt_grid_v_stacked +newt_grid_wrapped_window +newt_grid_wrapped_window_at +newt_init +newt_label +newt_label_set_text +newt_listbox +newt_listbox_append_entry +newt_listbox_clear +newt_listbox_clear_selection +newt_listbox_delete_entry +newt_listbox_get_current +newt_listbox_get_selection +newt_listbox_insert_entry +newt_listbox_item_count +newt_listbox_select_item +newt_listbox_set_current +newt_listbox_set_current_by_key +newt_listbox_set_data +newt_listbox_set_entry +newt_listbox_set_width +newt_listitem +newt_listitem_get_data +newt_listitem_set +newt_open_window +newt_pop_help_line +newt_pop_window +newt_push_help_line +newt_radiobutton +newt_radio_get_current +newt_redraw_help_line +newt_reflow_text +newt_refresh +newt_resize_screen +newt_resume +newt_run_form +newt_scale +newt_scale_set +newt_scrollbar_set +newt_set_help_callback +newt_set_suspend_callback +newt_suspend +newt_textbox +newt_textbox_get_num_lines +newt_textbox_reflowed +newt_textbox_set_height +newt_textbox_set_text +newt_vertical_scrollbar +newt_wait_for_key +newt_win_choice +newt_win_entries +newt_win_menu +newt_win_message +newt_win_messagev +newt_win_ternary +next +ngettext +nl2br +nl_langinfo +norewinditerator +normalizer +notes_body +notes_copy_db +notes_create_db +notes_create_note +notes_drop_db +notes_find_note +notes_header_info +notes_list_msgs +notes_mark_read +notes_mark_unread +notes_nav_create +notes_search +notes_unread +notes_version +nsapi_request_headers +nsapi_response_headers +nsapi_virtual +nthmac +number_format +numberformatter +oauth +oauthexception +oauth_get_sbs +oauthprovider +oauth_urlencode +ob_clean +ob_deflatehandler +ob_end_clean +ob_end_flush +ob_etaghandler +ob_flush +ob_get_clean +ob_get_contents +ob_get_flush +ob_get_length +ob_get_level +ob_get_status +ob_gzhandler +ob_iconv_handler +ob_implicit_flush +ob_inflatehandler +ob_list_handlers +ob_start +ob_tidyhandler +oci_bind_array_by_name +ocibindbyname +oci_bind_by_name +ocicancel +oci_cancel +oci_client_version +oci_close +ocicloselob +ocicollappend +ocicollassign +ocicollassignelem +oci_collection_append +oci_collection_assign +oci_collection_element_assign +oci_collection_element_get +oci_collection_free +oci_collection_max +oci_collection_size +oci_collection_trim +ocicollgetelem +ocicollmax +ocicollsize +ocicolltrim +ocicolumnisnull +ocicolumnname +ocicolumnprecision +ocicolumnscale +ocicolumnsize +ocicolumntype +ocicolumntyperaw +ocicommit +oci_commit +oci_connect +ocidefinebyname +oci_define_by_name +ocierror +oci_error +ociexecute +oci_execute +ocifetch +oci_fetch +oci_fetch_all +oci_fetch_array +oci_fetch_assoc +ocifetchinto +oci_fetch_object +oci_fetch_row +ocifetchstatement +oci_field_is_null +oci_field_name +oci_field_precision +oci_field_scale +oci_field_size +oci_field_type +oci_field_type_raw +ocifreecollection +ocifreecursor +ocifreedesc +ocifreestatement +oci_free_statement +ociinternaldebug +oci_internal_debug +ociloadlob +oci_lob_append +oci_lob_close +oci_lob_copy +oci_lob_eof +oci_lob_erase +oci_lob_export +oci_lob_flush +oci_lob_free +oci_lob_getbuffering +oci_lob_import +oci_lob_is_equal +oci_lob_load +oci_lob_read +oci_lob_rewind +oci_lob_save +oci_lob_savefile +oci_lob_seek +oci_lob_setbuffering +oci_lob_size +oci_lob_tell +oci_lob_truncate +oci_lob_write +oci_lob_writetemporary +oci_lob_writetofile +ocilogoff +ocilogon +ocinewcollection +oci_new_collection +oci_new_connect +ocinewcursor +oci_new_cursor +ocinewdescriptor +oci_new_descriptor +ocinlogon +ocinumcols +oci_num_fields +oci_num_rows +ociparse +oci_parse +oci_password_change +oci_pconnect +ociplogon +ociresult +oci_result +ocirollback +oci_rollback +ocirowcount +ocisavelob +ocisavelobfile +ociserverversion +oci_server_version +oci_set_action +oci_set_client_identifier +oci_set_client_info +oci_set_edition +oci_set_module_name +ocisetprefetch +oci_set_prefetch +ocistatementtype +oci_statement_type +ociwritelobtofile +ociwritetemporarylob +octdec +odbc_autocommit +odbc_binmode +odbc_close +odbc_close_all +odbc_columnprivileges +odbc_columns +odbc_commit +odbc_connect +odbc_cursor +odbc_data_source +odbc_do +odbc_error +odbc_errormsg +odbc_exec +odbc_execute +odbc_fetch_array +odbc_fetch_into +odbc_fetch_object +odbc_fetch_row +odbc_field_len +odbc_field_name +odbc_field_num +odbc_field_precision +odbc_field_scale +odbc_field_type +odbc_foreignkeys +odbc_free_result +odbc_gettypeinfo +odbc_longreadlen +odbc_next_result +odbc_num_fields +odbc_num_rows +odbc_pconnect +odbc_prepare +odbc_primarykeys +odbc_procedurecolumns +odbc_procedures +odbc_result +odbc_result_all +odbc_rollback +odbc_setoption +odbc_specialcolumns +odbc_statistics +odbc_tableprivileges +odbc_tables +old_function +openal_buffer_create +openal_buffer_data +openal_buffer_destroy +openal_buffer_get +openal_buffer_loadwav +openal_context_create +openal_context_current +openal_context_destroy +openal_context_process +openal_context_suspend +openal_device_close +openal_device_open +openal_listener_get +openal_listener_set +openal_source_create +openal_source_destroy +openal_source_get +openal_source_pause +openal_source_play +openal_source_rewind +openal_source_set +openal_source_stop +openal_stream +opendir +openlog +openssl_cipher_iv_length +openssl_csr_export +openssl_csr_export_to_file +openssl_csr_get_public_key +openssl_csr_get_subject +openssl_csr_new +openssl_csr_sign +openssl_decrypt +openssl_dh_compute_key +openssl_digest +openssl_encrypt +openssl_error_string +openssl_free_key +openssl_get_cipher_methods +openssl_get_md_methods +openssl_get_privatekey +openssl_get_publickey +openssl_open +openssl_pkcs12_export +openssl_pkcs12_export_to_file +openssl_pkcs12_read +openssl_pkcs7_decrypt +openssl_pkcs7_encrypt +openssl_pkcs7_sign +openssl_pkcs7_verify +openssl_pkey_export +openssl_pkey_export_to_file +openssl_pkey_free +openssl_pkey_get_details +openssl_pkey_get_private +openssl_pkey_get_public +openssl_pkey_new +openssl_private_decrypt +openssl_private_encrypt +openssl_public_decrypt +openssl_public_encrypt +openssl_random_pseudo_bytes +openssl_seal +openssl_sign +openssl_verify +openssl_x509_check_private_key +openssl_x509_checkpurpose +openssl_x509_export +openssl_x509_export_to_file +openssl_x509_free +openssl_x509_parse +openssl_x509_read +or +ord +outeriterator +outofboundsexception +outofrangeexception +output_add_rewrite_var +output_reset_rewrite_vars +overflowexception +overload +override_function +ovrimos_close +ovrimos_commit +ovrimos_connect +ovrimos_cursor +ovrimos_exec +ovrimos_execute +ovrimos_fetch_into +ovrimos_fetch_row +ovrimos_field_len +ovrimos_field_name +ovrimos_field_num +ovrimos_field_type +ovrimos_free_result +ovrimos_longreadlen +ovrimos_num_fields +ovrimos_num_rows +ovrimos_prepare +ovrimos_result +ovrimos_result_all +ovrimos_rollback +pack +parentiterator +parse_ini_file +parse_ini_string +parsekit_compile_file +parsekit_compile_string +parsekit_func_arginfo +parse_str +parse_url +passthru +pathinfo +pclose +pcntl_alarm +pcntl_exec +pcntl_fork +pcntl_getpriority +pcntl_setpriority +pcntl_signal +pcntl_signal_dispatch +pcntl_sigprocmask +pcntl_sigtimedwait +pcntl_sigwaitinfo +pcntl_wait +pcntl_waitpid +pcntl_wexitstatus +pcntl_wifexited +pcntl_wifsignaled +pcntl_wifstopped +pcntl_wstopsig +pcntl_wtermsig +pdf_activate_item +pdf_add_annotation +pdf_add_bookmark +pdf_add_launchlink +pdf_add_locallink +pdf_add_nameddest +pdf_add_note +pdf_add_outline +pdf_add_pdflink +pdf_add_table_cell +pdf_add_textflow +pdf_add_thumbnail +pdf_add_weblink +pdf_arc +pdf_arcn +pdf_attach_file +pdf_begin_document +pdf_begin_font +pdf_begin_glyph +pdf_begin_item +pdf_begin_layer +pdf_begin_page +pdf_begin_page_ext +pdf_begin_pattern +pdf_begin_template +pdf_begin_template_ext +pdf_circle +pdf_clip +pdf_close +pdf_close_image +pdf_closepath +pdf_closepath_fill_stroke +pdf_closepath_stroke +pdf_close_pdi +pdf_close_pdi_page +pdf_concat +pdf_continue_text +pdf_create_3dview +pdf_create_action +pdf_create_annotation +pdf_create_bookmark +pdf_create_field +pdf_create_fieldgroup +pdf_create_gstate +pdf_create_pvf +pdf_create_textflow +pdf_curveto +pdf_define_layer +pdf_delete +pdf_delete_pvf +pdf_delete_table +pdf_delete_textflow +pdf_encoding_set_char +pdf_end_document +pdf_end_font +pdf_end_glyph +pdf_end_item +pdf_end_layer +pdf_end_page +pdf_end_page_ext +pdf_endpath +pdf_end_pattern +pdf_end_template +pdf_fill +pdf_fill_imageblock +pdf_fill_pdfblock +pdf_fill_stroke +pdf_fill_textblock +pdf_findfont +pdf_fit_image +pdf_fit_pdi_page +pdf_fit_table +pdf_fit_textflow +pdf_fit_textline +pdf_get_apiname +pdf_get_buffer +pdf_get_errmsg +pdf_get_errnum +pdf_get_font +pdf_get_fontname +pdf_get_fontsize +pdf_get_image_height +pdf_get_image_width +pdf_get_majorversion +pdf_get_minorversion +pdf_get_parameter +pdf_get_pdi_parameter +pdf_get_pdi_value +pdf_get_value +pdf_info_font +pdf_info_matchbox +pdf_info_table +pdf_info_textflow +pdf_info_textline +pdf_initgraphics +pdf_lineto +pdf_load_3ddata +pdf_load_font +pdf_load_iccprofile +pdf_load_image +pdf_makespotcolor +pdf_moveto +pdf_new +pdf_open_ccitt +pdf_open_file +pdf_open_gif +pdf_open_image +pdf_open_image_file +pdf_open_jpeg +pdf_open_memory_image +pdf_open_pdi +pdf_open_pdi_document +pdf_open_pdi_page +pdf_open_tiff +pdf_pcos_get_number +pdf_pcos_get_stream +pdf_pcos_get_string +pdf_place_image +pdf_place_pdi_page +pdf_process_pdi +pdf_rect +pdf_restore +pdf_resume_page +pdf_rotate +pdf_save +pdf_scale +pdf_set_border_color +pdf_set_border_dash +pdf_set_border_style +pdf_set_char_spacing +pdf_setcolor +pdf_setdash +pdf_setdashpattern +pdf_set_duration +pdf_setflat +pdf_setfont +pdf_setgray +pdf_setgray_fill +pdf_setgray_stroke +pdf_set_gstate +pdf_set_horiz_scaling +pdf_set_info +pdf_set_info_author +pdf_set_info_creator +pdf_set_info_keywords +pdf_set_info_subject +pdf_set_info_title +pdf_set_layer_dependency +pdf_set_leading +pdf_setlinecap +pdf_setlinejoin +pdf_setlinewidth +pdf_setmatrix +pdf_setmiterlimit +pdf_set_parameter +pdf_setpolydash +pdf_setrgbcolor +pdf_setrgbcolor_fill +pdf_setrgbcolor_stroke +pdf_set_text_matrix +pdf_set_text_pos +pdf_set_text_rendering +pdf_set_text_rise +pdf_set_value +pdf_set_word_spacing +pdf_shading +pdf_shading_pattern +pdf_shfill +pdf_show +pdf_show_boxed +pdf_show_xy +pdf_skew +pdf_stringwidth +pdf_stroke +pdf_suspend_page +pdf_translate +pdf_utf16_to_utf8 +pdf_utf32_to_utf16 +pdf_utf8_to_utf16 +pdo +pdo_cubrid_schema +pdoexception +pdo_pgsqllobcreate +pdo_pgsqllobopen +pdo_pgsqllobunlink +pdo_sqlitecreateaggregate +pdo_sqlitecreatefunction +pdostatement +pfsockopen +pg_affected_rows +pg_cancel_query +pg_client_encoding +pg_close +pg_connect +pg_connection_busy +pg_connection_reset +pg_connection_status +pg_convert +pg_copy_from +pg_copy_to +pg_dbname +pg_delete +pg_end_copy +pg_escape_bytea +pg_escape_string +pg_execute +pg_fetch_all +pg_fetch_all_columns +pg_fetch_array +pg_fetch_assoc +pg_fetch_object +pg_fetch_result +pg_fetch_row +pg_field_is_null +pg_field_name +pg_field_num +pg_field_prtlen +pg_field_size +pg_field_table +pg_field_type +pg_field_type_oid +pg_free_result +pg_get_notify +pg_get_pid +pg_get_result +pg_host +pg_insert +pg_last_error +pg_last_notice +pg_last_oid +pg_lo_close +pg_lo_create +pg_lo_export +pg_lo_import +pg_lo_open +pg_lo_read +pg_lo_read_all +pg_lo_seek +pg_lo_tell +pg_lo_unlink +pg_lo_write +pg_meta_data +pg_num_fields +pg_num_rows +pg_options +pg_parameter_status +pg_pconnect +pg_ping +pg_port +pg_prepare +pg_put_line +pg_query +pg_query_params +pg_result_error +pg_result_error_field +pg_result_seek +pg_result_status +pg_select +pg_send_execute +pg_send_prepare +pg_send_query +pg_send_query_params +pg_set_client_encoding +pg_set_error_verbosity +pg_trace +pg_transaction_status +pg_tty +pg_unescape_bytea +pg_untrace +pg_update +pg_version +Phar +PharData +PharException +PharFileInfo +php_check_syntax +phpcredits +phpinfo +php_ini_loaded_file +php_ini_scanned_files +php_logo_guid +php_sapi_name +php_strip_whitespace +php_uname +phpversion +pi +png2wbmp +popen +pos +posix_access +posix_ctermid +posix_errno +posix_getcwd +posix_getegid +posix_geteuid +posix_getgid +posix_getgrgid +posix_getgrnam +posix_getgroups +posix_get_last_error +posix_getlogin +posix_getpgid +posix_getpgrp +posix_getpid +posix_getppid +posix_getpwnam +posix_getpwuid +posix_getrlimit +posix_getsid +posix_getuid +posix_initgroups +posix_isatty +posix_kill +posix_mkfifo +posix_mknod +posix_setegid +posix_seteuid +posix_setgid +posix_setpgid +posix_setsid +posix_setuid +posix_strerror +posix_times +posix_ttyname +posix_uname +pow +preg_filter +preg_grep +preg_last_error +preg_match +preg_match_all +preg_quote +preg_replace +preg_replace_callback +preg_split +prev +print +printer_abort +printer_close +printer_create_brush +printer_create_dc +printer_create_font +printer_create_pen +printer_delete_brush +printer_delete_dc +printer_delete_font +printer_delete_pen +printer_draw_bmp +printer_draw_chord +printer_draw_elipse +printer_draw_line +printer_draw_pie +printer_draw_rectangle +printer_draw_roundrect +printer_draw_text +printer_end_doc +printer_end_page +printer_get_option +printer_list +printer_logical_fontheight +printer_open +printer_select_brush +printer_select_font +printer_select_pen +printer_set_option +printer_start_doc +printer_start_page +printer_write +printf +print_r +private +proc_close +proc_get_status +proc_nice +proc_open +proc_terminate +property_exists +protected +ps_add_bookmark +ps_add_launchlink +ps_add_locallink +ps_add_note +ps_add_pdflink +ps_add_weblink +ps_arc +ps_arcn +ps_begin_page +ps_begin_pattern +ps_begin_template +ps_circle +ps_clip +ps_close +ps_close_image +ps_closepath +ps_closepath_stroke +ps_continue_text +ps_curveto +ps_delete +ps_end_page +ps_end_pattern +ps_end_template +ps_fill +ps_fill_stroke +ps_findfont +ps_get_buffer +ps_get_parameter +ps_get_value +ps_hyphenate +ps_include_file +ps_lineto +ps_makespotcolor +ps_moveto +ps_new +ps_open_file +ps_open_image +ps_open_image_file +ps_open_memory_image +pspell_add_to_personal +pspell_add_to_session +pspell_check +pspell_clear_session +pspell_config_create +pspell_config_data_dir +pspell_config_dict_dir +pspell_config_ignore +pspell_config_mode +pspell_config_personal +pspell_config_repl +pspell_config_runtogether +pspell_config_save_repl +pspell_new +pspell_new_config +pspell_new_personal +pspell_save_wordlist +pspell_store_replacement +pspell_suggest +ps_place_image +ps_rect +ps_restore +ps_rotate +ps_save +ps_scale +ps_set_border_color +ps_set_border_dash +ps_set_border_style +ps_setcolor +ps_setdash +ps_setflat +ps_setfont +ps_setgray +ps_set_info +ps_setlinecap +ps_setlinejoin +ps_setlinewidth +ps_setmiterlimit +ps_setoverprintmode +ps_set_parameter +ps_setpolydash +ps_set_text_pos +ps_set_value +ps_shading +ps_shading_pattern +ps_shfill +ps_show +ps_show2 +ps_show_boxed +ps_show_xy +ps_show_xy2 +ps_string_geometry +ps_stringwidth +ps_stroke +ps_symbol +ps_symbol_name +ps_symbol_width +ps_translate +public +putenv +px_close +px_create_fp +px_date2string +px_delete +px_delete_record +px_get_field +px_get_info +px_get_parameter +px_get_record +px_get_schema +px_get_value +px_insert_record +px_new +px_numfields +px_numrecords +px_open_fp +px_put_record +px_retrieve_record +px_set_blob_file +px_set_parameter +px_set_tablename +px_set_targetencoding +px_set_value +px_timestamp2string +px_update_record +qdom_error +qdom_tree +quickhashinthash +quickhashintset +quickhashintstringhash +quickhashstringinthash +quoted_printable_decode +quoted_printable_encode +quotemeta +rad2deg +radius_acct_open +radius_add_server +radius_auth_open +radius_close +radius_config +radius_create_request +radius_cvt_addr +radius_cvt_int +radius_cvt_string +radius_demangle +radius_demangle_mppe_key +radius_get_attr +radius_get_vendor_attr +radius_put_addr +radius_put_attr +radius_put_int +radius_put_string +radius_put_vendor_addr +radius_put_vendor_attr +radius_put_vendor_int +radius_put_vendor_string +radius_request_authenticator +radius_send_request +radius_server_secret +radius_strerror +rand +range +rangeexception +rararchive +rarentry +rarexception +rar_wrapper_cache_stats +rawurldecode +rawurlencode +readdir +read_exif_data +readfile +readgzfile +readline +readline_add_history +readline_callback_handler_install +readline_callback_handler_remove +readline_callback_read_char +readline_clear_history +readline_completion_function +readline_info +readline_list_history +readline_on_new_line +readline_read_history +readline_redisplay +readline_write_history +readlink +realpath +realpath_cache_get +realpath_cache_size +recode +recode_file +recode_string +recursivearrayiterator +recursivecachingiterator +recursivecallbackfilteriterator +recursivedirectoryiterator +recursivefilteriterator +recursiveiterator +recursiveiteratoriterator +recursiveregexiterator +recursivetreeiterator +reflection +reflectionclass +reflectionexception +reflectionextension +reflectionfunction +reflectionfunctionabstract +reflectionmethod +reflectionobject +reflectionparameter +reflectionproperty +reflector +regexiterator +register_shutdown_function +register_tick_function +rename +rename_function +require +require_once +reset +resetValue +resourcebundle +restore_error_handler +restore_exception_handler +restore_include_path +return +rewind +rewinddir +rmdir +round +rpm_close +rpm_get_tag +rpm_is_valid +rpm_open +rpm_version +rrd_create +rrdcreator +rrd_error +rrd_fetch +rrd_first +rrdgraph +rrd_graph +rrd_info +rrd_last +rrd_lastupdate +rrd_restore +rrd_tune +rrd_update +rrdupdater +rrd_version +rrd_xport +rsort +rtrim +runkit_class_adopt +runkit_class_emancipate +runkit_constant_add +runkit_constant_redefine +runkit_constant_remove +runkit_function_add +runkit_function_copy +runkit_function_redefine +runkit_function_remove +runkit_function_rename +runkit_import +runkit_lint +runkit_lint_file +runkit_method_add +runkit_method_copy +runkit_method_redefine +runkit_method_remove +runkit_method_rename +runkit_return_value_used +runkit_sandbox_output_handler +runkit_superglobals +runtimeexception +samconnection_commit +samconnection_connect +samconnection_constructor +samconnection_disconnect +samconnection_errno +samconnection_error +samconnection_isconnected +samconnection_peek +samconnection_peekall +samconnection_receive +samconnection_remove +samconnection_rollback +samconnection_send +samconnection_setDebug +samconnection_subscribe +samconnection_unsubscribe +sammessage_body +sammessage_constructor +sammessage_header +sca_createdataobject +sca_getservice +sca_localproxy_createdataobject +scandir +sca_soapproxy_createdataobject +sdo_das_changesummary_beginlogging +sdo_das_changesummary_endlogging +sdo_das_changesummary_getchangeddataobjects +sdo_das_changesummary_getchangetype +sdo_das_changesummary_getoldcontainer +sdo_das_changesummary_getoldvalues +sdo_das_changesummary_islogging +sdo_das_datafactory_addpropertytotype +sdo_das_datafactory_addtype +sdo_das_datafactory_getdatafactory +sdo_das_dataobject_getchangesummary +sdo_das_relational_applychanges +sdo_das_relational_construct +sdo_das_relational_createrootdataobject +sdo_das_relational_executepreparedquery +sdo_das_relational_executequery +sdo_das_setting_getlistindex +sdo_das_setting_getpropertyindex +sdo_das_setting_getpropertyname +sdo_das_setting_getvalue +sdo_das_setting_isset +sdo_das_xml_addtypes +sdo_das_xml_create +sdo_das_xml_createdataobject +sdo_das_xml_createdocument +sdo_das_xml_document_getrootdataobject +sdo_das_xml_document_getrootelementname +sdo_das_xml_document_getrootelementuri +sdo_das_xml_document_setencoding +sdo_das_xml_document_setxmldeclaration +sdo_das_xml_document_setxmlversion +sdo_das_xml_loadfile +sdo_das_xml_loadstring +sdo_das_xml_savefile +sdo_das_xml_savestring +sdo_datafactory_create +sdo_dataobject_clear +sdo_dataobject_createdataobject +sdo_dataobject_getcontainer +sdo_dataobject_getsequence +sdo_dataobject_gettypename +sdo_dataobject_gettypenamespaceuri +sdo_exception_getcause +sdo_list_insert +sdo_model_property_getcontainingtype +sdo_model_property_getdefault +sdo_model_property_getname +sdo_model_property_gettype +sdo_model_property_iscontainment +sdo_model_property_ismany +sdo_model_reflectiondataobject_construct +sdo_model_reflectiondataobject_export +sdo_model_reflectiondataobject_getcontainmentproperty +sdo_model_reflectiondataobject_getinstanceproperties +sdo_model_reflectiondataobject_gettype +sdo_model_type_getbasetype +sdo_model_type_getname +sdo_model_type_getnamespaceuri +sdo_model_type_getproperties +sdo_model_type_getproperty +sdo_model_type_isabstracttype +sdo_model_type_isdatatype +sdo_model_type_isinstance +sdo_model_type_isopentype +sdo_model_type_issequencedtype +sdo_sequence_getproperty +sdo_sequence_insert +sdo_sequence_move +seekableiterator +sem_acquire +sem_get +sem_release +sem_remove +serializable +serialize +session_cache_expire +session_cache_limiter +session_commit +session_decode +session_destroy +session_encode +session_get_cookie_params +session_id +session_is_registered +session_module_name +session_name +session_pgsql_add_error +session_pgsql_get_error +session_pgsql_get_field +session_pgsql_reset +session_pgsql_set_field +session_pgsql_status +session_regenerate_id +session_register +session_save_path +session_set_cookie_params +session_set_save_handler +session_start +session_unregister +session_unset +session_write_close +__set() +setcookie +setCounterClass +set_error_handler +set_exception_handler +set_file_buffer +set_include_path +setlocale +set_magic_quotes_runtime +setproctitle +setrawcookie +set_socket_blocking +__set_state() +setstaticpropertyvalue +setthreadtitle +set_time_limit +settype +sha1 +sha1_file +shell_exec +shm_attach +shm_detach +shm_get_var +shm_has_var +shmop_close +shmop_delete +shmop_open +shmop_read +shmop_size +shmop_write +shm_put_var +shm_remove +shm_remove_var +show_source +shuffle +signeurlpaiement +similar_text +simplexmlelement +simplexml_import_dom +simplexmliterator +simplexml_load_file +simplexml_load_string +sin +sinh +sizeof +sleep +__sleep() +snmp +snmp2_get +snmp2_getnext +snmp2_real_walk +snmp2_set +snmp2_walk +snmp3_get +snmp3_getnext +snmp3_real_walk +snmp3_set +snmp3_walk +snmpexception +snmpget +snmpgetnext +snmp_get_quick_print +snmp_get_valueretrieval +snmp_read_mib +snmprealwalk +snmpset +snmp_set_enum_print +snmp_set_oid_numeric_print +snmp_set_oid_output_format +snmp_set_quick_print +snmp_set_valueretrieval +snmpwalk +snmpwalkoid +soapclient +soapfault +soapheader +soapparam +soapserver +soapvar +socket_accept +socket_bind +socket_clear_error +socket_close +socket_connect +socket_create +socket_create_listen +socket_create_pair +socket_get_option +socket_getpeername +socket_getsockname +socket_get_status +socket_last_error +socket_listen +socket_read +socket_recv +socket_recvfrom +socket_select +socket_send +socket_sendto +socket_set_block +socket_set_blocking +socket_set_nonblock +socket_set_option +socket_set_timeout +socket_shutdown +socket_strerror +socket_write +solrclient +solrclientexception +solrdocument +solrdocumentfield +solrexception +solrgenericresponse +solr_get_version +solrillegalargumentexception +solrillegaloperationexception +solrinputdocument +solrmodifiableparams +solrobject +solrparams +solrpingresponse +solrquery +solrqueryresponse +solrresponse +solrupdateresponse +solrutils +sort +soundex +sphinxclient +spl_autoload +spl_autoload_call +spl_autoload_extensions +spl_autoload_functions +spl_autoload_register +spl_autoload_unregister +splbool +spl_classes +spldoublylinkedlist +splenum +splfileinfo +splfileobject +splfixedarray +splfloat +splheap +splint +split +spliti +splmaxheap +splminheap +spl_object_hash +splobjectstorage +splobserver +splpriorityqueue +splqueue +splstack +splstring +splsubject +spltempfileobject +spltype +spoofchecker +sprintf +sqlite3 +sqlite3result +sqlite3stmt +sqlite_array_query +sqlite_busy_timeout +sqlite_changes +sqlite_close +sqlite_column +sqlite_create_aggregate +sqlite_create_function +sqlite_current +sqlite_error_string +sqlite_escape_string +sqlite_exec +sqlite_factory +sqlite_fetch_all +sqlite_fetch_array +sqlite_fetch_column_types +sqlite_fetch_object +sqlite_fetch_single +sqlite_fetch_string +sqlite_field_name +sqlite_has_more +sqlite_has_prev +sqlite_key +sqlite_last_error +sqlite_last_insert_rowid +sqlite_libencoding +sqlite_libversion +sqlite_next +sqlite_num_fields +sqlite_num_rows +sqlite_open +sqlite_popen +sqlite_prev +sqlite_query +sqlite_rewind +sqlite_seek +sqlite_single_query +sqlite_udf_decode_binary +sqlite_udf_encode_binary +sqlite_unbuffered_query +sqlite_valid +sql_regcase +sqlsrv_begin_transaction +sqlsrv_cancel +sqlsrv_client_info +sqlsrv_close +sqlsrv_commit +sqlsrv_configure +sqlsrv_connect +sqlsrv_errors +sqlsrv_execute +sqlsrv_fetch +sqlsrv_fetch_array +sqlsrv_fetch_object +sqlsrv_field_metadata +sqlsrv_free_stmt +sqlsrv_get_config +sqlsrv_get_field +sqlsrv_has_rows +sqlsrv_next_result +sqlsrv_num_fields +sqlsrv_num_rows +sqlsrv_prepare +sqlsrv_query +sqlsrv_rollback +sqlsrv_rows_affected +sqlsrv_send_stream_data +sqlsrv_server_info +sqrt +srand +sscanf +ssdeep_fuzzy_compare +ssdeep_fuzzy_hash +ssdeep_fuzzy_hash_filename +ssh2_auth_hostbased_file +ssh2_auth_none +ssh2_auth_password +ssh2_auth_pubkey_file +ssh2_connect +ssh2_exec +ssh2_fetch_stream +ssh2_fingerprint +ssh2_methods_negotiated +ssh2_publickey_add +ssh2_publickey_init +ssh2_publickey_list +ssh2_publickey_remove +ssh2_scp_recv +ssh2_scp_send +ssh2_sftp +ssh2_sftp_lstat +ssh2_sftp_mkdir +ssh2_sftp_readlink +ssh2_sftp_realpath +ssh2_sftp_rename +ssh2_sftp_rmdir +ssh2_sftp_stat +ssh2_sftp_symlink +ssh2_sftp_unlink +ssh2_shell +ssh2_tunnel +stat +static +stats_absolute_deviation +stats_cdf_beta +stats_cdf_binomial +stats_cdf_cauchy +stats_cdf_chisquare +stats_cdf_exponential +stats_cdf_f +stats_cdf_gamma +stats_cdf_laplace +stats_cdf_logistic +stats_cdf_negative_binomial +stats_cdf_noncentral_chisquare +stats_cdf_noncentral_f +stats_cdf_poisson +stats_cdf_t +stats_cdf_uniform +stats_cdf_weibull +stats_covariance +stats_dens_beta +stats_dens_cauchy +stats_dens_chisquare +stats_dens_exponential +stats_dens_f +stats_dens_gamma +stats_dens_laplace +stats_dens_logistic +stats_dens_negative_binomial +stats_dens_normal +stats_dens_pmf_binomial +stats_dens_pmf_hypergeometric +stats_dens_pmf_poisson +stats_dens_t +stats_dens_weibull +stats_den_uniform +stats_harmonic_mean +stats_kurtosis +stats_rand_gen_beta +stats_rand_gen_chisquare +stats_rand_gen_exponential +stats_rand_gen_f +stats_rand_gen_funiform +stats_rand_gen_gamma +stats_rand_gen_ibinomial +stats_rand_gen_ibinomial_negative +stats_rand_gen_int +stats_rand_gen_ipoisson +stats_rand_gen_iuniform +stats_rand_gen_noncenral_chisquare +stats_rand_gen_noncentral_f +stats_rand_gen_noncentral_t +stats_rand_gen_normal +stats_rand_gen_t +stats_rand_get_seeds +stats_rand_phrase_to_seeds +stats_rand_ranf +stats_rand_setall +stats_skew +stats_standard_deviation +stats_stat_binomial_coef +stats_stat_correlation +stats_stat_gennch +stats_stat_independent_t +stats_stat_innerproduct +stats_stat_noncentral_t +stats_stat_paired_t +stats_stat_percentile +stats_stat_powersum +stats_variance +stomp +stomp_connect_error +stompexception +stompframe +stomp_version +strcasecmp +strchr +strcmp +strcoll +strcspn +stream_bucket_append +stream_bucket_make_writeable +stream_bucket_new +stream_bucket_prepend +stream_context_create +stream_context_get_default +stream_context_get_options +stream_context_get_params +stream_context_set_default +stream_context_set_option +stream_context_set_params +stream_copy_to_stream +stream_encoding +stream_filter_append +stream_filter_prepend +stream_filter_register +stream_filter_remove +stream_get_contents +stream_get_filters +stream_get_line +stream_get_meta_data +stream_get_transports +stream_get_wrappers +stream_is_local +stream_notification_callback +stream_register_wrapper +stream_resolve_include_path +stream_select +stream_set_blocking +stream_set_read_buffer +stream_set_timeout +stream_set_write_buffer +stream_socket_accept +stream_socket_client +stream_socket_enable_crypto +stream_socket_get_name +stream_socket_pair +stream_socket_recvfrom +stream_socket_sendto +stream_socket_server +stream_socket_shutdown +stream_supports_lock +streamwrapper +stream_wrapper_register +stream_wrapper_restore +stream_wrapper_unregister +strftime +str_getcsv +stripcslashes +stripos +stripslashes +strip_tags +str_ireplace +stristr +strlen +strnatcasecmp +strnatcmp +strncasecmp +strncmp +str_pad +strpbrk +strpos +strptime +strrchr +str_repeat +str_replace +strrev +strripos +str_rot13 +strrpos +str_shuffle +str_split +strspn +strstr +strtok +strtolower +strtotime +strtoupper +strtr +strval +str_word_count +substr +substr_compare +substr_count +substr_replace +svm +svmmodel +svn_add +svn_auth_get_parameter +svn_auth_set_parameter +svn_blame +svn_cat +svn_checkout +svn_cleanup +svn_client_version +svn_commit +svn_delete +svn_diff +svn_export +svn_fs_abort_txn +svn_fs_apply_text +svn_fs_begin_txn2 +svn_fs_change_node_prop +svn_fs_check_path +svn_fs_contents_changed +svn_fs_copy +svn_fs_delete +svn_fs_dir_entries +svn_fs_file_contents +svn_fs_file_length +svn_fs_is_dir +svn_fs_is_file +svn_fs_make_dir +svn_fs_make_file +svn_fs_node_created_rev +svn_fs_node_prop +svn_fs_props_changed +svn_fs_revision_prop +svn_fs_revision_root +svn_fs_txn_root +svn_fs_youngest_rev +svn_import +svn_log +svn_ls +svn_mkdir +svn_repos_create +svn_repos_fs +svn_repos_fs_begin_txn_for_commit +svn_repos_fs_commit_txn +svn_repos_hotcopy +svn_repos_open +svn_repos_recover +svn_revert +svn_status +svn_update +swfaction +swfaction.construct +swf_actiongeturl +swf_actiongotoframe +swf_actiongotolabel +swf_actionnextframe +swf_actionplay +swf_actionprevframe +swf_actionsettarget +swf_actionstop +swf_actiontogglequality +swf_actionwaitforframe +swf_addbuttonrecord +swf_addcolor +swfbitmap +swfbitmap.construct +swfbitmap.getheight +swfbitmap.getwidth +swfbutton +swfbutton.addaction +swfbutton.addasound +swfbutton.addshape +swfbutton.construct +swfbutton.setaction +swfbutton.setdown +swfbutton.sethit +swfbutton.setmenu +swfbutton.setover +swfbutton.setup +swf_closefile +swf_definebitmap +swf_definefont +swf_defineline +swf_definepoly +swf_definerect +swf_definetext +swfdisplayitem +swfdisplayitem.addaction +swfdisplayitem.addcolor +swfdisplayitem.endmask +swfdisplayitem.getrot +swfdisplayitem.getx +swfdisplayitem.getxscale +swfdisplayitem.getxskew +swfdisplayitem.gety +swfdisplayitem.getyscale +swfdisplayitem.getyskew +swfdisplayitem.move +swfdisplayitem.moveto +swfdisplayitem.multcolor +swfdisplayitem.remove +swfdisplayitem.rotate +swfdisplayitem.rotateto +swfdisplayitem.scale +swfdisplayitem.scaleto +swfdisplayitem.setdepth +swfdisplayitem.setmasklevel +swfdisplayitem.setmatrix +swfdisplayitem.setname +swfdisplayitem.setratio +swfdisplayitem.skewx +swfdisplayitem.skewxto +swfdisplayitem.skewy +swfdisplayitem.skewyto +swf_endbutton +swf_enddoaction +swf_endshape +swf_endsymbol +swffill +swffill.moveto +swffill.rotateto +swffill.scaleto +swffill.skewxto +swffill.skewyto +swffont +swffontchar +swffontchar.addchars +swffontchar.addutf8chars +swffont.construct +swffont.getascent +swffont.getdescent +swffont.getleading +swffont.getshape +swffont.getutf8width +swffont.getwidth +swf_fontsize +swf_fontslant +swf_fonttracking +swf_getbitmapinfo +swf_getfontinfo +swf_getframe +swfgradient +swfgradient.addentry +swfgradient.construct +swf_labelframe +swf_lookat +swf_modifyobject +swfmorph +swfmorph.construct +swfmorph.getshape1 +swfmorph.getshape2 +swfmovie +swfmovie.add +swfmovie.addexport +swfmovie.addfont +swfmovie.construct +swfmovie.importchar +swfmovie.importfont +swfmovie.labelframe +swfmovie.nextframe +swfmovie.output +swfmovie.remove +swfmovie.save +swfmovie.savetofile +swfmovie.setbackground +swfmovie.setdimension +swfmovie.setframes +swfmovie.setrate +swfmovie.startsound +swfmovie.stopsound +swfmovie.streammp3 +swfmovie.writeexports +swf_mulcolor +swf_nextid +swf_oncondition +swf_openfile +swf_ortho +swf_ortho2 +swf_perspective +swf_placeobject +swf_polarview +swf_popmatrix +swf_posround +swfprebuiltclip +swfprebuiltclip.construct +swf_pushmatrix +swf_removeobject +swf_rotate +swf_scale +swf_setfont +swf_setframe +swfshape +swfshape.addfill +swf_shapearc +swfshape.construct +swf_shapecurveto +swf_shapecurveto3 +swfshape.drawarc +swfshape.drawcircle +swfshape.drawcubic +swfshape.drawcubicto +swfshape.drawcurve +swfshape.drawcurveto +swfshape.drawglyph +swfshape.drawline +swfshape.drawlineto +swf_shapefillbitmapclip +swf_shapefillbitmaptile +swf_shapefilloff +swf_shapefillsolid +swf_shapelinesolid +swf_shapelineto +swfshape.movepen +swfshape.movepento +swf_shapemoveto +swfshape.setleftfill +swfshape.setline +swfshape.setrightfill +swf_showframe +swfsound +swfsound.construct +swfsoundinstance +swfsoundinstance.loopcount +swfsoundinstance.loopinpoint +swfsoundinstance.loopoutpoint +swfsoundinstance.nomultiple +swfsprite +swfsprite.add +swfsprite.construct +swfsprite.labelframe +swfsprite.nextframe +swfsprite.remove +swfsprite.setframes +swfsprite.startsound +swfsprite.stopsound +swf_startbutton +swf_startdoaction +swf_startshape +swf_startsymbol +swftext +swftext.addstring +swftext.addutf8string +swftext.construct +swftextfield +swftextfield.addchars +swftextfield.addstring +swftextfield.align +swftextfield.construct +swftextfield.setbounds +swftextfield.setcolor +swftextfield.setfont +swftextfield.setheight +swftextfield.setindentation +swftextfield.setleftmargin +swftextfield.setlinespacing +swftextfield.setmargins +swftextfield.setname +swftextfield.setpadding +swftextfield.setrightmargin +swftext.getascent +swftext.getdescent +swftext.getleading +swftext.getutf8width +swftext.getwidth +swftext.moveto +swftext.setcolor +swftext.setfont +swftext.setheight +swftext.setspacing +swf_textwidth +swf_translate +swfvideostream +swfvideostream.construct +swfvideostream.getnumframes +swfvideostream.setdimension +swf_viewport +swish_construct +swish_getmetalist +swish_getpropertylist +swish_prepare +swish_query +swishresult_getmetalist +swishresults_getparsedwords +swishresults_getremovedstopwords +swishresults_nextresult +swishresults_seekresult +swishresult_stem +swishsearch_execute +swishsearch_resetlimit +swishsearch_setlimit +swishsearch_setphrasedelimiter +swishsearch_setsort +swishsearch_setstructure +switch +sybase_affected_rows +sybase_close +sybase_connect +sybase_data_seek +sybase_deadlock_retry_count +sybase_fetch_array +sybase_fetch_assoc +sybase_fetch_field +sybase_fetch_object +sybase_fetch_row +sybase_field_seek +sybase_free_result +sybase_get_last_message +sybase_min_client_severity +sybase_min_error_severity +sybase_min_message_severity +sybase_min_server_severity +sybase_num_fields +sybase_num_rows +sybase_pconnect +sybase_query +sybase_result +sybase_select_db +sybase_set_message_handler +sybase_unbuffered_query +symlink +sys_getloadavg +sys_get_temp_dir +syslog +system +tan +tanh +tcpwrap_check +tempnam +textdomain +throw +tidy +tidy_access_count +tidy_config_count +tidy_diagnose +tidy_error_count +tidy_get_error_buffer +tidy_get_output +tidy_load_config +tidynode +tidy_reset_config +tidy_save_config +tidy_set_encoding +tidy_setopt +tidy_warning_count +time +time_nanosleep +time_sleep_until +timezone_abbreviations_list +timezone_identifiers_list +timezone_location_get +timezone_name_from_abbr +timezone_name_get +timezone_offset_get +timezone_open +timezone_transitions_get +timezone_version_get +tmpfile +token_get_all +token_name +tokyotyrant +tokyotyrantquery +tokyotyranttable +tostring +__toString() +touch +transliterator +traversable +trigger_error +trim +try +uasort +ucfirst +ucwords +udm_add_search_limit +udm_alloc_agent +udm_alloc_agent_array +udm_api_version +udm_cat_list +udm_cat_path +udm_check_charset +udm_check_stored +udm_clear_search_limits +udm_close_stored +udm_crc32 +udm_errno +udm_error +udm_find +udm_free_agent +udm_free_ispell_data +udm_free_res +udm_get_doc_count +udm_get_res_field +udm_get_res_param +udm_hash32 +udm_load_ispell_data +udm_open_stored +udm_set_agent_param +uksort +umask +underflowexception +unexpectedvalueexception +uniqid +unixtojd +unlink +unpack +unregister_tick_function +unserialize +unset +__unset() +urldecode +urlencode +use +user_error +use_soap_error_handler +usleep +usort +utf8_decode +utf8_encode +v8js +v8jsexception +var +var_dump +var_export +variant +variant_abs +variant_add +variant_and +variant_cast +variant_cat +variant_cmp +variant_date_from_timestamp +variant_date_to_timestamp +variant_div +variant_eqv +variant_fix +variant_get_type +variant_idiv +variant_imp +variant_int +variant_mod +variant_mul +variant_neg +variant_not +variant_or +variant_pow +variant_round +variant_set +variant_set_type +variant_sub +variant_xor +version_compare +vfprintf +virtual +vpopmail_add_alias_domain +vpopmail_add_alias_domain_ex +vpopmail_add_domain +vpopmail_add_domain_ex +vpopmail_add_user +vpopmail_alias_add +vpopmail_alias_del +vpopmail_alias_del_domain +vpopmail_alias_get +vpopmail_alias_get_all +vpopmail_auth_user +vpopmail_del_domain +vpopmail_del_domain_ex +vpopmail_del_user +vpopmail_error +vpopmail_passwd +vpopmail_set_user_quota +vprintf +vsprintf +w32api_deftype +w32api_init_dtype +w32api_invoke_function +w32api_register_function +w32api_set_call_method +__wakeup() +wddx_add_vars +wddx_deserialize +wddx_packet_end +wddx_packet_start +wddx_serialize_value +wddx_serialize_vars +weakref +while +win32_continue_service +win32_create_service +win32_delete_service +win32_get_last_control_message +win32_pause_service +win32_ps_list_procs +win32_ps_stat_mem +win32_ps_stat_proc +win32_query_service_status +win32_set_service_status +win32_start_service +win32_start_service_ctrl_dispatcher +win32_stop_service +wincache_fcache_fileinfo +wincache_fcache_meminfo +wincache_lock +wincache_ocache_fileinfo +wincache_ocache_meminfo +wincache_refresh_if_changed +wincache_rplist_fileinfo +wincache_rplist_meminfo +wincache_scache_info +wincache_scache_meminfo +wincache_ucache_add +wincache_ucache_cas +wincache_ucache_clear +wincache_ucache_dec +wincache_ucache_delete +wincache_ucache_exists +wincache_ucache_get +wincache_ucache_inc +wincache_ucache_info +wincache_ucache_meminfo +wincache_ucache_set +wincache_unlock +wordwrap +xattr_get +xattr_list +xattr_remove +xattr_set +xattr_supported +xdiff_file_bdiff +xdiff_file_bdiff_size +xdiff_file_bpatch +xdiff_file_diff +xdiff_file_diff_binary +xdiff_file_merge3 +xdiff_file_patch +xdiff_file_patch_binary +xdiff_file_rabdiff +xdiff_string_bdiff +xdiff_string_bdiff_size +xdiff_string_bpatch +xdiff_string_diff +xdiff_string_diff_binary +xdiff_string_merge3 +xdiff_string_patch +xdiff_string_patch_binary +xdiff_string_rabdiff +xhprof_disable +xhprof_enable +xhprof_sample_disable +xhprof_sample_enable +xml_error_string +xml_get_current_byte_index +xml_get_current_column_number +xml_get_current_line_number +xml_get_error_code +xml_parse +xml_parse_into_struct +xml_parser_create +xml_parser_create_ns +xml_parser_free +xml_parser_get_option +xml_parser_set_option +xmlreader +xmlrpc_decode +xmlrpc_decode_request +xmlrpc_encode +xmlrpc_encode_request +xmlrpc_get_type +xmlrpc_is_fault +xmlrpc_parse_method_descriptions +xmlrpc_server_add_introspection_data +xmlrpc_server_call_method +xmlrpc_server_create +xmlrpc_server_destroy +xmlrpc_server_register_introspection_callback +xmlrpc_server_register_method +xmlrpc_set_type +xml_set_character_data_handler +xml_set_default_handler +xml_set_element_handler +xml_set_end_namespace_decl_handler +xml_set_external_entity_ref_handler +xml_set_notation_decl_handler +xml_set_object +xml_set_processing_instruction_handler +xml_set_start_namespace_decl_handler +xml_set_unparsed_entity_decl_handler +xmlwriter_end_attribute +xmlwriter_end_cdata +xmlwriter_end_comment +xmlwriter_end_document +xmlwriter_end_dtd +xmlwriter_end_dtd_attlist +xmlwriter_end_dtd_element +xmlwriter_end_dtd_entity +xmlwriter_end_element +xmlwriter_end_pi +xmlwriter_flush +xmlwriter_full_end_element +xmlwriter_open_memory +xmlwriter_open_uri +xmlwriter_output_memory +xmlwriter_set_indent +xmlwriter_set_indent_string +xmlwriter_start_attribute +xmlwriter_start_attribute_ns +xmlwriter_start_cdata +xmlwriter_start_comment +xmlwriter_start_document +xmlwriter_start_dtd +xmlwriter_start_dtd_attlist +xmlwriter_start_dtd_element +xmlwriter_start_dtd_entity +xmlwriter_start_element +xmlwriter_start_element_ns +xmlwriter_start_pi +xmlwriter_text +xmlwriter_write_attribute +xmlwriter_write_attribute_ns +xmlwriter_write_cdata +xmlwriter_write_comment +xmlwriter_write_dtd +xmlwriter_write_dtd_attlist +xmlwriter_write_dtd_element +xmlwriter_write_dtd_entity +xmlwriter_write_element +xmlwriter_write_element_ns +xmlwriter_write_pi +xmlwriter_write_raw +xor +xpath_eval +xpath_eval_expression +xpath_new_context +xpath_register_ns +xpath_register_ns_auto +xptr_eval +xptr_new_context +xslt_backend_info +xslt_backend_name +xslt_backend_version +xslt_create +xslt_errno +xslt_error +xslt_free +xslt_getopt +xslt_process +xsltprocessor +xslt_set_base +xslt_set_encoding +xslt_set_error_handler +xslt_set_log +xslt_set_object +xslt_setopt +xslt_set_sax_handler +xslt_set_sax_handlers +xslt_set_scheme_handler +xslt_set_scheme_handlers +yaml_emit +yaml_emit_file +yaml_parse +yaml_parse_file +yaml_parse_url +yaz_addinfo +yaz_ccl_conf +yaz_ccl_parse +yaz_close +yaz_connect +yaz_database +yaz_element +yaz_errno +yaz_error +yaz_es +yaz_es_result +yaz_get_option +yaz_hits +yaz_itemorder +yaz_present +yaz_range +yaz_record +yaz_scan +yaz_scan_result +yaz_schema +yaz_search +yaz_set_option +yaz_sort +yaz_syntax +yaz_wait +yp_all +yp_cat +yp_errno +yp_err_string +yp_first +yp_get_default_domain +yp_master +yp_match +yp_next +yp_order +zend_logo_guid +zend_thread_id +zend_version +ziparchive +ziparchive_addemptydir +ziparchive_addfile +ziparchive_addfromstring +ziparchive_close +ziparchive_deleteindex +ziparchive_deletename +ziparchive_extractto +ziparchive_getarchivecomment +ziparchive_getcommentindex +ziparchive_getcommentname +ziparchive_getfromindex +ziparchive_getfromname +ziparchive_getnameindex +ziparchive_getstatusstring +ziparchive_getstream +ziparchive_locatename +ziparchive_open +ziparchive_renameindex +ziparchive_renamename +ziparchive_setarchivecomment +ziparchive_setcommentindex +ziparchive_setCommentName +ziparchive_statindex +ziparchive_statname +ziparchive_unchangeall +ziparchive_unchangearchive +ziparchive_unchangeindex +ziparchive_unchangename +zip_close +zip_entry_close +zip_entry_compressedsize +zip_entry_compressionmethod +zip_entry_filesize +zip_entry_name +zip_entry_open +zip_entry_read +zip_open +zip_read +zlib_get_coding_type +amqpchannel +amqpenvelope +autoload +bumpvalue +class_uses +closure +cubrid_get_query_timeout +cubrid_pconnect +cubrid_pconnect_with_url +cubrid_set_query_timeout +directory +domcdatasection +eio_busy +eio_cancel +eio_chmod +eio_chown +eio_close +eio_custom +eio_dup2 +eio_event_loop +eio_fallocate +eio_fchmod +eio_fchown +eio_fdatasync +eio_fstat +eio_fstatvfs +eio_fsync +eio_ftruncate +eio_futime +eio_get_event_stream +eio_grp +eio_grp_add +eio_grp_cancel +eio_grp_limit +eio_link +eio_lstat +eio_mkdir +eio_mknod +eio_nop +eio_npending +eio_nready +eio_nreqs +eio_nthreads +eio_open +eio_poll +eio_read +eio_readahead +eio_readdir +eio_readlink +eio_realpath +eio_rename +eio_rmdir +eio_sendfile +eio_set_max_idle +eio_set_max_parallel +eio_set_max_poll_reqs +eio_set_max_poll_time +eio_set_min_parallel +eio_stat +eio_statvfs +eio_symlink +eio_sync +eio_sync_file_range +eio_syncfs +eio_truncate +eio_unlink +eio_utime +eio_write +get_declared_traits +getimagesizefromstring +getmeta +getnamed +getvalue +hwapi_attribute_new +hwapi_content_new +is_tainted +lapack +lapackexception +ldap_control_paged_result +ldap_control_paged_result_response +libxml_set_external_entity_loader +mysqli_get_cache_stats +mysqli_sql_exception +mysqlnd_ms_get_last_gtid +mysqlnd_ms_get_last_used_connection +mysqlnd_ms_match_wild +mysqlnd_ms_set_qos +mysqlnd_qc_get_available_handlers +mysqlnd_qc_get_normalized_query_trace_log +mysqlnd_qc_set_cache_condition +mysqlnd_qc_set_is_select +mysqlnd_qc_set_storage_handler +mysqlnd_uh_convert_to_mysqlnd +mysqlnd_uh_set_connection_proxy +mysqlnd_uh_set_statement_proxy +mysqlnduhconnection +mysqlnduhpreparedstatement +pg_escape_identifier +pg_escape_literal +phar +phardata +pharexception +pharfileinfo +php_user_filter +reflectionzendextension +resetvalue +session_register_shutdown +session_status +sessionhandler +sessionhandlerinterface +setcounterclass +socket_import_stream +stream_set_chunk_size +taint +tokyotyrantexception +tokyotyrantiterator +trait_exists +untaint +varnishadmin +varnishlog +varnishstat +yaf_action_abstract +yaf_application +yaf_bootstrap_abstract +yaf_config_abstract +yaf_config_ini +yaf_config_simple +yaf_controller_abstract +yaf_dispatcher +yaf_exception +yaf_exception_dispatchfailed +yaf_exception_loadfailed +yaf_exception_loadfailed_action +yaf_exception_loadfailed_controller +yaf_exception_loadfailed_module +yaf_exception_loadfailed_view +yaf_exception_routerfailed +yaf_exception_startuperror +yaf_exception_typeerror +yaf_loader +yaf_plugin_abstract +yaf_registry +yaf_request_abstract +yaf_request_http +yaf_request_simple +yaf_response_abstract +yaf_route_interface +yaf_route_map +yaf_route_regex +yaf_route_rewrite +yaf_route_simple +yaf_route_static +yaf_route_supervar +yaf_router +yaf_session +yaf_view_interface +yaf_view_simple +zlib_decode +zlib_encode +trait +insteadof diff --git a/elpa/auto-complete-20140803.2118/dict/python-mode b/elpa/auto-complete-20140803.2118/dict/python-mode new file mode 100644 index 000000000..108bfa5f0 --- /dev/null +++ b/elpa/auto-complete-20140803.2118/dict/python-mode @@ -0,0 +1,378 @@ +ArithmeticError +AssertionError +AttributeError +BaseException +BufferError +BytesWarning +DeprecationWarning +EOFError +Ellipsis +EnvironmentError +Exception +False +FloatingPointError +FutureWarning +GeneratorExit +IOError +ImportError +ImportWarning +IndentationError +IndexError +KeyError +KeyboardInterrupt +LookupError +MemoryError +NameError +None +NotImplemented +NotImplementedError +OSError +OverflowError +PendingDeprecationWarning +ReferenceError +RuntimeError +RuntimeWarning +StandardError +StopIteration +SyntaxError +SyntaxWarning +SystemError +SystemExit +TabError +True +TypeError +UnboundLocalError +UnicodeDecodeError +UnicodeEncodeError +UnicodeError +UnicodeTranslateError +UnicodeWarning +UserWarning +ValueError +Warning +ZeroDivisionError +__builtins__ +__debug__ +__doc__ +__file__ +__future__ +__import__ +__main__ +__name__ +__package__ +_dummy_thread +_thread +abc +abs +aifc +all +and +any +apply +argparse +array +as +assert +ast +asynchat +asyncio +asyncore +atexit +audioop +base64 +basestring +bdb +bin +binascii +binhex +bisect +bool +break +buffer +builtins +bytearray +bytes +bz2 +calendar +callable +cgi +cgitb +chr +chuck +class +classmethod +cmath +cmd +cmp +code +codecs +codeop +coerce +collections +colorsys +compile +compileall +complex +concurrent +configparser +contextlib +continue +copy +copyreg +copyright +credits +crypt +csv +ctypes +curses +datetime +dbm +decimal +def +del +delattr +dict +difflib +dir +dis +distutils +divmod +doctest +dummy_threading +elif +else +email +enumerate +ensurepip +enum +enumerat +errno +eval +except +exec +execfile +exit +faulthandler +fcntl +file +filecmp +fileinput +filter +finally +float +fnmatch +for +format +formatter +fpectl +fractions +from +frozenset +ftplib +functools +gc +getattr +getopt +getpass +gettext +glob +global +globals +grp +gzip +hasattr +hash +hashlib +heapq +help +hex +hmac +html +http +id +if +imghdr +imp +impalib +import +importlib +in +input +inspect +int +intern +io +ipaddress +is +isinstance +issubclass +iter +itertools +json +keyword +lambda +len +license +linecache +list +locale +locals +logging +long +lzma +macpath +mailbox +mailcap +map +marshal +math +max +memoryview +mimetypes +min +mmap +modulefinder +msilib +msvcrt +multiprocessing +netrc +next +nis +nntplib +not +numbers +object +oct +open +operator +optparse +or +ord +os +ossaudiodev +parser +pass +pathlib +pdb +pickle +pickletools +pipes +pkgutil +platform +plistlib +poplib +posix +pow +pprint +print +profile +property +pty +pwd +py_compiler +pyclbr +pydoc +queue +quit +quopri +raise +random +range +raw_input +re +readline +reduce +reload +repr +reprlib +resource +return +reversed +rlcompleter +round +runpy +sched +select +selectors +set +setattr +shelve +shlex +shutil +signal +site +slice +smtpd +smtplib +sndhdr +socket +socketserver +sorted +spwd +sqlite3 +ssl +stat +staticmethod +statistics +str +string +stringprep +struct +subprocess +sum +sunau +super +symbol +symtable +sys +sysconfig +syslog +tabnanny +tarfile +telnetlib +tempfile +termios +test +textwrap +threading +time +timeit +tkinter +token +tokenize +trace +traceback +tracemalloc +try +tty +tuple +turtle +type +types +unichr +unicode +unicodedata +unittest +urllib +uu +uuid +vars +venv +warnings +wave +weakref +webbrowser +while +winsound +winreg +with +wsgiref +xdrlib +xml +xmlrpc +xrange +yield +zip +zipfile +zipimport +zlib diff --git a/elpa/auto-complete-20140803.2118/dict/qml-mode b/elpa/auto-complete-20140803.2118/dict/qml-mode new file mode 100644 index 000000000..7d9976e6d --- /dev/null +++ b/elpa/auto-complete-20140803.2118/dict/qml-mode @@ -0,0 +1,183 @@ +AlignBottom +AlignCenter +AlignHCenter +AlignLeft +AlignRight +AlignTop +AlignVCenter +AnchorAnimation +AnchorChanges +Audio +Behavior +Binding +BorderImage +ColorAnimation +Column +Component +Connections +Easing +Flickable +Flipable +Flow +FocusScope +GestureArea +Grid +GridView +Horizontal +Image +InBack +InBounce +InCirc +InCubic +InElastic +InExpo +InOutBack +InOutBounce +InOutCirc +InOutCubic +InOutElastic +InOutExpo +InOutQuad +InOutQuart +InOutQuint +InQuad +InQuart +InQuint +InQuint +InSine +Item +LayoutItem +LeftButton +Linear +ListElement +ListModel +ListView +Loader +MidButton +MiddleButton +MouseArea +NoButton +NumberAnimation +OutBack +OutBounce +OutCirc +OutCubic +OutElastic +OutExpo +OutInBack +OutInBounce +OutInCirc +OutInCubic +OutInElastic +OutInExpo +OutInQuad +OutInQuart +OutInQuint +OutQuad +OutQuart +OutQuint +OutSine +Package +ParallelAnimation +ParentAnimation +ParentChange +ParticleMotionGravity +ParticleMotionLinear +ParticleMotionWander +Particles +Path +PathAttribute +PathCubic +PathLine +PathPercent +PathQuad +PathView +PauseAnimation +PropertyAction +PropertyAnimation +PropertyChanges +Qt +QtObject +Rectangle +Repeater +RightButton +Rotation +RotationAnimation +Row +Scale +ScriptAction +SequentialAnimation +SmoothedAnimation +SoundEffect +SpringFollow +State +StateChangeScript +StateGroup +SystemPalette +Text +TextEdit +TextInput +Timer +Transition +Translate +Vertical +Video +ViewsPositionersMediaEffects +VisualDataModel +VisualItemModel +WebView +WorkerScript +XmlListModel +XmlRole +alias +as +bool +break +case +catch +color +const +continue +date +debugger +default +delete +do +double +else +enum +false +false +finally +for +function +if +import +import +in +instanceof +int +let +new +null +on +parent +property +real +return +signal +string +switch +this +throw +true +try +typeof +undefined +url +var +variant +void +while +with +yield diff --git a/elpa/auto-complete-20140803.2118/dict/ruby-mode b/elpa/auto-complete-20140803.2118/dict/ruby-mode new file mode 100644 index 000000000..1a854178c --- /dev/null +++ b/elpa/auto-complete-20140803.2118/dict/ruby-mode @@ -0,0 +1,181 @@ +$! +$" +$$ +$& +$' +$* +$+ +$, +$-0 +$-F +$-I +$-K +$-a +$-d +$-i +$-l +$-p +$-v +$-w +$. +$/ +$0 +$1 +$10 +$11 +$2 +$3 +$4 +$5 +$6 +$7 +$8 +$9 +$: +$; +$< +$= +$> +$? +$@ +$DEBUG +$FILENAME +$KCODE +$LOADED_FEATURES +$LOAD_PATH +$PROGRAM_NAME +$SAFE +$VERBOSE +$\ +$_ +$` +$deferr +$defout +$stderr +$stdin +$stdout +$~ +ARGF +ARGV +Array +BEGIN +DATA +END +ENV +FALSE +Float +Integer +NIL +PLATFORM +RELEASE_DATE +RUBY_COPYRIGHT +RUBY_DESCRIPTION +RUBY_PATCHLEVEL +RUBY_PLATFORM +RUBY_RELEASE_DATE +RUBY_VERSION +SCRIPT_LINES__ +STDERR +STDIN +STDOUT +String +TOPLEVEL_BINDING +TRUE +VERSION +__method__ +` +abort +alias +and +at_exit +autoload +autoload? +begin +binding +block_given +break +callcc +caller +case +catch +chomp +chomp! +chop +chop +class +def +defined? +do +else +elsif +end +ensure +eval +exec +exit +exit! +fail +false +for +fork +format +getc +gets +global_variables +gsub +gsub! +if +in +iterator? +lambda +load +local_variables +loop +module +next +nil +not +open +or +p +printf +proc +putc +puts +raise +rand +readline +readlines +redo +require +require_relative +rescue +retry +return +scan +select +self +set_trace_func +sleep +split +sprintf +srand +sub +sub! +super +syscall +system +test +then +throw +trace_var +trap +true +undef +unless +until +untrace_var +warn +when +while +yield diff --git a/elpa/auto-complete-20140803.2118/dict/scheme-mode b/elpa/auto-complete-20140803.2118/dict/scheme-mode new file mode 100644 index 000000000..e5cca6151 --- /dev/null +++ b/elpa/auto-complete-20140803.2118/dict/scheme-mode @@ -0,0 +1,216 @@ +case-lambda +call/cc +class +define-class +exit-handler +field +import +inherit +init-field +interface +let*-values +let-values +let/ec +mixin +opt-lambda +override +protect +provide +public +rename +require +require-for-syntax +syntax +syntax-case +syntax-error +unit/sig +unless +when +with-syntax +and +begin +call-with-current-continuation +call-with-input-file +call-with-output-file +case +cond +define +define-syntax +delay +do +dynamic-wind +else +for-each +if +lambda +let +let* +let-syntax +letrec +letrec-syntax +map +or +syntax-rules +abs +acos +angle +append +apply +asin +assoc +assq +assv +atan +boolean? +caar +cadr +call-with-input-file +call-with-output-file +call-with-values +car +cdddar +cddddr +cdr +ceiling +char->integer +char-alphabetic? +char-ci<=? +char-ci=? +char-ci>? +char-downcase +char-lower-case? +char-numeric? +char-ready? +char-upcase +char-upper-case? +char-whitespace? +char<=? +char=? +char>? +char? +close-input-port +close-output-port +complex? +cons +cos +current-input-port +current-output-port +denominator +display +eof-object? +eq? +equal? +eqv? +eval +even? +exact->inexact +exact? +exp +expt +#f +floor +force +gcd +imag-part +inexact->exact +inexact? +input-port? +integer->char +integer? +interaction-environment +lcm +length +list +list->string +list->vector +list-ref +list-tail +list? +load +log +magnitude +make-polar +make-rectangular +make-string +make-vector +max +member +memq +memv +min +modulo +negative? +newline +not +null-environment +null? +number->string +number? +numerator +odd? +open-input-file +open-output-file +output-port? +pair? +peek-char +port? +positive? +procedure? +quasiquote +quote +quotient +rational? +rationalize +read +read-char +real-part +real? +remainder +reverse +round +scheme-report-environment +set! +set-car! +set-cdr! +sin +sqrt +string +string->list +string->number +string->symbol +string-append +string-ci<=? +string-ci=? +string-ci>? +string-copy +string-fill! +string-length +string-ref +string-set! +string<=? +string=? +string>? +string? +substring +symbol->string +symbol? +#t +tan +transcript-off +transcript-on +truncate +values +vector +vector->list +vector-fill! +vector-length +vector-ref +vector-set! diff --git a/elpa/auto-complete-20140803.2118/dict/sclang-mode b/elpa/auto-complete-20140803.2118/dict/sclang-mode new file mode 100644 index 000000000..2b92135b6 --- /dev/null +++ b/elpa/auto-complete-20140803.2118/dict/sclang-mode @@ -0,0 +1,1481 @@ +A2K +A2K +abs +absdif +AbstractFunction +AbstractIn +AbstractOut +AbstractServerAction +acos +addition +Adverbs +AllpassC +AllpassL +AllpassN +amclip +AmpComp +AmpComp +AmpCompA +AmpCompA +ampdb +Amplitude +Amplitude +APF +AppClock +Archive +Array +Array2D +ArrayedCollection +asin +Assignment +Association +asTarget +atan +atan2 +AudioControl +AudioIn +audio_rate_mapping +AutoClassHelper +Bag +Balance2 +Balance2 +Ball +Ball +BAllPass +BAllPass +BasicOpUGen +basic_live_coding_techniques +BBandPass +BBandPass +BBandStop +BBandStop +BeatTrack +BeatTrack +BeatTrack +BeatTrack2 +BeatTrack2 +BeatTrack2 +BEQSuite +BEQSuite +BHiPass +BHiPass +BHiPass4 +BHiShelf +BHiShelf +BinaryOpFunction +BinaryOpStream +BinaryOpUGen +BiPanB2 +BiPanB2 +Blip +Blip +BLowPass +BLowPass +BLowPass4 +BLowShelf +BLowShelf +Boolean +BPeakEQ +BPeakEQ +BPF +BPF +BPZ2 +BPZ2 +BRF +BRF +BrownNoise +BrownNoise +BRZ2 +BRZ2 +BufAllpassC +BufAllpassL +BufAllpassN +BufChannels +BufChannels +BufCombC +BufCombL +BufCombN +BufDelayC +BufDelayL +BufDelayN +BufDur +BufDur +Buffer +Buffers +BufFrames +BufFrames +BufRateScale +BufRateScale +BufRd +BufRd +BufSampleRate +BufSampleRate +BufSamples +BufSamples +BufWr +BufWr +bundledCommands +Bus +BusPlug +Busses +Button +CCResponder +ceil +Changed +Changed +ChaosGen +Char +CheckBadValues +Class +Classes +ClassHelpTemplate +ClearBuf +ClientVsServer +Clip +Clip +clip2 +ClipNoise +ClipNoise +Clock +CmdPeriod +cmds +CocoaMenuItem +CoinGate +CoinGate +Collection +Collections +Color +CombC +CombL +CombN +Comments +Compander +Compander +CompanderD +Complex +CompositeView +Condition +ContiguousBlockAllocator +Control +Control-Structures +ControlDur +ControlName +ControlRate +ControlSpec +convertRhythm +Convolution +Convolution2 +Convolution2L +Convolution3 +cos +COsc +COsc +cosh +cpsmidi +cpsoct +Crackle +Crackle +Creating-Standalone-Applications +Crossplatform +CSVFileReader +cubed +CuspL +CuspL +CuspN +CuspN +Date +dbamp +Dbrown +Dbrown +Dbufrd +Dbufrd +Dbufwr +Dbufwr +DC +DC +Debugging-tips +DebugNodeWatcher +Decay +Decay +Decay2 +Decay2 +DecodeB2 +DecodeB2 +default_group +DegreeToKey +DegreeToKey +Delay1 +Delay2 +DelayC +DelayL +DelayN +DelTapRd +DelTapRd +DelTapWr +DelTapWr +Demand +Demand +DemandEnvGen +DemandEnvGen +DemandEnvGen +DetectIndex +DetectIndex +DetectSilence +DetectSilence +DetectSilence +Dgeom +Dgeom +Dialog +Dibrown +Dictionary +difsqr +DiskIn +DiskIn +DiskIn +DiskOut +DiskOut +DiskOut +distort +division +Diwhite +Document +DocumentAutoCompletion +Donce +Done +Done +DoubleArray +Dpoll +Dpoll +DragBoth +DragSink +DragSource +Drand +Drand +Dreset +Dreset +Dseq +Dseq +Dser +Dser +Dseries +Dseries +Dshuf +Dshuf +Dstutter +Dstutter +Dswitch +Dswitch +Dswitch1 +Dswitch1 +DUGen +Dunique +Dust +Dust +Dust2 +Dust2 +Duty +Duty +Dwhite +Dwhite +Dwrand +Dwrand +Dxrand +DynKlang +DynKlang +DynKlank +DynKlank +DynKlank +EmacsEditor +EmacsGUI +Env +EnvelopeView +EnvGate +EnvGen +EnvGen +EnvirGui +Environment +EnvironmentRedirect +Error +Event +EventPatternProxy +EventPatternProxy +EventStream +EventStreamPlayer +Event_types +Exception +excess +exp +exponentiation +ExpRand +ExpRand +ExpRand +Expression-Sequence +EZGui +EZKnob +EZLists +EZListView +EZNumber +EZPopUpMenu +EZRanger +EZScroller +EZSlider +EZText +False +FBSineC +FBSineC +FBSineL +FBSineL +FBSineN +FBSineN +Fdef +FFT +FFTTrigger +File +FileReader +Filter +FilterPattern +FilterPattern +Float +FloatArray +floor +FlowLayout +FlowView +Fold +Fold +fold2 +Font +Formant +Formant +Formlet +Formlet +FOS +FOS +frac +Frame +Free +Free +FreeSelf +FreeSelf +FreeSelfWhenDone +FreeSelfWhenDone +FreeVerb +FreeVerb2 +FreqScope +FreqScopeView +FreqShift +FreqShift +FreqShift +FSinOsc +FSinOsc +FuncFilterPattern +Function +FunctionDef +FunctionList +Functions +Gate +GbmanL +GbmanL +GbmanN +GbmanN +Gendy1 +Gendy1 +Gendy2 +Gendy2 +Gendy3 +Gendy3 +GeneralHID +GeneralHIDDevice +GeneralHIDSlot +GeneralHIDSpec +Glossary +Gradient +GrainBuf +GrainBuf +GrainFM +GrainIn +GrainSin +GrayNoise +GrayNoise +greaterorequalthan +greaterthan +Group +Groups +GUI +gui +GUI-Classes +GUI-Overview +GVerb +Harmonics +Hasher +Hasher +Help +HelpDocsLicensing +Helper +HelpSearchResult +HenonC +HenonC +HenonL +HenonL +HenonN +HenonN +HIDDeviceService +Hilbert +HilbertFIR +HiliteGradient +History +HistoryGui +HLayoutView +How-to-Use-the-Interpreter +HPF +HPF +HPZ1 +HPZ1 +HPZ2 +HPZ2 +hypot +hypotApx +IdentityBag +IdentityDictionary +IdentitySet +IEnvGen +IEnvGen +if +IFFT +Impulse +Impulse +In +Index +Index +IndexInBetween +IndexInBetween +IndexL +IndexL +InFeedback +Infinitum +initClass +InRange +InRange +InRect +InRect +Int16Array +Int32Array +Int8Array +Integer +Integrator +Integrator +Integrator +Internal-Snooping +InterplEnv +InterplPairs +InterplXYC +Interpreter +Interval +InTrig +Intro-to-Objects +Introductory_tutorial +IRand +IRand +IRand +isKindOf +isNegative +isPositive +isStrictlyPositive +JITGui +JITLib +jitlib_asCompileString +jitlib_basic_concepts_01 +jitlib_basic_concepts_02 +jitlib_basic_concepts_03 +jitlib_basic_concepts_04 +jitlib_efficiency +jitlib_fading +jitlib_networking +J_concepts_in_SC +K2A +K2A +KeyState +KeyState +KeyTrack +KeyTrack +Klang +Klang +Klang +Klank +Klank +Klank +Knob +Lag +Lag +Lag2 +Lag2 +Lag2UD +Lag2UD +Lag3 +Lag3 +Lag3UD +Lag3UD +LagControl +LagIn +LagUD +LagUD +LastValue +Latch +Latch +LatoocarfianC +LatoocarfianC +LatoocarfianL +LatoocarfianL +LatoocarfianN +LatoocarfianN +LazyEnvir +LeakDC +LeakDC +LeastChange +LeastChange +lessorequalthan +lessthan +LFClipNoise +LFClipNoise +LFCub +LFCub +LFDClipNoise +LFDClipNoise +LFDNoise0 +LFDNoise0 +LFDNoise1 +LFDNoise1 +LFDNoise3 +LFDNoise3 +LFGauss +LFGauss +LFNoise0 +LFNoise0 +LFNoise1 +LFNoise1 +LFNoise2 +LFNoise2 +LFPar +LFPar +LFPulse +LFPulse +LFSaw +LFSaw +LFTri +LFTri +Library +LibraryBase +Licensing +LID +Limiter +Limiter +LinCongC +LinCongC +LinCongL +LinCongL +LinCongN +LinCongN +Line +Line +Linen +Linen +LinExp +LinExp +LinkedList +LinkedListNode +LinLin +LinLin +LinPan2 +LinPan2 +LinRand +LinRand +LinRand +LinSelectX +Linux_udev_setup +LinXFade2 +LinXFade2 +List +ListComprehensions +ListDUGen +ListPattern +ListPattern +ListView +Literals +LocalBuf +LocalBuf +LocalIn +LocalOut +log +log10 +log2 +Logistic +Logistic +loop +LorenzL +LorenzL +Loudness +Loudness +LPF +LPF +LPZ1 +LPZ1 +LPZ2 +LPZ2 +Magnitude +Main +MantissaMask +MantissaMask +matchItem +max +MaxLocalBufs +MaxLocalBufs +Maybe +Median +Median +Method +Method-Calls +MFCC +MFCC +MidEQ +MidEQ +MIDI +midicps +MIDIIn +MIDIOut +MIDIResponder +min +Mix +modifiers +Modifying_Standalones +modulo +Monitor +MonitorGui +MoogFF +MoogFF +More-On-Getting-Help +MostChange +MostChange +MouseButton +MouseButton +MouseX +MouseX +MouseY +MouseY +MovieView +MulAdd +MultiChannel +MultiLevelIdentityDictionary +MultiOutUGen +multiplication +MultiSliderView +MultiTap +NamedControl +NAryOpFunction +NAryOpStream +Ndef +NdefGui +NdefMixer +NdefMixerOld +NdefParamGui +neg +NetAddr +Nil +Node +NodeControl +NodeEvent +NodeMap +NodeMessaging +NodeProxy +NodeProxyEditor +NodeProxy_roles +NodeWatcher +Non-Realtime-Synthesis +Normalizer +Normalizer +NoteOnResponder +Notes-on-the-HTML-Help-System +NotificationCenter +NRand +NRand +NRand +NumAudioBuses +Number +NumberBox +NumBuffers +NumControlBuses +NumInputBuses +NumOutputBuses +NumRunningSynths +Object +ObjectGui +ObjectTable +octcps +OffsetOut +OnePole +OnePole +OneZero +OneZero +Onsets +Onsets +Operators +Order +Order-of-execution +OrderedIdentitySet +Osc +Osc +OSCBundle +OscN +OscN +OSCpathResponder +OSCresponder +OSCresponderNode +OSC_communication +Out +OutputProxy +PAbstractGroup +PackFFT +Padd +Padd +Paddp +Paddp +Paddpre +Paddpre +Pair +Pan2 +Pan2 +Pan4 +Pan4 +PanAz +PanAz +PanB +PanB +PanB2 +PanB2 +Panner +PartConv +Partial-Application +PathName +Pattern +PatternConductor +PatternProxy +PatternProxy +PatternsDocumentedAndNot +Pause +Pause +PauseSelf +PauseSelf +PauseSelfWhenDone +Pavaroh +Pavaroh +Pbeta +Pbeta +Pbind +Pbind +Pbindef +Pbindef +Pbindf +Pbindf +PbindProxy +PbindProxy +Pbinop +Pbinop +Pbrown +Pbrown +Pbus +Pbus +Pcauchy +Pcauchy +Pchain +Pchain +Pclump +Pclutch +Pclutch +Pcollect +Pcollect +Pconst +Pconst +Pdef +Pdef +PdefAllGui +PdefEditor +PdefGui +Pdefn +Pdefn +PdegreeToKey +PdegreeToKey +Pdfsm +Pdfsm +Pdict +Pdict +Pdiff +Pdrop +PdurStutter +PdurStutter +Peak +Peak +PeakFollower +PeakFollower +Pen +Penvir +Penvir +Pevent +Peventmod +Pexprand +Pexprand +PfadeIn +PfadeOut +Pfin +Pfin +Pfindur +Pfindur +PfinQuant +Pfinval +Pfinval +Pflatten +Pflow +Pflow +Pfpar +Pfset +Pfset +Pfsm +Pfsm +Pfunc +Pfunc +Pfuncn +Pfuncn +Pfx +Pfx +Pfxb +Pfxb +Pgate +Pgate +Pgauss +Pgauss +Pgbrown +Pgbrown +Pgeom +Pgeom +Pget +Pgpar +Pgpar +Pgroup +Pgroup +Pgtpar +PG_01_Introduction +PG_02_Basic_Vocabulary +PG_03_What_Is_Pbind +PG_04_Words_to_Phrases +PG_05_Math_on_Patterns +PG_060_Filter_Patterns +PG_06a_Repetition_Contraint_Patterns +PG_06b_Time_Based_Patterns +PG_06c_Composition_of_Patterns +PG_06d_Parallel_Patterns +PG_06e_Language_Control +PG_06f_Server_Control +PG_06g_Data_Sharing +PG_07_Value_Conversions +PG_08_Event_Types_and_Parameters +PG_Cookbook01_Basic_Sequencing +PG_Cookbook02_Manipulating_Patterns +PG_Cookbook03_External_Control +PG_Cookbook04_Sending_MIDI +PG_Cookbook05_Using_Samples +PG_Cookbook06_Phrase_Network +PG_Cookbook07_Rhythmic_Variations +PG_Ref01_Pattern_Internals +Phasor +Phasor +Phid +Phid +PhidKey +PhidKey +PhidSlot +PhidSlot +Phprand +Phprand +Pif +Pif +Pindex +Pindex +PingPong +PinkerNoise +PinkNoise +PinkNoise +Pipe +Pitch +Pitch +Pitch +PitchShift +PitchShift +Pkey +Pkey +Place +Place +Plag +Plambda +Plambda +Platform +play +PlayBuf +PlayBuf +playN +Plazy +Plazy +PlazyEnvir +PlazyEnvir +PlazyEnvirN +PlazyEnvirN +Plet +plot +Plotter +Plprand +Plprand +Pluck +Pluck +Pmeanrand +Pmeanrand +Pmono +Pmono +PmonoArtic +PmonoArtic +PMOsc +PMOsc +Pmul +Pmul +Pmulp +Pmulp +Pmulpre +Pmulpre +Pn +Pn +Pnaryop +Pnaryop +Pnsym +Pnsym +Pnsym1 +Point +Polar +Poll +Poll +Polymorphism +PopUpMenu +Post +pow +Ppar +Ppar +PparGroup +Ppatlace +Ppatlace +Ppatmod +Ppatmod +Pplayer +Ppoisson +Ppoisson +Pprob +Pprob +Pprotect +Pprotect +Pproto +Pproto +Prand +Prand +Preject +Preject +Prewrite +Prewrite +PriorityQueue +Process +Prorate +Prorate +Prout +Prout +Proutine +Proutine +ProxyMixer +ProxyMixerOld +ProxyMonitorGui +ProxySpace +proxyspace_examples +ProxySynthDef +Pseed +Pseed +Pseg +Pseg +Pselect +Pselect +Pseq +Pseq +Pser +Pser +Pseries +Pseries +Pset +Pset +Psetp +Psetp +Psetpre +Psetpre +Pshuf +Pshuf +PSinGrain +Pslide +Pslide +Pspawn +Pspawn +Pspawner +Pspawner +Pstep +Pstep +Pstep2add +Pstep3add +PstepNadd +PstepNadd +PstepNfunc +PstepNfunc +Pstretch +Pstretchp +Pstutter +Pstutter +Pswitch +Pswitch +Pswitch1 +Pswitch1 +Psym +Psym +Psym1 +Psync +Psync +Ptime +Ptime +Ptpar +Ptpar +Ptrace +Ptsym +Ptuple +Ptuple +publishing_code +Pulse +Pulse +PulseCount +PulseDivider +Punop +Punop +pvcalc +pvcalc2 +pvcollect +PV_Add +PV_BinScramble +PV_BinShift +PV_BinWipe +PV_BrickWall +PV_ChainUGen +PV_ChainUGen +PV_ConformalMap +PV_Conj +PV_Copy +PV_CopyPhase +PV_Diffuser +PV_Div +PV_HainsworthFoote +PV_JensenAndersen +PV_LocalMax +PV_MagAbove +PV_MagBelow +PV_MagClip +PV_MagDiv +PV_MagFreeze +PV_MagMul +PV_MagNoise +PV_MagShift +PV_MagSmear +PV_MagSquared +PV_Max +PV_Min +PV_Mul +PV_PhaseShift +PV_PhaseShift270 +PV_PhaseShift90 +PV_RandComb +PV_RandWipe +PV_RectComb +PV_RectComb2 +Pwalk +Pwalk +Pwhile +Pwhile +Pwhite +Pwhite +Pwrand +Pwrand +Pwrap +Pwrap +Pxrand +Pxrand +QuadC +QuadC +QuadL +QuadL +QuadN +QuadN +Quant +Quark +Quarks +RadiansPerSample +Ramp +Ramp +Rand +Rand +Rand +RandID +RandID +Randomness +randomSeed +RandSeed +RandSeed +RangeSlider +RawArray +RawPointer +reciprocal +RecNodeProxy +RecordBuf +RecordBuf +Rect +recursive_phrasing +Ref +RefCopy +Regenerate-GUI-Help +ReplaceOut +resize +Resonz +Resonz +RHPF +RHPF +ring1 +ring2 +ring3 +ring4 +Ringz +Ringz +RLPF +RLPF +RootNode +Rossler +Rotate2 +Rotate2 +round +Routine +runMe +runMe2 +RunningMax +RunningMax +RunningMin +RunningMin +RunningSum +RunningSum +SampleDur +SampleRate +Saw +Saw +SC2DSlider +SC2DTabletSlider +Scale +scaleneg +SCButton +SCCompositeView +SCContainerView +SCControlView +SCDragBoth +SCDragSink +SCDragSource +SCDragView +SCEnvelopeEdit +SCEnvelopeView +SCFont +SCFreqScope +SCFreqScopeWindow +Scheduler +SCHLayoutView +Schmidt +Schmidt +SCImage +SCImageFilter +SCImageKernel +SCKnob +SCLayoutView +SCLevelIndicator +SCListView +SCMenuGroup +SCMenuItem +SCMenuSeparator +SCModalSheet +SCModalWindow +SCMovieView +SCMultiSliderView +SCNumberBox +Scope +ScopeOut +ScopeOut2 +ScopeView +Score +SCPen +SCPopUpMenu +SCQuartzComposerView +SCRangeSlider +ScrollView +SCScope +SCScrollTopView +SCScrollView +SCSlider +SCSliderBase +SCSoundFileView +SCStaticText +SCStaticTextBase +SCStethoscope +SCTabletView +SCTextField +SCTextView +SCTopView +SCUserView +SCUserView-Subclassing +SCView +SCVLayoutView +SCWindow +Select +Select +SelectX +SelectX +SelectXFocus +SelectXFocus +Semaphore +SendPeakRMS +SendReply +SendTrig +SequenceableCollection +SerialPort +Server +Server-Architecture +Server-Command-Reference +ServerBoot +ServerOptions +ServerQuit +ServerTiming +ServerTree +Set +SetBuf +SetResetFF +Shaper +Shaper +SharedIn +SharedOut +Shortcuts +sign +Signal +Silent +Silent +SimpleController +SimpleNumber +sin +sinh +SinOsc +SinOsc +SinOscFB +SkipJack +Slew +Slew +Slider +Slider2D +Slope +Slope +Slope +softclip +softPut +softSet +softVol_ +somepage +SortedList +SOS +SOS +SoundFile +SoundFileView +SoundFileViewProgressWindow +SoundIn +SparseArray +Spawner +Spec +SpecCentroid +SpecCentroid +SpecFlatness +SpecFlatness +SpecPcile +SpecPcile +Splay +SplayAz +SplayZ +Spring +Spring +sqrdif +sqrsum +sqrt +squared +StandardL +StandardL +StandardN +StandardN +StartUp +StaticText +Stepper +StereoConvolution2L +Stethoscope +Stream +StreamClutch +Streams +Streams-Patterns-Events1 +Streams-Patterns-Events2 +Streams-Patterns-Events3 +Streams-Patterns-Events4 +Streams-Patterns-Events5 +Streams-Patterns-Events6 +Streams-Patterns-Events7 +String +StubTemplate +SubsampleOffset +subtraction +sumsqr +Sweep +switch +Symbol +SymbolArray +SymbolicNotations +SyncSaw +SyncSaw +Syntax-Shortcuts +Synth +Synth-Controlling-UGens +Synth-Definition-File-Format +SynthDef +SynthDesc +SynthDescLib +SystemClock +T2A +T2A +T2K +T2K +TabFileReader +TabletSlider2D +TabletView +tan +tanh +Tap +Tap +Task +TaskProxy +TaskProxy +TaskProxyGui +TBall +TBall +TChoose +Tdef +Tdef +TdefAllGui +TdefEditor +TdefGui +TDelay +TDelay +TDuty +TDuty +TempoBusClock +TempoClock +TExpRand +TExpRand +TextField +TextView +TGrains +TGrains +TGrains +the_lazy_proxy +Thread +thresh +Thunk +Timer +TIRand +TIRand +ToggleFF +TopicHelpTemplate +Tour_of_UGens +TRand +TRand +Trig +Trig1 +TrigControl +True +trunc +Tuning +Tutorial +TWChoose +TWChoose +TWindex +TWindex +TwoPole +TwoPole +TwoWayIdentityDictionary +TwoZero +TwoZero +UGen +UGen-doneActions +UGenHelpTemplate +UGens +UGens-and-Synths +UnaryOpFunction +UnaryOpStream +UnaryOpUGen +Understanding-Errors +Undocumented-Classes +UniqueID +UnixFILE +Unpack1FFT +UnpackFFT +UserView +Using-Extensions +Using-the-Startup-File +UsingMIDI +VarLag +VarSaw +VarSaw +VDiskIn +VDiskIn +VDiskIn +Vibrato +View +ViewRedirect +VLayoutView +Volume +VOsc +VOsc +VOsc3 +VOsc3 +Warp +Warp1 +Warp1 +Warp1 +Wavetable +WhiteNoise +WhiteNoise +WidthFirstUGen +WiiMote +WikiUsage +Window +Wrap +Wrap +wrap2 +WrapIndex +WrapIndex +Writing-Classes +Writing_Unit_Generators +XFade +XFade2 +XFade2 +XLine +XLine +XOut +ZeroCrossing +ZeroCrossing diff --git a/elpa/auto-complete-20140803.2118/dict/sh-mode b/elpa/auto-complete-20140803.2118/dict/sh-mode new file mode 100644 index 000000000..df66ae35c --- /dev/null +++ b/elpa/auto-complete-20140803.2118/dict/sh-mode @@ -0,0 +1,182 @@ +# Bash Family Shell Dictionary +# http://www.gnu.org/software/bash/manual/bash.html + +. +: +[ +alias +bg +bind +break +builtin +caller +cd +command +compgen +complete +compopt +continue +declare +dirs +disown +echo +enable +eval +exec +exit +export +fc +fg +getopts +hash +help +history +jobs +kill +let +local +logout +mapfile +popd +printf +pushd +pwd +read +readarray +readonly +return +set +shift +shopt +source +suspend +test +times +trap +type +typeset +ulimit +umask +unalias +unset +wait +! +[[ +]] +case +do +done +elif +else +esac +fi +for +function +if +in +select +then +time +until +while +{ +} +! +# +$ +* +- +0 +? +@ +_ +BASH +BASH_ALIASES +BASH_ARGC +BASH_ARGV +BASH_CMDS +BASH_COMMAND +BASH_ENV +BASH_EXECUTION_STRING +BASH_LINENO +BASH_REMATCH +BASH_SOURCE +BASH_SUBSHELL +BASH_VERSINFO +BASH_VERSION +BASH_XTRACEFD +BASHOPTS +BASHPID +CDPATH +COLUMNS +COMP_CWORD +COMP_KEY +COMP_LINE +COMP_POINT +COMP_TYPE +COMP_WORDBREAKS +COMP_WORDS +COMPREPLY +DIRSTACK +EMACS +EUID +FCEDIT +FIGNORE +FUNCNAME +GLOBIGNORE +GROUPS +HISTCMD +HISTCONTROL +HISTFILE +HISTFILESIZE +HISTIGNORE +HISTSIZE +HISTTIMEFORMAT +HOME +HOSTFILE +HOSTNAME +HOSTTYPE +IFS +IGNOREEOF +INPUTRC +LANG +LC_ALL +LC_COLLATE +LC_CTYPE +LC_MESSAGES +LC_MESSAGES +LC_NUMERIC +LINENO +LINES +MACHTYPE +MAIL +MAILCHECK +MAILPATH +OLDPWD +OPTARG +OPTERR +OPTIND +OSTYPE +PATH +PIPESTATUS +POSIXLY_CORRECT +PPID +PROMPT_COMMAND +PROMPT_DIRTRIM +PS1 +PS2 +PS3 +PS4 +PWD +RANDOM +REPLY +SECONDS +SHELL +SHELLOPTS +SHLVL +TEXTDOMAIN +TEXTDOMAINDIR +TIMEFORMAT +TMOUT +TMPDIR +UID diff --git a/elpa/auto-complete-20140803.2118/dict/tcl-mode b/elpa/auto-complete-20140803.2118/dict/tcl-mode new file mode 100644 index 000000000..07a128151 --- /dev/null +++ b/elpa/auto-complete-20140803.2118/dict/tcl-mode @@ -0,0 +1,172 @@ +after +append +apply +array +auto_execok +auto_import +auto_load +auto_load_index +auto_mkindex +auto_mkindex_old +auto_qualify +auto_reset +bell +binary +bind +bindtags +break +button +canvas +case +catch +cd +chan +checkbutton +clipboard +clock +close +concat +continue +destroy +dict +encoding +entry +eof +error +eval +event +exec +exit +expr +fblocked +fconfigure +fcopy +file +fileevent +flush +focus +font +for +foreach +format +frame +gets +glob +global +grab +grid +if +image +incr +info +interp +join +label +labelframe +lappend +lassign +lindex +linsert +list +listbox +llength +load +lower +lrange +lrepeat +lreplace +lreverse +lsearch +lset +lsort +menu +menubutton +message +namespace +open +option +pack +package +panedwindow +pid +pkg_mkIndex +place +proc +puts +pwd +radiobutton +raise +read +regexp +registry +regsub +rename +return +scale +scan +scrollbar +seek +selection +set +socket +source +spinbox +split +string +subst +switch +tclLog +tclPkgSetup +tclPkgUnknown +tcl_findLibrary +tell +text +time +tk +tk_chooseColor +tk_chooseDirectory +tk_getOpenFile +tk_getSaveFile +tk_menuSetFocus +tk_messageBox +tk_popup +tk_textCopy +tk_textCut +tk_textPaste +tkwait +toplevel +ttk::button +ttk::checkbutton +ttk::combobox +ttk::entry +ttk::focusFirst +ttk::frame +ttk::label +ttk::labelframe +ttk::menubutton +ttk::notebook +ttk::paned +ttk::panedwindow +ttk::progressbar +ttk::radiobutton +ttk::scale +ttk::scrollbar +ttk::separator +ttk::setTheme +ttk::sizegrip +ttk::style +ttk::takefocus +ttk::themes +ttk::treeview +trace +unknown +unload +unset +update +uplevel +upvar +variable +vwait +while +winfo +wm diff --git a/elpa/auto-complete-20140803.2118/dict/ts-mode b/elpa/auto-complete-20140803.2118/dict/ts-mode new file mode 100644 index 000000000..ffe377f98 --- /dev/null +++ b/elpa/auto-complete-20140803.2118/dict/ts-mode @@ -0,0 +1,797 @@ +absRefPrefix +accessibility +accessibilityWrap +accessKey +ACT +ACTIFSUB +ACTIVSUBRO +ACTRO +addAttributes +addExtUrlsAndShortCuts +additionalHeaders +additionalParams +addParams +addQueryString +addQueryString +adjustItemsH +adjustSubItemsH +adminPanelStyles +after +age +align +align.field +all +allowedAttribs +allowedGroups +allowEdit +allowNew +allowTags +allStdWrap +allWrap +alternativeSortingField +alternativeTempPath +altImgResource +altTarget +altText +alwaysActivePIDlist +alwaysLink +andWhere +angle +antiAlias +append +applyTotalH +applyTotalW +arrayReturnMode +arrowACT +arrowImgParams +arrowNO +ATagBeforeWrap +ATagParams +ATagTitle +atLeast +atMost +authcodeFields +autoInsertPID +autostart +backColor +badMess +base64 +baseURL +beforeImg +beforeImgLink +beforeImgTagParams +beforeROImg +beforeWrap +begin +begin +beginAtLevel +beLoginLinkIPList +beLoginLinkIPList_login +beLoginLinkIPList_logout +beUserLogin +bgImg +blankStrEqFalse +blur +bm +bodyTag +bodyTag +bodyTagAdd +bodyTagCObject +bodyTagMargins +border +border +borderCol +bordersWithin +borderThick +bottomContent +bottomHeight +br +breakSpace +breakWidth +brTag +bytes +c +cache_clearAtMidnight +cached +cache_period +caption +captionAlign +captionSplit +case +case +CASE +casesensitiveComp +cellpadding +cellspacing +char +charcoal +clearCacheOfPages +cMargins +COA +COA_INT +cObject +cObjNum +code +collapse +color +color1 +color2 +color3 +color.default +color.field +colRelations +cols +cols +colSpace +COLUMNS +COMMENT +commentWrap +compensateFieldWidth +compX +compY +concatenateJsAndCss +conf +config +config +CONFIG +constants +CONTENT +content_fallback +content_from_pid_allowOutsideDomain +controllerActionName +controllerExtensionName +controllerName +crop +cropHTML +csConv +cssInline +CSS_inlineStyle +CTABLE +CUR +CURIFSUB +CURIFSUBRO +current +CURRO +cWidth +data +dataArray +dataWrap +date +debug +debugData +debugFunc +debugItemConf +debugRenumberedObject +decimals +dec_point +default +defaultAlign +defaultCmd +defaultCode +defaultGetVars +delete +denyTags +depth +dimensions +directImageLink +directionLeft +directionUp +directReturn +disableAllHeaderCode +disableAltText +disableCharsetHeader +disableImgBorderAttr +disablePageExternalUrl +disablePrefixComment +disablePreviewNotification +displayActiveOnLoad +displayActiveOnLoad +displayrecord +distributeX +distributeY +doctype +doctypeSwitch +doNotLinkIt +doNotShowLink +doNotStripHTML +dontCheckPid +dontFollowMouse +dontHideOnMouseUp +dontLinkIfSubmenu +dontMd5FieldNames +dontWrapInTable +doubleBrTag +doublePostCheck +dWorkArea +edge +edit +editIcons +editIcons +editPanel +EDITPANEL +EDITPANEL +effects +email +emailMess +emboss +emptyTitleHandling +emptyTitleHandling +emptyTitleHandling +enable +enableContentLengthHeader +encapsLines +encapsLinesStdWrap +encapsTagList +entryLevel +equalH +equals +evalErrors +evalFunc +excludeDoktypes +excludeNoSearchPages +excludeUidList +expAll +explode +ext +extbase +externalBlocks +extOnReady +extTarget +face.default +face.field +FEData +fe_userEditSelf +fe_userOwnSelf +field +fieldPrefix +fieldRequired +fieldWrap +file +FILE +filelink +fileList +fileTarget +firstLabel +firstLabelGeneral +flip +flop +foldSpeed +foldTimer +fontFile +fontSize +fontSizeMultiplicator +fontTag +footerData +forceAbsoluteUrl +forceTypeValue +FORM +format +formName +formurl +frame +frameReloadIfNotInFrameset +frameSet +freezeMouseover +ftu +gamma +gapBgCol +gapLineCol +gapLineThickness +gapWidth +gif +GIFBUILDER +globalNesting +GMENU +goodMess +gray +gr_list +groupBy +headerComment +headerData +headTag +height +hiddenFields +hide +hideButCreateMap +hideMenuTimer +hideMenuWhenNotOver +hideNonTranslated +highColor +HMENU +hover +hoverStyle +HRULER +HTML +html5 +htmlmail +HTMLparser +htmlSpecialChars +htmlTag_dir +htmlTag_langKey +htmlTag_setParams +http +icon +iconCObject +icon_image_ext_list +icon_link +icon_thumbSize +if +ifBlank +ifEmpty +IFSUB +IFSUBRO +ignore +IMAGE +image_compression +image_effects +image_frames +imgList +imgMap +imgMapExtras +imgMax +imgNameNotRandom +imgNamePrefix +imgObjNum +imgParams +imgPath +imgStart +IMGTEXT +import +inBranch +includeCSS +includeJS +includeJSFooter +includeJSFooterlibs +includeJSlibs +includeLibrary +includeLibs +includeNotInMenu +incT3Lib_htmlmail +index_descrLgd +index_enable +index_externals +index_metatags +infomail +inlineJS +inlineLanguageLabel +inlineSettings +inlineStyle2TempFile +innerStdWrap_all +innerWrap +innerWrap2 +inputLevels +insertClassesFromRTE +insertData +intensity +intTarget +intval +invert +IProcFunc +isFalse +isGreaterThan +isInList +isLessThan +isPositive +isTrue +itemArrayProcFunc +items +iterations +javascriptLibs +join +jpg +jsFooterInline +jsInline +JSMENU +JSwindow +JSwindow.altUrl +JSwindow.altUrl_noDefaultParams +JSwindow.expand +JSwindow.newWindow +JSwindow_params +jumpurl +jumpurl_enable +jumpurl_mailto_disable +keep +keepNonMatchedTags +keywords +keywordsField +labelStdWrap +labelWrap +lang +language +language_alt +languageField +layer_menu_id +layerStyle +layout +layoutRootPath +leftjoin +leftOffset +levels +limit +lineColor +lineThickness +linkAccessRestrictedPages +linkParams +linkVars +linkWrap +list +listNum +lm +LOAD_REGISTER +locale_all +localNesting +locationData +lockFilePath +lockPosition +lockPosition_addSelf +lockPosition_adjust +loginUser +longdescURL +loop +lowColor +lower +mailto +main +mainScript +makelinks +markers +markerWrap +mask +max +maxAge +maxH +maxHeight +maxItems +maxW +maxWidth +maxWInText +m.bgImg +m.bottomImg +m.bottomImg_mask +md5 +meaningfulTempFilePrefix +menuBackColor +menuHeight +menuOffset +menuWidth +message_page_is_being_generated +message_preview +message_preview_workspace +meta +metaCharset +method +minH +minifyCSS +minifyJS +minItems +minItems +minW +m.mask +moveJsFromHeaderToFooter +MP_defaults +MP_disableTypolinkClosestMPvalue +MP_mapRootPoints +MULTIMEDIA +name +namespaces +negate +newRecordFromTable +newRecordInPid +next +niceText +NO +noAttrib +noBlur +no_cache +noCols +noLink +noLinkUnderline +nonCachedSubst +none +nonTypoTagStdWrap +nonTypoTagUserFunc +nonWrappedTag +noOrderBy +noPageTitle +noResultObj +normalWhenNoLanguage +noRows +noScale +noScaleUp +noscript +noStretchAndMarginCells +notification_email_charset +notification_email_encoding +notification_email_urlmode +noTrimWrap +noValueInsert +noWrapAttr +numberFormat +numRows +obj +offset +offset +_offset +offsetWrap +onlyCurrentPid +opacity +options +orderBy +OTABLE +outerWrap +outline +output +outputLevels +override +overrideAttribs +overrideEdit +overrideId +PAGE +pageGenScript +pageRendererTemplateFile +pageTitleFirst +parameter +params +parseFunc +parseFunc +parseValues +partialRootPath +path +pidInList +pixelSpaceFontSizeRef +plainTextStdWrap +pluginNames +png +postCObject +postUserFunc +postUserFunkInt +preCObject +prefixComment +prefixLocalAnchors +prefixLocalAnchors +prefixRelPathWith +preIfEmptyListNum +prepend +preUserFunc +prev +previewBorder +printBeforeContent +prioriCalc +processScript +properties +protect +protectLvar +quality +quality +radioInputWrap +radioWrap +range +range +rawUrlEncode +recipient +RECORDS +recursive +redirect +reduceColors +relativeToParentLayer +relativeToTriggerItem +relPathPrefix +remap +remapTag +removeBadHTML +removeDefaultJS +removeIfEquals +removeIfFalse +removeObjectsOfDummy +removePrependedNumbers +removeTags +removeWrapping +renderCharset +renderObj +renderWrap +REQ +required +required +resources +resultObj +returnKey +returnLast +reverseOrder +rightjoin +rm +rmTagIfNoAttrib +RO_chBgColor +rootline +rotate +rows +rowSpace +sample +sample +section +sectionIndex +select +sendCacheHeaders +sendCacheHeaders_onlyWhenLoginDeniedInBranch +separator +setContentToCurrent +setCurrent +setfixed +setFixedHeight +setFixedWidth +setJS_mouseOver +setJS_openPic +setKeywords +shadow +sharpen +shear +short +shortcutIcon +showAccessRestrictedPages +showActive +showFirst +simulateStaticDocuments +simulateStaticDocuments_addTitle +simulateStaticDocuments_dontRedirectPathInfoError +simulateStaticDocuments_noTypeIfNoTitle +simulateStaticDocuments_pEnc +simulateStaticDocuments_pEnc_onlyP +simulateStaticDocuments_replacementChar +sitetitle +size +size.default +size.field +slide +smallFormFields +solarize +source +space +spaceAfter +spaceBefore +spaceBelowAbove +spaceLeft +spaceRight +spacing +spamProtectEmailAddresses +spamProtectEmailAddresses_atSubst +spamProtectEmailAddresses_lastDotSubst +SPC +special +split +splitRendering +src +stat +stat_apache +stat_apache_logfile +stat_apache_niceTitle +stat_apache_noHost +stat_apache_noRoot +stat_apache_notExtended +stat_apache_pagenames +stat_excludeBEuserHits +stat_excludeIPList +stat_mysql +stat_pageLen +stat_titleLen +stat_typeNumList +stayFolded +stdWrap +stdWrap2 +strftime +stripHtml +stripProfile +stylesheet +submenuObjSuffixes +subMenuOffset +subparts +subst_elementUid +subst_elementUid +substMarksSeparately +substring +swirl +sword +sword_noMixedCase +sword_standAlone +sys_language_mode +sys_language_overlay +sys_language_softExclude +sys_language_softMergeIfNotBlank +sys_language_uid +sys_page +table +tableParams +tables +tableStdWrap +tableStyle +tags +target +TCAselectItem +TDparams +template +TEMPLATE +templateFile +text +TEXT +textMargin +textMargin_outOfText +textMaxLength +textObjNum +textPos +textStyle +thickness +thousands_sep +title +titleTagFunction +titleText +titleText +tm +TMENU +token +topOffset +totalWidth +transparentBackground +transparentColor +trim +twice +typeNum +types +typolink +typolinkCheckRootline +typolinkEnableLinksAcrossDomains +typolinkLinkAccessRestrictedPages +typolinkLinkAccessRestrictedPages_addParams +uid +uidInList +uniqueGlobal +uniqueLinkVars +uniqueLocal +unset +unsetEmpty +upper +url +useCacheHash +useLargestItemX +useLargestItemY +USER +USERDEF1 +USERDEF1RO +USERDEF2RO +USERFEF2 +userFunc +userFunc_updateArray +userIdColumn +USER_INT +USERNAME_substToken +USERUID_substToken +USR +USRRO +value +variables +wave +where +width +wordSpacing +workArea +workOnSubpart +wrap +wrap2 +wrap3 +wrapAlign +wrapFieldName +wrapItemAndSub +wrapNoWrappedLines +wraps +xhtml_11 +xhtml_2 +xhtml_basic +xhtml_cleaning +xhtmlDoctype +xhtml_frames +xhtml+rdfa_10 +xhtml_strict +xhtml_trans +xml_10 +xml_11 +xmlprologue +xPosOffset +yPosOffset diff --git a/elpa/auto-complete-20140803.2118/dict/tuareg-mode b/elpa/auto-complete-20140803.2118/dict/tuareg-mode new file mode 100644 index 000000000..e709f9f62 --- /dev/null +++ b/elpa/auto-complete-20140803.2118/dict/tuareg-mode @@ -0,0 +1,231 @@ +# OCaml 3.12.1 + +# Keywords +and +as +assert +begin +class +constraint +do +done +downto +else +end +exception +external +false +for +fun +function +functor +if +in +include +inherit +initializer +lazy +let +match +method +module +mutable +new +object +of +open +or +private +rec +sig +struct +then +to +true +try +type +val +virtual +when +while +with + +# Pervasives +! +!= +& +&& +* +** +*. ++ ++. +- +-. +/ +/. +:= +< +<= +<> += +== +> +>= +@ +FP_infinite +FP_nan +FP_normal +FP_subnormal +FP_zero +LargeFile +Open_append +Open_binary +Open_creat +Open_nonblock +Open_rdonly +Open_text +Open_trunc +Open_wronly +Oupen_excl +^ +^^ +abs +abs_float +acos +asin +asr +at_exit +atan +atan2 +bool_of_string +ceil +char_of_int +classify_float +close_in +close_in_noerr +close_out +close_out_noerr +compare +cos +cosh +decr +do_at_exit +epsilon_float +exit +exp +expm1 +failwith +float +float_of_int +float_of_string +floor +flush +flush_all +format +format4 +format_of_string +fpclass +frexp +fst +ignore +in_channel +in_channel_length +incr +infinity +input +input_binary_int +input_byte +input_char +input_line +input_value +int_of_char +int_of_float +int_of_string +invalid_arg +land +ldexp +lnot +log +log10 +log1p +lor +lsl +lsr +lxor +max +max_float +max_int +min +min_float +min_int +mod +mod_float +modf +nan +neg_infinity +not +open_flag +open_in +open_in_bin +open_in_gen +open_out +open_out_bin +open_out_gen +or +out_channel +out_channel_length +output +output_binary_int +output_byte +output_char +output_string +output_value +pos_in +pos_out +pred +prerr_char +prerr_endline +prerr_float +prerr_int +prerr_newline +prerr_string +print_char +print_endline +print_float +print_int +print_newline +print_string +raise +read_float +read_int +read_line +really_input +ref +seek_in +seek_out +set_binary_mode_in +set_binary_mode_out +sin +sinh +snd +sqrt +stderr +stdin +stdout +string_of_bool +string_of_float +string_of_format +string_of_int +succ +tan +tanh +truncate +unsafe_really_input +valid_float_lexem +|| +~ +~+ +~+. +~- +~-. diff --git a/elpa/auto-complete-20140803.2118/dict/verilog-mode b/elpa/auto-complete-20140803.2118/dict/verilog-mode new file mode 100644 index 000000000..acc2f3228 --- /dev/null +++ b/elpa/auto-complete-20140803.2118/dict/verilog-mode @@ -0,0 +1,313 @@ +`define +`else +`endif +`ifdef +`ifndef +`macromodule +`module +`primitive +`timescale +above +abs +absdelay +ac_stim +acos +acosh +alias +aliasparam +always +always_comb +always_ff +always_latch +analog +analysis +and +asin +asinh +assert +assign +assume +atan +atan2 +atanh +automatic +before +begin +bind +bins +binsof +bit +branch +break +buf +bufif0 +bufif1 +byte +case +casex +casez +cell +chandle +class +clocking +cmos +config +connectmodule +connectrules +const +constraint +context +continue +cos +cosh +cover +covergroup +coverpoint +cross +ddt +ddx +deassign +default +define +defparam +design +disable +discipline +dist +do +driver_update +edge +else +end +endcase +endclass +endclocking +endconfig +endconnectrules +enddiscipline +endfunction +endgenerate +endgroup +endif +endinterface +endmodule +endnature +endpackage +endparamset +endprimitive +endprogram +endproperty +endsequence +endspecify +endtable +endtask +enum +event +exclude +exp +expect +export +extends +extern +final +final_step +first_match +flicker_noise +floor +flow +for +force +foreach +forever +fork +forkjoin +from +function +generate +genvar +ground +highz0 +highz1 +hypot +idt +idtmod +if +ifdef +iff +ifndef +ifnone +ignore_bins +illegal_bins +import +incdir +include +inf +initial +initial_step +inout +input +inside +instance +int +integer +interface +intersect +join +join_any +join_none +laplace_nd +laplace_np +laplace_zd +laplace_zp +large +last_crossing +liblist +library +limexp +ln +local +localparam +log +logic +longint +macromodule +mailbox +matches +max +medium +min +modport +module +nand +nand +nature +negedge +net_resolution +new +nmos +nmos +noise_table +nor +noshowcancelled +not +notif0 +notif1 +null +or +output +package +packed +parameter +paramset +pmos +pmos +posedge +potential +pow +primitive +priority +program +property +protected +pull0 +pull1 +pullup +pulsestyle_ondetect +pulsestyle_onevent +pure +rand +randc +randcase +randcase +randsequence +rcmos +real +realtime +ref +reg +release +repeat +return +rnmos +rpmos +rtran +rtranif0 +rtranif1 +scalared +semaphore +sequence +shortint +shortreal +showcancelled +signed +sin +sinh +slew +small +solve +specify +specparam +sqrt +static +string +strong0 +strong1 +struct +super +supply +supply0 +supply1 +table +tagged +tan +tanh +task +then +this +throughout +time +timeprecision +timer +timescale +timeunit +tran +tran +tranif0 +tranif1 +transition +tri +tri +tri0 +tri1 +triand +trior +trireg +type +typedef +union +unique +unsigned +use +uwire +var +vectored +virtual +void +wait +wait_order +wand +weak0 +weak1 +while +white_noise +wildcard +wire +with +within +wor +wreal +xnor +xor +zi_nd +zi_np +zi_zd diff --git a/elpa/cider-0.7.0/cider-autoloads.el b/elpa/cider-0.7.0/cider-autoloads.el new file mode 100644 index 000000000..bfa78b708 --- /dev/null +++ b/elpa/cider-0.7.0/cider-autoloads.el @@ -0,0 +1,128 @@ +;;; cider-autoloads.el --- automatically extracted autoloads +;; +;;; Code: + + +;;;### (autoloads (cider-connect cider-jack-in cider-version) "cider" +;;;;;; "cider.el" (21478 17731 0 0)) +;;; Generated autoloads from cider.el + +(autoload 'cider-version "cider" "\ +Display CIDER's version. + +\(fn)" t nil) + +(autoload 'cider-jack-in "cider" "\ +Start a nREPL server for the current project and connect to it. +If PROMPT-PROJECT is t, then prompt for the project for which to +start the server. + +\(fn &optional PROMPT-PROJECT)" t nil) + +(autoload 'cider-connect "cider" "\ +Connect to an nREPL server identified by HOST and PORT. + +\(fn HOST PORT)" t nil) + +(eval-after-load 'clojure-mode '(progn (define-key clojure-mode-map (kbd "C-c M-j") 'cider-jack-in) (define-key clojure-mode-map (kbd "C-c M-c") 'cider-connect))) + +;;;*** + +;;;### (autoloads (cider-inspect) "cider-inspector" "cider-inspector.el" +;;;;;; (21478 17731 0 0)) +;;; Generated autoloads from cider-inspector.el + +(autoload 'cider-inspect "cider-inspector" "\ +Eval the string EXPRESSION and inspect the result. + +\(fn EXPRESSION)" t nil) + +;;;*** + +;;;### (autoloads (cider-macroexpand-all cider-macroexpand-1) "cider-macroexpansion" +;;;;;; "cider-macroexpansion.el" (21478 17731 0 0)) +;;; Generated autoloads from cider-macroexpansion.el + +(autoload 'cider-macroexpand-1 "cider-macroexpansion" "\ +Invoke 'macroexpand-1' on the expression preceding point. +If invoked with a PREFIX argument, use 'macroexpand' instead of +'macroexpand-1'. + +\(fn &optional PREFIX)" t nil) + +(autoload 'cider-macroexpand-all "cider-macroexpansion" "\ +Invoke 'clojure.walk/macroexpand-all' on the expression preceding point. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (cider-mode cider-mode-line) "cider-mode" "cider-mode.el" +;;;;;; (21478 17732 0 0)) +;;; Generated autoloads from cider-mode.el + +(defvar cider-mode-line '(" cider" (:eval (format "[%s]" (cider-current-ns)))) "\ +Mode line ligher for `cider-mode'. + +The value of this variable is a mode line template as in +`mode-line-format'. See Info Node `(elisp)Mode Line Format' for +details about mode line templates. + +Customize this variable to change how `cider-mode' displays its +status in the mode line. The default value displays the current ns. +Set this variable to nil to disable the mode line +entirely.") + +(custom-autoload 'cider-mode-line "cider-mode" t) + +(autoload 'cider-mode "cider-mode" "\ +Minor mode for REPL interaction from a Clojure buffer. + +\\{cider-mode-map} + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (cider-scratch) "cider-scratch" "cider-scratch.el" +;;;;;; (21478 17731 0 0)) +;;; Generated autoloads from cider-scratch.el + +(autoload 'cider-scratch "cider-scratch" "\ +Create a scratch buffer. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (cider-selector) "cider-selector" "cider-selector.el" +;;;;;; (21478 17731 0 0)) +;;; Generated autoloads from cider-selector.el + +(autoload 'cider-selector "cider-selector" "\ +Select a new buffer by type, indicated by a single character. +The user is prompted for a single character indicating the method by +which to choose a new buffer. The `?' character describes then +available methods. OTHER-WINDOW provides an optional target. + +See `def-cider-selector-method' for defining new methods. + +\(fn &optional OTHER-WINDOW)" t nil) + +;;;*** + +;;;### (autoloads nil nil ("cider-client.el" "cider-doc.el" "cider-eldoc.el" +;;;;;; "cider-interaction.el" "cider-pkg.el" "cider-repl.el" "cider-stacktrace.el" +;;;;;; "cider-test.el" "cider-util.el" "nrepl-client.el") (21478 +;;;;;; 17732 311672 0)) + +;;;*** + +(provide 'cider-autoloads) +;; Local Variables: +;; version-control: never +;; no-byte-compile: t +;; no-update-autoloads: t +;; coding: utf-8 +;; End: +;;; cider-autoloads.el ends here diff --git a/elpa/cider-0.7.0/cider-client.el b/elpa/cider-0.7.0/cider-client.el new file mode 100644 index 000000000..d8176311a --- /dev/null +++ b/elpa/cider-0.7.0/cider-client.el @@ -0,0 +1,235 @@ +;;; cider-client.el --- A layer of abstraction above the actual client code. -*- lexical-binding: t -*- + +;; Copyright © 2013-2014 Bozhidar Batsov +;; +;; Author: Bozhidar Batsov + +;; 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 . + +;; This file is not part of GNU Emacs. + +;;; Commentary: + +;; A layer of abstraction above the actual client code. + +;;; Code: + +(require 'nrepl-client) + +;;; Words of inspiration +(defun cider-user-first-name () + "Find the current user's first name." + (let ((name (if (string= (user-full-name) "") + (user-login-name) + (user-full-name)))) + (string-match "^[^ ]*" name) + (capitalize (match-string 0 name)))) + +(defvar cider-words-of-inspiration + `("The best way to predict the future is to invent it. -Alan Kay" + "A point of view is worth 80 IQ points. -Alan Kay" + "Lisp isn't a language, it's a building material. -Alan Kay" + "Simple things should be simple, complex things should be possible. -Alan Kay" + "Measuring programming progress by lines of code is like measuring aircraft building progress by weight. -Bill Gates" + "Controlling complexity is the essence of computer programming. -Brian Kernighan" + "The unavoidable price of reliability is simplicity. -C.A.R. Hoare" + "You're bound to be unhappy if you optimize everything. -Donald Knuth" + "Simplicity is prerequisite for reliability. -Edsger W. Dijkstra" + "Deleted code is debugged code. -Jeff Sickel" + "The key to performance is elegance, not battalions of special cases. -Jon Bentley and Doug McIlroy" + "First, solve the problem. Then, write the code. -John Johnson" + "Simplicity is the ultimate sophistication. -Leonardo da Vinci" + "Programming is not about typing... it's about thinking. -Rich Hickey" + "Design is about pulling things apart. -Rich Hickey" + "Programmers know the benefits of everything and the tradeoffs of nothing. -Rich Hickey" + "Code never lies, comments sometimes do. -Ron Jeffries" + "The true delight is in the finding out rather than in the knowing. -Isaac Asimov" + "If paredit is not for you, then you need to become the sort of person that paredit is for. -Phil Hagelberg" + "Take this REPL, fellow hacker, and may it serve you well." + "Let the hacking commence!" + "Hacks and glory await!" + "Hack and be merry!" + "Your hacking starts... NOW!" + "May the Source be with you!" + "May the Source shine upon thy REPL!" + "Code long and prosper!" + "Happy hacking!" + "nREPL server is up, CIDER REPL is online!" + "CIDER REPL operational!" + "Your imagination is the only limit to what you can do with this REPL!" + "This REPL is yours to command!" + "Fame is but a hack away!" + ,(format "%s, this could be the start of a beautiful program." + (cider-user-first-name))) + "Scientifically-proven optimal words of hackerish encouragement.") + +(defun cider-random-words-of-inspiration () + "Select a random entry from `cider-words-of-inspiration'." + (eval (nth (random (length cider-words-of-inspiration)) + cider-words-of-inspiration))) + +(defun cider-display-connected-message () + "Message displayed on successful connection." + (message "Connected. %s" (cider-random-words-of-inspiration))) + +(add-hook 'nrepl-connected-hook 'cider-display-connected-message) + +;;; Evaluation helpers +(defun cider-ns-form-p (form) + "Check if FORM is an ns form." + (string-match "^[[:space:]]*\(ns\\([[:space:]]*$\\|[[:space:]]+\\)" form)) + +(defun cider-eval (input callback &optional ns session) + "Send the request INPUT and register the CALLBACK as the response handler. +NS & SESSION specify the context in which to evaluate the request." + ;; namespace forms are always evaluated in the "user" namespace + (let ((ns (if (cider-ns-form-p input) + "user" + ns))) + ;; prevent forms from being evaluated in the wrong or a non-existing namespace + (when (and ns + (derived-mode-p 'clojure-mode) + (not (string= ns nrepl-buffer-ns)) + (not (cider-ns-form-p input))) + (cider-eval-ns-form)) + (nrepl-send-string input callback ns session))) + +(defun cider-tooling-eval (input callback &optional ns) + "Send the request INPUT and register the CALLBACK as the response handler. +NS specifies the namespace in which to evaluate the request." + ;; namespace forms are always evaluated in the "user" namespace + (cider-eval input callback ns (nrepl-current-tooling-session))) + +(defun cider-eval-sync (input &optional ns session) + "Send the INPUT to the nREPL server synchronously. +NS & SESSION specify the evaluation context." + (nrepl-send-string-sync input ns session)) + +(defun cider-eval-and-get-value (input &optional ns session) + "Send the INPUT to the nREPL server synchronously and return the value. +NS & SESSION specify the evaluation context." + (cider-get-value (cider-eval-sync input ns session))) + +(defun cider-tooling-eval-sync (input &optional ns) + "Send the INPUT to the nREPL server using a tooling session synchronously. +NS specifies the namespace in which to evaluate the request." + (cider-eval-sync input ns (nrepl-current-tooling-session))) + +(defun cider-get-raw-value (eval-result) + "Get the raw value (as string) from EVAL-RESULT." + (plist-get eval-result :value)) + +(defun cider-get-value (eval-result) + "Get the value from EVAL-RESULT." + (read (cider-get-raw-value eval-result))) + +(defun cider-send-op (op attributes handler) + "Send the specified OP with ATTRIBUTES and response HANDLER." + (nrepl-send-request (append + (list "op" op + "session" (nrepl-current-session) + "ns" nrepl-buffer-ns) + attributes) + handler)) + +(defun cider-send-load-file (file-contents file-path file-name) + "Perform the nREPL \"load-file\" op. +FILE-CONTENTS, FILE-PATH and FILE-NAME are details of the file to be +loaded." + (let ((buffer (current-buffer))) + (nrepl-send-request (list "op" "load-file" + "session" (nrepl-current-session) + "file" file-contents + "file-path" file-path + "file-name" file-name) + (cider-load-file-handler buffer)))) + +(defun cider-interrupt () + "Interrupt any pending evaluations." + (interactive) + (let ((pending-request-ids (cider-util--hash-keys nrepl-pending-requests))) + (dolist (request-id pending-request-ids) + (nrepl-send-interrupt request-id (cider-interrupt-handler (current-buffer)))))) + +(defun cider-current-repl-buffer () + "The current REPL buffer." + (when (nrepl-current-connection-buffer) + (buffer-local-value 'nrepl-repl-buffer + (get-buffer (nrepl-current-connection-buffer))))) + +(defun cider--dict-to-alist (val) + "Transforms a nREPL bdecoded dict VAL into an alist. +Simply returns it if it's not a dict." + (if (and (listp val) + (eq (car val) 'dict)) + (-map '-cons-to-list (cdr val)) + val)) + +(defun cider--dict-to-plist (val) + "Transforms a nREPL bdecoded dict VAL into a plist with symbol keys. +Simply returns it if it's not a dict." + (if (and (listp val) + (eq (car val) 'dict)) + (-interleave (-map 'intern (-map 'car (cdr val))) + (-map 'cdr (cdr val))) + val)) + +(defun cider--var-choice (var-info) + "Prompt to choose from among multiple VAR-INFO candidates, if required. +This is needed only when the symbol queried is an unqualified host platform +method, and multiple classes have a so-named member. If VAR-INFO does not +contain a `candidates' key, it is returned as is." + (let ((candidates (cdadr (assoc "candidates" var-info)))) + (if candidates + (let* ((classes (mapcar (lambda (x) (cdr (assoc "class" x))) candidates)) + (choice (completing-read "Member in class: " classes nil t)) + (info (cdr (assoc choice candidates)))) + (cider--dict-to-alist info)) + var-info))) + +(defun cider-var-info (var &optional all) + "Return VAR's info as an alist with list cdrs. + +When multiple matching vars are returned you'll be prompted to select one, +unless ALL is truthy." + (when (and var (not (string= var ""))) + (let ((val (plist-get (nrepl-send-request-sync + (list "op" "info" + "session" (nrepl-current-session) + "ns" (cider-current-ns) + "symbol" var)) + :value))) + (if all + (cider--dict-to-alist val) + (cider--var-choice + (cider--dict-to-alist val)))))) + +(defun cider-member-info (class member) + "Return the CLASS MEMBER's info as an alist with list cdrs." + (when (and class member) + (let ((val (plist-get (nrepl-send-request-sync + (list "op" "info" + "session" (nrepl-current-session) + "class" class + "member" member)) + :value))) + (cider--dict-to-alist val)))) + +(defun cider-get-var-attr (var-info attr) + "Return VAR-INFO's ATTR." + (cadr (assoc attr var-info))) + +(provide 'cider-client) + +;;; cider-client.el ends here diff --git a/elpa/cider-0.7.0/cider-client.elc b/elpa/cider-0.7.0/cider-client.elc new file mode 100644 index 0000000000000000000000000000000000000000..87469b404bed3372f861a79d901e1b41ceefb6cd GIT binary patch literal 8801 zcmb_iTXWmS7505xWu^~(X&yS0W6Fu7RGX2sn=@4n-wLK zFxHPW0xY1>pHl6Iw?EL?mo?Zb4GS>(t75$SQ%i57#u>F}d-EaHsnu%joUsPlEgJZY z({LQZ6Qa45X32$$H5B0*mq`}nl#FTW`R6JN^C_v=Ps+@js2Ss1>*d1BNGnASSjpH5 z<2(&B!7^=+=7qBSBv4vGkkrPjp?BBCx{Gxe>n_$^th-ouvEIab6YEW^0|IP>R)_x;wbxF8hLM8x zFTFVx38k3|Lcb7{jLV_~lHih92xDlfps=Wu)r$c9Z@hVpYCTGm5YM5si%?ziW+(+N z-fhsqw|X(ZdgL(7Q|ybk;Kl?>lM?FP1!W-7qfr?~0bHHU2@`nH)x(2umLfD2Q;r6d zPm?l2uv3)F^If<)umAG?hBV3Za1^PlL+!2nRuB3jsGO&7R)_LN{$ifsU~;bSlk z8$H7=NCB1Of>KccaKpV=9%OgEcZ>|j0H*eX z;u%Z}_)elE1CTGhu&5T~IedDivTV)|;qRH;$z<{Zrq3Bi$FIKU)g#Ua(C7fW;7&Lw zl^a-Dvzo)cfOIMJNB`8)wVaT_n<6_E&Dg_=R9Vw__caFzr43<`z$F4;(|Qm*shW+KwzC?9l&Vn#&Ej2GlN<&`Kz z%82#CnFq#QTWOt<+ukvyOxJdIq>^dU0MQM3+5^nv02Mp@1{Rm%{m1KzldbCuJWa=1 zThdg;9_omObN{Oc_q$cycKuaI5{R#wDr7Jcpz?EdHP*7}2&oQkK>;d)$eY8v0HD0| zeLQE)pl**LB!|Uo>r!(T^_J{afrYRkR4b-Y0O z=5cQEE-OV%j@oWnbV|i7^1fR;zkQsip06ICoqf3-=f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p1GS-y_?LEg-eNMManCH#l>oB>G zwiP{?Bua0_bD9~CC3(R9UGKy?IDYYpha>@p${1W@L_d~353iSk`i2Zi(5LcLOgeYW zST1=~#!=X)6g?qkc6d=I?Q9wUTmlei69SqhXcp1*7mUpfO#7xuU?yJ`3x4Eb5}u<) zgnS-mg7O|HzyNE8IT{*v%YxVq+deIEU|WPOW`%dZ%i6OC)|fa)bQv28(U zEt>Jd$AYeSq+VImWB}yP-cy7!-4_mPY)i?voLEi9Jhw2P#OnUViQc#STP5%D?^dB z{5@l1fiHPk$K^D1i&Mzs3$tM0wuP4^m^flG2BgALz-q4NT}iBVH_A9d=}nj^ustyf zE~e#ra;nFhHT2c^ z$L4I0@P@R<@9=6&%iRJFY?m$EaCZ4S&f4y+2Y9edb9l$OtZP@&m`QlLq}QbZGy4Hm z0ctK|!78sHeAl!u)=cTV*2LArCD2hTIHq>%bQ`8t=q!xRKE8k08w}{EfAp;XVF+OR ztR7lt8tvRm>oiF;+WJhQCffzyjPv2I_!|B$OWS+***Yl1Dw{Oe6K$J~vDE!XR=ju- z45YdLO;xWbwhR7E5!PDqCW*UnDX#gKsMgV#pRH3H7XoZNyyN0H(Xyd8=)t~;SL_^} nKJ7i-f%3RN{snG|2y;eNlh;MXz-(;8-7et&)f@lne;xQA9^koK literal 0 HcmV?d00001 diff --git a/elpa/cider-0.7.0/cider-doc.el b/elpa/cider-0.7.0/cider-doc.el new file mode 100644 index 000000000..0c126f9b7 --- /dev/null +++ b/elpa/cider-0.7.0/cider-doc.el @@ -0,0 +1,377 @@ +;;; cider-doc.el --- CIDER documentation functionality -*- lexical-binding: t -*- + +;; Copyright © 2014 Jeff Valk + +;; Author: Jeff Valk + +;; 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 . + +;; This file is not part of GNU Emacs. + +;;; Commentary: + +;; Mode for formatting and presenting documentation + +;;; Code: + +(require 'cider-util) +(require 'org-table) +(require 'button) +(require 'dash) +(require 'easymenu) + + +;;; Variables + +(defgroup cider-doc nil + "Documentation for CIDER." + :prefix "cider-doc-" + :group 'cider) + + +(defvar cider-doc-map + (let (cider-doc-map) + (define-prefix-command 'cider-doc-map) + (define-key cider-doc-map (kbd "a") 'cider-apropos) + (define-key cider-doc-map (kbd "C-a") 'cider-apropos) + (define-key cider-doc-map (kbd "A") 'cider-apropos-documentation) + (define-key cider-doc-map (kbd "d") 'cider-doc) + (define-key cider-doc-map (kbd "C-d") 'cider-doc) + (define-key cider-doc-map (kbd "g") 'cider-grimoire) + (define-key cider-doc-map (kbd "C-g") 'cider-grimoire) + (define-key cider-doc-map (kbd "h") 'cider-grimoire-web) + (define-key cider-doc-map (kbd "j") 'cider-javadoc) + (define-key cider-doc-map (kbd "C-j") 'cider-javadoc) + cider-doc-map) + "CIDER documentation keymap.") + +(defvar cider-doc-menu + '("Documentation ..." + ["CiderDoc" cider-doc] + ["JavaDoc in browser" cider-javadoc] + ["Grimoire" cider-grimoire] + ["Grimoire in browser" cider-grimoire-web] + ["Search functions/vars" cider-apropos] + ["Search documentation" cider-apropos-documentation]) + "CIDER documentation submenu.") + + + +;;; cider-docview-mode + +(defgroup cider-docview-mode nil + "Formatting/fontifying documentation viewer." + :prefix "cider-docview-" + :group 'cider) + +(defcustom cider-docview-fill-column fill-column + "Fill column for docstrings in doc buffer." + :type 'list + :group 'cider-docview-mode + :package-version '(cider . "0.7.0")) + + + +;; Faces + +(defface cider-docview-emphasis-face + '((t (:inherit default :underline t))) + "Face for emphasized text" + :group 'cider-docview-mode + :package-version '(cider . "0.7.0")) + +(defface cider-docview-strong-face + '((t (:inherit default :underline t :weight bold))) + "Face for strongly emphasized text" + :group 'cider-docview-mode + :package-version '(cider . "0.7.0")) + +(defface cider-docview-literal-face + '((t (:inherit font-lock-string-face))) + "Face for literal text" + :group 'cider-docview-mode + :package-version '(cider . "0.7.0")) + +(defface cider-docview-table-border-face + '((t (:inherit shadow))) + "Face for table borders" + :group 'cider-docview-mode + :package-version '(cider . "0.7.0")) + + +;; Colors & Theme Support + +(defvar cider-docview-code-background-color + (cider-scale-background-color) + "Background color for code blocks.") + +(defadvice enable-theme (after cider-docview-adapt-to-theme activate) + "When theme is changed, update `cider-docview-code-background-color'." + (setq cider-docview-code-background-color (cider-scale-background-color))) + + +;; Mode & key bindings + +(defvar cider-docview-mode-map + (let ((map (make-sparse-keymap))) + (define-key map "q" 'cider-popup-buffer-quit-function) + (define-key map "j" 'cider-docview-javadoc) + (define-key map (kbd "") 'backward-button) + (define-key map (kbd "TAB") 'forward-button) + + ;; VS[04-08-2014]: proposed keybindings for the docview mode + ;; (define-key map (kbd "") 'backward-button) + ;; (define-key map (kbd "TAB") 'forward-button) + ;; (define-key map (kbd "k") 'kill-this-buffer) + + ;; (define-key map (kbd "C-c C-d") 'cider-doc-map) + ;; (define-key map (kbd "a") 'cider-apropos) + ;; (define-key map (kbd "A") 'cider-apropos-documentation) + ;; (define-key map (kbd "d") 'cider-doc) + ;; (define-key map (kbd "g") 'cider-grimoire) + ;; (define-key map (kbd "h") 'cider-grimoire-web) + ;; (define-key map (kbd "j") 'cider-javadoc) + ;; (define-key map (kbd "J") 'cider-doc-javadoc) + + ;; (define-key map (kbd "M-.") 'cider-jump-to-var) + ;; (define-key map (kbd "M-,") 'cider-jump-back) + ;; (define-key map (kbd "C-c M-.") 'cider-jump-to-resource) + ;; (define-key map (kbd "i") 'cider-inspect) + ;; (define-key map (kbd "C-c M-i") 'cider-inspect) + ;; (define-key map (kbd "C-c C-z") 'cider-switch-to-repl-buffer) + + (easy-menu-define cider-docview-mode-menu map + "Menu for CIDER's doc mode" + `("CiderDoc" + ;; ,cider-doc-menu + ;; "--" + ;; ["Jump to source" cider-jump-to-var] + ;; ["Jump to resource" cider-jump-to-resource] + ;; ["Jump back" cider-jump-back] + ;; "--" + ;; ["Switch to REPL" cider-switch-to-repl-buffer] + ;; "--" + ;; ["Kill" kill-this-buffer] + ;; ["Quit" quit-window] + ["JavaDoc in browser" cider-docview-javadoc] + ["Quit" cider-popup-buffer-quit-function] + )) + map)) + +(define-derived-mode cider-docview-mode special-mode "Doc" + "Major mode for displaying CIDER documentation + +\\{cider-docview-mode-map}" + (setq buffer-read-only t) + (setq-local truncate-lines t) + (setq-local electric-indent-chars nil) + (setq-local cider-docview-symbol nil) + (setq-local cider-docview-javadoc-url nil)) + + +;;; Interactive functions + +(defun cider-docview-javadoc () + "Open the Javadoc for the current class, if available." + (interactive) + (if cider-docview-javadoc-url + (browse-url cider-docview-javadoc-url) + (message "No Javadoc available for %s" cider-docview-symbol))) + + +;;; Font Lock and Formatting + +(defun cider-docview-fontify-code-blocks (buffer mode) + "Font lock BUFFER code blocks using MODE and remove markdown characters. +This processes the triple backtick GFM markdown extension. An overlay is used +to shade the background. Blocks are marked to be ignored by other fonification +and line wrap." + (with-current-buffer buffer + (save-excursion + (while (search-forward-regexp "```\n" nil t) + (replace-match "") + (let ((beg (point)) + (bg `(:background ,cider-docview-code-background-color))) + (when (search-forward-regexp "```\n" nil t) + (replace-match "") + (cider-font-lock-region-as mode beg (point)) + (overlay-put (make-overlay beg (point)) 'face bg) + (put-text-property beg (point) 'block 'code))))))) + +(defun cider-docview-fontify-literals (buffer) + "Font lock BUFFER literal text and remove backtick markdown characters. +Preformatted code text blocks are ignored." + (with-current-buffer buffer + (save-excursion + (while (search-forward "`" nil t) + (if (eq (get-text-property (point) 'block) 'code) + (forward-char) + (progn + (replace-match "") + (let ((beg (point))) + (when (search-forward "`" (line-end-position) t) + (replace-match "") + (put-text-property beg (point) 'face 'cider-docview-literal-face))))))))) + +(defun cider-docview-fontify-emphasis (buffer) + "Font lock BUFFER emphasized text and remove markdown characters. +One '*' represents emphasis, multiple '**'s represent strong emphasis. +Preformatted code text blocks are ignored." + (with-current-buffer buffer + (save-excursion + (while (search-forward-regexp "\\(*+\\)\\(\\w\\)" nil t) + (if (eq (get-text-property (point) 'block) 'code) + (forward-char) + (progn + (replace-match "\\2") + (let ((beg (1- (point))) + (face (if (> (length (match-string 1)) 1) + 'cider-docview-strong-face + 'cider-docview-emphasis-face))) + (when (search-forward-regexp "\\(\\w\\)\\*+" (line-end-position) t) + (replace-match "\\1") + (put-text-property beg (point) 'face face))))))))) + +(defun cider-docview-format-tables (buffer) + "Align BUFFER tables and dim borders. +This processes the GFM table markdown extension using `org-table'. +Tables are marked to be ignored by line wrap." + (with-current-buffer buffer + (save-excursion + (let ((border 'cider-docview-table-border-face)) + (org-table-map-tables + (lambda () + (org-table-align) + (goto-char (org-table-begin)) + (while (search-forward-regexp "[+|-]" (org-table-end) t) + (put-text-property (match-beginning 0) (match-end 0) 'face border)) + (put-text-property (org-table-begin) (org-table-end) 'block 'table))))))) + +(defun cider-docview-wrap-text (buffer) + "For text in BUFFER not propertized as 'block', apply line wrap." + (with-current-buffer buffer + (save-excursion + (while (not (eobp)) + (unless (get-text-property (point) 'block) + (fill-region (point) (line-end-position))) + (forward-line))))) + + +;;; Rendering + +(defun cider-docview-render-java-doc (buffer text) + "Emit into BUFFER formatted doc TEXT for a Java class or member." + (with-current-buffer buffer + (let ((beg (point))) + (insert text) + (save-excursion + (goto-char beg) + (cider-docview-fontify-code-blocks buffer 'java-mode) ; left alone hereafter + (cider-docview-fontify-literals buffer) + (cider-docview-fontify-emphasis buffer) + (cider-docview-format-tables buffer) ; may contain literals, emphasis + (cider-docview-wrap-text buffer))))) ; ignores code, table blocks + +(defun cider-docview-render-info (buffer info) + "Emit into BUFFER formatted INFO for the Clojure or Java symbol." + (let* ((ns (cadr (assoc "ns" info))) + (name (cadr (assoc "name" info))) + (added (cadr (assoc "added" info))) + (depr (cadr (assoc "deprecated" info))) + (macro (cadr (assoc "macro" info))) + (special (cadr (assoc "special-form" info))) + (forms (cadr (assoc "forms-str" info))) + (args (cadr (assoc "arglists-str" info))) + (doc (cadr (assoc "doc" info))) + (url (cadr (assoc "url" info))) + (class (cadr (assoc "class" info))) + (member (cadr (assoc "member" info))) + (javadoc (cadr (assoc "javadoc" info))) + (super (cadr (assoc "super" info))) + (ifaces (cadr (assoc "interfaces" info))) + (clj-name (if ns (concat ns "/" name) name)) + (java-name (if member (concat class "/" member) class))) + (with-current-buffer buffer + (cl-flet ((emit (text &optional face) + (insert (if face + (propertize text 'font-lock-face face) + text)) + (newline))) + (emit (if class java-name clj-name) 'font-lock-function-name-face) + (when super + (emit (concat " Extends: " (cider-font-lock-as 'java-mode super)))) + (when ifaces + (emit (concat "Implements: " (cider-font-lock-as 'java-mode (car ifaces)))) + (dolist (iface (cdr ifaces)) + (emit (concat " "(cider-font-lock-as 'java-mode iface))))) + (when (or super ifaces) + (newline)) + (when (or forms args) + (emit (cider-font-lock-as-clojure (or forms args)))) + (when (or special macro) + (emit (if special "Special Form" "Macro") 'font-lock-comment-face)) + (when added + (emit (concat "Added in " added) 'font-lock-comment-face)) + (when depr + (emit (concat "Deprecated in " depr) 'font-lock-comment-face)) + (when doc + (if class + (cider-docview-render-java-doc (current-buffer) doc) + (emit (concat " " doc)))) + (when url + (newline) + (insert " Please see ") + (insert-text-button url + 'url url + 'follow-link t + 'action (lambda (x) + (browse-url (button-get x 'url)))) + (newline)) + (when javadoc + (newline) + (newline) + (insert "For additional documentation, see the ") + (insert-text-button "Javadoc" + 'url javadoc + 'follow-link t + 'action (lambda (x) + (browse-url (button-get x 'url)))) + (insert ".") + (newline)) + (let ((beg (point-min)) + (end (point-max))) + (dolist (x info) + (put-text-property beg end (car x) (cadr x))))) + (current-buffer)))) + +(defun cider-docview-render (buffer symbol info) + "Emit into BUFFER formatted documentation for SYMBOL's INFO." + (with-current-buffer buffer + (let ((javadoc (cadr (assoc "javadoc" info))) + (inhibit-read-only t)) + (cider-docview-mode) + + (setq-local cider-docview-symbol symbol) + (setq-local cider-docview-javadoc-url javadoc) + + (remove-overlays) + (cider-docview-render-info buffer info) + + (goto-char (point-min)) + (current-buffer)))) + + +(provide 'cider-doc) + +;;; cider-doc.el ends here diff --git a/elpa/cider-0.7.0/cider-doc.elc b/elpa/cider-0.7.0/cider-doc.elc new file mode 100644 index 0000000000000000000000000000000000000000..68ee3aa243c27478b15aa5859a0fc10adff39dc5 GIT binary patch literal 12126 zcmc&)k9QNt5w@`rL_G4VeI!kj*X5kVGU4R=B^`$51%n}_4S|HDO&{{BPtwUcknY6Y z$;N5>zxSKj-P4^Uz=X8rJz;5YcXoH?+nH}>@5Y^PZhx?{vQocs^>Fg}X=qHd7C%Nb)aUP)aG#{AP&=Q-wk8a<)Cwjvm4SG2id6lOR;=afd(FkAEKk<%6XysH~L2lc+-FNdcDy-$wRZ3^h05ET+718zT9za z`a&P4{KGB(@X9}0`bQgM{EkcGZ5tm49~U1FpVsH+I*#QV;&B>2n?`9UBr2wP1oNhc zW*&5bq3$%#fq{OI4WYX1WE{p*(VJ#@GB*2RZxp1Vd6*{Ci5d=Tix?7&y`(oq=bRxT z21zPz-`l(MebW%vCuul{o(n@xh!G|lOG5U=wXOQbO=m|AAq15~Jq=IB!KC?zdZQl> zj)HVHv59sur$hTg(i`bdE5$vJU(kTn+EA+H7SdI6u=pe=@h6|C`uTCq4X0>(qxik z!dNwgu{+mlR#j~D^>effV;v(7b<1HIjT3^4aSqMH`DXJt>dMN{}Y?JY8~Yb`Z#HtiD5mfM&BxY?M)SF;IVJvMHWW7|u5dU{N~kLEvP6=)@w z(@m3Octzbot&ci=tv03~>5Z13Es>zR(Z;FkBRH7ePz`{Rxfe>DZsY zCC53C%7_HI9rUjBYHR7-3o=}cbs?kN%XP}VT&&QAEO$gdVFwUzZUh26oY(#;$6E_C&77mYb7g7)nr4;y6Kt}~uf+c>z zSq}zs@%hOFF)%`~y*>$gPlLnI)Zx6rYr`Qlm;e}C^P3n1Jsk`nls6ELC&M6%GLxS* z8o6j(kK$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bh$w#X^jq5s4wqvzF zz=OeMUM86YT|ZsrC$7Ui<@YAZW4^Ub->^r#1j74=DIoPLEwx>H?_ud7+utvN$Fo`>G;_WDFS$>#`s8T_#k<81+huCefkU&O@UJ|zZJ#lm}E z2HyQl6a3XRWpZ=)Nq;h;oA@52hxBfV{s}*iMpUivKUa+KSH=!}A>S)IWK*QMXh9?j zQws02l5K;1l8e}`F+1SE3BX!5CHt0haYcmx15O=6f)6cF8eHl9&0Uj|6E5^Msiaod+ z&bhCFp~XKCe7T~9N`l0&*Mi^FcKEC!MU{5aZW9opl-It*}eo$w`#>)N|lr z7MSBOJcHsU0f!}BCDwiWq3=cGE9M)n9MBowC(ma Rn~X)5nn&ngx`NuO{|7-PcXa>& literal 0 HcmV?d00001 diff --git a/elpa/cider-0.7.0/cider-eldoc.el b/elpa/cider-0.7.0/cider-eldoc.el new file mode 100644 index 000000000..691aedc57 --- /dev/null +++ b/elpa/cider-0.7.0/cider-eldoc.el @@ -0,0 +1,134 @@ +;;; cider-eldoc.el --- eldoc support for Clojure -*- lexical-binding: t -*- + +;; Copyright © 2012-2014 Tim King, Phil Hagelberg +;; Copyright © 2013-2014 Bozhidar Batsov, Hugo Duncan, Steve Purcell +;; +;; Author: Tim King +;; Phil Hagelberg +;; Bozhidar Batsov +;; Hugo Duncan +;; Steve Purcell + +;; 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 . + +;; This file is not part of GNU Emacs. + +;;; Commentary: + +;; eldoc support for Clojure. + +;;; Code: + +(require 'cider-client) +(require 'cider-interaction) ; for cider-symbol-at-point + +(require 'eldoc) +(require 'dash) + +(defvar cider-extra-eldoc-commands '("yas-expand") + "Extra commands to be added to eldoc's safe commands list.") + +(defun cider-eldoc-format-thing (thing) + "Format the eldoc THING." + (propertize thing 'face 'font-lock-function-name-face)) + +(defun cider-highlight-args (arglist pos) + "Format the the function ARGLIST for eldoc. +POS is the index of the currently highlighted argument." + (let* ((rest-pos (cider--find-rest-args-position arglist)) + (i 0)) + (mapconcat + (lambda (arg) + (let ((argstr (format "%s" arg))) + (if (eq arg '&) + argstr + (prog1 + (if (or (= (1+ i) pos) + (and rest-pos (> (+ 1 i) rest-pos) + (> pos rest-pos))) + (propertize argstr 'face + 'eldoc-highlight-function-argument) + argstr) + (setq i (1+ i)))))) arglist " "))) + +(defun cider--find-rest-args-position (arglist) + "Find the position of & in the ARGLIST vector." + (-elem-index '& (append arglist ()))) + +(defun cider-highlight-arglist (arglist pos) + "Format the ARGLIST for eldoc. +POS is the index of the argument to highlight." + (concat "[" (cider-highlight-args arglist pos) "]")) + +(defun cider-eldoc-format-arglist (arglist pos) + "Format all the ARGLIST for eldoc. +POS is the index of current argument." + (concat "(" + (mapconcat (lambda (args) (cider-highlight-arglist args pos)) + arglist + " ") + ")")) + +(defun cider-eldoc-info-in-current-sexp () + "Return a list of the current sexp and the current argument index." + (save-excursion + (let ((argument-index (1- (eldoc-beginning-of-sexp)))) + ;; If we are at the beginning of function name, this will be -1. + (when (< argument-index 0) + (setq argument-index 0)) + ;; Don't do anything if current word is inside a string. + (if (= (or (char-after (1- (point))) 0) ?\") + nil + (list (cider-symbol-at-point) argument-index))))) + +(defun cider-eldoc--arglist-op-fn (thing) + "Return the arglist for THING using nREPL info op." + (let* ((var-info (cider-var-info thing t)) + (candidates (cdadr (assoc "candidates" var-info)))) + (if candidates + (->> candidates + (-map (lambda (x) (cdr (assoc "arglists-str" x)))) + (-map 'read) + -flatten + -distinct) + (let ((arglists (cider-get-var-attr var-info "arglists-str"))) + (when arglists + (read arglists)))))) + +(defun cider-eldoc-arglist (thing) + "Return the arglist for THING." + (when (nrepl-op-supported-p "info") + (cider-eldoc--arglist-op-fn thing))) + +(defun cider-eldoc () + "Backend function for eldoc to show argument list in the echo area." + (when (cider-connected-p) + (let* ((info (cider-eldoc-info-in-current-sexp)) + (thing (car info)) + (pos (cadr info)) + (value (cider-eldoc-arglist thing))) + (when value + (format "%s: %s" + (cider-eldoc-format-thing thing) + (cider-eldoc-format-arglist value pos)))))) + +(defun cider-turn-on-eldoc-mode () + "Turn on eldoc mode in the current buffer." + (setq-local eldoc-documentation-function 'cider-eldoc) + (apply 'eldoc-add-command cider-extra-eldoc-commands) + (eldoc-mode +1)) + +(provide 'cider-eldoc) + +;;; cider-eldoc.el ends here diff --git a/elpa/cider-0.7.0/cider-eldoc.elc b/elpa/cider-0.7.0/cider-eldoc.elc new file mode 100644 index 0000000000000000000000000000000000000000..b1f78841d4584125879a59dd323283ab16cdcb46 GIT binary patch literal 3760 zcmbtX`%m0P5QaQxb5g7RP^tZ?9ZZvOYJ7O@dvHNjA(W&@X`2SpR)Ukd*lW(hXJ2g} zf&BITW_Nw~QW8=Hv?qHXvoqg(^YGT*^WCqOmX=yuTU)f7Po_z#B09OGiLACUO7|BT zKFRa5PMU`@r97hpS<%kylxRp|@VGa8?D^z-qN_#3MLwYzLTKYvsfuy~GB!GDBEzy1 zZK!lAH^L-Rh3j<&9nU_iG|Iz{O0|R}qdneE=Qy6=KEK-uIzq3#PO34<6lzSXWRkp* z6*iQemR>v@C#AW1R;rSs%S=v^kRZCOiX=NNA7Qm9E0R$J8|U|kVaFf-M@E!GMwV9; z=2<1Nc~-^lCT22s=U{h#pTe;$WLQDTNBVl1MO5Y#%8X7FrMXO!jz{FTTWj0BA?;mMg#_G_37{;g${9!FD?IBH4@)X# z4C(czG%2gjx2^R^#pklH7bzCx>H{#wihH>3T*}f_7gI=g+O)p*9d)SR6K%de7|_$a z09WA`Wwkr}dH>gE@Xvajk$!HQi)5O}k{%kP%q_7#>sDjXjMk3)-oOC3%m^}YYZjhq zkxx}oC2thPGQ5@Bzu`R6(;WN!c6|h@$6t zM)6_4N%30C4`6kT5oeA$go}33hme_bN|VoQ)a~2MRnPz38sr=~HrdQ?GI8LH;ElOa z{mq^=3f?gJg{xN+{u>Olq540Ab0I4Mm+MSobF`Zp@wxH|$L>JKC0H-S{W~0;9IV0I z^mXUv_!Ar>9N*Ulfr;-0q{>3?ZvfcC2&@!tD}-ve6y>Db4nwn6B~Tz8^QlPp6Kar4;R?B(8z=deG{(MQ<;xuL)@xfxdm}$%youzwihH0>j z4M53)WO#!@50^lBbaG{xhvcB=ijqiH3Q5(Cpk{(vN^YFWs!|!bC>K;H88!80wOLs! z+Dfu!mM&UGkgmbUznFwZfm2nvtOTSNk0_;ZyAWURY`3u*psTRVSmiBqQr*=V z>kjh?<+$I6kgmny!uks(I79i>Fc=TMC%Bs%YRnNp+!~^2KPE2R%{^w#wtm+vSQ$uQ z!X_}V-&Te0kPbP0%^Ttgx84@OI$@p6;#d{$Mv)Vsi?0%6la^3JsuL9B#vM%XMGf0M z9c4VH8?u@#^6ZSr-UwQj-m*C9tmB2Vz~*8qacJvvPz9qoMGlG_=r Yu(%>$(Cz6CW*xoJIldbf8tr!LUrY>IH~;_u literal 0 HcmV?d00001 diff --git a/elpa/cider-0.7.0/cider-inspector.el b/elpa/cider-0.7.0/cider-inspector.el new file mode 100644 index 000000000..7e58fb205 --- /dev/null +++ b/elpa/cider-0.7.0/cider-inspector.el @@ -0,0 +1,235 @@ +;;; cider-inspector.el --- Object inspector -*- lexical-binding: t -*- + +;; Copyright © 2013-2014 Vital Reactor, LLC +;; Copyright © 2014 Bozhidar Batsov + +;; Author: Ian Eslick +;; Bozhidar Batsov + +;; 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 . + +;; This file is not part of GNU Emacs. + +;;; Commentary: + +;; Clojure object inspector inspired by SLIME. + +;;; Code: + +(require 'cl-lib) +(require 'cider-interaction) + +;; =================================== +;; Inspector Key Map and Derived Mode +;; =================================== + +(defvar cider-inspector-mode-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map cider-popup-buffer-mode-map) + (define-key map [return] 'cider-inspector-operate-on-point) + (define-key map "\C-m" 'cider-inspector-operate-on-point) + (define-key map [mouse-1] 'cider-inspector-operate-on-click) + (define-key map "l" 'cider-inspector-pop) + (define-key map "g" 'cider-inspector-refresh) + (define-key map [tab] 'cider-inspector-next-inspectable-object) + (define-key map "\C-i" 'cider-inspector-next-inspectable-object) + (define-key map [(shift tab)] 'cider-inspector-previous-inspectable-object) ; Emacs translates S-TAB + (define-key map [backtab] 'cider-inspector-previous-inspectable-object) ; to BACKTAB on X. + map)) + +(define-derived-mode cider-inspector-mode fundamental-mode "Inspector" + "Major mode for inspecting Clojure data structures. + +\\{cider-inspector-mode-map}" + (set-syntax-table clojure-mode-syntax-table) + (setq buffer-read-only t) + (setq-local electric-indent-chars nil) + (setq-local truncate-lines t)) + +;;;###autoload +(defun cider-inspect (expression) + "Eval the string EXPRESSION and inspect the result." + (interactive + (list (cider-read-from-minibuffer "Inspect value (evaluated): " + (cider-sexp-at-point)))) + (cider-ensure-op-supported "inspect-start") + (cider-inspect-sym expression (cider-current-ns))) + +;; Operations +(defun cider-render-response (buffer) + (nrepl-make-response-handler + buffer + (lambda (buffer str) + (cider-irender buffer str)) + '() + (lambda (buffer _str) + (cider-emit-into-popup-buffer buffer "Oops")) + '())) + +(defun cider-inspect-sym (sym ns) + (let ((buffer (cider-popup-buffer "*cider inspect*" t))) + (nrepl-send-request (list "op" "inspect-start" "sym" sym "ns" ns) + (cider-render-response buffer)))) + +(defun cider-inspector-pop () + (interactive) + (let ((buffer (cider-popup-buffer "*cider inspect*" t))) + (nrepl-send-request (list "op" "inspect-pop") + (cider-render-response buffer)))) + +(defun cider-inspector-push (idx) + (let ((buffer (cider-popup-buffer "*cider inspect*" t))) + (nrepl-send-request (list "op" "inspect-push" "idx" (number-to-string idx)) + (cider-render-response buffer)))) + +(defun cider-inspector-refresh () + (interactive) + (let ((buffer (cider-popup-buffer "*cider inspect*" t))) + (nrepl-send-request (list "op" "inspect-refresh") + (cider-render-response buffer)))) + +;; Render Inspector from Structured Values +(defun cider-irender (buffer str) + (with-current-buffer buffer + (cider-inspector-mode) + (let ((inhibit-read-only t)) + (condition-case nil + (cider-irender* (car (read-from-string str))) + (error (newline) (insert "Inspector error for: " str)))) + (goto-char (point-min)))) + +(defun cider-irender* (elements) + (dolist (el elements) + (cider-irender-el* el))) + +(defun cider-irender-el* (el) + (cond ((symbolp el) (insert (symbol-name el))) + ((stringp el) (insert el)) + ((and (consp el) (eq (car el) :newline)) + (newline)) + ((and (consp el) (eq (car el) :value)) + (cider-irender-value (cadr el) (caddr el))) + (t (message "Unrecognized inspector object: %s" el)))) + +(defun cider-irender-value (value idx) + (cider-propertize-region + (list 'cider-value-idx idx + 'mouse-face 'highlight + 'face 'font-lock-keyword-face) + (cider-irender-el* value))) + + +;; =================================================== +;; Inspector Navigation (lifted from SLIME inspector) +;; =================================================== + +(defun cider-find-inspectable-object (direction limit) + "Find the next/previous inspectable object. +DIRECTION can be either 'next or 'prev. +LIMIT is the maximum or minimum position in the current buffer. + +Return a list of two values: If an object could be found, the +starting position of the found object and T is returned; +otherwise LIMIT and NIL is returned." + (let ((finder (ecase direction + (next 'next-single-property-change) + (prev 'previous-single-property-change)))) + (let ((prop nil) (curpos (point))) + (while (and (not prop) (not (= curpos limit))) + (let ((newpos (funcall finder curpos 'cider-value-idx nil limit))) + (setq prop (get-text-property newpos 'cider-value-idx)) + (setq curpos newpos))) + (list curpos (and prop t))))) + +(defun cider-inspector-next-inspectable-object (arg) + "Move point to the next inspectable object. +With optional ARG, move across that many objects. +If ARG is negative, move backwards." + (interactive "p") + (let ((maxpos (point-max)) (minpos (point-min)) + (previously-wrapped-p nil)) + ;; Forward. + (while (> arg 0) + (cl-destructuring-bind (pos foundp) + (cider-find-inspectable-object 'next maxpos) + (if foundp + (progn (goto-char pos) (setq arg (1- arg)) + (setq previously-wrapped-p nil)) + (if (not previously-wrapped-p) ; cycle detection + (progn (goto-char minpos) (setq previously-wrapped-p t)) + (error "No inspectable objects"))))) + ;; Backward. + (while (< arg 0) + (cl-destructuring-bind (pos foundp) + (cider-find-inspectable-object 'prev minpos) + ;; CIDER-OPEN-INSPECTOR inserts the title of an inspector page + ;; as a presentation at the beginning of the buffer; skip + ;; that. (Notice how this problem can not arise in ``Forward.'') + (if (and foundp (/= pos minpos)) + (progn (goto-char pos) (setq arg (1+ arg)) + (setq previously-wrapped-p nil)) + (if (not previously-wrapped-p) ; cycle detection + (progn (goto-char maxpos) (setq previously-wrapped-p t)) + (error "No inspectable objects"))))))) + +(defun cider-inspector-previous-inspectable-object (arg) + "Move point to the previous inspectable object. +With optional ARG, move across that many objects. +If ARG is negative, move forwards." + (interactive "p") + (cider-inspector-next-inspectable-object (- arg))) + +(defun cider-inspector-property-at-point () + (let* ((properties '(cider-value-idx cider-range-button + cider-action-number)) + (find-property + (lambda (point) + (cl-loop for property in properties + for value = (get-text-property point property) + when value + return (list property value))))) + (or (funcall find-property (point)) + (funcall find-property (1- (point)))))) + +(defun cider-inspector-operate-on-point () + "Invoke the command for the text at point. +1. If point is on a value then recursivly call the inspector on +that value. +2. If point is on an action then call that action. +3. If point is on a range-button fetch and insert the range." + (interactive) + (cl-destructuring-bind (property value) + (cider-inspector-property-at-point) + (cl-case property + (cider-value-idx + (cider-inspector-push value)) + ;; TODO: range and action handlers + (t (error "No object at point"))))) + +(defun cider-inspector-operate-on-click (event) + "Move to EVENT's position and operate the part." + (interactive "@e") + (let ((point (posn-point (event-end event)))) + (cond ((and point + (or (get-text-property point 'cider-value-idx))) + ;; (get-text-property point 'cider-range-button) + ;; (get-text-property point 'cider-action-number))) + (goto-char point) + (cider-inspector-operate-on-point)) + (t + (error "No clickable part here"))))) + +(provide 'cider-inspector) + +;;; cider-inspector.el ends here diff --git a/elpa/cider-0.7.0/cider-inspector.elc b/elpa/cider-0.7.0/cider-inspector.elc new file mode 100644 index 0000000000000000000000000000000000000000..2579e50c2a3de4cf24d41cbca90ab579649548a2 GIT binary patch literal 9000 zcmc&(3vb)j74{=>S{3cEZpgX~LyzTTv9eI+Ly{js0lSWp8B3hNcG?cMfl$qYjvZ!zF|6Kn^r@X=*3Z=dRT;3UMDI} zReC%mA>Q3E~ zdl!CsN^SsA2C3ioe{xeyNa_{2d2s3{di!Cb66#)tZr}H)8+l0@`{7CQ2zTQoCAZtf zIg5R)^}4-2u|_w-8ex=@7lo;d$-}f~tYIWHw)VGocE~$*W7kU|>d z?a_#hZL~hL0tV4wI50ZHUJpKAoU-qpDI*!UaiWYfb;$=$RGM8H7*}CRP?aCbeO7Kd zjG@9@tGV8y0n`iozyk*nlugyoVTyhPZ#S$Pr+b0#ol!NYPOJ%$sd_Rw9;;rgl2bZN z-Ol9Fp?a4ZS>U>z03vmML=02)QwX%2ocg_#@L+B7$w92neMmg*>BEleo$-Fh)U3gM zra0p+^xgPkhW!K|@lSliv}R*5w-U^1w%Ab{f66Da$CP};EZMDqAZ@f$ARfVSeK{K7 zW7vm@1Zrq7O!0}87Y#0{`gfig4@0^*RUu)LVw|C!9MXuLpneqYMl^^cD5{?j)H)1O z@_Rr4;8ng4;hNE=6Ai;I9(eNN)wwl6$XoX_XDH2|52Y60o8R@f#V5Ydy){%cy2V=Y&(ag!ncq2rQO z_-5MaAJlKwVsZ%wd1t_Rk^Fuhb(WS~)_NV=|3{QNGD zH@^5?@#x*(V;q69+RN}ag3xo4968S^&sLpdb84*JnfwN`O@|olZ%zx1?dVd!D?xF z=^oX|ZaM2U7UZ~AS=wx^Q~Mm=#ty1W4Ql`JYOlS&zw>gJxGu8KGV z$JEHq>NHHJc9pB=)XT>1+okPATU-emeMFpAVPSJ*;{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HIp=WR?(eT zo(o0yTz<2|;rEC`kd|c|UP_9X3I9Jqe|kJdE-4kRri-8E`g)VeIja7KNiU*vNG1K~ zG!h4p#m8)t`9i(&J-@x-H#ZU2=39Hu9wE~3wClxD!hVcI(|5zm>;d!#;Dwkby-{_7 z7U;Rk9^qE;g&TLdhrqlXv!=Pnh;oTe$ArpT)>%U6D)t99xb+<@|6Zg z&J6s+Y_w-?$sF860x0gmNrXTwYCvnXc(Of@XCUVHxNaWV&T1y91y{Qw>FI=|(M^)F z#51$E#i{jmCiuam;MmyKvLD%YYv%T(_%dVq37}k!&RofxnfF~6$>L2mCH@IJ%|#rA zCq_n9qn_c$C(@mV_hgizie~$mopWERO3)nRy`^^I)~emCQFXvY6+5ys#gT7>>7UV= z!E*j9U(V&44tzP?GG`CrIOAC`e=T8L6AaAWw02e-&RVXWo9Y;yLNAN5{Yq&DheD=? zSDG!nw2@!?@{{3i`D)hHzhj0uyhKY=y!zEc`ki8C^;*uu0kRxP47^hJo417jm@~H! zdmKZ;5N`8+fZ;g^;oP5@pJ&vS#)*EG@8OpHSB?yRo#$YIEuM3mhi{L&YDyEpST12- z?Y(@}-aFW7@6)T7JG%!UH{&ExxX#ihVivE6&Z9FWaOp*TfL>R6rkp<+cnL@-m|Cw` zb!f~rDo>J@u(Ei5N*Y*`fOn@as#4CBl_-J1(j=$b!E%z&tj zr{s16rpW>*&g-Sw57xAFO))emJjp9vT4B%D=|F}ofge^_m=1Ed< z51R+heleKg9*E4-4KYUlBSzRxwV$XIbaiGs2O4XbG-PR Jcnwgi{0EqQ;Y0uc literal 0 HcmV?d00001 diff --git a/elpa/cider-0.7.0/cider-interaction.el b/elpa/cider-0.7.0/cider-interaction.el new file mode 100644 index 000000000..d173e0443 --- /dev/null +++ b/elpa/cider-0.7.0/cider-interaction.el @@ -0,0 +1,1697 @@ +;;; cider-interaction.el --- IDE for Clojure -*- lexical-binding: t -*- + +;; Copyright © 2012-2014 Tim King, Phil Hagelberg +;; Copyright © 2013-2014 Bozhidar Batsov, Hugo Duncan, Steve Purcell +;; +;; Author: Tim King +;; Phil Hagelberg +;; Bozhidar Batsov +;; Hugo Duncan +;; Steve Purcell + +;; 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 . + +;; This file is not part of GNU Emacs. + +;;; Commentary: + +;; Provides an Emacs Lisp client to connect to Clojure nREPL servers. + +;;; Code: + +(require 'cider-client) +(require 'cider-util) +(require 'cider-stacktrace) +(require 'cider-test) +(require 'cider-doc) + +(require 'clojure-mode) +(require 'dash) +(require 'thingatpt) +(require 'etags) +(require 'arc-mode) +(require 'ansi-color) +(require 'cl-lib) +(require 'compile) +(require 'tramp) +(require 'button) +(require 'apropos) + +(defconst cider-error-buffer "*cider-error*") +(defconst cider-doc-buffer "*cider-doc*") +(defconst cider-result-buffer "*cider-result*") +(defconst cider-apropos-buffer "*cider-apropos*") + +(define-obsolete-variable-alias 'cider-use-local-resources + 'cider-prefer-local-resources "0.7.0") + +(defcustom cider-prefer-local-resources nil + "Prefer local resources to remote (tramp) ones when both are available." + :type 'boolean + :group 'cider) + +(defcustom cider-show-error-buffer t + "Control the popup behavior of cider stacktraces. +The following values are possible t or 'always, 'except-in-repl, +'only-in-repl. Any other value, including nil, will cause the stacktrace +not to be automatically shown. + +Irespective of the value of this variable, the `cider-error-buffer' is +always generated in the background. Use `cider-visit-error-buffer' to +navigate to this buffer." + :type '(choice (const :tag "always" t) + (const except-in-repl) + (const only-in-repl) + (const :tag "never" nil)) + :group 'cider) + +(define-obsolete-variable-alias 'cider-popup-stacktraces + 'cider-show-error-buffer "0.7.0") + +(defcustom cider-auto-jump-to-error t + "When non-nill automatically jump to error location during interactive compilation." + :type 'boolean + :group 'cider + :package-version '(cider . "0.7.0")) + +(defcustom cider-auto-select-error-buffer t + "Controls whether to auto-select the error popup buffer." + :type 'boolean + :group 'cider) + +(defcustom cider-interactive-eval-result-prefix "=> " + "The prefix displayed in the minibuffer before a result value." + :type 'string + :group 'cider + :package-version '(cider . "0.5.0")) + +(defcustom cider-switch-to-repl-command 'cider-switch-to-relevant-repl-buffer + "Select the command to be invoked when switching-to-repl. +The default option is `cider-switch-to-relevant-repl-buffer'. If +you'd like to not use smart matching of repl buffer based on +project directory, you can assign it to `cider-switch-to-current-repl-buffer' +which will use the default REPL connection." + :type 'symbol + :group 'cider) + +(defcustom cider-prompt-save-file-on-load t + "Controls whether to prompt to save the file when loading a buffer." + :type 'boolean + :group 'cider + :package-version '(cider . "0.6.0")) + +(defcustom cider-completion-use-context t + "When true, uses context at point to improve completion suggestions." + :type 'boolean + :group 'cider + :package-version '(cider . "0.7.0")) + +(defconst cider-output-buffer "*cider-out*") + +(defcustom cider-interactive-eval-output-destination 'repl-buffer + "The destination for stdout and stderr produced from interactive evaluation." + :type '(choice (const output-buffer) + (const repl-buffer)) + :group 'cider + :package-version '(cider . "0.7.0")) + +(defface cider-error-highlight-face + '((((supports :underline (:style wave))) + (:underline (:style wave :color "red") :inherit unspecified)) + (t (:inherit font-lock-warning-face :underline t))) + "Face used to highlight compilation errors in Clojure buffers." + :group 'cider) + +(defface cider-warning-highlight-face + '((((supports :underline (:style wave))) + (:underline (:style wave :color "yellow") :inherit unspecified)) + (t (:inherit font-lock-warning-face :underline (:color "yellow")))) + "Face used to highlight compilation warnings in Clojure buffers." + :group 'cider) + +(defvar cider-required-nrepl-ops + '("classpath" "complete" "info" + "inspect-start" "inspect-refresh" + "inspect-pop" "inspect-push" "inspect-reset" + "macroexpand" "macroexpand-1" "macroexpand-all" + "resource" "stacktrace" "toggle-trace") + "A list of nREPL ops required by CIDER to function properly. + +All of them are provided by CIDER's nREPL middleware(cider-nrepl).") + +(defun cider-ensure-op-supported (op) + "Check for support of middleware op OP. +Signal an error if it is not supported." + (unless (nrepl-op-supported-p op) + (error "Can't find nREPL middleware providing op \"%s\". Please, install (or update) cider-nrepl %s and restart CIDER" op cider-version))) + +(defun cider-verify-required-nrepl-ops () + "Check whether all required nREPL ops are present." + (let ((missing-ops (-remove 'nrepl-op-supported-p cider-required-nrepl-ops))) + (when missing-ops + (cider-repl-emit-interactive-output + (format "WARNING: The following required nREPL ops are not supported: \n%s\nPlease, install (or update) cider-nrepl %s and restart CIDER" + (cider-string-join missing-ops " ") + cider-version))))) + +;;; Connection info +(defun cider--java-version () + "Retrieve the underlying connection's Java version." + (cider-eval-and-get-value "(System/getProperty \"java.version\")")) + +(defun cider--clojure-version () + "Retrieve the underlying connection's Clojure version." + (cider-eval-and-get-value "(clojure-version)")) + +(defun cider--nrepl-version () + "Retrieve the underlying connection's nREPL version." + (cider-eval-and-get-value "(:version-string clojure.tools.nrepl/version)")) + +(defun cider--nrepl-middleware-version () + "Retrieve the underlying connection's CIDER nREPL version." + (cider-eval-and-get-value "(try (require 'cider.nrepl) + (:version-string @(resolve 'cider.nrepl/version)) + (catch Throwable _ \"not installed\"))")) + +(defun cider--connection-info (connection-buffer) + "Return info about CONNECTION-BUFFER. + +Info contains project name, current REPL namespace, host:port +endpoint and Clojure version." + (with-current-buffer (get-buffer connection-buffer) + (format "Active nREPL connection: %s:%s, %s:%s (Java %s, Clojure %s, nREPL %s, cider-nrepl %s)" + (or (nrepl--project-name nrepl-project-dir) "") + nrepl-buffer-ns + (car nrepl-endpoint) + (cadr nrepl-endpoint) + (cider--java-version) + (cider--clojure-version) + (cider--nrepl-version) + (cider--nrepl-middleware-version)))) + +(defun cider-display-current-connection-info () + "Display information about the current connection." + (interactive) + (message (cider--connection-info (nrepl-current-connection-buffer)))) + +(defun cider-rotate-connection () + "Rotate and display the current nREPL connection." + (interactive) + (cider-ensure-connected) + (setq nrepl-connection-list + (append (cdr nrepl-connection-list) + (list (car nrepl-connection-list)))) + (message (cider--connection-info (car nrepl-connection-list)))) + +(defun cider-extract-designation-from-current-repl-buffer () + "Extract the designation from the cider repl buffer name." + (let ((repl-buffer-name (cider-current-repl-buffer)) + (template (split-string nrepl-repl-buffer-name-template "%s"))) + (string-match (format "^%s\\(.*\\)%s" + (regexp-quote (concat (car template) nrepl-buffer-name-separator)) + (regexp-quote (cadr template))) + repl-buffer-name) + (or (match-string 1 repl-buffer-name) ""))) + +(defun cider-change-buffers-designation () + "Change the designation in cider buffer names. +Buffer names changed are cider-repl, nrepl-connection and nrepl-server." + (interactive) + (cider-ensure-connected) + (let* ((designation (read-string (format "Change CIDER buffer designation from '%s': " + (cider-extract-designation-from-current-repl-buffer)))) + (new-repl-buffer-name (nrepl-format-buffer-name-template + nrepl-repl-buffer-name-template designation))) + (with-current-buffer (cider-current-repl-buffer) + (rename-buffer new-repl-buffer-name)) + (with-current-buffer (nrepl-current-connection-buffer) + (setq-local nrepl-repl-buffer new-repl-buffer-name) + (let ((new-connection-buffer-name (nrepl-format-buffer-name-template + nrepl-connection-buffer-name-template designation))) + (rename-buffer new-connection-buffer-name) + (setq nrepl-connection-list + (cons new-connection-buffer-name (cdr nrepl-connection-list))) + (with-current-buffer (cider-current-repl-buffer) + (setq-local nrepl-connection-buffer new-connection-buffer-name)) + (when nrepl-server-buffer + (let ((new-server-buffer-name (nrepl-format-buffer-name-template + nrepl-server-buffer-name-template designation))) + (with-current-buffer nrepl-server-buffer + (rename-buffer new-server-buffer-name)) + (setq-local nrepl-server-buffer new-server-buffer-name))))) + (message "CIDER buffer designation changed to: %s" designation))) + +;;; Switching between REPL & source buffers +(defvar-local cider-last-clojure-buffer nil + "A buffer-local variable holding the last Clojure source buffer. +`cider-switch-to-last-clojure-buffer' uses this variable to jump +back to last Clojure source buffer.") + +(defvar cider-current-clojure-buffer nil + "This variable holds current buffer temporarily when connecting to a REPL. +It is set to current buffer when `cider' or `cider-jack-in' is called. +After the REPL buffer is created, the value of this variable is used +to call `cider-remember-clojure-buffer'.") + +(defun cider-remember-clojure-buffer (buffer) + "Try to remember the BUFFER from which the user jumps. +The BUFFER needs to be a Clojure buffer and current major mode needs +to be `cider-repl-mode'. The user can use `cider-switch-to-last-clojure-buffer' +to jump back to the last Clojure source buffer." + (when (and buffer + (with-current-buffer buffer + (derived-mode-p 'clojure-mode)) + (derived-mode-p 'cider-repl-mode)) + (setq cider-last-clojure-buffer buffer))) + +(defun cider-switch-to-repl-buffer (&optional arg) + "Invoke `cider-switch-to-repl-command'." + (interactive "p") + (funcall cider-switch-to-repl-command arg)) + +(defun cider-switch-to-current-repl-buffer (&optional arg) + "Select the REPL buffer, when possible in an existing window. + +Hint: You can use `display-buffer-reuse-frames' and +`special-display-buffer-names' to customize the frame in which +the buffer should appear. + +With a prefix ARG sets the namespace in the REPL buffer to that +of the namespace in the Clojure source buffer." + (interactive "p") + (cider-ensure-connected) + (let ((buffer (current-buffer))) + (when (eq 4 arg) + (cider-repl-set-ns (cider-current-ns))) + (pop-to-buffer (cider-find-or-create-repl-buffer)) + (cider-remember-clojure-buffer buffer) + (goto-char (point-max)))) + +(defun cider-find-connection-buffer-for-project-directory (project-directory) + "Find the relevant connection-buffer for the given PROJECT-DIRECTORY. + +A check is made to ensure that all connection buffers have a project-directory +otherwise there is ambiguity as to which connection buffer should be selected. + +If there are multiple connection buffers matching PROJECT-DIRECTORY there +is ambiguity, therefore nil is returned." + (unless (-filter + (lambda (conn) + (not + (with-current-buffer (get-buffer conn) + nrepl-project-dir))) + nrepl-connection-list) + (let ((matching-connections + (-filter + (lambda (conn) + (let ((conn-proj-dir (with-current-buffer (get-buffer conn) + nrepl-project-dir))) + (when conn-proj-dir + (equal (file-truename project-directory) + (file-truename conn-proj-dir))))) + nrepl-connection-list))) + (when (= 1 (length matching-connections)) + (car matching-connections))))) + +(defun cider-switch-to-relevant-repl-buffer (&optional arg) + "Select the REPL buffer, when possible in an existing window. +The buffer chosen is based on the file open in the current buffer. + +If the REPL buffer cannot be unambiguously determined, the REPL +buffer is chosen based on the current connection buffer and a +message raised informing the user. + +Hint: You can use `display-buffer-reuse-frames' and +`special-display-buffer-names' to customize the frame in which +the buffer should appear. + +With a prefix ARG sets the namespace in the REPL buffer to that +of the namespace in the Clojure source buffer. + +With a second prefix ARG the chosen REPL buffer is based on a +supplied project directory." + (interactive "p") + (cider-ensure-connected) + (let* ((project-directory + (or (when (eq 16 arg) (read-directory-name "Project: ")) + (nrepl-project-directory-for (nrepl-current-dir)))) + (connection-buffer + (or + (and (= 1 (length nrepl-connection-list)) (car nrepl-connection-list)) + (and project-directory + (cider-find-connection-buffer-for-project-directory project-directory))))) + (when connection-buffer + (setq nrepl-connection-list + (cons connection-buffer (delq connection-buffer nrepl-connection-list)))) + (cider-switch-to-current-repl-buffer arg) + (message + (format (if connection-buffer + "Switched to REPL: %s" + "Could not determine relevant nREPL connection, using: %s") + (with-current-buffer (nrepl-current-connection-buffer) + (format "%s:%s, %s:%s" + (or (nrepl--project-name nrepl-project-dir) "") + nrepl-buffer-ns + (car nrepl-endpoint) + (cadr nrepl-endpoint))))))) + +(defun cider-switch-to-last-clojure-buffer () + "Switch to the last Clojure buffer. +The default keybinding for this command is +the same as `cider-switch-to-repl-buffer', +so that it is very convenient to jump between a +Clojure buffer and the REPL buffer." + (interactive) + (if (and (derived-mode-p 'cider-repl-mode) + (buffer-live-p cider-last-clojure-buffer)) + (pop-to-buffer cider-last-clojure-buffer) + (message "Don't know the original Clojure buffer"))) + +(defun cider-find-and-clear-repl-buffer () + "Find the current REPL buffer and clear it. +Returns to the buffer in which the command was invoked." + (interactive) + (let ((origin-buffer (current-buffer))) + (switch-to-buffer (cider-current-repl-buffer)) + (cider-repl-clear-buffer) + (switch-to-buffer origin-buffer))) + +;;; Minibuffer eval +(defvar cider-minibuffer-history '() + "History list of expressions read from the minibuffer.") + +(defvar cider-minibuffer-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map minibuffer-local-map) + (define-key map "TAB" 'complete-symbol) + (define-key map "M-TAB" 'complete-symbol) + map) + "Minibuffer keymap used for reading Clojure expressions.") + +(defun cider-read-from-minibuffer (prompt &optional initial-value) + "Read a string from the minibuffer, prompting with PROMPT. +If INITIAL-VALUE is non-nil, it is inserted into the minibuffer before +reading input." + (minibuffer-with-setup-hook + (lambda () + (add-hook 'completion-at-point-functions + #'cider-complete-at-point nil t) + (run-hooks 'eval-expression-minibuffer-setup-hook)) + (read-from-minibuffer prompt initial-value + cider-minibuffer-map nil + cider-minibuffer-history))) + +(defun cider-read-and-eval () + "Read a sexp from the minibuffer and output its result to the echo area." + (interactive) + (cider-interactive-eval (cider-read-from-minibuffer "CIDER Eval: "))) + +;;; Eval +(defun cider-eval-region (start end) + "Evaluate the region. +The two arguments START and END are character positions; +they can be in either order." + (interactive "r") + (cider-interactive-eval (buffer-substring-no-properties start end))) + +(defun cider-eval-buffer () + "Evaluate the current buffer." + (interactive) + (cider-eval-region (point-min) (point-max))) + +(defun cider-defun-at-point () + "Return the text of the top-level sexp at point." + (apply #'buffer-substring-no-properties + (cider--region-for-defun-at-point))) + +(defun cider--region-for-defun-at-point () + "Return the start and end position of defun at point." + (save-excursion + (save-match-data + (end-of-defun) + (let ((end (point))) + (beginning-of-defun) + (list (point) end))))) + +(defun cider-eval-defun-at-point (&optional prefix) + "Evaluate the current toplevel form, and print result in the minibuffer. +With a PREFIX argument, print the result in the current buffer." + (interactive "P") + (let ((form (cider-defun-at-point))) + (if prefix + (cider-interactive-eval-print form) + (cider-interactive-eval form)))) + +(defun cider-ns-form () + "Retrieve the ns form." + (when (clojure-find-ns) + (save-excursion + (goto-char (match-beginning 0)) + (cider-defun-at-point)))) + +(defun cider-eval-ns-form () + "Evaluate the current buffer's namespace form." + (interactive) + (when (clojure-find-ns) + (save-excursion + (goto-char (match-beginning 0)) + (cider-eval-defun-at-point)))) + +(defun cider-bounds-of-sexp-at-point () + "Return the bounds sexp at point as a pair (or nil)." + (or (and (equal (char-after) ?\() + (member (char-before) '(?\' ?\, ?\@)) + ;; hide stuff before ( to avoid quirks with '( etc. + (save-restriction + (narrow-to-region (point) (point-max)) + (bounds-of-thing-at-point 'sexp))) + (bounds-of-thing-at-point 'sexp))) + +;; FIXME: This doesn't have properly at the beginning of the REPL prompt +(defun cider-symbol-at-point () + "Return the name of the symbol at point, otherwise nil." + (let ((str (substring-no-properties (or (thing-at-point 'symbol) "")))) + (if (equal str (concat (cider-find-ns) "> ")) + "" + str))) + +(defun cider-sexp-at-point () + "Return the sexp at point as a string, otherwise nil." + (let ((bounds (cider-bounds-of-sexp-at-point))) + (if bounds + (buffer-substring-no-properties (car bounds) + (cdr bounds))))) + +(defun cider-sexp-at-point-with-bounds () + "Return a list containing the sexp at point and its bounds." + (let ((bounds (cider-bounds-of-sexp-at-point))) + (if bounds + (let ((start (car bounds)) + (end (cdr bounds))) + (list (buffer-substring-no-properties start end) + (cons (set-marker (make-marker) start) + (set-marker (make-marker) end))))))) + +(defun cider-last-sexp () + "Return the sexp preceding the point." + (buffer-substring-no-properties + (save-excursion + (backward-sexp) + (point)) + (point))) + +;;; +(defun cider-tramp-prefix (&optional buffer) + "Use the filename for BUFFER to determine a tramp prefix. +Defaults to the current buffer. +Return the tramp prefix, or nil if BUFFER is local." + (let* ((buffer (or buffer (current-buffer))) + (name (buffer-file-name buffer))) + (when (tramp-tramp-file-p name) + (let ((vec (tramp-dissect-file-name name))) + (tramp-make-tramp-file-name (tramp-file-name-method vec) + (tramp-file-name-user vec) + (tramp-file-name-host vec) + nil))))) + +(defun cider--client-tramp-filename (name &optional buffer) + "Return the tramp filename for path NAME relative to BUFFER. +If BUFFER has a tramp prefix, it will be added as a prefix to NAME. +If the resulting path is an existing tramp file, it returns the path, +otherwise, nil." + (let* ((buffer (or buffer (current-buffer))) + (name (concat (cider-tramp-prefix buffer) name))) + (if (tramp-handle-file-exists-p name) + name))) + +(defun cider--server-filename (name) + "Return the nREPL server-relative filename for NAME." + (if (tramp-tramp-file-p name) + (with-parsed-tramp-file-name name nil + localname) + name)) + +(defun cider--file-path (path) + "Return PATH's local or tramp path using `cider-prefer-local-resources'. +If no local or remote file exists, return nil." + (let ((local-path path) + (tramp-path (and path (cider--client-tramp-filename path)))) + (cond ((equal path "") "") + ((and cider-prefer-local-resources (file-exists-p local-path)) + local-path) + ((file-exists-p tramp-path) + tramp-path) + ((file-exists-p local-path) + local-path)))) + +(defun cider--url-to-file (url) + "Return the filename from the resource URL. +Uses `url-generic-parse-url' to parse the url. The filename is extracted and +then url decoded. If the decoded filename has a Windows device letter followed +by a colon immediately after the leading '/' then the leading '/' is dropped to +create a valid path." + (let ((filename (url-unhex-string (url-filename (url-generic-parse-url url))))) + (if (string-match "^/\\([a-zA-Z]:/.*\\)" filename) + (match-string 1 filename) + filename))) + +(defun cider-find-file (url) + "Return a buffer visiting the file URL if it exists, or nil otherwise. +The argument should have a scheme prefix, and represent a fully-qualified file +path or an entry within a zip/jar archive." + (cond ((string-match "^file:\\(.+\\)" url) + (-when-let* ((file (cider--url-to-file (match-string 1 url))) + (path (cider--file-path file))) + (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)) + (name (format "%s:%s" path entry))) + (or (get-file-buffer name) + (if (tramp-tramp-file-p path) + (progn + ;; Use emacs built in archiving + (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) + (let ((opened-buffer (current-buffer))) + (archive-extract) + (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)))))))) + +(defun cider-find-var (var) + "Return a buffer visiting the definition for VAR, or nil if not found." + (cider-ensure-op-supported "info") + (-when-let* ((info (cider-var-info var)) + (file (cadr (assoc "file" info))) + (line (cadr (assoc "line" info))) + (buffer (cider-find-file file))) + (with-current-buffer buffer + (goto-line line) + buffer))) + +(defun cider-jump-to (buffer &optional line) + "Push current point onto marker ring, and jump to BUFFER, optionally at LINE. +`cider-mode' is enabled on BUFFER to ensure `cider-jump' and `cider-jump-back' +are available." + (ring-insert find-tag-marker-ring (point-marker)) + (with-current-buffer buffer + (goto-line (or line 1)) + (cider-mode +1)) + (switch-to-buffer buffer)) + +(defun cider-jump-to-resource (path &optional line) + "Jump to the resource at the relative PATH, optionally at a specific LINE. +When called interactively, this operates on point." + (interactive (list (thing-at-point 'filename))) + (cider-ensure-op-supported "resource") + (-if-let* ((resource (-> (list "op" "resource" "name" path) + (nrepl-send-request-sync) + (plist-get :value))) + (buffer (cider-find-file resource))) + (cider-jump-to buffer line) + (message "Cannot find resource %s" path))) + +(defun cider-jump-to-var (var &optional line) + "Jump to the definition of VAR, optionally at a specific LINE. +When called interactively, this operates on point, or falls back to a prompt." + (interactive (list (cider-read-symbol-name "Symbol: " 'identity))) + (cider-ensure-op-supported "info") + (-if-let (info (cider-var-info var)) + (-if-let* ((file (cadr (assoc "file" info))) + (line (or line (cadr (assoc "line" info)))) + (buffer (cider-find-file file))) + (cider-jump-to buffer line) + (message "No source available for %s" var)) + (message "Symbol %s not resolved" var))) + +(define-obsolete-function-alias 'cider-jump 'cider-jump-to-var "0.7.0") +(defalias 'cider-jump-back 'pop-tag-mark) + +(defvar cider-completion-last-context nil) + +(defun cider-completion-symbol-start-pos () + "Find the starting position of the symbol at point, unless inside a string." + (let ((sap (symbol-at-point))) + (when (and sap (not (in-string-p))) + (car (bounds-of-thing-at-point 'symbol))))) + +(defun cider-completion-get-context-at-point () + "Extract the context at point. +If point is not inside the list, returns nil; otherwise return top-level +form, with symbol at point replaced by __prefix__." + (when (save-excursion + (condition-case foo + (progn + (up-list) + (check-parens) + t) + (scan-error nil) + (user-error nil))) + (save-excursion + (let* ((pref-end (point)) + (pref-start (cider-completion-symbol-start-pos)) + (context (cider-defun-at-point)) + (_ (beginning-of-defun)) + (expr-start (point))) + (concat (substring context 0 (- pref-start expr-start)) + "__prefix__" + (substring context (- pref-end expr-start))))))) + +(defun cider-completion-get-context () + "Extract context depending on `cider-completion-use-context' and major mode." + (let ((context (if (and cider-completion-use-context + ;; Important because `beginning-of-defun' and + ;; `ending-of-defun' work incorrectly in the REPL + ;; buffer, so context extraction fails there. + (not (eq major-mode 'cider-repl-buffer))) + (or (cider-completion-get-context-at-point) + "nil") + "nil"))) + (if (string= cider-completion-last-context context) + ":same" + (setq cider-completion-last-context context) + context))) + +(defun cider-complete (str) + "Return a list of completions for STR using nREPL's \"complete\" op." + (cider-ensure-op-supported "complete") + (let ((strlst (plist-get + (nrepl-send-request-sync + (list "op" "complete" + "session" (nrepl-current-session) + "ns" nrepl-buffer-ns + "symbol" str + "context" (cider-completion-get-context))) + :value))) + (when strlst + strlst))) + +(defun cider-complete-at-point () + "Complete the symbol at point." + (let ((sap (symbol-at-point))) + (when (and sap (not (in-string-p))) + (let ((bounds (bounds-of-thing-at-point 'symbol))) + (list (car bounds) (cdr bounds) + (completion-table-dynamic #'cider-complete) + :company-doc-buffer #'cider-create-doc-buffer + :company-location #'cider-company-location + :company-docsig #'cider-company-docsig))))) + +(defun cider-company-location (var) + "Open VAR's definition in a buffer. + +Returns the cons of the buffer itself and the location of VAR's definition +in the buffer." + (-when-let (buffer (cider-find-var var)) + (with-current-buffer buffer + (cons buffer (point))))) + +(defun cider-company-docsig (thing) + "Return signature for THING." + (let ((arglist (cider-eldoc-arglist thing))) + (when arglist + (format "%s: %s" + (cider-eldoc-format-thing thing) + arglist)))) + +(defun cider-javadoc-handler (symbol-name) + "Invoke the nREPL \"info\" op on SYMBOL-NAME if available." + (when symbol-name + (cider-ensure-op-supported "info") + (let* ((info (cider-var-info symbol-name)) + (url (cadr (assoc "javadoc" info)))) + (if url + (browse-url url) + (error "No Javadoc available for %s" symbol-name))))) + +(defun cider-javadoc (query) + "Browse Javadoc on the Java symbol QUERY at point." + (interactive "P") + (cider-read-symbol-name "Javadoc for: " 'cider-javadoc-handler query)) + +(defun cider-stdin-handler (buffer) + "Make a stdin response handler for BUFFER." + (nrepl-make-response-handler buffer + (lambda (buffer value) + (cider-repl-emit-result buffer value t)) + (lambda (buffer out) + (cider-repl-emit-output buffer out t)) + (lambda (buffer err) + (cider-repl-emit-output buffer err t)) + nil)) + +(defun cider-insert-eval-handler (buffer) + "Make a nREPL evaluation handler for the BUFFER. +The handler simply inserts the result value in BUFFER." + (nrepl-make-response-handler buffer + (lambda (_buffer value) + (with-current-buffer buffer + (insert value))) + (lambda (_buffer out) + (cider-repl-emit-interactive-output out)) + (lambda (buffer err) + (cider-highlight-compilation-errors buffer err) + (cider-jump-to-error-maybe buffer err)) + '())) + +(defun cider-emit-interactive-eval-output (output) + "Emit standard or error output resulting from interactive code evaluation. + +The output can be send to either a dedicated output buffer or the current REPL buffer. +This is controlled via `cider-interactive-eval-output-destination'." + (pcase cider-interactive-eval-output-destination + (`output-buffer (let ((output-buffer (or (get-buffer cider-output-buffer) + (cider-popup-buffer cider-output-buffer t)))) + (cider-emit-into-popup-buffer output-buffer output) + (pop-to-buffer output-buffer))) + (`repl-buffer (cider-repl-emit-interactive-output output)) + (t (error "Unsupported value %s for `cider-interactive-eval-output'")))) + +(defun cider-interactive-eval-handler (buffer) + "Make an interactive eval handler for BUFFER." + (nrepl-make-response-handler buffer + (lambda (_buffer value) + (message "%s%s" + cider-interactive-eval-result-prefix + (cider-font-lock-as-clojure value))) + (lambda (_buffer out) + (cider-emit-interactive-eval-output out)) + (lambda (buffer err) + (cider-emit-interactive-eval-output err) + (cider-highlight-compilation-errors buffer err) + (cider-jump-to-error-maybe buffer err)) + '())) + +(defun cider-load-file-handler (buffer) + "Make a load file handler for BUFFER." + (nrepl-make-response-handler buffer + (lambda (buffer value) + (message "%s" value) + (with-current-buffer buffer + (setq nrepl-buffer-ns (clojure-find-ns)) + (run-hooks 'cider-file-loaded-hook))) + (lambda (_buffer value) + (cider-emit-interactive-eval-output value)) + (lambda (buffer err) + (cider-emit-interactive-eval-output err) + (cider-highlight-compilation-errors buffer err) + (cider-jump-to-error-maybe buffer err)) + '() + (lambda (buffer ex root-ex session) + (funcall nrepl-err-handler + buffer ex root-ex session)))) + +(defun cider-interactive-eval-print-handler (buffer) + "Make a handler for evaluating and printing result in BUFFER." + (nrepl-make-response-handler buffer + (lambda (buffer value) + (with-current-buffer buffer + (insert + (if (derived-mode-p 'cider-clojure-interaction-mode) + (format "\n%s\n" value) + value)))) + (lambda (_buffer out) + (cider-emit-interactive-eval-output out)) + (lambda (_buffer err) + (cider-emit-interactive-eval-output err)) + '())) + +(defun cider-popup-eval-print-handler (buffer) + "Make a handler for evaluating and printing result in popup BUFFER." + (nrepl-make-response-handler buffer + (lambda (buffer str) + (cider-emit-into-popup-buffer buffer str)) + '() + (lambda (buffer str) + (cider-emit-into-popup-buffer buffer str)) + '())) + +(defun cider-popup-eval-out-handler (buffer) + "Make a handler for evaluating and printing stdout/stderr in popup BUFFER. + +This is used by pretty-printing commands and intentionally discards their results." + (nrepl-make-response-handler buffer + '() + (lambda (buffer str) + (cider-emit-into-popup-buffer buffer str)) + (lambda (buffer str) + (cider-emit-into-popup-buffer buffer str)) + '())) + +(defun cider-visit-error-buffer () + "Visit the `cider-error-buffer' (usually *cider-error*) if it exists." + (interactive) + (let ((buffer (get-buffer cider-error-buffer))) + (if buffer + (cider-popup-buffer-display buffer cider-auto-select-error-buffer) + (error "No %s buffer" cider-error-buffer)))) + +(defun cider-find-property (property &optional backward) + "Find the next text region which has the specified PROPERTY. +If BACKWARD is t, then search backward. +Returns the position at which PROPERTY was found, or nil if not found." + (let ((p (if backward + (previous-single-char-property-change (point) property) + (next-single-char-property-change (point) property)))) + (when (and (not (= p (point-min))) (not (= p (point-max)))) + p))) + +(defun cider-jump-to-compilation-error (&optional _arg _reset) + "Jump to the line causing the current compilation error. + +_ARG and _RESET are ignored, as there is only ever one compilation error. +They exist for compatibility with `next-error'." + (interactive) + (cl-labels ((goto-next-note-boundary + () + (let ((p (or (cider-find-property 'cider-note-p) + (cider-find-property 'cider-note-p t)))) + (when p + (goto-char p) + (message (get-char-property p 'cider-note)))))) + ;; if we're already on a compilation error, first jump to the end of + ;; it, so that we find the next error. + (when (get-char-property (point) 'cider-note-p) + (goto-next-note-boundary)) + (goto-next-note-boundary))) + +(defun cider-default-err-eval-handler (buffer session) + "Display in BUFFER the last SESSION exception, without middleware support." + (cider-eval "(clojure.stacktrace/print-cause-trace *e)" + (lambda (response) + (nrepl-dbind-response response (out) + (when out + (with-current-buffer buffer + (cider-emit-into-color-buffer buffer out) + (compilation-minor-mode +1))))) + nil + session)) + +(defun cider-default-err-op-handler (buffer session) + "Display in BUFFER the last SESSION exception, with middleware support." + (let (causes) + (nrepl-send-request + (list "op" "stacktrace" "session" session) + (lambda (response) + (nrepl-dbind-response response (class status) + (cond (class (setq causes (cons response causes))) + (status (when causes + (cider-stacktrace-render buffer (reverse causes)))))))))) + +(defun cider--show-error-buffer-p (buffer) + "Return non-nil if stacktrace buffer must be shown on error. +Takes into account the current BUFFER and the value of `cider-show-error-buffer'." + (let ((replp (with-current-buffer buffer (derived-mode-p 'cider-repl-mode)))) + (memq cider-show-error-buffer + (if replp + '(t always only-in-repl) + '(t always except-in-repl))))) + +(defun cider-default-err-handler (buffer ex root-ex session) + "Make an error handler for BUFFER, EX, ROOT-EX and SESSION. +This function determines how the error buffer is shown, and then delegates +the actual error content to the eval or op handler." + (let* ((error-buffer (if (cider--show-error-buffer-p buffer) + (cider-popup-buffer cider-error-buffer + cider-auto-select-error-buffer) + (cider-make-popup-buffer cider-error-buffer)))) + (if (nrepl-op-supported-p "stacktrace") + (cider-default-err-op-handler error-buffer session) + (cider-default-err-eval-handler error-buffer session)))) + +(defvar cider-compilation-regexp + '("\\(?:.*\\(warning, \\)\\|.*?\\(, compiling\\):(\\)\\([^:]*\\):\\([[:digit:]]+\\)\\(?::\\([[:digit:]]+\\)\\)?\\(\\(?: - \\(.*\\)\\)\\|)\\)" 3 4 5 (1)) + "Specifications for matching errors and warnings in Clojure stacktraces. +See `compilation-error-regexp-alist' for help on their format.") + +(add-to-list 'compilation-error-regexp-alist-alist + (cons 'cider cider-compilation-regexp)) +(add-to-list 'compilation-error-regexp-alist 'cider) + +(defun cider-extract-error-info (regexp message) + "Extract error information with REGEXP against MESSAGE." + (let ((file (nth 1 regexp)) + (line (nth 2 regexp)) + (col (nth 3 regexp)) + (type (nth 4 regexp)) + (pat (car regexp))) + (when (string-match pat message) + ;; special processing for type (1.2) style + (setq type (if (consp type) + (or (and (car type) (match-end (car type)) 1) + (and (cdr type) (match-end (cdr type)) 0) + 2))) + (list + (when file + (let ((val (match-string-no-properties file message))) + (unless (string= val "NO_SOURCE_PATH") val))) + (when line (string-to-number (match-string-no-properties line message))) + (when col + (let ((val (match-string-no-properties col message))) + (when val (string-to-number val)))) + (aref [cider-warning-highlight-face + cider-warning-highlight-face + cider-error-highlight-face] + (or type 2)) + message)))) + +(defun cider--goto-expression-start () + "Go to the beginning a list, vector, map or set outside of a string. + +We do so by starting and the current position and proceeding backwards +until we find a delimiters that's not inside a string." + (while (or (not (looking-at "[({[]")) + (eq 'font-lock-string-face + (get-text-property (point) 'face))) + (backward-char))) + +(defun cider--find-last-error-location (buffer message) + "Return the location (begin . end) in BUFFER from the clojure error MESSAGE. +If location could not be found, return nil." + (save-excursion + (with-current-buffer buffer + (let ((info (cider-extract-error-info cider-compilation-regexp message))) + (when info + (let ((file (nth 0 info)) + (line (nth 1 info)) + (col (nth 2 info))) + (save-excursion + ;; when we don't have a filename or it's different from the one of + ;; the current buffer, the line number is relative to form start + (if (and file (equal (file-truename file) + (file-truename (buffer-file-name)))) + (goto-char (point-min)) ; start of file + (beginning-of-defun)) + (forward-line (1- line)) + (move-to-column (or col 0)) + (let ((begin (progn (if col (cider--goto-expression-start) (back-to-indentation)) + (point))) + (end (progn (if col (forward-list) (move-end-of-line nil)) + (point)))) + (cons begin end))))))))) + +(defun cider-highlight-compilation-errors (buffer message) + "Highlight compilation error line in BUFFER, using MESSAGE." + (-when-let* ((pos (cider--find-last-error-location buffer message)) + (overlay (make-overlay (car pos) (cdr pos) buffer)) + (info (cider-extract-error-info cider-compilation-regexp message))) + (let ((face (nth 3 info)) + (note (nth 4 info))) + (overlay-put overlay 'cider-note-p t) + (overlay-put overlay 'face face) + (overlay-put overlay 'cider-note note) + (overlay-put overlay 'help-echo note) + (overlay-put overlay 'modification-hooks + (list (lambda (o &rest args) (delete-overlay o))))))) + +(defun cider-jump-to-error-maybe (buffer err) + "If `cider-auto-jump-to-error' is non-nil, retrieve error location from ERR and jump to it." + (-when-let (pos (and cider-auto-jump-to-error + (cider--find-last-error-location buffer err))) + (with-current-buffer buffer + (goto-char (car pos))))) + + +(defun cider-need-input (buffer) + "Handle an need-input request from BUFFER." + (with-current-buffer buffer + (nrepl-send-stdin (concat (read-from-minibuffer "Stdin: ") "\n") + (cider-stdin-handler buffer)))) + + +;;;; Popup buffers +(define-minor-mode cider-popup-buffer-mode + "Mode for CIDER popup buffers" + nil + (" cider-tmp") + '(("q" . cider-popup-buffer-quit-function))) + +(defvar-local cider-popup-buffer-quit-function 'cider-popup-buffer-quit + "The function that is used to quit a temporary popup buffer.") + +(defun cider-popup-buffer-quit-function (&optional kill-buffer-p) + "Wrapper to invoke the function `cider-popup-buffer-quit-function'. +KILL-BUFFER-P is passed along." + (interactive) + (funcall cider-popup-buffer-quit-function kill-buffer-p)) + +(defun cider-popup-buffer (name &optional select major-mode) + "Create new popup buffer called NAME. +If SELECT is non-nil, select the newly created window. +If MAJOR-MODE is non-nil enabled it for the popup buffer." + (with-current-buffer (cider-make-popup-buffer name major-mode) + (cider-popup-buffer-display (current-buffer) select))) + +(defun cider-popup-buffer-display (popup-buffer &optional select) + "Display POPUP-BUFFER. +If SELECT is non-nil, select the newly created window" + (with-current-buffer popup-buffer + (let ((new-window (display-buffer (current-buffer)))) + (set-window-point new-window (point)) + (when select + (select-window new-window)) + (current-buffer)))) + +(defun cider-popup-buffer-quit (&optional kill-buffer-p) + "Quit the current (temp) window and bury its buffer using `quit-window'. +If prefix argument KILL-BUFFER-P is non-nil, kill the buffer instead of burying it." + (interactive) + (quit-window kill-buffer-p (selected-window))) + +(defun cider-make-popup-buffer (name &optional major-mode) + "Create a temporary buffer called NAME using MAJOR-mode (if specified)." + (with-current-buffer (get-buffer-create name) + (kill-all-local-variables) + (setq buffer-read-only nil) + (erase-buffer) + (when major-mode + (funcall major-mode)) + (setq-local cider-popup-output-marker (point-marker)) + (cider-popup-buffer-mode 1) + (setq buffer-read-only t) + (current-buffer))) + +(defun cider-emit-into-popup-buffer (buffer value) + "Emit into BUFFER the provided VALUE." + (with-current-buffer buffer + (let ((inhibit-read-only t) + (buffer-undo-list t) + (moving (= (point) cider-popup-output-marker))) + (save-excursion + (goto-char cider-popup-output-marker) + (insert (format "%s" value)) + (indent-sexp) + (set-marker cider-popup-output-marker (point))) + (when moving (goto-char cider-popup-output-marker))))) + +(defun cider-emit-into-color-buffer (buffer value) + "Emit into color BUFFER the provided VALUE." + (with-current-buffer buffer + (let ((inhibit-read-only t) + (buffer-undo-list t)) + (goto-char (point-max)) + (insert (format "%s" value)) + (ansi-color-apply-on-region (point-min) (point-max))) + (goto-char (point-min)))) + +;;; Namespace handling +(defun cider-find-ns () + "Return the ns of the current buffer. + +For Clojure buffers the ns is extracted from the ns header. If +it's missing \"user\" is used as fallback." + (cond + ((derived-mode-p 'clojure-mode) + (or (save-restriction + (widen) + (clojure-find-ns)) + "user")) + ((derived-mode-p 'cider-repl-mode) + nrepl-buffer-ns))) + +(defun cider-current-ns () + "Return the ns in the current context. +If `nrepl-buffer-ns' has a value then return that, otherwise +search for and read a `ns' form." + (let ((ns nrepl-buffer-ns)) + (or (and (string= ns "user") + (cider-find-ns)) + ns))) + + +;;; Evaluation +(defun cider-popup-eval-print (form) + "Evaluate the given FORM and print value in current buffer." + (let ((buffer (current-buffer))) + (cider-eval form + (cider-popup-eval-print-handler buffer) + (cider-current-ns)))) + +(defun cider-interactive-eval-print (form) + "Evaluate the given FORM and print value in current buffer." + (let ((buffer (current-buffer))) + (cider-eval form + (cider-interactive-eval-print-handler buffer) + (cider-current-ns)))) + +(defun cider-interactive-eval (form) + "Evaluate the given FORM and print value in minibuffer." + (remove-overlays (point-min) (point-max) 'cider-note-p t) + (let ((buffer (current-buffer))) + (cider-eval form + (cider-interactive-eval-handler buffer) + (cider-current-ns)))) + +(defun cider-interactive-eval-to-repl (form) + "Evaluate the given FORM and print it's value in REPL buffer." + (let ((buffer (cider-current-repl-buffer))) + (cider-eval form + (cider-insert-eval-handler buffer) + (cider-current-ns)))) + +(defun cider-eval-last-sexp (&optional prefix) + "Evaluate the expression preceding point. +If invoked with a PREFIX argument, print the result in the current buffer." + (interactive "P") + (if prefix + (cider-interactive-eval-print (cider-last-sexp)) + (cider-interactive-eval (cider-last-sexp)))) + +(defun cider-eval-last-sexp-and-replace () + "Evaluate the expression preceding point and replace it with its result." + (interactive) + (let ((last-sexp (cider-last-sexp))) + ;; we have to be sure the evaluation won't result in an error + (cider-eval-and-get-value last-sexp) + ;; seems like the sexp is valid, so we can safely kill it + (backward-kill-sexp) + (cider-interactive-eval-print last-sexp))) + +(defun cider-eval-last-sexp-to-repl (&optional prefix) + "Evaluate the expression preceding point and insert its result in the REPL. +If invoked with a PREFIX argument, switch to the REPL buffer." + (interactive "P") + (cider-interactive-eval-to-repl (cider-last-sexp)) + (when prefix + (cider-switch-to-repl-buffer))) + +(defun cider-eval-print-last-sexp () + "Evaluate the expression preceding point. +Print its value into the current buffer." + (interactive) + (cider-interactive-eval-print (cider-last-sexp))) + +(defun cider-pprint-eval-last-sexp () + "Evaluate the sexp preceding point and pprint its value in a popup buffer." + (interactive) + (let ((form (cider-last-sexp)) + (result-buffer (cider-popup-buffer cider-result-buffer nil 'clojure-mode))) + (cider-eval (cider-format-pprint-eval form) + (cider-popup-eval-out-handler result-buffer) + (cider-current-ns)))) + +(defun cider-pprint-eval-defun-at-point () + "Evaluate the top-level form at point and pprint its value in a popup buffer." + (interactive) + (let ((form (cider-defun-at-point)) + (result-buffer (cider-popup-buffer cider-result-buffer nil 'clojure-mode))) + (cider-eval (cider-format-pprint-eval form) + (cider-popup-eval-out-handler result-buffer) + (cider-current-ns)))) + +(defun cider-insert-in-repl (form eval) + "Insert FORM in the REPL buffer and switch to it. +If EVAL is non-nil the form will also be evaluated." + (let ((start-pos (point))) + (while (string-match "\\`[ \t\n\r]+\\|[ \t\n\r]+\\'" form) + (setq form (replace-match "" t t form))) + (with-current-buffer (cider-current-repl-buffer) + (insert form) + (indent-region start-pos (point)) + (when eval + (cider-repl-return)))) + (cider-switch-to-repl-buffer)) + +(defun cider-insert-last-sexp-in-repl (&optional arg) + "Insert the expression preceding point in the REPL buffer. +If invoked with a prefix ARG eval the expression after inserting it." + (interactive "P") + (cider-insert-in-repl (cider-last-sexp) arg)) + +(defun cider-insert-defun-in-repl (&optional arg) + "Insert the top-level form at point in the REPL buffer. +If invoked with a prefix ARG eval the expression after inserting it." + (interactive "P") + (cider-insert-in-repl (cider-defun-at-point) arg)) + +(defun cider-insert-ns-form-in-repl (&optional arg) + "Insert the current buffer's ns form in the REPL buffer. +If invoked with a prefix ARG eval the expression after inserting it." + (interactive "P") + (cider-insert-in-repl (cider-ns-form) arg)) + +(defun cider-ping () + "Check that communication with the server works." + (interactive) + (message "%s" (cider-eval-and-get-value "\"PONG\""))) + +(defun clojure-enable-cider () + "Turn on CIDER mode (see command `cider-mode'). +Useful in hooks." + (cider-mode 1) + (setq next-error-function 'cider-jump-to-compilation-error)) + +(defun clojure-disable-cider () + "Turn off CIDER mode (see command `cider-mode'). +Useful in hooks." + (cider-mode -1)) + +(defun cider-connected-p () + "Return t if CIDER is currently connected, nil otherwise." + (condition-case nil + (nrepl-current-connection-buffer) + (error nil))) + +(defun cider-ensure-connected () + "Ensure there is a cider connection present, otherwise +an error is signalled." + (unless (cider-connected-p) + (error "No active nREPL connection"))) + +(defun cider-enable-on-existing-clojure-buffers () + "Enable interaction mode on existing Clojure buffers. +See command `cider-mode'." + (interactive) + (add-hook 'clojure-mode-hook 'clojure-enable-cider) + (dolist (buffer (cider-util--clojure-buffers)) + (with-current-buffer buffer + (clojure-enable-cider)))) + +(defun cider-disable-on-existing-clojure-buffers () + "Disable `cider-mode' on existing Clojure buffers. +See command `cider-mode'." + (interactive) + (dolist (buffer (cider-util--clojure-buffers)) + (with-current-buffer buffer + (setq nrepl-buffer-ns "user") + (clojure-disable-cider)))) + +(defun cider-possibly-disable-on-existing-clojure-buffers () + "If not connected, disable `cider-mode' on existing Clojure buffers." + (unless (cider-connected-p) + (cider-disable-on-existing-clojure-buffers))) + +(defun cider-fetch-vars-form (ns) + "Construct a Clojure form to read vars inside for NS." + `(concat (if (find-ns (symbol ,ns)) + (map name (concat (keys (ns-interns (symbol ,ns))) + (keys (ns-refers (symbol ,ns)))))) + (if (not= "" ,ns) [".."]) + (->> (all-ns) + (map (fn [n] + (re-find (re-pattern (str "^" (if (not= ,ns "") + (str ,ns "\\.")) + "[^\\.]+")) + (str n)))) + (filter identity) + (map (fn [n] (str n "/"))) + (into (hash-set))))) + +(defun cider-parent-ns (ns) + "Go up a level of NS. +For example \"foo.bar.tar\" -> \"foo.bar\"." + (cider-string-join (butlast (split-string ns "\\.")) ".")) + +(defun cider-completing-read-var-select (prompt callback ns selected targets) + "Peform completing read using SELECTED and TARGETS. +If SELECTED is \"..\" then another selection is made for vars in the parent namespace of +NS using PROMPT. +If SELECTED is a namespace then another selection is made against that namespace +using PROMPT. +Once a selecton is made CALLBACK is called with SELECTED." + ;; TODO: immediate RET gives "" as selected for some reason + ;; this is an OK workaround though + (cond ((equal "" selected) + (cider-completing-read-var-select prompt callback ns (car targets) targets)) + ((equal "/" (substring selected -1)) ; selected a namespace + (cider-completing-read-var prompt (substring selected 0 -1) callback)) + ((equal ".." selected) + (cider-completing-read-var prompt (cider-parent-ns ns) callback)) + ;; non ido variable selection techniques don't return qualified symbols, so this shouldn't either + (t (funcall callback selected)))) + +(defun cider-completing-read-sym-handler (label completing-read-callback buffer) + "Create an nrepl response handler for BUFFER. +The handler will parse the response from nrepl to create targets for a completing read. +The result of the completing read will be passed to COMPLETING-READ-CALLBACK." + (nrepl-make-response-handler buffer + (lambda (buffer value) + ;; make sure to eval the callback in the buffer that the symbol was requested from so we get the right namespace + (with-current-buffer buffer + (let* ((targets (car (read-from-string value))) + (selected (completing-read label targets nil t))) + (funcall completing-read-callback selected targets)))) + nil nil nil)) + +(defun cider-completing-read-sym-form (label form callback) + "Eval the FORM and pass the result to the response handler." + (cider-tooling-eval form (cider-completing-read-sym-handler label callback (current-buffer)) + nrepl-buffer-ns)) + +(defun cider-completing-read-var (prompt ns callback) + "Perform completing read var in NS using CALLBACK." + (cider-completing-read-sym-form prompt (prin1-to-string (cider-fetch-vars-form ns)) + (lambda (selected targets) + (cider-completing-read-var-select prompt callback ns selected targets)))) + +(defun cider-fetch-fns-form (ns) + "Construct a Clojure form for reading fns using supplied NS." + (format "(let [fn-pred (fn [[k v]] (and (fn? (.get v)) + (not (re-find #\"clojure.\" (str v)))))] + (sort + (map (comp name key) + (filter fn-pred + (concat + (ns-interns '%s) + (ns-refers '%s))))))" ns ns)) + +(defun cider-load-fn-into-repl-buffer () + "Browse functions available in current repl buffer. +Once selected, the name of the fn will appear in the repl buffer in parens +ready to call." + (interactive) + (cider-completing-read-sym-form (format "Fn: %s/" nrepl-buffer-ns) + (cider-fetch-fns-form (cider-current-ns)) + (lambda (f _targets) + (with-current-buffer (cider-current-repl-buffer) + (cider-repl--replace-input (format "(%s)" f)) + (goto-char (- (point-max) 1)))))) + +(defun cider-read-symbol-name (prompt callback &optional query) + "Either read a symbol name using PROMPT or choose the one at point. +Use CALLBACK as the completing read var callback. +The user is prompted with PROMPT if a prefix argument is in effect, +if there is no symbol at point, or if QUERY is non-nil." + (let ((symbol-name (cider-symbol-at-point))) + (if (not (or current-prefix-arg + query + (not symbol-name) + (equal "" symbol-name))) + (funcall callback symbol-name) + (cider-completing-read-var prompt nrepl-buffer-ns callback)))) + +(defun cider-toggle-trace (query) + "Toggle tracing for the given QUERY. +Defaults to the symbol at point. With prefix arg or no symbol at +point, prompts for a var." + (interactive "P") + (cider-ensure-op-supported "toggle-trace") + (cider-read-symbol-name + "Toggle trace for var: " + (lambda (sym) + (nrepl-send-request + (list "op" "toggle-trace" + "ns" (cider-current-ns) + "var" sym) + (cider-interactive-eval-handler (current-buffer)))) + query)) + +(defun cider-create-doc-buffer (symbol) + "Populates *cider-doc* with the documentation for SYMBOL." + (-when-let (info (cider-var-info symbol)) + (cider-docview-render (cider-make-popup-buffer cider-doc-buffer) symbol info))) + +(defun cider-doc-lookup (symbol) + "Look up documentation for SYMBOL." + (-if-let (buffer (cider-create-doc-buffer symbol)) + (cider-popup-buffer-display buffer t) + (message "Symbol %s not resolved" symbol))) + +(defun cider-doc (query) + "Open a window with the docstring for the given QUERY. +Defaults to the symbol at point. With prefix arg or no symbol +under point, prompts for a var." + (interactive "P") + (cider-read-symbol-name "Symbol: " 'cider-doc-lookup query)) + +(defconst cider-grimoire-url "http://grimoire.arrdem.com/") + +(defun cider-grimoire-replace-special (name) + "Convert the dashes in NAME to a grimoire friendly format." + (->> name + (replace-regexp-in-string "\\?" "_QMARK_") + (replace-regexp-in-string "\\." "_DOT_") + (replace-regexp-in-string "\\/" "_SLASH_") + (replace-regexp-in-string "\\(\\`_\\)\\|\\(_\\'\\)" ""))) + +(defun cider-grimoire-url (name ns clojure-version) + "Generate a grimoire url from NAME, NS and CLOJURE-VERSION." + (let ((clojure-version (concat (substring clojure-version 0 4) "0")) + (base-url cider-grimoire-url)) + (if name + (concat base-url clojure-version "/" ns "/" (cider-grimoire-replace-special name) "/") + (concat base-url clojure-version "/" ns "/")))) + +(defun cider-grimoire-web-lookup (symbol) + "Look up the grimoire documentation for SYMBOL." + (-if-let (var-info (cider-var-info symbol)) + (let ((name (cider-get-var-attr var-info "name")) + (ns (cider-get-var-attr var-info "ns"))) + ;; TODO: add a whitelist of supported namespaces + (browse-url (cider-grimoire-url name ns (cider--clojure-version)))) + (message "Symbol %s not resolved" symbol))) + +(defun cider-grimoire-web (query) + "Open the grimoire documentation for QUERY in the default web browser." + (interactive "P") + (cider-read-symbol-name "Symbol: " 'cider-grimoire-web-lookup query)) + +(defun cider-create-grimoire-buffer (content) + "Create a new grimoire buffer with CONTENT." + (with-current-buffer (cider-popup-buffer "*cider grimoire*" t) + (read-only-mode -1) + (insert content) + (read-only-mode +1) + (goto-char (point-min)) + (current-buffer))) + +(defun cider-grimoire-lookup (symbol) + "Look up the grimoire documentation for SYMBOL." + (-if-let (var-info (cider-var-info symbol)) + (let ((name (cider-get-var-attr var-info "name")) + (ns (cider-get-var-attr var-info "ns")) + (url-request-method "GET") + (url-request-extra-headers `(("Content-Type" . "text/plain")))) + ;; TODO: add a whitelist of supported namespaces + (url-retrieve (cider-grimoire-url name ns (cider--clojure-version)) + (lambda (status) + ;; we need to strip the http header + (goto-char (point-min)) + (re-search-forward "^$") + (delete-region (point-min) (point)) + (delete-blank-lines) + ;; and create a new buffer with whatever is left + (pop-to-buffer (cider-create-grimoire-buffer (buffer-string)))))) + (message "Symbol %s not resolved" symbol))) + +(defun cider-grimoire (query) + "Open the grimoire documentation for QUERY in a popup buffer." + (interactive "P") + (cider-read-symbol-name "Symbol: " 'cider-grimoire-lookup query)) + +(defun cider-apropos-doc (button) + "Display documentation for the symbol represented at BUTTON." + (cider-doc-lookup (button-get button 'apropos-symbol))) + +(defun cider-apropos-summary (query ns docs-p include-private-p case-sensitive-p) + "Return a short description for the performed apropos search." + (concat (if case-sensitive-p "Case-sensitive " "") + (if docs-p "Documentation " "") + (format "Apropos for %S" query) + (if ns (format " in namespace %S" ns) "") + (if include-private-p + " (public and private symbols)" + " (public symbols only)"))) + +(defun cider-apropos-highlight (doc query) + "Return the DOC string propertized to highlight QUERY matches." + (let ((pos 0)) + (while (string-match query doc pos) + (setq pos (match-end 0)) + (put-text-property (match-beginning 0) + (match-end 0) + 'face apropos-match-face doc))) + doc) + +(defun cider-apropos-result (result query docs-p) + "Emit a RESULT matching QUERY into current buffer, formatted for DOCS-P." + (nrepl-dbind-response result (name type doc) + (let* ((label (capitalize (if (string= type "variable") "var" type))) + (help (concat "Display doc for this " (downcase label)))) + (cider-propertize-region (list 'apropos-symbol name + 'action 'cider-apropos-doc + 'help-echo help) + (insert-text-button name 'type 'apropos-symbol) + (insert "\n ") + (insert-text-button label 'type (intern (concat "apropos-" type))) + (insert ": ") + (let ((beg (point))) + (if docs-p + (progn (insert (cider-apropos-highlight doc query)) + (newline)) + (progn (insert doc) + (fill-region beg (point))))) + (newline))))) + +(defun cider-show-apropos (summary results query docs-p) + "Show SUMMARY and RESULTS for QUERY in a pop-up buffer, formatted for DOCS-P." + (with-current-buffer (cider-popup-buffer cider-apropos-buffer t) + (let ((inhibit-read-only t)) + (set-syntax-table clojure-mode-syntax-table) + (apropos-mode) + (cider-mode) + (if (boundp 'header-line-format) + (setq-local header-line-format summary) + (insert summary "\n\n")) + (dolist (result results) + (cider-apropos-result result query docs-p)) + (goto-char (point-min))))) + +(defun cider-apropos (query &optional ns docs-p privates-p case-sensitive-p) + "Show all symbols whose names match QUERY, a regular expression. +The search may be limited to the namespace NS, and may optionally search doc +strings, include private vars, and be case sensitive." + (interactive + (if current-prefix-arg + (list (read-string "Clojure Apropos: ") + (let ((ns (read-string "Namespace: "))) + (if (string= ns "") nil ns)) + (y-or-n-p "Search doc strings? ") + (y-or-n-p "Include private symbols? ") + (y-or-n-p "Case-sensitive? ")) + (list (read-string "Clojure Apropos: ")))) + (cider-ensure-op-supported "apropos") + (-if-let* ((summary (cider-apropos-summary + query ns docs-p privates-p case-sensitive-p)) + (results (-> `("op" "apropos" + "ns" ,(cider-current-ns) + "query" ,query + ,@(when ns `("search-ns" ,ns)) + ,@(when docs-p '("docs?" "t")) + ,@(when privates-p '("privates?" "t")) + ,@(when case-sensitive-p '("case-sensitive?" "t"))) + (nrepl-send-request-sync) + (plist-get :value)))) + (cider-show-apropos summary results query docs-p) + (message "No apropos matches for %S" query))) + +(defun cider-apropos-documentation () + "Shortcut for (cider-apropos nil t)." + (interactive) + (cider-apropos (read-string "Clojure documentation Apropos: ") nil t)) + +(defun cider-refresh () + "Refresh loaded code." + (interactive) + (cider-tooling-eval "(clojure.tools.namespace.repl/refresh)" + (cider-interactive-eval-handler (current-buffer)))) + +;; TODO: implement reloading ns +(defun cider-eval-load-file (form) + "Load FORM." + (let ((buffer (current-buffer))) + (cider-eval form (cider-interactive-eval-handler buffer)))) + +(defun cider-file-string (file) + "Read the contents of a FILE and return as a string." + (with-current-buffer (find-file-noselect file) + (substring-no-properties (buffer-string)))) + +(defun cider-load-file (filename) + "Load the Clojure file FILENAME." + (interactive (list + (read-file-name "Load file: " nil nil + nil (if (buffer-file-name) + (file-name-nondirectory + (buffer-file-name)))))) + (remove-overlays (point-min) (point-max) 'cider-note-p t) + (cider-send-load-file (cider-file-string filename) + (cider--server-filename filename) + (file-name-nondirectory filename)) + (message "Loading %s..." filename)) + +(defun cider-load-current-buffer () + "Load current buffer's file." + (interactive) + (check-parens) + (unless buffer-file-name + (error "Buffer %s is not associated with a file" (buffer-name))) + (when (and cider-prompt-save-file-on-load + (buffer-modified-p) + (y-or-n-p (format "Save file %s? " (buffer-file-name)))) + (save-buffer)) + (cider-load-file (buffer-file-name))) + +;;; interrupt evaluation +(defun cider-interrupt-handler (buffer) + "Create an interrupt response handler for BUFFER." + (nrepl-make-response-handler buffer nil nil nil nil)) + +;;; quiting +(defun cider--close-buffer (buffer) + "Close the BUFFER and kill its associated process (if any)." + (when (get-buffer-process buffer) + (delete-process (get-buffer-process buffer))) + (when (get-buffer buffer) + (kill-buffer buffer))) + +(defvar cider-ancilliary-buffers + (list cider-error-buffer + cider-apropos-buffer + cider-doc-buffer + cider-test-report-buffer + nrepl-message-buffer-name)) + +(defun cider-close-ancilliary-buffers () + "Close buffers that are shared across connections." + (interactive) + (dolist (buf-name cider-ancilliary-buffers) + (cider--close-buffer buf-name))) + +(defun cider-quit () + "Quit CIDER. + +Quitting closes all active nREPL connections and kills all CIDER buffers." + (interactive) + (when (y-or-n-p "Are you sure you want to quit CIDER? ") + (dolist (connection nrepl-connection-list) + (when connection + (nrepl-close connection))) + (message "All active nREPL connections were closed") + (cider-close-ancilliary-buffers))) + +(defun cider-restart (&optional prompt-project) + "Quit CIDER and restart it. +If PROMPT-PROJECT is t, then prompt for the project in which to +restart the server." + (interactive "P") + (cider-quit) + ;; Workaround for a nasty race condition https://github.com/clojure-emacs/cider/issues/439 + ;; TODO: Find a better way to ensure `cider-quit' has finished + (message "Waiting for CIDER to quit...") + (sleep-for 2) + (cider-jack-in prompt-project)) + +(add-hook 'nrepl-connected-hook 'cider-enable-on-existing-clojure-buffers) +(add-hook 'nrepl-disconnected-hook + 'cider-possibly-disable-on-existing-clojure-buffers) + +(provide 'cider-interaction) + +;;; cider-interaction.el ends here diff --git a/elpa/cider-0.7.0/cider-interaction.elc b/elpa/cider-0.7.0/cider-interaction.elc new file mode 100644 index 0000000000000000000000000000000000000000..5d98525985221eea1704b4bc9bd33c62c02d5e8d GIT binary patch literal 62687 zcmd_Ti+2-OnlFk85aL-qlkS;w&b-c@LNtxZAfu|%!=|UZG2kS06JTu9=^4xf*_J_x zEh&;5;y!cl-+q6;@3Cu_R5B*X+;i5tSplR{)vmq2{k>oN*PD+Y{ErJ4E-e50*S}64 z439_squxQXcbXh`r}yw@Qvag6e}6dqX7y;e-#to(gJioqO*T$mC&_w}cJ8*;?>6!z zYotvX;&41XP7X0ha_9M^H=f+V7cO4f(WrZ8zkkph*Bh&y)rNiU52n3w zcYoR+4pw_dGERSxZ1SPxI}C#BN!DD=S5x`zZGZYE=^kM+qiO%R|K~0roUAU(k2`Pr z6P>`xq&GW+@DOx{lV+WZTvc(Oq1@x0ahB`ldi93>vLlq3^B%FI8FA4 zgJ~BxpG*(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ty3Hpof-IChrww$W0`VTlhw#ql@TQUIAleQ5jOFk5F!PEGlSEqUwOv-~hpx{pk?KabT)MI+`{&CacWF4k^OzMgu9r zB|ge^;*ac)@=0NztW#*TBnnAuEl;l9aDFJvPxp>jDNUEuuc00G8s>6)?c>FE?r~g?)ymiEiI$uQw_L48(xA9=7pzc@juK zDI&Ac=ZtFz{5ZeDEsT0cR4E1a#i9x9HvAE&t`g=qJ{d{WU~v|&P}<@noWdv}Bh~l? z0lS31pgvJ!(?3w(qT~Qkrorar<>7hqTAX^NsgrPGHLR_D2a`YY3>@oFN6l1PB(lds z1ZeEoJ~U-i41f;~PQ8ub;$<+vQgqjgmmo-^t*Hc$F48?K3_=_1>Om7l8xzKPY&(4x z=CJjz#T_ztyF1!6bYqt$a*WhM1Gnw%4)$TF_Te_4x~;xTB*oeqNLuY)vE@m#jMX-aB4c0ux_Fq3>ODLZZ&&K zNDcO<1QVF^|xl1+Yi+ts7PWQwvJ zavvK;=rKsCjkDnLmbq#Izynvm7VUk!F`cws@UOI)M>}JxjUEeQEh#jA4nFCpzqe+; zeuOM&0ZiPSOSEu@UjsS81?|k(=@2=XI+l3$MM9gJRG7Er@v9Kp2O$r!hCC*0T6eACQ6hDD$V1=l8Tp)!z6j(WWjogAo5RV@FSXNmMto#nb! z8=W)(Mr{QU8(qMRLRo;OBZ$K*GCS%%a>Z;confd2Euj*GR@BhlipbBZ7SyLv{%5#Y Z9sq3X{Dp_uOE%M-Ri4?2GQYL_{{j=?;l}^~ literal 0 HcmV?d00001 diff --git a/elpa/cider-0.7.0/cider-macroexpansion.el b/elpa/cider-0.7.0/cider-macroexpansion.el new file mode 100644 index 000000000..61042f8d4 --- /dev/null +++ b/elpa/cider-0.7.0/cider-macroexpansion.el @@ -0,0 +1,191 @@ +;;; cider-macroexpansion.el --- Macro expansion support -*- lexical-binding: t -*- + +;; Copyright © 2012-2014 Tim King, Phil Hagelberg +;; Copyright © 2013-2014 Bozhidar Batsov, Hugo Duncan, Steve Purcell +;; +;; Author: Tim King +;; Phil Hagelberg +;; Bozhidar Batsov +;; Hugo Duncan +;; Steve Purcell + +;; 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 . + +;; This file is not part of GNU Emacs. + +;;; Commentary: + +;; Macro expansion support. + +;;; Code: + +(require 'cider-mode) + +(defconst cider-macroexpansion-buffer "*cider-macroexpansion*") + +(push cider-macroexpansion-buffer cider-ancilliary-buffers) + +(defcustom cider-macroexpansion-suppress-namespaces 'tidy + "Determines if namespaces are displayed in the macroexpansion buffer. +Possible values are: + + nil ;=> Vars are fully-qualified in the expansion + t ;=> Vars are displayed without namespace qualification + 'tidy ;=> Vars that are :refer-ed or defined in the current namespace are + displayed with their simple name, non-refered vars from other + namespaces are refered using the alias for that namespace (if + defined), other vars are displayed fully qualified." + :type '(choice (const :tag "Suppress namespaces" t) + (const :tag "Show namespaces" nil) + (const :tag "Show namespace aliases" tidy)) + :group 'cider + :package-version '(cider . "0.7.0")) + +(defun cider-macroexpand-undo (&optional arg) + "Undo the last macroexpansion, using `undo-only'. +ARG is passed along to `undo-only'." + (interactive) + (let ((inhibit-read-only t)) + (undo-only arg))) + +(defvar cider-last-macroexpand-expression nil + "Specify the last macroexpansion preformed. +This variable specifies both what was expanded and the expander.") + +(defun cider-macroexpansion (expander expr) + "Macroexpand, using EXPANDER, the given EXPR." + (cider-ensure-op-supported expander) + (plist-get (nrepl-send-request-sync + (list "op" expander + "code" expr + "ns" (cider-current-ns) + "suppress-namespaces" cider-macroexpansion-suppress-namespaces)) :value)) + +(defun cider-macroexpand-expr (expander expr) + "Macroexpand, use EXPANDER, the given EXPR." + (let* ((expansion (cider-macroexpansion expander expr))) + (setq cider-last-macroexpand-expression expr) + (cider-initialize-macroexpansion-buffer expansion (cider-current-ns)))) + +(defun cider-macroexpand-expr-inplace (expander) + "Substitute the form preceding point with its macroexpansion using EXPANDER." + (interactive) + (let* ((expansion (cider-macroexpansion expander (cider-last-sexp))) + (bounds (cons (save-excursion (backward-sexp) (point)) (point)))) + (cider-redraw-macroexpansion-buffer + expansion (current-buffer) (car bounds) (cdr bounds)))) + +(defun cider-macroexpand-again () + "Repeat the last macroexpansion." + (interactive) + (cider-initialize-macroexpansion-buffer cider-last-macroexpand-expression nrepl-buffer-ns)) + +;;;###autoload +(defun cider-macroexpand-1 (&optional prefix) + "Invoke 'macroexpand-1' on the expression preceding point. +If invoked with a PREFIX argument, use 'macroexpand' instead of +'macroexpand-1'." + (interactive "P") + (let ((expander (if prefix "macroexpand" "macroexpand-1"))) + (cider-macroexpand-expr expander (cider-last-sexp)))) + +(defun cider-macroexpand-1-inplace (&optional prefix) + "Perform inplace 'macroexpand-1' on the expression preceding point. +If invoked with a PREFIX argument, use 'macroexpand' instead of +'macroexpand-1'." + (interactive "P") + (let ((expander (if prefix "macroexpand" "macroexpand-1"))) + (cider-macroexpand-expr-inplace expander))) + +;;;###autoload +(defun cider-macroexpand-all () + "Invoke 'clojure.walk/macroexpand-all' on the expression preceding point." + (interactive) + (cider-macroexpand-expr "macroexpand-all" (cider-last-sexp))) + +(defun cider-macroexpand-all-inplace () + "Perform inplace 'clojure.walk/macroexpand-all' on the expression preceding point." + (interactive) + (cider-macroexpand-expr-inplace "macroexpand-all")) + +(defun cider-initialize-macroexpansion-buffer (expansion ns) + "Create a new Macroexpansion buffer with EXPANSION and namespace NS." + (pop-to-buffer (cider-create-macroexpansion-buffer)) + (setq nrepl-buffer-ns ns) + (setq buffer-undo-list nil) + (let ((inhibit-read-only t) + (buffer-undo-list t)) + (erase-buffer) + (insert (format "%s" expansion)) + (goto-char (point-max)) + (font-lock-fontify-buffer))) + +(defun cider-redraw-macroexpansion-buffer (expansion buffer start end) + "Redraw the macroexpansion with new EXPANSION. +Text in BUFFER from START to END is replaced with new expansion, +and point is placed after the expanded form." + (with-current-buffer buffer + (let ((buffer-read-only nil)) + (goto-char start) + (delete-region start end) + (insert (format "%s" expansion)) + (goto-char start) + (indent-sexp) + (forward-sexp)))) + +(defun cider-create-macroexpansion-buffer () + "Create a new macroexpansion buffer." + (with-current-buffer (cider-popup-buffer cider-macroexpansion-buffer t) + (clojure-mode) + (clojure-disable-cider) + (cider-macroexpansion-mode 1) + (current-buffer))) + +(defvar cider-macroexpansion-mode-map + (let ((map (make-sparse-keymap))) + (define-key map (kbd "g") 'cider-macroexpand-again) + (define-key map (kbd "q") 'cider-popup-buffer-quit-function) + (define-key map (kbd "d") 'cider-doc) + (define-key map (kbd "j") 'cider-javadoc) + (define-key map (kbd ".") 'cider-jump-to-var) + (easy-menu-define cider-macroexpansion-mode-menu map + "Menu for CIDER's doc mode" + '("Macroexpansion" + ["Restart expansion" cider-macroexpand-again] + ["Macroexpand-1" cider-macroexpand-1-inplace] + ["Macroexpand-all" cider-macroexpand-all-inplace] + ["Go to source" cider-jump-to-var] + ["Go to doc" cider-doc] + ["Go to Javadoc" cider-docview-javadoc] + ["Quit" cider-popup-buffer-quit-function])) + (cl-labels ((redefine-key (from to) + (dolist (mapping (where-is-internal from cider-mode-map)) + (define-key map mapping to)))) + (redefine-key 'cider-macroexpand-1 'cider-macroexpand-1-inplace) + (redefine-key 'cider-macroexpand-all 'cider-macroexpand-all-inplace) + (redefine-key 'advertised-undo 'cider-macroexpand-undo) + (redefine-key 'undo 'cider-macroexpand-undo)) + map)) + +(define-minor-mode cider-macroexpansion-mode + "Minor mode for CIDER macroexpansion. + +\\{cider-macroexpansion-mode-map}" + nil + " Macroexpand" + cider-macroexpansion-mode-map) + +(provide 'cider-macroexpansion) + +;;; cider-macroexpansion.el ends here diff --git a/elpa/cider-0.7.0/cider-macroexpansion.elc b/elpa/cider-0.7.0/cider-macroexpansion.elc new file mode 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7F;zEj>dDs?11fM9P36H=Wa4}W(UaCvgnwbr5)T8=6 zm+Mj6%FfjsCDn710ShdZ?`HFG9SgOEmq7$mDq&{+x==$vU>p7GMq$|W|Irn$`eb-# z6>+u=MEzMIkyJ!@04b&kpXZv51tbXe7L z@O>gfT^EL)Oi(4~(q-_Y8R68O1|BFC-wVj1w1~`ee8{WH1S`y~-Y+41ralx{@9Z%i zmtEj1a02C>_&A38BtA$aNa68ivD~h4Gt|FODFWh(AwjzaQU=au!E!1!FhhJ(FpI>; z`Jv8b`-6TDv7@FSgEiQ{ugr2#DN}!dFiRbwHc@H~l|hwZG={VNaH*_;)1@wx7os%B vbp5f4?S89?6jk9Xqd8^dmwAwK@D`Vwr8egLSN}Hg7*KYk6OBs!c literal 0 HcmV?d00001 diff --git a/elpa/cider-0.7.0/cider-mode.el b/elpa/cider-0.7.0/cider-mode.el new file mode 100644 index 000000000..d92bff41a --- /dev/null +++ b/elpa/cider-0.7.0/cider-mode.el @@ -0,0 +1,154 @@ +;;; cider-mode.el --- Minor mode for REPL interactions -*- lexical-binding: t -*- + +;; Copyright © 2012-2014 Tim King, Phil Hagelberg +;; Copyright © 2013-2014 Bozhidar Batsov, Hugo Duncan, Steve Purcell +;; +;; Author: Tim King +;; Phil Hagelberg +;; Bozhidar Batsov +;; Hugo Duncan +;; Steve Purcell + +;; 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 . + +;; This file is not part of GNU Emacs. + +;;; Commentary: + +;; Minor mode for REPL interactions. + +;;; Code: + +(require 'cider-interaction) + +;;;###autoload +(defcustom cider-mode-line + '(" cider" (:eval (format "[%s]" (cider-current-ns)))) + "Mode line ligher for `cider-mode'. + +The value of this variable is a mode line template as in +`mode-line-format'. See Info Node `(elisp)Mode Line Format' for +details about mode line templates. + +Customize this variable to change how `cider-mode' displays its +status in the mode line. The default value displays the current ns. +Set this variable to nil to disable the mode line +entirely." + :group 'cider + :type 'sexp + :risky t + :package-version '(cider "0.7.0")) + +(defvar 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-jump-to-var) + (define-key map (kbd "M-,") 'cider-jump-back) + (define-key map (kbd "C-c M-.") 'cider-jump-to-resource) + (define-key map (kbd "M-TAB") 'complete-symbol) + (define-key map (kbd "C-M-x") 'cider-eval-defun-at-point) + (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-w") 'cider-eval-last-sexp-and-replace) + (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 C-r") 'cider-eval-region) + (define-key map (kbd "C-c C-n") 'cider-eval-ns-form) + (define-key map (kbd "C-c M-:") 'cider-read-and-eval) + (define-key map (kbd "C-c C-m") 'cider-macroexpand-1) + (define-key map (kbd "C-c M-m") 'cider-macroexpand-all) + (define-key map (kbd "C-c M-n") 'cider-repl-set-ns) + (define-key map (kbd "C-c M-i") 'cider-inspect) + (define-key map (kbd "C-c M-t") 'cider-toggle-trace) + (define-key map (kbd "C-c C-z") 'cider-switch-to-repl-buffer) + (define-key map (kbd "C-c M-o") 'cider-find-and-clear-repl-buffer) + (define-key map (kbd "C-c C-k") 'cider-load-current-buffer) + (define-key map (kbd "C-c C-l") 'cider-load-file) + (define-key map (kbd "C-c C-b") 'cider-interrupt) + (define-key map (kbd "C-c ,") 'cider-test-run-tests) + (define-key map (kbd "C-c C-,") 'cider-test-rerun-tests) + (define-key map (kbd "C-c M-,") 'cider-test-run-test) + (define-key map (kbd "C-c C-t") 'cider-test-show-report) + (define-key map (kbd "C-c M-s") 'cider-selector) + (define-key map (kbd "C-c M-r") 'cider-rotate-connection) + (define-key map (kbd "C-c M-d") 'cider-display-current-connection-info) + (define-key map (kbd "C-c C-x") 'cider-refresh) + (define-key map (kbd "C-c C-q") 'cider-quit) + (easy-menu-define cider-mode-menu map + "Menu for CIDER mode" + `("CIDER" + ["Complete symbol" complete-symbol] + "--" + ,cider-doc-menu + "--" + ["Eval top-level sexp at point" cider-eval-defun-at-point] + ["Eval last sexp" cider-eval-last-sexp] + ["Eval last sexp in popup buffer" cider-pprint-eval-last-sexp] + ["Eval last sexp to REPL buffer" cider-eval-last-sexp-to-repl] + ["Eval last sexp and replace" cider-eval-last-sexp-and-replace] + ["Eval region" cider-eval-region] + ["Eval ns form" cider-eval-ns-form] + ["Insert last sexp in REPL" cider-insert-last-sexp-in-repl] + "--" + ["Load current buffer" cider-load-current-buffer] + ["Load file" cider-load-file] + "--" + ["Macroexpand-1" cider-macroexpand-1] + ["Macroexpand-all" cider-macroexpand-all] + "--" + ["Jump to source" cider-jump-to-var] + ["Jump to resource" cider-jump-to-resource] + ["Jump back" cider-jump-back] + "--" + ["Run test" cider-test-run-test] + ["Run all tests" cider-test-run-tests] + ["Rerun failed/erring tests" cider-test-rerun-tests] + ["Show test report" cider-test-show-report] + "--" + ["Inspect" cider-inspect] + "--" + ["Set ns" cider-repl-set-ns] + ["Switch to REPL" cider-switch-to-repl-buffer] + ["Switch to Relevant REPL" cider-switch-to-relevant-repl-buffer] + ["Toggle REPL Pretty Print" cider-repl-toggle-pretty-printing] + ["Clear REPL" cider-find-and-clear-repl-buffer] + ["Refresh loaded code" cider-refresh] + ["Interrupt" cider-interrupt] + ["Quit" cider-quit] + ["Restart" cider-restart] + "--" + ["Display nREPL connection" cider-display-current-connection-info] + ["Rotate nREPL connection" cider-rotate-connection] + "--" + ["Version info" cider-version])) + map)) + +;;;###autoload +(define-minor-mode cider-mode + "Minor mode for REPL interaction from a Clojure buffer. + +\\{cider-mode-map}" + nil + cider-mode-line + cider-mode-map + (make-local-variable 'completion-at-point-functions) + (add-to-list 'completion-at-point-functions + 'cider-complete-at-point)) + +(provide 'cider-mode) + +;;; cider-mode.el ends here diff --git a/elpa/cider-0.7.0/cider-mode.elc b/elpa/cider-0.7.0/cider-mode.elc new file mode 100644 index 0000000000000000000000000000000000000000..612113c2fe47ab921c7167df2563ae92f8701830 GIT binary patch literal 5801 zcmbtYZExE~64piSA#l+{uQ;H^eYq{w#1arHA}NWMjo^~VPU~LWrb(_}ECZp*mCc4C zS-!Yc5BJ~inIV_t+6wMN4NxX$XP=#&ot?L%lb6dcdcEG>(b17uCYv;jWFRiLV&fH0 z@#N;2=RZ%9_v0w>y+|anc;gk~S$QSILRjwMY;ic53wvTs8DgC!8?gq6c>M2NX8B`a zJRZx9=jY?#v5Zphu^$F9GbdwrJgMI|Ng&5EVt_CfC&VpoFgwI@_H^uwEgt(dEUtwY zL5j2pH{tJI0fv0M$AfRL!@OF#%w;ZuZR~AAUj&Jt7g-oz<&Q9$<%RHq09$O?bf9Q_{_@jS&dwavnZ6Qq`harrWGnwGAzFOH9z1VmhJX1U~ zJoDpY{JJZLMlA~uI4p2j;IP19&GEPoKUvum*AVBK{G|*tDXPN{V<-;Vqx1F4yht`? zApOY8qE>O1%BC5O1Uur|~)w-_yKzLm7p6 zI$}{?(%xV2M)paTRUAkdWQ0{Nld{;cQqB@CS*_vk@|Ji7Y!tS4CB=2}tF|!_VA06i zLe3&z#d+ZsCCLl`*)9WVY4d?xdu3GAN@!*hYpq~`o4JbL$l|U5aTp26fmwXg8vZKA z;lNU&?br~9S6Nb~)v=1hVw*~l%imIQn1%WKttiA{>iO@zE0|5~EviEn2D=x7j@KUT z4IwSgr)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J^pcZiLY z@mA4Iad#pnVJapS1aGq`dc%8(aH=s8p;_~FiOd}?NO5Qmg)oSLTs95lJGpXZBS$6H zC^;kw_>4;FT~k_jMw8x9aY4XjSa4Dre8+h;(!v-h1}MHdBs9ZRM#PPfWUO^S;l(%> zkbb-7vok{6VuzQ!@sKQhXkInkjTr>+mSa+N>mi%ytBL3I4cO_dzgd}-Mcna?32mV#jsYxkN>fwWaQX09DFUt zV(KmykYLDJGr}1+Eb64ftomg8?J^|lVkXYQ7~zZ?0~FU-t9(XvAA~z+o>)f7&m|fq zl|Ms&X!V~K%0y!RUo>jgv3N*5up~yLdiMI8Q6;b!h3GPLmKK9^dp74Ti6y9xwVxpW zcRuai|0n+2pZBQPz4sMNOz)@4<^$7I{P3BL>R-+bHuqTX%5(p(O;k}?YyT;?*lkEV+Vm|65wc1d= zA0a=_(FDM8QnDy;=hoqGW?XJ$7W&9Hs82JgY8*bDPLruh1fa;KaxkgUM5;xHB?u^N zq8WoeAg8-c;?UF?l*L`6Kbm)Q5F&KH0e^?IUe`4EU>P8%s#{`6Iksjhycj*$dSAw} zwe1JoGYL?<$QVDkg$6}gUz%-WsZ0YTco$-Z%!}=H;ZBfpb=rHR^!dkpLQA}|UhBSC ztvxS;n`eFEzKt$m?Vag#lz6x)cpooQI^PGCm2j`bCKJ$4i)@!Qx}l4}(soqTd9B)g QbgR=Wxxvma#C){(Kd}#c;t-ZNj19o82}s~EG}$MLnC$UocQ^p=&>;`hL*ozm9=o@yNLC^S^R)!F9t@ ds88}TStmR-lxj5XNF#b0>V}S1+)E-){s84C>x%#Y literal 0 HcmV?d00001 diff --git a/elpa/cider-0.7.0/cider-repl.el b/elpa/cider-0.7.0/cider-repl.el new file mode 100644 index 000000000..9b0b965c1 --- /dev/null +++ b/elpa/cider-0.7.0/cider-repl.el @@ -0,0 +1,1082 @@ +;;; cider-repl.el --- REPL interactions -*- lexical-binding: t -*- + +;; Copyright © 2012-2014 Tim King, Phil Hagelberg +;; Copyright © 2013-2014 Bozhidar Batsov, Hugo Duncan, Steve Purcell +;; +;; Author: Tim King +;; Phil Hagelberg +;; Bozhidar Batsov +;; Hugo Duncan +;; Steve Purcell + +;; 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 . + +;; This file is not part of GNU Emacs. + +;;; Commentary: + +;; REPL interactions. + +;;; Code: + +(require 'cider-client) +(require 'cider-interaction) +(require 'cider-doc) +(require 'cider-eldoc) ; for cider-turn-on-eldoc-mode +(require 'cider-util) + +(require 'clojure-mode) +(require 'easymenu) + +(eval-when-compile + (defvar paredit-version) + (defvar paredit-space-for-delimiter-predicates)) + +(defgroup cider-repl nil + "Interaction with the REPL." + :prefix "cider-repl-" + :group 'cider) + +(defface cider-repl-prompt-face + '((t (:inherit font-lock-keyword-face))) + "Face for the prompt in the REPL buffer." + :group 'cider-repl) + +(defface cider-repl-output-face + '((t (:inherit font-lock-string-face))) + "Face for STDOUT output in the REPL buffer." + :group 'cider-repl) + +(defface cider-repl-err-output-face + '((t (:inherit font-lock-warning-face))) + "Face for STDERR output in the REPL buffer." + :group 'cider-repl + :package-version '(cider . "0.6.0")) + +(defface cider-repl-input-face + '((t (:bold t))) + "Face for previous input in the REPL buffer." + :group 'cider-repl) + +(defface cider-repl-result-face + '((t ())) + "Face for the result of an evaluation in the REPL buffer." + :group 'cider-repl) + +(defcustom cider-repl-pop-to-buffer-on-connect t + "Controls whether to pop to the REPL buffer on connect. + +When set to nil the buffer will only be created." + :type 'boolean + :group 'cider-repl) + +(defcustom cider-repl-display-in-current-window nil + "Controls whether the REPL buffer is displayed in the current window." + :type 'boolean + :group 'cider-repl) + +(defcustom cider-repl-use-pretty-printing nil + "Control whether the results in REPL are pretty-printed or not. +The `cider-toggle-pretty-printing' command can be used to interactively +change the setting's value." + :type 'boolean + :group 'cider-repl) + +(defcustom cider-repl-use-clojure-font-lock nil + "Non-nil means to use Clojure mode font-locking for input and result. +Nil means that `cider-repl-input-face' and `cider-repl-result-face' +will be used." + :type 'boolean + :group 'cider-repl + :package-version '(cider . "0.5.0")) + +(defcustom cider-repl-result-prefix "" + "The prefix displayed in the REPL before a result value." + :type 'string + :group 'cider + :package-version '(cider . "0.5.0")) + +(defcustom cider-repl-tab-command 'cider-repl-indent-and-complete-symbol + "Select the command to be invoked by the TAB key. +The default option is `cider-repl-indent-and-complete-symbol'. If +you'd like to use the default Emacs behavior use +`indent-for-tab-command'." + :type 'symbol + :group 'cider-repl) + +;;;; REPL buffer local variables +(defvar-local cider-repl-input-start-mark nil) + +(defvar-local cider-repl-prompt-start-mark nil) + +(defvar-local cider-repl-old-input-counter 0 + "Counter used to generate unique `cider-old-input' properties. +This property value must be unique to avoid having adjacent inputs be +joined together.") + +(defvar-local cider-repl-input-history '() + "History list of strings read from the REPL buffer.") + +(defvar-local cider-repl-input-history-items-added 0 + "Variable counting the items added in the current session.") + +(defvar-local cider-repl-output-start nil + "Marker for the start of output.") + +(defvar-local cider-repl-output-end nil + "Marker for the end of output.") + +(defun cider-repl-tab () + "Invoked on TAB keystrokes in `cider-repl-mode' buffers." + (interactive) + (funcall cider-repl-tab-command)) + +(defun cider-repl-reset-markers () + "Reset all REPL markers." + (dolist (markname '(cider-repl-output-start + cider-repl-output-end + cider-repl-prompt-start-mark + cider-repl-input-start-mark)) + (set markname (make-marker)) + (set-marker (symbol-value markname) (point)))) + +;;; REPL init +(defun cider-repl-buffer-name () + "Generate a REPL buffer name based on current connection buffer." + (with-current-buffer (get-buffer (nrepl-current-connection-buffer)) + (nrepl-buffer-name nrepl-repl-buffer-name-template))) + +(defun cider-create-repl-buffer () + "Create a REPL buffer." + (cider-init-repl-buffer + (let ((buffer-name (cider-repl-buffer-name))) + (if cider-repl-display-in-current-window + (add-to-list 'same-window-buffer-names buffer-name)) + (if cider-repl-pop-to-buffer-on-connect + (pop-to-buffer buffer-name) + (generate-new-buffer buffer-name)) + buffer-name))) + +(defun cider-make-repl (process) + "Make a REPL for the connection PROCESS." + (let ((connection-buffer (process-buffer process)) + (repl-buffer (cider-create-repl-buffer))) + (with-current-buffer repl-buffer + (setq nrepl-connection-buffer (buffer-name connection-buffer))) + (with-current-buffer connection-buffer + (setq nrepl-repl-buffer (buffer-name repl-buffer))))) + +(defun cider-repl--banner () + "Generate the welcome REPL buffer banner." + (format "; CIDER %s (Java %s, Clojure %s, nREPL %s, cider-nrepl %s)" + (cider--version) + (cider--java-version) + (cider--clojure-version) + (cider--nrepl-version) + (cider--nrepl-middleware-version))) + +(defun cider-repl--insert-banner-and-prompt (ns) + "Insert REPL banner and REPL prompt, taking into account NS." + (when (zerop (buffer-size)) + (insert (propertize (cider-repl--banner) 'face 'font-lock-comment-face))) + (let ((middleware-version (cider--nrepl-middleware-version))) + (unless (and middleware-version (equal cider-version middleware-version)) + (insert (propertize (format "\nWARNING: CIDER's version (%s) does not match cider-nrepl's version (%s)" cider-version middleware-version) 'face 'font-lock-warning-face)))) + (goto-char (point-max)) + (cider-repl--mark-output-start) + (cider-repl--mark-input-start) + (cider-repl--insert-prompt ns)) + +(defun cider-init-repl-buffer (buffer &optional noprompt) + "Initialize the REPL in BUFFER. +Insert a banner, unless NOPROMPT is non-nil." + (with-current-buffer buffer + (unless (eq major-mode 'cider-repl-mode) + (cider-repl-mode)) + (cider-repl-reset-markers) + ;; honor :init-ns from lein's :repl-options on startup + (setq nrepl-buffer-ns (cider-eval-and-get-value "(str *ns*)")) + (unless noprompt + (cider-repl--insert-banner-and-prompt nrepl-buffer-ns)) + (cider-remember-clojure-buffer cider-current-clojure-buffer) + (current-buffer))) + +(defun cider-find-or-create-repl-buffer () + "Return the REPL buffer, create it if necessary." + (let ((buffer (cider-current-repl-buffer))) + (if (null buffer) + (error "No active nREPL connection") + (let ((buffer (get-buffer buffer))) + (or (when (buffer-live-p buffer) buffer) + (let ((buffer (nrepl-current-connection-buffer))) + (if (null buffer) + (error "No active nREPL connection") + (cider-init-repl-buffer + (get-process buffer) + (get-buffer-create + (cider-repl-buffer-name)))))))))) + +;;; REPL interaction + +(defun cider-repl--in-input-area-p () + "Return t if in input area." + (<= cider-repl-input-start-mark (point))) + +(defun cider-repl--current-input (&optional until-point-p) + "Return the current input as string. +The input is the region from after the last prompt to the end of +buffer. If UNTIL-POINT-P is non-nil, the input is until the current +point." + (buffer-substring-no-properties cider-repl-input-start-mark + (if until-point-p + (point) + (point-max)))) + +(defun cider-repl-previous-prompt () + "Move backward to the previous prompt." + (interactive) + (cider-repl--find-prompt t)) + +(defun cider-repl-next-prompt () + "Move forward to the next prompt." + (interactive) + (cider-repl--find-prompt)) + +(defun cider-repl--find-prompt (&optional backward) + "Find the next prompt. +If BACKWARD is non-nil look backward." + (let ((origin (point)) + (prop 'cider-prompt)) + (while (progn + (cider-search-property-change prop backward) + (not (or (cider-end-of-proprange-p prop) (bobp) (eobp))))) + (unless (cider-end-of-proprange-p prop) + (goto-char origin)))) + +(defun cider-search-property-change (prop &optional backward) + "Search forward for a property change to PROP. +If BACKWARD is non-nil search backward." + (cond (backward + (goto-char (previous-single-char-property-change (point) prop))) + (t + (goto-char (next-single-char-property-change (point) prop))))) + +(defun cider-end-of-proprange-p (property) + "Return t if at the the end of a property range for PROPERTY." + (and (get-char-property (max 1 (1- (point))) property) + (not (get-char-property (point) property)))) + +(defun cider-repl--mark-input-start () + "Mark the input start." + (set-marker cider-repl-input-start-mark (point) (current-buffer))) + +(defun cider-repl--mark-output-start () + "Mark the output start." + (set-marker cider-repl-output-start (point)) + (set-marker cider-repl-output-end (point))) + +(defun cider-repl--mark-output-end () + "Mark the output end." + (add-text-properties cider-repl-output-start cider-repl-output-end + '(face cider-repl-output-face + rear-nonsticky (face)))) + +(defun cider-repl--same-line-p (pos1 pos2) + "Return t if buffer positions POS1 and POS2 are on the same line." + (save-excursion (goto-char (min pos1 pos2)) + (<= (max pos1 pos2) (line-end-position)))) + +(defun cider-repl--bol-internal () + "Go to the beginning of line or the prompt." + (cond ((and (>= (point) cider-repl-input-start-mark) + (cider-repl--same-line-p (point) cider-repl-input-start-mark)) + (goto-char cider-repl-input-start-mark)) + (t (beginning-of-line 1)))) + +(defun cider-repl-mode-beginning-of-defun (&optional arg) + (if (and arg (< arg 0)) + (cider-repl-mode-end-of-defun (- arg)) + (dotimes (i (or arg 1)) + (cider-repl-previous-prompt)))) + +(defun cider-repl-mode-end-of-defun (&optional arg) + (if (and arg (< arg 0)) + (cider-repl-mode-beginning-of-defun (- arg)) + (dotimes (i (or arg 1)) + (cider-repl-next-prompt)))) + +(defun cider-repl-beginning-of-defun () + "Move to beginning of defun." + (interactive) + ;; We call `beginning-of-defun' if we're at the start of a prompt + ;; already, to trigger `cider-repl-mode-beginning-of-defun' by means + ;; of the locally bound `beginning-of-defun-function', in order to + ;; jump to the start of the previous prompt. + (if (and (not (cider-repl--at-prompt-start-p)) + (cider-repl--in-input-area-p)) + (goto-char cider-repl-input-start-mark) + (beginning-of-defun))) + +(defun cider-repl-end-of-defun () + "Move to end of defun." + (interactive) + ;; C.f. `cider-repl-beginning-of-defun.' + (if (and (not (= (point) (point-max))) + (cider-repl--in-input-area-p)) + (goto-char (point-max)) + (end-of-defun))) + +(defun cider-repl-bol () + "Go to the beginning of line or the prompt." + (interactive) + (deactivate-mark) + (cider-repl--bol-internal)) + +(defun cider-repl-bol-mark () + "Set the mark and go to the beginning of line or the prompt." + (interactive) + (unless mark-active + (set-mark (point))) + (cider-repl--bol-internal)) + +(defun cider-repl--at-prompt-start-p () + "Return t if point is at the start of prompt. +This will not work on non-current prompts." + (= (point) cider-repl-input-start-mark)) + +(defun cider-repl--show-maximum-output () + "Put the end of the buffer at the bottom of the window." + (when (eobp) + (let ((win (get-buffer-window (current-buffer)))) + (when win + (with-selected-window win + (set-window-point win (point-max)) + (recenter -1)))))) + +(defmacro cider-save-marker (marker &rest body) + "Save MARKER and execute BODY." + (let ((pos (make-symbol "pos"))) + `(let ((,pos (marker-position ,marker))) + (prog1 (progn . ,body) + (set-marker ,marker ,pos))))) + +(put 'cider-save-marker 'lisp-indent-function 1) + +(defun cider-repl--insert-prompt (namespace) + "Insert the prompt (before markers!), taking into account NAMESPACE. +Set point after the prompt. +Return the position of the prompt beginning." + (goto-char cider-repl-input-start-mark) + (cider-save-marker cider-repl-output-start + (cider-save-marker cider-repl-output-end + (unless (bolp) (insert-before-markers "\n")) + (let ((prompt-start (point)) + (prompt (format "%s> " namespace))) + (cider-propertize-region + '(face cider-repl-prompt-face read-only t intangible t + cider-prompt t + rear-nonsticky (cider-prompt read-only face intangible)) + (insert-before-markers prompt)) + (set-marker cider-repl-prompt-start-mark prompt-start) + prompt-start)))) + +(defun cider-repl-emit-output-at-pos (buffer string output-face position &optional bol) + "Using BUFFER, insert STRING at POSITION and mark it as output. +If BOL is non-nil insert at the beginning of line." + (with-current-buffer buffer + (save-excursion + (cider-save-marker cider-repl-output-start + (cider-save-marker cider-repl-output-end + (goto-char position) + ;; TODO: Review the need for bol + (when (and bol (not (bolp))) (insert-before-markers "\n")) + (cider-propertize-region `(face ,output-face + rear-nonsticky (face)) + (insert-before-markers string) + (when (and (= (point) cider-repl-prompt-start-mark) + (not (bolp))) + (insert-before-markers "\n") + (set-marker cider-repl-output-end (1- (point)))))))) + (cider-repl--show-maximum-output))) + +(defun cider-repl-emit-interactive-output (string) + "Emit STRING as interactive output." + (with-current-buffer (cider-current-repl-buffer) + (let ((pos (1- (cider-repl--input-line-beginning-position)))) + (cider-repl-emit-output-at-pos (current-buffer) string 'cider-repl-output-face pos t) + (ansi-color-apply-on-region pos (point-max))))) + +(defun cider-repl-emit-output (buffer string &optional bol) + "Using BUFFER, emit STRING. +If BOL is non-nil, emit at the beginning of the line." + (with-current-buffer buffer + (let ((pos (1- (cider-repl--input-line-beginning-position)))) + (cider-repl-emit-output-at-pos buffer string 'cider-repl-output-face cider-repl-input-start-mark bol) + (ansi-color-apply-on-region pos (point-max))))) + +;; TODO: Factor out repeated code +(defun cider-repl-emit-err-output (buffer string &optional bol) + "Using BUFFER, emit STRING. +If BOL is non-nil, emit at the beginning of the line." + (with-current-buffer buffer + (let ((pos (1- (cider-repl--input-line-beginning-position)))) + (cider-repl-emit-output-at-pos buffer string 'cider-repl-err-output-face cider-repl-input-start-mark bol) + (ansi-color-apply-on-region pos (point-max))))) + +(defun cider-repl-emit-prompt (buffer) + "Emit the REPL prompt into BUFFER." + (with-current-buffer buffer + (save-excursion + (cider-save-marker cider-repl-output-start + (cider-save-marker cider-repl-output-end + (cider-repl--insert-prompt nrepl-buffer-ns)))) + (cider-repl--show-maximum-output))) + +(defun cider-repl-emit-result (buffer string &optional bol) + "Emit into BUFFER the result STRING and mark it as an evaluation result. +If BOL is non-nil insert at the beginning of the line." + (with-current-buffer buffer + (save-excursion + (cider-save-marker cider-repl-output-start + (cider-save-marker cider-repl-output-end + (goto-char cider-repl-input-start-mark) + (when (and bol (not (bolp))) + (insert-before-markers "\n")) + (insert-before-markers (propertize cider-repl-result-prefix 'face 'font-lock-comment-face)) + (if cider-repl-use-clojure-font-lock + (insert-before-markers (cider-font-lock-as-clojure string)) + (cider-propertize-region + '(face cider-repl-result-face rear-nonsticky (face)) + (insert-before-markers string)))))) + (cider-repl--show-maximum-output))) + +(defun cider-repl-newline-and-indent () + "Insert a newline, then indent the next line. +Restrict the buffer from the prompt for indentation, to avoid being +confused by strange characters (like unmatched quotes) appearing +earlier in the buffer." + (interactive) + (save-restriction + (narrow-to-region cider-repl-prompt-start-mark (point-max)) + (insert "\n") + (lisp-indent-line))) + +(defun cider-repl-indent-and-complete-symbol () + "Indent the current line and perform symbol completion. +First indent the line. If indenting doesn't move point, complete +the symbol." + (interactive) + (let ((pos (point))) + (lisp-indent-line) + (when (= pos (point)) + (if (save-excursion (re-search-backward "[^() \n\t\r]+\\=" nil t)) + (completion-at-point))))) + +(defun cider-repl-kill-input () + "Kill all text from the prompt to point." + (interactive) + (cond ((< (marker-position cider-repl-input-start-mark) (point)) + (kill-region cider-repl-input-start-mark (point))) + ((= (point) (marker-position cider-repl-input-start-mark)) + (cider-repl-delete-current-input)))) + +(defun cider-repl--input-complete-p (start end) + "Return t if the region from START to END is a complete sexp." + (save-excursion + (goto-char start) + (cond ((looking-at "\\s *[@'`#]?[(\"]") + (ignore-errors + (save-restriction + (narrow-to-region start end) + ;; Keep stepping over blanks and sexps until the end of + ;; buffer is reached or an error occurs. Tolerate extra + ;; close parens. + (loop do (skip-chars-forward " \t\r\n)") + until (eobp) + do (forward-sexp)) + t))) + (t t)))) + +(defun cider-repl-handler (buffer) + "Make a nREPL evaluation handler for the REPL BUFFER." + (nrepl-make-response-handler buffer + (lambda (buffer value) + (unless cider-repl-use-pretty-printing + (cider-repl-emit-result buffer value t))) + (lambda (buffer out) + (cider-repl-emit-output buffer out)) + (lambda (buffer err) + (cider-repl-emit-err-output buffer err)) + (lambda (buffer) + (cider-repl-emit-prompt buffer)))) + +(defun cider-repl--send-input (&optional newline) + "Go to the end of the input and send the current input. +If NEWLINE is true then add a newline at the end of the input." + (unless (cider-repl--in-input-area-p) + (error "No input at point")) + (goto-char (point-max)) + (let ((end (point))) ; end of input, without the newline + (cider-repl--add-to-input-history (buffer-substring cider-repl-input-start-mark end)) + (when newline + (insert "\n") + (cider-repl--show-maximum-output)) + (let ((inhibit-modification-hooks t)) + (add-text-properties cider-repl-input-start-mark + (point) + `(cider-old-input + ,(cl-incf cider-repl-old-input-counter)))) + (if cider-repl-use-clojure-font-lock + (let ((input-string (buffer-substring cider-repl-input-start-mark end))) + (save-excursion + ;; TODO: Think of a more efficient way to do that + (cider-repl-kill-input) + ;; replace the current input with a Clojure font-locked version of itself + (insert (cider-font-lock-as-clojure input-string) "\n"))) + (let ((overlay (make-overlay cider-repl-input-start-mark end))) + ;; These properties are on an overlay so that they won't be taken + ;; by kill/yank. + (overlay-put overlay 'read-only t) + (overlay-put overlay 'face 'cider-repl-input-face)))) + (let* ((input (cider-repl--current-input)) + (form (if (and (not (string-match "\\`[ \t\r\n]*\\'" input)) + cider-repl-use-pretty-printing) + (cider-format-pprint-eval input) + input))) + (goto-char (point-max)) + (cider-repl--mark-input-start) + (cider-repl--mark-output-start) + (cider-eval form (cider-repl-handler (current-buffer)) nrepl-buffer-ns))) + +(defun cider-repl-return (&optional end-of-input) + "Evaluate the current input string, or insert a newline. +Send the current input ony if a whole expression has been entered, +i.e. the parenthesis are matched. +When END-OF-INPUT is non-nil, send the input even if the parentheses +are not balanced." + (interactive "P") + (cond + (end-of-input + (cider-repl--send-input)) + ((and (get-text-property (point) 'cider-old-input) + (< (point) cider-repl-input-start-mark)) + (cider-repl--grab-old-input end-of-input) + (cider-repl--recenter-if-needed)) + ((cider-repl--input-complete-p cider-repl-input-start-mark (point-max)) + (cider-repl--send-input t)) + (t + (cider-repl-newline-and-indent) + (message "[input not complete]")))) + +(defun cider-repl--recenter-if-needed () + "Make sure that the point is visible." + (unless (pos-visible-in-window-p (point-max)) + (save-excursion + (goto-char (point-max)) + (recenter -1)))) + +(defun cider-repl--grab-old-input (replace) + "Resend the old REPL input at point. +If REPLACE is non-nil the current input is replaced with the old +input; otherwise the new input is appended. The old input has the +text property `cider-old-input'." + (multiple-value-bind (beg end) (cider-property-bounds 'cider-old-input) + (let ((old-input (buffer-substring beg end)) ;;preserve + ;;properties, they will be removed later + (offset (- (point) beg))) + ;; Append the old input or replace the current input + (cond (replace (goto-char cider-repl-input-start-mark)) + (t (goto-char (point-max)) + (unless (eq (char-before) ?\ ) + (insert " ")))) + (delete-region (point) (point-max)) + (save-excursion + (insert old-input) + (when (equal (char-before) ?\n) + (delete-char -1))) + (forward-char offset)))) + +(defun cider-repl-closing-return () + "Evaluate the current input string after closing all open lists." + (interactive) + (goto-char (point-max)) + (save-restriction + (narrow-to-region cider-repl-input-start-mark (point)) + (while (ignore-errors (save-excursion (backward-up-list 1)) t) + (insert ")"))) + (cider-repl-return)) + +(defun cider-repl-toggle-pretty-printing () + "Toggle pretty-printing in the REPL." + (interactive) + (setq cider-repl-use-pretty-printing (not cider-repl-use-pretty-printing)) + (message "Pretty printing in nREPL %s." + (if cider-repl-use-pretty-printing "enabled" "disabled"))) + +(defvar cider-repl-clear-buffer-hook) + +(defun cider-repl-clear-buffer () + "Delete the output generated by the Clojure process." + (interactive) + (let ((inhibit-read-only t)) + (delete-region (point-min) cider-repl-prompt-start-mark) + (delete-region cider-repl-output-start cider-repl-output-end) + (when (< (point) cider-repl-input-start-mark) + (goto-char cider-repl-input-start-mark)) + (recenter t)) + (run-hooks 'cider-repl-clear-buffer-hook)) + +(defun cider-repl--input-line-beginning-position () + "Return the position of the beginning of input." + (save-excursion + (goto-char cider-repl-input-start-mark) + (line-beginning-position))) + +(defun cider-repl-clear-output () + "Delete the output inserted since the last input." + (interactive) + (let ((start (save-excursion + (cider-repl-previous-prompt) + (ignore-errors (forward-sexp)) + (forward-line) + (point))) + (end (1- (cider-repl--input-line-beginning-position)))) + (when (< start end) + (let ((inhibit-read-only t)) + (delete-region start end) + (save-excursion + (goto-char start) + (insert + (propertize ";;; output cleared" 'face 'font-lock-comment-face))))))) + +(defun cider--all-ns () + "Get a list of the available namespaces." + (cider-eval-and-get-value + "(clojure.core/map clojure.core/str (clojure.core/all-ns))")) + +(defun cider-repl-set-ns (ns) + "Switch the namespace of the REPL buffer to NS. + +If invoked in a REPL buffer the command will prompt you for the name of the +namespace to switch to." + (interactive (list (if (derived-mode-p 'cider-repl-mode) + (completing-read "Switch to namespace: " + (cider--all-ns)) + (cider-current-ns)))) + (if ns + (with-current-buffer (cider-current-repl-buffer) + (cider-eval + (format "(in-ns '%s)" ns) + (cider-repl-handler (current-buffer)))) + (error "Cannot determine the current namespace"))) + +;;;;; History + +(defcustom cider-repl-wrap-history nil + "T to wrap history around when the end is reached." + :type 'boolean + :group 'cider-repl) + +;; These two vars contain the state of the last history search. We +;; only use them if `last-command' was `cider-repl--history-replace', +;; otherwise we reinitialize them. + +(defvar cider-repl-input-history-position -1 + "Newer items have smaller indices.") + +(defvar cider-repl-history-pattern nil + "The regexp most recently used for finding input history.") + +(defun cider-repl--add-to-input-history (string) + "Add STRING to the input history. +Empty strings and duplicates are ignored." + (unless (or (equal string "") + (equal string (car cider-repl-input-history))) + (push string cider-repl-input-history) + (cl-incf cider-repl-input-history-items-added))) + +(defun cider-repl-delete-current-input () + "Delete all text after the prompt." + (goto-char (point-max)) + (delete-region cider-repl-input-start-mark (point-max))) + +(defun cider-repl--replace-input (string) + "Replace the current REPL input with STRING." + (cider-repl-delete-current-input) + (insert-and-inherit string)) + +(defun cider-repl--position-in-history (start-pos direction regexp) + "Return the position of the history item starting at START-POS. +Search in DIRECTION for REGEXP. +Return -1 resp the length of the history if no item matches." + ;; Loop through the history list looking for a matching line + (let* ((step (ecase direction + (forward -1) + (backward 1))) + (history cider-repl-input-history) + (len (length history))) + (loop for pos = (+ start-pos step) then (+ pos step) + if (< pos 0) return -1 + if (<= len pos) return len + if (string-match regexp (nth pos history)) return pos))) + +(defun cider-repl--history-replace (direction &optional regexp) + "Replace the current input with the next line in DIRECTION. +DIRECTION is 'forward' or 'backward' (in the history list). +If REGEXP is non-nil, only lines matching REGEXP are considered." + (setq cider-repl-history-pattern regexp) + (let* ((min-pos -1) + (max-pos (length cider-repl-input-history)) + (pos0 (cond ((cider-history-search-in-progress-p) + cider-repl-input-history-position) + (t min-pos))) + (pos (cider-repl--position-in-history pos0 direction (or regexp ""))) + (msg nil)) + (cond ((and (< min-pos pos) (< pos max-pos)) + (cider-repl--replace-input (nth pos cider-repl-input-history)) + (setq msg (format "History item: %d" pos))) + ((not cider-repl-wrap-history) + (setq msg (cond ((= pos min-pos) "End of history") + ((= pos max-pos) "Beginning of history")))) + (cider-repl-wrap-history + (setq pos (if (= pos min-pos) max-pos min-pos)) + (setq msg "Wrapped history"))) + (when (or (<= pos min-pos) (<= max-pos pos)) + (when regexp + (setq msg (concat msg "; no matching item")))) + (message "%s%s" msg (cond ((not regexp) "") + (t (format "; current regexp: %s" regexp)))) + (setq cider-repl-input-history-position pos) + (setq this-command 'cider-repl--history-replace))) + +(defun cider-history-search-in-progress-p () + "Return t if a current history search is in progress." + (eq last-command 'cider-repl--history-replace)) + +(defun cider-terminate-history-search () + "Terminate the current history search." + (setq last-command this-command)) + +(defun cider-repl-previous-input () + "Cycle backwards through input history. +If the `last-command' was a history navigation command use the +same search pattern for this command. +Otherwise use the current input as search pattern." + (interactive) + (cider-repl--history-replace 'backward (cider-repl-history-pattern t))) + +(defun cider-repl-next-input () + "Cycle forwards through input history. +See `cider-previous-input'." + (interactive) + (cider-repl--history-replace 'forward (cider-repl-history-pattern t))) + +(defun cider-repl-forward-input () + "Cycle forwards through input history." + (interactive) + (cider-repl--history-replace 'forward (cider-repl-history-pattern))) + +(defun cider-repl-backward-input () + "Cycle backwards through input history." + (interactive) + (cider-repl--history-replace 'backward (cider-repl-history-pattern))) + +(defun cider-repl-previous-matching-input (regexp) + "Find the previous input matching REGEXP." + (interactive "sPrevious element matching (regexp): ") + (cider-terminate-history-search) + (cider-repl--history-replace 'backward regexp)) + +(defun cider-repl-next-matching-input (regexp) + "Find then next input matching REGEXP." + (interactive "sNext element matching (regexp): ") + (cider-terminate-history-search) + (cider-repl--history-replace 'forward regexp)) + +(defun cider-repl-history-pattern (&optional use-current-input) + "Return the regexp for the navigation commands. +If USE-CURRENT-INPUT is non-nil, use the current input." + (cond ((cider-history-search-in-progress-p) + cider-repl-history-pattern) + (use-current-input + (assert (<= cider-repl-input-start-mark (point))) + (let ((str (cider-repl--current-input t))) + (cond ((string-match "^[ \n]*$" str) nil) + (t (concat "^" (regexp-quote str)))))) + (t nil))) + +;;; persistent history +(defcustom cider-repl-history-size 500 + "The maximum number of items to keep in the REPL history." + :type 'integer + :safe 'integerp + :group 'cider-repl) + +(defcustom cider-repl-history-file nil + "File to save the persistent REPL history to." + :type 'string + :safe 'stringp + :group 'cider-repl) + +(defun cider-repl--history-read-filename () + "Ask the user which file to use, defaulting `cider-repl-history-file'." + (read-file-name "Use CIDER REPL history file: " + cider-repl-history-file)) + +(defun cider-repl--history-read (filename) + "Read history from FILENAME and return it. +It does not yet set the input history." + (if (file-readable-p filename) + (with-temp-buffer + (insert-file-contents filename) + (when (> (buffer-size (current-buffer)) 0) + (read (current-buffer)))) + '())) + +(defun cider-repl-history-load (&optional filename) + "Load history from FILENAME into current session. +FILENAME defaults to the value of `cider-repl-history-file' but user +defined filenames can be used to read special history files. + +The value of `cider-repl-input-history' is set by this function." + (interactive (list (cider-repl--history-read-filename))) + (let ((f (or filename cider-repl-history-file))) + ;; TODO: probably need to set cider-repl-input-history-position as well. + ;; in a fresh connection the newest item in the list is currently + ;; not available. After sending one input, everything seems to work. + (setq cider-repl-input-history (cider-repl--history-read f)))) + +(defun cider-repl--history-write (filename) + "Write history to FILENAME. +Currently coding system for writing the contents is hardwired to +utf-8-unix." + (let* ((mhist (cider-repl--histories-merge cider-repl-input-history + cider-repl-input-history-items-added + (cider-repl--history-read filename))) + ;; newest items are at the beginning of the list, thus 0 + (hist (cl-subseq mhist 0 (min (length mhist) cider-repl-history-size)))) + (unless (file-writable-p filename) + (error (format "History file not writable: %s" filename))) + (let ((print-length nil) (print-level nil)) + (with-temp-file filename + ;; TODO: really set cs for output + ;; TODO: does cs need to be customizable? + (insert ";; -*- coding: utf-8-unix -*-\n") + (insert ";; Automatically written history of CIDER REPL session\n") + (insert ";; Edit at your own risk\n\n") + (prin1 (mapcar #'substring-no-properties hist) (current-buffer)))))) + +(defun cider-repl-history-save (&optional filename) + "Save the current REPL input history to FILENAME. +FILENAME defaults to the value of `cider-repl-history-file'." + (interactive (list (cider-repl--history-read-filename))) + (let* ((file (or filename cider-repl-history-file))) + (cider-repl--history-write file))) + +(defun cider-repl-history-just-save () + "Just save the history to `cider-repl-history-file'. +This function is meant to be used in hooks to avoid lambda +constructs." + (cider-repl-history-save cider-repl-history-file)) + +;; SLIME has different semantics and will not save any duplicates. +;; we keep track of how many items were added to the history in the +;; current session in `cider-repl--add-to-input-history' and merge only the +;; new items with the current history found in the file, which may +;; have been changed in the meantime by another session. +(defun cider-repl--histories-merge (session-hist n-added-items file-hist) + "Merge histories from SESSION-HIST adding N-ADDED-ITEMS into FILE-HIST." + (append (cl-subseq session-hist 0 n-added-items) + file-hist)) + +;;; REPL shortcuts +(defcustom cider-repl-shortcut-dispatch-char ?\, + "Character used to distinguish REPL commands from Lisp forms." + :type '(character) + :group 'cider-repl) + +(defvar cider-repl-shortcuts (make-hash-table :test 'equal)) + +(defun cider-repl-add-shortcut (name handler) + "Add a REPL shortcut command, defined by NAME and HANDLER." + (puthash name handler cider-repl-shortcuts)) + +(cider-repl-add-shortcut "hasta la vista" 'cider-quit) +(cider-repl-add-shortcut "version" 'cider-version) +(cider-repl-add-shortcut "conn-info" 'cider-display-current-connection-info) +(cider-repl-add-shortcut "conn-rotate" 'cider-rotate-connection) +(cider-repl-add-shortcut "clear" 'cider-repl-clear-buffer) +(cider-repl-add-shortcut "ns" 'cider-repl-set-ns) +(cider-repl-add-shortcut "help" 'cider-repl-shortcuts-help) + +(defun cider-repl-shortcuts-help () + "Display a help buffer." + (interactive) + (ignore-errors (kill-buffer "*CIDER REPL Shortcuts Help*")) + (with-current-buffer (get-buffer-create "*CIDER REPL Shortcuts Help*") + (insert "CIDER REPL shortcuts:\n\n") + (maphash (lambda (k v) (insert (format "%s:\n\t%s\n" k v))) cider-repl-shortcuts) + (goto-char (point-min)) + (help-mode) + (display-buffer (current-buffer) t)) + (cider-repl-handle-shortcut) + (current-buffer)) + +(defun cider-repl--available-shortcuts () + "Return the available REPL shortcuts." + (cider-util--hash-keys cider-repl-shortcuts)) + +(defun cider-repl-handle-shortcut () + "Execute a REPL shortcut." + (interactive) + (if (> (point) cider-repl-input-start-mark) + (insert (string cider-repl-shortcut-dispatch-char)) + (let ((command (completing-read "Command: " + (cider-repl--available-shortcuts)))) + (if (not (equal command "")) + (call-interactively (gethash command cider-repl-shortcuts)) + (error "No command selected"))))) + + +;;;;; CIDER REPL mode + +;;; Prevent paredit from inserting some inappropriate spaces. +;;; C.f. clojure-mode.el +(defun cider-space-for-delimiter-p (endp delim) + "Hook for paredit's `paredit-space-for-delimiter-predicates'. + +Decides if paredit should insert a space after/before (if/unless +ENDP) DELIM." + (if (derived-mode-p 'cider-repl-mode) + (save-excursion + (backward-char) + (if (and (or (char-equal delim ?\() + (char-equal delim ?\") + (char-equal delim ?{)) + (not endp)) + (if (char-equal (char-after) ?#) + (and (not (bobp)) + (or (char-equal ?w (char-syntax (char-before))) + (char-equal ?_ (char-syntax (char-before))))) + t) + t)) + t)) + +(defvar cider-repl-mode-hook nil + "Hook executed when entering `cider-repl-mode'.") + +(defvar cider-repl-mode-syntax-table + (copy-syntax-table clojure-mode-syntax-table)) + +(defvar cider-repl-mode-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map clojure-mode-map) + (define-key map (kbd "C-c C-d") 'cider-doc-map) + (define-key map (kbd "M-.") 'cider-jump) + (define-key map (kbd "M-,") 'cider-jump-back) + (define-key map (kbd "C-c M-.") 'cider-jump-to-resource) + (define-key map (kbd "RET") 'cider-repl-return) + (define-key map (kbd "TAB") 'cider-repl-tab) + (define-key map (kbd "C-") 'cider-repl-closing-return) + (define-key map (kbd "C-j") 'cider-repl-newline-and-indent) + (define-key map (kbd "C-c C-o") 'cider-repl-clear-output) + (define-key map (kbd "C-c M-o") 'cider-repl-clear-buffer) + (define-key map (kbd "C-c M-n") 'cider-repl-set-ns) + (define-key map (kbd "C-c C-u") 'cider-repl-kill-input) + (define-key map (kbd "C-a") 'cider-repl-bol) + (define-key map (kbd "C-S-a") 'cider-repl-bol-mark) + (define-key map [home] 'cider-repl-bol) + (define-key map [S-home] 'cider-repl-bol-mark) + (define-key map (kbd "C-") 'cider-repl-backward-input) + (define-key map (kbd "C-") 'cider-repl-forward-input) + (define-key map (kbd "M-p") 'cider-repl-previous-input) + (define-key map (kbd "M-n") 'cider-repl-next-input) + (define-key map (kbd "M-r") 'cider-repl-previous-matching-input) + (define-key map (kbd "M-s") 'cider-repl-next-matching-input) + (define-key map (kbd "C-c C-n") 'cider-repl-next-prompt) + (define-key map (kbd "C-c C-p") 'cider-repl-previous-prompt) + (define-key map (kbd "C-c C-b") 'cider-interrupt) + (define-key map (kbd "C-c C-c") 'cider-interrupt) + (define-key map (kbd "C-c C-m") 'cider-macroexpand-1) + (define-key map (kbd "C-c M-m") 'cider-macroexpand-all) + (define-key map (kbd "C-c C-z") 'cider-switch-to-last-clojure-buffer) + (define-key map (kbd "C-c M-s") 'cider-selector) + (define-key map (kbd "C-c M-f") 'cider-load-fn-into-repl-buffer) + (define-key map (kbd "C-c C-q") 'cider-quit) + (define-key map (kbd "C-c M-i") 'cider-inspect) + (define-key map (kbd "C-c M-t") 'cider-toggle-trace) + (define-key map (kbd "C-c C-x") 'cider-refresh) + (define-key map (kbd "C-x C-e") 'cider-eval-last-sexp) + (define-key map (kbd "C-c C-r") 'cider-eval-region) + (define-key map (string cider-repl-shortcut-dispatch-char) 'cider-repl-handle-shortcut) + (easy-menu-define cider-repl-mode-menu map + "Menu for CIDER's REPL mode" + `("REPL" + ["Complete symbol" complete-symbol] + "--" + ,cider-doc-menu + "--" + ["Jump to source" cider-jump] + ["Jump to resource" cider-jump-to-resource] + ["Jump back" cider-jump-back] + "--" + ["Inspect" cider-inspect] + "--" + ["Set REPL ns" cider-repl-set-ns] + ["Toggle pretty printing" cider-repl-toggle-pretty-printing] + ["Clear output" cider-repl-clear-output] + ["Clear buffer" cider-repl-clear-buffer] + ["Refresh loaded code" cider-refresh] + ["Kill input" cider-repl-kill-input] + ["Interrupt" cider-interrupt] + ["Quit" cider-quit] + ["Restart" cider-restart] + "--" + ["Version info" cider-version])) + map)) + +(define-derived-mode cider-repl-mode fundamental-mode "REPL" + "Major mode for Clojure REPL interactions. + +\\{cider-repl-mode-map}" + (setq-local lisp-indent-function 'clojure-indent-function) + (setq-local indent-line-function 'lisp-indent-line) + (make-local-variable 'completion-at-point-functions) + (add-to-list 'completion-at-point-functions + 'cider-complete-at-point) + (set-syntax-table cider-repl-mode-syntax-table) + (cider-turn-on-eldoc-mode) + ;; At the REPL, we define beginning-of-defun and end-of-defun to be + ;; the start of the previous prompt or next prompt respectively. + ;; Notice the interplay with `cider-repl-beginning-of-defun'. + (setq-local beginning-of-defun-function 'cider-repl-mode-beginning-of-defun) + (setq-local end-of-defun-function 'cider-repl-mode-end-of-defun) + (if (fboundp 'hack-dir-local-variables-non-file-buffer) + (hack-dir-local-variables-non-file-buffer)) + (when cider-repl-history-file + (cider-repl-history-load cider-repl-history-file) + (add-hook 'kill-buffer-hook 'cider-repl-history-just-save t t) + (add-hook 'kill-emacs-hook 'cider-repl-history-just-save)) + (add-hook 'paredit-mode-hook + (lambda () + (when (>= paredit-version 21) + (define-key cider-repl-mode-map "{" 'paredit-open-curly) + (define-key cider-repl-mode-map "}" 'paredit-close-curly) + (add-to-list 'paredit-space-for-delimiter-predicates + 'cider-space-for-delimiter-p))))) + + +(provide 'cider-repl) + +;;; cider-repl.el ends here diff --git a/elpa/cider-0.7.0/cider-repl.elc b/elpa/cider-0.7.0/cider-repl.elc new file mode 100644 index 0000000000000000000000000000000000000000..335bf9ee98e39a975989484a3b1d89c26e87cfa1 GIT binary patch literal 40424 zcmdUYi+dZ#kteB_Df)9_XA{Sp?A?yQ*d(jrzxQE=z?Tv!NUU$?)=hM+qxQ>=? zcxP{OdpkHhZVsAi?+uKkELEhW+4( zag2Wn{-yX=#lIT<)$y|f(O z*1wjre+|Fh(4XVF{xW{;jpNrjQR`oiIewi_EzL(EP)|R)u0Z6x>b%F@SCjhy3*J}9 z^K?h_zDDHV*T5>>eT{_oH2@Lb*T85BajrjVRD!32?Az1!APbcA4?zK4P?qq4b{8}R zLL#Ya3n8RZa4m-VXP6t_dLLAMS!?TmDdm0>`4oAI{u$3Klnz;C4&^zth z2;?k57k5^+z2^uY869WA?$)FGYn9-3e~=xuz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?Qs&z zL9-NJdXA%UuoOqA{IT*F&UfA@^}tA^2DzBf@VA~iN zU<;jNMNDck|4AFh)i_{+6V2YQFIC?nxDLjay9{6W3}E?|)lY(2X(08P`%OOqdc<#a zIRnRm-{an5!E66n7lYTHSetl-J$?GKpf(1`u=)Hs(n-x~{V7OR8fb;*5V|6`s2P{8 z*}G7LxynjQR}phAy&7Pm$KM<7rP*8vPwxl_e;C|>nf^&>wId`a4s?uzi1ifpm+-Q6 zoV#u5W^SskqykNtIelUXH^Ps!|NZ#3g2?{L92^EOIRe-oQ}2;YLMAv)PRhS-@y#6U z15Sg49^{ks7h9*|HWAjtx7-U~J;!?~4|Jh0@^Oax#bj-KK*vO&znF-FkjgLUm3Z5F zAf9q0U*CEEcPa#8txbYX_4nVgCYJBwcuDmB&$S6}M6)K)mgJ5|aWHnuhr|V|IV#d6 zaRVpy_kU%hxPjB?{a@2vfq(LnxAXxVUshW1XROYd9*_Y?~FL0yZD>yQVb_^94UWvgt*!k{SNfdKdj<=;Q4?vRNoJOJ>sOqKQl0R{G zN0ERa+nvFB8)|3g7SB;p;}DWb#}~kAMe6iAP#!oPXU@$!~B!~-gSEt=`lkmAm0_xIl2Hr1J)`}YkvQ#&y` x#ShJ~Dp3xW33^cQDbbY3%v+@cKeJ*yNA~)9J+JdZA^HjqEBE#=(%b6d{{zT6J-z?{ literal 0 HcmV?d00001 diff --git a/elpa/cider-0.7.0/cider-scratch.el b/elpa/cider-0.7.0/cider-scratch.el new file mode 100644 index 000000000..a5dfff755 --- /dev/null +++ b/elpa/cider-0.7.0/cider-scratch.el @@ -0,0 +1,71 @@ +;;; cider-scratch.el --- *scratch* buffer for Clojure -*- lexical-binding: t -*- + +;; Copyright © 2014 Bozhidar Batsov +;; +;; Author: Tim King +;; Phil Hagelberg +;; Bozhidar Batsov +;; Hugo Duncan +;; Steve Purcell + +;; 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 . + +;; This file is not part of GNU Emacs. + +;;; Commentary: + +;; Imitate Emacs's *scratch* buffer. + +;;; Code: + +(require 'cider-interaction) +(require 'clojure-mode) + +(defvar cider-clojure-interaction-mode-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map clojure-mode-map) + (define-key map (kbd "C-j") 'cider-eval-print-last-sexp) + map)) + +(defconst cider-scratch-buffer-name "*cider-scratch*") + +;;;###autoload +(defun cider-scratch () + "Create a scratch buffer." + (interactive) + (pop-to-buffer (cider-find-or-create-scratch-buffer))) + +(defun cider-find-or-create-scratch-buffer () + "Find or create the scratch buffer." + (or (get-buffer cider-scratch-buffer-name) + (cider-create-scratch-buffer))) + +(define-derived-mode cider-clojure-interaction-mode clojure-mode "Clojure Interaction" + "Major mode for typing and evaluating Clojure forms. +Like Lisp mode except that \\[cider-eval-print-last-sexp] evals the Lisp expression +before point, and prints its value into the buffer, advancing point. + +\\{cider-clojure-interaction-mode-map}") + +(defun cider-create-scratch-buffer () + "Create a new scratch buffer." + (with-current-buffer (get-buffer-create cider-scratch-buffer-name) + (cider-clojure-interaction-mode) + (insert ";; This buffer is for Clojure experiments and evaluation.\n" + ";; Press C-j to evaluate the last expression.\n\n") + (current-buffer))) + +(provide 'cider-scratch) + +;;; cider-scratch.el ends here diff --git a/elpa/cider-0.7.0/cider-scratch.elc b/elpa/cider-0.7.0/cider-scratch.elc new file mode 100644 index 0000000000000000000000000000000000000000..edfcbc9c9ff482b9eacc71bc6c52a5293550faa7 GIT binary patch literal 4530 zcmcgw+iu%N5Ow+#C`f?zp)Kl%PUHf%0#oKimh2b>k_stmGzp5PeTo8PMXoHy6v=Rx zO4OqN-ZQ(TP1=s-B25g?Cigb8b2)RyM^B!PzuDN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z_BvJowWtZq?BRq4xMwLicbB@@{TpL3jh#1)i52)u1GwB$(m7aT2lkvdX9I8Kn`Q +;; Phil Hagelberg +;; Bozhidar Batsov +;; Hugo Duncan +;; Steve Purcell + +;; 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 . + +;; This file is not part of GNU Emacs. + +;;; Commentary: + +;; Buffer selection command inspired by SLIME's selector. + +;;; Code: + +(require 'cider-client) +(require 'cider-interaction) +(require 'cider-repl) ; for cider-find-or-create-repl-buffer + +(defconst cider-selector-help-buffer "*Selector Help*" + "The name of the selector's help buffer.") + +(defvar cider-selector-methods nil + "List of buffer-selection methods for the `cider-selector' command. +Each element is a list (KEY DESCRIPTION FUNCTION). +DESCRIPTION is a one-line description of what the key selects.") + +(defvar cider-selector-other-window nil + "If non-nil use `switch-to-buffer-other-window'.") + +(defun cider--recently-visited-buffer (mode) + "Return the most recently visited buffer whose `major-mode' is MODE. +Only considers buffers that are not already visible." + (loop for buffer in (buffer-list) + when (and (with-current-buffer buffer (eq major-mode mode)) + (not (string-match "^ " (buffer-name buffer))) + (null (get-buffer-window buffer 'visible))) + return buffer + finally (error "Can't find unshown buffer in %S" mode))) + +;;;###autoload +(defun cider-selector (&optional other-window) + "Select a new buffer by type, indicated by a single character. +The user is prompted for a single character indicating the method by +which to choose a new buffer. The `?' character describes then +available methods. OTHER-WINDOW provides an optional target. + +See `def-cider-selector-method' for defining new methods." + (interactive) + (message "Select [%s]: " + (apply #'string (mapcar #'car cider-selector-methods))) + (let* ((cider-selector-other-window other-window) + (ch (save-window-excursion + (select-window (minibuffer-window)) + (read-char))) + (method (cl-find ch cider-selector-methods :key #'car))) + (cond (method + (funcall (cl-caddr method))) + (t + (message "No method for character: ?\\%c" ch) + (ding) + (sleep-for 1) + (discard-input) + (cider-selector))))) + +(defmacro def-cider-selector-method (key description &rest body) + "Define a new `cider-select' buffer selection method. + +KEY is the key the user will enter to choose this method. + +DESCRIPTION is a one-line sentence describing how the method +selects a buffer. + +BODY is a series of forms which are evaluated when the selector +is chosen. The returned buffer is selected with +`switch-to-buffer'." + (let ((method `(lambda () + (let ((buffer (progn ,@body))) + (cond ((not (get-buffer buffer)) + (message "No such buffer: %S" buffer) + (ding)) + ((get-buffer-window buffer) + (select-window (get-buffer-window buffer))) + (cider-selector-other-window + (switch-to-buffer-other-window buffer)) + (t + (switch-to-buffer buffer))))))) + `(setq cider-selector-methods + (cl-sort (cons (list ,key ,description ,method) + (cl-remove ,key cider-selector-methods :key #'car)) + #'< :key #'car)))) + +(def-cider-selector-method ?? "Selector help buffer." + (ignore-errors (kill-buffer cider-selector-help-buffer)) + (with-current-buffer (get-buffer-create cider-selector-help-buffer) + (insert "CIDER Selector Methods:\n\n") + (loop for (key line nil) in cider-selector-methods + do (insert (format "%c:\t%s\n" key line))) + (goto-char (point-min)) + (help-mode) + (display-buffer (current-buffer) t)) + (cider-selector) + (current-buffer)) + +(pushnew (list ?4 "Select in other window" (lambda () (cider-selector t))) + cider-selector-methods :key #'car) + +(def-cider-selector-method ?c + "Most recently visited clojure-mode buffer." + (cider--recently-visited-buffer 'clojure-mode)) + +(def-cider-selector-method ?e + "Most recently visited emacs-lisp-mode buffer." + (cider--recently-visited-buffer 'emacs-lisp-mode)) + +(def-cider-selector-method ?q "Abort." + (top-level)) + +(def-cider-selector-method ?r + "Current REPL buffer." + (cider-find-or-create-repl-buffer)) + +(def-cider-selector-method ?n + "Connections browser buffer." + (nrepl-connection-browser) + nrepl--connection-browser-buffer-name) + +(def-cider-selector-method ?m + "*nrepl-messages* buffer." + nrepl-message-buffer-name) + +(def-cider-selector-method ?x + "*cider-error* buffer." + cider-error-buffer) + +(def-cider-selector-method ?s + "Cycle to the next CIDER connection's REPL." + (cider-rotate-connection) + (cider-find-or-create-repl-buffer)) + +(provide 'cider-selector) + +;;; cider-selector.el ends here diff --git a/elpa/cider-0.7.0/cider-selector.elc b/elpa/cider-0.7.0/cider-selector.elc new file mode 100644 index 0000000000000000000000000000000000000000..43bc5d16f4cc5c49f3f2e8f524f65eaa21f533f4 GIT binary patch literal 7660 zcmdT}Yf~G^6~*QetWSAXDwPj=5oRS3kC>MvgS}bvkh4^5vjyJTN&zVkqXvyVnvrKl z5c2DDZa<`v0Fx?LEs0&SM%}k>ci%qu+|%P1-8Z{`oSU1gym;|~cGJNyibapku4xby zukgvOw?Vj*rk|Q|8U`_?2^|FmZI3R9Hp%I1wKlix=j7UsFI}8x>447Rgf@Q4MV4>C z$3{~Of-rCPHbguOHo~YUGRtmunznwVVV>Hj7P<}^&BmUwSBa^zfWO5$bzuIBA?0WgQQ1!N@0-DnV>ig zrY6yw$w>rR9EpsIJ`7z?&5QVd)gNBK*Z!$gD)qDLLRewi6I4C%Y#SeE<-~RPfj@5f zhld|_r%K0}_&ka-LF#Bj>@GpniUt!68(VY^(xg@pHh?BzSH0d zo#!sSiQogXsUeo~!^<0pqM!Bvpp?%>(1+=XYQVu@fHQ7Zx6WD&P32tZqH(Y+^L@@a(qKUB#5IRrZYy|{8x zMXN7cJM$+Vl0-K==FyMXA%;8B6)at!$9sB)ZEjxR=Eb>3-1Y{&F!mgGX^9=loPz_~ zeLJVz$XuI*&LCJ~kB_AwMROKN7XYpPld8r>rr3oj%*m@Wm#2d;lE^ZEzPcMEwE`3g z9vdZjKfMBxsdEGStsPZQ!TBno9DB3fIOUY`{5GkiLmDLF%8Wn_DXxd&8CbR#g@MGt zHB55wFlHQcXS4DiU-fC zY39TCNMS?SI_=It@koNC5?lsR9B?djN@38!`yaZ8*3bLz_6~mLm0bduNOq*D%vO}c zBFGR_pzufl)nF)VnlmirtR}aE?kM4vbCk?13c%lvJ(lOZ4bq18h#}mT5H{!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lK=n! literal 0 HcmV?d00001 diff --git a/elpa/cider-0.7.0/cider-stacktrace.el b/elpa/cider-0.7.0/cider-stacktrace.el new file mode 100644 index 000000000..cc26735bb --- /dev/null +++ b/elpa/cider-0.7.0/cider-stacktrace.el @@ -0,0 +1,542 @@ +;;; cider-stacktrace.el --- Stacktrace navigator -*- lexical-binding: t -*- + +;; Copyright © 2014 Jeff Valk + +;; Author: Jeff Valk + +;; 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 . + +;; This file is not part of GNU Emacs. + +;;; Commentary: + +;; Stacktrace filtering and stack frame source navigation + +;;; Code: + +(require 'cl-lib) +(require 'button) +(require 'dash) +(require 'easymenu) + +;; Variables + +(defgroup cider-stacktrace nil + "Stacktrace filtering and navigation." + :prefix "cider-stacktrace-" + :group 'cider) + +(defcustom cider-stacktrace-fill-column t + "Fill column for error messages in stacktrace display. +If nil, messages will not be wrapped. If truthy but non-numeric, +`fill-column' will be used." + :type 'list + :group 'cider-stacktrace + :package-version '(cider . "0.7.0")) + +(defcustom cider-stacktrace-default-filters '(tooling dup) + "Frame types to omit from initial stacktrace display." + :type 'list + :group 'cider-stacktrace + :package-version '(cider . "0.6.0")) + +(defvar cider-stacktrace-detail-max 2 + "The maximum detail level for causes.") + +(defvar-local cider-stacktrace-hidden-frame-count 0) +(defvar-local cider-stacktrace-filters nil) +(defvar-local cider-stacktrace-prior-filters nil) +(defvar-local cider-stacktrace-cause-visibility nil) + + +;; Faces + +(defface cider-stacktrace-error-class-face + '((t (:inherit font-lock-warning-face))) + "Face for exception class names" + :group 'cider-stacktrace + :package-version '(cider . "0.6.0")) + +(defface cider-stacktrace-error-message-face + '((t (:inherit font-lock-doc-face))) + "Face for exception messages" + :group 'cider-stacktrace + :package-version '(cider . "0.7.0")) + +(defface cider-stacktrace-filter-shown-face + '((t (:inherit button :underline t :weight normal))) + "Face for filter buttons representing frames currently visible" + :group 'cider-stacktrace + :package-version '(cider . "0.6.0")) + +(defface cider-stacktrace-filter-hidden-face + '((t (:inherit button :underline nil :weight normal))) + "Face for filter buttons representing frames currently filtered out" + :group 'cider-stacktrace + :package-version '(cider . "0.6.0")) + +(defface cider-stacktrace-face + '((t (:inherit default))) + "Face for stack frame text" + :group 'cider-stacktrace + :package-version '(cider . "0.6.0")) + +(defface cider-stacktrace-ns-face + '((t (:inherit font-lock-comment-face))) + "Face for stack frame namespace name" + :group 'cider-stacktrace + :package-version '(cider . "0.6.0")) + +(defface cider-stacktrace-fn-face + '((t (:inherit default :weight bold))) + "Face for stack frame function name" + :group 'cider-stacktrace + :package-version '(cider . "0.6.0")) + + +;; Colors & Theme Support + +(defvar cider-stacktrace-frames-background-color + (cider-scale-background-color) + "Background color for stacktrace frames.") + +(defadvice enable-theme (after cider-stacktrace-adapt-to-theme activate) + "When theme is changed, update `cider-stacktrace-frames-background-color'." + (setq cider-stacktrace-frames-background-color (cider-scale-background-color))) + + +;; Mode & key bindings + +(defvar cider-stacktrace-mode-map + (let ((map (make-sparse-keymap))) + (define-key map (kbd "M-p") 'cider-stacktrace-previous-cause) + (define-key map (kbd "M-n") 'cider-stacktrace-next-cause) + (define-key map (kbd "M-.") 'cider-stacktrace-jump) + (define-key map "q" 'cider-popup-buffer-quit-function) + (define-key map "j" 'cider-stacktrace-toggle-java) + (define-key map "c" 'cider-stacktrace-toggle-clj) + (define-key map "r" 'cider-stacktrace-toggle-repl) + (define-key map "t" 'cider-stacktrace-toggle-tooling) + (define-key map "d" 'cider-stacktrace-toggle-duplicates) + (define-key map "a" 'cider-stacktrace-toggle-all) + (define-key map "1" 'cider-stacktrace-cycle-cause-1) + (define-key map "2" 'cider-stacktrace-cycle-cause-2) + (define-key map "3" 'cider-stacktrace-cycle-cause-3) + (define-key map "4" 'cider-stacktrace-cycle-cause-4) + (define-key map "5" 'cider-stacktrace-cycle-cause-5) + (define-key map "0" 'cider-stacktrace-cycle-all-causes) + (define-key map [tab] 'cider-stacktrace-cycle-current-cause) + (define-key map [backtab] 'cider-stacktrace-cycle-all-causes) + (easy-menu-define cider-stacktrace-mode-menu map + "Menu for CIDER's stacktrace mode" + '("Stacktrace" + ["Previous cause" cider-stacktrace-previous-cause] + ["Next cause" cider-stacktrace-next-cause] + "--" + ["Jump to frame source" cider-stacktrace-jump] + "--" + ["Cycle current cause detail" cider-stacktrace-cycle-current-cause] + ["Cycle cause #1 detail" cider-stacktrace-cycle-cause-1] + ["Cycle cause #2 detail" cider-stacktrace-cycle-cause-2] + ["Cycle cause #3 detail" cider-stacktrace-cycle-cause-3] + ["Cycle cause #4 detail" cider-stacktrace-cycle-cause-4] + ["Cycle cause #5 detail" cider-stacktrace-cycle-cause-5] + ["Cycle all cause detail" cider-stacktrace-cycle-all-causes] + "--" + ["Show/hide Java frames" cider-stacktrace-toggle-java] + ["Show/hide Clojure frames" cider-stacktrace-toggle-clj] + ["Show/hide REPL frames" cider-stacktrace-toggle-repl] + ["Show/hide tooling frames" cider-stacktrace-toggle-tooling] + ["Show/hide duplicate frames" cider-stacktrace-toggle-duplicates] + ["Show/hide all frames" cider-stacktrace-toggle-all])) + map)) + +(define-derived-mode cider-stacktrace-mode fundamental-mode "Stacktrace" + "Major mode for filtering and navigating CIDER stacktraces. + +\\{cider-stacktrace-mode-map}" + (setq buffer-read-only t) + (setq-local truncate-lines t) + (setq-local electric-indent-chars nil) + (setq-local cider-stacktrace-prior-filters nil) + (setq-local cider-stacktrace-hidden-frame-count 0) + (setq-local cider-stacktrace-filters cider-stacktrace-default-filters) + (setq-local cider-stacktrace-cause-visibility (apply 'vector (-repeat 10 0)))) + + +;; Stacktrace filtering + +(defun cider-stacktrace-indicate-filters (filters) + "Update enabled state of filter buttons. + +Find buttons with a 'filter property; if filter is a member of FILTERS, or +if filter is nil ('show all') and the argument list is non-nil, fontify the +button as disabled. Upon finding text with a 'hidden-count property, stop +searching and update the hidden count text." + (with-current-buffer (get-buffer cider-error-buffer) + (save-excursion + (goto-char (point-min)) + (let ((inhibit-read-only t) + (get-face (lambda (hide) + (if hide + 'cider-stacktrace-filter-hidden-face + 'cider-stacktrace-filter-shown-face)))) + ;; Toggle buttons + (while (not (or (get-text-property (point) 'hidden-count) (eobp))) + (let ((button (button-at (point)))) + (when button + (let* ((filter (button-get button 'filter)) + (face (funcall get-face (if filter + (member filter filters) + filters)))) + (button-put button 'face face))) + (goto-char (or (next-property-change (point)) + (point-max))))) + ;; Update hidden count + (when (and (get-text-property (point) 'hidden-count) + (re-search-forward "[0-9]+" (line-end-position) t)) + (replace-match + (number-to-string cider-stacktrace-hidden-frame-count))))))) + +(defun cider-stacktrace-apply-filters (filters) + "Set visibility on stack frames using FILTERS. +Update `cider-stacktrace-hidden-frame-count' and indicate filters applied. +Currently collapsed stacktraces are ignored, and do not contribute to the +hidden count." + (with-current-buffer (get-buffer cider-error-buffer) + (save-excursion + (goto-char (point-min)) + (let ((inhibit-read-only t) + (hidden 0)) + (while (not (eobp)) + (unless (get-text-property (point) 'collapsed) + (let* ((flags (get-text-property (point) 'flags)) + (hide (if (-intersection filters flags) t nil))) + (when hide (setq hidden (+ 1 hidden))) + (put-text-property (point) (line-beginning-position 2) 'invisible hide))) + (forward-line 1)) + (setq cider-stacktrace-hidden-frame-count hidden))) + (cider-stacktrace-indicate-filters filters))) + +(defun cider-stacktrace-apply-cause-visibility () + "Apply `cider-stacktrace-cause-visibility' to causes and reapply filters." + (with-current-buffer (get-buffer cider-error-buffer) + (save-excursion + (goto-char (point-min)) + (cl-flet ((next-detail (end) + (-when-let (pos (next-single-property-change (point) 'detail)) + (when (< pos end) + (goto-char pos))))) + (let ((inhibit-read-only t)) + ;; For each cause... + (while (cider-stacktrace-next-cause) + (let* ((num (get-text-property (point) 'cause)) + (level (elt cider-stacktrace-cause-visibility num)) + (cause-end (cadr (cider-property-bounds 'cause)))) + ;; For each detail level within the cause, set visibility. + (while (next-detail cause-end) + (let* ((detail (get-text-property (point) 'detail)) + (detail-end (cadr (cider-property-bounds 'detail))) + (hide (if (> detail level) t nil))) + (add-text-properties (point) detail-end + (list 'invisible hide + 'collapsed hide)))))))) + (cider-stacktrace-apply-filters + cider-stacktrace-filters)))) + + +;; Interactive functions + +(defun cider-stacktrace-previous-cause () + "Move point to the previous exception cause, if one exists." + (interactive) + (with-current-buffer (get-buffer cider-error-buffer) + (-when-let (pos (previous-single-property-change (point) 'cause)) + (goto-char pos)))) + +(defun cider-stacktrace-next-cause () + "Move point to the next exception cause, if one exists." + (interactive) + (with-current-buffer (get-buffer cider-error-buffer) + (-when-let (pos (next-single-property-change (point) 'cause)) + (goto-char pos)))) + + +(defun cider-stacktrace-cycle-cause (num &optional level) + "Update element NUM of `cider-stacktrace-cause-visibility', optionally to LEVEL. +If LEVEL is not specified, its current value is incremented. When it reaches 3, +it wraps to 0." + (let ((level (or level (1+ (elt cider-stacktrace-cause-visibility num))))) + (aset cider-stacktrace-cause-visibility num (mod level 3)) + (cider-stacktrace-apply-cause-visibility))) + +(defun cider-stacktrace-cycle-all-causes () + "Cycle the visibility of all exception causes." + (interactive) + (with-current-buffer (get-buffer cider-error-buffer) + (save-excursion + ;; Find nearest cause. + (unless (get-text-property (point) 'cause) + (cider-stacktrace-next-cause) + (unless (get-text-property (point) 'cause) + (cider-stacktrace-previous-cause))) + ;; Cycle its level, and apply that to all causes. + (let* ((num (get-text-property (point) 'cause)) + (level (1+ (elt cider-stacktrace-cause-visibility num)))) + (setq-local cider-stacktrace-cause-visibility + (apply 'vector (-repeat 10 (mod level 3)))) + (cider-stacktrace-apply-cause-visibility))))) + +(defun cider-stacktrace-cycle-current-cause () + "Cycle the visibility of current exception at point, if any." + (interactive) + (with-current-buffer (get-buffer cider-error-buffer) + (-when-let (num (get-text-property (point) 'cause)) + (cider-stacktrace-cycle-cause num)))) + +(defun cider-stacktrace-cycle-cause-1 () + "Cycle the visibility of exception cause #1." + (interactive) + (cider-stacktrace-cycle-cause 1)) + +(defun cider-stacktrace-cycle-cause-2 () + "Cycle the visibility of exception cause #2." + (interactive) + (cider-stacktrace-cycle-cause 2)) + +(defun cider-stacktrace-cycle-cause-3 () + "Cycle the visibility of exception cause #3." + (interactive) + (cider-stacktrace-cycle-cause 3)) + +(defun cider-stacktrace-cycle-cause-4 () + "Cycle the visibility of exception cause #4." + (interactive) + (cider-stacktrace-cycle-cause 4)) + +(defun cider-stacktrace-cycle-cause-5 () + "Cycle the visibility of exception cause #5." + (interactive) + (cider-stacktrace-cycle-cause 5)) + + +(defun cider-stacktrace-toggle-all () + "Reset `cider-stacktrace-filters' if present; otherwise restore prior filters." + (interactive) + (when cider-stacktrace-filters + (setq-local cider-stacktrace-prior-filters + cider-stacktrace-filters)) + (cider-stacktrace-apply-filters + (setq cider-stacktrace-filters + (unless cider-stacktrace-filters ; when current filters are nil, + cider-stacktrace-prior-filters)))) ; reenable prior filter set + +(defun cider-stacktrace-toggle (flag) + "Update `cider-stacktrace-filters' to add or remove FLAG, and apply filters." + (cider-stacktrace-apply-filters + (setq cider-stacktrace-filters + (if (memq flag cider-stacktrace-filters) + (remq flag cider-stacktrace-filters) + (cons flag cider-stacktrace-filters))))) + +(defun cider-stacktrace-toggle-java () + "Toggle display of Java stack frames." + (interactive) + (cider-stacktrace-toggle 'java)) + +(defun cider-stacktrace-toggle-clj () + "Toggle display of Clojure stack frames." + (interactive) + (cider-stacktrace-toggle 'clj)) + +(defun cider-stacktrace-toggle-repl () + "Toggle display of REPL stack frames." + (interactive) + (cider-stacktrace-toggle 'repl)) + +(defun cider-stacktrace-toggle-tooling () + "Toggle display of Tooling stack frames (compiler, nREPL middleware, etc)." + (interactive) + (cider-stacktrace-toggle 'tooling)) + +(defun cider-stacktrace-toggle-duplicates () + "Toggle display of stack frames that are duplicates of their descendents." + (interactive) + (cider-stacktrace-toggle 'dup)) + + +;; Text button functions + +(defun cider-stacktrace-filter (button) + "Apply filter(s) indicated by the BUTTON." + (with-temp-message "Filters may also be toggled with the keyboard." + (let ((flag (button-get button 'filter))) + (if flag + (cider-stacktrace-toggle flag) + (cider-stacktrace-toggle-all))) + (sit-for 5))) + +(defun cider-stacktrace-navigate (button) + "Navigate to the stack frame source represented by the BUTTON." + (let ((var (button-get button 'var)) + (class (button-get button 'class)) + (method (button-get button 'method)) + (line (button-get button 'line))) + (-if-let* ((info (if var + (cider-var-info var) + (cider-member-info class method))) + (file (cadr (assoc "file" info))) + (buffer (cider-find-file file))) + (cider-jump-to buffer line) + (message "No source info")))) + +(defun cider-stacktrace-jump () + "Like `cider-jump', but uses the stack frame source at point, if available." + (interactive) + (let ((button (button-at (point)))) + (if (and button (button-get button 'line)) + (cider-stacktrace-navigate button) + (call-interactively 'cider-jump)))) + + +;; Rendering + +(defun cider-stacktrace-emit-indented (text indent &optional fill) + "Insert TEXT, and INDENT and optionally FILL the entire block." + (let ((beg (point))) + (insert text) + (goto-char beg) + (while (not (eobp)) + (insert indent) + (forward-line)) + (when (and fill cider-stacktrace-fill-column) + (when (and (numberp cider-stacktrace-fill-column)) + (setq-local fill-column cider-stacktrace-fill-column)) + (setq-local fill-prefix indent) + (fill-region beg (point))))) + +(defun cider-stacktrace-render-filters (buffer filters) + "Emit into BUFFER toggle buttons for each of the FILTERS." + (with-current-buffer buffer + (insert " Show: ") + (dolist (filter filters) + (insert-text-button (first filter) + 'filter (second filter) + 'follow-link t + 'action 'cider-stacktrace-filter + 'help-echo (format "Toggle %s stack frames" + (first filter))) + (insert " ")) + (let ((hidden "(0 frames hidden)")) + (put-text-property 0 (length hidden) 'hidden-count t hidden) + (insert " " hidden)) + (newline))) + +(defun cider-stacktrace-render-frame (buffer frame) + "Emit into BUFFER function call site info for the stack FRAME. +This associates text properties to enable filtering and source navigation." + (with-current-buffer buffer + (nrepl-dbind-response frame (file line flags class method name var ns fn) + (let ((flags (mapcar 'intern flags))) ; strings -> symbols + (insert-text-button (format "%30s:%5d %s/%s" + (if (member 'repl flags) "REPL" file) line + (if (member 'clj flags) ns class) + (if (member 'clj flags) fn method)) + 'var var 'class class 'method method + 'name name 'line line 'flags flags + 'follow-link t + 'action 'cider-stacktrace-navigate + 'help-echo "View source at this location" + 'face 'cider-stacktrace-face) + (save-excursion + (let ((p4 (point)) + (p1 (search-backward " ")) + (p2 (search-forward "/")) + (p3 (search-forward-regexp "[^/$]+"))) + (put-text-property p1 p4 'face 'cider-stacktrace-ns-face) + (put-text-property p2 p3 'face 'cider-stacktrace-fn-face))) + (newline))))) + +(defun cider-stacktrace-render-cause (buffer cause num note) + "Emit into BUFFER the CAUSE NUM, exception class, message, data, and NOTE." + (with-current-buffer buffer + (nrepl-dbind-response cause (class message data stacktrace) + (let ((indent " ") + (class-face 'cider-stacktrace-error-class-face) + (message-face 'cider-stacktrace-error-message-face)) + (cider-propertize-region `(cause ,num) + ;; Detail level 0: exception class + (cider-propertize-region '(detail 0) + (insert (format "%d. " num) + (propertize note 'face 'font-lock-comment-face) " " + (propertize class 'face class-face)) + (newline)) + ;; Detail level 1: message + ex-data + (cider-propertize-region '(detail 1) + (cider-stacktrace-emit-indented + (propertize (or message "(No message)") 'face message-face) indent t) + (newline) + (when data + (cider-stacktrace-emit-indented + (cider-font-lock-as-clojure data) indent nil))) + ;; Detail level 2: stacktrace + (cider-propertize-region '(detail 2) + (newline) + (let ((beg (point)) + (bg `(:background ,cider-stacktrace-frames-background-color))) + (dolist (frame stacktrace) + (cider-stacktrace-render-frame buffer frame)) + (overlay-put (make-overlay beg (point)) 'face bg))) + ;; Add line break between causes, even when collapsed. + (cider-propertize-region '(detail 0) + (newline))))))) + +(defun cider-stacktrace-initialize (causes) + "Set and apply CAUSES initial visibility, filters, and cursor position." + ;; Partially display outermost cause if it's a compiler exception (the + ;; description reports reader location of the error). + (nrepl-dbind-response (first causes) (class) + (when (equal class "clojure.lang.Compiler$CompilerException") + (cider-stacktrace-cycle-cause (length causes) 1))) + ;; Fully display innermost cause. This also applies visibility/filters. + (cider-stacktrace-cycle-cause 1 cider-stacktrace-detail-max) + ;; Move point to first stacktrace frame in displayed cause. + (goto-char (point-min)) + (while (cider-stacktrace-next-cause)) + (goto-char (next-single-property-change (point) 'flags))) + +(defun cider-stacktrace-render (buffer causes) + "Emit into BUFFER useful stacktrace information for the CAUSES." + (with-current-buffer buffer + (cider-stacktrace-mode) + (let ((inhibit-read-only t)) + (newline) + ;; Stacktrace filters + (cider-stacktrace-render-filters + buffer + `(("Clojure" clj) ("Java" java) ("REPL" repl) + ("Tooling" tooling) ("Duplicates" dup) ("All" ,nil))) + (newline) + ;; Stacktrace exceptions & frames + (let ((num (length causes))) + (dolist (cause causes) + (let ((note (if (= num (length causes)) "Unhandled" "Caused by"))) + (cider-stacktrace-render-cause buffer cause num note) + (setq num (1- num)))))) + (cider-stacktrace-initialize causes) + (font-lock-refresh-defaults))) + +(provide 'cider-stacktrace) + +;;; cider-stacktrace.el ends here diff --git a/elpa/cider-0.7.0/cider-stacktrace.elc b/elpa/cider-0.7.0/cider-stacktrace.elc new file mode 100644 index 0000000000000000000000000000000000000000..c905d9c4d4ecacb845f77170503735eddb04471a GIT binary patch literal 20227 zcmc&+i(4C4cIV+Jn0!f-H1%$qKCXv2K+E8HN`RZz4#ruhwl|-Rv-=g;k3ky2*wT!w z8DX>i`oH&g&b@aY8VLl+Zkw9{-D#i!{8 z-VW1D1f32hn)hRGZ#vtxHaZE~h?7jTlQ;`dc$9U`Ej)?MN3V9DJ{9e=0K?8O$PMm3 zh&v)pL_3JZNho?rQ0YWXCKX{Y>_y>FWM?SoxUygDz%Tko1Nf!?mY0{;PA;<0Y$u&i z7>BN9;bY%DbZokyk5j&J%Qv3B@lmXaPwUX7YPOA!gO7`k_wC2BF&m|9l(JFEK`F<6 z{21RT=b)V9$@0{WgOX13+uKDwhgw$kT#M?t=wnhn*P(h=%Mb^{@ZBgHhN9gwd(nwF z8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r0w%=m2 QlaBM8!wjmQ)mUHtKR?LU(EtDd literal 0 HcmV?d00001 diff --git a/elpa/cider-0.7.0/cider-test.el b/elpa/cider-0.7.0/cider-test.el new file mode 100644 index 000000000..3a7552436 --- /dev/null +++ b/elpa/cider-0.7.0/cider-test.el @@ -0,0 +1,449 @@ +;;; cider-test.el --- Test result viewer -*- lexical-binding: t -*- + +;; Copyright © 2014 Jeff Valk + +;; Author: Jeff Valk + +;; 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 . + +;; This file is not part of GNU Emacs. + +;;; Commentary: + +;; This provides execution, reporting, and navigation support for Clojure tests, +;; specifically using the `clojure.test' machinery. This functionality replaces +;; the venerable `clojure-test-mode' (deprecated in June 2014), and relies on +;; nREPL middleware for report running and session support. + +;;; Code: + +(require 'cider-util) +(require 'cider-stacktrace) +(require 'button) +(require 'dash) +(require 'easymenu) + +;;; Variables + +(defgroup cider-test nil + "Presentation and navigation for test results." + :prefix "cider-test-" + :group 'cider) + +(defvar cider-test-last-test-ns nil + "The namespace for which tests were last run.") + +(defvar cider-test-last-results nil + "The results of the last run test.") + +(defconst cider-test-report-buffer "*cider-test-report*" + "Buffer name in which to display test reports.") + + +;;; Faces +;; These are as defined in clojure-test-mode. + +(defface cider-test-failure-face + '((((class color) (background light)) + :background "orange red") + (((class color) (background dark)) + :background "firebrick")) + "Face for failed tests." + :group 'cider-test + :package-version '(cider . "0.7.0")) + +(defface cider-test-error-face + '((((class color) (background light)) + :background "orange1") + (((class color) (background dark)) + :background "orange4")) + "Face for erring tests." + :group 'cider-test + :package-version '(cider . "0.7.0")) + +(defface cider-test-success-face + '((((class color) (background light)) + :foreground "black" + :background "green") + (((class color) (background dark)) + :foreground "black" + :background "green")) + "Face for passing tests." + :group 'cider-test + :package-version '(cider . "0.7.0")) + + +;;; Report mode & key bindings +;; The primary mode of interacting with test results is the report buffer, which +;; allows navigation among tests, jumping to test definitions, expected/actual +;; diff-ing, and cause/stacktrace inspection for test errors. + +(defvar cider-test-report-mode-map + (let ((map (make-sparse-keymap))) + (define-key map (kbd "C-c ,") 'cider-test-run-tests) + (define-key map (kbd "C-c C-,") 'cider-test-rerun-tests) + (define-key map (kbd "C-c M-,") 'cider-test-run-test) + (define-key map (kbd "M-p") 'cider-test-previous-result) + (define-key map (kbd "M-n") 'cider-test-next-result) + (define-key map (kbd "M-.") 'cider-test-jump) + (define-key map (kbd "t") 'cider-test-jump) + (define-key map (kbd "d") 'cider-test-ediff) + (define-key map (kbd "e") 'cider-test-stacktrace) + (define-key map "q" 'cider-popup-buffer-quit-function) + (define-key map (kbd "") 'backward-button) + (define-key map (kbd "TAB") 'forward-button) + (easy-menu-define cider-test-report-mode-menu map + "Menu for CIDER's test result mode" + '("Test-Report" + ["Previous result" cider-test-previous-result] + ["Next result" cider-test-next-result] + "--" + ["Rerun current test" cider-test-run-test] + ["Rerun failed/erring tests" cider-test-rerun-tests] + ["Rerun all tests" cider-test-run-tests] + "--" + ["Jump to test definition" cider-test-jump] + ["Display test error" cider-test-stacktrace] + ["Display expected/actual diff" cider-test-ediff])) + map)) + +(define-derived-mode cider-test-report-mode fundamental-mode "Test Report" + "Major mode for presenting Clojure test results. + +\\{cider-test-report-mode-map}" + (setq buffer-read-only t) + (setq-local truncate-lines t) + (setq-local electric-indent-chars nil)) + +;; Report navigation + +(defun cider-test-show-report () + "Show the test report buffer, if one exists." + (interactive) + (-if-let (report-buffer (get-buffer cider-test-report-buffer)) + (switch-to-buffer report-buffer) + (message "No test report buffer"))) + +(defun cider-test-previous-result () + "Move point to the previous test result, if one exists." + (interactive) + (with-current-buffer (get-buffer cider-test-report-buffer) + (-when-let (pos (previous-single-property-change (point) 'type)) + (goto-char pos)))) + +(defun cider-test-next-result () + "Move point to the next test result, if one exists." + (interactive) + (with-current-buffer (get-buffer cider-test-report-buffer) + (-when-let (pos (next-single-property-change (point) 'type)) + (goto-char pos)))) + +(defun cider-test-jump () + "Like `cider-jump', but uses the test at point's definition, if available." + (interactive) + (let ((ns (get-text-property (point) 'ns)) + (var (get-text-property (point) 'var)) + (line (get-text-property (point) 'line))) + (if (and ns var) + (cider-jump-to-var (concat ns "/" var) line) + (call-interactively 'cider-jump)))) + + +;;; Error stacktraces + +(defun cider-test-stacktrace-for (ns var index) + "Display stacktrace for the erring NS VAR test with the assertion INDEX." + (let (causes) + (nrepl-send-request + (list "op" "test-stacktrace" "session" (nrepl-current-session) + "ns" ns "var" var "index" index) + (lambda (response) + (nrepl-dbind-response response (class status) + (cond (class (setq causes (cons response causes))) + (status (when causes + (cider-stacktrace-render + (cider-popup-buffer cider-error-buffer + cider-auto-select-error-buffer) + (reverse causes)))))))))) + +(defun cider-test-stacktrace (&optional button) + "Display stacktrace for the erring test at point, optionally from BUTTON." + (interactive) + (let ((ns (get-text-property (point) 'ns)) + (var (get-text-property (point) 'var)) + (index (get-text-property (point) 'index)) + (err (get-text-property (point) 'error))) + (if (and err ns var index) + (cider-test-stacktrace-for ns var index) + (message "No test error at point")))) + + +;;; Expected vs actual diffing + +(defvar cider-test-ediff-buffers nil + "The expected/actual buffers used to display diff.") + +(defun cider-test-ediff () + "Show diff of the expected vs actual value for the test at point. +With the actual value, the outermost '(not ...)' s-expression is removed." + (interactive) + (let ((expected (get-text-property (point) 'expected)) + (actual (get-text-property (point) 'actual))) + (if (and expected actual) + (let ((expected-buffer (generate-new-buffer " *expected*")) + (actual-buffer (generate-new-buffer " *actual*"))) + (with-current-buffer expected-buffer + (insert expected) + (clojure-mode)) + (with-current-buffer actual-buffer + (insert actual) + (goto-char (point-min)) + (forward-char) + (forward-sexp) + (forward-whitespace 1) + (let ((beg (point))) + (forward-sexp) + (let ((actual* (buffer-substring beg (point)))) + (erase-buffer) + (insert actual*))) + (clojure-mode)) + (apply 'ediff-buffers + (setq cider-test-ediff-buffers + (list (buffer-name expected-buffer) + (buffer-name actual-buffer))))) + (message "No test failure at point")))) + +(defun cider-test-ediff-cleanup () + "Cleanup expected/actual buffers used for diff." + (interactive) + (mapc (lambda (b) (when (get-buffer b) (kill-buffer b))) + cider-test-ediff-buffers)) + +(add-hook 'ediff-cleanup-hook 'cider-test-ediff-cleanup) + + +;;; Report rendering + +(defun cider-test-type-face (type) + "Return the font lock face for the test result TYPE." + (pcase type + ("pass" 'cider-test-success-face) + ("fail" 'cider-test-failure-face) + ("error" 'cider-test-error-face) + (t 'default))) + +(defun cider-test-render-summary (buffer summary) + "Emit into BUFFER the report SUMMARY statistics." + (with-current-buffer buffer + (nrepl-dbind-response summary (var test pass fail error) + (insert (format "Ran %d tests, in %d test functions\n" test var)) + (unless (zerop fail) + (cider-insert (format "%d failures" fail) 'cider-test-failure-face t)) + (unless (zerop error) + (cider-insert (format "%d errors" error) 'cider-test-error-face t)) + (when (= pass test) + (cider-insert (format "%d passed" pass) 'cider-test-success-face t)) + (newline) + (newline)))) + +(defun cider-test-render-assertion (buffer test) + "Emit into BUFFER report detail for the TEST assertion." + (with-current-buffer buffer + (nrepl-dbind-response test (var context type message expected actual error) + (cider-propertize-region (cider--dict-to-plist test) + (cider-insert (capitalize type) (cider-test-type-face type) nil " in ") + (cider-insert var 'font-lock-function-name-face t) + (when context (cider-insert context 'font-lock-doc-face t)) + (when message (cider-insert message 'font-lock-doc-string-face t)) + (when expected (cider-insert "expected: " 'font-lock-comment-face nil + (cider-font-lock-as-clojure expected))) + (when actual (cider-insert " actual: " 'font-lock-comment-face) + (if error + (progn (insert-text-button + error + 'follow-link t + 'action 'cider-test-stacktrace + 'help-echo "View causes and stacktrace") + (newline)) + (insert (cider-font-lock-as-clojure actual))))) + (newline)))) + +(defun cider-test-render-report (buffer ns summary results) + "Emit into BUFFER the report for the NS, SUMMARY, and test RESULTS." + (with-current-buffer buffer + (let ((inhibit-read-only t)) + (cider-test-report-mode) + (cider-insert "Test Summary" 'bold t) + (cider-insert ns 'font-lock-function-name-face t "\n") + (cider-test-render-summary buffer summary) + (nrepl-dbind-response summary (fail error) + (unless (zerop (+ fail error)) + (cider-insert "Results" 'bold t "\n") + (dolist (result (rest results)) + (let ((var (first result)) + (tests (rest result))) + (dolist (test tests) + (nrepl-dbind-response test (type) + (unless (equal "pass" type) + (cider-test-render-assertion buffer test)))))))) + (goto-char (point-min)) + (current-buffer)))) + + +;;; Summary echo + +(defun cider-test-echo-summary (summary) + "Echo SUMMARY statistics for a test run." + (nrepl-dbind-response summary (test fail error) + (message + (propertize + (format "Ran %s tests. %s failures, %s errors." test fail error) + 'face (cond ((not (zerop error)) 'cider-test-error-face) + ((not (zerop fail)) 'cider-test-failure-face) + (t 'cider-test-success-face)))))) + + +;;; Test definition highlighting +;; On receipt of test results, failing/erring test definitions are highlighted. +;; Highlights are cleared on the next report run, and may be cleared manually +;; by the user. + +;; NOTE If keybindings specific to test sources are desired, it would be +;; straightforward to turn this into a `cider-test-mode' minor mode, which we +;; enable on test sources, much like the legacy `clojure-test-mode'. At present, +;; though, there doesn't seem to be much value in this, since the report buffer +;; provides the primary means of interacting with test results. + +(defun cider-test-highlight-problem (buffer test) + "Highlight the BUFFER test definition for the non-passing TEST." + (with-current-buffer buffer + (nrepl-dbind-response test (type line message expected actual) + (save-excursion + (goto-line line) + (forward-whitespace 1) + (forward-char) + (let ((beg (point))) + (forward-sexp) + (let ((overlay (make-overlay beg (point)))) + (overlay-put overlay 'face (cider-test-type-face type)) + (overlay-put overlay 'type type) + (overlay-put overlay 'help-echo message) + (overlay-put overlay 'message message) + (overlay-put overlay 'expected expected) + (overlay-put overlay 'actual actual))))))) + +(defun cider-test-highlight-problems (ns results) + "Highlight all non-passing tests in the NS test RESULTS." + (dolist (result (rest results)) + (-when-let* ((var (first result)) + (tests (rest result)) + (buffer (cider-find-var (concat ns "/" var)))) + (dolist (test tests) + (nrepl-dbind-response test (type) + (unless (equal "pass" type) + (cider-test-highlight-problem buffer test))))))) + +(defun cider-test-clear-highlights () + "Clear highlighting of non-passing tests from the last test run." + (interactive) + (-when-let (ns cider-test-last-test-ns) + (dolist (result (rest cider-test-last-results)) + (-when-let* ((var (first result)) + (buffer (cider-find-var (concat ns "/" var)))) + (with-current-buffer buffer + (remove-overlays)))))) + + +;;; Test namespaces +;; Test namespace inference exists to enable DWIM test running functions: the +;; same "run-tests" function should be able to be used in a source file, and in +;; its corresponding test namespace. To provide this, we need to map the +;; relationship between those namespaces. + +(defvar cider-test-infer-test-ns 'cider-test-default-test-ns-fn + "Function to infer the test namespace for NS. +The default implementation uses the simple Leiningen convention of appending +'-test' to the namespace name.") + +(defun cider-test-default-test-ns-fn (ns) + "For a NS, return the test namespace, which may be the argument itself. +This uses the Leiningen convention of appending '-test' to the namespace name." + (when ns + (let ((suffix "-test")) + ;; string-suffix-p is only available in Emacs 24.4+ + (if (string-match (rx-to-string `(: ,suffix eos) t) ns) + ns + (concat ns suffix))))) + + +;;; Test execution + +(defun cider-test-execute (ns &optional retest tests) + "Run tests for NS; optionally RETEST failures or run only specified TESTS. +Upon test completion, results are echoed and a test report is optionally +displayed. When test failures/errors occur, their sources are highlighted." + (cider-test-clear-highlights) + (message "Testing...") + (nrepl-send-request + (list "ns" ns "op" (if retest "retest" "test") + "tests" tests "session" (nrepl-current-session)) + (lambda (response) + (nrepl-dbind-response response (summary results status) + (cond ((member "namespace-not-found" status) + (message "No tests namespace: %s" ns)) + (results + (progn + (setq cider-test-last-test-ns ns) + (setq cider-test-last-results results) + (cider-test-highlight-problems ns results) + (cider-test-echo-summary summary) + (cider-test-render-report + (cider-popup-buffer cider-test-report-buffer t) + ns summary results)))))))) + +(defun cider-test-rerun-tests () + "Rerun failed and erring tests from the last tested namespace." + (interactive) + (-if-let (ns cider-test-last-test-ns) + (cider-test-execute ns t) + (message "No namespace to retest"))) + +(defun cider-test-run-tests () + "Run all tests for the current Clojure source or test report context." + (interactive) + (-if-let (ns (or (funcall cider-test-infer-test-ns (clojure-find-ns)) + (when (eq major-mode 'cider-test-report-mode) + cider-test-last-test-ns))) + (cider-test-execute ns nil) + (message "No namespace to test in current context"))) + +(defun cider-test-run-test () + "Run the test at point. +The test ns/var exist as text properties on report items and on highlighted +failed/erred test definitions. When not found, a test definition at point +is searched." + (interactive) + (let ((ns (get-text-property (point) 'ns)) + (var (get-text-property (point) 'var))) + (if (and ns var) + (cider-test-execute ns nil (list var)) + (let ((ns (clojure-find-ns)) + (def (clojure-find-def))) + (if (and ns (member (first def) '("deftest" "defspec"))) + (cider-test-execute ns nil (rest def)) + (message "No test at point")))))) + +(provide 'cider-test) + +;;; cider-test.el ends here diff --git a/elpa/cider-0.7.0/cider-test.elc b/elpa/cider-0.7.0/cider-test.elc new file mode 100644 index 0000000000000000000000000000000000000000..850ea458720ee408543f9b7628453121d40576cb GIT binary patch literal 15593 zcmc&*33J;5&j+IJwu1aR6wszZ45=&Ww#zj(cD!Y~)r6xPECS%ESl%*;|Bq$*! z2?hXVYo_+U@Atj#Ceb>bab{Olq=4>5qx-$@-OVqyzkTxY!otGJ7him#o)n`=KFs>+ z@KlY``Vl^r|1|AAE{a#JVbM#6su-)?v{qZwBc(P~*nQaEd>Cx1C!PF; zw?gTAo!7@I9by%eIv?eKOKS|MS}W4Icbr%H&C@EYRR46Gj`E)B7rm-3^YKx2AH8K& ztF+(87H97XH(Sx>xjFg;<`@^X>J{TU#o%c@@Hfyh_P2JQeDjU!9j9g5tFg%Y^7?e# zS5={U=~x|RYFMPsOUz~}m8In{&q`GvV_+2P_k#BC^v4Cf>)*=C%G%*+o%y|@pDAxY z4g!3_yZced3x1;JP29Xmnm28G)4?;{{g}^(AwCg4F+K@C?ayxSM?u$9FUstPXO z)lXDQZA9I5z9MeRE6n0lF#u@hQ_5?unAbiwpLa9r$h=8cJ)RB*03laTK``qsR6nmK z!}QcrWm1%&ie5Y90DEbWrOepvAL^;R&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7.0/cider-util.el b/elpa/cider-0.7.0/cider-util.el new file mode 100644 index 000000000..3f7f36d58 --- /dev/null +++ b/elpa/cider-0.7.0/cider-util.el @@ -0,0 +1,194 @@ +;;; cider-util.el --- Common utility functions that don't belong anywhere else -*- lexical-binding: t -*- + +;; Copyright © 2012-2014 Tim King, Phil Hagelberg +;; Copyright © 2013-2014 Bozhidar Batsov, Hugo Duncan, Steve Purcell +;; +;; Author: Tim King +;; Phil Hagelberg +;; Bozhidar Batsov +;; Hugo Duncan +;; Steve Purcell + +;; 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 . + +;; This file is not part of GNU Emacs. + +;;; Commentary: + +;; Common utility functions that don't belong anywhere else + +;;; Code: + +(require 'dash) +(require 'cl-lib) + +;;; Compatibility +(eval-and-compile + ;; `defvar-local' for Emacs 24.2 and below + (unless (fboundp 'defvar-local) + (defmacro defvar-local (var val &optional docstring) + "Define VAR as a buffer-local variable with default value VAL. +Like `defvar' but additionally marks the variable as being automatically +buffer-local wherever it is set." + (declare (debug defvar) (doc-string 3)) + `(progn + (defvar ,var ,val ,docstring) + (make-variable-buffer-local ',var)))) + + ;; `setq-local' for Emacs 24.2 and below + (unless (fboundp 'setq-local) + (defmacro setq-local (var val) + "Set variable VAR to value VAL in current buffer." + `(set (make-local-variable ',var) ,val)))) + +(defun cider-util--hash-keys (hashtable) + "Return a list of keys in HASHTABLE." + (let ((keys '())) + (maphash (lambda (k _v) (setq keys (cons k keys))) hashtable) + keys)) + +(defun cider-util--clojure-buffers () + "Return a list of all existing `clojure-mode' buffers." + (-filter + (lambda (buffer) (with-current-buffer buffer (derived-mode-p 'clojure-mode))) + (buffer-list))) + +;;; Text properties + +(defmacro cider-propertize-region (props &rest body) + "Execute BODY and add PROPS to all the text it inserts. +More precisely, PROPS are added to the region between the point's +positions before and after executing BODY." + (let ((start (cl-gensym))) + `(let ((,start (point))) + (prog1 (progn ,@body) + (add-text-properties ,start (point) ,props))))) + +(put 'cider-propertize-region 'lisp-indent-function 1) + +(defun cider-property-bounds (prop) + "Return the the positions of the previous and next change to PROP. +PROP is the name of a text property." + (assert (get-text-property (point) prop)) + (let ((end (next-single-char-property-change (point) prop))) + (list (previous-single-char-property-change end prop) end))) + +(defun cider-insert (text &optional face break more-text) + "Insert TEXT with FACE, optionally followed by a line BREAK and MORE-TEXT." + (insert (if face (propertize text 'face face) text)) + (when more-text (insert more-text)) + (when break (insert "\n"))) + +;;; Font lock + +(defun cider-font-lock-as (mode string) + "Use MODE to font-lock the STRING." + (with-temp-buffer + (insert string) + ;; suppress major mode hooks as we care only about their font-locking + ;; otherwise modes like whitespace-mode and paredit might interfere + (let ((delay-mode-hooks t) + (delayed-mode-hooks nil)) + (funcall mode)) + (font-lock-fontify-buffer) + (buffer-string))) + +(defun cider-font-lock-region-as (mode beg end &optional buffer) + "Use MODE to font-lock text between BEG and END. + +Unless you specify a BUFFER it will default to the current one." + (with-current-buffer (or buffer (current-buffer)) + (let ((text (buffer-substring beg end))) + (delete-region beg end) + (goto-char beg) + (insert (cider-font-lock-as mode text))))) + +(defun cider-font-lock-as-clojure (string) + "Font-lock STRING as Clojure code." + (cider-font-lock-as 'clojure-mode string)) + +;; More efficient way to fontify a region, without having to delete it +;; Unfortunately still needs work, since the font-locking code in clojure-mode +;; is pretty convoluted +(defun cider-fontify-region + (beg end keywords syntax-table syntactic-keywords syntax-propertize-fn) + "Fontify a region between BEG and END using another mode's fontification. + +KEYWORDS, SYNTAX-TABLE, SYNTACTIC-KEYWORDS and +SYNTAX-PROPERTIZE-FN are the values of that mode's +`font-lock-keywords', `font-lock-syntax-table', +`font-lock-syntactic-keywords', and `syntax-propertize-function' +respectively." + (save-excursion + (save-match-data + (let ((font-lock-keywords keywords) + (font-lock-syntax-table syntax-table) + (font-lock-syntactic-keywords syntactic-keywords) + (syntax-propertize-function syntax-propertize-fn) + (font-lock-multiline 'undecided) + (font-lock-dont-widen t) + font-lock-keywords-only + font-lock-extend-region-functions + font-lock-keywords-case-fold-search) + (save-restriction + (narrow-to-region (1- beg) end) + ;; font-lock-fontify-region apparently isn't inclusive, + ;; so we have to move the beginning back one char + (font-lock-fontify-region (1- beg) end)))))) + +(defun cider-fontify-region-as-clojure (beg end) + "Use Clojure's font-lock variables to fontify the region between BEG and END." + (cider-fontify-region beg end + clojure-font-lock-keywords + clojure-mode-syntax-table + nil + nil)) + +;;; Colors + +(defun cider-scale-color (color scale) + "For a COLOR hex string or name, adjust intensity of RGB components by SCALE." + (let* ((rgb (color-values color)) + (scaled-rgb (mapcar (lambda (n) + (format "%04x" (round (+ n (* scale 65535))))) + rgb))) + (apply 'concat "#" scaled-rgb))) + +(defun cider-scale-background-color () + "Scale the current background color to get a slighted muted version." + (let ((color (frame-parameter nil 'background-color)) + (dark (eq (frame-parameter nil 'background-mode) 'dark))) + (cider-scale-color color (if dark 0.05 -0.05)))) + +(defun cider-format-pprint-eval (form) + "Return a string of Clojure code that will eval and pretty-print FORM." + (format "(let [x %s] (clojure.pprint/pprint x) x)" form)) + +(autoload 'pkg-info-version-info "pkg-info.el") + +(defun cider--version () + "Retrieve CIDER's version." + (condition-case nil + (pkg-info-version-info 'cider) + (error cider-version))) + +;;; Strings + +(defun cider-string-join (strings &optional separator) + "Join all STRINGS using SEPARATOR." + (mapconcat 'identity strings separator)) + +(provide 'cider-util) + +;;; cider-util.el ends here diff --git a/elpa/cider-0.7.0/cider-util.elc b/elpa/cider-0.7.0/cider-util.elc new file mode 100644 index 0000000000000000000000000000000000000000..0dd5e39443d88842bc7c775ea1bd751fdef16984 GIT binary patch literal 6353 zcmbtY{d3#K5tSvIj@ij?Nt(22x~6K2@(45l5~O5LW-O7EqsF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4ywvF$Q#rtpW=i)d*m@~l z$eB>*n)KZTJwh5&*M8bi7M`jAAV8i#IBj+FQRmw+zKEr@>FF5t<|sDwJ*<48 zTHcJi=Ncj|jG;uS?(iM2}Zg(7Py)puLxGP^$Ihty!+# z&X%dwyS+t!$2Eq$9#J{qQ0H00{@d-r_QC!@A9w!iqQ)zF+{6NXd-w|*XI +;; Phil Hagelberg +;; Bozhidar Batsov +;; Hugo Duncan +;; Steve Purcell +;; URL: http://www.github.com/clojure-emacs/cider +;; Version: 0.7.0 +;; Package-Requires: ((clojure-mode "2.0.0") (cl-lib "0.3") (dash "2.4.1") (pkg-info "0.4") (emacs "24")) +;; Keywords: languages, clojure, cider + +;; 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 . + +;; This file is not part of GNU Emacs. + +;;; Commentary: + +;; Provides a Clojure IDE and REPL for Emacs, built on top of nREPL. + +;;; Installation: + +;; Available as a package in marmalade-repo.org and melpa.milkbox.net. + +;; (add-to-list 'package-archives +;; '("marmalade" . "http://marmalade-repo.org/packages/")) +;; +;; or +;; +;; (add-to-list 'package-archives +;; '("melpa" . "http://melpa.milkbox.net/packages/") t) +;; +;; M-x package-install cider + +;;; Usage: + +;; M-x cider-jack-in + +;;; Code: + +(defgroup cider nil + "Clojure Integrated Development Environment and REPL." + :prefix "cider-" + :group 'applications + :link '(url-link :tag "Github" "https://github.com/clojure-emacs/cider") + :link '(emacs-commentary-link :tag "Commentary" "cider")) + +(require 'cider-client) +(require 'cider-interaction) +(require 'cider-eldoc) +(require 'cider-repl) +(require 'cider-mode) +(require 'cider-util) + +(defvar cider-version "0.7.0" + "Fallback version used when it cannot be extracted automatically. +Normally it won't be used, unless `pkg-info' fails to extract the +version from the CIDER package or library.") + +(defcustom cider-lein-command + "lein" + "The command used to execute Leiningen 2.x." + :type 'string + :group 'cider) + +(defcustom cider-lein-parameters + "repl :headless" + "Params passed to lein to start an nREPL server via `cider-jack-in'." + :type 'string + :group 'cider) + +(defcustom cider-known-endpoints nil + "Specify a list of custom endpoints where each endpoint is a list. +For example: '((\"label\" \"host\" \"port\")). +The label is optional so that '(\"host\" \"port\") will suffice. +This variable is used by `cider-connect'." + :type 'list + :group 'cider) + +;; TODO: Implement a check for `cider-lein-command' over tramp +(defun cider--lein-present-p () + "Check if `cider-lein-command' is on the `exec-path'. + +In case `default-directory' is non-local we assume the command is available." + (or (file-remote-p default-directory) + (executable-find cider-lein-command) + (executable-find (concat cider-lein-command ".bat")))) + +;;;###autoload +(defun cider-version () + "Display CIDER's version." + (interactive) + (message "CIDER %s" (cider--version))) + +;;;###autoload +(defun cider-jack-in (&optional prompt-project) + "Start a nREPL server for the current project and connect to it. +If PROMPT-PROJECT is t, then prompt for the project for which to +start the server." + (interactive "P") + (setq cider-current-clojure-buffer (current-buffer)) + (if (cider--lein-present-p) + (let* ((project (when prompt-project + (read-directory-name "Project: "))) + (project-dir (nrepl-project-directory-for + (or project (nrepl-current-dir)))) + (server-command (if prompt-project + (read-string (format "Server command: %s " cider-lein-command) cider-lein-parameters) + cider-lein-parameters))) + (when (nrepl-check-for-repl-buffer nil project-dir) + (let* ((nrepl-project-dir project-dir) + (cmd (format "%s %s" cider-lein-command cider-lein-parameters)) + (default-directory (or project-dir default-directory)) + (nrepl-buffer-name (generate-new-buffer-name + (nrepl-server-buffer-name))) + (process + (progn + ;; the buffer has to be created before the proc: + (get-buffer-create nrepl-buffer-name) + (start-file-process-shell-command + "nrepl-server" + nrepl-buffer-name + cmd)))) + (set-process-filter process 'nrepl-server-filter) + (set-process-sentinel process 'nrepl-server-sentinel) + (set-process-coding-system process 'utf-8-unix 'utf-8-unix) + (with-current-buffer (process-buffer process) + (setq nrepl-project-dir project-dir)) + (message "Starting nREPL server via %s..." + (propertize cmd 'face 'font-lock-keyword-face))))) + (message "The %s executable (specified by `cider-lein-command') isn't on your exec-path" cider-lein-command))) + +(defun cider-known-endpoint-candidates () + "Known endpoint candidates for establishing an nREPL connection. +A default will be included consisting of `nrepl-default-host' and +`nrepl-default-port'." + (-distinct + (mapcar (lambda (endpoint) + (cider-string-join endpoint " ")) + (cons (list (nrepl-current-host) (nrepl-default-port)) + cider-known-endpoints)))) + +(defun cider-select-known-endpoint () + "Select an endpoint from known endpoints. +The returned endpoint has the label removed." + (let ((selected-endpoint (split-string + (completing-read + "Host: " (cider-known-endpoint-candidates))))) + (if (= 3 (length selected-endpoint)) + (cdr selected-endpoint) + selected-endpoint))) + +;;;###autoload +(defun cider-connect (host port) + "Connect to an nREPL server identified by HOST and PORT." + (interactive (let ((known-endpoint (when cider-known-endpoints + (cider-select-known-endpoint)))) + (list (or (car known-endpoint) + (read-string "Host: " (nrepl-current-host) nil (nrepl-current-host))) + (string-to-number (let ((port (or (cadr known-endpoint) (nrepl-default-port)))) + (read-string "Port: " port nil port)))))) + (setq cider-current-clojure-buffer (current-buffer)) + (when (nrepl-check-for-repl-buffer `(,host ,port) nil) + (nrepl-connect host port))) + +(define-obsolete-function-alias + 'cider + 'cider-connect) + +;;;###autoload +(eval-after-load 'clojure-mode + '(progn + (define-key clojure-mode-map (kbd "C-c M-j") 'cider-jack-in) + (define-key clojure-mode-map (kbd "C-c M-c") 'cider-connect))) + +(provide 'cider) + +;;; cider.el ends here diff --git a/elpa/cider-0.7.0/cider.elc b/elpa/cider-0.7.0/cider.elc new file mode 100644 index 0000000000000000000000000000000000000000..76262b706c8e599a0e37684c3c312f0053af9d78 GIT binary patch literal 5173 zcmbtY{cqdI5w(43o2WqB!?idREpQV$iKQZ>MN%KO^GkBJ@6K&LjM(>66d)^dWzi;= zJbu{L{q=pbOG;Gipasr=tlj18a(3sr zK85{81mCCWl@q6dh$&TcCQ5o$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hZXK;I{#n6h`*REs8xl3P4md|rA2Z^te-A4Hgu$~%B9gszLRyM3) zGfvF2#&>?JUab}uSfG3$>&(!4ouCKwv{)`1Fjw(X$XNJa?^@S*u;OHaXrc5$E-QIc zKQ}&_cNh3@?4}9 zt6(h}Ec#0p9gIdjpvE%HHQcBFuuiYE6y;?Yg@^_2YAmIQ$P}_Q=Upx3za}qerPF!U z;MeFP>e5IBamBYQm=#bwo(d`dWJ1@VoyB;Esj&0e0~Tl2xi2WwdR<|+{B5{>?M_6R z#Eu?*Kd~Bdy1za_X0fZFRG12v8n06Cb(&>^MFYm`x4a+k_2ZwfUT+W==kl? z>ARD+=UncsXCCjm9%>GP_xq8CwaodW@yN*BzE5W|HhQs&kFLn|87#+e!9EA?=d!GF zg=24uC7MIeSrJTq!%BNC!!Ms~q2Fe&AMjH7!N059CRCF-+5HiNgP)l)ztIx$3Qg~? zjau*p5jq`}cFi*&7Sv@72(XBN#{Y!lVCuRrB<;}pe7xo=G3f8@nFAX8_$_3qqDyd^ z)F+TN5`9)D%unym&b98IzI%UOYoi|H{(WND==1i6p^M0BF?6@K_=4hTBn}z&wRQ1-h$9~Up5N_3n_c%M`Xiiv>o)+#JZtoj zp5Xr&vg*2jfAzA*mfyh=KLr_c*WF^%2Tve;P}w6G=u5p8x^)~BbX!O1ewei7WEs}` zu#aB_>eMMyTUE()$=U6M07W4!01a?gpTpfg0{Fa!My>G}OF$2DA+XH&NEt`7Y@FLJ?nxp)gG8 wYtL;E3w5ui!2O{e&>Q;_za`Z5c3pcR)c^0~U^TgRx7TBRxkm7iExpcv0e41OwEzGB literal 0 HcmV?d00001 diff --git a/elpa/cider-0.7.0/nrepl-client.el b/elpa/cider-0.7.0/nrepl-client.el new file mode 100644 index 000000000..5154a81d6 --- /dev/null +++ b/elpa/cider-0.7.0/nrepl-client.el @@ -0,0 +1,993 @@ +;;; nrepl-client.el --- Client for Clojure nREPL -*- lexical-binding: t -*- + +;; Copyright © 2012-2014 Tim King, Phil Hagelberg +;; Copyright © 2013-2014 Bozhidar Batsov, Hugo Duncan, Steve Purcell +;; +;; Author: Tim King +;; Phil Hagelberg +;; Bozhidar Batsov +;; Hugo Duncan +;; Steve Purcell + +;; 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 . + +;; This file is not part of GNU Emacs. + +;;; Commentary: + +;; Provides an Emacs Lisp client to connect to Clojure nREPL servers. + +;;; Code: +(require 'clojure-mode) +(require 'dash) +(require 'thingatpt) +(require 'etags) +(require 'ansi-color) +(require 'ewoc) +(require 'cl-lib) +(require 'cider-util) + + +(defgroup nrepl nil + "Interaction with the Clojure nREPL Server." + :prefix "nrepl-" + :group 'applications) + +(defcustom nrepl-buffer-name-separator " " + "Used in constructing the REPL buffer name. +The `nrepl-buffer-name-separator' separates cider-repl from the project name." + :type '(string) + :group 'nrepl) + +(defcustom nrepl-buffer-name-show-port nil + "Show the connection port in the nrepl REPL buffer name, if set to t." + :type 'boolean + :group 'nrepl) + +(defcustom nrepl-connected-hook nil + "List of functions to call when connecting to the nREPL server." + :type 'hook + :group 'nrepl) + +(defcustom nrepl-disconnected-hook nil + "List of functions to call when disconnected from the nREPL server." + :type 'hook + :group 'nrepl) + +(defcustom nrepl-file-loaded-hook nil + "List of functions to call when a load file has completed." + :type 'hook + :group 'nrepl) + +(defcustom nrepl-host "127.0.0.1" + "The default hostname (or IP address) to connect to." + :type 'string + :group 'nrepl) + +(defcustom nrepl-port nil + "The default port to connect to." + :type 'string + :group 'nrepl) + +(defcustom nrepl-sync-request-timeout 10 + "The number of seconds to wait for a sync response. +Setting this to nil disables the timeout functionality." + :type 'integer + :group 'nrepl) + +(defcustom nrepl-connection-endpoint + 'nrepl-connection-ssh-tunnel + "A function that is called to determine command that will be run +once an nrepl server process is running. Used to set up an ssh tunnel +on remote connections. + +The arguments are dir and port. The return value +should be an `plist` of the form +(:proc-buffer-name \"*buf*\" :hostname \"hostname\" :port 1234)" + :type 'function + :group 'nrepl) + +(defvar-local nrepl-connection-buffer nil) +(defvar-local nrepl-server-buffer nil) +(defvar-local nrepl-repl-buffer nil) +(defvar-local nrepl-endpoint nil) +(defvar-local nrepl-project-dir nil) +(defvar-local nrepl-on-connection-buffer nil) + +(defconst nrepl-repl-buffer-name-template "*cider-repl%s*") +(defconst nrepl-connection-buffer-name-template "*nrepl-connection%s*") +(defconst nrepl-server-buffer-name-template "*nrepl-server%s*") +(defconst nrepl-on-connection-buffer-name-template "*nrepl-on-connection%s*") + +(defcustom nrepl-hide-special-buffers nil + "Control the display of some special buffers in buffer switching commands. +When true some special buffers like the connection and the server +buffer will be hidden.") + +(defun nrepl-apply-hide-special-buffers (buffer-name) + "Apply a prefix to BUFFER-NAME that will hide the buffer." + (concat (if nrepl-hide-special-buffers " " "") buffer-name)) + +(defun nrepl-format-buffer-name-template (buffer-name-template designation) + "Apply the DESIGNATION to the corresponding BUFFER-NAME-TEMPLATE." + (format buffer-name-template + (if (> (length designation) 0) + (concat nrepl-buffer-name-separator designation) + ""))) + +(defun nrepl-buffer-name (buffer-name-template) + "Generate a buffer name using BUFFER-NAME-TEMPLATE. + +The name will include the project name if available or the +endpoint host if it is not. The name will also include the +connection port if `nrepl-buffer-name-show-port' is true." + (generate-new-buffer-name + (let ((project-name (nrepl--project-name nrepl-project-dir)) + (nrepl-proj-port (cadr nrepl-endpoint))) + (nrepl-format-buffer-name-template + buffer-name-template + (concat (if project-name project-name (car nrepl-endpoint)) + (if (and nrepl-proj-port nrepl-buffer-name-show-port) + (format ":%s" nrepl-proj-port) "")))))) + +(defun nrepl-connection-buffer-name () + "Return the name of the connection buffer." + (nrepl-apply-hide-special-buffers + (nrepl-buffer-name nrepl-connection-buffer-name-template))) + +(defun nrepl-server-buffer-name () + "Return the name of the server buffer." + (nrepl-apply-hide-special-buffers + (nrepl-buffer-name nrepl-server-buffer-name-template))) + +(defun nrepl-on-connection-buffer-name () + "Return the name of the on-connection buffer." + (nrepl-apply-hide-special-buffers + (nrepl-buffer-name nrepl-on-connection-buffer-name-template))) + +;; buffer local declarations +(defvar-local nrepl-session nil + "Current nREPL session id.") + +(defvar-local nrepl-tooling-session nil + "Current nREPL tooling session id. +To be used for tooling calls (i.e. completion, eldoc, etc)") + +(defvar-local nrepl-request-counter 0 + "Continuation serial number counter.") + +(defvar-local nrepl-pending-requests (make-hash-table :test 'equal)) + +(defvar-local nrepl-completed-requests (make-hash-table :test 'equal)) + +(defvar-local nrepl-buffer-ns "user" + "Current Clojure namespace of this buffer.") + +(defvar-local nrepl-sync-response nil + "Result of the last sync request.") + +(defvar-local nrepl-sync-request-start-time nil + "The time when the last sync request was initiated.") + +(defvar nrepl-err-handler 'cider-default-err-handler + "Evaluation error handler.") + +(defvar-local nrepl-ops nil + "Available nREPL server ops (from describe).") + +;;; Bencode +;;; Adapted from http://www.emacswiki.org/emacs-en/bencode.el +;;; and modified to work with utf-8 +(defun nrepl-bdecode-buffer () + "Decode a bencoded string in the current buffer starting at point." + (cond ((looking-at "i\\(-?[0-9]+\\)e") + (goto-char (match-end 0)) + (string-to-number (match-string 1))) + ((looking-at "\\([0-9]+\\):") + (goto-char (match-end 0)) + (let ((start (point)) + (end (byte-to-position (+ (position-bytes (point)) + (string-to-number (match-string 1)))))) + (goto-char end) + (buffer-substring start end))) + ((looking-at "l") + (goto-char (match-end 0)) + (let (result item) + ;; check for the end sentinel, setq returns the value + (while (not (eq :end (setq item (nrepl-bdecode-buffer)))) + (setq result (cons item result))) + (nreverse result))) + ((looking-at "d") + (goto-char (match-end 0)) + (let (dict key item) + ;; check for the end sentinel, setq returns the value + (while (not (eq :end (setq item (nrepl-bdecode-buffer)))) + (if key + (setq dict (cons (cons key item) dict) + key nil) + (unless (stringp item) + (error "Dictionary keys have to be strings: %s" item)) + (setq key item))) + (cons 'dict (nreverse dict)))) + ((looking-at "e") + (goto-char (match-end 0)) + ;; This line used to return nil and checks above checked for + ;; falsiness to indicate the end of a list/dict, but that + ;; meant that nil/() was unable to pass through without + ;; shorting the algorithm. Now we return an :end keyword + ;; as a sentinel value and check for equality. + :end) + (t + (error "Cannot decode message: %s" (buffer-substring (point-min) (point-max)))))) + +(defun nrepl-decode (str) + "Decode bencoded STR." + (with-temp-buffer + (save-excursion + (insert str)) + (let ((result '())) + (while (not (eobp)) + (setq result (cons (nrepl-bdecode-buffer) result))) + (nreverse result)))) + +(defun nrepl-netstring (val) + "Encode VAL in bencode." + (cond + ((integerp val) (format "i%de" val)) + ((listp val) (format "l%se" (apply 'concat (-map 'nrepl-netstring val)))) + (t (format "%s:%s" (string-bytes val) val)))) + +(defun nrepl-bencode (message) + "Encode with bencode MESSAGE." + (concat "d" (apply 'concat (mapcar 'nrepl-netstring message)) "e")) + +;;; Response handlers +(defmacro nrepl-dbind-response (response keys &rest body) + "Destructure an nREPL RESPONSE dict. +Bind the value of the provided KEYS and execute BODY." + `(let ,(loop for key in keys + collect `(,key (cdr (assoc ,(format "%s" key) ,response)))) + ,@body)) + +(put 'nrepl-dbind-response 'lisp-indent-function 2) + +(defun nrepl-make-response-handler + (buffer value-handler stdout-handler stderr-handler done-handler + &optional eval-error-handler) + "Make a response handler for BUFFER. +Uses the specified VALUE-HANDLER, STDOUT-HANDLER, STDERR-HANDLER, +DONE-HANDLER, and EVAL-ERROR-HANDLER as appropriate." + (lambda (response) + (nrepl-dbind-response response (value ns out err status id ex root-ex + session) + (cond (value + (with-current-buffer buffer + (when ns (setq nrepl-buffer-ns ns))) + (when value-handler + (funcall value-handler buffer value))) + (out + (when stdout-handler + (funcall stdout-handler buffer out))) + (err + (when stderr-handler + (funcall stderr-handler buffer err))) + (status + (when (member "interrupted" status) + (message "Evaluation interrupted.")) + (when (member "eval-error" status) + (funcall (or eval-error-handler nrepl-err-handler) + buffer ex root-ex session)) + (when (member "namespace-not-found" status) + (message "Namespace not found.")) + (when (member "need-input" status) + (cider-need-input buffer)) + (when (member "done" status) + (puthash id (gethash id nrepl-pending-requests) nrepl-completed-requests) + (remhash id nrepl-pending-requests) + (when done-handler + (funcall done-handler buffer)))))))) + +;;; communication +(defun nrepl-default-handler () + "Default handler which is invoked when no handler is found. +Handles message contained in RESPONSE." + (nrepl-make-response-handler (cider-current-repl-buffer) + '() + (lambda (buffer out) + (cider-repl-emit-output buffer out)) + (lambda (buffer err) + (cider-repl-emit-err-output buffer err)) + '())) + +(defun nrepl-dispatch (response) + "Dispatch the RESPONSE to associated callback. + +First we check the list of pending requests for the callback to invoke +and afterwards we check the completed requests as well, since responses +could be received even for requests with status \"done\"." + (nrepl-log-message response) + (nrepl-dbind-response response (id) + (let ((callback (or (gethash id nrepl-pending-requests) + (gethash id nrepl-completed-requests)))) + (if callback + (funcall callback response) + (funcall (nrepl-default-handler) response))))) + +(defun nrepl-decode-current-buffer () + "Decode the data in the current buffer. +Remove the processed data from the buffer if the decode successful." + (let* ((start (point-min)) + (end (point-max)) + (data (buffer-substring-no-properties start end))) + (prog1 + (nrepl-decode data) + (delete-region start end)))) + +(defun nrepl-handle-process-output (process) + "Handle all complete messages from PROCESS." + (with-current-buffer (process-buffer process) + (let ((nrepl-connection-dispatch (current-buffer))) + ;; FIXME: An ugly fix for https://github.com/clojure-emacs/cider/issues/583 + (while (and (not (derived-mode-p 'cider-repl-mode)) (> (buffer-size) 1)) + (let ((responses (nrepl-decode-current-buffer))) + (dolist (r responses) + (nrepl-dispatch r))))))) + +(defvar nrepl-decode-timeout 0.01 + "Seconds to wait before decoding nREPL output.") + +(defun nrepl-net-filter (process string) + "Decode the message(s) from PROCESS contained in STRING and dispatch." + (with-current-buffer (process-buffer process) + (goto-char (point-max)) + (insert string)) + ;; end of the dict maybe? + (when (eq ?e (aref string (1- (length string)))) + ;; wait a bit to make sure we are at the real end + (unless (accept-process-output process nrepl-decode-timeout) + (nrepl-handle-process-output process)))) + +(defun nrepl-sentinel (process message) + "Handle sentinel events from PROCESS. +Display MESSAGE and if the process is closed kill the +process buffer and run the hook `nrepl-disconnected-hook'." + (message "nREPL connection closed: %s" message) + (if (equal (process-status process) 'closed) + (progn + (with-current-buffer (process-buffer process) + (when (get-buffer nrepl-repl-buffer) + (kill-buffer nrepl-repl-buffer)) + (kill-buffer (current-buffer))) + (run-hooks 'nrepl-disconnected-hook)))) + +(defun nrepl-write-message (process message) + "Send the PROCESS the MESSAGE." + (process-send-string process message)) + +;;; Log nREPL messages + +(defconst nrepl-message-buffer-name "*nrepl-messages*" + "Buffer for nREPL message logging.") + +(defcustom nrepl-log-messages nil + "Log protocol messages to the `nrepl-message-buffer-name' buffer." + :type 'boolean + :group 'nrepl) + +(define-obsolete-variable-alias 'nrepl-log-events 'nrepl-log-messages "0.7.0") + +(defconst nrepl-message-buffer-max-size 1000000 + "Maximum size for the nREPL message buffer. +Defaults to 1000000 characters, which should be an insignificant +memory burden, while providing reasonable history.") + +(defconst nrepl-message-buffer-reduce-denominator 4 + "Divisor by which to reduce message buffer size. +When the maximum size for the nREPL message buffer is exceed, the +size of the buffer is reduced by one over this value. Defaults +to 4, so that 1/4 of the buffer is removed, which should ensure +the buffer's maximum is reasonably utilised, while limiting the +number of buffer shrinking operations.") + +(defun nrepl-log-message (msg) + "Log the given MSG to the buffer given by `nrepl-message-buffer-name'." + (when nrepl-log-messages + (with-current-buffer (nrepl-messages-buffer) + (when (> (buffer-size) nrepl-message-buffer-max-size) + (goto-char (/ (buffer-size) nrepl-message-buffer-reduce-denominator)) + (re-search-forward "^(" nil t) + (delete-region (point-min) (- (point) 1))) + (goto-char (point-max)) + (pp msg (current-buffer))))) + +(defun nrepl-messages-buffer () + "Return or create the buffer given by `nrepl-message-buffer-name'. +The default buffer name is *nrepl-messages*." + (or (get-buffer nrepl-message-buffer-name) + (let ((buffer (get-buffer-create nrepl-message-buffer-name))) + (with-current-buffer buffer + (buffer-disable-undo) + (setq-local comment-start ";") + (setq-local comment-end "")) + buffer))) + +(defun nrepl-log-messages (&optional disable) + "Turn on message logging to `nrepl-message-buffer-name'. +With a prefix argument DISABLE, turn it off." + (interactive "P") + (if disable + (message "nREPL message logging disabled") + (message "nREPL message logging enabled")) + (setq nrepl-log-messages (not disable))) + +(define-obsolete-function-alias 'nrepl-log-events 'nrepl-log-messages "0.7.0") + + +;;; Connections + +;;; A connection is the communication between the nrepl.el client and an nrepl +;;; server. + +(defvar nrepl-connection-dispatch nil + "Bound to the connection a message was received on. +This is bound for the duration of the handling of that message") + +(defvar nrepl-connection-list nil + "A list of connections.") + + +(defun nrepl-current-host () + "Retrieve the current host." + (if (and (stringp buffer-file-name) + (file-remote-p buffer-file-name)) + tramp-current-host + nrepl-host)) + +(defun nrepl-make-connection-buffer () + "Create an nREPL connection buffer." + (let ((buffer (generate-new-buffer (nrepl-connection-buffer-name)))) + (with-current-buffer buffer + (buffer-disable-undo) + (setq-local kill-buffer-query-functions nil)) + buffer)) + +(defun nrepl-current-connection-buffer () + "The connection to use for nREPL interaction." + (or nrepl-connection-dispatch + nrepl-connection-buffer + (car (nrepl-connection-buffers)) + (error "No nREPL connection"))) + +(defun nrepl-connection-buffers () + "Clean up dead buffers from the `nrepl-connection-list'. +Return the connection list." + (nrepl--connection-list-purge) + nrepl-connection-list) + +(defun nrepl--connection-list-purge () + "Clean up dead buffers from the `nrepl-connection-list'." + (setq nrepl-connection-list + (-remove (lambda (buffer) + (not (buffer-live-p (get-buffer buffer)))) + nrepl-connection-list))) + +(defun nrepl-make-repl-connection-default (connection-buffer) + "Make the nREPL CONNECTION-BUFFER the default connection. +Moves CONNECITON-BUFFER to the front of `nrepl-connection-list'." + (interactive (list nrepl-connection-buffer)) + (if connection-buffer + ;; maintain the connection list in most recently used order + (let ((buf-name (buffer-name (get-buffer connection-buffer)))) + (setq nrepl-connection-list + (cons buf-name (delq buf-name nrepl-connection-list))) + (nrepl--connections-refresh)) + (message "Not in an nREPL REPL buffer."))) + +(defun nrepl--close-connection-buffer (connection-buffer) + "Closes CONNECTION-BUFFER, removing it from `nrepl-connection-list'. +Also closes associated REPL and server buffers." + (let ((nrepl-connection-dispatch connection-buffer)) + (let ((buffer (get-buffer connection-buffer))) + (setq nrepl-connection-list + (delq (buffer-name buffer) nrepl-connection-list)) + (when (buffer-live-p buffer) + (dolist (buf-name `(,(buffer-local-value 'nrepl-repl-buffer buffer) + ,(buffer-local-value 'nrepl-server-buffer buffer) + ,(buffer-local-value + 'nrepl-on-connection-buffer buffer) + ,buffer)) + (when buf-name + (cider--close-buffer buf-name))))))) + +;;; Connection browser +(defvar nrepl-connections-buffer-mode-map + (let ((map (make-sparse-keymap))) + (define-key map "d" 'nrepl-connections-make-default) + (define-key map "g" 'nrepl-connection-browser) + (define-key map (kbd "C-k") 'nrepl-connections-close-connection) + (define-key map (kbd "RET") 'nrepl-connections-goto-connection) + map)) + +(define-derived-mode nrepl-connections-buffer-mode cider-popup-buffer-mode + "nREPL-Connections" + "nREPL Connections Buffer Mode. +\\{nrepl-connections-buffer-mode-map} +\\{cider-popup-buffer-mode-map}" + (setq-local truncate-lines t)) + +(defvar nrepl--connection-ewoc) +(defconst nrepl--connection-browser-buffer-name "*nrepl-connections*") + +(defun nrepl-connection-browser () + "Open a browser buffer for nREPL connections." + (interactive) + (let ((buffer (get-buffer nrepl--connection-browser-buffer-name))) + (if buffer + (progn + (nrepl--connections-refresh-buffer buffer) + (unless (get-buffer-window buffer) + (select-window (display-buffer buffer)))) + (nrepl--setup-connection-browser)))) + +(defun nrepl--connections-refresh () + "Refresh the connections buffer, if the buffer exists. +The connections buffer is determined by +`nrepl--connection-browser-buffer-name'" + (let ((buffer (get-buffer nrepl--connection-browser-buffer-name))) + (when buffer + (nrepl--connections-refresh-buffer buffer)))) + +(defun nrepl--connections-refresh-buffer (buffer) + "Refresh the connections BUFFER." + (nrepl--update-connections-display + (buffer-local-value 'nrepl--connection-ewoc buffer) + nrepl-connection-list)) + +(defun nrepl--setup-connection-browser () + "Create a browser buffer for nREPL connections." + (with-current-buffer (get-buffer-create nrepl--connection-browser-buffer-name) + (let ((ewoc (ewoc-create + 'nrepl--connection-pp + " Host Port Project\n"))) + (setq-local nrepl--connection-ewoc ewoc) + (nrepl--update-connections-display ewoc nrepl-connection-list) + (setq buffer-read-only t) + (nrepl-connections-buffer-mode) + (display-buffer (current-buffer))))) + +(defun nrepl--connection-pp (connection) + "Print an nREPL CONNECTION to the current buffer." + (let* ((buffer-read-only nil) + (buffer (get-buffer connection)) + (endpoint (buffer-local-value 'nrepl-endpoint buffer))) + (insert + (format "%s %-16s %5s %s" + (if (equal connection (car nrepl-connection-list)) "*" " ") + (car endpoint) + (prin1-to-string (cadr endpoint)) + (or (nrepl--project-name + (buffer-local-value 'nrepl-project-dir buffer)) + ""))))) + +(defun nrepl--project-name (path) + "Extracts a project name from PATH, possibly nil. +The project name is the final component of PATH if not nil." + (when path + (file-name-nondirectory (directory-file-name path)))) + +(defun nrepl--update-connections-display (ewoc connections) + "Update the connections EWOC to show CONNECTIONS." + (ewoc-filter ewoc (lambda (n) (member n connections))) + (let ((existing)) + (ewoc-map (lambda (n) (setq existing (cons n existing))) ewoc) + (let ((added (-difference connections existing))) + (mapc (apply-partially 'ewoc-enter-last ewoc) added) + (save-excursion (ewoc-refresh ewoc))))) + +(defun nrepl--ewoc-apply-at-point (f) + "Apply function F to the ewoc node at point. +F is a function of two arguments, the ewoc and the data at point." + (let* ((ewoc nrepl--connection-ewoc) + (node (and ewoc (ewoc-locate ewoc)))) + (when node + (funcall f ewoc (ewoc-data node))))) + +(defun nrepl-connections-make-default () + "Make default the connection at point in the connection browser." + (interactive) + (save-excursion + (nrepl--ewoc-apply-at-point #'nrepl--connections-make-default))) + +(defun nrepl--connections-make-default (ewoc data) + "Make the connection in EWOC specified by DATA default. +Refreshes EWOC." + (interactive) + (nrepl-make-repl-connection-default data) + (ewoc-refresh ewoc)) + +(defun nrepl-connections-close-connection () + "Close connection at point in the connection browser." + (interactive) + (nrepl--ewoc-apply-at-point #'nrepl--connections-close-connection)) + +(defun nrepl--connections-close-connection (ewoc data) + "Close the connection in EWOC specified by DATA." + (nrepl-close (get-buffer data)) + (nrepl--update-connections-display ewoc nrepl-connection-list)) + +(defun nrepl-connections-goto-connection () + "Goto connection at point in the connection browser." + (interactive) + (nrepl--ewoc-apply-at-point #'nrepl--connections-goto-connection)) + +(defun nrepl--connections-goto-connection (_ewoc data) + "Goto the REPL for the connection in _EWOC specified by DATA." + (let ((buffer (buffer-local-value 'nrepl-repl-buffer (get-buffer data)))) + (when buffer + (select-window (display-buffer buffer))))) + +;;; server messages + +(defun nrepl-current-session () + "Return the current session." + (with-current-buffer (nrepl-current-connection-buffer) + nrepl-session)) + +(defun nrepl-current-tooling-session () + "Return the current tooling session." + (with-current-buffer (nrepl-current-connection-buffer) + nrepl-tooling-session)) + +(defun nrepl-next-request-id () + "Return the next request id." + (with-current-buffer (nrepl-current-connection-buffer) + (number-to-string (cl-incf nrepl-request-counter)))) + +(defun nrepl-send-request (request callback) + "Send REQUEST and register response handler CALLBACK." + (let* ((request-id (nrepl-next-request-id)) + (request (append (list "id" request-id) request)) + (message (nrepl-bencode request))) + (nrepl-log-message request) + (puthash request-id callback nrepl-pending-requests) + (nrepl-write-message (nrepl-current-connection-buffer) message))) + +(defun nrepl-create-client-session (callback) + "Sent a request to create a new client session. +Response will be handled by CALLBACK." + (nrepl-send-request '("op" "clone") + callback)) + +(defun nrepl-send-stdin (input callback) + "Send a stdin message with INPUT. +Register CALLBACK as the response handler." + (nrepl-send-request (list "op" "stdin" + "stdin" input + "session" (nrepl-current-session)) + callback)) + +(defun nrepl-send-interrupt (pending-request-id callback) + "Send an interrupt message for PENDING-REQUEST-ID. +Register CALLBACK as the response handler." + (nrepl-send-request (list "op" "interrupt" + "session" (nrepl-current-session) + "interrupt-id" pending-request-id) + callback)) + +(defun nrepl-eval-request (input &optional ns session) + "Send a request to eval INPUT. +If NS is non-nil, include it in the request. +Use SESSION if it is non-nil, otherwise use the current session." + (append (if ns (list "ns" ns)) + (list + "op" "eval" + "session" (or session (nrepl-current-session)) + "code" input))) + +(defun nrepl-send-string (input callback &optional ns session) + "Send the request INPUT and register the CALLBACK as the response handler. +See command `nrepl-eval-request' for details on how NS and SESSION are processed." + (nrepl-send-request (nrepl-eval-request input ns session) callback)) + +(defun nrepl-sync-request-handler (buffer) + "Make a synchronous request handler for BUFFER." + (nrepl-make-response-handler buffer + (lambda (_buffer value) + (setq nrepl-sync-response + (plist-put nrepl-sync-response :value value))) + (lambda (_buffer out) + (let ((so-far (plist-get nrepl-sync-response :stdout))) + (setq nrepl-sync-response + (plist-put nrepl-sync-response + :stdout (concat so-far out))))) + (lambda (_buffer err) + (let ((so-far (plist-get nrepl-sync-response :stderr))) + (setq nrepl-sync-response + (plist-put nrepl-sync-response + :stderr (concat so-far err))))) + (lambda (_buffer) + (setq nrepl-sync-response + (plist-put nrepl-sync-response :done t))))) + +(defun nrepl-send-request-sync (request) + "Send REQUEST to the nREPL server synchronously (discouraged). +The result is a plist with keys :value, :stderr and :stdout." + (with-current-buffer (nrepl-current-connection-buffer) + (setq nrepl-sync-response nil) + (setq nrepl-sync-request-start-time (current-time)) + (nrepl-send-request request (nrepl-sync-request-handler (current-buffer))) + (while (or (null nrepl-sync-response) + (null (plist-get nrepl-sync-response :done))) + (accept-process-output nil 0.005) + ;; break out in case we don't receive a response for a while + (when nrepl-sync-request-timeout + (let ((seconds-ellapsed (cadr (time-subtract (current-time) nrepl-sync-request-start-time)))) + (if (> seconds-ellapsed nrepl-sync-request-timeout) + (keyboard-quit))))) + nrepl-sync-response)) + +(defun nrepl-send-string-sync (input &optional ns session) + "Send the INPUT to the nREPL server synchronously. +See command `nrepl-eval-request' for details about how NS and SESSION +are processed." + (nrepl-send-request-sync (nrepl-eval-request input ns session))) + +;;; server +(defun nrepl--default-endpoint (dir port) + "The endpoint for a repl in project DIR on PORT. +Return a plist with :hostname, :port and :proc keys." + (list :hostname (if (file-remote-p dir) + tramp-current-host + "localhost") + :port port + :proc-buffer-name nil)) + +(defun nrepl--endpoint-for-connection (dir port) + "Call any `nrepl-connection-endpoint' for DIR and PORT. +Return a plist with :hostname and :port values, specifying where +to connect, and a :proc-buffer-name key, specifying the name of a +process buffer to associate with the connection. When no +`nrepl-connection-endpoint' is specified, returns a plist with +the hostname associated with DIR, and PORT." + (if (functionp nrepl-connection-endpoint) + (funcall nrepl-connection-endpoint dir port) + (nrepl--default-endpoint dir port))) + +(defun nrepl-server-filter (process output) + "Process nREPL server output from PROCESS contained in OUTPUT." + (with-current-buffer (process-buffer process) + (save-excursion + (goto-char (point-max)) + (insert output))) + (when (string-match "nREPL server started on port \\([0-9]+\\)" output) + (let ((port (string-to-number (match-string 1 output)))) + (message (format "nREPL server started on %s" port)) + (with-current-buffer (process-buffer process) + (let* ((endpoint (nrepl--endpoint-for-connection + default-directory port)) + (hostname (plist-get endpoint :hostname)) + (port (plist-get endpoint :port)) + (proc-buffer-name (plist-get endpoint :proc-buffer-name))) + (let ((nrepl-process (nrepl-connect hostname port))) + (setq nrepl-connection-buffer + (buffer-name (process-buffer nrepl-process))) + (with-current-buffer (process-buffer nrepl-process) + (setq nrepl-server-buffer + (buffer-name (process-buffer process)) + nrepl-project-dir + (buffer-local-value + 'nrepl-project-dir (process-buffer process)) + nrepl-on-connection-buffer proc-buffer-name)))))))) + +(defun nrepl-server-sentinel (process event) + "Handle nREPL server PROCESS EVENT." + (let* ((nrepl-buffer (process-buffer process)) + (connection-buffer (buffer-local-value 'nrepl-connection-buffer nrepl-buffer)) + (problem (if (and nrepl-buffer (buffer-live-p nrepl-buffer)) + (with-current-buffer nrepl-buffer + (buffer-substring (point-min) (point-max))) + ""))) + (when nrepl-buffer + (kill-buffer nrepl-buffer)) + (cond + ((string-match "^killed" event) + nil) + ((string-match "^hangup" event) + (when connection-buffer + (nrepl-close connection-buffer))) + ((string-match "Wrong number of arguments to repl task" problem) + (error "Leiningen 2.x is required by CIDER")) + (t (error "Could not start nREPL server: %s" problem))))) + +(defun nrepl--ssh-tunnel-command (ssh dir port) + "Command string to open SSH tunnel to the host associated with DIR's PORT." + (with-parsed-tramp-file-name dir nil + (format-spec + "%s -v -N -L %p:localhost:%p %u'%h'" + `((?s . ,ssh) + (?p . ,port) + (?h . ,host) + (?u . ,(if user (format "-l '%s' " user) "")))))) + +(defun nrepl--ssh-tunnel-filter (port) + "Return a filter function for waiting on PORT to appear in output." + (let ((port-string (format "LOCALHOST:%s" port))) + (lambda (proc string) + (when (buffer-live-p (process-buffer proc)) + (with-current-buffer (process-buffer proc) + (let ((moving (= (point) (process-mark proc)))) + (save-excursion + (goto-char (process-mark proc)) + (insert string) + (set-marker (process-mark proc) (point))) + (if moving (goto-char (process-mark proc)))))) + (when (string-match port-string string) + (with-current-buffer (process-buffer proc) + (setq nrepl-wait-for-port nil)))))) + +(defun nrepl-connection-ssh-tunnel (dir port) + "Return an endpoint for SSH tunnel to project DIR path, and PORT port. +If DIR is remote, then attempt to open an SSH tunnel to port. If +the ssh executable is not found on the path, then fall back to +specifying a direct conneciton." + ;; this abuses the -v option for ssh to get output when the port + ;; forwarding is set up, which is used to synchronise on, so that + ;; the port forwarding is up when we try to connect. + (if (file-remote-p dir) + (let ((ssh (executable-find "ssh"))) + (if ssh + ;; run cmd in a local shell + (let* ((cmd (nrepl--ssh-tunnel-command ssh dir port)) + (on-connection-buffer-name (nrepl-on-connection-buffer-name)) + (proc (start-process-shell-command + "nrepl-on-connection" + on-connection-buffer-name + cmd)) + (on-connection-buffer (get-buffer + on-connection-buffer-name))) + (with-current-buffer on-connection-buffer-name + (setq-local nrepl-wait-for-port t)) + (set-process-filter proc (nrepl--ssh-tunnel-filter port)) + (while (and (buffer-local-value 'nrepl-wait-for-port + on-connection-buffer) + (process-live-p proc)) + (accept-process-output nil 0.005)) + (unless (process-live-p proc) + (message "SSH port forwarding failed")) + (list :hostname "localhost" :port port + :proc-buffer-name on-connection-buffer-name)) + (nrepl--default-endpoint dir port))) + (list :hostname "localhost" :port port :proc-buffer-name nil))) + +(defun nrepl-current-dir () + "Return the directory of the current buffer." + (let ((file-name (buffer-file-name (current-buffer)))) + (or (when file-name + (file-name-directory file-name)) + list-buffers-directory))) + +(defun nrepl-project-directory-for (dir-name) + "Return the project directory for the specified DIR-NAME." + (when dir-name + (locate-dominating-file dir-name "project.clj"))) + +(defun nrepl-check-for-repl-buffer (endpoint project-directory) + "Check whether a matching connection buffer already exists. +Looks for buffers where `nrepl-endpoint' matches ENDPOINT, +or `nrepl-project-dir' matches PROJECT-DIRECTORY. +If so ask the user for confirmation." + (if (cl-find-if + (lambda (buffer) + (let ((buffer (get-buffer buffer))) + (or (and endpoint + (equal endpoint + (buffer-local-value 'nrepl-endpoint buffer))) + (and project-directory + (equal project-directory + (buffer-local-value 'nrepl-project-dir buffer)))))) + (nrepl-connection-buffers)) + (y-or-n-p + "An nREPL connection buffer already exists. Do you really want to create a new one? ") + t)) + +(defun nrepl-close (connection-buffer) + "Close the nrepl connection for CONNECTION-BUFFER." + (interactive (list (nrepl-current-connection-buffer))) + (nrepl--close-connection-buffer connection-buffer) + (run-hooks 'nrepl-disconnected-hook) + (nrepl--connections-refresh)) + +;;; client +(defun nrepl-op-supported-p (op) + "Return t iff the given operation OP is supported by nREPL server." + (with-current-buffer (nrepl-current-connection-buffer) + (if (and nrepl-ops (assoc op nrepl-ops)) + t))) + +(defun nrepl-describe-handler (process-buffer) + "Return a handler to describe into PROCESS-BUFFER." + (lambda (response) + (nrepl-dbind-response response (ops) + (with-current-buffer process-buffer + (setq nrepl-ops ops))) + (cider-make-repl (get-buffer-process process-buffer)) + (nrepl-make-repl-connection-default process-buffer) + (cider-verify-required-nrepl-ops))) + +(defun nrepl-describe-session (process) + "Peform describe for the given server PROCESS." + (nrepl-send-request + (list "op" "describe") + (nrepl-describe-handler (process-buffer process)))) + +(defun nrepl-new-tooling-session-handler (process) + "Create a new tooling session handler for PROCESS." + (lambda (response) + (nrepl-dbind-response response (id new-session) + (with-current-buffer (process-buffer process) + (setq nrepl-tooling-session new-session) + (remhash id nrepl-pending-requests))))) + +(defun nrepl-new-session-handler (process) + "Create a new session handler for PROCESS." + (lambda (response) + (nrepl-dbind-response response (id new-session) + (remhash id nrepl-pending-requests) + (let ((connection-buffer (process-buffer process))) + (setq nrepl-session new-session + nrepl-connection-buffer connection-buffer) + (run-hooks 'nrepl-connected-hook))))) + +(defun nrepl-init-client-sessions (process) + "Initialize client sessions for PROCESS." + (nrepl-create-client-session (nrepl-new-session-handler process)) + (nrepl-create-client-session (nrepl-new-tooling-session-handler process))) + +(defun nrepl-connect (host port) + "Connect to a running nREPL server running on HOST and PORT." + (message "Connecting to nREPL server on %s:%s..." host port) + (let* ((nrepl-endpoint `(,host ,port)) + (process (open-network-stream "nrepl" + (nrepl-make-connection-buffer) + host + port))) + (set-process-filter process 'nrepl-net-filter) + (set-process-sentinel process 'nrepl-sentinel) + (set-process-coding-system process 'utf-8-unix 'utf-8-unix) + (with-current-buffer (process-buffer process) + (setq nrepl-endpoint `(,host ,port))) + (let ((nrepl-connection-dispatch (buffer-name (process-buffer process)))) + (nrepl-init-client-sessions process) + (nrepl-describe-session process)) + process)) + +(defun nrepl--port-from-file (file) + "Attempts to read port from a file named by FILE." + (let* ((dir (nrepl-project-directory-for (nrepl-current-dir))) + (f (expand-file-name file dir))) + (when (file-exists-p f) + (with-temp-buffer + (insert-file-contents f) + (buffer-string))))) + +(defun nrepl-default-port () + "Attempt to read port from .nrepl-port or target/repl-port. +Falls back to `nrepl-port' if not found." + (or (nrepl--port-from-file ".nrepl-port") + (nrepl--port-from-file "target/repl-port") + nrepl-port)) + +(provide 'nrepl-client) + +;;; nrepl-client.el ends here diff --git a/elpa/cider-0.7.0/nrepl-client.elc b/elpa/cider-0.7.0/nrepl-client.elc new file mode 100644 index 0000000000000000000000000000000000000000..7f9b07bc34b9f035f58046ee00c1c86940da97e2 GIT binary patch literal 38220 zcmd6Q3wImWktRvWicFt)oX5#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DR!|DXa8y6c^ zD<@(sMqTdRq#ej|6Kyh$`J}{vD6%g3vNQ24e26+i9UV1BLU|ceFs_aR&W4ykO7Voh zI-{v5r~f#VXAb8Rq<4uJd`MM($3HG#JTKR4$Q=ceiJKgB^5hhvha`ushV}GE{{u{IGwj7_f%{2&qnppXRG*r3cl6B9?=E{e((~P W8&n4;I~#D?06Q0a?86y*lYId~1+%UI literal 0 HcmV?d00001 diff --git a/elpa/cl-lib-0.5/cl-lib.el b/elpa/cl-lib-0.5/cl-lib.el new file mode 100644 index 000000000..ce11309fd --- /dev/null +++ b/elpa/cl-lib-0.5/cl-lib.el @@ -0,0 +1,410 @@ +;;; cl-lib.el --- Properly prefixed CL functions and macros -*- coding: utf-8 -*- + +;; Copyright (C) 2012, 2013, 2014 Free Software Foundation, Inc. + +;; Author: Stefan Monnier +;; vcomment: Emacs-24.3's version is 1.0 so this has to stay below. +;; Version: 0.5 + +;; 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: + +;; This is a forward compatibility package, which provides (a subset of) the +;; features of the cl-lib package introduced in Emacs-24.3, for use on +;; previous emacsen. + +;; Make sure this is installed *late* in your `load-path`, i.e. after Emacs's +;; built-in .../lisp/emacs-lisp directory, so that if/when you upgrade to +;; Emacs-24.3, the built-in version of the file will take precedence, otherwise +;; you could get into trouble (although we try to hack our way around the +;; problem in case it happens). + +;; This code is largely copied from Emacs-24.3's cl.el, with the alias bindings +;; simply reversed. + +;;; Code: + +;; We need to handle the situation where this package is used with an Emacs +;; that comes with a real cl-lib (i.e. ≥24.3). + +;; First line of defense: try to make sure the built-in cl-lib comes earlier in +;; load-path so we never get loaded: +;;;###autoload (let ((d (file-name-directory #$))) +;;;###autoload (when (member d load-path) +;;;###autoload (setq load-path (append (remove d load-path) (list d))))) + +(when (functionp 'macroexp--compiler-macro) + ;; `macroexp--compiler-macro' was introduced as part of the big CL + ;; reorganization which moved/reimplemented some of CL into core (mostly the + ;; setf and compiler-macro support), so its presence indicates we're running + ;; in an Emacs that comes with the new cl-lib.el, where this file should + ;; never be loaded! + (message "Real cl-lib shadowed by compatibility cl-lib? (%s)" load-file-name) + (when load-file-name + ;; (message "Let's try to patch things up") + (let ((loaddir (file-name-directory load-file-name)) + load-path-dir) + ;; Find the problematic directory from load-path. + (dolist (dir load-path) + (if (equal loaddir (expand-file-name (file-name-as-directory dir))) + (setq load-path-dir dir))) + (when load-path-dir + ;; (message "Let's move the offending dir to the end") + (setq load-path (append (remove load-path-dir load-path) + (list load-path-dir))) + ;; Here we could manually load cl-lib and then return immediately. + ;; But Emacs currently doesn't provide any way for a file to "return + ;; immediately", so instead we make sure the rest of the file does not + ;; throw away any pre-existing definition. + )))) + +(require 'cl) + +;; Some of Emacs-24.3's cl.el definition are not just aliases, because either +;; the feature was dropped from cl-lib.el or because the cl-lib version is +;; not fully compatible. +;; Let's just not include them here, since it is very important that if code +;; works with this cl-lib.el it should also work with Emacs-24.3's cl-lib.el, +;; whereas the reverse is much less important. + +(dolist (var '( + ;; loop-result-var + ;; loop-result + ;; loop-initially + ;; loop-finally + ;; loop-bindings + ;; loop-args + ;; bind-inits + ;; bind-block + ;; lambda-list-keywords + float-negative-epsilon + float-epsilon + least-negative-normalized-float + least-positive-normalized-float + least-negative-float + least-positive-float + most-negative-float + most-positive-float + ;; custom-print-functions + )) + (let ((new (intern (format "cl-%s" var)))) + (unless (boundp new) (defvaralias new var)))) + +;; The following cl-lib functions were already defined in the old cl.el, +;; with a different meaning: +;; - cl-position and cl-delete-duplicates +;; the two meanings are clearly different, but we can distinguish which was +;; meant by looking at the arguments. +;; - cl-member +;; the old meaning hasn't been used for a long time and is a subset of the +;; new, so we can simply override it. +;; - cl-adjoin +;; the old meaning is actually the same as the new except for optimizations. + +(dolist (fun '( + (get* . cl-get) + (random* . cl-random) + (rem* . cl-rem) + (mod* . cl-mod) + (round* . cl-round) + (truncate* . cl-truncate) + (ceiling* . cl-ceiling) + (floor* . cl-floor) + (rassoc* . cl-rassoc) + (assoc* . cl-assoc) + ;; (member* . cl-member) ;Handle specially below. + (delete* . cl-delete) + (remove* . cl-remove) + (defsubst* . cl-defsubst) + (sort* . cl-sort) + (function* . cl-function) + (defmacro* . cl-defmacro) + (defun* . cl-defun) + (mapcar* . cl-mapcar) + + remprop + getf + tailp + list-length + nreconc + revappend + concatenate + subseq + random-state-p + make-random-state + signum + isqrt + lcm + gcd + notevery + notany + every + some + mapcon + mapcan + mapl + maplist + map + equalp + coerce + tree-equal + nsublis + sublis + nsubst-if-not + nsubst-if + nsubst + subst-if-not + subst-if + subsetp + nset-exclusive-or + set-exclusive-or + nset-difference + set-difference + nintersection + intersection + nunion + union + rassoc-if-not + rassoc-if + assoc-if-not + assoc-if + member-if-not + member-if + merge + stable-sort + search + mismatch + count-if-not + count-if + count + position-if-not + position-if + ;; position ;Handle specially via defadvice below. + find-if-not + find-if + find + nsubstitute-if-not + nsubstitute-if + nsubstitute + substitute-if-not + substitute-if + substitute + ;; delete-duplicates ;Handle specially via defadvice below. + remove-duplicates + delete-if-not + delete-if + remove-if-not + remove-if + replace + fill + reduce + compiler-macroexpand + define-compiler-macro + assert + check-type + typep + deftype + defstruct + callf2 + callf + letf* + letf + rotatef + shiftf + remf + psetf + declare + the + locally + multiple-value-setq + multiple-value-bind + symbol-macrolet + macrolet + progv + psetq + do-all-symbols + do-symbols + dotimes + dolist + do* + do + loop + return-from + return + block + etypecase + typecase + ecase + case + load-time-value + eval-when + destructuring-bind + gentemp + gensym + pairlis + acons + subst + ;; adjoin ;It's already defined. + copy-list + ldiff + list* + cddddr + cdddar + cddadr + cddaar + cdaddr + cdadar + cdaadr + cdaaar + cadddr + caddar + cadadr + cadaar + caaddr + caadar + caaadr + caaaar + cdddr + cddar + cdadr + cdaar + caddr + cadar + caadr + caaar + tenth + ninth + eighth + seventh + sixth + fifth + fourth + third + endp + rest + second + first + svref + copy-seq + evenp + oddp + minusp + plusp + floatp-safe + declaim + proclaim + nth-value + multiple-value-call + multiple-value-apply + multiple-value-list + values-list + values + pushnew + decf + incf + + dolist + dotimes + )) + (let ((new (if (consp fun) (prog1 (cdr fun) (setq fun (car fun))) + (intern (format "cl-%s" fun))))) + (if (fboundp new) + (unless (or (eq (symbol-function new) fun) + (eq new (and (symbolp fun) (fboundp fun) + (symbol-function fun)))) + (message "%S already defined, not rebinding" new)) + (defalias new fun)))) + +(unless (symbolp (symbol-function 'position)) + (autoload 'cl-position "cl-seq") + (defadvice cl-position (around cl-lib (cl-item cl-seq &rest cl-keys) activate) + (let ((argk (ad-get-args 2))) + (if (or (null argk) (keywordp (car argk))) + ;; This is a call to cl-lib's `cl-position'. + (setq ad-return-value + (apply #'position (ad-get-arg 0) (ad-get-arg 1) argk)) + ;; Must be a call to cl's old `cl-position'. + ad-do-it)))) + +(unless (symbolp (symbol-function 'delete-duplicates)) + (autoload 'cl-delete-duplicates "cl-seq") + (defadvice cl-delete-duplicates (around cl-lib (cl-seq &rest cl-keys) activate) + (let ((argk (ad-get-args 1))) + (if (or (null argk) (keywordp (car argk))) + ;; This is a call to cl-lib's `cl-delete-duplicates'. + (setq ad-return-value + (apply #'delete-duplicates (ad-get-arg 0) argk)) + ;; Must be a call to cl's old `cl-delete-duplicates'. + ad-do-it)))) + +(when (or (not (fboundp 'cl-member)) + (eq (symbol-function 'cl-member) #'memq)) + (defalias 'cl-member #'member*)) + +;; `cl-labels' is not 100% compatible with `labels' when using dynamic scoping +;; (mostly because it does not turn lambdas that refer to those functions into +;; closures). OTOH it is compatible when using lexical scoping. + +(unless (fboundp 'cl-labels) + (defmacro cl-labels (&rest args) + (unless (and (boundp 'lexical-binding) lexical-binding) + ;; We used to signal an error rather than a message, but in many uses of + ;; cl-labels, the value of lexical-binding doesn't actually matter. + ;; More importantly, the value of `lexical-binding' here is unreliable + ;; (it does not necessarily reflect faithfully whether the output of this + ;; macro will be interpreted as lexically bound code or not). + (message "This `cl-labels' requires `lexical-binding' to be non-nil")) + `(labels ,@args))) + +;;;; ChangeLog: + +;; 2014-02-25 Stefan Monnier +;; +;; Fixes: debbugs:16671 +;; +;; * cl-lib.el (cl-position, cl-delete-duplicate): Don't advise if >=24.3. +;; (load-path): Try to make sure we're at the end. +;; +;; 2014-01-25 Stefan Monnier +;; +;; * cl-lib.el: Resolve conflicts with old internal definitions +;; (bug#16353). +;; (dolist fun): Don't skip definitions silently. +;; (define-setf-expander): Remove, not in cl-lib. +;; (cl-position, cl-delete-duplicates): Add advice to distinguish the use +;; case. +;; (cl-member): Override old definition. +;; +;; 2013-05-22 Stefan Monnier +;; +;; * cl-lib.el (cl-labels): Demote error to message and improve it. +;; +;; 2012-11-30 Stefan Monnier +;; +;; * cl-lib.el: Try and patch things up in case we're hiding the real +;; cl-lib. +;; +;; 2012-11-22 Stefan Monnier +;; +;; Add cl-letf and cl-labels. +;; +;; 2012-11-16 Stefan Monnier +;; +;; * packages/cl-lib: New package. +;; + + +(provide 'cl-lib) +;;; cl-lib.el ends here diff --git a/elpa/cl-lib-0.5/cl-lib.elc b/elpa/cl-lib-0.5/cl-lib.elc new file mode 100644 index 0000000000000000000000000000000000000000..e8b0f177f6dbe8b2364c6b4c7e719f165c0ad0d2 GIT binary patch literal 4540 zcmb_g|Bu_Y6?cCbk}GOp=$3uK8oap8Vjm)(CE2+p!LVF{{!nDYfMxrs4p3U6Z0;mc zM^e7H=pVn&BPE?L*J2pD17z}j;rqt-9?5(8^S&E0~)6)^}TRl zu=5j7{O3;DptQBpQhumKr83HOW}Q*>);z!a&j`=9Gr|YolBam)5SA<=a1IOB7Hqtr||+`d~ZEjC-LImfKBc_0zUoS z??2_?40Ffko{_Uc#b8ptKS)w*~DNom5Qr=xZ8%g-*D_1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gpq{hS9%>C-z&EA9mZ0O70P+^|+busdXKqHS=KImD;{ef?h+wvp z*=6Jo4YCYBzIAzs>lOVZ0}F1hMG^*dT34LiG+^{*C{&>W2iVsGh{*834sUv^M4|CeUx=WJma3*XBfu97>PyOl4LWAWfVo^rd zJ6Xfc5TTZ@>5;d7D{(AT+-qtWM~zUpHd_*?bzie6?@Tubydf|vxsrS@I;AYfpYen6 zg9woD5U&1=6nTIGO?VneOvAu5a0DpO!a5Pwf#1`@x?Wu;--{0tIsq)LUx0f*97C@} ziSJ0N?GA%QJ7dtQ5BM#R1o+jh!Qghv&QqZA+VnRqhZ8wqOHpld;fV^##)3GGfAoTKr*W@RY>US$HxgGeNexA zGWc+$gcewKqm$xUCyo6>u_^}}7{}Kb?=udNJs-DS+dFEDaOf`bzXs-i2}u0^4akpJ zdlU*p#zz~&aVX$rIOq8ALu2$OAi4tfUuz2MN uZ?AtsPV>JF_}>e74ooOm`<{~bT&sJ9CppVO4&y#dTvxd2y{Bihlm7s;3(O$^ literal 0 HcmV?d00001 diff --git a/elpa/clojure-cheatsheet-20140316.1520/clojure-cheatsheet-autoloads.el b/elpa/clojure-cheatsheet-20140316.1520/clojure-cheatsheet-autoloads.el new file mode 100644 index 000000000..b00f82878 --- /dev/null +++ b/elpa/clojure-cheatsheet-20140316.1520/clojure-cheatsheet-autoloads.el @@ -0,0 +1,29 @@ +;;; clojure-cheatsheet-autoloads.el --- automatically extracted autoloads +;; +;;; Code: + + +;;;### (autoloads (clojure-cheatsheet) "clojure-cheatsheet" "clojure-cheatsheet.el" +;;;;;; (21478 8106 0 0)) +;;; Generated autoloads from clojure-cheatsheet.el + +(autoload 'clojure-cheatsheet "clojure-cheatsheet" "\ +Use helm to show a Clojure cheatsheet. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads nil nil ("clojure-cheatsheet-pkg.el") (21478 8106 +;;;;;; 389940 0)) + +;;;*** + +(provide 'clojure-cheatsheet-autoloads) +;; Local Variables: +;; version-control: never +;; no-byte-compile: t +;; no-update-autoloads: t +;; coding: utf-8 +;; End: +;;; clojure-cheatsheet-autoloads.el ends here diff --git a/elpa/clojure-cheatsheet-20140316.1520/clojure-cheatsheet-pkg.el b/elpa/clojure-cheatsheet-20140316.1520/clojure-cheatsheet-pkg.el new file mode 100644 index 000000000..8d5725270 --- /dev/null +++ b/elpa/clojure-cheatsheet-20140316.1520/clojure-cheatsheet-pkg.el @@ -0,0 +1 @@ +(define-package "clojure-cheatsheet" "20140316.1520" "The Clojure Cheatsheet for Emacs" (quote ((helm "1.5.3") (cider "0.1.8")))) diff --git a/elpa/clojure-cheatsheet-20140316.1520/clojure-cheatsheet-pkg.elc b/elpa/clojure-cheatsheet-20140316.1520/clojure-cheatsheet-pkg.elc new file mode 100644 index 0000000000000000000000000000000000000000..b6a531fdd91a7d950d68527ca3614fa491357fe7 GIT binary patch literal 680 zcmbu6u};G<5QaPF1z1m6XeHv*NsC*QcOuz#i_N6g(?8tUO@bp|$goI$jk_Y?F z-~apm&COkNGMP-W&1M6Q?+0T^!}B}zm@aw8;vUtt_d8*|LJQu(117lIZvoaImltw% zQ7@pH%f*OjgYThb2$WBeLM)k43hGfsp-Zv@mdg57%ch!I*g>MV-%Js*L6t +;; Maintainer: Kris Jenkins +;; Keywords: clojure nrepl cheatsheet helm +;; URL: https://github.com/krisajenkins/clojure-cheatsheet +;; Created: 7th August 2013 +;; Version: 20140316.1520 +;; X-Original-Version: 0.2.2 +;; Package-Requires: ((helm "1.5.3") (cider "0.1.8")) + +;;; Commentary: +;; +;; A quick reference system for Clojure. Fast, searchable & available offline. + +;;; Code: + +(require 'helm) +(require 'helm-match-plugin) +(require 'nrepl-client) +(require 'cider-interaction) + +(defconst clojure-cheatsheet-hierarchy + '(("Primitives" + ("Numbers" + ("Arithmetic" + (clojure.core + - * / quot rem mod dec inc max min)) + ("Compare" + (clojure.core = == not= < > <= >= compare)) + ("Bitwise" + (clojure.core bit-and bit-and-not bit-clear bit-flip bit-not bit-or bit-set bit-shift-left bit-shift-right bit-test bit-xor)) + ("Cast" + (clojure.core byte short long int float double bigdec bigint biginteger num rationalize)) + ("Test" + (clojure.core nil? identical? zero? pos? neg? even? odd?)) + ("Random" + (clojure.core rand rand-int)) + ("BigDecimal" + (clojure.core with-precision)) + ("Ratios" + (clojure.core numerator denominator ratio?)) + ("Arbitrary Precision Arithmetic" + (clojure.core +\' -\' *\' inc\' dec\')) + ("Unchecked" + (clojure.core *unchecked-math* + unchecked-add + unchecked-add-int + unchecked-byte + unchecked-char + unchecked-dec + unchecked-dec-int + unchecked-divide-int + unchecked-double + unchecked-float + unchecked-inc + unchecked-inc-int + unchecked-int + unchecked-long + unchecked-multiply + unchecked-multiply-int + unchecked-negate + unchecked-negate-int + unchecked-remainder-int + unchecked-short + unchecked-subtract + unchecked-subtract-int))) + + ("Strings" + ("Create" + (clojure.core str format)) + ("Use" + (clojure.core count get subs compare) + (clojure.string join escape split split-lines replace replace-first reverse re-quote-replacement)) + ("Regex" + (:url "Java's Regex Syntax" "http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html") + (clojure.core re-find re-seq re-matches re-pattern re-matcher re-groups) + (clojure.string replace replace-first re-quote-replacement)) + ("Letters" + (clojure.string capitalize lower-case upper-case)) + ("Trim" + (clojure.string trim trim-newline triml trimr)) + ("Test" + (clojure.core char char? string?) + (clojure.string blank?))) + + ("Other" + ("Characters" + (clojure.core char char-name-string char-escape-string)) + ("Keywords" + (clojure.core keyword keyword? find-keyword)) + ("Symbols" + (clojure.core symbol symbol? gensym)) + ("Data Readers" + (clojure.core *data-readers* default-data-readers *default-data-reader-fn*)))) + + ("Collections" + ("Generic Ops" + (clojure.core count empty not-empty into conj)) + ("Tree Walking" + (clojure.walk walk prewalk prewalk-demo prewalk-replace postwalk postwalk-demo postwalk-replace keywordize-keys stringify-keys)) + ("Content tests" + (clojure.core distinct? empty? every? not-every? some not-any?)) + ("Capabilities" + (clojure.core sequential? associative? sorted? counted? reversible?)) + ("Type tests" + (clojure.core type class coll? list? vector? set? map? seq? + number? integer? float? decimal? class? rational? ratio? + chunked-seq? reduced? special-symbol?)) + ("Lists" + ("Create" + (clojure.core list list*)) + ("Examine" + (clojure.core first nth peek)) + ("'Change'" + (clojure.core cons conj rest pop))) + + ("Vectors" + ("Create" + (clojure.core vec vector vector-of)) + ("Examine" + (clojure.core get peek)) + + ("'Change'" + (clojure.core assoc pop subvec replace conj rseq)) + ("Ops" + (clojure.core mapv filterv reduce-kv))) + + ("Sets" + ("Create" + (clojure.core set hash-set sorted-set sorted-set-by)) + ("Examine" + (clojure.core get contains?)) + ("'Change'" + (clojure.core conj disj)) + ("Relational Algebra" + (clojure.set join select project union difference intersection)) + ("Get map" + (clojure.set index rename-keys rename map-invert)) + ("Test" + (clojure.set subset? superset?))) + + ("Maps" + ("Create" + (clojure.core hash-map array-map zipmap sorted-map sorted-map-by bean frequencies group-by)) + ("Examine" + (clojure.core get get-in contains? find keys vals)) + ("'Change'" + (clojure.core assoc assoc-in dissoc merge merge-with select-keys update-in)) + ("Entry" + (clojure.core key val)) + ("Sorted Maps" + (clojure.core rseq subseq rsubseq)))) + + ("Functions" + ("Create" + (clojure.core fn defn defn- definline identity constantly comp complement partial juxt memfn memoize fnil every-pred some-fn trampoline)) + ("Call" + (clojure.core -> ->> some-> some->> as-> cond-> cond->>)) + ("Test" + (clojure.core fn? ifn?))) + + ("Other" + ("XML" + (clojure.core xml-seq) + (clojure.xml parse)) + ("REPL" + (clojure.core *1 *2 *3 *e *print-dup* *print-length* *print-level* *print-meta* *print-readably*)) + ("EDN" + (clojure.edn read read-string)) + ("Compiling Code & Class Generation" + (:url "Documentation" "http://clojure.org/compilation") + (clojure.core *compile-files* *compile-path* *file* *warn-on-reflection* compile gen-class gen-interface loaded-libs test)) + ("Misc" + (clojure.core eval force hash name *clojure-version* clojure-version *command-line-args*)) + ("Pretty Printing" + (clojure.pprint pprint print-table pp *print-right-margin*)) + ("Browser / Shell" + (clojure.java.browse browse-url) + (clojure.java.shell sh with-sh-dir with-sh-env))) + + ("Vars & Global Environment" + (:url "Documentation" "http://clojure.org/vars") + ("Def Variants" + (:special def) + (clojure.core defn defn- definline defmacro defmethod defmulti defonce defrecord)) + ("Interned Vars" + (:special var) + (clojure.core declare intern binding find-var)) + ("Var Objects" + (clojure.core with-local-vars var-get var-set alter-var-root var?)) + ("Var Validators" + (clojure.core set-validator! get-validator))) + + ("Abstractions" + ("Protocols" + (:url "Documentation" "http://clojure.org/protocols") + (clojure.core defprotocol extend extend-type extend-protocol reify extends? satisfies? extenders)) + ("Records & Types" + (:url "Documentation" "http://clojure.org/datatypes") + (clojure.core defrecord deftype)) + ("Multimethods" + (:url "Documentation" "http://clojure.org/multimethods") + ("Define" + (clojure.core defmulti defmethod)) + ("Dispatch" + (clojure.core get-method methods)) + ("Remove" + (clojure.core remove-method remove-all-methods)) + ("Prefer" + (clojure.core prefer-method prefers)) + ("Relation" + (clojure.core derive isa? parents ancestors descendants make-hierarchy)))) + + ("Macros" + (:url "Documentation" "http://clojure.org/macros") + ("Create" + (clojure.core defmacro definline)) + ("Debug" + (clojure.core macroexpand-1 macroexpand) + (clojure.walk macroexpand-all)) + ("Branch" + (clojure.core and or when when-not when-let when-first if-not if-let cond condp case)) + ("Loop" + (clojure.core for doseq dotimes while)) + ("Arrange" + (clojure.core .. doto ->)) + ("Scope" + (clojure.core binding locking time) + (clojure.core with-in-str with-local-vars with-open with-out-str with-precision with-redefs with-redefs-fn)) + ("Lazy" + (clojure.core lazy-cat lazy-seq delay delay?)) + ("Doc." + (clojure.core assert comment) + (clojure.repl doc dir dir-fn source-fn))) + + ("Java Interop" + (:url "Documentation" "http://clojure.org/java_interop") + ("General" + (:special new set!) + (clojure.core .. doto bean comparator enumeration-seq import iterator-seq memfn definterface supers bases)) + ("Cast" + (clojure.core boolean byte short char int long float double bigdec bigint num cast biginteger)) + ("Java Arrays" + ("Create" + (clojure.core boolean-array byte-array double-array char-array float-array int-array long-array make-array object-array short-array to-array)) + ("Manipulate" + (clojure.core aclone aget aset alength amap areduce aset-int aset-long aset-short aset-boolean aset-byte aset-char aset-double aset-float)) + ("Cast" + (clojure.core booleans bytes chars doubles floats ints longs shorts))) + ("Exceptions" + (:special throw try catch finally) + (clojure.core ex-info ex-data) + (clojure.repl pst))) + + ("Namespaces" + (:url "Documentation" "http://clojure.org/namespaces") + ("Current" + (clojure.core *ns*)) + ("Create Switch" + (clojure.core ns in-ns create-ns)) + ("Add" + (clojure.core alias import intern refer refer-clojure)) + ("Find" + (clojure.core all-ns find-ns)) + ("Examine" + (clojure.core ns-aliases ns-imports ns-interns ns-map ns-name ns-publics ns-refers)) + ("From symbol" + (clojure.core resolve namespace ns-resolve the-ns)) + ("Remove" + (clojure.core ns-unalias ns-unmap remove-ns))) + ("Loading" + ("Load libs" + (clojure.core require use import refer)) + ("List Loaded" + (clojure.core loaded-libs)) + ("Load Misc" + (clojure.core load load-file load-reader load-string))) + + ("Concurrency" + (:url "Documentation" "http://clojure.org/atoms") + ("Atoms" + (clojure.core atom swap! reset! compare-and-set!)) + ("Futures" + (clojure.core future future-call future-cancel future-cancelled? future-done? future?)) + ("Threads" + (clojure.core bound-fn bound-fn* get-thread-bindings pop-thread-bindings push-thread-bindings)) + + ("Misc" + (clojure.core locking pcalls pvalues pmap seque promise deliver)) + + ("Refs & Transactions" + (:url "Documentation" "http://clojure.org/refs") + ("Create" + (clojure.core ref)) + ("Examine" + (clojure.core deref)) + ("Transaction" + (clojure.core sync dosync io!)) + ("In Transaction" + (clojure.core ensure ref-set alter commute)) + ("Validators" + (clojure.core get-validator set-validator!)) + ("History" + (clojure.core ref-history-count ref-max-history ref-min-history))) + + ("Agents & Asynchronous Actions" + (:url "Documentation" "http://clojure.org/agents") + ("Create" + (clojure.core agent)) + ("Examine" + (clojure.core agent-error)) + ("Change State" + (clojure.core send send-off restart-agent send-via set-agent-send-executor! set-agent-send-off-executor!)) + ("Block Waiting" + (clojure.core await await-for)) + ("Ref Validators" + (clojure.core get-validator set-validator!)) + ("Watchers" + (clojure.core add-watch remove-watch)) + ("Thread Handling" + (clojure.core shutdown-agents)) + ("Error" + (clojure.core error-handler set-error-handler! error-mode set-error-mode!)) + ("Misc" + (clojure.core *agent* release-pending-sends)))) + + ("Sequences" + ("Creating a Lazy Seq" + ("From Collection" + (clojure.core seq sequence keys vals rseq subseq rsubseq)) + ("From Producer Fn" + (clojure.core lazy-seq repeatedly iterate)) + ("From Constant" + (clojure.core repeat range)) + ("From Other" + (clojure.core file-seq line-seq resultset-seq re-seq tree-seq xml-seq iterator-seq enumeration-seq)) + ("From Seq" + (clojure.core keep keep-indexed))) + + ("Seq in, Seq out" + ("Get shorter" + (clojure.core distinct filter remove for)) + ("Get longer" + (clojure.core cons conj concat lazy-cat mapcat cycle interleave interpose))) + ("Tail-items" + (clojure.core rest nthrest fnext nnext drop drop-while take-last for)) + ("Head-items" + (clojure.core take take-nth take-while butlast drop-last for)) + ("'Change'" + (clojure.core conj concat distinct flatten group-by partition partition-all partition-by split-at split-with filter remove replace shuffle)) + ("Rearrange" + (clojure.core reverse sort sort-by compare)) + ("Process items" + (clojure.core map pmap map-indexed mapcat for replace seque)) + + ("Using a Seq" + ("Extract item" + (clojure.core first second last rest next ffirst nfirst fnext nnext nth nthnext rand-nth when-first max-key min-key)) + ("Construct coll" + (clojure.core zipmap into reduce reductions set vec into-array to-array-2d)) + ("Pass to fn" + (clojure.core apply)) + ("Search" + (clojure.core some filter)) + ("Force evaluation" + (clojure.core doseq dorun doall)) + ("Check for forced" + (clojure.core realized?)))) + + ("Zippers" + ("Create" + (clojure.zip zipper seq-zip vector-zip xml-zip)) + ("Get loc" + (clojure.zip up down left right leftmost rightmost)) + ("Get seq" + (clojure.zip lefts rights path children)) + ("'Change'" + (clojure.zip make-node replace edit insert-child insert-left insert-right append-child remove)) + ("Move" + (clojure.zip next prev)) + ("XML" + (clojure.data.zip.xml attr attr= seq-test tag= text text= xml-> xml1->)) + ("Misc" + (clojure.zip root node branch? end?))) + + ("Documentation" + ("REPL" + (clojure.repl doc find-doc apropos source pst) + (clojure.java.javadoc javadoc))) + + ("Transients" + (:url "Documentation" "http://clojure.org/transients") + ("Create") + (clojure.core transient persistent!) + ("Change") + (clojure.core conj! pop! assoc! dissoc! disj!)) + ("Misc" + ("Compare" + (clojure.core = == identical? not= not compare) + (clojure.data diff)) + ("Test" + (clojure.core true? false? nil? instance?))) + + ("IO" + ("To/from ..." + (clojure.core spit slurp)) + ("To *out*" + (clojure.core pr prn print printf println newline) + (clojure.pprint print-table)) + ("To writer" + (clojure.pprint pprint cl-format)) + ("To string" + (clojure.core format with-out-str pr-str prn-str print-str println-str)) + ("From *in*" + (clojure.core read-line read)) + ("From reader" + (clojure.core line-seq read)) + ("From string" + (clojure.core read-string with-in-str)) + ("Open" + (clojure.core with-open) + (clojure.java.io reader writer input-stream output-stream)) + ("Interop" + (clojure.java.io make-writer make-reader make-output-stream make-input-stream)) + ("Misc" + (clojure.core flush file-seq *in* *out* *err*) + (clojure.java.io file copy delete-file resource as-file as-url as-relative-path make-parents))) + + ("Metadata" + (clojure.core meta with-meta alter-meta! reset-meta! vary-meta)) + + ("Special Forms" + (:url "Documentation" "http://clojure.org/special_forms") + (:special def if do quote var recur throw try monitor-enter monitor-exit) + (clojure.core fn loop) + ("Binding / Destructuring" + (clojure.core let fn letfn defn defmacro loop for doseq if-let when-let))) + ("Async" + ("Main" + (clojure.core.async go go-loop ! >!! chan put! take take! close! timeout)) + ("Choice" + (clojure.core.async alt! alt!! alts! alts!! do-alts)) + ("Buffering" + (clojure.core.async buffer dropping-buffer sliding-buffer unblocking-buffer?)) + ("Threading" + (clojure.core.async thread thread-call)) + + ("Mixing" + (clojure.core.async admix solo-mode mix unmix unmix-all toggle merge pipe unique)) + ("Multiples" + (clojure.core.async mult tap untap untap-all)) + ("Publish/Subscribe" + (clojure.core.async pub sub unsub unsub-all)) + ("Higher Order" + (clojure.core.async filter< filter> map map< map> mapcat< mapcat> partition partition-by reduce remove< remove> split)) + ("Pre-Populate" + (clojure.core.async into onto-chan to-chan))) + ("Unit Tests" + ("Defining" + (clojure.test deftest deftest- testing is are)) + ("Running" + (clojure.test run-tests run-all-tests)) + ("Fixtures" + (clojure.test use-fixtures join-fixtures compose-fixtures)))) + "A data structure designed for the maintainer's convenience, which we +transform into the format that helm requires. + +It's a tree, where the head of each list determines the context of the rest of the list. +The head may be: + + A string, in which case it's a (sub)heading for the rest of the items. + A symbol, in which case it's the Clojure namespace of the symbols that follow it. + The keyword :special, in which case it's a Clojure special form - a symbol with no + Any other keyword, in which case it's a typed item that will be passed + through and handled in `clojure-cheatsheet/item-to-helm-source'.") + +;;; We could just make dash.el a dependency, but I'm not sure it's worth it for one utility macro. +(defmacro clojure-cheatsheet/->> + (&rest body) + (let ((result (pop body))) + (dolist (form body result) + (setq result (append (if (sequencep form) + form + (list form)) + (list result)))))) + +(defun clojure-cheatsheet/treewalk + (before after node) + "Walk a tree. Invoke BEFORE before the walk, and AFTER after it, on each NODE." + (clojure-cheatsheet/->> node + (funcall before) + ((lambda (new-node) + (if (listp new-node) + (mapcar (lambda (child) + (clojure-cheatsheet/treewalk before after child)) + new-node) + new-node))) + (funcall after))) + +(defun clojure-cheatsheet/symbol-qualifier + (namespace symbol) + "Given a (Clojure) namespace and a symbol, fully-qualify that symbol." + (intern (format "%s/%s" namespace symbol))) + +(defun clojure-cheatsheet/string-qualifier + (head subnode) + (cond + ((keywordp (car subnode)) (list head subnode)) + ((symbolp (car subnode)) (cons head subnode)) + ((stringp (car subnode)) (cons (format "%s : %s" head (car subnode)) + (cdr subnode))) + (t (mapcar (apply-partially 'clojure-cheatsheet/string-qualifier head) subnode)))) + +(defun clojure-cheatsheet/propagate-headings + (node) + (clojure-cheatsheet/treewalk + #'identity + (lambda (item) + (if (listp item) + (destructuring-bind (head &rest tail) item + (cond ((equal :special head) tail) + ((keywordp head) item) + ((symbolp head) (mapcar (apply-partially #'clojure-cheatsheet/symbol-qualifier head) tail)) + ((stringp head) (mapcar (apply-partially #'clojure-cheatsheet/string-qualifier head) tail)) + (t item))) + item)) + node)) + +(defun clojure-cheatsheet/flatten + (node) + "Flatten NODE, which is a tree structure, into a list of its leaves." + (cond + ((not (listp node)) node) + ((keywordp (car node)) node) + ((listp (car node)) (apply 'append (mapcar 'clojure-cheatsheet/flatten node))) + (t (list (mapcar 'clojure-cheatsheet/flatten node))))) + +(defun clojure-cheatsheet/group-by-head + (data) + "Group the DATA, which should be a list of lists, by the head of each list." + (let ((result '())) + (dolist (item data result) + (let* ((head (car item)) + (tail (cdr item)) + (current (cdr (assoc head result)))) + (if current + (setf (cdr (assoc head result)) + (append current tail)) + (setq result (append result (list item)))))))) + +(defun clojure-cheatsheet/lookup-doc + (symbol) + (if (nrepl-current-connection-buffer) + (cider-doc-lookup symbol) + (error "nREPL not connected!"))) + +(defun clojure-cheatsheet/lookup-src + (symbol) + (if (nrepl-current-connection-buffer) + (cider-src-handler symbol) + (error "nREPL not connected!"))) + +(defun clojure-cheatsheet/item-to-helm-source + (item) + "Turn ITEM, which will be (\"HEADING\" candidates...), into a helm-source." + (destructuring-bind (heading &rest entries) item + `((name . ,heading) + (candidates ,@(mapcar (lambda (item) + (if (and (listp item) + (keywordp (car item))) + (destructuring-bind (kind title value) item + (cons title + (list kind value))) + item)) + entries)) + (match . ((lambda (candidate) + (helm-mp-3-match (format "%s %s" candidate ,heading))))) + (action-transformer (lambda (action-list current-selection) + (if (and (listp current-selection) + (eq (car current-selection) :url)) + '(("Browse" . (lambda (item) + (helm-browse-url (cadr item))))) + '(("Lookup Docs" . clojure-cheatsheet/lookup-doc) + ("Lookup Source" . clojure-cheatsheet/lookup-src)))))))) + +(defvar helm-source-clojure-cheatsheet + (clojure-cheatsheet/->> clojure-cheatsheet-hierarchy + clojure-cheatsheet/propagate-headings + clojure-cheatsheet/flatten + clojure-cheatsheet/group-by-head + (mapcar 'clojure-cheatsheet/item-to-helm-source))) + +;;;###autoload +(defun clojure-cheatsheet () + "Use helm to show a Clojure cheatsheet." + (interactive) + (helm :sources helm-source-clojure-cheatsheet)) + +(provide 'clojure-cheatsheet) + +;;; clojure-cheatsheet.el ends here diff --git a/elpa/clojure-cheatsheet-20140316.1520/clojure-cheatsheet.elc b/elpa/clojure-cheatsheet-20140316.1520/clojure-cheatsheet.elc new file mode 100644 index 0000000000000000000000000000000000000000..b24871b6860a47486e1196b16de268617457e156 GIT binary patch literal 18991 zcmcJX{c{t^naBC>BiBOA6-N8y>CneL~be){R>wOijjeYy8?YvxV?NZO#4aK zwa?uk9zEu-j9$f^CwcyHy`OjDzRNRr5RcsM_{h0?u65^r>+Ad5x82re>$ZXD75TvR z0OB^jFO#C&0LI38GKf3ndUqq~595taKmRZ;lBjc>0RK2iMv7xzJNI7$cUkMW2K<@$B|`0h9@JzC>3DP8wG ziw9}Pb@NU+D$?wzyv5g|9J#pLW&D$VTKCqs?loX^b6{lo$aV5;6jOOT>P27kCX03t z_FlYjo#VKOJ0p<1W!=YF*Oj^J#F=X+uAj#;MAtW>T-fgX3zwvly^J};3y74G>%-py$ zf|Fb~Dbu5jdF$mOUIO#dlE0+5S!$9_k_@Pwx=!7YS8D zS=HCCzpJ1O;&Yhe{`KpQ0eY^yB}ViZcj7W}sYha^9Jg21GmJYKavgFyN(LZpfX)Z) zyuT2T@Y(Zg(Xkwoau|1#3c1qSX$%mfm-qYmDcuXE5dN5)pXNo^-7kkpCyf`wk0;PW zE#W$F5oGkxoh{ic7oyp@%R#89Krh4?`kxQAJQ<(I>@;P;v!sS`SteZoIo=of_y|$J znqwVxCC?z^|2Dl-OBQJ<3XD>ui|cjI2t6Qw8K*XbGY8g;hR50f;G3{{xL>^6pUn$cVU|j zSa#stGY9vqt^z~iI4+U~fQRnkLy4bU~S*V;WvN2h7oY}Zalk*E^x zktCSPoj!ucO1*wMv_kcX^`shQ;%k=2X>SzulV1I?NRN*F^GMvS`e%9JM-Z2z2Ko{t zt~}0*5t0xNX8pMyGLf~DkK1UDc6uaoaMLG$OOD`;Y&>v<$@RFO{+L)7@94A9MV9st z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nXPke0jCfw?Wlf*umI*Uf`o8u6`t7 zW%=8uyZbM`d%mn+;^=CZa8eQyTAi%^+7AJIlBLBZb3YzXm+sQ5EfokBcgdmTyM9i+(J6EP?)V9{;0FHd6+%hf4a6$vGwH1lOQ6DZ}E@| z9is`V%juUfJ}IPa2hEfwm42O9R(FK_ogmEa1kLrFcRSyUQGYix(m$y3bU@NyUsd|; zH`gBj_6rtm@7BH{Kcir58AWU+BD8_M8#%UFc5#JAxOlcnqWX=9q1*nf;jtp$GbHWU z>c@k27n^P})>R0_k3S5C(Kd;H+tg*TH#0V5YD{Xnl@-6?BC_bIjB*UNl?r0`CPC?f zKp^=T4prcA5aC#n*|?$_Y+ns)wO)lRB8U}>zA4Ot+oGSG@P`(bCqvP!1K)-*J*Xf^ zT^aIxl*6NzFa6rz=jin^-p>MkF%?A$pM?4c7J0h71^zL7!6EcEOtDt6Bst;B(^t#Ham54(Es6Z~I5eKAlqJ6+(JHg=Ck?pjiukRA73e+PjS+YIr znORSLB5pdu1TKfH84C61KI2DxVa(+0PjV5fCk8hFoSTm`6 zQe|LuW`Iv(RAeEaurbSe>`R3`peAQ+P>uS=KnoxE_I^=;&4tset0=xx| z26hs(#T${|VLV85T1f|CPmTHbqDy()Rc8bDRun~#LRQMiq(y$jT0(rCUJUVdestX6 X!8$l63l(k3OVspXLdIZ}eu{noSB$xF literal 0 HcmV?d00001 diff --git a/elpa/clojure-mode-20140804.823/clojure-mode.el b/elpa/clojure-mode-20140804.823/clojure-mode.el new file mode 100644 index 000000000..1cd630684 --- /dev/null +++ b/elpa/clojure-mode-20140804.823/clojure-mode.el @@ -0,0 +1,1093 @@ +;;; clojure-mode.el --- Major mode for Clojure code + +;; Copyright © 2007-2014 Jeffrey Chu, Lennart Staflin, Phil Hagelberg +;; Copyright © 2013-2014 Bozhidar Batsov +;; +;; Authors: Jeffrey Chu +;; Lennart Staflin +;; Phil Hagelberg +;; Bozhidar Batsov +;; URL: http://github.com/clojure-emacs/clojure-mode +;; Version: 20140804.823 +;; X-Original-Version: 3.0.0-cvs +;; Keywords: languages, lisp + +;; This file is not part of GNU Emacs. + +;;; Commentary: + +;; Provides font-lock, indentation, and navigation for the Clojure +;; programming language (http://clojure.org). + +;; Users of older Emacs (pre-22) should get version 1.4: +;; http://github.com/clojure-emacs/clojure-mode/tree/1.4 + +;; Slime integration has been removed; see the 1.x releases if you need it. + +;; Using clojure-mode with paredit is highly recommended. Use paredit +;; as you would with any other minor mode; for instance: +;; +;; ;; require or autoload paredit-mode +;; (add-hook 'clojure-mode-hook 'paredit-mode) + +;; See CIDER (http://github.com/clojure-emacs/cider) for +;; better interaction with subprocesses via nREPL. + +;;; License: + +;; 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 GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Code: + + +;;; Compatibility +(eval-and-compile + ;; `setq-local' for Emacs 24.2 and below + (unless (fboundp 'setq-local) + (defmacro setq-local (var val) + "Set variable VAR to value VAL in current buffer." + `(set (make-local-variable ',var) ,val)))) + +(eval-when-compile + (defvar calculate-lisp-indent-last-sexp) + (defvar font-lock-beg) + (defvar font-lock-end) + (defvar paredit-space-for-delimiter-predicates) + (defvar paredit-version) + (defvar paredit-mode)) + +(require 'cl) +(require 'tramp) +(require 'inf-lisp) +(require 'imenu) + +(declare-function lisp-fill-paragraph "lisp-mode" (&optional justify)) + +(defgroup clojure nil + "A mode for Clojure" + :prefix "clojure-" + :group 'languages + :link '(url-link :tag "Github" "https://github.com/clojure-emacs/clojure-mode") + :link '(emacs-commentary-link :tag "Commentary" "clojure-mode")) + +(defface clojure-keyword-face + '((t (:inherit font-lock-constant-face))) + "Face used to font-lock Clojure keywords (:something)." + :group 'clojure + :package-version '(clojure-mode . "3.0.0")) + +(defface clojure-character-face + '((t (:inherit font-lock-string-face))) + "Face used to font-lock Clojure character literals." + :group 'clojure + :package-version '(clojure-mode . "3.0.0")) + +(defface clojure-interop-method-face + '((t (:inherit font-lock-preprocessor-face))) + "Face used to font-lock interop method names (camelCase)." + :group 'clojure + :package-version '(clojure-mode . "3.0.0")) + +(defcustom clojure-load-command "(clojure.core/load-file \"%s\")\n" + "Format-string for building a Clojure expression to load a file. +This format string should use `%s' to substitute a file name and +should result in a Clojure expression that will command the +inferior Clojure to load that file." + :type 'string + :group 'clojure + :safe 'stringp) + +(defcustom clojure-inf-lisp-command "lein repl" + "The command used by `inferior-lisp-program'." + :type 'string + :group 'clojure + :safe 'stringp) + +(defcustom clojure-defun-style-default-indent nil + "When non-nil, use default indenting for functions and macros. +Otherwise check `define-clojure-indent' and `put-clojure-indent'." + :type 'boolean + :group 'clojure + :safe 'booleanp) + +(defcustom clojure-use-backtracking-indent t + "When non-nil, enable context sensitive indentation." + :type 'boolean + :group 'clojure + :safe 'booleanp) + +(defcustom clojure-max-backtracking 3 + "Maximum amount to backtrack up a list to check for context." + :type 'integer + :group 'clojure + :safe 'integerp) + +(defcustom clojure-docstring-fill-column fill-column + "Value of `fill-column' to use when filling a docstring." + :type 'integer + :group 'clojure + :safe 'integerp) + +(defcustom clojure-docstring-fill-prefix-width 2 + "Width of `fill-prefix' when filling a docstring. +The default value conforms with the de facto convention for +Clojure docstrings, aligning the second line with the opening +double quotes on the third column." + :type 'integer + :group 'clojure + :safe 'integerp) + +(defcustom clojure-omit-space-between-tag-and-delimiters '(?\[ ?\{) + "Allowed opening delimiter characters after a reader literal tag. +For example, \[ is allowed in :db/id[:db.part/user]." + :type '(set (const :tag "[" ?\[) + (const :tag "{" ?\{) + (const :tag "(" ?\() + (const :tag "\"" ?\")) + :group 'clojure + :safe (lambda (value) + (and (listp value) + (every 'characterp value)))) + +(defvar clojure-mode-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map lisp-mode-shared-map) + (define-key map (kbd "C-M-x") 'lisp-eval-defun) + (define-key map (kbd "C-x C-e") 'lisp-eval-last-sexp) + (define-key map (kbd "C-c C-e") 'lisp-eval-last-sexp) + (define-key map (kbd "C-c C-l") 'clojure-load-file) + (define-key map (kbd "C-c C-r") 'lisp-eval-region) + (define-key map (kbd "C-c C-z") 'clojure-display-inferior-lisp-buffer) + (define-key map (kbd "C-:") 'clojure-toggle-keyword-string) + (easy-menu-define clojure-mode-menu map "Clojure Mode menu" + '("Clojure" + ["Eval Top-Level Expression" lisp-eval-defun] + ["Eval Last Expression" lisp-eval-last-sexp] + ["Eval Region" lisp-eval-region] + "--" + ["Run Inferior Lisp" clojure-display-inferior-lisp-buffer] + ["Display Inferior Lisp Buffer" clojure-display-inferior-lisp-buffer] + ["Load File" clojure-load-file] + "--" + ["Toggle between string & keyword" clojure-toggle-keyword-string] + ["Mark string" clojure-mark-string] + ["Insert ns form at point" clojure-insert-ns-form-at-point] + ["Insert ns form at beginning" clojure-insert-ns-form] + ["Update ns form" clojure-update-ns] + "--" + ["Version" clojure-mode-display-version])) + map) + "Keymap for Clojure mode. Inherits from `lisp-mode-shared-map'.") + +(defvar clojure-mode-syntax-table + (let ((table (copy-syntax-table emacs-lisp-mode-syntax-table))) + (modify-syntax-entry ?~ "' " table) + (modify-syntax-entry ?\{ "(}" table) + (modify-syntax-entry ?\} "){" table) + (modify-syntax-entry ?\[ "(]" table) + (modify-syntax-entry ?\] ")[" table) + (modify-syntax-entry ?^ "'" table) + ;; Make hash a usual word character + (modify-syntax-entry ?# "_ p" table) + table)) + +(defvar clojure-prev-l/c-dir/file nil + "Record last directory and file used in loading or compiling. +This holds a cons cell of the form `(DIRECTORY . FILE)' +describing the last `clojure-load-file' or `clojure-compile-file' command.") + +(defconst clojure-mode-version "3.0.0-snapshot" + "The current version of `clojure-mode'.") + +(defun clojure-mode-display-version () + "Display the current `clojure-mode-version' in the minibuffer." + (interactive) + (message "clojure-mode (version %s)" clojure-mode-version)) + +;; For compatibility with Emacs < 24, derive conditionally +(defalias 'clojure-parent-mode + (if (fboundp 'prog-mode) 'prog-mode 'fundamental-mode)) + +(defun clojure-space-for-delimiter-p (endp delim) + "Prevent paredit from inserting useless spaces. +See `paredit-space-for-delimiter-predicates' for the meaning of +ENDP and DELIM." + (if (derived-mode-p 'clojure-mode) + (save-excursion + (backward-char) + (if (and (or (char-equal delim ?\() + (char-equal delim ?\") + (char-equal delim ?{)) + (not endp)) + (if (char-equal (char-after) ?#) + (and (not (bobp)) + (or (char-equal ?w (char-syntax (char-before))) + (char-equal ?_ (char-syntax (char-before))))) + t) + t)) + t)) + +(defun clojure-no-space-after-tag (endp delimiter) + "Prevent inserting a space after a reader-literal tag? + +When a reader-literal tag is followed be an opening delimiter +listed in `clojure-omit-space-between-tag-and-delimiters', this +function returns t. + +This allows you to write things like #db/id[:db.part/user] +without inserting a space between the tag and the opening +bracket. + +See `paredit-space-for-delimiter-predicates' for the meaning of +ENDP and DELIMITER." + (if endp + t + (or (not (member delimiter clojure-omit-space-between-tag-and-delimiters)) + (save-excursion + (let ((orig-point (point))) + (not (and (re-search-backward + "#\\([a-zA-Z0-9._-]+/\\)?[a-zA-Z0-9._-]+" + (line-beginning-position) + t) + (= orig-point (match-end 0))))))))) + +;;;###autoload +(define-derived-mode clojure-mode clojure-parent-mode "Clojure" + "Major mode for editing Clojure code. + +\\{clojure-mode-map}" + (setq-local imenu-create-index-function + (lambda () + (imenu--generic-function '((nil clojure-match-next-def 0))))) + (setq-local indent-tabs-mode nil) + (lisp-mode-variables nil) + (setq fill-paragraph-function 'clojure-fill-paragraph) + (setq adaptive-fill-function 'clojure-adaptive-fill-function) + (setq-local normal-auto-fill-function 'clojure-auto-fill-function) + (setq-local comment-start-skip + "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\)\\(;+\\|#|\\) *") + (setq-local indent-line-function 'clojure-indent-line) + (setq-local lisp-indent-function 'clojure-indent-function) + (when (< emacs-major-version 24) + (setq-local forward-sexp-function 'clojure-forward-sexp)) + (setq-local lisp-doc-string-elt-property 'clojure-doc-string-elt) + (setq-local inferior-lisp-program clojure-inf-lisp-command) + (setq-local parse-sexp-ignore-comments t) + (clojure-mode-font-lock-setup) + (setq-local open-paren-in-column-0-is-defun-start nil) + (add-hook 'paredit-mode-hook + (lambda () + (when (>= paredit-version 21) + (define-key clojure-mode-map "{" 'paredit-open-curly) + (define-key clojure-mode-map "}" 'paredit-close-curly) + (add-to-list 'paredit-space-for-delimiter-predicates + 'clojure-space-for-delimiter-p) + (add-to-list 'paredit-space-for-delimiter-predicates + 'clojure-no-space-after-tag))))) + +(defsubst clojure-in-docstring-p () + "Check whether point is in a docstring." + (eq (get-text-property (1- (point-at-eol)) 'face) + 'font-lock-doc-face)) + +(defsubst clojure-docstring-fill-prefix () + "The prefix string used by `clojure-fill-paragraph'. + +It is simply `clojure-docstring-fill-prefix-width' number of spaces." + (make-string clojure-docstring-fill-prefix-width ? )) + +(defun clojure-adaptive-fill-function () + "Clojure adaptive fill function. +This only takes care of filling docstring correctly." + (when (clojure-in-docstring-p) + (clojure-docstring-fill-prefix))) + +(defun clojure-fill-paragraph (&optional justify) + "Like `fill-paragraph' but handle Clojure docstrings." + (if (clojure-in-docstring-p) + (let ((paragraph-start + (concat paragraph-start + "\\|\\s-*\\([(;:\"[]\\|~@\\|`(\\|#'(\\)")) + (paragraph-separate + (concat paragraph-separate "\\|\\s-*\".*[,\\.]$")) + (fill-column (or clojure-docstring-fill-column fill-column)) + (fill-prefix (clojure-docstring-fill-prefix))) + (fill-paragraph justify)) + (let ((paragraph-start (concat paragraph-start + "\\|\\s-*\\([(;:\"[]\\|`(\\|#'(\\)")) + (paragraph-separate + (concat paragraph-separate "\\|\\s-*\".*[,\\.[]$"))) + (or (fill-comment-paragraph justify) + (fill-paragraph justify)) + ;; Always return `t' + t))) + +(defun clojure-auto-fill-function () + "Clojure auto-fill function." + ;; Check if auto-filling is meaningful. + (let ((fc (current-fill-column))) + (when (and fc (> (current-column) fc)) + (let ((fill-column (if (clojure-in-docstring-p) + clojure-docstring-fill-column + fill-column)) + (fill-prefix (clojure-adaptive-fill-function))) + (do-auto-fill))))) + +(defun clojure-display-inferior-lisp-buffer () + "Display a buffer bound to `inferior-lisp-buffer'." + (interactive) + (if (and inferior-lisp-buffer (get-buffer inferior-lisp-buffer)) + (pop-to-buffer inferior-lisp-buffer t) + (run-lisp inferior-lisp-program))) + +(defun clojure-load-file (file-name) + "Load a Clojure file FILE-NAME into the inferior Clojure process." + (interactive (comint-get-source "Load Clojure file: " + clojure-prev-l/c-dir/file + '(clojure-mode) t)) + (comint-check-source file-name) ; Check to see if buffer needs saved. + (setq clojure-prev-l/c-dir/file (cons (file-name-directory file-name) + (file-name-nondirectory file-name))) + (comint-send-string (inferior-lisp-proc) + (format clojure-load-command file-name)) + (switch-to-lisp t)) + + + +(defun clojure-match-next-def () + "Scans the buffer backwards for the next top-level definition. +Called by `imenu--generic-function'." + (when (re-search-backward "^(def\\sw*" nil t) + (save-excursion + (let (found? + (start (point))) + (down-list) + (forward-sexp) + (while (not found?) + (forward-sexp) + (or (if (char-equal ?[ (char-after (point))) + (backward-sexp)) + (if (char-equal ?) (char-after (point))) + (backward-sexp))) + (destructuring-bind (def-beg . def-end) (bounds-of-thing-at-point 'sexp) + (if (char-equal ?^ (char-after def-beg)) + (progn (forward-sexp) (backward-sexp)) + (setq found? t) + (set-match-data (list def-beg def-end))))) + (goto-char start))))) + +(defconst clojure-font-lock-keywords + (eval-when-compile + `(;; Top-level variable definition + (,(concat "(\\(?:clojure.core/\\)?\\(" + (regexp-opt '("def" "defonce")) + ;; variable declarations + "\\)\\>" + ;; Any whitespace + "[ \r\n\t]*" + ;; Possibly type or metadata + "\\(?:#?^\\(?:{[^}]*}\\|\\sw+\\)[ \r\n\t]*\\)*" + "\\(\\sw+\\)?") + (1 font-lock-keyword-face) + (2 font-lock-variable-name-face nil t)) + ;; Type definition + (,(concat "(\\(?:clojure.core/\\)?\\(" + (regexp-opt '("defstruct" "deftype" "defprotocol" + "defrecord")) + ;; type declarations + "\\)\\>" + ;; Any whitespace + "[ \r\n\t]*" + ;; Possibly type or metadata + "\\(?:#?^\\(?:{[^}]*}\\|\\sw+\\)[ \r\n\t]*\\)*" + "\\(\\sw+\\)?") + (1 font-lock-keyword-face) + (2 font-lock-type-face nil t)) + ;; Function definition (anything that starts with def and is not + ;; listed above) + (,(concat "(\\(?:[a-z\.-]+/\\)?\\(def\[a-z\-\]*-?\\)" + ;; Function declarations + "\\>" + ;; Any whitespace + "[ \r\n\t]*" + ;; Possibly type or metadata + "\\(?:#?^\\(?:{[^}]*}\\|\\sw+\\)[ \r\n\t]*\\)*" + "\\(\\sw+\\)?") + (1 font-lock-keyword-face) + (2 font-lock-function-name-face nil t)) + ;; (fn name? args ...) + (,(concat "(\\(?:clojure.core/\\)?\\(fn\\)[ \t]+" + ;; Possibly type + "\\(?:#?^\\sw+[ \t]*\\)?" + ;; Possibly name + "\\(t\\sw+\\)?" ) + (1 font-lock-keyword-face) + (2 font-lock-function-name-face nil t)) + ;; lambda arguments - %, %1, %2, etc + ("\\<%[1-9]?" (0 font-lock-variable-name-face)) + ;; (ns namespace) + (,(concat "(\\(?:clojure.core/\\)?ns[ \t]+" + ;; namespace + "\\(\\sw+\\)" ) + (1 font-lock-type-face nil t)) + ;; Special forms & control structures + (,(concat + "(\\(?:clojure.core/\\)?" + (regexp-opt + '("let" "letfn" "do" + "case" "cond" "condp" + "for" "loop" "recur" + "when" "when-not" "when-let" "when-first" "when-some" + "if" "if-let" "if-not" "if-some" + "." ".." "->" "->>" "doto" + "and" "or" + "dosync" "doseq" "dotimes" "dorun" "doall" + "load" "import" "unimport" "ns" "in-ns" "refer" + "try" "catch" "finally" "throw" + "with-open" "with-local-vars" "binding" + "gen-class" "gen-and-load-class" "gen-and-save-class" + "handler-case" "handle" "var" "declare") t) + "\\>") + 1 font-lock-keyword-face) + (,(concat + "\\<" + (regexp-opt + '("*1" "*2" "*3" "*agent*" + "*allow-unresolved-vars*" "*assert*" "*clojure-version*" + "*command-line-args*" "*compile-files*" + "*compile-path*" "*e" "*err*" "*file*" "*flush-on-newline*" + "*in*" "*macro-meta*" "*math-context*" "*ns*" "*out*" + "*print-dup*" "*print-length*" "*print-level*" + "*print-meta*" "*print-readably*" + "*read-eval*" "*source-path*" + "*use-context-classloader*" "*warn-on-reflection*") + t) + "\\>") + 0 font-lock-builtin-face) + ;; Dynamic variables - *something* + ("\\<\\*[a-z-]*\\*\\>" 0 font-lock-variable-name-face) + ;; Global constants - nil, true, false + (,(concat + "\\<" + (regexp-opt + '("true" "false" "nil") t) + "\\>") + 0 font-lock-constant-face) + ;; Character literals - \1, \a, \newline, \u0000 + ;; FIXME: handle properly punctuations characters (commas after a character are problematic) + ("\\\\[a-z0-9]+\\>" 0 'clojure-character-face) + ;; Constant values (keywords), including as metadata e.g. ^:static + ("\\<^?\\(:\\(\\sw\\|\\s_\\)+\\(\\>\\|\\_>\\)\\)" 1 'clojure-keyword-face) + ;; cljx annotations (#+clj and #+cljs) + ("#\\+cljs?\\>" 0 font-lock-preprocessor-face) + ;; Java interop highlighting + ;; CONST SOME_CONST (optionally prefixed by /) + ("\\(?:\\<\\|/\\)\\([A-Z]+\\|\\([A-Z]+_[A-Z1-9_]+\\)\\)\\>" 1 font-lock-constant-face) + ;; .foo .barBaz .qux01 .-flibble .-flibbleWobble + ("\\<\\.-?[a-z][a-zA-Z0-9]*\\>" 0 'clojure-interop-method-face) + ;; Foo Bar$Baz Qux_ World_OpenUDP Foo. Babylon15. + ("\\(?:\\<\\|\\.\\|/\\|#?^\\)\\([A-Z][a-zA-Z0-9_]*[a-zA-Z0-9$_]+\\.?\\>\\)" 1 font-lock-type-face) + ;; foo.bar.baz + ("\\<[a-z][a-z0-9_-]+\\.\\([a-z][a-z0-9_-]+\\.?\\)+" 0 font-lock-type-face) + ;; foo/ Foo/ + ("\\<\\([a-zA-Z][a-z0-9_-]*\\)/" 1 font-lock-type-face) + ;; fooBar + ("\\(?:\\<\\|/\\)\\([a-z]+[A-Z]+[a-z][a-zA-Z0-9$]*\\>\\)" 1 'clojure-interop-method-face) + ;; Highlight grouping constructs in regular expressions + (clojure-mode-font-lock-regexp-groups + (1 'font-lock-regexp-grouping-construct prepend)))) + "Default expressions to highlight in Clojure mode.") + +(defun clojure-mode-font-lock-setup () + "Configures font-lock for editing Clojure code." + (interactive) + (setq-local font-lock-multiline t) + (add-to-list 'font-lock-extend-region-functions + 'clojure-font-lock-extend-region-def t) + (setq font-lock-defaults + '(clojure-font-lock-keywords ; keywords + nil nil + (("+-*/.<>=!?$%_&~^:@" . "w")) ; syntax alist + nil + (font-lock-mark-block-function . mark-defun) + (font-lock-syntactic-face-function + . lisp-font-lock-syntactic-face-function)))) + +(defun clojure-font-lock-def-at-point (point) + "Range between the top-most def* and the fourth element after POINT. +Note that this means that there is no guarantee of proper font +locking in def* forms that are not at top level." + (goto-char point) + (condition-case nil + (beginning-of-defun) + (error nil)) + + (let ((beg-def (point))) + (when (and (not (= point beg-def)) + (looking-at "(def")) + (condition-case nil + (progn + ;; move forward as much as possible until failure (or success) + (forward-char) + (dotimes (i 4) + (forward-sexp))) + (error nil)) + (cons beg-def (point))))) + +(defun clojure-font-lock-extend-region-def () + "Set region boundaries to include the first four elements of def* forms." + (let ((changed nil)) + (let ((def (clojure-font-lock-def-at-point font-lock-beg))) + (when def + (destructuring-bind (def-beg . def-end) def + (when (and (< def-beg font-lock-beg) + (< font-lock-beg def-end)) + (setq font-lock-beg def-beg + changed t))))) + (let ((def (clojure-font-lock-def-at-point font-lock-end))) + (when def + (destructuring-bind (def-beg . def-end) def + (when (and (< def-beg font-lock-end) + (< font-lock-end def-end)) + (setq font-lock-end def-end + changed t))))) + changed)) + +(defun clojure-mode-font-lock-regexp-groups (bound) + "Highlight grouping constructs in regular expression. + +BOUND denotes the maximum number of characters (relative to the +point) to check." + (catch 'found + (while (re-search-forward (concat + ;; A group may start using several alternatives: + "\\(\\(?:" + ;; 1. (? special groups + "(\\?\\(?:" + ;; a) non-capturing group (?:X) + ;; b) independent non-capturing group (?>X) + ;; c) zero-width positive lookahead (?=X) + ;; d) zero-width negative lookahead (?!X) + "[:=!>]\\|" + ;; e) zero-width positive lookbehind (?<=X) + ;; f) zero-width negative lookbehind (?X) + "<[[:alnum:]]+>" + "\\)\\|" ;; end of special groups + ;; 2. normal capturing groups ( + ;; 3. we also highlight alternative + ;; separarators |, and closing parens ) + "[|()]" + "\\)\\)") + bound t) + (let ((face (get-text-property (1- (point)) 'face))) + (when (and (or (and (listp face) + (memq 'font-lock-string-face face)) + (eq 'font-lock-string-face face)) + (clojure-string-start t)) + (throw 'found t)))))) + +;; Docstring positions +(put 'ns 'clojure-doc-string-elt 2) +(put 'def 'clojure-doc-string-elt 2) +(put 'defn 'clojure-doc-string-elt 2) +(put 'defn- 'clojure-doc-string-elt 2) +(put 'defmulti 'clojure-doc-string-elt 2) +(put 'defmacro 'clojure-doc-string-elt 2) +(put 'definline 'clojure-doc-string-elt 2) +(put 'defprotocol 'clojure-doc-string-elt 2) + + + +(defun clojure-forward-sexp (n) + "Move forward across one balanced Clojure expression (sexp). + +It treats record literals like #user.Foo[1] and #user.Foo{:size 1} +as a single sexp so that CIDER will send them properly. + +This behavior may not be intuitive when the user presses C-M-f, but +since these are single objects this behavior is okay." + (let ((dir (if (> n 0) 1 -1)) + (forward-sexp-function nil)) ; force the built-in version + (while (not (zerop n)) + (forward-sexp dir) + (when (save-excursion ; move back to see if we're in a record literal + (and + (condition-case nil + (progn (backward-sexp) 't) + ('scan-error nil)) + (looking-at "#\\w"))) + (forward-sexp dir)) ; if so, jump over it + (setq n (- n dir))))) + +(defun clojure-indent-line () + "Indent current line as Clojure code." + (if (clojure-in-docstring-p) + (save-excursion + (beginning-of-line) + (when (looking-at "^\\s-*") + (replace-match (clojure-docstring-fill-prefix)))) + (lisp-indent-line))) + +(defun clojure-indent-function (indent-point state) + "This function is the normal value of the variable `lisp-indent-function'. +It is used when indenting a line within a function call, to see if the +called function says anything special about how to indent the line. + +INDENT-POINT is the position where the user typed TAB, or equivalent. +Point is located at the point to indent under (for default indentation); +STATE is the `parse-partial-sexp' state for that position. + +If the current line is in a call to a Lisp function +which has a non-nil property `lisp-indent-function', +that specifies how to do the indentation. + +The property value can be + +- `defun', meaning indent `defun'-style; +- an integer N, meaning indent the first N arguments specially + like ordinary function arguments and then indent any further + arguments like a body; +- a function to call just as this function was called. + If that function returns nil, that means it doesn't specify + the indentation. + +This function also returns nil meaning don't specify the indentation." + (let ((normal-indent (current-column))) + (goto-char (1+ (elt state 1))) + (parse-partial-sexp (point) calculate-lisp-indent-last-sexp 0 t) + (if (and (elt state 2) + (not (looking-at "\\sw\\|\\s_"))) + ;; car of form doesn't seem to be a symbol + (progn + (if (not (> (save-excursion (forward-line 1) (point)) + calculate-lisp-indent-last-sexp)) + (progn (goto-char calculate-lisp-indent-last-sexp) + (beginning-of-line) + (parse-partial-sexp (point) + calculate-lisp-indent-last-sexp 0 t))) + ;; Indent under the list or under the first sexp on the same + ;; line as calculate-lisp-indent-last-sexp. Note that first + ;; thing on that line has to be complete sexp since we are + ;; inside the innermost containing sexp. + (backward-prefix-chars) + (if (and (eq (char-after (point)) ?\[) + (eq (char-after (elt state 1)) ?\()) + (+ (current-column) 2) ;; this is probably inside a defn + (current-column))) + (let* ((function (buffer-substring (point) + (progn (forward-sexp 1) (point)))) + (open-paren (elt state 1)) + (method nil) + (function-tail (first + (last + (split-string (substring-no-properties function) "/"))))) + (setq method (get (intern-soft function-tail) 'clojure-indent-function)) + (cond ((member (char-after open-paren) '(?\[ ?\{)) + (goto-char open-paren) + (1+ (current-column))) + ((or (eq method 'defun) + (and clojure-defun-style-default-indent + ;; largely to preserve useful alignment of :require, etc in ns + (not (string-match "^:" function)) + (not method)) + (and (null method) + (> (length function) 3) + (string-match "\\`\\(?:\\S +/\\)?\\(def\\|with-\\)" + function))) + (lisp-indent-defform state indent-point)) + ((integerp method) + (lisp-indent-specform method state + indent-point normal-indent)) + (method + (funcall method indent-point state)) + (clojure-use-backtracking-indent + (clojure-backtracking-indent + indent-point state normal-indent))))))) + +(defun clojure-backtracking-indent (indent-point state normal-indent) + "Experimental backtracking support. + +Will upwards in an sexp to check for contextual indenting." + (let (indent (path) (depth 0)) + (goto-char (elt state 1)) + (while (and (not indent) + (< depth clojure-max-backtracking)) + (let ((containing-sexp (point))) + (parse-partial-sexp (1+ containing-sexp) indent-point 1 t) + (when (looking-at "\\sw\\|\\s_") + (let* ((start (point)) + (fn (buffer-substring start (progn (forward-sexp 1) (point)))) + (meth (get (intern-soft fn) 'clojure-backtracking-indent))) + (let ((n 0)) + (when (< (point) indent-point) + (condition-case () + (progn + (forward-sexp 1) + (while (< (point) indent-point) + (parse-partial-sexp (point) indent-point 1 t) + (incf n) + (forward-sexp 1))) + (error nil))) + (push n path)) + (when meth + (let ((def meth)) + (dolist (p path) + (if (and (listp def) + (< p (length def))) + (setq def (nth p def)) + (if (listp def) + (setq def (car (last def))) + (setq def nil)))) + (goto-char (elt state 1)) + (when def + (setq indent (+ (current-column) def))))))) + (goto-char containing-sexp) + (condition-case () + (progn + (backward-up-list 1) + (incf depth)) + (error (setq depth clojure-max-backtracking))))) + indent)) + +;; clojure backtracking indent is experimental and the format for these +;; entries are subject to change +(put 'implement 'clojure-backtracking-indent '(4 (2))) +(put 'letfn 'clojure-backtracking-indent '((2) 2)) +(put 'proxy 'clojure-backtracking-indent '(4 4 (2))) +(put 'reify 'clojure-backtracking-indent '((2))) +(put 'deftype 'clojure-backtracking-indent '(4 4 (2))) +(put 'defrecord 'clojure-backtracking-indent '(4 4 (2))) +(put 'defprotocol 'clojure-backtracking-indent '(4 (2))) +(put 'extend-type 'clojure-backtracking-indent '(4 (2))) +(put 'extend-protocol 'clojure-backtracking-indent '(4 (2))) +(put 'specify 'clojure-backtracking-indent '(4 (2))) +(put 'specify! 'clojure-backtracking-indent '(4 (2))) + +(defun put-clojure-indent (sym indent) + (put sym 'clojure-indent-function indent)) + +(defmacro define-clojure-indent (&rest kvs) + `(progn + ,@(mapcar (lambda (x) `(put-clojure-indent + (quote ,(first x)) ,(second x))) + kvs))) + +(defun add-custom-clojure-indents (name value) + (custom-set-default name value) + (mapcar (lambda (x) + (put-clojure-indent x 'defun)) + value)) + +(defcustom clojure-defun-indents nil + "List of additional symbols with defun-style indentation in Clojure. + +You can use this to let Emacs indent your own macros the same way +that it indents built-in macros like with-open. To manually set +it from Lisp code, use (put-clojure-indent 'some-symbol 'defun)." + :type '(repeat symbol) + :group 'clojure + :set 'add-custom-clojure-indents) + +(define-clojure-indent + ;; built-ins + (ns 1) + (fn 'defun) + (def 'defun) + (defn 'defun) + (bound-fn 'defun) + (if 1) + (if-not 1) + (case 1) + (condp 2) + (when 1) + (while 1) + (when-not 1) + (when-first 1) + (do 0) + (future 0) + (comment 0) + (doto 1) + (locking 1) + (proxy 2) + (with-open 1) + (with-precision 1) + (with-local-vars 1) + + (reify 'defun) + (deftype 2) + (defrecord 2) + (defprotocol 1) + (extend 1) + (extend-protocol 1) + (extend-type 1) + + (try 0) + (catch 2) + (finally 0) + + ;; binding forms + (let 1) + (letfn 1) + (binding 1) + (loop 1) + (for 1) + (doseq 1) + (dotimes 1) + (when-let 1) + (if-let 1) + (when-some 1) + (if-some 1) + + ;; data structures + (defstruct 1) + (struct-map 1) + (assoc 1) + + (defmethod 'defun) + + ;; clojure.test + (testing 1) + (deftest 'defun) + (are 1) + (use-fixtures 'defun) + + ;; core.logic + (run 'defun) + (run* 'defun) + (fresh 'defun) + + ;; core.async + (alt! 0) + (alt!! 0) + (go 0) + (go-loop 1) + (thread 0)) + + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; Better docstring filling for clojure-mode +;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(defun clojure-string-start (&optional regex) + "Return the position of the \" that begins the string at point. +If REGEX is non-nil, return the position of the # that begins the +regex at point. If point is not inside a string or regex, return +nil." + (when (nth 3 (syntax-ppss)) ;; Are we really in a string? + (save-excursion + (save-match-data + ;; Find a quote that appears immediately after whitespace, + ;; beginning of line, hash, or an open paren, brace, or bracket + (re-search-backward "\\(\\s-\\|^\\|#\\|(\\|\\[\\|{\\)\\(\"\\)") + (let ((beg (match-beginning 2))) + (when beg + (if regex + (and (char-before beg) (char-equal ?# (char-before beg)) (1- beg)) + (when (not (char-equal ?# (char-before beg))) + beg)))))))) + +(defun clojure-char-at-point () + "Return the char at point or nil if at buffer end." + (when (not (= (point) (point-max))) + (buffer-substring-no-properties (point) (1+ (point))))) + +(defun clojure-char-before-point () + "Return the char before point or nil if at buffer beginning." + (when (not (= (point) (point-min))) + (buffer-substring-no-properties (point) (1- (point))))) + +;; TODO: Deal with the fact that when point is exactly at the +;; beginning of a string, it thinks that is the end. +(defun clojure-string-end () + "Return the position of the \" that ends the string at point. + +Note that point must be inside the string - if point is +positioned at the opening quote, incorrect results will be +returned." + (save-excursion + (save-match-data + ;; If we're at the end of the string, just return point. + (if (and (string= (clojure-char-at-point) "\"") + (not (string= (clojure-char-before-point) "\\"))) + (point) + ;; We don't want to get screwed by starting out at the + ;; backslash in an escaped quote. + (when (string= (clojure-char-at-point) "\\") + (backward-char)) + ;; Look for a quote not preceeded by a backslash + (re-search-forward "[^\\]\\\(\\\"\\)") + (match-beginning 1))))) + +(defun clojure-mark-string () + "Mark the string at point." + (interactive) + (goto-char (clojure-string-start)) + (forward-char) + (set-mark (clojure-string-end))) + +(defun clojure-toggle-keyword-string () + "Convert the string or keyword at (point) from string->keyword or keyword->string." + (interactive) + (let ((original-point (point))) + (while (and (> (point) 1) + (not (equal "\"" (buffer-substring-no-properties (point) (+ 1 (point))))) + (not (equal ":" (buffer-substring-no-properties (point) (+ 1 (point)))))) + (backward-char)) + (cond + ((equal 1 (point)) + (message "beginning of file reached, this was probably a mistake.")) + ((equal "\"" (buffer-substring-no-properties (point) (+ 1 (point)))) + (insert ":" (substring (clojure-delete-and-extract-sexp) 1 -1))) + ((equal ":" (buffer-substring-no-properties (point) (+ 1 (point)))) + (insert "\"" (substring (clojure-delete-and-extract-sexp) 1) "\""))) + (goto-char original-point))) + +(defun clojure-delete-and-extract-sexp () + "Delete the sexp and return it." + (interactive) + (let ((begin (point))) + (forward-sexp) + (let ((result (buffer-substring-no-properties begin (point)))) + (delete-region begin (point)) + result))) + + + +(defconst clojure-namespace-name-regex + (rx line-start + (zero-or-more whitespace) + "(" + (zero-or-one (group (regexp "clojure.core/"))) + (zero-or-one (submatch "in-")) + "ns" + (zero-or-one "+") + (one-or-more (any whitespace "\n")) + (zero-or-more (or (submatch (zero-or-one "#") + "^{" + (zero-or-more (not (any "}"))) + "}") + (zero-or-more "^:" + (one-or-more (not (any whitespace))))) + (one-or-more (any whitespace "\n"))) + ;; why is this here? oh (in-ns 'foo) or (ns+ :user) + (zero-or-one (any ":'")) + (group (one-or-more (not (any "()\"" whitespace))) word-end))) + +;; for testing clojure-namespace-name-regex, you can evaluate this code and make +;; sure foo (or whatever the namespace name is) shows up in results. some of +;; these currently fail. +;; (mapcar (lambda (s) (let ((n (string-match clojure-namespace-name-regex s))) +;; (if n (match-string 4 s)))) +;; '("(ns foo)" +;; "(ns +;; foo)" +;; "(ns foo.baz)" +;; "(ns ^:bar foo)" +;; "(ns ^:bar ^:baz foo)" +;; "(ns ^{:bar true} foo)" +;; "(ns #^{:bar true} foo)" +;; "(ns #^{:fail {}} foo)" +;; "(ns ^{:fail2 {}} foo.baz)" +;; "(ns ^{} foo)" +;; "(ns ^{:skip-wiki true} +;; aleph.netty +;; " +;; "(ns +;; foo)" +;; "foo")) + + + +(defun clojure-expected-ns () + "Return the namespace name that the file should have." + (let* ((project-dir (file-truename + (locate-dominating-file default-directory + "project.clj"))) + (relative (substring (file-truename (buffer-file-name)) + (length project-dir) + (- (length (file-name-extension (buffer-file-name) t)))))) + (replace-regexp-in-string + "_" "-" (mapconcat 'identity (cdr (split-string relative "/")) ".")))) + +(defun clojure-insert-ns-form-at-point () + "Insert a namespace form at point." + (interactive) + (insert (format "(ns %s)" (clojure-expected-ns)))) + +(defun clojure-insert-ns-form () + "Insert a namespace form at the beginning of the buffer." + (interactive) + (goto-char (point-min)) + (clojure-insert-ns-form-at-point)) + +(defun clojure-update-ns () + "Update the namespace of the current buffer. +Useful if a file has been renamed." + (interactive) + (let ((nsname (clojure-expected-ns))) + (when nsname + (save-restriction + (save-excursion + (save-match-data + (if (clojure-find-ns) + (replace-match nsname nil nil nil 4) + (error "Namespace not found")))))))) + +(defun clojure-find-ns () + "Find the namespace of the current Clojure buffer." + (let ((regexp clojure-namespace-name-regex)) + (save-restriction + (save-excursion + (goto-char (point-min)) + (when (re-search-forward regexp nil t) + (match-string-no-properties 4)))))) + +(defun clojure-find-def () + "Find the var declaration macro and symbol name of the current form. +Returns a list pair, e.g. (\"defn\" \"abc\") or (\"deftest\" \"some-test\")." + (let ((re (concat "(\\(?:\\(?:\\sw\\|\\s_\\)+/\\)?" + ;; Declaration + "\\(def\\sw*\\)\\>" + ;; Any whitespace + "[ \r\n\t]*" + ;; Possibly type or metadata + "\\(?:#?^\\(?:{[^}]*}\\|\\(?:\\sw\\|\\s_\\)+\\)[ \r\n\t]*\\)*" + ;; Symbol name + "\\(\\(?:\\sw\\|\\s_\\)+\\)"))) + (save-excursion + (unless (looking-at re) + (beginning-of-defun)) + (when (search-forward-regexp re nil t) + (list (match-string 1) + (match-string 2)))))) + +;;;###autoload +(add-to-list 'auto-mode-alist + '("\\.\\(clj[sx]?\\|dtm\\|edn\\)\\'" . clojure-mode)) + +(provide 'clojure-mode) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions) +;; indent-tabs-mode: nil +;; End: + +;;; clojure-mode.el ends here diff --git a/elpa/clojure-mode-20140804.823/clojure-mode.elc b/elpa/clojure-mode-20140804.823/clojure-mode.elc new file mode 100644 index 0000000000000000000000000000000000000000..09554af77dceb12bf017b7be520122757ef484bc GIT binary patch literal 31152 zcmchgiFX^vm9KdwZ=vX8zAPt-yu{N2ZIhG*3XPSd7fF_6M`vu=$C5oSL(nD&G)Y(> zz+kb&Sef^)zwdXesuvKH9cMB+BH5^}_13Ms*Twq}KD+marKP2n_uqd%x;HvK>kpD% zba)<}cBXgunUp{8bUz-Ao^B0B-OeBy4Wq}MX>@mX97Q`(+}MpfK5PXPsN!!RY(hI4PfwdP!LgE8CU&)^@d4c(auZ zti%2=dZ5#~KXEgeO_E8} zJ0EsV``xHF>Q1KP{_uEmlego^H0tzvEIAz~-r1_|T7 z#$_-5p?{jdKl*QFWo6^=e43QIY*SQf*D4i$;_K~drT*#?k5zr-r^ZkH<94ZCja8$; zPm@~dhgR-GT*-e>XQ~#{RZKT=ogdoAO@3PKT9tQIhN$ws%6t1;fAbw6tt5s7eeb>|?U#nTDML%`k)-__TRz2;jPCs?}snbuLk?XW*P&3qS z(6Ui|_lg@?wHx}OMMEuqy0+G>+L{SJ&AGmtalY>+P-)VCQ#1PM+RUIy|4rX_Yp(BB zq3;%bx9Gd&`~HdA^xdNG*3api1Ak`;B#Q6a?~g$xX3yt)Jmnxs$^9j*x6&#_dq;<( z*|2vOO_J$f%8nBClB3R`-|8EhK1vI2*i%lGeJdEmS8HPj8w zo+hrVGR6JQAvEhRv(Yr!kLpqBF*VZSZ|;5-O-Jf`mPFs&{Y=E7I~$La;WRp&9UUd( zt8g0zR1IFWNciK6Q zN}oa)V0X&iKbwY2G(P=V0fv|6G32L40Q(#jLTw^25!yvpBm1CcpBhFU}-GFW5Nq?AN1J5sFUt+@|+b;jPrv5>WG)>YO6hTEZ%yFd@qxe(QMEY#zY72OxA@p zliA^9+Mmv*iEnA^j+kb9=&LirY%tZaUOey#BG0ovf`-n7);B##+C$Da_?sP84Q3OB znS<4uBbYcnKTE>wb|;;q@F6|>arr7~1Gd83Z_n z;;b`V*bS)TYzS!22MHACs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y7(H~?k3J9)JnKM@YKZ}T1 AcmMzZ literal 0 HcmV?d00001 diff --git a/elpa/clojurescript-mode-0.5/clojurescript-mode-autoloads.el b/elpa/clojurescript-mode-0.5/clojurescript-mode-autoloads.el new file mode 100644 index 000000000..558659d7c --- /dev/null +++ b/elpa/clojurescript-mode-0.5/clojurescript-mode-autoloads.el @@ -0,0 +1,31 @@ +;;; clojurescript-mode-autoloads.el --- automatically extracted autoloads +;; +;;; Code: + + +;;;### (autoloads (clojurescript-mode) "clojurescript-mode" "clojurescript-mode.el" +;;;;;; (21478 8069 0 0)) +;;; Generated autoloads from clojurescript-mode.el + +(autoload 'clojurescript-mode "clojurescript-mode" "\ +Major mode for ClojureScript + +\(fn)" t nil) + +(add-to-list 'auto-mode-alist '("\\.cljs$" . clojurescript-mode)) + +;;;*** + +;;;### (autoloads nil nil ("clojurescript-mode-pkg.el") (21478 8069 +;;;;;; 961812 0)) + +;;;*** + +(provide 'clojurescript-mode-autoloads) +;; Local Variables: +;; version-control: never +;; no-byte-compile: t +;; no-update-autoloads: t +;; coding: utf-8 +;; End: +;;; clojurescript-mode-autoloads.el ends here diff --git a/elpa/clojurescript-mode-0.5/clojurescript-mode-pkg.el b/elpa/clojurescript-mode-0.5/clojurescript-mode-pkg.el new file mode 100644 index 000000000..61180875a --- /dev/null +++ b/elpa/clojurescript-mode-0.5/clojurescript-mode-pkg.el @@ -0,0 +1 @@ +(define-package "clojurescript-mode" "0.5" "Major mode for ClojureScript code" (quote nil)) diff --git a/elpa/clojurescript-mode-0.5/clojurescript-mode-pkg.elc b/elpa/clojurescript-mode-0.5/clojurescript-mode-pkg.elc new file mode 100644 index 0000000000000000000000000000000000000000..a37b869c85883ee589dea6b591a7bdb4baa57913 GIT binary patch literal 631 zcmbu6!EVAZ42C)P1$MQ1+9aCN4m6;bv5EuIII%r|NzyiuCRLJdVoyI)rb!dKVJT5$ zTc3aDFV?T+-Dot5ilTthww=;a!2Sd+hG#lH*&=_j_QF^b^C>Y>CR^m5iB#$iQ?BiychYmGx{$P1$YjE1|E0TQ&7>Z< z%E0;zfe(TzQjt&DBg=-`rwR?ACUIR*t@^@14W30q@vTw*BB=M$gE$#%6$fFt4^Eld zkE!Z>02G2Y|DBU9SiZPo2uloO18{2sQga`wWKJ2AtajyQ1H3_pJdnuoFdmHnZ-JwM zy##IX&yb&GJV +;; URL: http://github.com/rubbish/clojurescript-mode +;; Version: 0.5 +;; Keywords: languages, lisp, javascript + +;; This file is not part of GNU Emacs. + +;;; Commentary: + +;; Provides an REPL to the +;; ClojureScript language. (http://github.com/clojure/clojurescript) + +;; For information on how to start up the REPL correctly see +;; https://github.com/clojure/clojurescript/tree/master/samples/repl +;; and +;; https://github.com/clojure/clojurescript/wiki/The-REPL-and-Evaluation-Environments + +;;; License: + +;; 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 GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +(require 'clojure-mode) + +(defvar clojurescript-home + (getenv "CLOJURESCRIPT_HOME") + "Path to ClojureScript home directory") + +(defvar clojurescript-clj-repl + (when clojurescript-home + (expand-file-name "script/repl" clojurescript-home)) + "Path to the ClojureScript Clojure REPL") + +(defvar clojurescript-repl-interface + "cljs.repl.browser" + "Which ClojureScript REPL interface to use") + +(defun clojurescript-repl-init-commands () + (concat "(require 'cljs.repl)" "\n" + "(require '" clojurescript-repl-interface ")" "\n" + "(cljs.repl/repl (" clojurescript-repl-interface "/repl-env)" ")" "\n")) + +(defun clojurescript-start-cljs-repl () + ;; I know, I know; major facepalm. But that's the way it is. + (when (not clojurescript-home) + (error "CLOJURESCRIPT_HOME not configured. See ClojureScript docs.")) + (comint-send-string (inferior-lisp-proc) (clojurescript-repl-init-commands))) + +;;;###autoload +(define-derived-mode clojurescript-mode clojure-mode "ClojureScript" + "Major mode for ClojureScript" + + (set (make-local-variable 'inferior-lisp-program) clojurescript-clj-repl) + (add-hook 'inferior-lisp-mode-hook 'clojurescript-start-cljs-repl) + (when (functionp 'slime-mode) + (slime-mode -1))) + +;;;###autoload +(add-to-list 'auto-mode-alist '("\\.cljs$" . clojurescript-mode)) + +(provide 'clojurescript-mode) +;;; clojurescript-mode.el ends here diff --git a/elpa/clojurescript-mode-0.5/clojurescript-mode.elc b/elpa/clojurescript-mode-0.5/clojurescript-mode.elc new file mode 100644 index 0000000000000000000000000000000000000000..e4c523ea476975fc5e9af6ed3543ae1e7d96c7f0 GIT binary patch literal 4210 zcmc&%S#R4$5cZ>?pa$B9^g_`I6~Gc;(juwDiCZA4U?6UDAx_$d$Y@sNO4@{n%B7sB zMgM!hS(3IW$wANrtpUm6a(2#dznMKgc{u!XXJ@Bze0)s9G@h$ShBRJMEb@E!X#0@} zeoE6fPLu{BqBNm1k<7Fucwmx+i~Kw%o_JX6V3AK-1Ka}r^Qs4wlfcO37|hK?|W zjwH<~NRwPZc#%)+BdjF${j=feDFri;i6DoQ2gbZeLeeP(BB8OQC>1p$WiXng$RZ^( z%4ZPt{K78E@lk*5z{mbI8jV&a|5&I@(tcSrQ?GWTdCxzhrvkapQyLZpJu?NRSsF_U zu_wsWZ25ho70Stl$f#a+Bh{M9TqYM}4Ie)F`Ngx7v*EMTr_Xa`EdHV1=i$V0-&g49z)_9pqI{@y;+8ueF-tNxG@3{DQyCVw= z1B+g6@m9W@qoOv0+Xj%ZyMXW^YqieFuUzgQbqkk$`fa9y*_yNLB(MgYOhh0#fk5YV zUbAldO4vda+TlfKoTYDZ!mKh+M|~egIoTpoLSGiFJZ7aHl_T&tMjV=&FB27!RmG0~ z{w}_{oCth+{LsH#@cNw_TXVDS;VNWGU)vVUB>1{|hX-D5UB+XwNG+_HUp8>jMp9k( z{5?_WTx5s{IVnn8hQw9vURCwh$a6ag#OGiLUp;znowF>>wqde5{1Y_=e}xX6$#ozy zwKx_SB1X+@ErFMUYEbZr%v74$k2C zZ{oYvETipVrH{}%-ES&EuI6CmyPZm=v$djzl4sz2!nsvq47?+*MJz#kOs_Owc)G|zujd`|^G(q{eCDcOD4)A7l&esxe!i~k8 zaCTIpIKtw5*ExX2&Z$?Rag)$4wX|aKM%sEVGA->latY0RF#n$_a#&Sj-&@3AjH4!X zuQub}2d1yjon8VM@9dnB@(GeyQ&(nl#llA<)6g0p3qA)p16!Ehl(FW)2c_@KI7meb z7=PC!aWl2H7>_e~@yW7RQ`f>_nXP6a(nZ)P)R-sT4;TY*wYftQi7m-t#<<9*NheGvmdan&IjY)M%V0JX9Jo;SMj7 zrJ*C{D@~C`Ocbw(4m<9^3_`a7Rt z$)z9p;RlF&-e`hvzm#v|cXtn6-uHT@*LQ#2!Q)<&H{dtc`{nDs=CCyH4cI&z^GjnL z$lPoejN!ZH<=*X^Uqb*?;=_Nx%i7Hr^jqKbTYm}lJ`&>(%nta{h0ZSTH;fa?NGuD8 zamh69T7Z&SFnGGI``FCpTPjwgs|s7(gv^!At_Y0kP~M^mL(eLTt-_li5*nCA&o8=} zU7FA`FZ)}y5-c)4F{NGOEv`fbwN)}0*^*FXn2T08omdxNpVnkoMOJyh#>Ii|7Jg`| zyp&A?GZyyoxtm=s_V@;^~)Q9cQoj>2`qli5D8d&6?)6ru>>fmB2Rfz#nl)y lR}lc{0M9LJG;(<2zHQ-lR`-G3Zu5Y5p}>lp@A!_?_y;%eU)TTu literal 0 HcmV?d00001 diff --git a/elpa/dash-20140717.547/dash-autoloads.el b/elpa/dash-20140717.547/dash-autoloads.el new file mode 100644 index 000000000..0baa9f317 --- /dev/null +++ b/elpa/dash-20140717.547/dash-autoloads.el @@ -0,0 +1,18 @@ +;;; dash-autoloads.el --- automatically extracted autoloads +;; +;;; Code: + + +;;;### (autoloads nil nil ("dash-pkg.el" "dash.el") (21478 16688 +;;;;;; 918460 0)) + +;;;*** + +(provide 'dash-autoloads) +;; Local Variables: +;; version-control: never +;; no-byte-compile: t +;; no-update-autoloads: t +;; coding: utf-8 +;; End: +;;; dash-autoloads.el ends here diff --git a/elpa/dash-20140717.547/dash-pkg.el b/elpa/dash-20140717.547/dash-pkg.el new file mode 100644 index 000000000..d62f3ab13 --- /dev/null +++ b/elpa/dash-20140717.547/dash-pkg.el @@ -0,0 +1 @@ +(define-package "dash" "20140717.547" "A modern list library for Emacs" (quote nil)) diff --git a/elpa/dash-20140717.547/dash-pkg.elc b/elpa/dash-20140717.547/dash-pkg.elc new file mode 100644 index 0000000000000000000000000000000000000000..f9cf845879a30cd6de24027fac2cd7cfa922493e GIT binary patch literal 605 zcmbu6y-ve05XU>`1z1m+Kx&*O4GL`*O4XqfOoa!y+D>BCu_N0Bm8a*DAOvFUNgjM3 zzyEzyyXWoAY&MIks)DWUdZnd+;{`elkMw-U;nc zg2w#O$yO|1{bLAA3}XXuYXVa8In>Dmc}%i7Z1;QMEjr|Znw*dFXasl*91R>LXp4VD zzK8K3(P +;; Version: 20140717.547 +;; X-Original-Version: 2.8.0 +;; Keywords: lists + +;; 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: + +;; A modern list api for Emacs. +;; +;; See documentation on https://github.com/magnars/dash.el#functions + +;;; Code: + +(defgroup dash () + "Customize group for dash.el" + :group 'lisp + :prefix "dash-") + +(defun dash--enable-fontlock (symbol value) + (when value + (dash-enable-font-lock)) + (set-default symbol value)) + +(defcustom dash-enable-fontlock nil + "If non-nil, enable fontification of dash functions, macros and +special values." + :type 'boolean + :set 'dash--enable-fontlock + :group 'dash) + +(defmacro !cons (car cdr) + "Destructive: Set CDR to the cons of CAR and CDR." + `(setq ,cdr (cons ,car ,cdr))) + +(defmacro !cdr (list) + "Destructive: Set LIST to the cdr of LIST." + `(setq ,list (cdr ,list))) + +(defmacro --each (list &rest body) + "Anaphoric form of `-each'." + (declare (debug (form body)) + (indent 1)) + (let ((l (make-symbol "list"))) + `(let ((,l ,list) + (it-index 0)) + (while ,l + (let ((it (car ,l))) + ,@body) + (setq it-index (1+ it-index)) + (!cdr ,l))))) + +(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) + +(defmacro --each-while (list pred &rest body) + "Anaphoric form of `-each-while'." + (declare (debug (form form body)) + (indent 2)) + (let ((l (make-symbol "list")) + (c (make-symbol "continue"))) + `(let ((,l ,list) + (,c t) + (it-index 0)) + (while (and ,l ,c) + (let ((it (car ,l))) + (if (not ,pred) (setq ,c nil) ,@body)) + (setq it-index (1+ it-index)) + (!cdr ,l))))) + +(defun -each-while (list pred fn) + "Call FN with every item in LIST while (PRED item) is non-nil. +Return nil, used for side-effects only." + (--each-while list (funcall pred it) (funcall fn it))) + +(put '-each-while 'lisp-indent-function 2) + +(defmacro --dotimes (num &rest body) + "Repeatedly executes BODY (presumably for side-effects) with `it` bound to integers from 0 through NUM-1." + (declare (debug (form body)) + (indent 1)) + (let ((n (make-symbol "num"))) + `(let ((,n ,num) + (it 0)) + (while (< it ,n) + ,@body + (setq it (1+ it)))))) + +(defun -dotimes (num fn) + "Repeatedly calls FN (presumably for side-effects) passing in integers from 0 through NUM-1." + (--dotimes num (funcall fn it))) + +(put '-dotimes 'lisp-indent-function 1) + +(defun -map (fn list) + "Return a new list consisting of the result of applying FN to the items in LIST." + (mapcar fn list)) + +(defmacro --map (form list) + "Anaphoric form of `-map'." + (declare (debug (form form))) + `(mapcar (lambda (it) ,form) ,list)) + +(defmacro --reduce-from (form initial-value list) + "Anaphoric form of `-reduce-from'." + (declare (debug (form form form))) + `(let ((acc ,initial-value)) + (--each ,list (setq acc ,form)) + acc)) + +(defun -reduce-from (fn initial-value list) + "Return the result of applying FN to INITIAL-VALUE and the +first item in LIST, then applying FN to that result and the 2nd +item, etc. If LIST contains no items, return INITIAL-VALUE and +FN is not called. + +In the anaphoric form `--reduce-from', the accumulated value is +exposed as `acc`." + (--reduce-from (funcall fn acc it) initial-value list)) + +(defmacro --reduce (form list) + "Anaphoric form of `-reduce'." + (declare (debug (form form))) + (let ((lv (make-symbol "list-value"))) + `(let ((,lv ,list)) + (if ,lv + (--reduce-from ,form (car ,lv) (cdr ,lv)) + (let (acc it) ,form))))) + +(defun -reduce (fn list) + "Return the result of applying FN to the first 2 items in LIST, +then applying FN to that result and the 3rd item, etc. If LIST +contains no items, FN must accept no arguments as well, and +reduce return the result of calling FN with no arguments. If +LIST has only 1 item, it is returned and FN is not called. + +In the anaphoric form `--reduce', the accumulated value is +exposed as `acc`." + (if list + (-reduce-from fn (car list) (cdr list)) + (funcall fn))) + +(defun -reduce-r-from (fn initial-value list) + "Replace conses with FN, nil with INITIAL-VALUE and evaluate +the resulting expression. If LIST is empty, INITIAL-VALUE is +returned and FN is not called. + +Note: this function works the same as `-reduce-from' but the +operation associates from right instead of from left." + (if (not list) initial-value + (funcall fn (car list) (-reduce-r-from fn initial-value (cdr list))))) + +(defmacro --reduce-r-from (form initial-value list) + "Anaphoric version of `-reduce-r-from'." + (declare (debug (form form form))) + `(-reduce-r-from (lambda (&optional it acc) ,form) ,initial-value ,list)) + +(defun -reduce-r (fn list) + "Replace conses with FN and evaluate the resulting expression. +The final nil is ignored. If LIST contains no items, FN must +accept no arguments as well, and reduce return the result of +calling FN with no arguments. If LIST has only 1 item, it is +returned and FN is not called. + +The first argument of FN is the new item, the second is the +accumulated value. + +Note: this function works the same as `-reduce' but the operation +associates from right instead of from left." + (cond + ((not list) (funcall fn)) + ((not (cdr list)) (car list)) + (t (funcall fn (car list) (-reduce-r fn (cdr list)))))) + +(defmacro --reduce-r (form list) + "Anaphoric version of `-reduce-r'." + (declare (debug (form form))) + `(-reduce-r (lambda (&optional it acc) ,form) ,list)) + +(defmacro --filter (form list) + "Anaphoric form of `-filter'." + (declare (debug (form form))) + (let ((r (make-symbol "result"))) + `(let (,r) + (--each ,list (when ,form (!cons it ,r))) + (nreverse ,r)))) + +(defun -filter (pred list) + "Return a new list of the items in LIST for which PRED returns a non-nil value. + +Alias: `-select'" + (--filter (funcall pred it) list)) + +(defalias '-select '-filter) +(defalias '--select '--filter) + +(defmacro --remove (form list) + "Anaphoric form of `-remove'." + (declare (debug (form form))) + `(--filter (not ,form) ,list)) + +(defun -remove (pred list) + "Return a new list of the items in LIST for which PRED returns nil. + +Alias: `-reject'" + (--remove (funcall pred it) list)) + +(defalias '-reject '-remove) +(defalias '--reject '--remove) + +(defmacro --keep (form list) + "Anaphoric form of `-keep'." + (declare (debug (form form))) + (let ((r (make-symbol "result")) + (m (make-symbol "mapped"))) + `(let (,r) + (--each ,list (let ((,m ,form)) (when ,m (!cons ,m ,r)))) + (nreverse ,r)))) + +(defun -keep (fn list) + "Return a new list of the non-nil results of applying FN to the items in LIST." + (--keep (funcall fn it) list)) + +(defmacro --map-indexed (form list) + "Anaphoric form of `-map-indexed'." + (declare (debug (form form))) + (let ((r (make-symbol "result"))) + `(let (,r) + (--each ,list + (!cons ,form ,r)) + (nreverse ,r)))) + +(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`." + (--map-indexed (funcall fn it-index it) list)) + +(defmacro --map-when (pred rep list) + "Anaphoric form of `-map-when'." + (declare (debug (form form form))) + (let ((r (make-symbol "result"))) + `(let (,r) + (--each ,list (!cons (if ,pred ,rep it) ,r)) + (nreverse ,r)))) + +(defun -map-when (pred rep list) + "Return a new list where the elements in LIST that does not match the PRED function +are unchanged, and where the elements in LIST that do match the PRED function are mapped +through the REP function. + +Alias: `-replace-where' + +See also: `-update-at'" + (--map-when (funcall pred it) (funcall rep it) list)) + +(defalias '-replace-where '-map-when) +(defalias '--replace-where '--map-when) + +(defun -replace (old new list) + "Replace all OLD items in LIST with NEW. + +Elements are compared using `equal'. + +See also: `-replace-at'" + (--map-when (equal it old) new list)) + +(defun -flatten (l) + "Take a nested list L and return its contents as a single, flat list. + +See also: `-flatten-n'" + (if (and (listp l) (listp (cdr l))) + (-mapcat '-flatten l) + (list l))) + +(defun -flatten-n (num list) + "Flatten NUM levels of a nested LIST. + +See also: `-flatten'" + (-last-item (--iterate (--mapcat (-list it) it) list (1+ num)))) + +(defun -concat (&rest lists) + "Return a new list with the concatenation of the elements in the supplied LISTS." + (apply 'append lists)) + +(defmacro --mapcat (form list) + "Anaphoric form of `-mapcat'." + (declare (debug (form form))) + `(apply 'append (--map ,form ,list))) + +(defun -mapcat (fn list) + "Return the concatenation of the result of mapping FN over LIST. +Thus function FN should return a list." + (--mapcat (funcall fn it) list)) + +(defalias '-copy 'copy-sequence + "Create a shallow copy of LIST.") + +(defun -splice (pred fun list) + "Splice lists generated by FUN in place of elements matching PRED in LIST. + +FUN takes the element matching PRED as input. + +This function can be used as replacement for `,@' in case you +need to splice several lists at marked positions (for example +with keywords). + +See also: `-splice-list', `-insert-at'" + (let (r) + (--each list + (if (funcall pred it) + (let ((new (funcall fun it))) + (--each new (!cons it r))) + (!cons it r))) + (nreverse r))) + +(defmacro --splice (pred form list) + "Anaphoric form of `-splice'." + `(-splice (lambda (it) ,pred) (lambda (it) ,form) ,list)) + +(defun -splice-list (pred new-list list) + "Splice NEW-LIST in place of elements matching PRED in LIST. + +See also: `-splice', `-insert-at'" + (-splice pred (lambda (_) new-list) list)) + +(defun --splice-list (pred new-list list) + "Anaphoric form of `-splice-list'." + `(-splice-list (lambda (it) ,pred) ,new-list ,list)) + +(defun -cons* (&rest args) + "Make a new list from the elements of ARGS. + +The last 2 members of ARGS are used as the final cons of the +result so if the final member of ARGS is not a list the result is +a dotted list." + (-reduce-r 'cons args)) + +(defun -snoc (list elem &rest elements) + "Append ELEM to the end of the list. + +This is like `cons', but operates on the end of list. + +If ELEMENTS is non nil, append these to the list as well." + (-concat list (list elem) elements)) + +(defmacro --first (form list) + "Anaphoric form of `-first'." + (declare (debug (form form))) + (let ((n (make-symbol "needle"))) + `(let (,n) + (--each-while ,list (not ,n) + (when ,form (setq ,n it))) + ,n))) + +(defun -first (pred list) + "Return the first x in LIST where (PRED x) is non-nil, else nil. + +To get the first item in the list no questions asked, use `car'. + +Alias: `-find'" + (--first (funcall pred it) list)) + +(defalias '-find '-first) +(defalias '--find '--first) + +(defmacro --last (form list) + "Anaphoric form of `-last'." + (declare (debug (form form))) + (let ((n (make-symbol "needle"))) + `(let (,n) + (--each ,list + (when ,form (setq ,n it))) + ,n))) + +(defun -last (pred list) + "Return the last x in LIST where (PRED x) is non-nil, else nil." + (--last (funcall pred it) list)) + +(defalias '-first-item 'car + "Return the first item of LIST, or nil on an empty list.") + +(defun -last-item (list) + "Return the last item of LIST, or nil on an empty list." + (car (last list))) + +(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))) + +(defmacro --count (pred list) + "Anaphoric form of `-count'." + (declare (debug (form form))) + (let ((r (make-symbol "result"))) + `(let ((,r 0)) + (--each ,list (when ,pred (setq ,r (1+ ,r)))) + ,r))) + +(defun -count (pred list) + "Counts the number of items in LIST where (PRED item) is non-nil." + (--count (funcall pred it) list)) + +(defun ---truthy? (val) + (not (null val))) + +(defmacro --any? (form list) + "Anaphoric form of `-any?'." + (declare (debug (form form))) + `(---truthy? (--first ,form ,list))) + +(defun -any? (pred list) + "Return t if (PRED x) is non-nil for any x in LIST, else nil. + +Alias: `-any-p', `-some?', `-some-p'" + (--any? (funcall pred it) list)) + +(defalias '-some? '-any?) +(defalias '--some? '--any?) +(defalias '-any-p '-any?) +(defalias '--any-p '--any?) +(defalias '-some-p '-any?) +(defalias '--some-p '--any?) + +(defmacro --all? (form list) + "Anaphoric form of `-all?'." + (declare (debug (form form))) + (let ((a (make-symbol "all"))) + `(let ((,a t)) + (--each-while ,list ,a (setq ,a ,form)) + (---truthy? ,a)))) + +(defun -all? (pred list) + "Return t if (PRED x) is non-nil for all x in LIST, else nil. + +Alias: `-all-p', `-every?', `-every-p'" + (--all? (funcall pred it) list)) + +(defalias '-every? '-all?) +(defalias '--every? '--all?) +(defalias '-all-p '-all?) +(defalias '--all-p '--all?) +(defalias '-every-p '-all?) +(defalias '--every-p '--all?) + +(defmacro --none? (form list) + "Anaphoric form of `-none?'." + (declare (debug (form form))) + `(--all? (not ,form) ,list)) + +(defun -none? (pred list) + "Return t if (PRED x) is nil for all x in LIST, else nil. + +Alias: `-none-p'" + (--none? (funcall pred it) list)) + +(defalias '-none-p '-none?) +(defalias '--none-p '--none?) + +(defmacro --only-some? (form list) + "Anaphoric form of `-only-some?'." + (declare (debug (form form))) + (let ((y (make-symbol "yes")) + (n (make-symbol "no"))) + `(let (,y ,n) + (--each-while ,list (not (and ,y ,n)) + (if ,form (setq ,y t) (setq ,n t))) + (---truthy? (and ,y ,n))))) + +(defun -only-some? (pred list) + "Return `t` if at least one item of LIST matches PRED and at least one item of LIST does not match PRED. +Return `nil` both if all items match the predicate or if none of the items match the predicate. + +Alias: `-only-some-p'" + (--only-some? (funcall pred it) list)) + +(defalias '-only-some-p '-only-some?) +(defalias '--only-some-p '--only-some?) + +(defun -slice (list from &optional to step) + "Return copy of LIST, starting from index FROM to index TO. + +FROM or TO may be negative. These values are then interpreted +modulo the length of the list. + +If STEP is a number, only each STEPth item in the resulting +section is returned. Defaults to 1." + (let ((length (length list)) + (new-list nil)) + ;; to defaults to the end of the list + (setq to (or to length)) + (setq step (or step 1)) + ;; handle negative indices + (when (< from 0) + (setq from (mod from length))) + (when (< to 0) + (setq to (mod to length))) + + ;; iterate through the list, keeping the elements we want + (--each-while list (< it-index to) + (when (and (>= it-index from) + (= (mod (- from it-index) step) 0)) + (push it new-list))) + (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." + (let (result) + (--dotimes n + (when list + (!cons (car list) result) + (!cdr list))) + (nreverse result))) + +(defalias '-drop 'nthcdr "Return the tail of LIST without the first N items.") + +(defmacro --take-while (form list) + "Anaphoric form of `-take-while'." + (declare (debug (form form))) + (let ((r (make-symbol "result"))) + `(let (,r) + (--each-while ,list ,form (!cons it ,r)) + (nreverse ,r)))) + +(defun -take-while (pred list) + "Return a new list of successive items from LIST while (PRED item) returns a non-nil value." + (--take-while (funcall pred it) list)) + +(defmacro --drop-while (form list) + "Anaphoric form of `-drop-while'." + (declare (debug (form form))) + (let ((l (make-symbol "list"))) + `(let ((,l ,list)) + (while (and ,l (let ((it (car ,l))) ,form)) + (!cdr ,l)) + ,l))) + +(defun -drop-while (pred list) + "Return the tail of LIST starting from the first item for which (PRED item) returns nil." + (--drop-while (funcall pred it) list)) + +(defun -split-at (n list) + "Return a list of ((-take N LIST) (-drop N LIST)), in no more than one pass through the list." + (let (result) + (--dotimes n + (when list + (!cons (car list) result) + (!cdr list))) + (list (nreverse result) list))) + +(defun -rotate (n list) + "Rotate LIST N places to the right. With N negative, rotate to the left. +The time complexity is O(n)." + (if (> n 0) + (append (last list n) (butlast list n)) + (append (-drop (- n) list) (-take (- n) list)))) + +(defun -insert-at (n x list) + "Return a list with X inserted into LIST at position N. + +See also: `-splice', `-splice-list'" + (let ((split-list (-split-at n list))) + (nconc (car split-list) (cons x (cadr split-list))))) + +(defun -replace-at (n x list) + "Return a list with element at Nth position in LIST replaced with X. + +See also: `-replace'" + (let ((split-list (-split-at n list))) + (nconc (car split-list) (cons x (cdr (cadr split-list)))))) + +(defun -update-at (n func list) + "Return a list with element at Nth position in LIST replaced with `(func (nth n list))`. + +See also: `-map-when'" + (let ((split-list (-split-at n list))) + (nconc (car split-list) (cons (funcall func (car (cadr split-list))) (cdr (cadr split-list)))))) + +(defmacro --update-at (n form list) + "Anaphoric version of `-update-at'." + (declare (debug (form form form))) + `(-update-at ,n (lambda (it) ,form) ,list)) + +(defun -remove-at (n list) + "Return a list with element at Nth position in LIST removed. + +See also: `-remove-at-indices', `-remove'" + (-remove-at-indices (list n) list)) + +(defun -remove-at-indices (indices list) + "Return a list whose elements are elements from LIST without +elements selected as `(nth i list)` for all i +from INDICES. + +See also: `-remove-at', `-remove'" + (let* ((indices (-sort '< indices)) + (diffs (cons (car indices) (-map '1- (-zip-with '- (cdr indices) indices)))) + r) + (--each diffs + (let ((split (-split-at it list))) + (!cons (car split) r) + (setq list (cdr (cadr split))))) + (!cons list r) + (apply '-concat (nreverse r)))) + +(defmacro --split-with (pred list) + "Anaphoric form of `-split-with'." + (declare (debug (form form))) + (let ((l (make-symbol "list")) + (r (make-symbol "result")) + (c (make-symbol "continue"))) + `(let ((,l ,list) + (,r nil) + (,c t)) + (while (and ,l ,c) + (let ((it (car ,l))) + (if (not ,pred) + (setq ,c nil) + (!cons it ,r) + (!cdr ,l)))) + (list (nreverse ,r) ,l)))) + +(defun -split-with (pred list) + "Return a list of ((-take-while PRED LIST) (-drop-while PRED LIST)), in no more than one pass through the list." + (--split-with (funcall pred it) list)) + +(defmacro -split-on (item list) + "Split the LIST each time ITEM is found. + +Unlike `-partition-by', the ITEM is discarded from the results. +Empty lists are also removed from the result. + +Comparison is done by `equal'. + +See also `-split-when'" + (declare (debug (form form))) + `(-split-when (lambda (it) (equal it ,item)) ,list)) + +(defmacro --split-when (form list) + "Anaphoric version of `-split-when'." + (declare (debug (form form))) + `(-split-when (lambda (it) ,form) ,list)) + +(defun -split-when (fn list) + "Split the LIST on each element where FN returns non-nil. + +Unlike `-partition-by', the \"matched\" element is discarded from +the results. Empty lists are also removed from the result. + +This function can be thought of as a generalization of +`split-string'." + (let (r s) + (while list + (if (not (funcall fn (car list))) + (push (car list) s) + (when s (push (nreverse s) r)) + (setq s nil)) + (!cdr list)) + (when s (push (nreverse s) r)) + (nreverse r))) + +(defmacro --separate (form list) + "Anaphoric form of `-separate'." + (declare (debug (form form))) + (let ((y (make-symbol "yes")) + (n (make-symbol "no"))) + `(let (,y ,n) + (--each ,list (if ,form (!cons it ,y) (!cons it ,n))) + (list (nreverse ,y) (nreverse ,n))))) + +(defun -separate (pred list) + "Return a list of ((-filter PRED LIST) (-remove PRED LIST)), in one pass through the list." + (--separate (funcall pred it) list)) + +(defun ---partition-all-in-steps-reversed (n step list) + "Private: Used by -partition-all-in-steps and -partition-in-steps." + (when (< step 1) + (error "Step must be a positive number, or you're looking at some juicy infinite loops.")) + (let ((result nil) + (len 0)) + (while list + (!cons (-take n list) result) + (setq list (-drop step list))) + result)) + +(defun -partition-all-in-steps (n step list) + "Return a new list with the items in LIST grouped into N-sized sublists at offsets STEP apart. +The last groups may contain less than N items." + (nreverse (---partition-all-in-steps-reversed n step list))) + +(defun -partition-in-steps (n step list) + "Return a new list with the items in LIST grouped into N-sized sublists at offsets STEP apart. +If there are not enough items to make the last group N-sized, +those items are discarded." + (let ((result (---partition-all-in-steps-reversed n step list))) + (while (and result (< (length (car result)) n)) + (!cdr result)) + (nreverse result))) + +(defun -partition-all (n list) + "Return a new list with the items in LIST grouped into N-sized sublists. +The last group may contain less than N items." + (-partition-all-in-steps n n list)) + +(defun -partition (n list) + "Return a new list with the items in LIST grouped into N-sized sublists. +If there are not enough items to make the last group N-sized, +those items are discarded." + (-partition-in-steps n n list)) + +(defmacro --partition-by (form list) + "Anaphoric form of `-partition-by'." + (declare (debug (form form))) + (let ((r (make-symbol "result")) + (s (make-symbol "sublist")) + (v (make-symbol "value")) + (n (make-symbol "new-value")) + (l (make-symbol "list"))) + `(let ((,l ,list)) + (when ,l + (let* ((,r nil) + (it (car ,l)) + (,s (list it)) + (,v ,form) + (,l (cdr ,l))) + (while ,l + (let* ((it (car ,l)) + (,n ,form)) + (unless (equal ,v ,n) + (!cons (nreverse ,s) ,r) + (setq ,s nil) + (setq ,v ,n)) + (!cons it ,s) + (!cdr ,l))) + (!cons (nreverse ,s) ,r) + (nreverse ,r)))))) + +(defun -partition-by (fn list) + "Apply FN to each item in LIST, splitting it each time FN returns a new value." + (--partition-by (funcall fn it) list)) + +(defmacro --partition-by-header (form list) + "Anaphoric form of `-partition-by-header'." + (declare (debug (form form))) + (let ((r (make-symbol "result")) + (s (make-symbol "sublist")) + (h (make-symbol "header-value")) + (b (make-symbol "seen-body?")) + (n (make-symbol "new-value")) + (l (make-symbol "list"))) + `(let ((,l ,list)) + (when ,l + (let* ((,r nil) + (it (car ,l)) + (,s (list it)) + (,h ,form) + (,b nil) + (,l (cdr ,l))) + (while ,l + (let* ((it (car ,l)) + (,n ,form)) + (if (equal ,h ,n) + (when ,b + (!cons (nreverse ,s) ,r) + (setq ,s nil) + (setq ,b nil)) + (setq ,b t)) + (!cons it ,s) + (!cdr ,l))) + (!cons (nreverse ,s) ,r) + (nreverse ,r)))))) + +(defun -partition-by-header (fn list) + "Apply FN to the first item in LIST. That is the header +value. Apply FN to each item in LIST, splitting it each time FN +returns the header value, but only after seeing at least one +other value (the body)." + (--partition-by-header (funcall fn it) list)) + +(defmacro --group-by (form list) + "Anaphoric form of `-group-by'." + (declare (debug (form form))) + (let ((l (make-symbol "list")) + (v (make-symbol "value")) + (k (make-symbol "key")) + (r (make-symbol "result"))) + `(let ((,l ,list) + ,r) + ;; Convert `list' to an alist and store it in `r'. + (while ,l + (let* ((,v (car ,l)) + (it ,v) + (,k ,form) + (kv (assoc ,k ,r))) + (if kv + (setcdr kv (cons ,v (cdr kv))) + (push (list ,k ,v) ,r)) + (setq ,l (cdr ,l)))) + ;; Reverse lists in each group. + (let ((rest ,r)) + (while rest + (let ((kv (car rest))) + (setcdr kv (nreverse (cdr kv)))) + (setq rest (cdr rest)))) + ;; Reverse order of keys. + (nreverse ,r)))) + +(defun -group-by (fn list) + "Separate LIST into an alist whose keys are FN applied to the +elements of LIST. Keys are compared by `equal'." + (--group-by (funcall fn it) list)) + +(defun -interpose (sep list) + "Return a new list of all elements in LIST separated by SEP." + (let (result) + (when list + (!cons (car list) result) + (!cdr list)) + (while list + (setq result (cons (car list) (cons sep result))) + (!cdr list)) + (nreverse result))) + +(defun -interleave (&rest lists) + "Return a new list of the first item in each list, then the second etc." + (let (result) + (while (-none? 'null lists) + (--each lists (!cons (car it) result)) + (setq lists (-map 'cdr lists))) + (nreverse result))) + +(defmacro --zip-with (form list1 list2) + "Anaphoric form of `-zip-with'. + +The elements in list1 is bound as `it`, the elements in list2 as `other`." + (declare (debug (form form form))) + (let ((r (make-symbol "result")) + (l1 (make-symbol "list1")) + (l2 (make-symbol "list2"))) + `(let ((,r nil) + (,l1 ,list1) + (,l2 ,list2)) + (while (and ,l1 ,l2) + (let ((it (car ,l1)) + (other (car ,l2))) + (!cons ,form ,r) + (!cdr ,l1) + (!cdr ,l2))) + (nreverse ,r)))) + +(defun -zip-with (fn list1 list2) + "Zip the two lists LIST1 and LIST2 using a function FN. This +function is applied pairwise taking as first argument element of +LIST1 and as second argument element of LIST2 at corresponding +position. + +The anaphoric form `--zip-with' binds the elements from LIST1 as `it`, +and the elements from LIST2 as `other`." + (--zip-with (funcall fn it other) list1 list2)) + +(defun -zip (&rest lists) + "Zip LISTS together. Group the head of each list, followed by the +second elements of each list, and so on. The lengths of the returned +groupings are equal to the length of the shortest input list. + +If two lists are provided as arguments, return the groupings as a list +of cons cells. Otherwise, return the groupings as a list of lists. " + (let (results) + (while (-none? 'null lists) + (setq results (cons (mapcar 'car lists) results)) + (setq lists (mapcar 'cdr lists))) + (setq results (nreverse results)) + (if (= (length lists) 2) + ; to support backward compatability, return + ; a cons cell if two lists were provided + (--map (cons (car it) (cadr it)) results) + results))) + +(defun -zip-fill (fill-value &rest lists) + "Zip LISTS, with FILL-VALUE padded onto the shorter lists. The +lengths of the returned groupings are equal to the length of the +longest input list." + (apply '-zip (apply '-pad (cons fill-value lists)))) + +(defun -cycle (list) + "Return an infinite copy of LIST that will cycle through the +elements and repeat from the beginning." + (let ((newlist (-map 'identity list))) + (nconc newlist newlist))) + +(defun -pad (fill-value &rest lists) + "Appends FILL-VALUE to the end of each list in LISTS such that they +will all have the same length." + (let* ((annotations (-annotate 'length lists)) + (n (-max (-map 'car annotations)))) + (--map (append (cdr it) (-repeat (- n (car it)) fill-value)) annotations))) + +(defun -annotate (fn list) + "Return a list of cons cells where each cell is FN applied to each +element of LIST paired with the unmodified element of LIST." + (-zip (-map fn list) list)) + +(defmacro --annotate (form list) + "Anaphoric version of `-annotate'." + (declare (debug (form form))) + `(-annotate (lambda (it) ,form) ,list)) + +(defun dash--table-carry (lists restore-lists &optional re) + "Helper for `-table' and `-table-flat'. + +If a list overflows, carry to the right and reset the list. + +Return how many lists were re-seted." + (while (and (not (car lists)) + (not (equal lists '(nil)))) + (setcar lists (car restore-lists)) + (pop (cadr lists)) + (!cdr lists) + (!cdr restore-lists) + (when re + (push (nreverse (car re)) (cadr re)) + (setcar re nil) + (!cdr re)))) + +(defun -table (fn &rest lists) + "Compute outer product of LISTS using function FN. + +The function FN should have the same arity as the number of +supplied lists. + +The outer product is computed by applying fn to all possible +combinations created by taking one element from each list in +order. The dimension of the result is (length lists). + +See also: `-table-flat'" + (let ((restore-lists (copy-sequence lists)) + (last-list (last lists)) + (re (--map nil (number-sequence 1 (length lists))))) + (while (car last-list) + (let ((item (apply fn (-map 'car lists)))) + (push item (car re)) + (pop (car lists)) + (dash--table-carry lists restore-lists re))) + (nreverse (car (last re))))) + +(defun -table-flat (fn &rest lists) + "Compute flat outer product of LISTS using function FN. + +The function FN should have the same arity as the number of +supplied lists. + +The outer product is computed by applying fn to all possible +combinations created by taking one element from each list in +order. The results are flattened, ignoring the tensor structure +of the result. This is equivalent to calling: + + (-flatten-n (1- (length lists)) (-table fn lists)) + +but the implementation here is much more efficient. + +See also: `-flatten-n', `-table'" + (let ((restore-lists (copy-sequence lists)) + (last-list (last lists)) + re) + (while (car last-list) + (push (apply fn (-map 'car lists)) re) + (pop (car lists)) + (dash--table-carry lists restore-lists)) + (nreverse re))) + +(defun -partial (fn &rest args) + "Take a function FN and fewer than the normal arguments to FN, +and return a fn that takes a variable number of additional ARGS. +When called, the returned function calls FN with ARGS first and +then additional args." + (apply 'apply-partially fn args)) + +(defun -elem-index (elem list) + "Return the index of the first element in the given LIST which +is equal to the query element ELEM, or nil if there is no +such element." + (car (-elem-indices elem list))) + +(defun -elem-indices (elem list) + "Return the indices of all elements in LIST equal to the query +element ELEM, in ascending order." + (-find-indices (-partial 'equal elem) list)) + +(defun -find-indices (pred list) + "Return the indices of all elements in LIST satisfying the +predicate PRED, in ascending order." + (let ((i 0)) + (apply 'append (--map-indexed (when (funcall pred it) (list it-index)) list)))) + +(defmacro --find-indices (form list) + "Anaphoric version of `-find-indices'." + (declare (debug (form form))) + `(-find-indices (lambda (it) ,form) ,list)) + +(defun -find-index (pred list) + "Take a predicate PRED and a LIST and return the index of the +first element in the list satisfying the predicate, or nil if +there is no such element." + (car (-find-indices pred list))) + +(defmacro --find-index (form list) + "Anaphoric version of `-find-index'." + (declare (debug (form form))) + `(-find-index (lambda (it) ,form) ,list)) + +(defun -find-last-index (pred list) + "Take a predicate PRED and a LIST and return the index of the +last element in the list satisfying the predicate, or nil if +there is no such element." + (-last-item (-find-indices pred list))) + +(defmacro --find-last-index (form list) + "Anaphoric version of `-find-last-index'." + `(-find-last-index (lambda (it) ,form) ,list)) + +(defun -select-by-indices (indices list) + "Return a list whose elements are elements from LIST selected +as `(nth i list)` for all i from INDICES." + (let (r) + (--each indices + (!cons (nth it list) r)) + (nreverse r))) + +(defmacro -> (x &optional form &rest more) + "Thread the expr through the forms. Insert X as the second item +in the first form, making a list of it if it is not a list +already. If there are more forms, insert the first form as the +second item in second form, etc." + (cond + ((null form) x) + ((null more) (if (listp form) + `(,(car form) ,x ,@(cdr form)) + (list form x))) + (:else `(-> (-> ,x ,form) ,@more)))) + +(defmacro ->> (x form &rest more) + "Thread the expr through the forms. Insert X as the last item +in the first form, making a list of it if it is not a list +already. If there are more forms, insert the first form as the +last item in second form, etc." + (if (null more) + (if (listp form) + `(,(car form) ,@(cdr form) ,x) + (list form x)) + `(->> (->> ,x ,form) ,@more))) + +(defmacro --> (x form &rest more) + "Thread the expr through the forms. Insert X at the position +signified by the token `it' in the first form. If there are more +forms, insert the first form at the position signified by `it' in +in second form, etc." + (if (null more) + (if (listp form) + (--map-when (eq it 'it) x form) + (list form x)) + `(--> (--> ,x ,form) ,@more))) + +(put '-> 'lisp-indent-function 1) +(put '->> 'lisp-indent-function 1) +(put '--> 'lisp-indent-function 1) + +(defun -grade-up (comparator list) + "Grade elements of LIST using COMPARATOR relation, yielding a +permutation vector such that applying this permutation to LIST +sorts it in ascending order." + ;; ugly hack to "fix" lack of lexical scope + (let ((comp `(lambda (it other) (funcall ',comparator (car it) (car other))))) + (->> (--map-indexed (cons it it-index) list) + (-sort comp) + (-map 'cdr)))) + +(defun -grade-down (comparator list) + "Grade elements of LIST using COMPARATOR relation, yielding a +permutation vector such that applying this permutation to LIST +sorts it in descending order." + ;; ugly hack to "fix" lack of lexical scope + (let ((comp `(lambda (it other) (funcall ',comparator (car other) (car it))))) + (->> (--map-indexed (cons it it-index) list) + (-sort comp) + (-map 'cdr)))) + +(defmacro -when-let (var-val &rest body) + "If VAL evaluates to non-nil, bind it to VAR and execute body. +VAR-VAL should be a (VAR VAL) pair." + (declare (debug ((symbolp form) body)) + (indent 1)) + (let ((var (car var-val)) + (val (cadr var-val))) + `(let ((,var ,val)) + (when ,var + ,@body)))) + +(defmacro -when-let* (vars-vals &rest body) + "If all VALS evaluate to true, bind them to their corresponding +VARS and execute body. VARS-VALS should be a list of (VAR VAL) +pairs (corresponding to bindings of `let*')." + (declare (debug ((&rest (symbolp form)) body)) + (indent 1)) + (if (= (length vars-vals) 1) + `(-when-let ,(car vars-vals) + ,@body) + `(-when-let ,(car vars-vals) + (-when-let* ,(cdr vars-vals) + ,@body)))) + +(defmacro --when-let (val &rest body) + "If VAL evaluates to non-nil, bind it to `it' and execute +body." + (declare (debug (form body)) + (indent 1)) + `(let ((it ,val)) + (when it + ,@body))) + +(defmacro -if-let (var-val then &rest else) + "If VAL evaluates to non-nil, bind it to VAR and do THEN, +otherwise do ELSE. VAR-VAL should be a (VAR VAL) pair." + (declare (debug ((symbolp form) form body)) + (indent 2)) + (let ((var (car var-val)) + (val (cadr var-val))) + `(let ((,var ,val)) + (if ,var ,then ,@else)))) + +(defmacro -if-let* (vars-vals then &rest else) + "If all VALS evaluate to true, bind them to their corresponding +VARS and do THEN, otherwise do ELSE. VARS-VALS should be a list +of (VAR VAL) pairs (corresponding to the bindings of `let*')." + (declare (debug ((&rest (symbolp form)) form body)) + (indent 2)) + (let ((first-pair (car vars-vals)) + (rest (cdr vars-vals))) + (if (= (length vars-vals) 1) + `(-if-let ,first-pair ,then ,@else) + `(-if-let ,first-pair + (-if-let* ,rest ,then ,@else) + ,@else)))) + +(defmacro --if-let (val then &rest else) + "If VAL evaluates to non-nil, bind it to `it' and do THEN, +otherwise do ELSE." + (declare (debug (form form body)) + (indent 2)) + `(let ((it ,val)) + (if it ,then ,@else))) + +(defun -distinct (list) + "Return a new list with all duplicates removed. +The test for equality is done with `equal', +or with `-compare-fn' if that's non-nil. + +Alias: `-uniq'" + (let (result) + (--each list (unless (-contains? result it) (!cons it result))) + (nreverse result))) + +(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. +The test for equality is done with `equal', +or with `-compare-fn' if that's non-nil." + (let (result) + (--each list (!cons it result)) + (--each list2 (unless (-contains? result it) (!cons it result))) + (nreverse result))) + +(defun -intersection (list list2) + "Return a new list containing only the elements that are members of both LIST and LIST2. +The test for equality is done with `equal', +or with `-compare-fn' if that's non-nil." + (--filter (-contains? list2 it) list)) + +(defun -difference (list list2) + "Return a new list with only the members of LIST that are not in LIST2. +The test for equality is done with `equal', +or with `-compare-fn' if that's non-nil." + (--filter (not (-contains? list2 it)) list)) + +(defvar -compare-fn nil + "Tests for equality use this function or `equal' if this is nil. +It should only be set using dynamic scope with a let, like: + + (let ((-compare-fn =)) (-union numbers1 numbers2 numbers3)") + +(defun -contains? (list element) + "Return non-nil if LIST contains ELEMENT. + +The test for equality is done with `equal', or with `-compare-fn' +if that's non-nil. + +Alias: `-contains-p'" + (not + (null + (cond + ((null -compare-fn) (member element list)) + ((eq -compare-fn 'eq) (memq element list)) + ((eq -compare-fn 'eql) (memql element list)) + (t + (let ((lst list)) + (while (and lst + (not (funcall -compare-fn element (car lst)))) + (setq lst (cdr lst))) + lst)))))) + +(defalias '-contains-p '-contains?) + +(defun -same-items? (list list2) + "Return true if LIST and LIST2 has the same items. + +The order of the elements in the lists does not matter. + +Alias: `-same-items-p'" + (let ((length-a (length list)) + (length-b (length list2))) + (and + (= length-a length-b) + (= length-a (length (-intersection list list2)))))) + +(defalias '-same-items-p '-same-items?) + +(defun -is-prefix? (prefix list) + "Return non-nil if PREFIX is prefix of LIST. + +Alias: `-is-prefix-p'" + (--each-while list (equal (car prefix) it) + (!cdr prefix)) + (not prefix)) + +(defun -is-suffix? (suffix list) + "Return non-nil if SUFFIX is suffix of LIST. + +Alias: `-is-suffix-p'" + (-is-prefix? (nreverse suffix) (nreverse list))) + +(defun -is-infix? (infix list) + "Return non-nil if INFIX is infix of LIST. + +This operation runs in O(n^2) time + +Alias: `-is-infix-p'" + (let (done) + (while (and (not done) list) + (setq done (-is-prefix? infix list)) + (!cdr list)) + done)) + +(defalias '-is-prefix-p '-is-prefix?) +(defalias '-is-suffix-p '-is-suffix?) +(defalias '-is-infix-p '-is-infix?) + +(defun -sort (comparator list) + "Sort LIST, stably, comparing elements using COMPARATOR. +Return the sorted list. LIST is NOT modified by side effects. +COMPARATOR is called with two elements of LIST, and should return non-nil +if the first element should sort before the second." + (sort (copy-sequence list) comparator)) + +(defmacro --sort (form list) + "Anaphoric form of `-sort'." + (declare (debug (form form))) + `(-sort (lambda (it other) ,form) ,list)) + +(defun -list (&rest args) + "Return a list with ARGS. + +If first item of ARGS is already a list, simply return ARGS. If +not, return a list with ARGS as elements." + (let ((arg (car args))) + (if (listp arg) arg args))) + +(defun -repeat (n x) + "Return a list with X repeated N times. +Return nil if N is less than 1." + (let (ret) + (--dotimes n (!cons x ret)) + ret)) + +(defun -sum (list) + "Return the sum of LIST." + (apply '+ list)) + +(defun -product (list) + "Return the product of LIST." + (apply '* list)) + +(defun -max (list) + "Return the largest value from LIST of numbers or markers." + (apply 'max list)) + +(defun -min (list) + "Return the smallest value from LIST of numbers or markers." + (apply 'min list)) + +(defun -max-by (comparator list) + "Take a comparison function COMPARATOR and a LIST and return +the greatest element of the list by the comparison function. + +See also combinator `-on' which can transform the values before +comparing them." + (--reduce (if (funcall comparator it acc) it acc) list)) + +(defun -min-by (comparator list) + "Take a comparison function COMPARATOR and a LIST and return +the least element of the list by the comparison function. + +See also combinator `-on' which can transform the values before +comparing them." + (--reduce (if (funcall comparator it acc) acc it) list)) + +(defmacro --max-by (form list) + "Anaphoric version of `-max-by'. + +The items for the comparator form are exposed as \"it\" and \"other\"." + (declare (debug (form form))) + `(-max-by (lambda (it other) ,form) ,list)) + +(defmacro --min-by (form list) + "Anaphoric version of `-min-by'. + +The items for the comparator form are exposed as \"it\" and \"other\"." + (declare (debug (form form))) + `(-min-by (lambda (it other) ,form) ,list)) + +(defun -iterate (fun init n) + "Return a list of iterated applications of FUN to INIT. + +This means a list of form: + + (init (fun init) (fun (fun init)) ...) + +N is the length of the returned list." + (if (= n 0) nil + (let ((r (list init))) + (--dotimes (1- n) + (push (funcall fun (car r)) r)) + (nreverse r)))) + +(defmacro --iterate (form init n) + "Anaphoric version of `-iterate'." + (declare (debug (form form form))) + `(-iterate (lambda (it) ,form) ,init ,n)) + +(defun -unfold (fun seed) + "Build a list from SEED using FUN. + +This is \"dual\" operation to `-reduce-r': while -reduce-r +consumes a list to produce a single value, `-unfold' takes a +seed value and builds a (potentially infinite!) list. + +FUN should return `nil' to stop the generating process, or a +cons (A . B), where A will be prepended to the result and B is +the new seed." + (let ((last (funcall fun seed)) r) + (while last + (push (car last) r) + (setq last (funcall fun (cdr last)))) + (nreverse r))) + +(defmacro --unfold (form seed) + "Anaphoric version of `-unfold'." + (declare (debug (form form))) + `(-unfold (lambda (it) ,form) ,seed)) + +(defun -cons-pair? (con) + "Return non-nil if CON is true cons pair. +That is (A . B) where B is not a list." + (and (listp con) + (not (listp (cdr con))))) + +(defun -cons-to-list (con) + "Convert a cons pair to a list with `car' and `cdr' of the pair respectively." + (list (car con) (cdr con))) + +(defun -value-to-list (val) + "Convert a value to a list. + +If the value is a cons pair, make a list with two elements, `car' +and `cdr' of the pair respectively. + +If the value is anything else, wrap it in a list." + (cond + ((-cons-pair? val) (-cons-to-list val)) + (t (list val)))) + +(defun -tree-mapreduce-from (fn folder init-value tree) + "Apply FN to each element of TREE, and make a list of the results. +If elements of TREE are lists themselves, apply FN recursively to +elements of these nested lists. + +Then reduce the resulting lists using FOLDER and initial value +INIT-VALUE. See `-reduce-r-from'. + +This is the same as calling `-tree-reduce-from' after `-tree-map' +but is twice as fast as it only traverse the structure once." + (cond + ((not tree) nil) + ((-cons-pair? tree) (funcall fn tree)) + ((listp tree) + (-reduce-r-from folder init-value (mapcar (lambda (x) (-tree-mapreduce-from fn folder init-value x)) tree))) + (t (funcall fn tree)))) + +(defmacro --tree-mapreduce-from (form folder init-value tree) + "Anaphoric form of `-tree-mapreduce-from'." + (declare (debug (form form form form))) + `(-tree-mapreduce-from (lambda (it) ,form) (lambda (it acc) ,folder) ,init-value ,tree)) + +(defun -tree-mapreduce (fn folder tree) + "Apply FN to each element of TREE, and make a list of the results. +If elements of TREE are lists themselves, apply FN recursively to +elements of these nested lists. + +Then reduce the resulting lists using FOLDER and initial value +INIT-VALUE. See `-reduce-r-from'. + +This is the same as calling `-tree-reduce' after `-tree-map' +but is twice as fast as it only traverse the structure once." + (cond + ((not tree) nil) + ((-cons-pair? tree) (funcall fn tree)) + ((listp tree) + (-reduce-r folder (mapcar (lambda (x) (-tree-mapreduce fn folder x)) tree))) + (t (funcall fn tree)))) + +(defmacro --tree-mapreduce (form folder tree) + "Anaphoric form of `-tree-mapreduce'." + (declare (debug (form form form))) + `(-tree-mapreduce (lambda (it) ,form) (lambda (it acc) ,folder) ,tree)) + +(defun -tree-map (fn tree) + "Apply FN to each element of TREE while preserving the tree structure." + (cond + ((not tree) nil) + ((-cons-pair? tree) (funcall fn tree)) + ((listp tree) + (mapcar (lambda (x) (-tree-map fn x)) tree)) + (t (funcall fn tree)))) + +(defmacro --tree-map (form tree) + "Anaphoric form of `-tree-map'." + (declare (debug (form form))) + `(-tree-map (lambda (it) ,form) ,tree)) + +(defun -tree-reduce-from (fn init-value tree) + "Use FN to reduce elements of list TREE. +If elements of TREE are lists themselves, apply the reduction recursively. + +FN is first applied to INIT-VALUE and first element of the list, +then on this result and second element from the list etc. + +The initial value is ignored on cons pairs as they always contain +two elements." + (cond + ((not tree) nil) + ((-cons-pair? tree) tree) + ((listp tree) + (-reduce-r-from fn init-value (mapcar (lambda (x) (-tree-reduce-from fn init-value x)) tree))) + (t tree))) + +(defmacro --tree-reduce-from (form init-value tree) + "Anaphoric form of `-tree-reduce-from'." + (declare (debug (form form form))) + `(-tree-reduce-from (lambda (it acc) ,form) ,init-value ,tree)) + +(defun -tree-reduce (fn tree) + "Use FN to reduce elements of list TREE. +If elements of TREE are lists themselves, apply the reduction recursively. + +FN is first applied to first element of the list and second +element, then on this result and third element from the list etc. + +See `-reduce-r' for how exactly are lists of zero or one element handled." + (cond + ((not tree) nil) + ((-cons-pair? tree) tree) + ((listp tree) + (-reduce-r fn (mapcar (lambda (x) (-tree-reduce fn x)) tree))) + (t tree))) + +(defmacro --tree-reduce (form tree) + "Anaphoric form of `-tree-reduce'." + (declare (debug (form form))) + `(-tree-reduce (lambda (it acc) ,form) ,tree)) + +(defun -tree-map-nodes (pred fun tree) + "Call FUN on each node of TREE that satisfies PRED. + +If PRED returns nil, continue descending down this node. If PRED +returns non-nil, apply FUN to this node and do not descend +further." + (if (funcall pred tree) + (funcall fun tree) + (if (listp tree) + (-map (lambda (x) (-tree-map-nodes pred fun x)) tree) + tree))) + +(defmacro --tree-map-nodes (pred form tree) + "Anaphoric form of `-tree-map-nodes'." + `(-tree-map-nodes (lambda (it) ,pred) (lambda (it) ,form) ,tree)) + +(defun -tree-seq (branch children tree) + "Return a sequence of the nodes in TREE, in depth-first search order. + +BRANCH is a predicate of one argument that returns non-nil if the +passed argument is a branch, that is, a node that can have children. + +CHILDREN is a function of one argument that returns the children +of the passed branch node. + +Non-branch nodes are simply copied." + (cons tree + (when (funcall branch tree) + (-mapcat (lambda (x) (-tree-seq branch children x)) + (funcall children tree))))) + +(defmacro --tree-seq (branch children tree) + "Anaphoric form of `-tree-seq'." + `(-tree-seq (lambda (it) ,branch) (lambda (it) ,children) ,tree)) + +(defun -clone (list) + "Create a deep copy of LIST. +The new list has the same elements and structure but all cons are +replaced with new ones. This is useful when you need to clone a +structure such as plist or alist." + (-tree-map 'identity list)) + +(defun dash-enable-font-lock () + "Add syntax highlighting to dash functions, macros and magic values." + (eval-after-load "lisp-mode" + '(progn + (let ((new-keywords '( + "-each" + "--each" + "-each-while" + "--each-while" + "-dotimes" + "--dotimes" + "-map" + "--map" + "-reduce-from" + "--reduce-from" + "-reduce" + "--reduce" + "-reduce-r-from" + "--reduce-r-from" + "-reduce-r" + "--reduce-r" + "-filter" + "--filter" + "-select" + "--select" + "-remove" + "--remove" + "-reject" + "--reject" + "-keep" + "--keep" + "-map-indexed" + "--map-indexed" + "-splice" + "--splice" + "-splice-list" + "--splice-list" + "-map-when" + "--map-when" + "-replace-where" + "--replace-where" + "-replace" + "-flatten" + "-flatten-n" + "-concat" + "-mapcat" + "--mapcat" + "-copy" + "-cons*" + "-snoc" + "-first" + "--first" + "-find" + "--find" + "-last" + "--last" + "-first-item" + "-last-item" + "-butlast" + "-count" + "--count" + "-any?" + "--any?" + "-some?" + "--some?" + "-any-p" + "--any-p" + "-some-p" + "--some-p" + "-all?" + "--all?" + "-every?" + "--every?" + "-all-p" + "--all-p" + "-every-p" + "--every-p" + "-none?" + "--none?" + "-none-p" + "--none-p" + "-only-some?" + "--only-some?" + "-only-some-p" + "--only-some-p" + "-slice" + "-take" + "-drop" + "-take-while" + "--take-while" + "-drop-while" + "--drop-while" + "-split-at" + "-rotate" + "-insert-at" + "-replace-at" + "-update-at" + "--update-at" + "-remove-at" + "-remove-at-indices" + "-split-with" + "--split-with" + "-split-on" + "-split-when" + "--split-when" + "-separate" + "--separate" + "-partition-all-in-steps" + "-partition-in-steps" + "-partition-all" + "-partition" + "-partition-by" + "--partition-by" + "-partition-by-header" + "--partition-by-header" + "-group-by" + "--group-by" + "-interpose" + "-interleave" + "-zip-with" + "--zip-with" + "-zip" + "-zip-fill" + "-cycle" + "-pad" + "-annotate" + "--annotate" + "-table" + "-table-flat" + "-partial" + "-elem-index" + "-elem-indices" + "-find-indices" + "--find-indices" + "-find-index" + "--find-index" + "-find-last-index" + "--find-last-index" + "-select-by-indices" + "-grade-up" + "-grade-down" + "->" + "->>" + "-->" + "-when-let" + "-when-let*" + "--when-let" + "-if-let" + "-if-let*" + "--if-let" + "-distinct" + "-uniq" + "-union" + "-intersection" + "-difference" + "-contains?" + "-contains-p" + "-same-items?" + "-same-items-p" + "-is-prefix-p" + "-is-prefix?" + "-is-suffix-p" + "-is-suffix?" + "-is-infix-p" + "-is-infix?" + "-sort" + "--sort" + "-list" + "-repeat" + "-sum" + "-product" + "-max" + "-min" + "-max-by" + "--max-by" + "-min-by" + "--min-by" + "-iterate" + "--iterate" + "-unfold" + "--unfold" + "-cons-pair?" + "-cons-to-list" + "-value-to-list" + "-tree-mapreduce-from" + "--tree-mapreduce-from" + "-tree-mapreduce" + "--tree-mapreduce" + "-tree-map" + "--tree-map" + "-tree-reduce-from" + "--tree-reduce-from" + "-tree-reduce" + "--tree-reduce" + "-tree-seq" + "--tree-seq" + "-tree-map-nodes" + "--tree-map-nodes" + "-clone" + "-rpartial" + "-juxt" + "-applify" + "-on" + "-flip" + "-const" + "-cut" + "-orfn" + "-andfn" + "-iteratefn" + "-prodfn" + )) + (special-variables '( + "it" + "it-index" + "acc" + "other" + ))) + (font-lock-add-keywords 'emacs-lisp-mode `((,(concat "\\_<" (regexp-opt special-variables 'paren) "\\_>") + 1 font-lock-variable-name-face)) 'append) + (font-lock-add-keywords 'emacs-lisp-mode `((,(concat "(\\s-*" (regexp-opt new-keywords 'paren) "\\_>") + 1 font-lock-keyword-face)) 'append)) + (--each (buffer-list) + (with-current-buffer it + (when (and (eq major-mode 'emacs-lisp-mode) + (boundp 'font-lock-mode) + font-lock-mode) + (font-lock-refresh-defaults))))))) + +(provide 'dash) +;;; dash.el ends here diff --git a/elpa/dash-20140717.547/dash.elc b/elpa/dash-20140717.547/dash.elc new file mode 100644 index 0000000000000000000000000000000000000000..30991000c48389fc32929ecee84890f3468f0c6f GIT binary patch literal 59273 zcmeHw33nUUl_t;3bPR%r950F6dzYwmNXi0(Dr}^Z*rFuLQMV&!BsxiV=xIV=K|}-s zGyqCse*Jvky>F`p1hpjHXJ&F@u~7Bu)m!eqy1nq&-9G+hIy~$C^0+%asquw+C+=*wnjN{boergg!6@2i z>*zV&9^i9HbGxw}%d;1Q*-6wLViaey!Rg?y-5DB8x2y8-;AAk>FP~4-X>@!s>YfgI z(eb!9olOR#r_-BwI+@O*?(s3E=)M#0ZYR5iK90xeV>F&cz42()MdR~XzqW%rquSo% zyAK{jy_4>w+nZsKH|6u)(Qz~#N4@SSdXh%NaX0f3Gnr|Wb|=F@I*Dc{XqYtgyIA`- z`X2}IrvIx}tDC*^>1=#jJ5GDU?j)@}os7@Vq7Cj>G#U(}^}F(X@YgibNB!|6;#2J1 zdUVS)9}cEx(XF#d+8?}()@8HTx2l`RX}>!hbf?;1t(K0uPljo&kL3kqJ&UgYd2@Pk z`eZzeo_B}m=~lE}IZWz}ca{zt^&~n>;yNxG%ay}*-0rMLf0kyEc}G4IbXk)=r|Arn z>37eEvmc_y4_npiw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CY}-Oo0cPZw|5JDJDsW2Ilp-IN~mp6|r}md6mJ{WJ5!ep%H<|CsDv6hPh* zDU=rzp*V`7e>s0CnP{gOmPDe z>fwL<8e-=peTpd1+V~85ZSmunbSe>RhyU@_`WC`p{HN>?Ye-v#01VXt6WG9#AWVw! zfL0=Yl`(A|9!_hZ1L3H$qVOdHGV*eMC>V=M&C%u)}^vusIuzM%jA3#wIkabw*=%LPP1AcNAMvw;|Nh1w{_Qjt5|c;_ub6 zxLRDGoEOW1V&8=ZdnUo`e>7d3F~>}rhE$Y#W?V~r*w~8bY-5C{C(+l=FN&2c|15ui zZGDi&4b;}-uIIrM^I8^CF6BZN1NLlF1#+yfO}4QwlsF;EYykgNHoj>(MiZe=o*Jv5 zgNmuM{t%~(b}@mp=HWm3^paLTICNkR9}-mXi8%R~_TrKwUfeux?(d;0>PRIPIUU-Q z*N6d%Jaz^y(3d9f!$cVBoHZR%#fjzOtuMRstJMqm?aH!jtj*qfBU(~59Srhs9_GkD zyU5oq)dpK3(NDh>Q#^;R?w@w3gtH8%%ADARK05q{9OvV)a>Cgi^0_SY$z+nf0uX}6 Au>b%7 literal 0 HcmV?d00001 diff --git a/elpa/elisp-slime-nav-20140619.254/elisp-slime-nav.el b/elpa/elisp-slime-nav-20140619.254/elisp-slime-nav.el new file mode 100644 index 000000000..c5d93b755 --- /dev/null +++ b/elpa/elisp-slime-nav-20140619.254/elisp-slime-nav.el @@ -0,0 +1,116 @@ +;;; elisp-slime-nav.el --- Make M-. and M-, work in elisp like they do in slime +;; +;; Author: Steve Purcell +;; Keywords: navigation slime elisp emacs-lisp +;; URL: https://github.com/purcell/elisp-slime-nav +;; Version: 20140619.254 +;; X-Original-Version: DEV +;; Package-Requires: ((cl-lib "0.2")) +;; +;;; Commentary: +;; +;; This package provides Slime's convenient "M-." and "M-," navigation +;; in `emacs-lisp-mode', together with an elisp equivalent of +;; `slime-describe-symbol', bound by default to `C-c C-d d`. +;; +;; When the main functions are given a prefix argument, they will +;; prompt for the symbol upon which to operate. +;; +;; Usage: +;; +;; Enable the package in elisp and ielm modes as follows: +;; +;; (require 'elisp-slime-nav) ;; optional if installed via package.el +;; (dolist (hook '(emacs-lisp-mode-hook ielm-mode-hook)) +;; (add-hook hook 'turn-on-elisp-slime-nav-mode)) +;; +;; Known issues: +;; +;; When navigating into Emacs' C source, "M-," will not be bound to +;; the same command, but "M-*" will typically do the trick. +;; +;;; Code: + +(eval-when-compile (require 'cl-lib)) +(require 'etags) +(require 'help-mode) + +(defvar elisp-slime-nav-mode-map + (let ((map (make-sparse-keymap))) + (define-key map (kbd "M-.") 'elisp-slime-nav-find-elisp-thing-at-point) + (define-key map (kbd "M-,") 'pop-tag-mark) + (define-key map (kbd "C-c C-d d") 'elisp-slime-nav-describe-elisp-thing-at-point) + (define-key map (kbd "C-c C-d C-d") 'elisp-slime-nav-describe-elisp-thing-at-point) + map)) + +;;;###autoload +(define-minor-mode elisp-slime-nav-mode + "Enable Slime-style navigation of elisp symbols using M-. and M-," + nil " SliNav" elisp-slime-nav-mode-map) + +;;;###autoload +(defun turn-on-elisp-slime-nav-mode () + "Explicitly enable `elisp-slime-nav-mode'." + (elisp-slime-nav-mode 1)) + +(defun elisp-slime-nav--all-navigable-symbol-names () + "Return a list of strings for the symbols to which navigation is possible." + (cl-loop for x being the symbols + if (or (fboundp x) (boundp x) (symbol-plist x) (facep x)) + collect (symbol-name x))) + +(defun elisp-slime-nav--read-symbol-at-point () + "Return the symbol at point as a string. +If `current-prefix-arg' is not nil, the user is prompted for the symbol." + (let* ((sym-at-point (symbol-at-point)) + (at-point (and sym-at-point (symbol-name sym-at-point)))) + (if (or current-prefix-arg (null at-point)) + (completing-read "Symbol: " + (elisp-slime-nav--all-navigable-symbol-names) + nil t at-point) + at-point))) + +;;;###autoload +(defun elisp-slime-nav-find-elisp-thing-at-point (sym-name) + "Find the elisp thing at point, be it a function, variable, library or face. + +With a prefix arg, or if there is no thing at point, prompt for +the symbol to jump to. + +Argument SYM-NAME is the thing to find." + (interactive (list (elisp-slime-nav--read-symbol-at-point))) + (when sym-name + (let ((sym (intern sym-name))) + (message "Searching for %s..." (pp-to-string sym)) + (ring-insert find-tag-marker-ring (point-marker)) + (cond + ((fboundp sym) (find-function sym)) + ((boundp sym) (find-variable sym)) + ((or (featurep sym) (locate-library sym-name)) + (find-library sym-name)) + ((facep sym) + (find-face-definition sym)) + (:else + (progn + (pop-tag-mark) + (error "Don't know how to find '%s'" sym))))))) + +;;;###autoload +(defun elisp-slime-nav-describe-elisp-thing-at-point (sym-name) + "Display the full documentation of the elisp thing at point. + +The named subject may be a function, variable, library or face. + +With a prefix arg, or if there is not \"thing\" at point, prompt +for the symbol to jump to. + +Argument SYM-NAME is the thing to find." + (interactive (list (elisp-slime-nav--read-symbol-at-point))) + (help-xref-interned (intern sym-name))) + + +(provide 'elisp-slime-nav) +;; Local Variables: +;; indent-tabs-mode: nil +;; End: +;;; elisp-slime-nav.el ends here diff --git a/elpa/elisp-slime-nav-20140619.254/elisp-slime-nav.elc b/elpa/elisp-slime-nav-20140619.254/elisp-slime-nav.elc new file mode 100644 index 0000000000000000000000000000000000000000..100bd5b73163e8cf3b024694d6d1a8cbbb8c4945 GIT binary patch literal 4084 zcmb_fU325a5=|96B!0M6zyr$*bYzy;RK}~3WP80^3t5&>wZ+Xo5a1TINfl#hWQ*tv zePm;PJ*P*KRRwxdm?8eXYAb{9O>AYjZ!*g8*~ku5f0&aBX=at*t@7& zl8SM*yo!?OFI8beIqI3gpO;bDoTn~zNx>>rN#s+I`DIl^>7qQwXi-+Af&dp^@59HL zZP^Gi*hsUA{4A{$Cf8Lco}woeFVA1Seog*T70R!0$YZm;N&_l0@>NQ6O>w5~Y|>t) zB&~`#(gjsZOmy64Uqs{|{qX_*>0htc8_ZXg7Je3JvMyZP#v>0e9LWuS9Q?4S7QHR> zpLJAd(v@12v_z~$f>oE~410q>hu5m0`?2Q1zvnZ`@S2>rIXSu-jai!vltPeg6tSv))pn%=0od}yy39dKauu~-T+%^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tOB0_nS#&Znf2GT9>cOr%nGn95EkXa3|NpRhce_KogPGpTzCWngvY z!w0=rWSEz%U|ElSs?Y#x%FzYYsxJ&g@GR=Vw?_Gk_t8ra;$*N@9E9aQIAv--Ce--= zCJE7C0K%NzfMm zm|TbPAkk?h9fXF6d2#Wj-@mEO0dB1*iiSe&m61t@{D8HDn06II{Cit;y=>?8%Gs!$ XLwAbdemLYh(P{_rgcb2X0f9vrVy literal 0 HcmV?d00001 diff --git a/elpa/epl-20140620.218/epl.el b/elpa/epl-20140620.218/epl.el new file mode 100644 index 000000000..6b8365f6c --- /dev/null +++ b/elpa/epl-20140620.218/epl.el @@ -0,0 +1,566 @@ +;;; epl.el --- Emacs Package Library -*- lexical-binding: t; -*- + +;; Copyright (C) 2013, 2014 Sebastian Wiesner + +;; Author: Sebastian Wiesner +;; Maintainer: Johan Andersson +;; Sebastian Wiesner +;; Version: 20140620.218 +;; X-Original-Version: 0.7-cvs +;; Package-Requires: ((cl-lib "0.3")) +;; Keywords: convenience +;; URL: http://github.com/cask/epl + +;; This file is NOT part of GNU Emacs. + +;; 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: + +;; A package management library for Emacs, based on package.el. + +;; The purpose of this library is to wrap all the quirks and hassle of +;; package.el into a sane API. + +;; The following functions comprise the public interface of this library: + +;;; Package directory selection + +;; `epl-package-dir' gets the directory of packages. + +;; `epl-default-package-dir' gets the default package directory. + +;; `epl-change-package-dir' changes the directory of packages. + +;;; Package system management + +;; `epl-initialize' initializes the package system and activates all +;; packages. + +;; `epl-reset' resets the package system. + +;; `epl-refresh' refreshes all package archives. + +;; `epl-add-archive' adds a new package archive. + +;;; Package objects + +;; Struct `epl-requirement' describes a requirement of a package with `name' and +;; `version' slots. + +;; `epl-requirement-version-string' gets a requirement version as string. + +;; Struct `epl-package' describes an installed or installable package with a +;; `name' and some internal `description'. + +;; `epl-package-version' gets the version of a package. + +;; `epl-package-version-string' gets the version of a package as string. + +;; `epl-package-summary' gets the summary of a package. + +;; `epl-package-requirements' gets the requirements of a package. + +;; `epl-package-directory' gets the installation directory of a package. + +;; `epl-package-from-buffer' creates a package object for the package contained +;; in the current buffer. + +;; `epl-package-from-file' creates a package object for a package file, either +;; plain lisp or tarball. + +;; `epl-package-from-descriptor-file' creates a package object for a package +;; description (i.e. *-pkg.el) file. + +;;; Package database access + +;; `epl-package-installed-p' determines whether a package is installed. + +;; `epl-installed-packages' and `epl-available-packages' get all packages +;; installed and available for installation respectively. + +;; `epl-find-installed-package' and `epl-find-available-packages' find installed +;; and available packages by name. + +;; `epl-find-upgrades' finds all upgradable packages. + +;; `epl-built-in-p' return true if package is built-in to Emacs. + +;;; Package operations + +;; `epl-install-file' installs a package file. + +;; `epl-package-install' installs a package. + +;; `epl-package-delete' deletes a package. + +;; `epl-upgrade' upgrades packages. + +;;; Code: + +(require 'cl-lib) +(require 'package) + +(defun epl--package-desc-p (package) + "Whether PACKAGE is a `package-desc' object. + +Like `package-desc-p', but return nil, if `package-desc-p' is not +defined as function." + (and (fboundp 'package-desc-p) (package-desc-p package))) + + +;;; Package directory +(defun epl-package-dir () + "Get the directory of packages." + package-user-dir) + +(defun epl-default-package-dir () + "Get the default directory of packages." + (eval (car (get 'package-user-dir 'standard-value)))) + +(defun epl-change-package-dir (directory) + "Change the directory of packages to DIRECTORY." + (setq package-user-dir directory) + (epl-initialize)) + + +;;; Package system management +(defvar epl--load-path-before-initialize nil + "Remember the load path for `epl-reset'.") + +(defun epl-initialize (&optional no-activate) + "Load Emacs Lisp packages and activate them. + +With NO-ACTIVATE non-nil, do not activate packages." + (setq epl--load-path-before-initialize load-path) + (package-initialize no-activate)) + +(defalias 'epl-refresh 'package-refresh-contents) + +(defun epl-add-archive (name url) + "Add a package archive with NAME and URL." + (add-to-list 'package-archives (cons name url))) + +(defun epl-reset () + "Reset the package system. + +Clear the list of installed and available packages, the list of +package archives and reset the package directory." + (setq package-alist nil + package-archives nil + package-archive-contents nil + load-path epl--load-path-before-initialize) + (when (boundp 'package-obsolete-alist) ; Legacy package.el + (setq package-obsolete-alist nil)) + (epl-change-package-dir (epl-default-package-dir))) + + +;;; Package structures +(cl-defstruct (epl-requirement + (:constructor epl-requirement-create)) + "Structure describing a requirement. + +Slots: + +`name' The name of the required package, as symbol. + +`version' The version of the required package, as version list." + name + version) + +(defun epl-requirement-version-string (requirement) + "The version of a REQUIREMENT, as string." + (package-version-join (epl-requirement-version requirement))) + +(cl-defstruct (epl-package (:constructor epl-package-create)) + "Structure representing a package. + +Slots: + +`name' The package name, as symbol. + +`description' The package description. + +The format package description varies between package.el +variants. For `package-desc' variants, it is simply the +corresponding `package-desc' object. For legacy variants, it is +a vector `[VERSION REQS DOCSTRING]'. + +Do not access `description' directly, but instead use the +`epl-package' accessors." + name + description) + +(defmacro epl-package-as-description (var &rest body) + "Cast VAR to a package description in BODY. + +VAR is a symbol, bound to an `epl-package' object. This macro +casts this object to the `description' object, and binds the +description to VAR in BODY." + (declare (indent 1)) + (unless (symbolp var) + (signal 'wrong-type-argument (list #'symbolp var))) + `(if (epl-package-p ,var) + (let ((,var (epl-package-description ,var))) + ,@body) + (signal 'wrong-type-argument (list #'epl-package-p ,var)))) + +(defun epl-package--package-desc-p (package) + "Whether the description of PACKAGE is a `package-desc'." + (epl--package-desc-p (epl-package-description package))) + +(defun epl-package-version (package) + "Get the version of PACKAGE, as version list." + (epl-package-as-description package + (cond + ((fboundp 'package-desc-version) (package-desc-version package)) + ;; Legacy + ((fboundp 'package-desc-vers) + (let ((version (package-desc-vers package))) + (if (listp version) version (version-to-list version)))) + (:else (error "Cannot get version from %S" package))))) + +(defun epl-package-version-string (package) + "Get the version from a PACKAGE, as string." + (package-version-join (epl-package-version package))) + +(defun epl-package-summary (package) + "Get the summary of PACKAGE, as string." + (epl-package-as-description package + (cond + ((fboundp 'package-desc-summary) (package-desc-summary package)) + ((fboundp 'package-desc-doc) (package-desc-doc package)) ; Legacy + (:else (error "Cannot get summary from %S" package))))) + +(defun epl-requirement--from-req (req) + "Create a `epl-requirement' from a `package-desc' REQ." + (cl-destructuring-bind (name version) req + (epl-requirement-create :name name + :version (if (listp version) version + (version-to-list version))))) + +(defun epl-package-requirements (package) + "Get the requirements of PACKAGE. + +The requirements are a list of `epl-requirement' objects." + (epl-package-as-description package + (mapcar #'epl-requirement--from-req (package-desc-reqs package)))) + +(defun epl-package-directory (package) + "Get the directory PACKAGE is installed to. + +Return the absolute path of the installation directory of +PACKAGE, or nil, if PACKAGE is not installed." + (cond + ((fboundp 'package-desc-dir) + (package-desc-dir (epl-package-description package))) + ((fboundp 'package--dir) + (package--dir (symbol-name (epl-package-name package)) + (epl-package-version-string package))) + (:else (error "Cannot get package directory from %S" package)))) + +(defun epl-package-->= (pkg1 pkg2) + "Determine whether PKG1 is before PKG2 by version." + (not (version-list-< (epl-package-version pkg1) + (epl-package-version pkg2)))) + +(defun epl-package--from-package-desc (package-desc) + "Create an `epl-package' from a PACKAGE-DESC. + +PACKAGE-DESC is a `package-desc' object, from recent package.el +variants." + (if (and (fboundp 'package-desc-name) + (epl--package-desc-p package-desc)) + (epl-package-create :name (package-desc-name package-desc) + :description package-desc) + (signal 'wrong-type-argument (list 'epl--package-desc-p package-desc)))) + +(defun epl-package--parse-info (info) + "Parse a package.el INFO." + (if (epl--package-desc-p info) + (epl-package--from-package-desc info) + ;; For legacy package.el, info is a vector [NAME REQUIRES DESCRIPTION + ;; VERSION COMMENTARY]. We need to re-shape this vector into the + ;; `package-alist' format [VERSION REQUIRES DESCRIPTION] to attach it to the + ;; new `epl-package'. + (let ((name (intern (aref info 0))) + (info (vector (aref info 3) (aref info 1) (aref info 2)))) + (epl-package-create :name name :description info)))) + +(defun epl-package-from-buffer (&optional buffer) + "Create an `epl-package' object from BUFFER. + +BUFFER defaults to the current buffer." + (let ((info (with-current-buffer (or buffer (current-buffer)) + (package-buffer-info)))) + (epl-package--parse-info info))) + +(defun epl-package-from-lisp-file (file-name) + "Parse the package headers the file at FILE-NAME. + +Return an `epl-package' object with the header metadata." + (with-temp-buffer + (insert-file-contents file-name) + (epl-package-from-buffer (current-buffer)))) + +(defun epl-package-from-tar-file (file-name) + "Parse the package tarball at FILE-NAME. + +Return a `epl-package' object with the meta data of the tarball +package in FILE-NAME." + (condition-case nil + ;; In legacy package.el, `package-tar-file-info' takes the name of the tar + ;; file to parse as argument. In modern package.el, it has no arguments + ;; and works on the current buffer. Hence, we just try to call the legacy + ;; version, and if that fails because of a mismatch between formal and + ;; actual arguments, we use the modern approach. To avoid spurious + ;; signature warnings by the byte compiler, we suppress warnings when + ;; calling the function. + (epl-package--parse-info (with-no-warnings + (package-tar-file-info file-name))) + (wrong-number-of-arguments + (with-temp-buffer + (insert-file-contents-literally file-name) + ;; Switch to `tar-mode' to enable extraction of the file. Modern + ;; `package-tar-file-info' relies on `tar-mode', and signals an error if + ;; called in a buffer with a different mode. + (tar-mode) + (epl-package--parse-info (with-no-warnings + (package-tar-file-info))))))) + +(defun epl-package-from-file (file-name) + "Parse the package at FILE-NAME. + +Return an `epl-package' object with the meta data of the package +at FILE-NAME." + (if (string-match-p (rx ".tar" string-end) file-name) + (epl-package-from-tar-file file-name) + (epl-package-from-lisp-file file-name))) + +(defun epl-package--parse-descriptor-requirement (requirement) + "Parse a REQUIREMENT in a package descriptor." + ;; This function is only called on legacy package.el. On package-desc + ;; package.el, we just let package.el do the work. + (cl-destructuring-bind (name version-string) requirement + (list name (version-to-list version-string)))) + +(defun epl-package-from-descriptor-file (descriptor-file) + "Load a `epl-package' from a package DESCRIPTOR-FILE. + +A package descriptor is a file defining a new package. Its name +typically ends with -pkg.el." + (with-temp-buffer + (insert-file-contents descriptor-file) + (goto-char (point-min)) + (let ((sexp (read (current-buffer)))) + (unless (eq (car sexp) 'define-package) + (error "%S is no valid package descriptor" descriptor-file)) + (if (and (fboundp 'package-desc-from-define) + (fboundp 'package-desc-name)) + ;; In Emacs snapshot, we can conveniently call a function to parse the + ;; descriptor + (let ((desc (apply #'package-desc-from-define (cdr sexp)))) + (epl-package-create :name (package-desc-name desc) + :description desc)) + ;; In legacy package.el, we must manually deconstruct the descriptor, + ;; because the load function has eval's the descriptor and has a lot of + ;; global side-effects. + (cl-destructuring-bind + (name version-string summary requirements) (cdr sexp) + (epl-package-create + :name (intern name) + :description + (vector (version-to-list version-string) + (mapcar #'epl-package--parse-descriptor-requirement + ;; Strip the leading `quote' from the package list + (cadr requirements)) + summary))))))) + + +;;; Package database access +(defun epl-package-installed-p (package) + "Determine whether a PACKAGE is installed. + +PACKAGE is either a package name as symbol, or a package object." + (let ((name (if (epl-package-p package) + (epl-package-name package) + package)) + (version (when (epl-package-p package) + (epl-package-version package)))) + (package-installed-p name version))) + +(defun epl--parse-package-list-entry (entry) + "Parse a list of packages from ENTRY. + +ENTRY is a single entry in a package list, e.g. `package-alist', +`package-archive-contents', etc. Typically it is a cons cell, +but the exact format varies between package.el versions. This +function tries to parse all known variants. + +Return a list of `epl-package' objects parsed from ENTRY." + (let ((descriptions (cdr entry))) + (cond + ((listp descriptions) + (sort (mapcar #'epl-package--from-package-desc descriptions) + #'epl-package-->=)) + ;; Legacy package.el has just a single package in an entry, which is a + ;; standard description vector + ((vectorp descriptions) + (list (epl-package-create :name (car entry) + :description descriptions))) + (:else (error "Cannot parse entry %S" entry))))) + +(defun epl-installed-packages () + "Get all installed packages. + +Return a list of package objects." + (apply #'append (mapcar #'epl--parse-package-list-entry package-alist))) + +(defun epl--find-package-in-list (name list) + "Find a package by NAME in a package LIST. + +Return a list of corresponding `epl-package' objects." + (let ((entry (assq name list))) + (when entry + (epl--parse-package-list-entry entry)))) + +(defun epl-find-installed-package (name) + "Find an installed package by NAME. + +NAME is a package name, as symbol. + +Return the installed package as `epl-package' object, or nil, if +no package with NAME is installed." + ;; FIXME: We must return *all* installed packages here + (car (epl--find-package-in-list name package-alist))) + +(defun epl-available-packages () + "Get all packages available for installed. + +Return a list of package objects." + (apply #'append (mapcar #'epl--parse-package-list-entry + package-archive-contents))) + +(defun epl-find-available-packages (name) + "Find available packages for NAME. + +NAME is a package name, as symbol. + +Return a list of available packages for NAME, sorted by version +number in descending order. Return nil, if there are no packages +for NAME." + (epl--find-package-in-list name package-archive-contents)) + +(cl-defstruct (epl-upgrade + (:constructor epl-upgrade-create)) + "Structure describing an upgradable package. +Slots: + +`installed' The installed package + +`available' The package available for installation." + installed + available) + +(defun epl-find-upgrades (&optional packages) + "Find all upgradable PACKAGES. + +PACKAGES is a list of package objects to upgrade, defaulting to +all installed packages. + +Return a list of `epl-upgrade' objects describing all upgradable +packages." + (let ((packages (or packages (epl-installed-packages))) + upgrades) + (dolist (pkg packages) + (let* ((version (epl-package-version pkg)) + (name (epl-package-name pkg)) + ;; Find the latest available package for NAME + (available-pkg (car (epl-find-available-packages name))) + (available-version (when available-pkg + (epl-package-version available-pkg)))) + (when (and available-version (version-list-< version available-version)) + (push (epl-upgrade-create :installed pkg + :available available-pkg) + upgrades)))) + (nreverse upgrades))) + +(defalias 'epl-built-in-p 'package-built-in-p) + + +;;; Package operations + +(defalias 'epl-install-file 'package-install-file) + +(defun epl-package-install (package &optional force) + "Install a PACKAGE. + +PACKAGE is a `epl-package' object. If FORCE is given and +non-nil, install PACKAGE, even if it is already installed." + (when (or force (not (epl-package-installed-p package))) + (if (epl-package--package-desc-p package) + (package-install (epl-package-description package)) + ;; The legacy API installs by name. We have no control over versioning, + ;; etc. + (package-install (epl-package-name package))))) + +(defun epl-package-delete (package) + "Delete a PACKAGE. + +PACKAGE is a `epl-package' object to delete." + ;; package-delete allows for packages being trashed instead of fully deleted. + ;; Let's prevent his silly behavior + (let ((delete-by-moving-to-trash nil)) + ;; The byte compiler will warn us that we are calling `package-delete' with + ;; the wrong number of arguments, since it can't infer that we guarantee to + ;; always call the correct version. Thus we suppress all warnings when + ;; calling `package-delete'. I wish there was a more granular way to + ;; disable just that specific warning, but it is what it is. + (if (epl-package--package-desc-p package) + (with-no-warnings + (package-delete (epl-package-description package))) + ;; The legacy API deletes by name (as string!) and version instead by + ;; descriptor. Hence `package-delete' takes two arguments. For some + ;; insane reason, the arguments are strings here! + (let ((name (symbol-name (epl-package-name package))) + (version (epl-package-version-string package))) + (with-no-warnings + (package-delete name version)) + ;; Legacy package.el does not remove the deleted package + ;; from the `package-alist', so we do it manually here. + (let ((pkg (assq (epl-package-name package) package-alist))) + (when pkg + (setq package-alist (delq pkg package-alist)))))))) + +(defun epl-upgrade (&optional packages preserve-obsolete) + "Upgrade PACKAGES. + +PACKAGES is a list of package objects to upgrade, defaulting to +all installed packages. + +The old versions of the updated packages are deleted, unless +PRESERVE-OBSOLETE is non-nil. + +Return a list of all performed upgrades, as a list of +`epl-upgrade' objects." + (let ((upgrades (epl-find-upgrades packages))) + (dolist (upgrade upgrades) + (epl-package-install (epl-upgrade-available upgrade) 'force) + (unless preserve-obsolete + (epl-package-delete (epl-upgrade-installed upgrade)))) + upgrades)) + +(provide 'epl) + +;;; epl.el ends here diff --git a/elpa/epl-20140620.218/epl.elc b/elpa/epl-20140620.218/epl.elc new file mode 100644 index 0000000000000000000000000000000000000000..b14cb2e281084ee4a538a5cc91005ab241702e39 GIT binary patch literal 27774 zcmdsA3sW3Nk`{u)G8=K{-MGEAcOz~KSP5{@c)EKYAU_TSNMenJ50HF&Mi**k8kp5E zGwx|5v%mhn%&M%e?w;Xc$w*p705je7%*xEl`ZBZh<>vPKA8y^cHTC6}U#j)qX}{fx zTk7y!okr;@eg@umQS(8s_j0MzYepT_>#DsdRcmL*O06iralh){534Gu_*HJ=DCwQ5 zBQ&DEcshua!53)bi>3H9Y7UlKU&Nh$^hMn7cvQYp4=PK6zf2F7;tp4Dchx49Rj*LD zjn0DVQn=*vyVvdXL`5Bp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-u>4+JSX-%PB#v&q6~X&lsz75Jy=D*Eej38~Q**UPW&=+)GvowG*x zDXop}UVogb3*Bu_{2jiKz@VH=%g{Y%m%FpQrZ7OPhS ziDJjr{nVh@vf*W#h{HrOcY~Sin{3znaCG%LE$g?IDA=<;V&dSfFkR?`E=|1FqB`q# zaI@Uh_q&^Wo4e08y`2YpxZEE9CkY%~M)hIPB~L0lo8kmci&Hc$8#X)O?4+hx&zg7E zUNC}FHU?B_3}vY@jj?W|fMl2hqy%Zh)jRh$)*Q%X1${-)pZ^E4I)c`>QnNpNZHs4Pm)^N`dRJt(r|44}xaR2}S literal 0 HcmV?d00001 diff --git a/elpa/find-file-in-project-20140603.1619/find-file-in-project-autoloads.el b/elpa/find-file-in-project-20140603.1619/find-file-in-project-autoloads.el new file mode 100644 index 000000000..ecf5361bb --- /dev/null +++ b/elpa/find-file-in-project-20140603.1619/find-file-in-project-autoloads.el @@ -0,0 +1,47 @@ +;;; find-file-in-project-autoloads.el --- automatically extracted autoloads +;; +;;; Code: + + +;;;### (autoloads (find-file-in-project) "find-file-in-project" "find-file-in-project.el" +;;;;;; (21478 16685 0 0)) +;;; Generated autoloads from find-file-in-project.el + +(autoload 'find-file-in-project "find-file-in-project" "\ +Prompt with a completing list of all files in the project to find one. + +The project's scope is defined as the first directory containing +an `.emacs-project' file. You can override this by locally +setting the variable `ffip-project-root'. + +\(fn)" t nil) + +(defalias 'ffip 'find-file-in-project) + +(put 'ffip-patterns 'safe-local-variable 'listp) + +(put 'ffip-find-options 'safe-local-variable 'stringp) + +(put 'ffip-project-file 'safe-local-variable 'stringp) + +(put 'ffip-project-root 'safe-local-variable 'stringp) + +(put 'ffip-project-root-function 'safe-local-variable 'functionp) + +(put 'ffip-limit 'safe-local-variable 'integerp) + +;;;*** + +;;;### (autoloads nil nil ("find-file-in-project-pkg.el") (21478 +;;;;;; 16685 397729 0)) + +;;;*** + +(provide 'find-file-in-project-autoloads) +;; Local Variables: +;; version-control: never +;; no-byte-compile: t +;; no-update-autoloads: t +;; coding: utf-8 +;; End: +;;; find-file-in-project-autoloads.el ends here diff --git a/elpa/find-file-in-project-20140603.1619/find-file-in-project-pkg.el b/elpa/find-file-in-project-20140603.1619/find-file-in-project-pkg.el new file mode 100644 index 000000000..2156193ed --- /dev/null +++ b/elpa/find-file-in-project-20140603.1619/find-file-in-project-pkg.el @@ -0,0 +1 @@ +(define-package "find-file-in-project" "20140603.1619" "Find files in a project quickly." (quote nil)) diff --git a/elpa/find-file-in-project-20140603.1619/find-file-in-project-pkg.elc b/elpa/find-file-in-project-20140603.1619/find-file-in-project-pkg.elc new file mode 100644 index 0000000000000000000000000000000000000000..508e94e31bf2b05c46a90a8f5688d8f0abbf995b GIT binary patch literal 656 zcmbtRL2kk@5agT>^t$5IO4uO@q77V15tWeI6YT>Q+eus;JB>{%`uc7Hs)Wjom3;8- zcxJpaU%f1E27^H~pU+|G>P8zSVS9iY!y_HfUQs+bx8ueMG~g_3Fu-D80_2d~&nC$% z%OD*mlb)hzT@3}1K>Y4i>to`GxvEikE@NdHj0mW>9*0k`9BWnh{L)7!r6cX-iLxcP{*>xX1QL2sIWy5$mFP( zM=QZQ5NKhmz&Jb;Ieo^1!q#ZjLZ}FsW=CBL=&I@rTw75T-AY9PD%PObVX0tvDb67b f&jO|UGo{{d-gjF?I0X-%do6b6z=vS9xr=@Q`3A%J literal 0 HcmV?d00001 diff --git a/elpa/find-file-in-project-20140603.1619/find-file-in-project.el b/elpa/find-file-in-project-20140603.1619/find-file-in-project.el new file mode 100644 index 000000000..757b13c72 --- /dev/null +++ b/elpa/find-file-in-project-20140603.1619/find-file-in-project.el @@ -0,0 +1,184 @@ +;;; find-file-in-project.el --- Find files in a project quickly. + +;; Copyright (C) 2006-2009, 2011-2012 +;; Phil Hagelberg, Doug Alcorn, and Will Farrington + +;; Author: Phil Hagelberg, Doug Alcorn, and Will Farrington +;; URL: http://www.emacswiki.org/cgi-bin/wiki/FindFileInProject +;; Git: git://github.com/technomancy/find-file-in-project.git +;; Version: 20140603.1619 +;; X-Original-Version: 3.3 +;; Created: 2008-03-18 +;; Keywords: project, convenience +;; EmacsWiki: FindFileInProject + +;; This file is NOT part of GNU Emacs. + +;;; License: + +;; 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, 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 GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;; This library provides a couple methods for quickly finding any file +;; in a given project. It depends on GNU find. + +;; A project is found by searching up the directory tree until a file +;; is found that matches `ffip-project-file'. (".git" by default.) +;; You can set `ffip-project-root-function' to provide an alternate +;; function to search for the project root. By default, it looks only +;; for files whose names match `ffip-patterns', + +;; If you have so many files that it becomes unwieldy, you can set +;; `ffip-find-options' to a string which will be passed to the `find' +;; invocation in order to exclude irrelevant subdirectories. For +;; instance, in a Ruby on Rails project, you may be interested in all +;; .rb files that don't exist in the "vendor" directory. In that case +;; you could set `ffip-find-options' to "-not -regex \".*vendor.*\"". + +;; All these variables may be overridden on a per-directory basis in +;; your .dir-locals.el. See (info "(Emacs) Directory Variables") for +;; details. + +;; Recommended binding: (global-set-key (kbd "C-x f") 'find-file-in-project) + +;;; TODO: + +;; Add compatibility with BSD find (PDI; I can't virtualize OS X) + +;;; Code: + +(require 'cl) + +(defvar ffip-project-file ".git" + "The file that should be used to define a project root. + +May be set using .dir-locals.el. Checks each entry if set to a list.") + +(defvar ffip-patterns + '("*.html" "*.org" "*.txt" "*.md" "*.el" "*.clj" "*.py" "*.rb" "*.js" "*.pl" + "*.sh" "*.erl" "*.hs" "*.ml") + "List of patterns to look for with `find-file-in-project'.") + +(defvar ffip-prune-patterns + '(".git") + "List of directory patterns to not decend into when listing files in `find-file-in-project'.") + +(defvar ffip-find-options "" + "Extra options to pass to `find' when using `find-file-in-project'. + +Use this to exclude portions of your project: \"-not -regex \\\".*svn.*\\\"\".") + +(defvar ffip-project-root nil + "If non-nil, overrides the project root directory location.") + +(defvar ffip-project-root-function nil + "If non-nil, this function is called to determine the project root. + +This overrides variable `ffip-project-root' when set.") + +(defvar ffip-limit 512 + "Limit results to this many files.") + +(defvar ffip-full-paths nil + "If non-nil, show fully project-relative paths.") + +(defun ffip-project-root () + "Return the root of the project." + (let ((project-root (or ffip-project-root + (if (functionp ffip-project-root-function) + (funcall ffip-project-root-function) + (if (listp ffip-project-file) + (some (apply-partially 'locate-dominating-file + default-directory) + ffip-project-file) + (locate-dominating-file default-directory + ffip-project-file)))))) + (or project-root + (progn (message "No project was defined for the current file.") + nil)))) + +(defun ffip-uniqueify (file-cons) + "Set the car of FILE-CONS to include the directory name plus the file name." + (setcar file-cons + (concat (cadr (reverse (split-string (cdr file-cons) "/"))) "/" + (car file-cons)))) + +(defun ffip-join-patterns () + "Turn `ffip-patterns' into a string that `find' can use." + (mapconcat (lambda (pat) (format "-name \"%s\"" pat)) + ffip-patterns " -or ")) + +(defun ffip-prune-patterns () + "Turn `ffip-prune-patterns' into a string that `find' can use." + (mapconcat (lambda (pat) (format "-name \"%s\"" pat)) + ffip-prune-patterns " -or ")) + + +(defun ffip-project-files () + "Return an alist of all filenames in the project and their path. + +Files with duplicate filenames are suffixed with the name of the +directory they are found in so that they are unique." + (let ((file-alist nil) + (root (expand-file-name (or ffip-project-root (ffip-project-root) + (error "No project root found"))))) + (mapcar (lambda (file) + (if ffip-full-paths + (cons (substring (expand-file-name file) (length root)) + (expand-file-name file)) + (let ((file-cons (cons (file-name-nondirectory file) + (expand-file-name file)))) + (when (assoc (car file-cons) file-alist) + (ffip-uniqueify (assoc (car file-cons) file-alist)) + (ffip-uniqueify file-cons)) + (add-to-list 'file-alist file-cons) + file-cons))) + (split-string (shell-command-to-string + (format "find %s -type d -a \\( %s \\) -prune -o -type f \\( %s \\) -print %s | head -n %s" + root (ffip-prune-patterns) (ffip-join-patterns) + ffip-find-options ffip-limit)))))) + +;;;###autoload +(defun find-file-in-project () + "Prompt with a completing list of all files in the project to find one. + +The project's scope is defined as the first directory containing +an `.emacs-project' file. You can override this by locally +setting the variable `ffip-project-root'." + (interactive) + (let* ((project-files (ffip-project-files)) + (files (mapcar 'car project-files)) + (file (if (and (boundp 'ido-mode) ido-mode) + (ido-completing-read "Find file in project: " files) + (completing-read "Find file in project: " files)))) + (find-file (cdr (assoc file project-files))))) + +;;;###autoload +(defalias 'ffip 'find-file-in-project) + +;; safe locals +;;;###autoload +(progn + (put 'ffip-patterns 'safe-local-variable 'listp) + (put 'ffip-find-options 'safe-local-variable 'stringp) + (put 'ffip-project-file 'safe-local-variable 'stringp) + (put 'ffip-project-root 'safe-local-variable 'stringp) + (put 'ffip-project-root-function 'safe-local-variable 'functionp) + (put 'ffip-limit 'safe-local-variable 'integerp)) + +(provide 'find-file-in-project) +;;; find-file-in-project.el ends here diff --git a/elpa/find-file-in-project-20140603.1619/find-file-in-project.elc b/elpa/find-file-in-project-20140603.1619/find-file-in-project.elc new file mode 100644 index 0000000000000000000000000000000000000000..eb1e9bfdcd5f183fdd80a5bca40b9c21bc98541b GIT binary patch literal 4646 zcmcIoTW{Rf5!O>-uYk61t<&3xZX&H?u6WtyN_HP43wB_@N!r+XC_(`~BF}2+a7l)T zl(j{Ee7>1O?nSEvMS~ikxjdISbNS|*IePx`&BY(~_VxzPpFgLIa#3ZuPU&h%3)P(A zG47Wtc~O?%kMc56Ih6&yRSliD*F>k}PoItbXJJTz=Z{6itS%QcgAh9Y*67+CL&ot) zFH~Yi>9Ni$bv(<8)a4~^R=8DNe$YwdvH&mg!jT{Or}r)y>0D083VO-n=mz35=o5@b z*d}uyvt~{zhniKBEwcZp1`Et+Ad~OrnX#(1MjJ|(g<50@rDbB8IxDWtQ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b8mhixp?GnQ z*}LA_!`(d&=M9kU@9mwnzf&AaTt-CyE?c?6^&J;PK{W2ma&yU-1GHD7GavCw&DfnB zz2{E6k)>n$BLfu=a@Bc+H^Y}32rqnuHl%w4!@#ls&~_hx;YI^El>r90WbZx%oF9DN z<>@vpSaQhH(p{8jxCOovzwKpRs&Tqqaq?BfTh{SHBMwYBuNYt=1GkJ$0($k0z}kgE z0|^V8tk;S&}JaMU>xdt=Oh$Ic7+VGr_#}(FwBDi^Rq?s;)Rp6I1u3;h7OiV>N#NJI>gDmT7lX2#Q5+_8F4Z)|iiF-}ks3X+QlQR-3$e23g zn|R96E+&vt{P^!aa5Wn(wY;i>Ao+!@~_bg`0vQF>{#jAc%8Q-H`Hj1|9CjY_@|3} ie4y9Rq4yUxZ?rOre;QoJ|JHjCr(B2++ literal 0 HcmV?d00001 diff --git a/elpa/git-commit-mode-20140605.520/git-commit-mode.el b/elpa/git-commit-mode-20140605.520/git-commit-mode.el new file mode 100644 index 000000000..f08c28eb2 --- /dev/null +++ b/elpa/git-commit-mode-20140605.520/git-commit-mode.el @@ -0,0 +1,662 @@ +;;; git-commit-mode.el --- Major mode for editing git commit messages -*- lexical-binding: t; -*- +;; Version: 20140605.520 + +;; Copyright (c) 2010-2012 Florian Ragwitz +;; Copyright (c) 2012-2013 Sebastian Wiesner +;; Copyright (C) 2010-2014 The Magit Project Developers + +;; Authors: Jonas Bernoulli +;; Sebastian Wiesner +;; Florian Ragwitz +;; Maintainer: Jonas Bernoulli +;; Homepage: https://github.com/magit/git-modes +;; Keywords: convenience vc git + +;; This file is not part of GNU Emacs. + +;; This file 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. + +;; This file 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 file. If not, see . + +;;; Commentary: + +;; A major mode for editing Git commit messages. + +;;;; Formatting + +;; Highlight the formatting of git commit messages and indicate errors according +;; to the guidelines for commit messages (see +;; http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html). +;; +;; Highlight the first line (aka "summary") specially if it exceeds 50 +;; characters (configurable using `git-commit-summary-max-length'). +;; +;; Enable `auto-fill-mode' and set the `fill-column' to 72 according to the +;; aforementioned guidelines (configurable using `git-commit-fill-column'). + +;;;; Headers + +;; Provide commands to insert standard headers into commit messages. +;; +;; - C-c C-s inserts Signed-off-by (`git-commit-signoff'). +;; - C-C C-a inserts Acked-by (`git-commit-ack'). +;; - C-c C-t inserts Tested-by (`git-commit-test'). +;; - C-c C-r inserts Reviewed-by (`git-commit-review'). +;; - C-c C-o inserts Cc (`git-commit-cc'). +;; - C-c C-p inserts Reported-by (`git-commit-reported'). + +;;;; Committing + +;; C-c C-c finishes a commit. +;; +;; Check a buffer for stylistic errors before committing, and ask for +;; confirmation before committing with style errors. + +;;; Code: + +(require 'log-edit) +(require 'ring) +(require 'server) + +;;; Options +;;;; Variables + +(defgroup git-commit nil + "Edit Git commit messages." + :prefix "git-commit-" + :group 'tools) + +(defcustom git-commit-confirm-commit nil + "Whether to ask for confirmation before committing. + +If t, ask for confirmation before creating a commit with style +errors, unless the commit is forced. If nil, never ask for +confirmation before committing." + :group 'git-commit + :type '(choice (const :tag "On style errors" t) + (const :tag "Never" nil))) + +(defcustom git-commit-mode-hook '(turn-on-auto-fill flyspell-mode) + "Hook run when entering Git Commit mode." + :options '(turn-on-auto-fill flyspell-mode git-commit-save-message) + :type 'hook + :group 'git-commit) + +(defcustom git-commit-kill-buffer-hook '(git-commit-save-message) + "Hook run when killing a Git Commit mode buffer. +This hook is run by both `git-commit-commit' +and `git-commit-abort'." + :options '(git-commit-save-message) + :type 'hook + :group 'git-commit) + +(defcustom git-commit-summary-max-length 50 + "Fontify characters beyond this column in summary lines as errors." + :group 'git-commit + :type 'number) + +(defcustom git-commit-fill-column 72 + "Automatically wrap commit message lines beyond this column." + :group 'git-commit + :type 'number) + +(defcustom git-commit-known-pseudo-headers + '("Signed-off-by" "Acked-by" "Cc" + "Suggested-by" "Reported-by" "Tested-by" "Reviewed-by") + "A list of git pseudo headers to be highlighted." + :group 'git-commit + :type '(repeat string)) + +;;;; Faces + +(defgroup git-commit-faces nil + "Faces for highlighting Git commit messages." + :prefix "git-commit-" + :group 'git-commit + :group 'faces) + +(defface git-commit-summary-face + '((t :inherit font-lock-type-face)) + "Face used to highlight the summary in git commit messages" + :group 'git-commit-faces) + +(defface git-commit-overlong-summary-face + '((t :inherit font-lock-warning-face)) + "Face used to highlight overlong parts of git commit message summaries" + :group 'git-commit-faces) + +(defface git-commit-nonempty-second-line-face + '((t :inherit font-lock-warning-face)) + "Face used to highlight text on the second line of git commit messages" + :group 'git-commit-faces) + +(defface git-commit-note-face + '((t :inherit font-lock-string-face)) + "Face used to highlight notes in git commit messages" + :group 'git-commit-faces) + +(defface git-commit-pseudo-header-face + '((t :inherit font-lock-string-face)) + "Font used to hightlight pseudo headers in git commit messages" + :group 'git-commit-faces) + +(defface git-commit-known-pseudo-header-face + '((t :inherit font-lock-keyword-face)) + "Face used to hightlight common pseudo headers in git commit messages" + :group 'git-commit-faces) + +(defface git-commit-branch-face + '((t :inherit font-lock-variable-name-face)) + "Face used to highlight the branch name in comments in git commit messages" + :group 'git-commit-faces) + +(defface git-commit-no-branch-face + '((t :inherit git-commit-branch-face)) + "Face used when a commit is going to be made outside of any branches" + :group 'git-commit-faces) + +(defface git-commit-comment-heading-face + '((t :inherit git-commit-known-pseudo-header-face)) + "Face used to highlight section headings in the default +comments in git commit messages" + :group 'git-commit-faces) + +(defface git-commit-comment-file-face + '((t :inherit git-commit-pseudo-header-face)) + "Face used to highlight file names in the default comments in +git commit messages" + :group 'git-commit-faces) + +(defface git-commit-comment-action-face + '((t :inherit git-commit-branch-face)) + "Face used to highlight what has happened to files in the +default comments in git commit messages" + :group 'git-commit-faces) + +;;; Keymap + +(defvar git-commit-mode-map + (let ((map (make-sparse-keymap))) + (define-key map (kbd "C-c C-c") 'git-commit-commit) + (define-key map (kbd "C-c C-k") 'git-commit-abort) + (define-key map (kbd "C-c C-s") 'git-commit-signoff) + (define-key map (kbd "C-c C-a") 'git-commit-ack) + (define-key map (kbd "C-c C-t") 'git-commit-test) + (define-key map (kbd "C-c C-r") 'git-commit-review) + (define-key map (kbd "C-c C-o") 'git-commit-cc) + (define-key map (kbd "C-c C-p") 'git-commit-reported) + (define-key map (kbd "C-c C-i") 'git-commit-suggested) + (define-key map (kbd "C-c M-s") 'git-commit-save-message) + (define-key map (kbd "M-p") 'git-commit-prev-message) + (define-key map (kbd "M-n") 'git-commit-next-message) + (define-key map [remap server-edit] 'git-commit-commit) + (define-key map [remap kill-buffer] 'git-commit-abort) + (define-key map [remap ido-kill-buffer] 'git-commit-abort) + (define-key map [remap iswitchb-kill-buffer] 'git-commit-abort) + ;; Old bindings to avoid confusion + (define-key map (kbd "C-c C-x s") 'git-commit-signoff) + (define-key map (kbd "C-c C-x a") 'git-commit-ack) + (define-key map (kbd "C-c C-x t") 'git-commit-test) + (define-key map (kbd "C-c C-x r") 'git-commit-review) + (define-key map (kbd "C-c C-x o") 'git-commit-cc) + (define-key map (kbd "C-c C-x p") 'git-commit-reported) + map) + "Key map used by `git-commit-mode'.") + +;;; Menu + +(require 'easymenu) +(easy-menu-define git-commit-mode-menu git-commit-mode-map + "Git Commit Mode Menu" + '("Commit" + ["Previous" git-commit-prev-message t] + ["Next" git-commit-next-message t] + "-" + ["Ack" git-commit-ack :active t + :help "Insert an 'Acked-by' header"] + ["Sign-Off" git-commit-signoff :active t + :help "Insert a 'Signed-off-by' header"] + ["Tested-by" git-commit-test :active t + :help "Insert a 'Tested-by' header"] + ["Reviewed-by" git-commit-review :active t + :help "Insert a 'Reviewed-by' header"] + ["CC" git-commit-cc t + :help "Insert a 'Cc' header"] + ["Reported" git-commit-reported :active t + :help "Insert a 'Reported-by' header"] + ["Suggested" git-commit-suggested t + :help "Insert a 'Suggested-by' header"] + "-" + ["Save" git-commit-save-message t] + ["Cancel" git-commit-abort t] + ["Commit" git-commit-commit t])) + +;;; Committing + +(defvar git-commit-commit-hook nil + "Hook run by `git-commit-commit' unless clients exist. +Only use this if you know what you are doing.") + +(defvar git-commit-previous-winconf nil) + +(defmacro git-commit-restore-previous-winconf (&rest body) + "Run BODY and then restore `git-commit-previous-winconf'. +When `git-commit-previous-winconf' is nil or was created from +another frame do nothing." + (declare (indent 0)) + (let ((winconf (make-symbol "winconf")) + (frame (make-symbol "frame"))) + `(let ((,winconf git-commit-previous-winconf) + (,frame (selected-frame))) + ,@body + (when (and ,winconf + (equal ,frame (window-configuration-frame ,winconf))) + (set-window-configuration ,winconf) + (setq git-commit-previous-winconf nil))))) + +(defun git-commit-commit (&optional force) + "Finish editing the commit message and commit. + +Check for stylistic errors in the current commit, and ask the +user for confirmation depending on `git-commit-confirm-commit'. +If FORCE is non-nil or if a raw prefix arg is given, commit +immediately without asking. + +Return t, if the commit was successful, or nil otherwise." + (interactive "P") + (if (and git-commit-confirm-commit + (git-commit-has-style-errors-p) + (not force) + (not (y-or-n-p "Commit despite stylistic errors?"))) + (message "Commit canceled due to stylistic errors.") + (save-buffer) + (run-hooks 'git-commit-kill-buffer-hook) + (remove-hook 'kill-buffer-query-functions + 'git-commit-kill-buffer-noop t) + (git-commit-restore-previous-winconf + (if (git-commit-buffer-clients) + (server-edit) + (run-hook-with-args 'git-commit-commit-hook) + (kill-buffer))))) + +(defun git-commit-abort () + "Abort the commit. +The commit message is saved to the kill ring." + (interactive) + (when (< emacs-major-version 24) + ;; Emacsclient doesn't exit with non-zero when -error is used. + ;; Instead cause Git to error out by feeding it an empty file. + (erase-buffer)) + (save-buffer) + (run-hooks 'git-commit-kill-buffer-hook) + (remove-hook 'kill-buffer-hook 'server-kill-buffer t) + (remove-hook 'kill-buffer-query-functions 'git-commit-kill-buffer-noop t) + (git-commit-restore-previous-winconf + (let ((buffer (current-buffer)) + (clients (git-commit-buffer-clients))) + (if clients + (progn + (dolist (client clients) + (ignore-errors + (server-send-string client "-error Commit aborted by user")) + (delete-process client)) + (when (buffer-live-p buffer) + (kill-buffer buffer))) + (kill-buffer)))) + (accept-process-output nil 0.1) + (message (concat "Commit aborted." + (when (memq 'git-commit-save-message + git-commit-kill-buffer-hook) + " Message saved to `log-edit-comment-ring'.")))) + +(defun git-commit-buffer-clients () + (and (fboundp 'server-edit) + (boundp 'server-buffer-clients) + server-buffer-clients)) + +;;; History + +(defun git-commit-save-message () + "Save current message to `log-edit-comment-ring'." + (interactive) + (let ((message (buffer-substring + (point-min) + (git-commit-find-pseudo-header-position)))) + (when (and (string-match "^\\s-*\\sw" message) + (or (ring-empty-p log-edit-comment-ring) + (not (ring-member log-edit-comment-ring message)))) + ;; if index is nil, we end up cycling back to message we just saved! + (unless log-edit-comment-ring-index + (setq log-edit-comment-ring-index 0)) + (ring-insert log-edit-comment-ring message)))) + +(defun git-commit-prev-message (arg) + "Cycle backward through message history, after saving current message. +With a numeric prefix ARG, go back ARG comments." + (interactive "*p") + (git-commit-save-message) + (save-restriction + (narrow-to-region (point-min) (git-commit-find-pseudo-header-position)) + (log-edit-previous-comment arg))) + +(defun git-commit-next-message (arg) + "Cycle forward through message history, after saving current message. +With a numeric prefix ARG, go forward ARG comments." + (interactive "*p") + (git-commit-prev-message (- arg))) + +;;; Headers + +(defun git-commit-find-pseudo-header-position () + "Find the position at which commit pseudo headers should be inserted. + +Those headers usually live at the end of a commit message, but +before any trailing comments git or the user might have +inserted." + (save-excursion + (goto-char (point-max)) + (if (re-search-backward "^[^#\n]" nil t) + ;; we found last non-empty non-comment line, headers go after + (forward-line 1) + ;; there's only blanks & comments, headers go before comments + (goto-char (point-min)) + (and (re-search-forward "^#" nil t) (forward-line 0))) + (skip-chars-forward "\n") + (point))) + +(defun git-commit-determine-pre-for-pseudo-header () + "Find the characters to insert before the pseudo header. +Returns either zero, one or two newlines after computation. + +`point' either points to an empty line (with a non-empty previous +line) or the end of a non-empty line." + (let ((pre "") + (prev-line nil)) + (if (not (eq (point) (point-at-bol))) + (progn + (setq pre (concat pre "\n")) + (setq prev-line (thing-at-point 'line))) + ;; else: (point) is at an empty line + (when (not (eq (point) (point-min))) + (setq prev-line + (save-excursion + (forward-line -1) + (thing-at-point 'line))))) + + ;; we have prev-line now; if it doesn't match any known pseudo + ;; header, add a newline + (when prev-line + (if (not (delq nil (mapcar (lambda (pseudo-header) + (string-match pseudo-header prev-line)) + git-commit-known-pseudo-headers))) + (setq pre (concat pre "\n")))) + pre)) + +(defun git-commit-insert-header (type name email) + "Insert a header into the commit message. +The inserted header has the format 'TYPE: NAME '. + +The header is inserted at the position returned by +`git-commit-find-pseudo-header-position'. When this position +isn't after an existing header or a newline, an extra newline is +inserted before the header." + (let ((header-at (git-commit-find-pseudo-header-position))) + (save-excursion + (goto-char header-at) + (let ((pre (git-commit-determine-pre-for-pseudo-header))) + (insert (format "%s%s: %s <%s>\n" pre type name email)))))) + +(defun git-commit-insert-header-as-self (type) + "Insert a header with the name and email of the current user. +The inserted header has the format 'TYPE: NAME '. +Also see `git-commit-insert-header'." + (git-commit-insert-header + type + (or (getenv "GIT_AUTHOR_NAME") + (getenv "GIT_COMMITTER_NAME") + (ignore-errors (car (process-lines "git" "config" "user.name"))) + user-full-name) + (or (getenv "GIT_AUTHOR_EMAIL") + (getenv "GIT_COMMITTER_EMAIL") + (getenv "EMAIL") + (ignore-errors (car (process-lines "git" "config" "user.email"))) + user-mail-address))) + +(defmacro git-define-git-commit-self (action header) + "Create function git-commit-ACTION. +ACTION will be part of the function name. +HEADER is the actual header to be inserted into the comment." + (let ((func-name (intern (concat "git-commit-" action)))) + `(defun ,func-name () + ,(format "Insert a '%s' header at the end of the commit message. + +The author name and email address used for the header are +retrieved automatically with the same mechanism git uses." + header) + (interactive) + (git-commit-insert-header-as-self ,header)))) + +(git-define-git-commit-self "ack" "Acked-by") +(git-define-git-commit-self "review" "Reviewed-by") +(git-define-git-commit-self "signoff" "Signed-off-by") +(git-define-git-commit-self "test" "Tested-by") + +(defmacro git-define-git-commit (action header) + "Create interactive function git-commit-ACTION. +ACTION will be part of the function name. +HEADER is the actual header to be inserted into the comment." + (let ((func-name (intern (concat "git-commit-" action)))) + `(defun ,func-name (name email) + ,(format "Insert a '%s' header at the end of the commit message. +The value of the header is determined by NAME and EMAIL. + +When called interactively, both NAME and EMAIL are read from the +minibuffer." + header) + (interactive + (list (read-string "Name: ") + (read-string "Email: "))) + (git-commit-insert-header ,header name email)))) + +(git-define-git-commit "cc" "Cc") +(git-define-git-commit "reported" "Reported-by") +(git-define-git-commit "suggested" "Suggested-by") + +(defconst git-commit-comment-headings-alist + '(("Not currently on any branch." . git-commit-no-branch-face) + ("Changes to be committed:" . git-commit-comment-heading-face) + ("Untracked files:" . git-commit-comment-heading-face) + ("Changed but not updated:" . git-commit-comment-heading-face) + ("Changes not staged for commit:" . git-commit-comment-heading-face) + ("Unmerged paths:" . git-commit-comment-heading-face)) + "Headings in message comments. + +The `car' of each cell is the heading text, the `cdr' the face to +use for fontification.") + +(defun git-commit-summary-regexp () + (concat + ;; Skip empty lines or comments before the summary + "\\`\\(?:^\\(?:\\s-*\\|\\s<.*\\)\n\\)*" + ;; The summary line + (format "\\(.\\{0,%d\\}\\)\\(.*\\)" git-commit-summary-max-length) + ;; Non-empty non-comment second line + ;; + ;; For instant highlighting of non-empty second lines in font-lock, + ;; the last capturing group must capture the empty string ("") in + ;; "summary line\n". + ;; That's why the simpler regex "\\(?:\n\\([^\n#].*\\)\\)?", + ;; which captures 'nil', can't be used. + "\\(?:\n\\#\\|\n\\(.*\\)\\)?")) + +(defun git-commit-has-style-errors-p () + "Check whether the current buffer has style errors. + +Return t, if the current buffer has style errors, or nil +otherwise." + (save-excursion + (goto-char (point-min)) + (when (re-search-forward (git-commit-summary-regexp) nil t) + (or (string-match-p ".+" (or (match-string 2) "")) + (string-match-p "^.+$" (or (match-string 3) "")))))) + +;;; Font-Lock + +(defun git-commit-mode-summary-font-lock-keywords (&optional errors) + "Create font lock keywords to fontify the Git summary. + +If ERRORS is non-nil create keywords that highlight errors in the +summary line, not the summary line itself." + (if errors + `(,(git-commit-summary-regexp) + (2 'git-commit-overlong-summary-face t t) + (3 'git-commit-nonempty-second-line-face t t)) + `(,(git-commit-summary-regexp) + (1 'git-commit-summary-face t)))) + +(defun git-commit-mode-heading-keywords () + "Create font lock keywords to fontify comment headings. + +Known comment headings are provided by `git-commit-comment-headings'." + (mapcar (lambda (cell) `(,(format "^\\s<\\s-+\\(%s\\)$" + (regexp-quote (car cell))) + (1 ',(cdr cell) t))) + git-commit-comment-headings-alist)) + +(defun git-commit-mode-font-lock-keywords () + (append + `(("^\\s<.*$" . 'font-lock-comment-face) + ("^\\s<\\s-On branch \\(.*\\)$" (1 'git-commit-branch-face t)) + ("^\\s<\t\\(?:\\([^:]+\\):\\s-+\\)?\\(.*\\)$" + (1 'git-commit-comment-action-face t t) + (2 'git-commit-comment-file-face t)) + (,(concat "^\\(" + (regexp-opt git-commit-known-pseudo-headers) + ":\\)\\(\s.*\\)$") + (1 'git-commit-known-pseudo-header-face) + (2 'git-commit-pseudo-header-face)) + ("^\\<\\S-+:\\s-.*$" . 'git-commit-pseudo-header-face) + (eval . (git-commit-mode-summary-font-lock-keywords)) + ("\\[[^\n]+?\\]" (0 'git-commit-note-face t)) ; Notes override summary line + ;; Warnings from overlong lines and nonempty second line override + ;; everything + (eval . (git-commit-mode-summary-font-lock-keywords t))) + (git-commit-mode-heading-keywords))) + +(defun git-commit-font-lock-diff () + "Add font lock on diff." + (save-excursion + (goto-char (point-min)) + (when (re-search-forward "^diff --git" nil t) + (let ((beg (match-beginning 0))) + (let* ((buffer (current-buffer)) + (font-lock-verbose nil) + (font-lock-support-mode nil) + (text (with-temp-buffer + (insert + (with-current-buffer buffer + (buffer-substring-no-properties beg (point-max)))) + (diff-mode) + (font-lock-fontify-buffer) + (let ((pos (point-min)) + next) + (while (setq next (next-single-property-change pos 'face)) + (put-text-property pos next 'font-lock-face + (get-text-property pos 'face)) + (setq pos next))) + (buffer-string)))) + (delete-region beg (point-max)) + (insert text)))))) + +;;; Mode + +(defvar git-commit-mode-syntax-table + (let ((table (make-syntax-table text-mode-syntax-table))) + (modify-syntax-entry ?# "<" table) + (modify-syntax-entry ?\n ">" table) + (modify-syntax-entry ?\r ">" table) + table) + "Syntax table used by `git-commit-mode'.") + +;;;###autoload +(define-derived-mode git-commit-mode text-mode "Git Commit" + "Major mode for editing git commit messages. + +This mode helps with editing git commit messages both by +providing commands to do common tasks, and by highlighting the +basic structure of and errors in git commit messages." + ;; Font locking + (setq font-lock-defaults (list (git-commit-mode-font-lock-keywords) t)) + (set (make-local-variable 'font-lock-multiline) t) + (git-commit-font-lock-diff) + ;; Filling according to the guidelines + (setq fill-column git-commit-fill-column) + ;; Recognize changelog-style paragraphs + (set (make-local-variable 'paragraph-start) + (concat paragraph-start "\\|*\\|(")) + ;; Treat lines starting with a hash/pound as comments + (set (make-local-variable 'comment-start) "#") + (set (make-local-variable 'comment-start-skip) + (concat "^" (regexp-quote comment-start) "+" + "\\s-*")) + (set (make-local-variable 'comment-use-syntax) nil) + ;; Do not remember point location in commit messages + (when (boundp 'save-place) + (setq save-place nil)) + ;; If the commit summary is empty, insert a newline after point + (when (string= "" (buffer-substring-no-properties + (line-beginning-position) + (line-end-position))) + (open-line 1)) + ;; Make sure `git-commit-abort' cannot be by-passed + (add-hook 'kill-buffer-query-functions + 'git-commit-kill-buffer-noop nil t) + ;; Make the wrong usage info from `server-execute' go way + (run-with-timer 0.01 nil (lambda (m) (message "%s" m)) + (substitute-command-keys + (concat "Type \\[git-commit-commit] " + (let ((n (buffer-file-name))) + (cond ((equal n "TAG_EDITMSG") "to tag") + ((or (equal n "NOTES_EDITMSG") + (equal n "PULLREQ_EDITMSG")) + "when done") + (t "to commit"))) + " (\\[git-commit-abort] to abort).")))) + +(defun git-commit-kill-buffer-noop () + (message + (substitute-command-keys + "Don't kill this buffer. Instead abort using \\[git-commit-abort].")) + nil) + +(defun git-commit-mode-flyspell-verify () + (not (nth 4 (syntax-ppss)))) ; not inside a comment + +(eval-after-load 'flyspell + '(put 'git-commit-mode 'flyspell-mode-predicate + 'git-commit-mode-flyspell-verify)) + +;;;###autoload +(dolist (pattern '("/COMMIT_EDITMSG\\'" "/NOTES_EDITMSG\\'" + "/MERGE_MSG\\'" "/TAG_EDITMSG\\'" + "/PULLREQ_EDITMSG\\'")) + (add-to-list 'auto-mode-alist (cons pattern 'git-commit-mode))) + +(defun git-commit-auto-mode-enable () + (message "git-commit-auto-mode-enable is obsolete and doesn't do anything")) +(make-obsolete 'git-commit-auto-mode-enable "This mode is a noop now" "") + +(provide 'git-commit-mode) +;; Local Variables: +;; indent-tabs-mode: nil +;; End: +;;; git-commit-mode.el ends here diff --git a/elpa/git-commit-mode-20140605.520/git-commit-mode.elc b/elpa/git-commit-mode-20140605.520/git-commit-mode.elc new file mode 100644 index 0000000000000000000000000000000000000000..a9fe641f8c72fbfc7f0d64af43c7506a6ae54958 GIT binary patch literal 25034 zcmds933D6AmDW)!+i=;t$?hsnvX!*K$OLT-Jr@8{c5G1;Eo);PrsPVc1laeZGG8d)=SxeYN|m3l}a_KKbMmwL3f>^#@s3 z9h|D;_T(o1ir`+mb89$!zBw3n+5=OT$%CCo zyLa!Z&QW{Z?o2Sr>oR;h@2X;`I_+E?WNI*MdxMz86e??v2mNfUCP%0kCwg4$$ZP%M z1YY-FrBbOKoK7-qST|GERuYEzi{5X=5r6P6b{`V^km5}pe+~RKTM27N5&mNQB_F(@ z+efGsp;m-i5o*QZ?c4Y?_1Hc}{n)D?vyH7^m-={$(K^8xte=$aKX_|4PQsB*yCh+| z1U*SRGtP>3Y-8Is*)HW;(3_oK8oBF9opDkbC*_P+*LT*RHl%;T%c)-vZT}&9s$+G8 zYMtXaP~~jcs-DX*DFoT;H__=dou>y*3$;(~&yuG~2p1k}*KJP5A z@}<1IE1&CeQ zXpghta6Fu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rebase-mode.el b/elpa/git-rebase-mode-20140605.520/git-rebase-mode.el new file mode 100644 index 000000000..ae4d78bdd --- /dev/null +++ b/elpa/git-rebase-mode-20140605.520/git-rebase-mode.el @@ -0,0 +1,378 @@ +;;; git-rebase-mode.el --- Major mode for editing git rebase files +;; Version: 20140605.520 + +;; Copyright (C) 2010-2014 The Magit Project Developers + +;; Author: Phil Jackson +;; Maintainer: Jonas Bernoulli +;; Homepage: https://github.com/magit/git-modes +;; Keywords: convenience vc git + +;; This file is not part of GNU Emacs. + +;; This file 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. + +;; This file 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 file. If not, see . + +;;; Commentary: + +;; Allows the editing of a git rebase file (which you might get when +;; using 'git rebase -i' or hitting 'E' in Magit). Assumes editing is +;; happening in a server. + +;;; Code: + +(require 'easymenu) +(require 'server) +(require 'thingatpt) + +;;; Options +;;;; Variables + +(defgroup git-rebase nil + "Edit Git rebase sequences." + :group 'tools) + +(defcustom git-rebase-auto-advance nil + "If non-nil, moves point forward a line after running an action." + :group 'git-rebase + :type 'boolean) + +(defcustom git-rebase-remove-instructions nil + "Whether to remove the instructions from the rebase buffer. +Because you have seen them before and can still remember." + :group 'git-rebase + :type 'boolean) + +;;;; Faces + +(defgroup git-rebase-faces nil + "Faces used by Git-Rebase mode." + :group 'faces + :group 'git-rebase) + +(defface git-rebase-hash + '((((class color) (background light)) + :foreground "firebrick") + (((class color) (background dark)) + :foreground "tomato")) + "Face for commit hashes." + :group 'git-rebase-faces) + +(defface git-rebase-description nil + "Face for commit descriptions." + :group 'git-rebase-faces) + +(defface git-rebase-killed-action + '((((class color)) + :inherit font-lock-comment-face + :strike-through t)) + "Face for commented action and exec lines." + :group 'git-rebase-faces) + +(define-obsolete-face-alias 'git-rebase-description-face + 'git-rebase-description "1.0.0") +(define-obsolete-face-alias 'git-rebase-killed-action-face + 'git-rebase-killed-action "1.0.0") + +;;; Regexps + +(defconst git-rebase-action-line-re + (concat "^#?" + "\\([efprs]\\|pick\\|reword\\|edit\\|squash\\|fixup\\) " + "\\([a-z0-9]\\{4,40\\}\\) " + "\\(.*\\)") + "Regexp matching action lines in rebase buffers.") + +(defconst git-rebase-exec-line-re + "^#?\\(x\\|exec\\)[[:space:]]\\(.*\\)" + "Regexp matching exec lines in rebase buffer.") + +(defconst git-rebase-dead-line-re + (format "^#\\(?:%s\\|%s\\)" + (substring git-rebase-action-line-re 1) + (substring git-rebase-exec-line-re 1)) + "Regexp matching commented action and exex lines in rebase buffers.") + +;;; Keymaps + +(defvar git-rebase-mode-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map special-mode-map) + (define-key map (kbd "q") 'git-rebase-server-edit) + (define-key map (kbd "C-c C-c") 'git-rebase-server-edit) + (define-key map (kbd "a") 'git-rebase-abort) + (define-key map (kbd "C-c C-k") 'git-rebase-abort) + (define-key map [remap undo] 'git-rebase-undo) + (define-key map (kbd "RET") 'git-rebase-show-commit) + (define-key map (kbd "x") 'git-rebase-exec) + (define-key map (kbd "c") 'git-rebase-pick) + (define-key map (kbd "r") 'git-rebase-reword) + (define-key map (kbd "e") 'git-rebase-edit) + (define-key map (kbd "s") 'git-rebase-squash) + (define-key map (kbd "f") 'git-rebase-fixup) + (define-key map (kbd "k") 'git-rebase-kill-line) + (define-key map (kbd "C-k") 'git-rebase-kill-line) + (define-key map (kbd "p") 'git-rebase-backward-line) + (define-key map (kbd "n") 'forward-line) + (define-key map (kbd "M-p") 'git-rebase-move-line-up) + (define-key map (kbd "M-n") 'git-rebase-move-line-down) + (define-key map (kbd "M-") 'git-rebase-move-line-up) + (define-key map (kbd "M-") 'git-rebase-move-line-down) + map) + "Keymap for Git-Rebase mode.") + +(easy-menu-define git-rebase-mode-menu git-rebase-mode-map + "Git-Rebase mode menu" + '("Rebase" + ["Pick" git-rebase-pick t] + ["Reword" git-rebase-reword t] + ["Edit" git-rebase-edit t] + ["Squash" git-rebase-squash t] + ["Fixup" git-rebase-fixup t] + ["Kill" git-rebase-kill-line t] + ["Move Down" git-rebase-move-line-down t] + ["Move Up" git-rebase-move-line-up t] + ["Execute" git-rebase-exec t] + "---" + ["Abort" git-rebase-abort t] + ["Done" git-rebase-server-edit t])) + +;;; Utilities + +(defun git-rebase-edit-line (change-to) + (when (git-rebase-looking-at-action) + (let ((buffer-read-only nil) + (start (point))) + (goto-char (point-at-bol)) + (delete-region (point) (progn (forward-word 1) (point))) + (insert change-to) + (goto-char start) + (when git-rebase-auto-advance + (forward-line))))) + +(defmacro git-rebase-define-action (sym) + (declare (indent defun)) + (let ((fn (intern (format "git-rebase-%s" sym)))) + `(progn + (defun ,fn () + (interactive) + (git-rebase-edit-line ,(symbol-name sym))) + (put ',fn 'definition-name ',sym)))) + +(defun git-rebase-looking-at-action () + "Return non-nil if looking at an action line." + (save-excursion + (goto-char (point-at-bol)) + (looking-at git-rebase-action-line-re))) + +(defun git-rebase-looking-at-action-or-exec () + "Return non-nil if looking at an action line or exec line." + (save-excursion + (goto-char (point-at-bol)) + (or (looking-at git-rebase-action-line-re) + (looking-at git-rebase-exec-line-re)))) + +(defun git-rebase-looking-at-exec () + "Return non-nil if cursor is on an exec line." + (string-match git-rebase-exec-line-re (thing-at-point 'line))) + +(defun git-rebase-looking-at-killed-exec () + "Return non-nil if looking at an exec line that has been commented out." + (let ((line (thing-at-point 'line))) + (and (eq (aref line 0) ?#) + (string-match git-rebase-exec-line-re line)))) + +;;; Commands + +(git-rebase-define-action pick) +(git-rebase-define-action reword) +(git-rebase-define-action edit) +(git-rebase-define-action squash) +(git-rebase-define-action fixup) + +(defun git-rebase-move-line-up () + "Move the current action line up." + (interactive) + (when (git-rebase-looking-at-action-or-exec) + (let ((buffer-read-only nil) + (col (current-column))) + (goto-char (point-at-bol)) + (unless (bobp) + (transpose-lines 1) + (forward-line -2)) + (move-to-column col)))) + +(defun git-rebase-move-line-down () + "Assuming the next line is also an action line, move the current line down." + (interactive) + ;; if we're on an action and the next line is also an action + (when (and (git-rebase-looking-at-action-or-exec) + (save-excursion + (forward-line) + (git-rebase-looking-at-action-or-exec))) + (let ((buffer-read-only nil) + (col (current-column))) + (forward-line 1) + (transpose-lines 1) + (forward-line -1) + (move-to-column col)))) + +(defun git-rebase-server-edit () + "Save the action buffer and end the session." + (interactive) + (save-buffer) + (server-edit)) + +(defun git-rebase-abort () + "Abort this rebase. +This is dune by emptying the buffer, saving and closing server +connection." + (interactive) + (when (or (not (buffer-modified-p)) + (y-or-n-p "Abort this rebase? ")) + (let ((buffer-read-only nil)) + (erase-buffer) + (save-buffer) + (server-edit)))) + +(defun git-rebase-kill-line () + "Kill the current action line." + (interactive) + (when (and (not (eq (char-after (point-at-bol)) ?#)) + (git-rebase-looking-at-action-or-exec)) + (beginning-of-line) + (let ((inhibit-read-only t)) + (insert "#")) + (forward-line))) + +(defun git-rebase-exec (edit) + "Prompt the user for a shell command to be executed, and +add it to the todo list. + +If the cursor is on a commented-out exec line, uncomment the +current line instead of prompting. + +When the prefix argument EDIT is non-nil and the cursor is on an +exec line, edit that line instead of inserting a new one. If the +exec line was commented out, also uncomment it." + (interactive "P") + (cond + ((and edit (git-rebase-looking-at-exec)) + (let ((new-line (git-rebase-read-exec-line + (match-string-no-properties 2 (thing-at-point 'line)))) + (inhibit-read-only t)) + (delete-region (point-at-bol) (point-at-eol)) + (if (not (equal "" new-line)) + (insert "exec " new-line) + (delete-char -1) + (forward-line)) + (move-beginning-of-line nil))) + ((git-rebase-looking-at-killed-exec) + (save-excursion + (beginning-of-line) + (let ((buffer-read-only nil)) + (delete-char 1)))) + (t + (let ((inhibit-read-only t) + (line (git-rebase-read-exec-line))) + (unless (equal "" line) + (move-end-of-line nil) + (newline) + (insert (concat "exec " line)))) + (move-beginning-of-line nil)))) + +(defun git-rebase-read-exec-line (&optional initial-line) + (read-shell-command "Execute: " initial-line)) + +(defun git-rebase-undo (&optional arg) + "A thin wrapper around `undo', which allows undoing in read-only buffers." + (interactive "P") + (let ((inhibit-read-only t)) + (undo arg))) + +(defun git-rebase-show-commit (&optional arg) + "Show the commit on the current line if any." + (interactive "P") + (save-excursion + (goto-char (point-at-bol)) + (when (looking-at git-rebase-action-line-re) + (let ((commit (match-string 2))) + (if (fboundp 'magit-show-commit) + (let ((default-directory (expand-file-name "../../"))) + (magit-show-commit commit)) + (shell-command (concat "git show " commit))))))) + +(defun git-rebase-backward-line (&optional n) + "Move N lines backward (forward if N is negative). +Like `forward-line' but go into the opposite direction." + (interactive "p") + (forward-line (* n -1))) + +;;; Mode + +;;;###autoload +(define-derived-mode git-rebase-mode special-mode "Git Rebase" + "Major mode for editing of a Git rebase file. + +Rebase files are generated when you run 'git rebase -i' or run +`magit-interactive-rebase'. They describe how Git should perform +the rebase. See the documentation for git-rebase (e.g., by +running 'man git-rebase' at the command line) for details." + (setq font-lock-defaults '(git-rebase-mode-font-lock-keywords t t)) + (when git-rebase-remove-instructions + (let ((inhibit-read-only t)) + (flush-lines "^\\($\\|#\\)")))) + +(defvar git-rebase-mode-font-lock-keywords + `((,git-rebase-action-line-re + (1 font-lock-keyword-face) + (2 'git-rebase-hash) + (3 'git-rebase-description)) + (,git-rebase-exec-line-re 1 font-lock-keyword-face) + ("^#.*" 0 font-lock-comment-face) + (,git-rebase-dead-line-re 0 'git-rebase-killed-action t)) + "Font lock keywords for Git-Rebase mode.") + +(defun git-rebase-mode-show-keybindings () + "Modify the \"Commands:\" section of the comment Git generates +at the bottom of the file so that in place of the one-letter +abbreviation for the command, it shows the command's keybinding. +By default, this is the same except for the \"pick\" command." + (save-excursion + (goto-char (point-min)) + (while (search-forward-regexp "^# \\(.\\), \\([[:alpha:]]+\\) = " nil t) + (let ((start (match-beginning 1)) + (end (match-end 1)) + (command (intern (concat "git-rebase-" (match-string 2))))) + (when (fboundp command) + (let ((overlay (make-overlay start end))) + (overlay-put + overlay 'display + (key-description (where-is-internal command nil t))))))))) + +(add-hook 'git-rebase-mode-hook 'git-rebase-mode-show-keybindings t) + +(defun git-rebase-mode-disable-before-save-hook () + (set (make-local-variable 'before-save-hook) nil)) + +(add-hook 'git-rebase-mode-hook 'git-rebase-mode-disable-before-save-hook) + +;;;###autoload +(add-to-list 'auto-mode-alist + '("/git-rebase-todo\\'" . git-rebase-mode)) + +(provide 'git-rebase-mode) +;; Local Variables: +;; indent-tabs-mode: nil +;; End: +;;; git-rebase-mode.el ends here diff --git a/elpa/git-rebase-mode-20140605.520/git-rebase-mode.elc b/elpa/git-rebase-mode-20140605.520/git-rebase-mode.elc new file mode 100644 index 0000000000000000000000000000000000000000..256a63e47f61df82a154a91e523bb08540a76c15 GIT binary patch literal 13641 zcmc&*`*Y*Qk>0x8)$MXCTe1clWfvdiuM^|8eWqt=3mxeWf0!i)B2I zrfPhx7Gd!KpWOW}oIFa?i_ScqgmaZ9>Sb7{hpRKCj+8e%4!mQ}SAN$E1jH;$7itC| z>i!?{D9i5y#{EvT2q$@GdOw;k!~17(;bze|%p-S^P9v9VyMu1O)Azg0mz`)XVBL$2c2HWlXsVKajwESa9bAfBK}KQU_#z$$;%(k<6Psj%A;IOuaj^QPt-J> zR)<>Tki)#N

JmdS7tlNBtuLKlWd%)oPEg zi^!dTQ_30jx?Oy{ossYHfgj)g(JOxhc+;aU3sJ#T- z9$@wiuIrUOfb4M~AA=Ts8UmGg8O7wTJl zv?2n^>s6FYqP*j%W4)wE(|O*6_9o2Ya18CP0J`C-NZoMyCd7K>JfDd=V3z~6NZ&wT zmT8<6YL;e~VK!Bvn#W0`!WooAWve6s-U?C=t%2Hd`{H^TsWEnsFl_CUMTF?HVrd>l3D+;6 ztiTsoLVc;bc@e|DV1sBe#!|;dYZiiR%6TSV04LTHq;-EUHV#CXMp&VzHJHOe8`gQ4 zpQ|?hfp8D>OQ$wZ4el;v8f+J69w@eS1s=>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=_SLWr}{$KTo>Dy%%ae6&xfA+F8m)blY|h{!6=f}3u!}WcZ1Ov zA$>3gjlWPALH+wIN{~si&qk~t`=)3L$%e9>#f|q^#>a5$mG*Vkl?pO9wteowj{R_s zn{3^NgN%t@?OW~MR`aPs^ur6A7GnpKwJY^9(!E`E>rCOS1W~o4&RORGS$(T)E!#t4 zX3c|!fMd9SXi21w6lQ{NTGy?uWUN+sRf&} zbSoLQKLGy7v1B5C<`N2trEY4IHu}hi^c)B}f=py|%hq%y?#0BDrneOsj{aI5dfiFz z_ignEL7~dR=@zB1&Zfs9B0sOJw0PdXF;e<>4lzEW-|hW^p%Pmk8AUN<(yxq9_4;?k z>F#mX;4c0kec{a#W}$6!#`MYiPr@18`YDDy#TtI^zc3vs4Kg8SP%j9M284q;G`oT5mTc+eHEUZ63r)T>P`jla zKrn3!PZNw>+~Wp@`r>E|bWb4f4|JDE*&4FhEMjT{W=DESrdrxEuU8d_I@u~w!W&~e_(|@^$abJ-1dTe)TgBR`L^CHViKgAg0Kp|H2^#M;>BR^5wFdINBGl6Wdot` zqi06aEowA!9P7cT`j=i7jx zU#|0|qq^31rj%4}*R4S|1p-s1EcWRFOMduXFofsdec%VomQY5$7R&5B)Z+dLc7C?GB8m+RG^~Oa*}?41`o zA4?^!FByB!=L(eF(2FRgGPn-5`RjH-%CH8m^Sk|DLwfyxzEvjbrT69qgKlp@OHc+A z4%UU)c3?CPq!;$&IGiufL-d{g8e{5fQza}y)9Nl2r)*Dg*0^FF>xVp>Tm0K0DlqIiqe!Y$nP$u=fpBekHu}JcnhI6C2)7?Nf zq=n$EUxo-eiN}cee7bVY_tGz~DPb|AB1Cg=>%j;H_kt|EOKz=w21;c3-FEE%>xc#V a(P+;>Z&CyLJ`?&kF=FS&3zTE_TmK9D;_Zq6 literal 0 HcmV?d00001 diff --git a/elpa/helm-20140808.2300/emacs-helm.sh b/elpa/helm-20140808.2300/emacs-helm.sh new file mode 100755 index 000000000..3bfc6d662 --- /dev/null +++ b/elpa/helm-20140808.2300/emacs-helm.sh @@ -0,0 +1,78 @@ +#!/bin/bash + + +## Copyright (C) 2012 Thierry Volpiatto +## +## 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: + +# Preconfigured Emacs with a basic helm configuration. +# Useful to start quickly an emacs -Q with helm. +# Run it from this directory. + +TMP="/tmp/helm-cfg.el" +LOADPATH=$(readlink -f $0 | xargs dirname) +EMACS=emacs + +case $1 in + -P) + shift 1 + declare EMACS=$1 + shift 1 + ;; + -h) + echo "Usage: ${0##*/} [-P} Emacs path [-h} help [--] EMACS ARGS" + exit 2 + ;; +esac + +cat > $TMP <\`helm-find-files'\n\ +;; - \`occur'(M-s o) =>\`helm-occur'\n\ +;; - \`list-buffers'(C-x C-b) =>\`helm-buffers-list'\n\ +;; - \`completion-at-point'(M-tab) =>\`helm-lisp-completion-at-point'[1]\n\ +;; - \`dabbrev-expand'(M-/) =>\`helm-dabbrev'\n\n\ +;; Some others native emacs commands are \"helmized\" by \`helm-mode'.\n\ +;; [1] Coming with emacs-24.4 \`completion-at-point' is \"helmized\" by \`helm-mode'\n\ +;; which provide helm completion in many other places like \`shell-mode'.\n\ +;; You will find embeded help for most helm commands with \`C-c ?'.\n\ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\n")) + +(setq default-frame-alist '((vertical-scroll-bars . nil) + (tool-bar-lines . 0) + (menu-bar-lines . 0) + (fullscreen . nil))) +(blink-cursor-mode -1) +(add-to-list 'load-path (expand-file-name "$LOADPATH")) +(require 'helm-config) +(helm-mode 1) +(define-key global-map [remap find-file] 'helm-find-files) +(define-key global-map [remap occur] 'helm-occur) +(define-key global-map [remap list-buffers] 'helm-buffers-list) +(define-key global-map [remap dabbrev-expand] 'helm-dabbrev) +(unless (boundp 'completion-in-region-function) + (define-key lisp-interaction-mode-map [remap completion-at-point] 'helm-lisp-completion-at-point) + (define-key emacs-lisp-mode-map [remap completion-at-point] 'helm-lisp-completion-at-point)) +(add-hook 'kill-emacs-hook #'(lambda () (and (file-exists-p "$TMP") (delete-file "$TMP")))) +EOF + +$EMACS -Q -l $TMP $@ diff --git a/elpa/helm-20140808.2300/helm-adaptive.el b/elpa/helm-20140808.2300/helm-adaptive.el new file mode 100644 index 000000000..053247483 --- /dev/null +++ b/elpa/helm-20140808.2300/helm-adaptive.el @@ -0,0 +1,243 @@ +;;; helm-adaptive.el --- Adaptive Sorting of Candidates. -*- lexical-binding: t -*- + +;; Original Author: Tamas Patrovics + +;; Copyright (C) 2007 Tamas Patrovics +;; Copyright (C) 2012 ~ 2014 Thierry Volpiatto + +;; 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 . + +;;; Code: + +(require 'cl-lib) +(require 'helm) + + +(defgroup helm-adapt nil + "Adaptative sorting of candidates for Helm." + :group 'helm) + +(defcustom helm-adaptive-history-file + "~/.emacs.d/helm-adaptive-history" + "Path of file where history information is stored." + :type 'string + :group 'helm-adapt) + +(defcustom helm-adaptive-history-length 50 + "Maximum number of candidates stored for a source." + :type 'number + :group 'helm-adapt) + + +;; Internal +(defvar helm-adaptive-done nil + "nil if history information is not yet stored for the current +selection.") + +(defvar helm-adaptive-history nil + "Contains the stored history information. +Format: ((SOURCE-NAME (SELECTED-CANDIDATE (PATTERN . NUMBER-OF-USE) ...) ...) ...)") + +(defun helm-adaptive-done-reset () + (setq helm-adaptive-done nil)) + +(define-minor-mode helm-adaptive-mode + "Toggle adaptive sorting in all sources." + :group 'helm-adapt + :require 'helm-adaptive + :global t + (if helm-adaptive-mode + (progn + (unless helm-adaptive-history + (helm-adaptive-maybe-load-history)) + (add-hook 'kill-emacs-hook 'helm-adaptive-save-history) + ;; Should run at beginning of `helm-initial-setup'. + (add-hook 'helm-before-initialize-hook 'helm-adaptive-done-reset) + ;; Should run at beginning of `helm-exit-minibuffer'. + (add-hook 'helm-before-action-hook 'helm-adaptive-store-selection) + ;; Should run at beginning of `helm-select-action'. + (add-hook 'helm-select-action-hook 'helm-adaptive-store-selection)) + (helm-adaptive-save-history) + (setq helm-adaptive-history nil) + (remove-hook 'kill-emacs-hook 'helm-adaptive-save-history) + (remove-hook 'helm-before-initialize-hook 'helm-adaptive-done-reset) + (remove-hook 'helm-before-action-hook 'helm-adaptive-store-selection) + (remove-hook 'helm-select-action-hook 'helm-adaptive-store-selection))) + +(defun helm-adapt-use-adaptive-p (&optional source-name) + "Return current source only if it use adaptive history, nil otherwise." + (when helm-adaptive-mode + (let* ((source (or source-name (helm-get-current-source))) + (adapt-source (or (assoc-default 'filtered-candidate-transformer + (assoc (assoc-default 'type source) + helm-type-attributes)) + (assoc-default 'candidate-transformer + (assoc (assoc-default 'type source) + helm-type-attributes)) + (assoc-default 'filtered-candidate-transformer source) + (assoc-default 'candidate-transformer source)))) + (if (listp adapt-source) + (and (member 'helm-adaptive-sort adapt-source) source) + (and (eq adapt-source 'helm-adaptive-sort) source))))) + +(defun helm-adaptive-store-selection () + "Store history information for the selected candidate." + (unless helm-adaptive-done + (setq helm-adaptive-done t) + (let ((source (helm-adapt-use-adaptive-p))) + (when source + (let* ((source-name (or (assoc-default 'type source) + (assoc-default 'name source))) + (source-info (or (assoc source-name helm-adaptive-history) + (progn + (push (list source-name) helm-adaptive-history) + (car helm-adaptive-history)))) + (selection (helm-get-selection)) + (selection-info (progn + (setcdr source-info + (cons + (let ((found (assoc selection (cdr source-info)))) + (if (not found) + ;; new entry + (list selection) + ;; move entry to the beginning of the + ;; list, so that it doesn't get + ;; trimmed when the history is + ;; truncated + (setcdr source-info + (delete found (cdr source-info))) + found)) + (cdr source-info))) + (cadr source-info))) + (pattern-info (progn + (setcdr selection-info + (cons + (let ((found (assoc helm-pattern (cdr selection-info)))) + (if (not found) + ;; new entry + (cons helm-pattern 0) + + ;; move entry to the beginning of the + ;; list, so if two patterns used the + ;; same number of times then the one + ;; used last appears first in the list + (setcdr selection-info + (delete found (cdr selection-info))) + found)) + (cdr selection-info))) + (cadr selection-info)))) + + ;; increase usage count + (setcdr pattern-info (1+ (cdr pattern-info))) + + ;; truncate history if needed + (if (> (length (cdr selection-info)) helm-adaptive-history-length) + (setcdr selection-info + (cl-subseq (cdr selection-info) 0 helm-adaptive-history-length)))))))) + +(defun helm-adaptive-maybe-load-history () + "Load `helm-adaptive-history-file' which contain `helm-adaptive-history'. +Returns nil if `helm-adaptive-history-file' doesn't exist." + (when (file-readable-p helm-adaptive-history-file) + (load-file helm-adaptive-history-file))) + +(defun helm-adaptive-save-history (&optional arg) + "Save history information to file given by `helm-adaptive-history-file'." + (interactive "p") + (with-temp-buffer + (insert + ";; -*- mode: emacs-lisp -*-\n" + ";; History entries used for helm adaptive display.\n") + (prin1 `(setq helm-adaptive-history ',helm-adaptive-history) + (current-buffer)) + (insert ?\n) + (write-region (point-min) (point-max) helm-adaptive-history-file nil + (unless arg 'quiet)))) + +(defun helm-adaptive-sort (candidates source) + "Sort the CANDIDATES for SOURCE by usage frequency. +This is a filtered candidate transformer you can use with the +`filtered-candidate-transformer' attribute." + (let* ((source-name (or (assoc-default 'type source) + (assoc-default 'name source))) + (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, \ +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))) + +;;;###autoload +(defun helm-reset-adaptive-history () + "Delete all `helm-adaptive-history' and his file. +Useful when you have a old or corrupted `helm-adaptive-history-file'." + (interactive) + (when (y-or-n-p "Really delete all your `helm-adaptive-history'? ") + (setq helm-adaptive-history nil) + (delete-file helm-adaptive-history-file))) + +(defun helm-adaptive-compare (x y) + "Compare candidates X and Y taking into account that the +candidate can be in (DISPLAY . REAL) format." + (equal (if (listp x) (cdr x) x) + (if (listp y) (cdr y) y))) + + +(provide 'helm-adaptive) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions obsolete) +;; coding: utf-8 +;; indent-tabs-mode: nil +;; End: + +;;; helm-adaptive.el ends here diff --git a/elpa/helm-20140808.2300/helm-adaptive.elc b/elpa/helm-20140808.2300/helm-adaptive.elc new file mode 100644 index 0000000000000000000000000000000000000000..a5dbb1c623ae7ae119290753ffa95e7970dac46f GIT binary patch literal 7248 zcmbtZ`)}Ju5|*6A=O`%99&iuzhr5l^#8wb0lA`YT~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?VcAmuAExVnQ z3)v9|nuk#PWi=l_MuFxK$ynN~y-Cz43qUylsifT*p|3;QlH!X~td^$P#kG85^+8}F zjV;`GL>!uJ&PJ`T;b-mJG(c8ciDzQvs7AS&5yeIbhEYFKxB#^17MFpe!9puv-uxa| zNM4|qv#bR*>2%t%LDL!|!0G5eYU~b+|1JE)m-<$q6-fVhKzSYs$8}L~5}E)aDb>&G z2u10DeqLO kdgM>}z@I_3b+8vPp~+X*G`TL?n#R$&kKW{R^SM#`KZ-V^X8-^I literal 0 HcmV?d00001 diff --git a/elpa/helm-20140808.2300/helm-aliases.el b/elpa/helm-20140808.2300/helm-aliases.el new file mode 100644 index 000000000..f43eb0353 --- /dev/null +++ b/elpa/helm-20140808.2300/helm-aliases.el @@ -0,0 +1,921 @@ +;;; helm-aliases.el --- Helm aliases for helm obsoletes functions. -*- lexical-binding: t -*- + +;; Copyright (C) 2012 ~ 2014 Thierry Volpiatto + +;; 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 . + +;;; Code: + +(require 'cl-lib) + + +;;; Helper functions to create aliases with old helm definitions +;; prefixed with "helm-c-" +;; +(defun helm-alias-p (sym) + (cond ((boundp sym) + (not (eq (indirect-variable sym) sym))) + ((fboundp sym) + (symbolp (symbol-function sym))) + (t nil))) + +(defun helm-check-conflicting-prefixes () + (cl-loop for s in (all-completions "helm-c-" obarray) + for rep = (replace-regexp-in-string "helm-c-" "helm-" s) + when (or (and (not (helm-alias-p (intern s))) (fboundp (intern rep))) + (and (not (helm-alias-p (intern s))) (boundp (intern rep)))) + collect rep)) + +(defun helm-collect-functions-with-bad-prefix () + (cl-loop for s in (all-completions "helm-c-" obarray) + for sym = (intern s) + when (and (not (helm-alias-p sym)) (fboundp sym)) + collect s)) + +(defun helm-collect-vars-with-bad-prefix () + (cl-loop for s in (all-completions "helm-c-" obarray) + for sym = (intern s) + when (and (not (helm-alias-p sym)) (boundp sym)) + collect s)) + +(defun helm-insert-fn-aliases () + (cl-loop for s in (helm-collect-functions-with-bad-prefix) + for rep = (replace-regexp-in-string "helm-c-" "helm-" s) + do (insert (format "(defalias '%s '%s)\n(make-obsolete '%s '%s \"1.5.1\")\n" s rep s rep)))) + +(defun helm-insert-var-aliases () + (cl-loop for s in (helm-collect-vars-with-bad-prefix) + for rep = (replace-regexp-in-string "helm-c-" "helm-" s) + do (insert (format "(defvaralias '%s '%s)\n(make-obsolete-variable '%s '%s \"1.5.1\")\n" s rep s rep)))) + + +;;; Alias old functions prefixed with "helm-c-" +;; +;; +(defalias 'helm-c-etags-default-action 'helm-etags-default-action) +(make-obsolete 'helm-c-etags-default-action 'helm-etags-default-action "1.5.1") +(defalias 'helm-c-simple-call-tree-candidates 'helm-simple-call-tree-candidates) +(make-obsolete 'helm-c-simple-call-tree-candidates 'helm-simple-call-tree-candidates "1.5.1") +(defalias 'helm-c-show-info-in-mode-line 'helm-show-info-in-mode-line) +(make-obsolete 'helm-c-show-info-in-mode-line 'helm-show-info-in-mode-line "1.5.1") +(defalias 'helm-c-gentoo-eshell-action 'helm-gentoo-eshell-action) +(make-obsolete 'helm-c-gentoo-eshell-action 'helm-gentoo-eshell-action "1.5.1") +(defalias 'helm-c-grep-highlight-match 'helm-grep-highlight-match) +(make-obsolete 'helm-c-grep-highlight-match 'helm-grep-highlight-match "1.5.1") +(defalias 'helm-c-apropos 'helm-apropos) +(make-obsolete 'helm-c-apropos 'helm-apropos "1.5.1") +(defalias 'helm-c-grep-guess-extensions 'helm-grep-guess-extensions) +(make-obsolete 'helm-c-grep-guess-extensions 'helm-grep-guess-extensions "1.5.1") +(defalias 'helm-c-highlight-w3m-bookmarks 'helm-highlight-w3m-bookmarks) +(make-obsolete 'helm-c-highlight-w3m-bookmarks 'helm-highlight-w3m-bookmarks "1.5.1") +(defalias 'helm-c-emms-files-modifier 'helm-emms-files-modifier) +(make-obsolete 'helm-c-emms-files-modifier 'helm-emms-files-modifier "1.5.1") +(defalias 'helm-c-apt-reinstall 'helm-apt-reinstall) +(make-obsolete 'helm-c-apt-reinstall 'helm-apt-reinstall "1.5.1") +(defalias 'helm-c-bbdb-compose-mail 'helm-bbdb-compose-mail) +(make-obsolete 'helm-c-bbdb-compose-mail 'helm-bbdb-compose-mail "1.5.1") +(defalias 'helm-c-gentoo-init-list 'helm-gentoo-init-list) +(make-obsolete 'helm-c-gentoo-init-list 'helm-gentoo-init-list "1.5.1") +(defalias 'helm-c-gentoo-get-world 'helm-gentoo-get-world) +(make-obsolete 'helm-c-gentoo-get-world 'helm-gentoo-get-world "1.5.1") +(defalias 'helm-c-reset-adaptive-history 'helm-reset-adaptive-history) +(make-obsolete 'helm-c-reset-adaptive-history 'helm-reset-adaptive-history "1.5.1") +(defalias 'helm-adaptative-mode 'helm-adaptive-mode) +(make-obsolete 'helm-adaptative-mode 'helm-adaptive-mode "1.6.2") +(defalias 'helm-c-highlight-bookmark 'helm-highlight-bookmark) +(make-obsolete 'helm-c-highlight-bookmark 'helm-highlight-bookmark "1.5.1") +(defalias 'helm-c-locate-init 'helm-locate-init) +(make-obsolete 'helm-c-locate-init 'helm-locate-init "1.5.1") +(defalias 'helm-c-delete-file 'helm-delete-file) +(make-obsolete 'helm-c-delete-file 'helm-delete-file "1.5.1") +(defalias 'helm-c-regexp-persistent-action 'helm-regexp-persistent-action) +(make-obsolete 'helm-c-regexp-persistent-action 'helm-regexp-persistent-action "1.5.1") +(defalias 'helm-c-grep-split-line 'helm-grep-split-line) +(make-obsolete 'helm-c-grep-split-line 'helm-grep-split-line "1.5.1") +(defalias 'helm-c-filtered-candidate-transformer-file-line-1 'helm-filtered-candidate-transformer-file-line-1) +(make-obsolete 'helm-c-filtered-candidate-transformer-file-line-1 'helm-filtered-candidate-transformer-file-line-1 "1.5.1") +(defalias 'helm-c-info-display-to-real 'helm-info-display-to-real) +(make-obsolete 'helm-c-info-display-to-real 'helm-info-display-to-real "1.5.1") +(defalias 'helm-c-symbolify 'helm-symbolify) +(make-obsolete 'helm-c-symbolify 'helm-symbolify "1.5.1") +(defalias 'helm-c-zgrep-buffers 'helm-zgrep-buffers) +(make-obsolete 'helm-c-zgrep-buffers 'helm-zgrep-buffers "1.5.1") +(defalias 'helm-c-apt-persistent-action 'helm-apt-persistent-action) +(make-obsolete 'helm-c-apt-persistent-action 'helm-apt-persistent-action "1.5.1") +(defalias 'helm-c-pdfgrep-init 'helm-pdfgrep-init) +(make-obsolete 'helm-c-pdfgrep-init 'helm-pdfgrep-init "1.5.1") +(defalias 'helm-c-walk-directory 'helm-walk-directory) +(make-obsolete 'helm-c-walk-directory 'helm-walk-directory "1.5.1") +(defalias 'helm-c-grep-init 'helm-grep-init) +(make-obsolete 'helm-c-grep-init 'helm-grep-init "1.5.1") +(defalias 'helm-c-ucs-forward-char 'helm-ucs-forward-char) +(make-obsolete 'helm-c-ucs-forward-char 'helm-ucs-forward-char "1.5.1") +(defalias 'helm-c-complete-file-name-at-point 'helm-complete-file-name-at-point) +(make-obsolete 'helm-c-complete-file-name-at-point 'helm-complete-file-name-at-point "1.5.1") +(defalias 'helm-c-timer-real-to-display 'helm-timer-real-to-display) +(make-obsolete 'helm-c-timer-real-to-display 'helm-timer-real-to-display "1.5.1") +(defalias 'helm-c-ucs-init 'helm-ucs-init) +(make-obsolete 'helm-c-ucs-init 'helm-ucs-init "1.5.1") +(defalias 'helm-c-bookmark-run-delete 'helm-bookmark-run-delete) +(make-obsolete 'helm-c-bookmark-run-delete 'helm-bookmark-run-delete "1.5.1") +(defalias 'helm-c-uniq-list 'helm-uniq-list) +(make-obsolete 'helm-c-uniq-list 'helm-uniq-list "1.5.1") +(defalias 'helm-c-pp-bookmarks 'helm-pp-bookmarks) +(make-obsolete 'helm-c-pp-bookmarks 'helm-pp-bookmarks "1.5.1") +(defalias 'helm-c-gentoo-get-url 'helm-gentoo-get-url) +(make-obsolete 'helm-c-gentoo-get-url 'helm-gentoo-get-url "1.5.1") +(defalias 'helm-c-top-sh-persistent-action 'helm-top-sh-persistent-action) +(make-obsolete 'helm-c-top-sh-persistent-action 'helm-top-sh-persistent-action "1.5.1") +(defalias 'helm-c-gentoo-get-use 'helm-gentoo-get-use) +(make-obsolete 'helm-c-gentoo-get-use 'helm-gentoo-get-use "1.5.1") +(defalias 'helm-c-grep-action 'helm-grep-action) +(make-obsolete 'helm-c-grep-action 'helm-grep-action "1.5.1") +(defalias 'helm-c-file-buffers 'helm-file-buffers) +(make-obsolete 'helm-c-file-buffers 'helm-file-buffers "1.5.1") +(defalias 'helm-c-google-suggest-fetch 'helm-google-suggest-fetch) +(make-obsolete 'helm-c-google-suggest-fetch 'helm-google-suggest-fetch "1.5.1") +(defalias 'helm-c-arrange-type-attribute 'helm-arrange-type-attribute) +(make-obsolete 'helm-c-arrange-type-attribute 'helm-arrange-type-attribute "1.5.1") +(defalias 'helm-c-bookmark-w3m-setup-alist 'helm-bookmark-w3m-setup-alist) +(make-obsolete 'helm-c-bookmark-w3m-setup-alist 'helm-bookmark-w3m-setup-alist "1.5.1") +(defalias 'helm-c-yahoo-suggest-action 'helm-yahoo-suggest-action) +(make-obsolete 'helm-c-yahoo-suggest-action 'helm-yahoo-suggest-action "1.5.1") +(defalias 'helm-c-buffer-query-replace-1 'helm-buffer-query-replace-1) +(make-obsolete 'helm-c-buffer-query-replace-1 'helm-buffer-query-replace-1 "1.5.1") +(defalias 'helm-c-make-info-source 'helm-make-info-source) +(make-obsolete 'helm-c-make-info-source 'helm-make-info-source "1.5.1") +(defalias 'helm-c-open-dired 'helm-open-dired) +(make-obsolete 'helm-c-open-dired 'helm-open-dired "1.5.1") +(defalias 'helm-c-w3m-bookmarks-get-value 'helm-w3m-bookmarks-get-value) +(make-obsolete 'helm-c-w3m-bookmarks-get-value 'helm-w3m-bookmarks-get-value "1.5.1") +(defalias 'helm-c-kill-ring-transformer 'helm-kill-ring-transformer) +(make-obsolete 'helm-c-kill-ring-transformer 'helm-kill-ring-transformer "1.5.1") +(defalias 'helm-c-etags-init 'helm-etags-init) +(make-obsolete 'helm-c-etags-init 'helm-etags-init "1.5.1") +(defalias 'helm-c-w3m-rename-bookmark 'helm-w3m-rename-bookmark) +(make-obsolete 'helm-c-w3m-rename-bookmark 'helm-w3m-rename-bookmark "1.5.1") +(defalias 'helm-c-advice-update-current-display-string 'helm-advice-update-current-display-string) +(make-obsolete 'helm-c-advice-update-current-display-string 'helm-advice-update-current-display-string "1.5.1") +(defalias 'helm-c-regexp-get-line 'helm-regexp-get-line) +(make-obsolete 'helm-c-regexp-get-line 'helm-regexp-get-line "1.5.1") +(defalias 'helm-c-grep-run-other-window-action 'helm-grep-run-other-window-action) +(make-obsolete 'helm-c-grep-run-other-window-action 'helm-grep-run-other-window-action "1.5.1") +(defalias 'helm-c-regexp-kill-new 'helm-regexp-kill-new) +(make-obsolete 'helm-c-regexp-kill-new 'helm-regexp-kill-new "1.5.1") +(defalias 'helm-c-goto-line-with-adjustment 'helm-goto-line-with-adjustment) +(make-obsolete 'helm-c-goto-line-with-adjustment 'helm-goto-line-with-adjustment "1.5.1") +(defalias 'helm-c-grep-run-default-action 'helm-grep-run-default-action) +(make-obsolete 'helm-c-grep-run-default-action 'helm-grep-run-default-action "1.5.1") +(defalias 'helm-c-define-info-index-sources 'helm-define-info-index-sources) +(make-obsolete 'helm-c-define-info-index-sources 'helm-define-info-index-sources "1.5.1") +(defalias 'helm-c-transform-file-browse-url 'helm-transform-file-browse-url) +(make-obsolete 'helm-c-transform-file-browse-url 'helm-transform-file-browse-url "1.5.1") +(defalias 'helm-c-shell-command-if-needed 'helm-shell-command-if-needed) +(make-obsolete 'helm-c-shell-command-if-needed 'helm-shell-command-if-needed "1.5.1") +(defalias 'helm-c-kill-regexp-as-sexp 'helm-kill-regexp-as-sexp) +(make-obsolete 'helm-c-kill-regexp-as-sexp 'helm-kill-regexp-as-sexp "1.5.1") +(defalias 'helm-c-goto-next-or-prec-file 'helm-goto-next-or-prec-file) +(make-obsolete 'helm-c-goto-next-or-prec-file 'helm-goto-next-or-prec-file "1.5.1") +(defalias 'helm-c-simple-call-tree-functions-callers-init 'helm-simple-call-tree-functions-callers-init) +(make-obsolete 'helm-c-simple-call-tree-functions-callers-init 'helm-simple-call-tree-functions-callers-init "1.5.1") +(defalias 'helm-c-insert-file-name-completion-at-point 'helm-insert-file-name-completion-at-point) +(make-obsolete 'helm-c-insert-file-name-completion-at-point 'helm-insert-file-name-completion-at-point "1.5.1") +(defalias 'helm-c-point-file-in-dired 'helm-point-file-in-dired) +(make-obsolete 'helm-c-point-file-in-dired 'helm-point-file-in-dired "1.5.1") +(defalias 'helm-c-action-file-line-goto 'helm-action-file-line-goto) +(make-obsolete 'helm-c-action-file-line-goto 'helm-action-file-line-goto "1.5.1") +(defalias 'helm-c-info-goto 'helm-info-goto) +(make-obsolete 'helm-c-info-goto 'helm-info-goto "1.5.1") +(defalias 'helm-c-apt-install 'helm-apt-install) +(make-obsolete 'helm-c-apt-install 'helm-apt-install "1.5.1") +(defalias 'helm-c-skip-boring-buffers 'helm-skip-boring-buffers) +(make-obsolete 'helm-c-skip-boring-buffers 'helm-skip-boring-buffers "1.5.1") +(defalias 'helm-c-register-candidates 'helm-register-candidates) +(make-obsolete 'helm-c-register-candidates 'helm-register-candidates "1.5.1") +(defalias 'helm-c-find-function 'helm-find-function) +(make-obsolete 'helm-c-find-function 'helm-find-function "1.5.1") +(defalias 'helm-c-simple-call-tree-find-definition 'helm-simple-call-tree-find-definition) +(make-obsolete 'helm-c-simple-call-tree-find-definition 'helm-simple-call-tree-find-definition "1.5.1") +(defalias 'helm-c-apt-display-to-real 'helm-apt-display-to-real) +(make-obsolete 'helm-c-apt-display-to-real 'helm-apt-display-to-real "1.5.1") +(defalias 'helm-c-yaoddmuse-action-transformer 'helm-yaoddmuse-action-transformer) +(make-obsolete 'helm-c-yaoddmuse-action-transformer 'helm-yaoddmuse-action-transformer "1.5.1") +(defalias 'helm-c-org-keywords-init 'helm-org-keywords-init) +(make-obsolete 'helm-c-org-keywords-init 'helm-org-keywords-init "1.5.1") +(defalias 'helm-c-xrandr-screen 'helm-xrandr-screen) +(make-obsolete 'helm-c-xrandr-screen 'helm-xrandr-screen "1.5.1") +(defalias 'helm-c-simple-call-tree-persistent-action 'helm-simple-call-tree-persistent-action) +(make-obsolete 'helm-c-simple-call-tree-persistent-action 'helm-simple-call-tree-persistent-action "1.5.1") +(defalias 'helm-c-position 'helm-position) +(make-obsolete 'helm-c-position 'helm-position "1.5.1") +(defalias 'helm-c-imenu-candidates 'helm-imenu-candidates) +(make-obsolete 'helm-c-imenu-candidates 'helm-imenu-candidates "1.5.1") +(defalias 'helm-c-bbdb-candidates 'helm-bbdb-candidates) +(make-obsolete 'helm-c-bbdb-candidates 'helm-bbdb-candidates "1.5.1") +(defalias 'helm-c-ucs-persistent-forward 'helm-ucs-persistent-forward) +(make-obsolete 'helm-c-ucs-persistent-forward 'helm-ucs-persistent-forward "1.5.1") +(defalias 'helm-c-basename 'helm-basename) +(make-obsolete 'helm-c-basename 'helm-basename "1.5.1") +(defalias 'helm-c-files-in-all-dired-candidates 'helm-files-in-all-dired-candidates) +(make-obsolete 'helm-c-files-in-all-dired-candidates 'helm-files-in-all-dired-candidates "1.5.1") +(defalias 'helm-c-action-line-goto 'helm-action-line-goto) +(make-obsolete 'helm-c-action-line-goto 'helm-action-line-goto "1.5.1") +(defalias 'helm-c-grep-other-window 'helm-grep-other-window) +(make-obsolete 'helm-c-grep-other-window 'helm-grep-other-window "1.5.1") +(defalias 'helm-c-yahoo-suggest-fetch 'helm-yahoo-suggest-fetch) +(make-obsolete 'helm-c-yahoo-suggest-fetch 'helm-yahoo-suggest-fetch "1.5.1") +(defalias 'helm-c-external-commands-list-1 'helm-external-commands-list-1) +(make-obsolete 'helm-c-external-commands-list-1 'helm-external-commands-list-1 "1.5.1") +(defalias 'helm-c-buffers-list-persistent-action 'helm-buffers-list-persistent-action) +(make-obsolete 'helm-c-buffers-list-persistent-action 'helm-buffers-list-persistent-action "1.5.1") +(defalias 'helm-c-show-completion-init-overlay 'helm-show-completion-init-overlay) +(make-obsolete 'helm-c-show-completion-init-overlay 'helm-show-completion-init-overlay "1.5.1") +(defalias 'helm-c-shadow-boring-files 'helm-shadow-boring-files) +(make-obsolete 'helm-c-shadow-boring-files 'helm-shadow-boring-files "1.5.1") +(defalias 'helm-c-bookmark-local-files-setup-alist 'helm-bookmark-local-files-setup-alist) +(make-obsolete 'helm-c-bookmark-local-files-setup-alist 'helm-bookmark-local-files-setup-alist "1.5.1") +(defalias 'helm-c-highlight-local-use 'helm-highlight-local-use) +(make-obsolete 'helm-c-highlight-local-use 'helm-highlight-local-use "1.5.1") +(defalias 'helm-c-w3m-delete-bookmark 'helm-w3m-delete-bookmark) +(make-obsolete 'helm-c-w3m-delete-bookmark 'helm-w3m-delete-bookmark "1.5.1") +(defalias 'helm-c-skip-current-file 'helm-skip-current-file) +(make-obsolete 'helm-c-skip-current-file 'helm-skip-current-file "1.5.1") +(defalias 'helm-c-goto-next-file 'helm-goto-next-file) +(make-obsolete 'helm-c-goto-next-file 'helm-goto-next-file "1.5.1") +(defalias 'helm-c-info-init 'helm-info-init) +(make-obsolete 'helm-c-info-init 'helm-info-init "1.5.1") +(defalias 'helm-c-query-replace-args 'helm-query-replace-args) +(make-obsolete 'helm-c-query-replace-args 'helm-query-replace-args "1.5.1") +(defalias 'helm-c-bookmark-info-setup-alist 'helm-bookmark-info-setup-alist) +(make-obsolete 'helm-c-bookmark-info-setup-alist 'helm-bookmark-info-setup-alist "1.5.1") +(defalias 'helm-c-ratpoison-commands-execute 'helm-ratpoison-commands-execute) +(make-obsolete 'helm-c-ratpoison-commands-execute 'helm-ratpoison-commands-execute "1.5.1") +(defalias 'helm-c-ucs-persistent-backward 'helm-ucs-persistent-backward) +(make-obsolete 'helm-c-ucs-persistent-backward 'helm-ucs-persistent-backward "1.5.1") +(defalias 'helm-c-info-pages-init 'helm-info-pages-init) +(make-obsolete 'helm-c-info-pages-init 'helm-info-pages-init "1.5.1") +(defalias 'helm-c-grep-save-results 'helm-grep-save-results) +(make-obsolete 'helm-c-grep-save-results 'helm-grep-save-results "1.5.1") +(defalias 'helm-c-simple-call-tree-callers-functions-init 'helm-simple-call-tree-callers-functions-init) +(make-obsolete 'helm-c-simple-call-tree-callers-functions-init 'helm-simple-call-tree-callers-functions-init "1.5.1") +(defalias 'helm-c-read-file-name 'helm-read-file-name) +(make-obsolete 'helm-c-read-file-name 'helm-read-file-name "1.5.1") +(defalias 'helm-c-org-keywords-insert 'helm-org-keywords-insert) +(make-obsolete 'helm-c-org-keywords-insert 'helm-org-keywords-insert "1.5.1") +(defalias 'helm-c-call-interactively 'helm-call-interactively) +(make-obsolete 'helm-c-call-interactively 'helm-call-interactively "1.5.1") +(defalias 'helm-c-adaptative-compare 'helm-adaptive-compare) +(make-obsolete 'helm-c-adaptative-compare 'helm-adaptive-compare "1.5.1") +(defalias 'helm-c-filtered-candidate-transformer-file-line 'helm-filtered-candidate-transformer-file-line) +(make-obsolete 'helm-c-filtered-candidate-transformer-file-line 'helm-filtered-candidate-transformer-file-line "1.5.1") +(defalias 'helm-c-buffer-list 'helm-buffer-list) +(make-obsolete 'helm-c-buffer-list 'helm-buffer-list "1.5.1") +(defalias 'helm-c-gentoo-get-local-use 'helm-gentoo-get-local-use) +(make-obsolete 'helm-c-gentoo-get-local-use 'helm-gentoo-get-local-use "1.5.1") +(defalias 'helm-c-thing-before-point 'helm-thing-before-point) +(make-obsolete 'helm-c-thing-before-point 'helm-thing-before-point "1.5.1") +(defalias 'helm-c-ratpoison-commands-display-to-real 'helm-ratpoison-commands-display-to-real) +(make-obsolete 'helm-c-ratpoison-commands-display-to-real 'helm-ratpoison-commands-display-to-real "1.5.1") +(defalias 'helm-c-imenu-default-action 'helm-imenu-default-action) +(make-obsolete 'helm-c-imenu-default-action 'helm-imenu-default-action "1.5.1") +(defalias 'helm-c-describe-function 'helm-describe-function) +(make-obsolete 'helm-c-describe-function 'helm-describe-function "1.5.1") +(defalias 'helm-c-colors-get-name 'helm-colors-get-name) +(make-obsolete 'helm-c-colors-get-name 'helm-colors-get-name "1.5.1") +(defalias 'helm-c-bookmark-help 'helm-bookmark-help) +(make-obsolete 'helm-c-bookmark-help 'helm-bookmark-help "1.5.1") +(defalias 'helm-c-ucs-persistent-delete 'helm-ucs-persistent-delete) +(make-obsolete 'helm-c-ucs-persistent-delete 'helm-ucs-persistent-delete "1.5.1") +(defalias 'helm-c-set-variable 'helm-set-variable) +(make-obsolete 'helm-c-set-variable 'helm-set-variable "1.5.1") +(defalias 'helm-c-w3m-browse-bookmark 'helm-w3m-browse-bookmark) +(make-obsolete 'helm-c-w3m-browse-bookmark 'helm-w3m-browse-bookmark "1.5.1") +(defalias 'helm-c-grep-save-results-1 'helm-grep-save-results-1) +(make-obsolete 'helm-c-grep-save-results-1 'helm-grep-save-results-1 "1.5.1") +(defalias 'helm-c-adaptative-maybe-load-history 'helm-adaptive-maybe-load-history) +(make-obsolete 'helm-c-adaptative-maybe-load-history 'helm-adaptive-maybe-load-history "1.5.1") +(defalias 'helm-c-w32-pathname-transformer 'helm-w32-pathname-transformer) +(make-obsolete 'helm-c-w32-pathname-transformer 'helm-w32-pathname-transformer "1.5.1") +(defalias 'helm-c-top-display-to-real 'helm-top-display-to-real) +(make-obsolete 'helm-c-top-display-to-real 'helm-top-display-to-real "1.5.1") +(defalias 'helm-c-open-file-externally 'helm-open-file-externally) +(make-obsolete 'helm-c-open-file-externally 'helm-open-file-externally "1.5.1") +(defalias 'helm-c-colors-get-rgb 'helm-colors-get-rgb) +(make-obsolete 'helm-c-colors-get-rgb 'helm-colors-get-rgb "1.5.1") +(defalias 'helm-c-org-headline-refile 'helm-org-headline-refile) +(make-obsolete 'helm-c-org-headline-refile 'helm-org-headline-refile "1.5.1") +(defalias 'helm-c-stumpwm-commands-init 'helm-stumpwm-commands-init) +(make-obsolete 'helm-c-stumpwm-commands-init 'helm-stumpwm-commands-init "1.5.1") +(defalias 'helm-c-highlight-world 'helm-highlight-world) +(make-obsolete 'helm-c-highlight-world 'helm-highlight-world "1.5.1") +(defalias 'helm-c-top-sh 'helm-top-sh) +(make-obsolete 'helm-c-top-sh 'helm-top-sh "1.5.1") +(defalias 'helm-c-bbdb-get-record 'helm-bbdb-get-record) +(make-obsolete 'helm-c-bbdb-get-record 'helm-bbdb-get-record "1.5.1") +(defalias 'helm-c-persistent-xfont-action 'helm-persistent-xfont-action) +(make-obsolete 'helm-c-persistent-xfont-action 'helm-persistent-xfont-action "1.5.1") +(defalias 'helm-c-latex-math-candidates 'helm-latex-math-candidates) +(make-obsolete 'helm-c-latex-math-candidates 'helm-latex-math-candidates "1.5.1") +(defalias 'helm-c-ucs-backward-char 'helm-ucs-backward-char) +(make-obsolete 'helm-c-ucs-backward-char 'helm-ucs-backward-char "1.5.1") +(defalias 'helm-c-calculate-ucs-max-len 'helm-calculate-ucs-max-len) +(make-obsolete 'helm-c-calculate-ucs-max-len 'helm-calculate-ucs-max-len "1.5.1") +(defalias 'helm-c-etags-mtime 'helm-etags-mtime) +(make-obsolete 'helm-c-etags-mtime 'helm-etags-mtime "1.5.1") +(defalias 'helm-c-google-suggest-action 'helm-google-suggest-action) +(make-obsolete 'helm-c-google-suggest-action 'helm-google-suggest-action "1.5.1") +(defalias 'helm-c-org-headline-insert-link-to-headline 'helm-org-headline-insert-link-to-headline) +(make-obsolete 'helm-c-org-headline-insert-link-to-headline 'helm-org-headline-insert-link-to-headline "1.5.1") +(defalias 'helm-c-bbdb-create-contact 'helm-bbdb-create-contact) +(make-obsolete 'helm-c-bbdb-create-contact 'helm-bbdb-create-contact "1.5.1") +(defalias 'helm-c-elisp-library-scan-init 'helm-elisp-library-scan-init) +(make-obsolete 'helm-c-elisp-library-scan-init 'helm-elisp-library-scan-init "1.5.1") +(defalias 'helm-c-apt-refresh 'helm-apt-refresh) +(make-obsolete 'helm-c-apt-refresh 'helm-apt-refresh "1.5.1") +(defalias 'helm-c-kill-regexp 'helm-kill-regexp) +(make-obsolete 'helm-c-kill-regexp 'helm-kill-regexp "1.5.1") +(defalias 'helm-c-gentoo-default-action 'helm-gentoo-default-action) +(make-obsolete 'helm-c-gentoo-default-action 'helm-gentoo-default-action "1.5.1") +(defalias 'helm-c-grep-buffers-1 'helm-grep-buffers-1) +(make-obsolete 'helm-c-grep-buffers-1 'helm-grep-buffers-1 "1.5.1") +(defalias 'helm-c-adaptative-store-selection 'helm-adaptive-store-selection) +(make-obsolete 'helm-c-adaptative-store-selection 'helm-adaptive-store-selection "1.5.1") +(defalias 'helm-c-browse-url 'helm-browse-url) +(make-obsolete 'helm-c-browse-url 'helm-browse-url "1.5.1") +(defalias 'helm-c-google-suggest-emacs-lisp 'helm-google-suggest-emacs-lisp) +(make-obsolete 'helm-c-google-suggest-emacs-lisp 'helm-google-suggest-emacs-lisp "1.5.1") +(defalias 'helm-c-ucs-persistent-insert 'helm-ucs-persistent-insert) +(make-obsolete 'helm-c-ucs-persistent-insert 'helm-ucs-persistent-insert "1.5.1") +(defalias 'helm-c-xrandr-output 'helm-xrandr-output) +(make-obsolete 'helm-c-xrandr-output 'helm-xrandr-output "1.5.1") +(defalias 'helm-c-kill-ring-action 'helm-kill-ring-action) +(make-obsolete 'helm-c-kill-ring-action 'helm-kill-ring-action "1.5.1") +(defalias 'helm-c-org-keywords-candidates 'helm-org-keywords-candidates) +(make-obsolete 'helm-c-org-keywords-candidates 'helm-org-keywords-candidates "1.5.1") +(defalias 'helm-c-bookmark-jump 'helm-bookmark-jump) +(make-obsolete 'helm-c-bookmark-jump 'helm-bookmark-jump "1.5.1") +(defalias 'helm-c-shadow-boring-buffers 'helm-shadow-boring-buffers) +(make-obsolete 'helm-c-shadow-boring-buffers 'helm-shadow-boring-buffers "1.5.1") +(defalias 'helm-c-buffer-match-major-mode 'helm-buffer-match-major-mode) +(make-obsolete 'helm-c-buffer-match-major-mode 'helm-buffer-match-major-mode "1.5.1") +(defalias 'helm-c-highlight-bookmark-su 'helm-highlight-bookmark-su) +(make-obsolete 'helm-c-highlight-bookmark-su 'helm-highlight-bookmark-su "1.5.1") +(defalias 'helm-c-grep-other-frame 'helm-grep-other-frame) +(make-obsolete 'helm-c-grep-other-frame 'helm-grep-other-frame "1.5.1") +(defalias 'helm-c-jabber-online-contacts 'helm-jabber-online-contacts) +(make-obsolete 'helm-c-jabber-online-contacts 'helm-jabber-online-contacts "1.5.1") +(defalias 'helm-c-apt-purge 'helm-apt-purge) +(make-obsolete 'helm-c-apt-purge 'helm-apt-purge "1.5.1") +(defalias 'helm-c-adaptative-sort 'helm-adaptive-sort) +(make-obsolete 'helm-c-adaptative-sort 'helm-adaptive-sort "1.5.1") +(defalias 'helm-c-bmkext-addressbook-setup-alist 'helm-bmkext-addressbook-setup-alist) +(make-obsolete 'helm-c-bmkext-addressbook-setup-alist 'helm-bmkext-addressbook-setup-alist "1.5.1") +(defalias 'helm-c-bbdb-collect-mail-addresses 'helm-bbdb-collect-mail-addresses) +(make-obsolete 'helm-c-bbdb-collect-mail-addresses 'helm-bbdb-collect-mail-addresses "1.5.1") +(defalias 'helm-c-bmkext-filter-setup-alist 'helm-bmkext-filter-setup-alist) +(make-obsolete 'helm-c-bmkext-filter-setup-alist 'helm-bmkext-filter-setup-alist "1.5.1") +(defalias 'helm-c-grep-buffers 'helm-grep-buffers) +(make-obsolete 'helm-c-grep-buffers 'helm-grep-buffers "1.5.1") +(defalias 'helm-c-apt-init 'helm-apt-init) +(make-obsolete 'helm-c-apt-init 'helm-apt-init "1.5.1") +(defalias 'helm-c-grep-run-save-buffer 'helm-grep-run-save-buffer) +(make-obsolete 'helm-c-grep-run-save-buffer 'helm-grep-run-save-buffer "1.5.1") +(defalias 'helm-c-simple-call-tree-init-base 'helm-simple-call-tree-init-base) +(make-obsolete 'helm-c-simple-call-tree-init-base 'helm-simple-call-tree-init-base "1.5.1") +(defalias 'helm-c-ggs-set-number-result 'helm-ggs-set-number-result) +(make-obsolete 'helm-c-ggs-set-number-result 'helm-ggs-set-number-result "1.5.1") +(defalias 'helm-c-grep-prepare-candidates 'helm-grep-prepare-candidates) +(make-obsolete 'helm-c-grep-prepare-candidates 'helm-grep-prepare-candidates "1.5.1") +(defalias 'helm-c-grep-jump-elscreen 'helm-grep-jump-elscreen) +(make-obsolete 'helm-c-grep-jump-elscreen 'helm-grep-jump-elscreen "1.5.1") +(defalias 'helm-c-show-completion-display-function 'helm-show-completion-display-function) +(make-obsolete 'helm-c-show-completion-display-function 'helm-show-completion-display-function "1.5.1") +(defalias 'helm-c-find-variable 'helm-find-variable) +(make-obsolete 'helm-c-find-variable 'helm-find-variable "1.5.1") +(defalias 'helm-c-build-elvi-list 'helm-build-elvi-list) +(make-obsolete 'helm-c-build-elvi-list 'helm-build-elvi-list "1.5.1") +(defalias 'helm-c-advice-toggle 'helm-advice-toggle) +(make-obsolete 'helm-c-advice-toggle 'helm-advice-toggle "1.5.1") +(defalias 'helm-c-buffers-persistent-kill 'helm-buffers-persistent-kill) +(make-obsolete 'helm-c-buffers-persistent-kill 'helm-buffers-persistent-kill "1.5.1") +(defalias 'helm-c-simple-call-tree-analyze-maybe 'helm-simple-call-tree-analyze-maybe) +(make-obsolete 'helm-c-simple-call-tree-analyze-maybe 'helm-simple-call-tree-analyze-maybe "1.5.1") +(defalias 'helm-c-register-action-transformer 'helm-register-action-transformer) +(make-obsolete 'helm-c-register-action-transformer 'helm-register-action-transformer "1.5.1") +(defalias 'helm-c-kill-ring-candidates 'helm-kill-ring-candidates) +(make-obsolete 'helm-c-kill-ring-candidates 'helm-kill-ring-candidates "1.5.1") +(defalias 'helm-c-bbdb-view-person-action 'helm-bbdb-view-person-action) +(make-obsolete 'helm-c-bbdb-view-person-action 'helm-bbdb-view-person-action "1.5.1") +(defalias 'helm-c-generic-browser 'helm-generic-browser) +(make-obsolete 'helm-c-generic-browser 'helm-generic-browser "1.5.1") +(defalias 'helm-c-top-init 'helm-top-init) +(make-obsolete 'helm-c-top-init 'helm-top-init "1.5.1") +(defalias 'helm-c-ucs-delete-backward 'helm-ucs-delete-backward) +(make-obsolete 'helm-c-ucs-delete-backward 'helm-ucs-delete-backward "1.5.1") +(defalias 'helm-c-firefox-bookmarks-get-value 'helm-firefox-bookmarks-get-value) +(make-obsolete 'helm-c-firefox-bookmarks-get-value 'helm-firefox-bookmarks-get-value "1.5.1") +(defalias 'helm-c-apt-generic-action 'helm-apt-generic-action) +(make-obsolete 'helm-c-apt-generic-action 'helm-apt-generic-action "1.5.1") +(defalias 'helm-c-pdfgrep-action-1 'helm-pdfgrep-action-1) +(make-obsolete 'helm-c-pdfgrep-action-1 'helm-pdfgrep-action-1 "1.5.1") +(defalias 'helm-c-buffer-query-replace-regexp 'helm-buffer-query-replace-regexp) +(make-obsolete 'helm-c-buffer-query-replace-regexp 'helm-buffer-query-replace-regexp "1.5.1") +(defalias 'helm-c-apropos-init 'helm-apropos-init) +(make-obsolete 'helm-c-apropos-init 'helm-apropos-init "1.5.1") +(defalias 'helm-c-emms-play-current-playlist 'helm-emms-play-current-playlist) +(make-obsolete 'helm-c-emms-play-current-playlist 'helm-emms-play-current-playlist "1.5.1") +(defalias 'helm-c-kill-new 'helm-kill-new) +(make-obsolete 'helm-c-kill-new 'helm-kill-new "1.5.1") +(defalias 'helm-c-bookmark-gnus-setup-alist 'helm-bookmark-gnus-setup-alist) +(make-obsolete 'helm-c-bookmark-gnus-setup-alist 'helm-bookmark-gnus-setup-alist "1.5.1") +(defalias 'helm-c-quit-and-execute-action 'helm-quit-and-execute-action) +(make-obsolete 'helm-c-quit-and-execute-action 'helm-quit-and-execute-action "1.5.1") +(defalias 'helm-c-build-info-index-command 'helm-build-info-index-command) +(make-obsolete 'helm-c-build-info-index-command 'helm-build-info-index-command "1.5.1") +(defalias 'helm-c-gentoo-setup-cache 'helm-gentoo-setup-cache) +(make-obsolete 'helm-c-gentoo-setup-cache 'helm-gentoo-setup-cache "1.5.1") +(defalias 'helm-c-ratpoison-commands-init 'helm-ratpoison-commands-init) +(make-obsolete 'helm-c-ratpoison-commands-init 'helm-ratpoison-commands-init "1.5.1") +(defalias 'helm-c-etags-select 'helm-etags-select) +(make-obsolete 'helm-c-etags-select 'helm-etags-select "1.5.1") +(defalias 'helm-c-etags-create-buffer 'helm-etags-create-buffer) +(make-obsolete 'helm-c-etags-create-buffer 'helm-etags-create-buffer "1.5.1") +(defalias 'helm-c-yahoo-suggest-set-candidates 'helm-yahoo-suggest-set-candidates) +(make-obsolete 'helm-c-yahoo-suggest-set-candidates 'helm-yahoo-suggest-set-candidates "1.5.1") +(defalias 'helm-c-org-keywords-show-help 'helm-org-keywords-show-help) +(make-obsolete 'helm-c-org-keywords-show-help 'helm-org-keywords-show-help "1.5.1") +(defalias 'helm-c-highlight-files 'helm-highlight-files) +(make-obsolete 'helm-c-highlight-files 'helm-highlight-files "1.5.1") +(defalias 'helm-c-get-pid-from-process-name 'helm-get-pid-from-process-name) +(make-obsolete 'helm-c-get-pid-from-process-name 'helm-get-pid-from-process-name "1.5.1") +(defalias 'helm-c-insert-latex-math 'helm-insert-latex-math) +(make-obsolete 'helm-c-insert-latex-math 'helm-insert-latex-math "1.5.1") +(defalias 'helm-c-buffer-query-replace 'helm-buffer-query-replace) +(make-obsolete 'helm-c-buffer-query-replace 'helm-buffer-query-replace "1.5.1") +(defalias 'helm-c-bmkext-run-edit 'helm-bmkext-run-edit) +(make-obsolete 'helm-c-bmkext-run-edit 'helm-bmkext-run-edit "1.5.1") +(defalias 'helm-c-skip-boring-files 'helm-skip-boring-files) +(make-obsolete 'helm-c-skip-boring-files 'helm-skip-boring-files "1.5.1") +(defalias 'helm-c-transform-file-load-el 'helm-transform-file-load-el) +(make-obsolete 'helm-c-transform-file-load-el 'helm-transform-file-load-el "1.5.1") +(defalias 'helm-c-ucs-insert-char 'helm-ucs-insert-char) +(make-obsolete 'helm-c-ucs-insert-char 'helm-ucs-insert-char "1.5.1") +(defalias 'helm-c-gentoo-setup-use-flags-cache 'helm-gentoo-setup-use-flags-cache) +(make-obsolete 'helm-c-gentoo-setup-use-flags-cache 'helm-gentoo-setup-use-flags-cache "1.5.1") +(defalias 'helm-c-buffer-help 'helm-buffer-help) +(make-obsolete 'helm-c-buffer-help 'helm-buffer-help "1.5.1") +(defalias 'helm-c-current-directory 'helm-current-directory) +(make-obsolete 'helm-c-current-directory 'helm-current-directory "1.5.1") +(defalias 'helm-c-highlight-firefox-bookmarks 'helm-highlight-firefox-bookmarks) +(make-obsolete 'helm-c-highlight-firefox-bookmarks 'helm-highlight-firefox-bookmarks "1.5.1") +(defalias 'helm-c-find-file-or-marked 'helm-find-file-or-marked) +(make-obsolete 'helm-c-find-file-or-marked 'helm-find-file-or-marked "1.5.1") +(defalias 'helm-c-query-replace-regexp 'helm-query-replace-regexp) +(make-obsolete 'helm-c-query-replace-regexp 'helm-query-replace-regexp "1.5.1") +(defalias 'helm-c-describe-variable 'helm-describe-variable) +(make-obsolete 'helm-c-describe-variable 'helm-describe-variable "1.5.1") +(defalias 'helm-c-advice-persistent-action 'helm-advice-persistent-action) +(make-obsolete 'helm-c-advice-persistent-action 'helm-advice-persistent-action "1.5.1") +(defalias 'helm-c-show-completion 'helm-show-completion) +(make-obsolete 'helm-c-show-completion 'helm-show-completion "1.5.1") +(defalias 'helm-c-google-suggest-set-candidates 'helm-google-suggest-set-candidates) +(make-obsolete 'helm-c-google-suggest-set-candidates 'helm-google-suggest-set-candidates "1.5.1") +(defalias 'helm-c-grep-persistent-action 'helm-grep-persistent-action) +(make-obsolete 'helm-c-grep-persistent-action 'helm-grep-persistent-action "1.5.1") +(defalias 'helm-c-open-file-with-default-tool 'helm-open-file-with-default-tool) +(make-obsolete 'helm-c-open-file-with-default-tool 'helm-open-file-with-default-tool "1.5.1") +(defalias 'helm-c-run-external-command 'helm-run-external-command) +(make-obsolete 'helm-c-run-external-command 'helm-run-external-command "1.5.1") +(defalias 'helm-c-bookmark-images-setup-alist 'helm-bookmark-images-setup-alist) +(make-obsolete 'helm-c-bookmark-images-setup-alist 'helm-bookmark-images-setup-alist "1.5.1") +(defalias 'helm-c-apt-candidate-transformer 'helm-apt-candidate-transformer) +(make-obsolete 'helm-c-apt-candidate-transformer 'helm-apt-candidate-transformer "1.5.1") +(defalias 'helm-c-grep-run-persistent-action 'helm-grep-run-persistent-action) +(make-obsolete 'helm-c-grep-run-persistent-action 'helm-grep-run-persistent-action "1.5.1") +(defalias 'helm-c-highlight-buffers 'helm-highlight-buffers) +(make-obsolete 'helm-c-highlight-buffers 'helm-highlight-buffers "1.5.1") +(defalias 'helm-c-man-default-action 'helm-man-default-action) +(make-obsolete 'helm-c-man-default-action 'helm-man-default-action "1.5.1") +(defalias 'helm-c-advice-candidates 'helm-advice-candidates) +(make-obsolete 'helm-c-advice-candidates 'helm-advice-candidates "1.5.1") +(defalias 'helm-c-stumpwm-commands-execute 'helm-stumpwm-commands-execute) +(make-obsolete 'helm-c-stumpwm-commands-execute 'helm-stumpwm-commands-execute "1.5.1") +(defalias 'helm-c-ucs-help 'helm-ucs-help) +(make-obsolete 'helm-c-ucs-help 'helm-ucs-help "1.5.1") +(defalias 'helm-c-apt-uninstall 'helm-apt-uninstall) +(make-obsolete 'helm-c-apt-uninstall 'helm-apt-uninstall "1.5.1") +(defalias 'helm-c-bookmark-run-jump-other-window 'helm-bookmark-run-jump-other-window) +(make-obsolete 'helm-c-bookmark-run-jump-other-window 'helm-bookmark-run-jump-other-window "1.5.1") +(defalias 'helm-c-elisp-library-scan-list 'helm-elisp-library-scan-list) +(make-obsolete 'helm-c-elisp-library-scan-list 'helm-elisp-library-scan-list "1.5.1") +(defalias 'helm-c-switch-to-buffer 'helm-switch-to-buffer) +(make-obsolete 'helm-c-switch-to-buffer 'helm-switch-to-buffer "1.5.1") +(defalias 'helm-c-bookmark-man-setup-alist 'helm-bookmark-man-setup-alist) +(make-obsolete 'helm-c-bookmark-man-setup-alist 'helm-bookmark-man-setup-alist "1.5.1") +(defalias 'helm-c-etags-find-tag-file-directory 'helm-etags-find-tag-file-directory) +(make-obsolete 'helm-c-etags-find-tag-file-directory 'helm-etags-find-tag-file-directory "1.5.1") +(defalias 'helm-c-xrandr-info 'helm-xrandr-info) +(make-obsolete 'helm-c-xrandr-info 'helm-xrandr-info "1.5.1") +(defalias 'helm-c-stringify 'helm-stringify) +(make-obsolete 'helm-c-stringify 'helm-stringify "1.5.1") +(defalias 'helm-c-goto-precedent-file 'helm-goto-precedent-file) +(make-obsolete 'helm-c-goto-precedent-file 'helm-goto-precedent-file "1.5.1") +(defalias 'helm-c-apt-cache-show 'helm-apt-cache-show) +(make-obsolete 'helm-c-apt-cache-show 'helm-apt-cache-show "1.5.1") +(defalias 'helm-c-etags-file-modified-p 'helm-etags-file-modified-p) +(make-obsolete 'helm-c-etags-file-modified-p 'helm-etags-file-modified-p "1.5.1") +(defalias 'helm-c-display-to-real-numbered-line 'helm-display-to-real-numbered-line) +(make-obsolete 'helm-c-display-to-real-numbered-line 'helm-display-to-real-numbered-line "1.5.1") +(defalias 'helm-c-etags-get-tag-file 'helm-etags-get-tag-file) +(make-obsolete 'helm-c-etags-get-tag-file 'helm-etags-get-tag-file "1.5.1") +(defalias 'helm-c-highlight-not-logged 'helm-highlight-not-logged) +(make-obsolete 'helm-c-highlight-not-logged 'helm-highlight-not-logged "1.5.1") +(defalias 'helm-c-pdfgrep-action 'helm-pdfgrep-action) +(make-obsolete 'helm-c-pdfgrep-action 'helm-pdfgrep-action "1.5.1") +(defalias 'helm-c-adaptative-save-history 'helm-adaptive-save-history) +(make-obsolete 'helm-c-adaptative-save-history 'helm-adaptive-save-history "1.5.1") +(defalias 'helm-c-get-first-line-documentation 'helm-get-first-line-documentation) +(make-obsolete 'helm-c-get-first-line-documentation 'helm-get-first-line-documentation "1.5.1") +(defalias 'helm-approximate-candidate-number 'helm-get-candidate-number) +(make-obsolete 'helm-approximate-candidate-number 'helm-get-candidate-number "1.5.5") + + +;;; variables +;; +;; +(defvaralias 'helm-c-bbdb-name 'helm-bbdb-name) +(make-obsolete-variable 'helm-c-bbdb-name 'helm-bbdb-name "1.5.1") +(defvaralias 'helm-c-pdfgrep-default-command 'helm-pdfgrep-default-command) +(make-obsolete-variable 'helm-c-pdfgrep-default-command 'helm-pdfgrep-default-command "1.5.1") +(defvaralias 'helm-c-source-time-world 'helm-source-time-world) +(make-obsolete-variable 'helm-c-source-time-world 'helm-source-time-world "1.5.1") +(defvaralias 'helm-c-grep-default-command 'helm-grep-default-command) +(make-obsolete-variable 'helm-c-grep-default-command 'helm-grep-default-command "1.5.1") +(defvaralias 'helm-c-default-info-index-list 'helm-default-info-index-list) +(make-obsolete-variable 'helm-c-default-info-index-list 'helm-default-info-index-list "1.5.1") +(defvaralias 'helm-c-etags-tag-file-dir 'helm-etags-tag-file-dir) +(make-obsolete-variable 'helm-c-etags-tag-file-dir 'helm-etags-tag-file-dir "1.5.1") +(defvaralias 'helm-c-source-man-pages 'helm-source-man-pages) +(make-obsolete-variable 'helm-c-source-man-pages 'helm-source-man-pages "1.5.1") +(defvaralias 'helm-c-source-bookmark-info 'helm-source-bookmark-info) +(make-obsolete-variable 'helm-c-source-bookmark-info 'helm-source-bookmark-info "1.5.1") +(defvaralias 'helm-c-file-cache-files 'helm-file-cache-files) +(make-obsolete-variable 'helm-c-file-cache-files 'helm-file-cache-files "1.5.1") +(defvaralias 'helm-c-ucs-map 'helm-ucs-map) +(make-obsolete-variable 'helm-c-ucs-map 'helm-ucs-map "1.5.1") +(defvaralias 'helm-c-show-completion-min-window-height 'helm-show-completion-min-window-height) +(make-obsolete-variable 'helm-c-show-completion-min-window-height 'helm-show-completion-min-window-height "1.5.1") +(defvaralias 'helm-c-adaptative-history 'helm-adaptive-history) +(make-obsolete-variable 'helm-c-adaptative-history 'helm-adaptive-history "1.5.1") +(defvaralias 'helm-c-source-bookmarks-local 'helm-source-bookmarks-local) +(make-obsolete-variable 'helm-c-source-bookmarks-local 'helm-source-bookmarks-local "1.5.1") +(defvaralias 'helm-c-grep-map 'helm-grep-map) +(make-obsolete-variable 'helm-c-grep-map 'helm-grep-map "1.5.1") +(defvaralias 'helm-c-source-session 'helm-source-session) +(make-obsolete-variable 'helm-c-source-session 'helm-source-session "1.5.1") +(defvaralias 'helm-c-source-org-headline 'helm-source-org-headline) +(make-obsolete-variable 'helm-c-source-org-headline 'helm-source-org-headline "1.5.1") +(defvaralias 'helm-c-source-minibuffer-history 'helm-source-minibuffer-history) +(make-obsolete-variable 'helm-c-source-minibuffer-history 'helm-source-minibuffer-history "1.5.1") +(defvaralias 'helm-c-source-files-in-current-dir 'helm-source-files-in-current-dir) +(make-obsolete-variable 'helm-c-source-files-in-current-dir 'helm-source-files-in-current-dir "1.5.1") +(defvaralias 'helm-c-source-etags-select 'helm-source-etags-select) +(make-obsolete-variable 'helm-c-source-etags-select 'helm-source-etags-select "1.5.1") +(defvaralias 'helm-c-gentoo-use-flags 'helm-gentoo-use-flags) +(make-obsolete-variable 'helm-c-gentoo-use-flags 'helm-gentoo-use-flags "1.5.1") +(defvaralias 'helm-c-show-completion-overlay 'helm-show-completion-overlay) +(make-obsolete-variable 'helm-c-show-completion-overlay 'helm-show-completion-overlay "1.5.1") +(defvaralias 'helm-c-buffer-help-message 'helm-buffer-help-message) +(make-obsolete-variable 'helm-c-buffer-help-message 'helm-buffer-help-message "1.5.1") +(defvaralias 'helm-c-ucs-max-len 'helm-ucs-max-len) +(make-obsolete-variable 'helm-c-ucs-max-len 'helm-ucs-max-len "1.5.1") +(defvaralias 'helm-c-imenu-index-filter 'helm-imenu-index-filter) +(make-obsolete-variable 'helm-c-imenu-index-filter 'helm-imenu-index-filter "1.5.1") +(defvaralias 'helm-c-org-keywords-info-location 'helm-org-keywords-info-location) +(make-obsolete-variable 'helm-c-org-keywords-info-location 'helm-org-keywords-info-location "1.5.1") +(defvaralias 'helm-c-kill-ring-max-lines-number 'helm-kill-ring-max-lines-number) +(make-obsolete-variable 'helm-c-kill-ring-max-lines-number 'helm-kill-ring-max-lines-number "1.5.1") +(defvaralias 'helm-c-source-apt 'helm-source-apt) +(make-obsolete-variable 'helm-c-source-apt 'helm-source-apt "1.5.1") +(defvaralias 'helm-c-bookmark-map 'helm-bookmark-map) +(make-obsolete-variable 'helm-c-bookmark-map 'helm-bookmark-map "1.5.1") +(defvaralias 'helm-c-source-xfonts 'helm-source-xfonts) +(make-obsolete-variable 'helm-c-source-xfonts 'helm-source-xfonts "1.5.1") +(defvaralias 'helm-c-source-kill-ring 'helm-source-kill-ring) +(make-obsolete-variable 'helm-c-source-kill-ring 'helm-source-kill-ring "1.5.1") +(defvaralias 'helm-c-home-url 'helm-home-url) +(make-obsolete-variable 'helm-c-home-url 'helm-home-url "1.5.1") +(defvaralias 'helm-c-etags-cache 'helm-etags-cache) +(make-obsolete-variable 'helm-c-etags-cache 'helm-etags-cache "1.5.1") +(defvaralias 'helm-c-source-latex-math 'helm-source-latex-math) +(make-obsolete-variable 'helm-c-source-latex-math 'helm-source-latex-math "1.5.1") +(defvaralias 'helm-c-source-bookmark-files&dirs 'helm-source-bookmark-files&dirs) +(make-obsolete-variable 'helm-c-source-bookmark-files&dirs 'helm-source-bookmark-files&dirs "1.5.1") +(defvaralias 'helm-c-source-emms-dired 'helm-source-emms-dired) +(make-obsolete-variable 'helm-c-source-emms-dired 'helm-source-emms-dired "1.5.1") +(defvaralias 'helm-c-source-firefox-bookmarks 'helm-source-firefox-bookmarks) +(make-obsolete-variable 'helm-c-source-firefox-bookmarks 'helm-source-firefox-bookmarks "1.5.1") +(defvaralias 'helm-c-source-ratpoison-commands 'helm-source-ratpoison-commands) +(make-obsolete-variable 'helm-c-source-ratpoison-commands 'helm-source-ratpoison-commands "1.5.1") +(defvaralias 'helm-c-apt-show-command 'helm-apt-show-command) +(make-obsolete-variable 'helm-c-apt-show-command 'helm-apt-show-command "1.5.1") +(defvaralias 'helm-c-pdfgrep-default-function 'helm-pdfgrep-default-function) +(make-obsolete-variable 'helm-c-pdfgrep-default-function 'helm-pdfgrep-default-function "1.5.1") +(defvaralias 'helm-c-simple-call-tree-tick 'helm-simple-call-tree-tick) +(make-obsolete-variable 'helm-c-simple-call-tree-tick 'helm-simple-call-tree-tick "1.5.1") +(defvaralias 'helm-c-source-register 'helm-source-register) +(make-obsolete-variable 'helm-c-source-register 'helm-source-register "1.5.1") +(defvaralias 'helm-c-boring-buffer-regexp-list 'helm-boring-buffer-regexp-list) +(make-obsolete-variable 'helm-c-boring-buffer-regexp-list 'helm-boring-buffer-regexp-list "1.5.1") +(defvaralias 'helm-c-source-locate 'helm-source-locate) +(make-obsolete-variable 'helm-c-source-locate 'helm-source-locate "1.5.1") +(defvaralias 'helm-c-source-advice 'helm-source-advice) +(make-obsolete-variable 'helm-c-source-advice 'helm-source-advice "1.5.1") +(defvaralias 'helm-c-source-yaoddmuse-emacswiki-edit-or-view 'helm-source-yaoddmuse-emacswiki-edit-or-view) +(make-obsolete-variable 'helm-c-source-yaoddmuse-emacswiki-edit-or-view 'helm-source-yaoddmuse-emacswiki-edit-or-view "1.5.1") +(defvaralias 'helm-c-ucs-mode-line-string 'helm-ucs-mode-line-string) +(make-obsolete-variable 'helm-c-ucs-mode-line-string 'helm-ucs-mode-line-string "1.5.1") +(defvaralias 'helm-c-xfonts-cache 'helm-xfonts-cache) +(make-obsolete-variable 'helm-c-xfonts-cache 'helm-xfonts-cache "1.5.1") +(defvaralias 'helm-c-source-yahoo-suggest 'helm-source-yahoo-suggest) +(make-obsolete-variable 'helm-c-source-yahoo-suggest 'helm-source-yahoo-suggest "1.5.1") +(defvaralias 'helm-c-rzgrep-cache 'helm-rzgrep-cache) +(make-obsolete-variable 'helm-c-rzgrep-cache 'helm-rzgrep-cache "1.5.1") +(defvaralias 'helm-c-source-org-keywords 'helm-source-org-keywords) +(make-obsolete-variable 'helm-c-source-org-keywords 'helm-source-org-keywords "1.5.1") +(defvaralias 'helm-c-pdfgrep-map 'helm-pdfgrep-map) +(make-obsolete-variable 'helm-c-pdfgrep-map 'helm-pdfgrep-map "1.5.1") +(defvaralias 'helm-c-source-lacarte 'helm-source-lacarte) +(make-obsolete-variable 'helm-c-source-lacarte 'helm-source-lacarte "1.5.1") +(defvaralias 'helm-c-apt-search-command 'helm-apt-search-command) +(make-obsolete-variable 'helm-c-apt-search-command 'helm-apt-search-command "1.5.1") +(defvaralias 'helm-c-default-external-file-browser 'helm-default-external-file-browser) +(make-obsolete-variable 'helm-c-default-external-file-browser 'helm-default-external-file-browser "1.5.1") +(defvaralias 'helm-c-source-evaluation-result 'helm-source-evaluation-result) +(make-obsolete-variable 'helm-c-source-evaluation-result 'helm-source-evaluation-result "1.5.1") +(defvaralias 'helm-c-yahoo-suggest-search-url 'helm-yahoo-suggest-search-url) +(make-obsolete-variable 'helm-c-yahoo-suggest-search-url 'helm-yahoo-suggest-search-url "1.5.1") +(defvaralias 'helm-c-source-occur 'helm-source-occur) +(make-obsolete-variable 'helm-c-source-occur 'helm-source-occur "1.5.1") +(defvaralias 'helm-c-source-calculation-result 'helm-source-calculation-result) +(make-obsolete-variable 'helm-c-source-calculation-result 'helm-source-calculation-result "1.5.1") +(defvaralias 'helm-c-default-zgrep-command 'helm-default-zgrep-command) +(make-obsolete-variable 'helm-c-default-zgrep-command 'helm-default-zgrep-command "1.5.1") +(defvaralias 'helm-c-show-info-in-mode-line-delay 'helm-show-info-in-mode-line-delay) +(make-obsolete-variable 'helm-c-show-info-in-mode-line-delay 'helm-show-info-in-mode-line-delay "1.5.1") +(defvaralias 'helm-c-source-ido-virtual-buffers 'helm-source-ido-virtual-buffers) +(make-obsolete-variable 'helm-c-source-ido-virtual-buffers 'helm-source-ido-virtual-buffers "1.5.1") +(defvaralias 'helm-c-source-yaoddmuse-emacswiki-post-library 'helm-source-yaoddmuse-emacswiki-post-library) +(make-obsolete-variable 'helm-c-source-yaoddmuse-emacswiki-post-library 'helm-source-yaoddmuse-emacswiki-post-library "1.5.1") +(defvaralias 'helm-c-source-top 'helm-source-top) +(make-obsolete-variable 'helm-c-source-top 'helm-source-top "1.5.1") +(defvaralias 'helm-c-source-colors 'helm-source-colors) +(make-obsolete-variable 'helm-c-source-colors 'helm-source-colors "1.5.1") +(defvaralias 'helm-c-read-file-map 'helm-read-file-map) +(make-obsolete-variable 'helm-c-read-file-map 'helm-read-file-map "1.5.1") +(defvaralias 'helm-c-source-file-cache 'helm-source-file-cache) +(make-obsolete-variable 'helm-c-source-file-cache 'helm-source-file-cache "1.5.1") +(defvaralias 'helm-c-google-suggest-default-browser-function 'helm-google-suggest-default-browser-function) +(make-obsolete-variable 'helm-c-google-suggest-default-browser-function 'helm-google-suggest-default-browser-function "1.5.1") +(defvaralias 'helm-c-external-programs-associations 'helm-external-programs-associations) +(make-obsolete-variable 'helm-c-external-programs-associations 'helm-external-programs-associations "1.5.1") +(defvaralias 'helm-c-source-complex-command-history 'helm-source-complex-command-history) +(make-obsolete-variable 'helm-c-source-complex-command-history 'helm-source-complex-command-history "1.5.1") +(defvaralias 'helm-c-cached-imenu-candidates 'helm-cached-imenu-candidates) +(make-obsolete-variable 'helm-c-cached-imenu-candidates 'helm-cached-imenu-candidates "1.5.1") +(defvaralias 'helm-c-gentoo-buffer 'helm-gentoo-buffer) +(make-obsolete-variable 'helm-c-gentoo-buffer 'helm-gentoo-buffer "1.5.1") +(defvaralias 'helm-c-source-simple-call-tree-callers-functions 'helm-source-simple-call-tree-callers-functions) +(make-obsolete-variable 'helm-c-source-simple-call-tree-callers-functions 'helm-source-simple-call-tree-callers-functions "1.5.1") +(defvaralias 'helm-c-external-commands-list 'helm-external-commands-list) +(make-obsolete-variable 'helm-c-external-commands-list 'helm-external-commands-list "1.5.1") +(defvaralias 'helm-c-source-ucs 'helm-source-ucs) +(make-obsolete-variable 'helm-c-source-ucs 'helm-source-ucs "1.5.1") +(defvaralias 'helm-c-adaptative-history-length 'helm-adaptive-history-length) +(make-obsolete-variable 'helm-c-adaptative-history-length 'helm-adaptive-history-length "1.5.1") +(defvaralias 'helm-c-source-customize-face 'helm-source-customize-face) +(make-obsolete-variable 'helm-c-source-customize-face 'helm-source-customize-face "1.5.1") +(defvaralias 'helm-c-source-bookmarks-ssh 'helm-source-bookmarks-ssh) +(make-obsolete-variable 'helm-c-source-bookmarks-ssh 'helm-source-bookmarks-ssh "1.5.1") +(defvaralias 'helm-c-eldoc-in-minibuffer-show-fn 'helm-eldoc-in-minibuffer-show-fn) +(make-obsolete-variable 'helm-c-eldoc-in-minibuffer-show-fn 'helm-eldoc-in-minibuffer-show-fn "1.5.1") +(defvaralias 'helm-c-google-suggest-search-url 'helm-google-suggest-search-url) +(make-obsolete-variable 'helm-c-google-suggest-search-url 'helm-google-suggest-search-url "1.5.1") +(defvaralias 'helm-c-source-bmkext-addressbook 'helm-source-bmkext-addressbook) +(make-obsolete-variable 'helm-c-source-bmkext-addressbook 'helm-source-bmkext-addressbook "1.5.1") +(defvaralias 'helm-c-source-ctags 'helm-source-ctags) +(make-obsolete-variable 'helm-c-source-ctags 'helm-source-ctags "1.5.1") +(defvaralias 'helm-c-source-eev-anchor 'helm-source-eev-anchor) +(make-obsolete-variable 'helm-c-source-eev-anchor 'helm-source-eev-anchor "1.5.1") +(defvaralias 'helm-c-apt-installed-packages 'helm-apt-installed-packages) +(make-obsolete-variable 'helm-c-apt-installed-packages 'helm-apt-installed-packages "1.5.1") +(defvaralias 'helm-c-apt-all-packages 'helm-apt-all-packages) +(make-obsolete-variable 'helm-c-apt-all-packages 'helm-apt-all-packages "1.5.1") +(defvaralias 'helm-c-find-files-doc-header 'helm-find-files-doc-header) +(make-obsolete-variable 'helm-c-find-files-doc-header 'helm-find-files-doc-header "1.5.1") +(defvaralias 'helm-c-source-imenu 'helm-source-imenu) +(make-obsolete-variable 'helm-c-source-imenu 'helm-source-imenu "1.5.1") +(defvaralias 'helm-c-grep-default-function 'helm-grep-default-function) +(make-obsolete-variable 'helm-c-grep-default-function 'helm-grep-default-function "1.5.1") +(defvaralias 'helm-c-top-command 'helm-top-command) +(make-obsolete-variable 'helm-c-top-command 'helm-top-command "1.5.1") +(defvaralias 'helm-c-source-bookmark-man 'helm-source-bookmark-man) +(make-obsolete-variable 'helm-c-source-bookmark-man 'helm-source-bookmark-man "1.5.1") +(defvaralias 'helm-c-source-stumpwm-commands 'helm-source-stumpwm-commands) +(make-obsolete-variable 'helm-c-source-stumpwm-commands 'helm-source-stumpwm-commands "1.5.1") +(defvaralias 'helm-c-source-idle-time-timers 'helm-source-idle-time-timers) +(make-obsolete-variable 'helm-c-source-idle-time-timers 'helm-source-idle-time-timers "1.5.1") +(defvaralias 'helm-c-turn-on-show-completion 'helm-turn-on-show-completion) +(make-obsolete-variable 'helm-c-turn-on-show-completion 'helm-turn-on-show-completion "1.5.1") +(defvaralias 'helm-c-esh-help-message 'helm-esh-help-message) +(make-obsolete-variable 'helm-c-esh-help-message 'helm-esh-help-message "1.5.1") +(defvaralias 'helm-c-register-max-offset 'helm-register-max-offset) +(make-obsolete-variable 'helm-c-register-max-offset 'helm-register-max-offset "1.5.1") +(defvaralias 'helm-c-source-bookmark-set 'helm-source-bookmark-set) +(make-obsolete-variable 'helm-c-source-bookmark-set 'helm-source-bookmark-set "1.5.1") +(defvaralias 'helm-c-source-file-name-history 'helm-source-file-name-history) +(make-obsolete-variable 'helm-c-source-file-name-history 'helm-source-file-name-history "1.5.1") +(defvaralias 'helm-c-file-cache-initialized-p 'helm-file-cache-initialized-p) +(make-obsolete-variable 'helm-c-file-cache-initialized-p 'helm-file-cache-initialized-p "1.5.1") +(defvaralias 'helm-c-grep-max-length-history 'helm-grep-max-length-history) +(make-obsolete-variable 'helm-c-grep-max-length-history 'helm-grep-max-length-history "1.5.1") +(defvaralias 'helm-c-source-jabber-contacts 'helm-source-jabber-contacts) +(make-obsolete-variable 'helm-c-source-jabber-contacts 'helm-source-jabber-contacts "1.5.1") +(defvaralias 'helm-c-grep-use-ioccur-style-keys 'helm-grep-use-ioccur-style-keys) +(make-obsolete-variable 'helm-c-grep-use-ioccur-style-keys 'helm-grep-use-ioccur-style-keys "1.5.1") +(defvaralias 'helm-c-ctags-modes 'helm-ctags-modes) +(make-obsolete-variable 'helm-c-ctags-modes 'helm-ctags-modes "1.5.1") +(defvaralias 'helm-c-source-moccur 'helm-source-moccur) +(make-obsolete-variable 'helm-c-source-moccur 'helm-source-moccur "1.5.1") +(defvaralias 'helm-c-source-w3m-bookmarks 'helm-source-w3m-bookmarks) +(make-obsolete-variable 'helm-c-source-w3m-bookmarks 'helm-source-w3m-bookmarks "1.5.1") +(defvaralias 'helm-c-locate-command 'helm-locate-command) +(make-obsolete-variable 'helm-c-locate-command 'helm-locate-command "1.5.1") +(defvaralias 'helm-c-etags-tag-file-name 'helm-etags-tag-file-name) +(make-obsolete-variable 'helm-c-etags-tag-file-name 'helm-etags-tag-file-name "1.5.1") +(defvaralias 'helm-c-source-bookmarks-su 'helm-source-bookmarks-su) +(make-obsolete-variable 'helm-c-source-bookmarks-su 'helm-source-bookmarks-su "1.5.1") +(defvaralias 'helm-c-source-emms-streams 'helm-source-emms-streams) +(make-obsolete-variable 'helm-c-source-emms-streams 'helm-source-emms-streams "1.5.1") +(defvaralias 'helm-c-buffer-map 'helm-buffer-map) +(make-obsolete-variable 'helm-c-buffer-map 'helm-buffer-map "1.5.1") +(defvaralias 'helm-c-source-files-in-all-dired 'helm-source-files-in-all-dired) +(make-obsolete-variable 'helm-c-source-files-in-all-dired 'helm-source-files-in-all-dired "1.5.1") +(defvaralias 'helm-c-source-eshell-history 'helm-source-eshell-history) +(make-obsolete-variable 'helm-c-source-eshell-history 'helm-source-eshell-history "1.5.1") +(defvaralias 'helm-c-source-absolute-time-timers 'helm-source-absolute-time-timers) +(make-obsolete-variable 'helm-c-source-absolute-time-timers 'helm-source-absolute-time-timers "1.5.1") +(defvaralias 'helm-c-source-findutils 'helm-source-findutils) +(make-obsolete-variable 'helm-c-source-findutils 'helm-source-findutils "1.5.1") +(defvaralias 'helm-c-ucs-help-message 'helm-ucs-help-message) +(make-obsolete-variable 'helm-c-ucs-help-message 'helm-ucs-help-message "1.5.1") +(defvaralias 'helm-c-source-find-files 'helm-source-find-files) +(make-obsolete-variable 'helm-c-source-find-files 'helm-source-find-files "1.5.1") +(defvaralias 'helm-c-source-recentf 'helm-source-recentf) +(make-obsolete-variable 'helm-c-source-recentf 'helm-source-recentf "1.5.1") +(defvaralias 'helm-c-cache-world 'helm-cache-world) +(make-obsolete-variable 'helm-c-cache-world 'helm-cache-world "1.5.1") +(defvaralias 'helm-c-source-picklist 'helm-source-picklist) +(make-obsolete-variable 'helm-c-source-picklist 'helm-source-picklist "1.5.1") +(defvaralias 'helm-c-source-buffer-not-found 'helm-source-buffer-not-found) +(make-obsolete-variable 'helm-c-source-buffer-not-found 'helm-source-buffer-not-found "1.5.1") +(defvaralias 'helm-c-source-xrandr-change-resolution 'helm-source-xrandr-change-resolution) +(make-obsolete-variable 'helm-c-source-xrandr-change-resolution 'helm-source-xrandr-change-resolution "1.5.1") +(defvaralias 'helm-c-source-bookmark-w3m 'helm-source-bookmark-w3m) +(make-obsolete-variable 'helm-c-source-bookmark-w3m 'helm-source-bookmark-w3m "1.5.1") +(defvaralias 'helm-c-google-suggest-url 'helm-google-suggest-url) +(make-obsolete-variable 'helm-c-google-suggest-url 'helm-google-suggest-url "1.5.1") +(defvaralias 'helm-c-source-semantic 'helm-source-semantic) +(make-obsolete-variable 'helm-c-source-semantic 'helm-source-semantic "1.5.1") +(defvaralias 'helm-c-source-mark-ring 'helm-source-mark-ring) +(make-obsolete-variable 'helm-c-source-mark-ring 'helm-source-mark-ring "1.5.1") +(defvaralias 'helm-c-source-fixme 'helm-source-fixme) +(make-obsolete-variable 'helm-c-source-fixme 'helm-source-fixme "1.5.1") +(defvaralias 'helm-c-grep-preferred-ext 'helm-grep-preferred-ext) +(make-obsolete-variable 'helm-c-grep-preferred-ext 'helm-grep-preferred-ext "1.5.1") +(defvaralias 'helm-c-source-gentoo 'helm-source-gentoo) +(make-obsolete-variable 'helm-c-source-gentoo 'helm-source-gentoo "1.5.1") +(defvaralias 'helm-c-source-bookmarks 'helm-source-bookmarks) +(make-obsolete-variable 'helm-c-source-bookmarks 'helm-source-bookmarks "1.5.1") +(defvaralias 'helm-c-source-elisp-library-scan 'helm-source-elisp-library-scan) +(make-obsolete-variable 'helm-c-source-elisp-library-scan 'helm-source-elisp-library-scan "1.5.1") +(defvaralias 'helm-c-source-info-pages 'helm-source-info-pages) +(make-obsolete-variable 'helm-c-source-info-pages 'helm-source-info-pages "1.5.1") +(defvaralias 'helm-c-source-bookmark-gnus 'helm-source-bookmark-gnus) +(make-obsolete-variable 'helm-c-source-bookmark-gnus 'helm-source-bookmark-gnus "1.5.1") +(defvaralias 'helm-c-source-elscreen 'helm-source-elscreen) +(make-obsolete-variable 'helm-c-source-elscreen 'helm-source-elscreen "1.5.1") +(defvaralias 'helm-c-source-emacs-source-defun 'helm-source-emacs-source-defun) +(make-obsolete-variable 'helm-c-source-emacs-source-defun 'helm-source-emacs-source-defun "1.5.1") +(defvaralias 'helm-c-source-emacs-lisp-toplevels 'helm-source-emacs-lisp-toplevels) +(make-obsolete-variable 'helm-c-source-emacs-lisp-toplevels 'helm-source-emacs-lisp-toplevels "1.5.1") +(defvaralias 'helm-c-etags-mtime-alist 'helm-etags-mtime-alist) +(make-obsolete-variable 'helm-c-etags-mtime-alist 'helm-etags-mtime-alist "1.5.1") +(defvaralias 'helm-c-info-pages 'helm-info-pages) +(make-obsolete-variable 'helm-c-info-pages 'helm-info-pages "1.5.1") +(defvaralias 'helm-c-grep-default-recurse-command 'helm-grep-default-recurse-command) +(make-obsolete-variable 'helm-c-grep-default-recurse-command 'helm-grep-default-recurse-command "1.5.1") +(defvaralias 'helm-c-yaoddmuse-ew-cache 'helm-yaoddmuse-ew-cache) +(make-obsolete-variable 'helm-c-yaoddmuse-ew-cache 'helm-yaoddmuse-ew-cache "1.5.1") +(defvaralias 'helm-c-source-google-suggest 'helm-source-google-suggest) +(make-obsolete-variable 'helm-c-source-google-suggest 'helm-source-google-suggest "1.5.1") +(defvaralias 'helm-c-etags-tag-file-search-limit 'helm-etags-tag-file-search-limit) +(make-obsolete-variable 'helm-c-etags-tag-file-search-limit 'helm-etags-tag-file-search-limit "1.5.1") +(defvaralias 'helm-c-w3m-bookmarks-alist 'helm-w3m-bookmarks-alist) +(make-obsolete-variable 'helm-c-w3m-bookmarks-alist 'helm-w3m-bookmarks-alist "1.5.1") +(defvaralias 'helm-c-source-ff-file-name-history 'helm-source-ff-file-name-history) +(make-obsolete-variable 'helm-c-source-ff-file-name-history 'helm-source-ff-file-name-history "1.5.1") +(defvaralias 'helm-c-source-buffers-list 'helm-source-buffers-list) +(make-obsolete-variable 'helm-c-source-buffers-list 'helm-source-buffers-list "1.5.1") +(defvaralias 'helm-c-source-simple-call-tree-functions-callers 'helm-source-simple-call-tree-functions-callers) +(make-obsolete-variable 'helm-c-source-simple-call-tree-functions-callers 'helm-source-simple-call-tree-functions-callers "1.5.1") +(defvaralias 'helm-c-cached-imenu-alist 'helm-cached-imenu-alist) +(make-obsolete-variable 'helm-c-cached-imenu-alist 'helm-cached-imenu-alist "1.5.1") +(defvaralias 'helm-c-source-emacs-lisp-expectations 'helm-source-emacs-lisp-expectations) +(make-obsolete-variable 'helm-c-source-emacs-lisp-expectations 'helm-source-emacs-lisp-expectations "1.5.1") +(defvaralias 'helm-c-source-rd-headline 'helm-source-rd-headline) +(make-obsolete-variable 'helm-c-source-rd-headline 'helm-source-rd-headline "1.5.1") +(defvaralias 'helm-c-source-tracker-search 'helm-source-tracker-search) +(make-obsolete-variable 'helm-c-source-tracker-search 'helm-source-tracker-search "1.5.1") +(defvaralias 'helm-c-simple-call-tree-related-functions 'helm-simple-call-tree-related-functions) +(make-obsolete-variable 'helm-c-simple-call-tree-related-functions 'helm-simple-call-tree-related-functions "1.5.1") +(defvaralias 'helm-c-yaoddmuse-cache-file 'helm-yaoddmuse-cache-file) +(make-obsolete-variable 'helm-c-yaoddmuse-cache-file 'helm-yaoddmuse-cache-file "1.5.1") +(defvaralias 'helm-c-google-suggest-default-function 'helm-google-suggest-default-function) +(make-obsolete-variable 'helm-c-google-suggest-default-function 'helm-google-suggest-default-function "1.5.1") +(defvaralias 'helm-c-imenu-delimiter 'helm-imenu-delimiter) +(make-obsolete-variable 'helm-c-imenu-delimiter 'helm-imenu-delimiter "1.5.1") +(defvaralias 'helm-c-source-emacs-process 'helm-source-emacs-process) +(make-obsolete-variable 'helm-c-source-emacs-process 'helm-source-emacs-process "1.5.1") +(defvaralias 'helm-c-firefox-bookmarks-alist 'helm-firefox-bookmarks-alist) +(make-obsolete-variable 'helm-c-firefox-bookmarks-alist 'helm-firefox-bookmarks-alist "1.5.1") +(defvaralias 'helm-c-simple-call-tree-function-index 'helm-simple-call-tree-function-index) +(make-obsolete-variable 'helm-c-simple-call-tree-function-index 'helm-simple-call-tree-function-index "1.5.1") +(defvaralias 'helm-c-etags-map 'helm-etags-map) +(make-obsolete-variable 'helm-c-etags-map 'helm-etags-map "1.5.1") +(defvaralias 'helm-c-grep-history 'helm-grep-history) +(make-obsolete-variable 'helm-c-grep-history 'helm-grep-history "1.5.1") +(defvaralias 'helm-c-cached-imenu-tick 'helm-cached-imenu-tick) +(make-obsolete-variable 'helm-c-cached-imenu-tick 'helm-cached-imenu-tick "1.5.1") +(defvaralias 'helm-c-source-esh 'helm-source-esh) +(make-obsolete-variable 'helm-c-source-esh 'helm-source-esh "1.5.1") +(defvaralias 'helm-c-source-global-mark-ring 'helm-source-global-mark-ring) +(make-obsolete-variable 'helm-c-source-global-mark-ring 'helm-source-global-mark-ring "1.5.1") +(defvaralias 'helm-c-man-pages 'helm-man-pages) +(make-obsolete-variable 'helm-c-man-pages 'helm-man-pages "1.5.1") +(defvaralias 'helm-c-adaptative-done 'helm-adaptive-done) +(make-obsolete-variable 'helm-c-adaptative-done 'helm-adaptive-done "1.5.1") +(defvaralias 'helm-c-source-bbdb 'helm-source-bbdb) +(make-obsolete-variable 'helm-c-source-bbdb 'helm-source-bbdb "1.5.1") +(defvaralias 'helm-c-source-regexp 'helm-source-regexp) +(make-obsolete-variable 'helm-c-source-regexp 'helm-source-regexp "1.5.1") +(defvaralias 'helm-c-boring-file-regexp-list 'helm-boring-file-regexp-list) +(make-obsolete-variable 'helm-c-boring-file-regexp-list 'helm-boring-file-regexp-list "1.5.1") +(defvaralias 'helm-c-show-completion-use-special-display 'helm-show-completion-use-special-display) +(make-obsolete-variable 'helm-c-show-completion-use-special-display 'helm-show-completion-use-special-display "1.5.1") +(defvaralias 'helm-c-apt-query 'helm-apt-query) +(make-obsolete-variable 'helm-c-apt-query 'helm-apt-query "1.5.1") +(defvaralias 'helm-c-pdfgrep-default-read-command 'helm-pdfgrep-default-read-command) +(make-obsolete-variable 'helm-c-pdfgrep-default-read-command 'helm-pdfgrep-default-read-command "1.5.1") +(defvaralias 'helm-c-source-bookmark-images 'helm-source-bookmark-images) +(make-obsolete-variable 'helm-c-source-bookmark-images 'helm-source-bookmark-images "1.5.1") +(defvaralias 'helm-c-source-mac-spotlight 'helm-source-mac-spotlight) +(make-obsolete-variable 'helm-c-source-mac-spotlight 'helm-source-mac-spotlight "1.5.1") +(defvaralias 'helm-c-yahoo-suggest-url 'helm-yahoo-suggest-url) +(make-obsolete-variable 'helm-c-yahoo-suggest-url 'helm-yahoo-suggest-url "1.5.1") +(defvaralias 'helm-c-source-oddmuse-headline 'helm-source-oddmuse-headline) +(make-obsolete-variable 'helm-c-source-oddmuse-headline 'helm-source-oddmuse-headline "1.5.1") +(defvaralias 'helm-c-cache-gentoo 'helm-cache-gentoo) +(make-obsolete-variable 'helm-c-cache-gentoo 'helm-cache-gentoo "1.5.1") +(defvaralias 'helm-c-zgrep-recurse-flag 'helm-zgrep-recurse-flag) +(make-obsolete-variable 'helm-c-zgrep-recurse-flag 'helm-zgrep-recurse-flag "1.5.1") +(defvaralias 'helm-c-source-use-flags 'helm-source-use-flags) +(make-obsolete-variable 'helm-c-source-use-flags 'helm-source-use-flags "1.5.1") +(defvaralias 'helm-c-moccur-map 'helm-moccur-map) +(make-obsolete-variable 'helm-c-moccur-map 'helm-moccur-map "1.5.1") +(defvaralias 'helm-c-adaptative-history-file 'helm-adaptive-history-file) +(make-obsolete-variable 'helm-c-adaptative-history-file 'helm-adaptive-history-file "1.5.1") +(defvaralias 'helm-c-grep-default-directory-fn 'helm-grep-default-directory-fn) +(make-obsolete-variable 'helm-c-grep-default-directory-fn 'helm-grep-default-directory-fn "1.5.1") +(defvaralias 'helm-c-apt-input-history 'helm-apt-input-history) +(make-obsolete-variable 'helm-c-apt-input-history 'helm-apt-input-history "1.5.1") +(defvaralias 'helm-c-source-emms-files 'helm-source-emms-files) +(make-obsolete-variable 'helm-c-source-emms-files 'helm-source-emms-files "1.5.1") +(defvaralias 'helm-async-be-async 'dired-async-be-async) +(make-obsolete-variable 'helm-async-be-async 'dired-async-be-async "1.5.9") + + +(provide 'helm-aliases) + +;;; helm-aliases.el ends here diff --git a/elpa/helm-20140808.2300/helm-aliases.elc b/elpa/helm-20140808.2300/helm-aliases.elc new file mode 100644 index 0000000000000000000000000000000000000000..1e23a7c5a5b19ef3d3d4a964949934941314ee13 GIT binary patch literal 48474 zcmdU236mqmvEBoWjl=hWZ;QcPHodIWI=E~D%V7-IV89o%wtHHw88MPt=-A!C*I$2` zS(VvUSy|d~_(i;UFM{V)=J!=s)|FXV)zdG&{?4sOu3WkD@QW|L*t^v(*Yia)?VVio zmeuZM_-|XhTh*_&?fH#GTUU!-yXt*V?Ru~5PkX)Rd;QT1{pVh|IqnT^_J>r&Y|}1# zGbp6@>_^*XvwarIc=krKtm^HJ>9fsZT|Il&ES3clZa#POxf_G>=1nK67V~P`Y;QCR zDrvszy^gfr9VliF&m9bJlsEdMyF1^V^{NF_XT6&*=bu$O0BmnOOv(?>=37^VJrviQ zUaYF+yzWigdb``qSEt)&K)c!Qdew9aw#sw*&)*n4pOi6ep^R0#>(%XQR{?mxn-$N2 zWL3QK!L7I6>eXk}rmA;P$!F;C)oR+?w!OMq^-h}JqOGEbcw@G`rrIp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c-PT(E}Nm)Fm@efQy z&5$aRh$I(^h+Lksg;c`|QY_IEVxeI1x&!^SiU_Qvf}YLq@p}i-*&^|48yxq+O&I)x zLJ)$wQfW;yznK=>osUKtQyQV-zUGGdI! z;qSKv&8L6+@xpN(tOWZF_{GSpMB$x@2w&=l+oi!)H`tp;a%qh?rjI(zQgI82H}ji- z#eB(^x|CN-0shrDf8hl7!QBcLdD>7R^_|UVwWR~mI9lP!m<31~ZY2yiik_P)gp+JY zInKspBJE_Ow!17`?ZJblh_>IMoY($fn8F_^fmZ;+OoBJ)AVzG1KeiRW+T_`ZTo`bx zu0DsWey(#P%Pke~bc%ZenXMhHkJ603kW1pi5%1h1Mj)><;!k+qaV=Z{@xYf0 zLNSQXyx_((j(y(gxm=18O1ruK@Ru~BW-~O_wd-IYB&Q;3zUY?Z>cg4@r*xU-wm>}R zB`EZ(9Uoo$H7pA4Xw8ZwYNU6kAJIS$#4^rR_5;F2S9xjG(?xp%sZQmv{UElL?&?>t zFhjHuuG3NOXWH_W7&$KQL{ba9m=SepClE|{6Otzxozk#H!C#BO{U=OpNV#@@ag2_4 zXit|Y;TiFc7~c>twy-e3mXNRe`1)NI=rSO5nbR>bT@w84P9}IFQ5rV#UVK!MM@Z{P zgy60i#*G=@PvrLUjR+wDnA+~>PnSkKL!(a;BzTOE5JW8Xp^% zpRyh9P=K8~-Yj;SoLuUp?hN?$P*ND}Zlf(zSpSa3yPvn@Xk9gA+@~rP!Qi29jem-? z;JjlLzNBh5#^x({Niz25E;W~k#d6xt(!Mk5a4oL37c1E3!e2YWfAr{3+Wor|((S9~ Yk9x2$- + +;; 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 . + +;;; Code: + +(require 'cl-lib) +(require 'helm) +(require 'helm-utils) +(require 'helm-external) + +(declare-function term-line-mode "term") +(declare-function term-char-mode "term") +(declare-function term-send-input "term") +(declare-function term-send-eof "term") + + +(defgroup helm-apt nil + "Apt related Applications and libraries for Helm." + :group 'helm) + +(defcustom helm-apt-cache-show-function 'helm-apt-cache-show-1 + "Function of one argument used to show apt package. +Default is `helm-apt-cache-show-1' but you can use `apt-utils-show-package-1' +from `apt-utils.el' to have something more enhanced. +If nil default `helm-apt-cache-show-1' will be used." + :type 'function + :group 'helm-apt) + +(defface helm-apt-installed + '((t (:foreground "green"))) + "Face used for apt installed candidates." + :group 'helm-apt) + +(defface helm-apt-deinstalled + '((t (:foreground "DimGray"))) + "Face used for apt deinstalled candidates." + :group 'helm-apt) + + +(defvar helm-apt-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map helm-map) + (define-key map (kbd "C-c ?") 'helm-apt-help) + (define-key map (kbd "M-I") 'helm-apt-show-only-installed) + (define-key map (kbd "M-U") 'helm-apt-show-only-not-installed) + (define-key map (kbd "M-D") 'helm-apt-show-only-deinstalled) + (define-key map (kbd "M-A") 'helm-apt-show-all) + map)) + + +(defvar helm-source-apt + `((name . "APT") + (init . helm-apt-init) + (candidates-in-buffer) + (candidate-transformer . helm-apt-candidate-transformer) + (display-to-real . helm-apt-display-to-real) + (update . helm-apt-refresh) + (keymap . ,helm-apt-map) + (mode-line . helm-apt-mode-line) + (action + ("Show package description" . helm-apt-cache-show) + ("Install package" . helm-apt-install) + ("Reinstall package" . helm-apt-reinstall) + ("Remove package" . helm-apt-uninstall) + ("Purge package" . helm-apt-purge)) + (persistent-action . helm-apt-persistent-action) + (persistent-help . "Show package description"))) + +(defvar helm-apt-search-command "apt-cache search '%s'") +(defvar helm-apt-show-command "apt-cache show '%s'") +(defvar helm-apt-installed-packages nil) +(defvar helm-apt-all-packages nil) +(defvar helm-apt-input-history nil) +(defvar helm-apt-show-only 'all) +(defvar helm-apt-term-buffer nil) + +(defun helm-apt-refresh () + "Refresh installed candidates list." + (setq helm-apt-installed-packages nil) + (setq helm-apt-all-packages nil)) + +(defun helm-apt-persistent-action (candidate) + "Persistent action for APT source." + (helm-apt-cache-show candidate)) + +(defun helm-apt-candidate-transformer (candidates) + "Show installed CANDIDATES and the ones to deinstall in a different color." + (cl-loop for cand in candidates + for name = (helm-apt-display-to-real cand) + for deinstall = (string= + (assoc-default name helm-apt-installed-packages) + "deinstall") + for install = (string= + (assoc-default name helm-apt-installed-packages) + "install") + for show = (cond ((and deinstall + (memq helm-apt-show-only '(all deinstalled))) + (propertize cand 'face 'helm-apt-deinstalled)) + ((and install + (memq helm-apt-show-only '(all installed))) + (propertize cand 'face 'helm-apt-installed)) + ((and (eq helm-apt-show-only 'noinstalled) + (not install)) cand) + ((eq helm-apt-show-only 'all) cand)) + when show collect show)) + +(defun helm-apt-show-only-installed () + (interactive) + (when helm-alive-p + (setq helm-apt-show-only 'installed) + (helm-update))) + +(defun helm-apt-show-only-not-installed () + (interactive) + (when helm-alive-p + (setq helm-apt-show-only 'noinstalled) + (helm-update))) + +(defun helm-apt-show-only-deinstalled () + (interactive) + (when helm-alive-p + (setq helm-apt-show-only 'deinstalled) + (helm-update))) + +(defun helm-apt-show-all () + (interactive) + (when helm-alive-p + (setq helm-apt-show-only 'all) + (helm-update))) + +(defun helm-apt-init () + "Initialize list of debian packages." + (let ((query "")) + (setq helm-apt-show-only 'all) + (unless (and helm-apt-installed-packages + helm-apt-all-packages) + (message "Loading package list...") + (setq helm-apt-installed-packages + (with-temp-buffer + (call-process-shell-command "dpkg --get-selections" + nil (current-buffer)) + (cl-loop for i in (split-string (buffer-string) "\n" t) + for p = (split-string i) + collect (cons (car p) (cadr p))))) + (helm-init-candidates-in-buffer + 'global + (setq helm-apt-all-packages + (with-temp-buffer + (call-process-shell-command + (format helm-apt-search-command query) + nil (current-buffer)) + (buffer-string)))) + (message "Loading package list done") + (sit-for 0.5)))) + +(defun helm-apt-display-to-real (line) + "Return only name of a debian package. +LINE is displayed like: +package name - description." + (car (split-string line " - "))) + +(defvar helm-apt-show-current-package nil) +(define-derived-mode helm-apt-show-mode + special-mode "helm-apt-show" + "Mode to display infos on apt packages.") + +(defun helm-apt-cache-show (package) + "Show information on apt package PACKAGE." + (if (and (functionp helm-apt-cache-show-function) + (not (eq helm-apt-cache-show-function + 'helm-apt-cache-show))) + ;; A function, call it. + (funcall helm-apt-cache-show-function package) + ;; nil or whatever use default. + (helm-apt-cache-show-1 package))) + +(defun helm-apt-cache-show-1 (package) + (let* ((command (format helm-apt-show-command package)) + (buf (get-buffer-create "*helm apt show*"))) + (helm-switch-to-buffer buf) + (unless (string= package helm-apt-show-current-package) + (let ((inhibit-read-only t)) + (erase-buffer) + (save-excursion + (call-process-shell-command + command nil (current-buffer) t)))) + (helm-apt-show-mode) + (set (make-local-variable 'helm-apt-show-current-package) + package))) + +(defun helm-apt-install (_package) + "Run 'apt-get install' shell command on PACKAGE." + (helm-apt-generic-action :action 'install)) + +(defun helm-apt-reinstall (_package) + "Run 'apt-get install --reinstall' shell command on PACKAGE." + (helm-apt-generic-action :action 'reinstall)) + +(defun helm-apt-uninstall (_package) + "Run 'apt-get remove' shell command on PACKAGE." + (helm-apt-generic-action :action 'uninstall)) + +(defun helm-apt-purge (_package) + "Run 'apt-get purge' shell command on PACKAGE." + (helm-apt-generic-action :action 'purge)) + +(cl-defun helm-apt-generic-action (&key action) + "Run 'apt-get ACTION'. +Support install, remove and purge actions." + (if (and helm-apt-term-buffer + (buffer-live-p (get-buffer helm-apt-term-buffer))) + (switch-to-buffer helm-apt-term-buffer) + (ansi-term (getenv "SHELL") "term apt") + (setq helm-apt-term-buffer (buffer-name))) + (term-line-mode) + (let ((command (cl-case action + (install "sudo apt-get install ") + (reinstall "sudo apt-get install --reinstall ") + (uninstall "sudo apt-get remove ") + (purge "sudo apt-get purge ") + (t (error "Unknown action")))) + (beg (point)) + end + (cand-list (mapconcat #'(lambda (x) (format "'%s'" x)) + (helm-marked-candidates) " "))) + (goto-char (point-max)) + (insert (concat command cand-list)) + (setq end (point)) + (if (y-or-n-p (format "%s package(s)" (symbol-name action))) + (progn + (setq helm-external-commands-list nil) + (setq helm-apt-installed-packages nil) + (term-char-mode) (term-send-input)) + (delete-region beg end)))) + +;;;###autoload +(defun helm-apt (arg) + "Preconfigured `helm' : frontend of APT package manager. +With a prefix arg reload cache." + (interactive "P") + (let ((query (read-string "Search Package: " nil 'helm-apt-input-history))) + (when arg (helm-apt-refresh)) + (helm :sources 'helm-source-apt + :prompt "Search Package: " + :input query + :buffer "*helm apt*" + :history 'helm-apt-input-history))) + + +(provide 'helm-apt) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions obsolete) +;; coding: utf-8 +;; indent-tabs-mode: nil +;; End: + +;;; helm-apt.el ends here diff --git a/elpa/helm-20140808.2300/helm-apt.elc b/elpa/helm-20140808.2300/helm-apt.elc new file mode 100644 index 0000000000000000000000000000000000000000..255e31d94f06e23e9e30a93153c3331136bed62c GIT binary patch literal 10948 zcmc&)`*YjI5!NG76lIc0@?0|M0yMw4?ZM%nuwO&L=(r=SkAN^(=!HvqlAhC z7yy*bwE5rr?cU)jU{dV^|Jb3)%==W=DYda4fJP=3mbQVrzAVv!@ z^|C{JQuBMye;CIXtx4>A6A?$^)XT(RekR0$useNwzi->ZvFtXB7$@;mj3Gqa{~?u0 zdLJ_Gx8&6G(^ha_PG;Wyb2*us)WO=f_FIl?S*pmJWi2^jDPbfYQx|aw5h2EO+AX(b zbKUDOI~U#rQ<-JqH2lfS&>(H?aOLy!Fjd3PQ<;ij5qZWTB0yq8J+1Y7~7MV2tIFP~^;%xA-Zx0=t ze$dCMKDgC~cK*;ovo1cpp-bIto4VamGHeG0Epx7m56F9wt)w6LS)d1gRZ=ne!~1r0S=9gTsrU z*Zw@s;;9)(f8r(5JWJyFOf`X8iYS~2V}KutoOl@&XE2*hLSLz#pi{>PiI;@XmvNkk zZ!uQO5PcF@~FF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f909 --- /dev/null +++ b/elpa/helm-20140808.2300/helm-autoloads.el @@ -0,0 +1,1379 @@ +;;; helm-autoloads.el --- automatically extracted autoloads +;; +;;; Code: + + +;;;### (autoloads (helm-other-buffer helm helm-debug-open-last-log +;;;;;; helm-define-key-with-subkeys helm-multi-key-defun helm-define-multi-key) +;;;;;; "helm" "helm.el" (21478 8076 0 0)) +;;; Generated autoloads from helm.el + +(autoload 'helm-define-multi-key "helm" "\ +In KEYMAP, define key sequence KEY for function list FUNCTIONS. +Each function run sequentialy each time the key KEY is pressed. +If DELAY is specified switch back to initial function of FUNCTIONS list +after DELAY seconds. +The functions in FUNCTIONS list are functions with no args. +e.g + (defun foo () + (message \"Run foo\")) + (defun bar () + (message \"Run bar\")) + (defun baz () + (message \"Run baz\")) + +\(helm-define-multi-key global-map \" q\" '(foo bar baz) 2) + +Each time \" q\" is pressed the next function is executed, if you wait +More than 2 seconds, next hit will run again the first function and so on. + +\(fn KEYMAP KEY FUNCTIONS &optional DELAY)" nil nil) + +(autoload 'helm-multi-key-defun "helm" "\ +Define NAME as a multi-key command running FUNS. +After DELAY seconds the FUNS list is reinitialised. +See `helm-define-multi-key'. + +\(fn NAME DOCSTRING FUNS &optional DELAY)" nil t) + +(put 'helm-multi-key-defun 'lisp-indent-function '2) + +(autoload 'helm-define-key-with-subkeys "helm" "\ +Allow defining a KEY without having to type its prefix again on next calls. +Arg MAP is the keymap to use, SUBKEY is the initial long keybinding to +call COMMAND. +Arg OTHER-SUBKEYS is an unquoted alist specifying other short keybindings +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))) + + +In this example, `C-x v n' will run `git-gutter:next-hunk' subsequent hit on \"n\" +will run this command again and subsequent hit on \"p\" will run `git-gutter:previous-hunk'. + +Arg MENU is a string to display in minibuffer to describe SUBKEY and OTHER-SUBKEYS. +Arg EXIT-FN specify a function to run on exit. + +Any other keys pressed run their assigned command defined in MAP and exit the loop. + +\(fn MAP KEY SUBKEY COMMAND &optional OTHER-SUBKEYS MENU EXIT-FN)" nil t) + +(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' . + +\(fn)" t nil) + +(autoload 'helm "helm" "\ +Main function to execute helm sources. + +Keywords supported: +:sources :input :prompt :resume :preselect +:buffer :keymap :default :history :allow-nest + +Extra LOCAL-VARS keywords are supported, see below. + +PLIST is a list like (:key1 val1 :key2 val2 ...) or +\(&optional sources input prompt resume + preselect buffer keymap default history). + +Basic keywords are the following: + +:sources + +A list of sources used for this session. It also accepts a +symbol, interpreted as a variable of a helm source +i.e (a symbol can be passed instead of a list of sources). +It also accepts an alist representing a helm source, which is +detected by (assq 'name ANY-SOURCES). +NOTE: In this case the source is embedded in the helm command and +have no symbol name, so it is not reachable from outside. +It will be referenced in `helm-sources' as a whole alist. + +:input + +Temporary value of `helm-pattern', ie. initial input of minibuffer. + +:prompt + +Prompt other than \"pattern: \". + +:resume + +If t, Resurrect previously instance of `helm'. Skip the initialization. +If 'noresume, this instance of `helm' cannot be resumed. + +:preselect + +Initially selected candidate. Specified by exact candidate or a regexp. + +:buffer + +`helm-buffer' instead of *helm*. + +:keymap + +`helm-map' for current `helm' session. + +:default + +A default argument that will be inserted in minibuffer with \\\\[next-history-element]. +When nil or not present `thing-at-point' will be used instead. +If `helm-maybe-use-default-as-input' is non--nil display will be +updated using :default arg as input unless :input is specified, +which in this case will take precedence on :default +This is a string or a list, in this case the car of the list will +be used as initial default input, but you will be able to cycle in this +list with \\\\[next-history-element]. + +:history + +By default all minibuffer input is pushed to `minibuffer-history', +if an argument HISTORY is provided, input will be pushed to HISTORY. +History element should be a symbol. + +:allow-nest + +Allow running this helm command within a running helm session. + +Of course, conventional arguments are supported, the two are same. + +\(helm :sources sources :input input :prompt prompt :resume resume + :preselect preselect :buffer buffer :keymap keymap :default default + :history history) + +and + +\(helm sources input prompt resume preselect buffer keymap default history) + +are the same. + +However the use of non keyword args is deprecated and should not be used. + +Other keywords are interpreted as local variables of this helm session. +The `helm-' prefix can be omitted. For example, + +\(helm :sources 'helm-source-buffers-list + :buffer \"*buffers*\" :candidate-number-limit 10) + +means starting helm session with `helm-source-buffers' +source in *buffers* buffer and set variable `helm-candidate-number-limit' +to 10 as session local variable. + +\(fn &key SOURCES INPUT PROMPT RESUME PRESELECT BUFFER KEYMAP DEFAULT HISTORY ALLOW-NEST OTHER-LOCAL-VARS)" nil nil) + +(autoload 'helm-other-buffer "helm" "\ +Simplified interface of `helm' with other `helm-buffer'. +Call `helm' with only ANY-SOURCES and ANY-BUFFER as args. + +\(fn ANY-SOURCES ANY-BUFFER)" nil nil) + +;;;*** + +;;;### (autoloads (helm-reset-adaptive-history) "helm-adaptive" "helm-adaptive.el" +;;;;;; (21478 8075 0 0)) +;;; Generated autoloads from helm-adaptive.el + +(autoload 'helm-reset-adaptive-history "helm-adaptive" "\ +Delete all `helm-adaptive-history' and his file. +Useful when you have a old or corrupted `helm-adaptive-history-file'. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (helm-apt) "helm-apt" "helm-apt.el" (21478 8075 +;;;;;; 0 0)) +;;; Generated autoloads from helm-apt.el + +(autoload 'helm-apt "helm-apt" "\ +Preconfigured `helm' : frontend of APT package manager. +With a prefix arg reload cache. + +\(fn ARG)" t nil) + +;;;*** + +;;;### (autoloads (helm-bbdb) "helm-bbdb" "helm-bbdb.el" (21478 8075 +;;;;;; 0 0)) +;;; Generated autoloads from helm-bbdb.el + +(autoload 'helm-bbdb "helm-bbdb" "\ +Preconfigured `helm' for BBDB. + +Needs BBDB. + +http://bbdb.sourceforge.net/ + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (helm-filtered-bookmarks helm-pp-bookmarks helm-bookmarks) +;;;;;; "helm-bookmark" "helm-bookmark.el" (21478 8075 0 0)) +;;; Generated autoloads from helm-bookmark.el + +(autoload 'helm-bookmarks "helm-bookmark" "\ +Preconfigured `helm' for bookmarks. + +\(fn)" t nil) + +(autoload 'helm-pp-bookmarks "helm-bookmark" "\ +Preconfigured `helm' for bookmarks (pretty-printed). + +\(fn)" t nil) + +(autoload 'helm-filtered-bookmarks "helm-bookmark" "\ +Preconfigured helm for bookmarks (filtered by category). +Optional source `helm-source-bookmark-addressbook' is loaded +only if external library addressbook-bookmark.el is available. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (helm-buffers-list) "helm-buffers" "helm-buffers.el" +;;;;;; (21478 8076 0 0)) +;;; Generated autoloads from helm-buffers.el + +(autoload 'helm-buffers-list "helm-buffers" "\ +Preconfigured `helm' to list buffers. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (helm-simple-call-tree) "helm-call-tree" "helm-call-tree.el" +;;;;;; (21478 8076 0 0)) +;;; Generated autoloads from helm-call-tree.el + +(autoload 'helm-simple-call-tree "helm-call-tree" "\ +Preconfigured `helm' for simple-call-tree. List function relationships. + +Needs simple-call-tree.el. +http://www.emacswiki.org/cgi-bin/wiki/download/simple-call-tree.el + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (helm-colors) "helm-color" "helm-color.el" (21478 +;;;;;; 8076 0 0)) +;;; Generated autoloads from helm-color.el + +(autoload 'helm-colors "helm-color" "\ +Preconfigured `helm' for color. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (helm-M-x) "helm-command" "helm-command.el" (21478 +;;;;;; 8075 0 0)) +;;; Generated autoloads from helm-command.el + +(autoload 'helm-M-x "helm-command" "\ +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'. + +You can get help on each command by persistent action. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (helm-configuration) "helm-config" "helm-config.el" +;;;;;; (21478 8075 0 0)) +;;; Generated autoloads from helm-config.el + +(autoload 'helm-configuration "helm-config" "\ +Customize `helm'. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (helm-dabbrev) "helm-dabbrev" "helm-dabbrev.el" +;;;;;; (21478 8076 0 0)) +;;; Generated autoloads from helm-dabbrev.el + +(autoload 'helm-dabbrev "helm-dabbrev" "\ + + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (helm-complex-command-history helm-timers helm-locate-library +;;;;;; helm-manage-advice helm-apropos helm-lisp-completion-or-file-name-at-point +;;;;;; helm-lisp-indent helm-complete-file-name-at-point helm-lisp-completion-at-point) +;;;;;; "helm-elisp" "helm-elisp.el" (21478 8075 0 0)) +;;; Generated autoloads from helm-elisp.el + +(autoload 'helm-lisp-completion-at-point "helm-elisp" "\ +Helm lisp symbol completion at point. + +\(fn)" t nil) + +(autoload 'helm-complete-file-name-at-point "helm-elisp" "\ +Complete file name at point. + +\(fn &optional FORCE)" t nil) + +(autoload 'helm-lisp-indent "helm-elisp" "\ + + +\(fn)" t nil) + +(autoload 'helm-lisp-completion-or-file-name-at-point "helm-elisp" "\ +Complete lisp symbol or filename at point. +Filename completion happen if string start after or between a double quote. + +\(fn)" t nil) + +(autoload 'helm-apropos "helm-elisp" "\ +Preconfigured helm to describe commands, functions, variables and faces. + +\(fn)" t nil) + +(autoload 'helm-manage-advice "helm-elisp" "\ +Preconfigured `helm' to disable/enable function advices. + +\(fn)" t nil) + +(autoload 'helm-locate-library "helm-elisp" "\ + + +\(fn)" t nil) + +(autoload 'helm-timers "helm-elisp" "\ +Preconfigured `helm' for timers. + +\(fn)" t nil) + +(autoload 'helm-complex-command-history "helm-elisp" "\ + + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (helm-list-elisp-packages) "helm-elisp-package" +;;;;;; "helm-elisp-package.el" (21478 8075 0 0)) +;;; Generated autoloads from helm-elisp-package.el + +(autoload 'helm-list-elisp-packages "helm-elisp-package" "\ + + +\(fn ARG)" t nil) + +;;;*** + +;;;### (autoloads (helm-elscreen) "helm-elscreen" "helm-elscreen.el" +;;;;;; (21478 8075 0 0)) +;;; Generated autoloads from helm-elscreen.el + +(autoload 'helm-elscreen "helm-elscreen" "\ +Preconfigured helm to list elscreen. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (helm-emms) "helm-emms" "helm-emms.el" (21478 8075 +;;;;;; 0 0)) +;;; Generated autoloads from helm-emms.el + +(autoload 'helm-emms "helm-emms" "\ +Preconfigured `helm' for emms sources. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (helm-eshell-history helm-esh-pcomplete) "helm-eshell" +;;;;;; "helm-eshell.el" (21478 8076 0 0)) +;;; Generated autoloads from helm-eshell.el + +(autoload 'helm-esh-pcomplete "helm-eshell" "\ +Preconfigured helm to provide helm completion in eshell. + +\(fn)" t nil) + +(autoload 'helm-eshell-history "helm-eshell" "\ +Preconfigured helm for eshell history. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (helm-calcul-expression helm-eval-expression-with-eldoc +;;;;;; helm-eval-expression) "helm-eval" "helm-eval.el" (21478 8075 +;;;;;; 0 0)) +;;; Generated autoloads from helm-eval.el + +(autoload 'helm-eval-expression "helm-eval" "\ +Preconfigured helm for `helm-source-evaluation-result'. + +\(fn ARG)" t nil) + +(autoload 'helm-eval-expression-with-eldoc "helm-eval" "\ +Preconfigured helm for `helm-source-evaluation-result' with `eldoc' support. + +\(fn)" t nil) + +(autoload 'helm-calcul-expression "helm-eval" "\ +Preconfigured helm for `helm-source-calculation-result'. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (helm-run-external-command) "helm-external" "helm-external.el" +;;;;;; (21478 8076 0 0)) +;;; Generated autoloads from helm-external.el + +(autoload 'helm-run-external-command "helm-external" "\ +Preconfigured `helm' to run External PROGRAM asyncronously from Emacs. +If program is already running exit with error. +You can set your own list of commands with +`helm-external-commands-list'. + +\(fn PROGRAM)" t nil) + +;;;*** + +;;;### (autoloads (helm-recentf helm-for-files helm-find-files helm-find +;;;;;; helm-browse-project) "helm-files" "helm-files.el" (21478 +;;;;;; 8075 0 0)) +;;; Generated autoloads from helm-files.el + +(autoload 'helm-browse-project "helm-files" "\ +Browse files and see status of project with its vcs. +Only hg and git are supported for now. +Fall back to `helm-find-files' if directory is not under +control of one of those vcs. +Need dependencies: + +and +. + +\(fn)" t nil) + +(autoload 'helm-find "helm-files" "\ +Preconfigured `helm' for the find shell command. + +\(fn ARG)" t nil) + +(autoload 'helm-find-files "helm-files" "\ +Preconfigured `helm' for helm implementation of `find-file'. +Called with a prefix arg show history if some. +Don't call it from programs, use `helm-find-files-1' instead. +This is the starting point for nearly all actions you can do on files. + +\(fn ARG)" t nil) + +(autoload 'helm-for-files "helm-files" "\ +Preconfigured `helm' for opening files. +Run all sources defined in `helm-for-files-preferred-list'. + +\(fn)" t nil) + +(autoload 'helm-recentf "helm-files" "\ +Preconfigured `helm' for `recentf'. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (helm-firefox-bookmarks) "helm-firefox" "helm-firefox.el" +;;;;;; (21478 8076 0 0)) +;;; Generated autoloads from helm-firefox.el + +(autoload 'helm-firefox-bookmarks "helm-firefox" "\ +Preconfigured `helm' for firefox bookmark. +You will have to enable html bookmarks in firefox: +open about:config in firefox and double click on this line to enable value to true: + +user_pref(\"browser.bookmarks.autoExportHTML\", false); + +You should have now: + +user_pref(\"browser.bookmarks.autoExportHTML\", true); + +After closing firefox, you will be able to browse you bookmarks. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (helm-ucs helm-select-xfont) "helm-font" "helm-font.el" +;;;;;; (21478 8075 0 0)) +;;; Generated autoloads from helm-font.el + +(autoload 'helm-select-xfont "helm-font" "\ +Preconfigured `helm' to select Xfont. + +\(fn)" t nil) + +(autoload 'helm-ucs "helm-font" "\ +Preconfigured helm for `ucs-names' math symbols. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (helm-gentoo) "helm-gentoo" "helm-gentoo.el" (21478 +;;;;;; 8076 0 0)) +;;; Generated autoloads from helm-gentoo.el + +(autoload 'helm-gentoo "helm-gentoo" "\ +Preconfigured `helm' for gentoo linux. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (helm-do-pdfgrep helm-do-zgrep helm-do-grep helm-grep-mode-jump-other-window +;;;;;; helm-grep-mode-jump-other-window-backward helm-grep-mode-jump-other-window-forward +;;;;;; helm-grep-mode-jump helm-gm-precedent-file helm-gm-next-file +;;;;;; helm-grep-mode helm-grep-run-save-buffer helm-goto-next-file +;;;;;; helm-goto-precedent-file) "helm-grep" "helm-grep.el" (21478 +;;;;;; 8075 0 0)) +;;; Generated autoloads from helm-grep.el + +(autoload 'helm-goto-precedent-file "helm-grep" "\ +Go to precedent file in helm grep/etags buffers. + +\(fn)" t nil) + +(autoload 'helm-goto-next-file "helm-grep" "\ +Go to precedent file in helm grep/etags buffers. + +\(fn)" t nil) + +(autoload 'helm-grep-run-save-buffer "helm-grep" "\ +Run grep save results action from `helm-do-grep-1'. + +\(fn)" t nil) + +(autoload 'helm-grep-mode "helm-grep" "\ +Major mode to provide actions in helm grep saved buffer. + +Special commands: +\\{helm-grep-mode-map} + +\(fn)" t nil) + +(autoload 'helm-gm-next-file "helm-grep" "\ + + +\(fn)" t nil) + +(autoload 'helm-gm-precedent-file "helm-grep" "\ + + +\(fn)" t nil) + +(autoload 'helm-grep-mode-jump "helm-grep" "\ + + +\(fn)" t nil) + +(autoload 'helm-grep-mode-jump-other-window-forward "helm-grep" "\ + + +\(fn)" t nil) + +(autoload 'helm-grep-mode-jump-other-window-backward "helm-grep" "\ + + +\(fn)" t nil) + +(autoload 'helm-grep-mode-jump-other-window "helm-grep" "\ + + +\(fn)" t nil) + +(autoload 'helm-do-grep "helm-grep" "\ +Preconfigured helm for grep. +Contrarily to Emacs `grep', no default directory is given, but +the full path of candidates in ONLY. +That allow to grep different files not only in `default-directory' but anywhere +by marking them (C-). If one or more directory is selected +grep will search in all files of these directories. +You can also use wildcard in the base name of candidate. +If a prefix arg is given use the -r option of grep (recurse). +The prefix arg can be passed before or after start file selection. +See also `helm-do-grep-1'. + +\(fn)" t nil) + +(autoload 'helm-do-zgrep "helm-grep" "\ +Preconfigured helm for zgrep. + +\(fn)" t nil) + +(autoload 'helm-do-pdfgrep "helm-grep" "\ +Preconfigured helm for pdfgrep. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (helm-describe-helm-attribute helm-semantic-help +;;;;;; helm-color-help helm-imenu-help helm-M-x-help helm-el-package-help +;;;;;; helm-apt-help helm-top-help helm-moccur-help helm-buffers-ido-virtual-help +;;;;;; helm-esh-help helm-bookmark-help helm-ucs-help helm-etags-help +;;;;;; helm-pdfgrep-help helm-grep-help helm-generic-file-help helm-read-file-name-help +;;;;;; helm-ff-help helm-buffer-help helm-help) "helm-help" "helm-help.el" +;;;;;; (21478 8075 0 0)) +;;; Generated autoloads from helm-help.el + +(autoload 'helm-help "helm-help" "\ +Help of `helm'. + +\(fn)" t nil) + +(autoload 'helm-buffer-help "helm-help" "\ +Help command for helm buffers. + +\(fn)" t nil) + +(autoload 'helm-ff-help "helm-help" "\ +Help command for `helm-find-files'. + +\(fn)" t nil) + +(autoload 'helm-read-file-name-help "helm-help" "\ + + +\(fn)" t nil) + +(autoload 'helm-generic-file-help "helm-help" "\ + + +\(fn)" t nil) + +(autoload 'helm-grep-help "helm-help" "\ + + +\(fn)" t nil) + +(autoload 'helm-pdfgrep-help "helm-help" "\ + + +\(fn)" t nil) + +(autoload 'helm-etags-help "helm-help" "\ +The help function for etags. + +\(fn)" t nil) + +(autoload 'helm-ucs-help "helm-help" "\ +Help command for `helm-ucs'. + +\(fn)" t nil) + +(autoload 'helm-bookmark-help "helm-help" "\ +Help command for bookmarks. + +\(fn)" t nil) + +(autoload 'helm-esh-help "helm-help" "\ +Help command for `helm-find-files-eshell-command-on-file'. + +\(fn)" t nil) + +(autoload 'helm-buffers-ido-virtual-help "helm-help" "\ +Help command for ido virtual buffers. + +\(fn)" t nil) + +(autoload 'helm-moccur-help "helm-help" "\ + + +\(fn)" t nil) + +(autoload 'helm-top-help "helm-help" "\ + + +\(fn)" t nil) + +(autoload 'helm-apt-help "helm-help" "\ + + +\(fn)" t nil) + +(autoload 'helm-el-package-help "helm-help" "\ + + +\(fn)" t nil) + +(autoload 'helm-M-x-help "helm-help" "\ + + +\(fn)" t nil) + +(autoload 'helm-imenu-help "helm-help" "\ + + +\(fn)" t nil) + +(autoload 'helm-color-help "helm-help" "\ + + +\(fn)" t nil) + +(autoload 'helm-semantic-help "helm-help" "\ + + +\(fn)" t nil) + +(defvar helm-buffer-mode-line-string '("Buffer(s)" "\\\\[helm-buffer-help]:Help \\\\[helm-select-action]:Act \\[helm-maybe-exit-minibuffer]/f1/f2/f-n:NthAct" "String displayed in mode-line in `helm-source-buffers-list'")) + +(defvar helm-color-mode-line-string '("Colors" "\\\\[helm-color-help]:Help/\\[helm-color-run-insert-name]:Insert name/\\[helm-color-run-insert-rgb]:Insert RGB/with shift: Kill")) + +(defvar helm-buffers-ido-virtual-mode-line-string '("Killed Buffer(s)" "\\\\[helm-buffers-ido-virtual-help]:Help \\\\[helm-select-action]:Act \\[helm-maybe-exit-minibuffer]/f1/f2/f-n:NthAct" "String displayed in mode-line in `helm-source-buffers-list'")) + +(defvar helm-ff-mode-line-string "\\\\[helm-ff-help]:Help \\\\[helm-select-action]:Act \\[helm-maybe-exit-minibuffer]/f1/f2/f-n:NthAct" "\ +String displayed in mode-line in `helm-source-find-files'") + +(defvar helm-read-file-name-mode-line-string "\\\\[helm-read-file-name-help]:Help \\[helm-cr-empty-string]:Empty \\\\[helm-select-action]:Act \\[helm-maybe-exit-minibuffer]/f1/f2/f-n:NthAct" "\ +String displayed in mode-line in `helm-source-find-files'.") + +(defvar helm-generic-file-mode-line-string "\\\\[helm-generic-file-help]:Help \\\\[helm-select-action]:Act \\[helm-maybe-exit-minibuffer]/f1/f2/f-n:NthAct \\[helm-toggle-suspend-update]:Tog.suspend" "\ +String displayed in mode-line in Locate.") + +(defvar helm-grep-mode-line-string "\\\\[helm-grep-help]:Help \\\\[helm-select-action]:Act \\[helm-maybe-exit-minibuffer]/f1/f2/f-n:NthAct \\[helm-toggle-suspend-update]:Tog.suspend" "\ +String displayed in mode-line in `helm-do-grep'.") + +(defvar helm-pdfgrep-mode-line-string "\\\\[helm-pdfgrep-help]:Help \\\\[helm-select-action]:Act \\[helm-maybe-exit-minibuffer]/f1/f2/f-n:NthAct \\[helm-toggle-suspend-update]:Tog.suspend" "\ +String displayed in mode-line in `helm-do-pdfgrep'.") + +(defvar helm-etags-mode-line-string "\\\\[helm-etags-help]:Help \\\\[helm-select-action]:Act \\[helm-maybe-exit-minibuffer]/f1/f2/f-n:NthAct" "\ +String displayed in mode-line in `helm-etags-select'.") + +(defvar helm-ucs-mode-line-string "\\\\[helm-ucs-help]:Help \\\\[helm-select-action]:Act \\[helm-maybe-exit-minibuffer]/f1/f2/f-n:NthAct" "\ +String displayed in mode-line in `helm-ucs'.") + +(defvar helm-bookmark-mode-line-string '("Bookmark(s)" "\\\\[helm-bookmark-help]:Help \\\\[helm-select-action]:Act \\[helm-maybe-exit-minibuffer]/f1/f2/f-n:NthAct") "\ +String displayed in mode-line in `helm-source-buffers-list'") + +(defvar helm-occur-mode-line "\\\\[helm-help]:Help \\\\[helm-occur-run-query-replace-regexp]:Query replace regexp \\\\[helm-select-action]:Act \\[helm-maybe-exit-minibuffer]/f1/f2/f-n:NthAct \\[helm-toggle-suspend-update]:Tog.suspend") + +(defvar helm-moccur-mode-line "\\\\[helm-moccur-help]:Help \\\\[helm-select-action]:Act \\[helm-maybe-exit-minibuffer]/f1/f2/f-n:NthAct \\[helm-toggle-suspend-update]:Tog.suspend") + +(defvar helm-comp-read-mode-line "\\\\[helm-cr-empty-string]:Empty \\\\[helm-help]:Help \\[helm-select-action]:Act \\[helm-maybe-exit-minibuffer]/f1/f2/f-n:NthAct") + +(defvar helm-top-mode-line "\\\\[helm-top-help]:Help \\\\[helm-select-action]:Act \\[helm-maybe-exit-minibuffer]/f1/f2/f-n:NthAct \\[helm-toggle-suspend-update]:Tog.suspend") + +(defvar helm-apt-mode-line "\\\\[helm-apt-help]:Help \\\\[helm-select-action]:Act \\[helm-maybe-exit-minibuffer]/f1/f2/f-n:NthAct \\[helm-toggle-suspend-update]:Tog.suspend") + +(defvar helm-el-package-mode-line "\\\\[helm-el-package-help]:Help \\\\[helm-select-action]:Act \\[helm-maybe-exit-minibuffer]/f1/f2/f-n:NthAct \\[helm-toggle-suspend-update]:Tog.suspend") + +(defvar helm-M-x-mode-line "\\\\[helm-M-x-help]:Help \\\\[helm-select-action]:Act \\[helm-maybe-exit-minibuffer]/f1/f2/f-n:NthAct \\[helm-toggle-suspend-update]:Tog.suspend") + +(defvar helm-imenu-mode-line "\\\\[helm-imenu-help]:Help \\\\[helm-select-action]:Act \\[helm-maybe-exit-minibuffer]/f1/f2/f-n:NthAct \\[helm-toggle-suspend-update]:Tog.suspend") + +(defvar helm-semantic-mode-line "\\\\[helm-semantic-help]:Help \\\\[helm-select-action]:Act \\[helm-maybe-exit-minibuffer]/f1/f2/f-n:NthAct \\[helm-toggle-suspend-update]:Tog.suspend") + +(autoload 'helm-describe-helm-attribute "helm-help" "\ +Display the full documentation of HELM-ATTRIBUTE. +HELM-ATTRIBUTE should be a symbol. + +\(fn HELM-ATTRIBUTE)" t nil) + +;;;*** + +;;;### (autoloads (helm-imenu) "helm-imenu" "helm-imenu.el" (21478 +;;;;;; 8075 0 0)) +;;; Generated autoloads from helm-imenu.el + +(autoload 'helm-imenu "helm-imenu" "\ +Preconfigured `helm' for `imenu'. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (helm-info-at-point) "helm-info" "helm-info.el" +;;;;;; (21478 8075 0 0)) +;;; Generated autoloads from helm-info.el + +(autoload 'helm-info-at-point "helm-info" "\ +Preconfigured `helm' for searching info at point. +With a prefix-arg insert symbol at point. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (helm-locate helm-locate-read-file-name) "helm-locate" +;;;;;; "helm-locate.el" (21478 8075 0 0)) +;;; Generated autoloads from helm-locate.el + +(autoload 'helm-locate-read-file-name "helm-locate" "\ + + +\(fn PROMPT)" nil nil) + +(autoload 'helm-locate "helm-locate" "\ +Preconfigured `helm' for Locate. +Note: you can add locate options after entering pattern. +See 'man locate' for valid options and also `helm-locate-command'. + +You can specify a local database with prefix argument ARG. +With two prefix arg, refresh the current local db or create it +if it doesn't exists. +Many databases can be used: navigate and mark them. +See also `helm-locate-with-db'. + +To create a user specific db, use +\"updatedb -l 0 -o db_path -U directory\". +Where db_path is a filename matched by +`helm-locate-db-file-regexp'. + +\(fn ARG)" t nil) + +;;;*** + +;;;### (autoloads (helm-man-woman) "helm-man" "helm-man.el" (21478 +;;;;;; 8076 0 0)) +;;; Generated autoloads from helm-man.el + +(autoload 'helm-man-woman "helm-man" "\ +Preconfigured `helm' for Man and Woman pages. +With a prefix arg reinitialize the cache. + +\(fn ARG)" t nil) + +;;;*** + +;;;### (autoloads (helm-match-plugin-mode) "helm-match-plugin" "helm-match-plugin.el" +;;;;;; (21478 8076 0 0)) +;;; Generated autoloads from helm-match-plugin.el + +(defvar helm-match-plugin-mode nil "\ +Non-nil if Helm-Match-Plugin mode is enabled. +See the command `helm-match-plugin-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-match-plugin-mode'.") + +(custom-autoload 'helm-match-plugin-mode "helm-match-plugin" nil) + +(autoload 'helm-match-plugin-mode "helm-match-plugin" "\ +Add more flexible regexp matching for helm. +See `helm-mp-matching-method' for the behavior of each method. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (helm-comint-input-ring helm-minibuffer-history +;;;;;; helm-mini helm-stumpwm-commands helm-ratpoison-commands helm-eev-anchors +;;;;;; helm-insert-latex-math helm-world-time helm-browse-menubar) +;;;;;; "helm-misc" "helm-misc.el" (21478 8076 0 0)) +;;; Generated autoloads from helm-misc.el + +(autoload 'helm-browse-menubar "helm-misc" "\ +Helm interface to the menubar using lacarte.el. + +\(fn)" t nil) + +(autoload 'helm-world-time "helm-misc" "\ +Preconfigured `helm' to show world time. + +\(fn)" t nil) + +(autoload 'helm-insert-latex-math "helm-misc" "\ +Preconfigured helm for latex math symbols completion. + +\(fn)" t nil) + +(autoload 'helm-eev-anchors "helm-misc" "\ +Preconfigured `helm' for eev anchors. + +\(fn)" t nil) + +(autoload 'helm-ratpoison-commands "helm-misc" "\ +Preconfigured `helm' to execute ratpoison commands. + +\(fn)" t nil) + +(autoload 'helm-stumpwm-commands "helm-misc" "\ + + +\(fn)" t nil) + +(autoload 'helm-mini "helm-misc" "\ +Preconfigured `helm' lightweight version (buffer -> recentf). + +\(fn)" t nil) + +(autoload 'helm-minibuffer-history "helm-misc" "\ +Preconfigured `helm' for `minibuffer-history'. + +\(fn)" t nil) + +(autoload 'helm-comint-input-ring "helm-misc" "\ +Predefined `helm' that provide completion of `comint' history. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (helm-mode helm-comp-read) "helm-mode" "helm-mode.el" +;;;;;; (21478 8076 0 0)) +;;; Generated autoloads from helm-mode.el + +(autoload 'helm-comp-read "helm-mode" "\ +Read a string in the minibuffer, with helm completion. + +It is helm `completing-read' equivalent. + +- PROMPT is the prompt name to use. + +- COLLECTION can be a list, vector, obarray or hash-table. + It can be also a function that receives three arguments: + the values string, predicate and t. See `all-completions' for more details. + +Keys description: + +- TEST: A predicate called with one arg i.e candidate. + +- INITIAL-INPUT: Same as input arg in `helm'. + +- PRESELECT: See preselect arg of `helm'. + +- DEFAULT: This option is used only for compatibility with regular + Emacs `completing-read' (Same as DEFAULT arg of `completing-read'). + +- BUFFER: Name of helm-buffer. + +- MUST-MATCH: Candidate selected must be one of COLLECTION. + +- REVERSE-HISTORY: When non--nil display history source after current + source completion. + +- REQUIRES-PATTERN: Same as helm attribute, default is 0. + +- HISTORY: A list containing specific history, default is nil. + When it is non--nil, all elements of HISTORY are displayed in + a special source before COLLECTION. + +- INPUT-HISTORY: A symbol. the minibuffer input history will be + stored there, if nil or not provided, `minibuffer-history' + will be used instead. + +- CASE-FOLD: Same as `helm-case-fold-search'. + +- DEL-INPUT: Boolean, when non--nil (default) remove the partial + minibuffer input from HISTORY is present. + +- PERSISTENT-ACTION: A function called with one arg i.e candidate. + +- PERSISTENT-HELP: A string to document PERSISTENT-ACTION. + +- MODE-LINE: A string or list to display in mode line. + Default is `helm-comp-read-mode-line'. + +- KEYMAP: A keymap to use in this `helm-comp-read'. + (the keymap will be shared with history source) + +- NAME: The name related to this local source. + +- EXEC-WHEN-ONLY-ONE: Bound `helm-execute-action-at-once-if-one' + to non--nil. (possibles values are t or nil). + +- VOLATILE: Use volatile attribute (enabled by default). + +- SORT: A predicate to give to `sort' e.g `string-lessp'. + +- FC-TRANSFORMER: A `filtered-candidate-transformer' function. + +- MARKED-CANDIDATES: If non--nil return candidate or marked candidates as a list. + +- NOMARK: When non--nil don't allow marking candidates. + +- ALISTP: (default is non--nil) See `helm-comp-read-get-candidates'. + +- CANDIDATES-IN-BUFFER: when non--nil use a source build with + `helm-candidates-in-buffer' which is much faster. + Argument VOLATILE have no effect when CANDIDATES-IN-BUFFER is non--nil. + +Any prefix args passed during `helm-comp-read' invocation will be recorded +in `helm-current-prefix-arg', otherwise if prefix args were given before +`helm-comp-read' invocation, the value of `current-prefix-arg' will be used. +That's mean you can pass prefix args before or after calling a command +that use `helm-comp-read' See `helm-M-x' for example. + +\(fn PROMPT COLLECTION &key TEST INITIAL-INPUT DEFAULT PRESELECT (buffer \"*Helm Completions*\") MUST-MATCH REVERSE-HISTORY (requires-pattern 0) HISTORY INPUT-HISTORY (case-fold helm-comp-read-case-fold-search) (del-input t) (persistent-action nil) (persistent-help \"DoNothing\") (mode-line helm-comp-read-mode-line) (keymap helm-comp-read-map) (name \"Helm Completions\") CANDIDATES-IN-BUFFER EXEC-WHEN-ONLY-ONE QUIT-WHEN-NO-CAND (volatile t) SORT (fc-transformer (quote helm-cr-default-transformer)) MARKED-CANDIDATES NOMARK (alistp t))" nil nil) + +(defvar helm-mode nil "\ +Non-nil if Helm mode is enabled. +See the command `helm-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-mode'.") + +(custom-autoload 'helm-mode "helm-mode" nil) + +(autoload 'helm-mode "helm-mode" "\ +Toggle generic helm completion. + +All functions in Emacs that use `completing-read' +or `read-file-name' and friends will use helm interface +when this mode is turned on. +However you can modify this behavior for functions of your choice +with `helm-completing-read-handlers-alist'. + +Called with a positive arg, turn on unconditionally, with a +negative arg turn off. +You can turn it on with `helm-mode'. + +Some crap emacs functions may not be supported, +e.g `ffap-alternate-file' and maybe others +You can add such functions to `helm-completing-read-handlers-alist' +with a nil value. + +Note: This mode is incompatible with Emacs23. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (helm-wikipedia-suggest helm-yahoo-suggest helm-google-suggest +;;;;;; helm-surfraw) "helm-net" "helm-net.el" (21478 8075 0 0)) +;;; Generated autoloads from helm-net.el + +(autoload 'helm-surfraw "helm-net" "\ +Preconfigured `helm' to search PATTERN with search ENGINE. + +\(fn PATTERN ENGINE)" t nil) + +(autoload 'helm-google-suggest "helm-net" "\ +Preconfigured `helm' for google search with google suggest. + +\(fn)" t nil) + +(autoload 'helm-yahoo-suggest "helm-net" "\ +Preconfigured `helm' for Yahoo searching with Yahoo suggest. + +\(fn)" t nil) + +(autoload 'helm-wikipedia-suggest "helm-net" "\ +Preconfigured `helm' for Wikipedia lookup with Wikipedia suggest. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (helm-org-headlines helm-org-keywords) "helm-org" +;;;;;; "helm-org.el" (21478 8075 0 0)) +;;; Generated autoloads from helm-org.el + +(autoload 'helm-org-keywords "helm-org" "\ +Preconfigured `helm' for org keywords. + +\(fn)" t nil) + +(autoload 'helm-org-headlines "helm-org" "\ +Preconfigured helm to show org headlines. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (helm-multi-occur-from-isearch helm-multi-occur +;;;;;; helm-occur-from-isearch helm-occur helm-regexp helm-moccur-mode +;;;;;; helm-moccur-run-save-buffer helm-occur-match-plugin-mode) +;;;;;; "helm-regexp" "helm-regexp.el" (21478 8075 0 0)) +;;; Generated autoloads from helm-regexp.el + +(defvar helm-occur-match-plugin-mode t "\ +Non-nil if Helm-Occur-Match-Plugin mode is enabled. +See the command `helm-occur-match-plugin-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-occur-match-plugin-mode'.") + +(custom-autoload 'helm-occur-match-plugin-mode "helm-regexp" nil) + +(autoload 'helm-occur-match-plugin-mode "helm-regexp" "\ +Turn On/Off `helm-match-plugin-mode' only for `helm-m/occur'. + +\(fn &optional ARG)" t nil) + +(autoload 'helm-moccur-run-save-buffer "helm-regexp" "\ +Run grep save results action from `helm-do-grep-1'. + +\(fn)" t nil) + +(autoload 'helm-moccur-mode "helm-regexp" "\ +Major mode to provide actions in helm moccur saved buffer. + +Special commands: +\\{helm-moccur-mode-map} + +\(fn)" t nil) + +(autoload 'helm-regexp "helm-regexp" "\ +Preconfigured helm to build regexps. +`query-replace-regexp' can be run from there against found regexp. + +\(fn)" t nil) + +(autoload 'helm-occur "helm-regexp" "\ +Preconfigured helm for Occur. + +\(fn)" t nil) + +(autoload 'helm-occur-from-isearch "helm-regexp" "\ +Invoke `helm-occur' from isearch. + +\(fn)" t nil) + +(autoload 'helm-multi-occur "helm-regexp" "\ +Preconfigured helm for multi occur. + + BUFFERS is a list of buffers to search through. +With a prefix arg, reverse the behavior of +`helm-moccur-always-search-in-current'. +The prefix arg can be set before calling `helm-multi-occur' +or during the buffer selection. + +\(fn BUFFERS)" t nil) + +(autoload 'helm-multi-occur-from-isearch "helm-regexp" "\ +Invoke `helm-multi-occur' from isearch. + +With a prefix arg, reverse the behavior of +`helm-moccur-always-search-in-current'. +The prefix arg can be set before calling +`helm-multi-occur-from-isearch' or during the buffer selection. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (helm-show-kill-ring helm-register helm-all-mark-rings +;;;;;; helm-global-mark-ring helm-mark-ring) "helm-ring" "helm-ring.el" +;;;;;; (21478 8075 0 0)) +;;; Generated autoloads from helm-ring.el + +(autoload 'helm-mark-ring "helm-ring" "\ +Preconfigured `helm' for `helm-source-mark-ring'. + +\(fn)" t nil) + +(autoload 'helm-global-mark-ring "helm-ring" "\ +Preconfigured `helm' for `helm-source-global-mark-ring'. + +\(fn)" t nil) + +(autoload 'helm-all-mark-rings "helm-ring" "\ +Preconfigured `helm' for `helm-source-global-mark-ring' and `helm-source-mark-ring'. + +\(fn)" t nil) + +(autoload 'helm-register "helm-ring" "\ +Preconfigured `helm' for Emacs registers. + +\(fn)" t nil) + +(autoload 'helm-show-kill-ring "helm-ring" "\ +Preconfigured `helm' for `kill-ring'. +It is drop-in replacement of `yank-pop'. + +First call open the kill-ring browser, next calls move to next line. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (helm-semantic-or-imenu helm-semantic) "helm-semantic" +;;;;;; "helm-semantic.el" (21478 8076 0 0)) +;;; Generated autoloads from helm-semantic.el + +(autoload 'helm-semantic "helm-semantic" "\ +Preconfigured `helm' for `semantic'. + +\(fn)" t nil) + +(autoload 'helm-semantic-or-imenu "helm-semantic" "\ +Run `helm' with `semantic' or `imenu'. + +If `semantic-mode' is active in the current buffer, then use +semantic for generating tags, otherwise fall back to `imenu'. +Fill in the symbol at point by default. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (helm-xrandr-set helm-list-emacs-process helm-top +;;;;;; helm-top-run-sort-by-user helm-top-run-sort-by-mem helm-top-run-sort-by-cpu +;;;;;; helm-top-run-sort-by-com) "helm-sys" "helm-sys.el" (21478 +;;;;;; 8075 0 0)) +;;; Generated autoloads from helm-sys.el + +(autoload 'helm-top-run-sort-by-com "helm-sys" "\ + + +\(fn)" t nil) + +(autoload 'helm-top-run-sort-by-cpu "helm-sys" "\ + + +\(fn)" t nil) + +(autoload 'helm-top-run-sort-by-mem "helm-sys" "\ + + +\(fn)" t nil) + +(autoload 'helm-top-run-sort-by-user "helm-sys" "\ + + +\(fn)" t nil) + +(autoload 'helm-top "helm-sys" "\ +Preconfigured `helm' for top command. + +\(fn)" t nil) + +(autoload 'helm-list-emacs-process "helm-sys" "\ +Preconfigured `helm' for emacs process. + +\(fn)" t nil) + +(autoload 'helm-xrandr-set "helm-sys" "\ + + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (helm-etags-select) "helm-tags" "helm-tags.el" +;;;;;; (21478 8076 0 0)) +;;; Generated autoloads from helm-tags.el + +(autoload 'helm-etags-select "helm-tags" "\ +Preconfigured helm for etags. +If called with a prefix argument or if any of the tag files have +been modified, reinitialize cache. + +This function aggregates three sources of tag files: + + 1) An automatically located file in the parent directories, by `helm-etags-get-tag-file'. + 2) `tags-file-name', which is commonly set by `find-tag' command. + 3) `tags-table-list' which is commonly set by `visit-tags-table' command. + +\(fn ARG)" t nil) + +;;;*** + +;;;### (autoloads (helm-yank-text-at-point helm-w32-shell-execute-open-file +;;;;;; helm-quit-and-find-file helm-display-all-sources helm-show-all-in-this-source-only) +;;;;;; "helm-utils" "helm-utils.el" (21478 8075 0 0)) +;;; Generated autoloads from helm-utils.el + +(autoload 'helm-show-all-in-this-source-only "helm-utils" "\ +Show only current source of this helm session with all its candidates. +With a numeric prefix arg show only the ARG number of candidates. + +\(fn ARG)" t nil) + +(autoload 'helm-display-all-sources "helm-utils" "\ +Display all sources previously hidden by `helm-set-source-filter'. + +\(fn)" t nil) + +(autoload 'helm-quit-and-find-file "helm-utils" "\ +Drop into `helm-find-files' from `helm'. +If current selection is a buffer or a file, `helm-find-files' +from its directory. + +\(fn)" t nil) + +(autoload 'helm-w32-shell-execute-open-file "helm-utils" "\ + + +\(fn FILE)" t nil) + +(autoload 'helm-yank-text-at-point "helm-utils" "\ +Yank text at point in `helm-current-buffer' into minibuffer. +If `helm-yank-symbol-first' is non--nil the first yank +grabs the entire symbol. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (helm-w3m-bookmarks) "helm-w3m" "helm-w3m.el" (21478 +;;;;;; 8076 0 0)) +;;; Generated autoloads from helm-w3m.el + +(autoload 'helm-w3m-bookmarks "helm-w3m" "\ +Preconfigured `helm' for w3m bookmark. + +Needs w3m and emacs-w3m. + +http://w3m.sourceforge.net/ +http://emacs-w3m.namazu.org/ + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (helm-yaoddmuse-emacswiki-post-library helm-yaoddmuse-emacswiki-edit-or-view +;;;;;; helm-yaoddmuse-cache-pages) "helm-yaoddmuse" "helm-yaoddmuse.el" +;;;;;; (21478 8075 0 0)) +;;; Generated autoloads from helm-yaoddmuse.el + +(autoload 'helm-yaoddmuse-cache-pages "helm-yaoddmuse" "\ +Fetch the list of files on emacswiki and create cache file. +If load is non--nil load the file and feed `yaoddmuse-pages-hash'. + +\(fn &optional LOAD)" t nil) + +(autoload 'helm-yaoddmuse-emacswiki-edit-or-view "helm-yaoddmuse" "\ +Preconfigured `helm' to edit or view EmacsWiki page. + +Needs yaoddmuse.el. + +http://www.emacswiki.org/emacs/download/yaoddmuse.el + +\(fn)" t nil) + +(autoload 'helm-yaoddmuse-emacswiki-post-library "helm-yaoddmuse" "\ +Preconfigured `helm' to post library to EmacsWiki. + +Needs yaoddmuse.el. + +http://www.emacswiki.org/emacs/download/yaoddmuse.el + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads nil nil ("helm-aliases.el" "helm-pkg.el" "helm-plugin.el") +;;;;;; (21478 8076 587905 0)) + +;;;*** + +(provide 'helm-autoloads) +;; Local Variables: +;; version-control: never +;; no-byte-compile: t +;; no-update-autoloads: t +;; coding: utf-8 +;; End: +;;; helm-autoloads.el ends here diff --git a/elpa/helm-20140808.2300/helm-bbdb.el b/elpa/helm-20140808.2300/helm-bbdb.el new file mode 100644 index 000000000..abe00a5dd --- /dev/null +++ b/elpa/helm-20140808.2300/helm-bbdb.el @@ -0,0 +1,185 @@ +;;; helm-bbdb.el --- Helm interface for bbdb -*- lexical-binding: t -*- + +;; Copyright (C) 2012 ~ 2014 Thierry Volpiatto + +;; 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 . + +;;; Code: + +(require 'cl-lib) +(require 'helm) +(require 'helm-mode) + +(defvar bbdb-records) +(defvar bbdb-buffer-name) + +(declare-function bbdb "ext:bbdb-com") +(declare-function bbdb-current-record "ext:bbdb-com") +(declare-function bbdb-redisplay-one-record "ext:bbdb-com") +(declare-function bbdb-record-net "ext:bbdb-com" (string) t) +(declare-function bbdb-current-record "ext:bbdb-com") +(declare-function bbdb-dwim-net-address "ext:bbdb-com") +(declare-function bbdb-records "ext:bbdb-com" + (&optional dont-check-disk already-in-db-buffer)) +(declare-function bbdb-label-completion-list "ext:bbdb" (field)) + +(defgroup helm-bbdb nil + "Commands and function for bbdb." + :group 'helm) + +(defun helm-bbdb-candidates () + "Return a list of all names in the bbdb database. +The format is \"Firstname Lastname\"." + (mapcar (lambda (bbdb-record) + (replace-regexp-in-string + "\\s-+$" "" + (concat (aref bbdb-record 0) " " (aref bbdb-record 1)))) + (bbdb-records))) + +(defun helm-bbdb-read-phone () + "Return a list of vector address objects. +See docstring of `bbdb-create-internal' for more info on address entries." + (cl-loop with loc-list = (cons "[Exit when no more]" + (bbdb-label-completion-list "phones")) + with loc ; Defer count + do (setq loc (helm-comp-read (format "Phone location[%s]: " count) + loc-list + :must-match 'confirm + :default "")) + while (not (string= loc "[Exit when no more]")) + for count from 1 + for phone-number = (helm-read-string (format "Phone number (%s): " loc)) + collect (vector loc phone-number) into phone-list + do (setq loc-list (remove loc loc-list)) + finally return phone-list)) + +;; TODO move this to helm-utils when finish +(defun helm-read-repeat-string (bbdb--prompt &optional count) + "Prompt as many time PROMPT is not empty. +If COUNT is non--nil add a number after each prompt." + (cl-loop with elm + while (not (string= elm "")) + for n from 1 + do (when count + (setq bbdb--prompt (concat bbdb--prompt (int-to-string n) ": "))) + collect (setq elm (helm-read-string bbdb--prompt)) into lis + finally return (remove "" lis))) + +(defun helm-bbdb-read-address () + "Return a list of vector address objects. +See docstring of `bbdb-create-internal' for more info on address entries." + (cl-loop with loc-list = (cons "[Exit when no more]" + (bbdb-label-completion-list "addresses")) + with loc ; Defer count + do (setq loc (helm-comp-read + (format "Address description[%s]: " + (int-to-string count)) + loc-list + :must-match 'confirm + :default "")) + while (not (string= loc "[Exit when no more]")) + for count from 1 + ;; Create vector + for lines = (helm-read-repeat-string "Line" t) + for city = (helm-read-string "City: ") + for state = (helm-read-string "State: ") + for zip = (helm-read-string "ZipCode: ") + for country = (helm-read-string "Country: ") + collect (vector loc lines city state zip country) into address-list + do (setq loc-list (remove loc loc-list)) + finally return address-list)) + +(defun helm-bbdb-create-contact (actions candidate) + "Action transformer for `helm-source-bbdb'. +Returns only an entry to add the current `helm-pattern' as new contact. +All other actions are removed." + (if (string= candidate "*Add to contacts*") + '(("Add to contacts" + . (lambda (actions) + (bbdb-create-internal + (read-from-minibuffer "Name: " helm-bbdb-name) + (read-from-minibuffer "Company: ") + (helm-read-repeat-string "Email " t) + (helm-bbdb-read-address) + (helm-bbdb-read-phone) + (read-from-minibuffer "Note: "))))) + actions)) + +(defun helm-bbdb-get-record (candidate) + "Return record that match CANDIDATE." + (bbdb candidate nil) + (set-buffer "*BBDB*") + (bbdb-current-record)) + +(defvar helm-bbdb-name nil + "Only for internal use.") + +(defvar helm-source-bbdb + '((name . "BBDB") + (candidates . helm-bbdb-candidates) + (action . (("Send a mail" . helm-bbdb-compose-mail) + ("View person's data" . helm-bbdb-view-person-action))) + (filtered-candidate-transformer . (lambda (candidates _source) + (setq helm-bbdb-name helm-pattern) + (if (not candidates) + (list "*Add to contacts*") + candidates))) + (action-transformer . (lambda (actions candidate) + (helm-bbdb-create-contact actions candidate)))) + "Needs BBDB. + +http://bbdb.sourceforge.net/") + +(defvar bbdb-append-records) +(defun helm-bbdb-view-person-action (candidate) + "View BBDB data of single CANDIDATE or marked candidates." + (helm-aif (helm-marked-candidates) + (let ((bbdb-append-records (length it))) + (cl-dolist (i it) + (bbdb-redisplay-one-record (helm-bbdb-get-record i)))) + (bbdb-redisplay-one-record (helm-bbdb-get-record candidate)))) + +(defun helm-bbdb-collect-mail-addresses () + "Return a list of all mail addresses of records in bbdb buffer." + (with-current-buffer bbdb-buffer-name + (cl-loop for i in bbdb-records + if (bbdb-record-net (car i)) + collect (bbdb-dwim-net-address (car i))))) + +(defun helm-bbdb-compose-mail (candidate) + "Compose a mail with all records of bbdb buffer." + (helm-bbdb-view-person-action candidate) + (let* ((address-list (helm-bbdb-collect-mail-addresses)) + (address-str (mapconcat 'identity address-list ",\n "))) + (compose-mail address-str))) + +;;;###autoload +(defun helm-bbdb () + "Preconfigured `helm' for BBDB. + +Needs BBDB. + +http://bbdb.sourceforge.net/" + (interactive) + (helm-other-buffer 'helm-source-bbdb "*helm bbdb*")) + +(provide 'helm-bbdb) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions obsolete) +;; coding: utf-8 +;; indent-tabs-mode: nil +;; End: + +;;; helm-bbdb ends here diff --git a/elpa/helm-20140808.2300/helm-bbdb.elc b/elpa/helm-20140808.2300/helm-bbdb.elc new file mode 100644 index 0000000000000000000000000000000000000000..60e09cb8dfef9ee9b917df4fa0a09a3c6f12fe61 GIT binary patch literal 5083 zcmd5=X>;4i5!GSKHmmY6m3&EU3tC&GV^FwwNUlmrqLr+wyt3EQ=0i+Y76gV8vN&h} zlvnxndEEmL)ZvXQ`z3OLCI&N&nb+_2!Ph5mM}JsbTWh_3{hCHuGLK>v()5NBzdXcM znBV)sahCnujkCayDNE_xFX?D;NwiOP@4y}&*fu$q?TLw5o+UJc5!(B)P4ewNHEcw9spECst}V|#N97gy zG4?Vqqa^ybUt&VhZOOxntEkZ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_W@zW>6Ey@Vw9G(?s6cCTW1_&X)!Sg)NP0qb zmT~vJs#F?Sb@aI1;Yk#$0v0+kU|e-P-1UjxbrjX0ekq&;SsbI$5$c?KH;{fM(U#x8$GCW*ux*La#iTe$M@uvJLIg#< zM^gwd1N9*|jI0cphzvKrxympmknd5J#0?%cg$-|KMtLi^rEA9W1?R(_D^wEhFMX!Vr< literal 0 HcmV?d00001 diff --git a/elpa/helm-20140808.2300/helm-bookmark.el b/elpa/helm-20140808.2300/helm-bookmark.el new file mode 100644 index 000000000..e503c643f --- /dev/null +++ b/elpa/helm-20140808.2300/helm-bookmark.el @@ -0,0 +1,799 @@ +;;; helm-bookmark.el --- Helm for Emacs regular Bookmarks. -*- lexical-binding: t -*- + +;; Copyright (C) 2012 ~ 2014 Thierry Volpiatto + +;; 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 . + +;;; Code: +(require 'cl-lib) +(require 'bookmark) +(require 'helm) +(require 'helm-utils) +(require 'helm-info) +(require 'helm-adaptive) + +(declare-function addressbook-bookmark-edit "ext:addressbook-bookmark.el" (bookmark)) + + +(defgroup helm-bookmark nil + "Predefined configurations for `helm.el'." + :group 'helm) + +(defcustom helm-bookmark-show-location nil + "Show location of bookmark on display." + :group 'helm-bookmark + :type 'boolean) + + +(defface helm-bookmark-info + '((t (:foreground "green"))) + "Face used for W3m Emacs bookmarks (not w3m bookmarks)." + :group 'helm-bookmark) + +(defface helm-bookmark-w3m + '((t (:foreground "yellow"))) + "Face used for W3m Emacs bookmarks (not w3m bookmarks)." + :group 'helm-bookmark) + +(defface helm-bookmark-gnus + '((t (:foreground "magenta"))) + "Face used for Gnus bookmarks." + :group 'helm-bookmark) + +(defface helm-bookmark-man + '((t (:foreground "Orange4"))) + "Face used for Woman/man bookmarks." + :group 'helm-bookmark) + +(defface helm-bookmark-file + '((t (:foreground "Deepskyblue2"))) + "Face used for file bookmarks." + :group 'helm-bookmark) + +(defface helm-bookmark-directory + '((t (:inherit helm-ff-directory))) + "Face used for file bookmarks." + :group 'helm-bookmark) + +(defface helm-bookmark-addressbook + '((t (:foreground "tomato"))) + "Face used for addressbook bookmarks." + :group 'helm-bookmark) + + +(defvar helm-bookmark-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map helm-map) + (define-key map (kbd "C-c o") 'helm-bookmark-run-jump-other-window) + (define-key map (kbd "C-d") 'helm-bookmark-run-delete) + (define-key map (kbd "C-]") 'helm-bookmark-toggle-filename) + (define-key map (kbd "M-e") 'helm-bookmark-run-edit) + (when (locate-library "bookmark-extensions") + (define-key map (kbd "M-F") 'helm-bmkext-run-sort-by-frequency) + (define-key map (kbd "M-V") 'helm-bmkext-run-sort-by-last-visit) + (define-key map (kbd "M-A") 'helm-bmkext-run-sort-alphabetically)) + (define-key map (kbd "C-c ?") 'helm-bookmark-help) + (delq nil map)) + "Generic Keymap for emacs bookmark sources.") + +(defvar helm-bookmarks-cache nil) +(defvar helm-source-bookmarks + '((name . "Bookmarks") + (init . (lambda () + (require 'bookmark) + (setq helm-bookmark-mode-line-string + (list (car helm-bookmark-mode-line-string) + (replace-regexp-in-string "Sort:\\[.*\\] " "" + (cadr helm-bookmark-mode-line-string)))) + (setq helm-bookmarks-cache + (bookmark-all-names)))) + (candidates . helm-bookmarks-cache) + (filtered-candidate-transformer . helm-bookmark-transformer) + (match . helm-bookmark-match-fn) + (type . bookmark)) + "See (info \"(emacs)Bookmarks\").") + +(defun helm-bookmark-transformer (candidates _source) + (cl-loop for i in candidates + for loc = (bookmark-location i) + for len = (string-width i) + for trunc = (if (> len bookmark-bmenu-file-column) + (helm-substring i bookmark-bmenu-file-column) + i) + for sep = (make-string (- (+ bookmark-bmenu-file-column 2) + (length trunc)) + ? ) + if helm-bookmark-show-location + collect (cons (concat trunc sep (if (listp loc) (car loc) loc)) i) + else collect i)) + +(defun helm-bookmark-match-fn (candidate) + "Match function for bookmark sources using `candidates'." + (if helm-bookmark-show-location + ;; match only location, match-plugin will match also name. + (string-match helm-pattern (bookmark-location candidate)) + (string-match helm-pattern candidate))) + +(defun helm-bookmark-toggle-filename () + "Toggle bookmark location visibility." + (interactive) + (with-helm-alive-p + (let* ((real (helm-get-selection helm-buffer)) + (trunc (if (> (string-width real) bookmark-bmenu-file-column) + (helm-substring real bookmark-bmenu-file-column) + real)) + (loc (bookmark-location real))) + (setq helm-bookmark-show-location (not helm-bookmark-show-location)) + (helm-force-update (if helm-bookmark-show-location + (concat (regexp-quote trunc) + " +" + (regexp-quote + (if (listp loc) (car loc) loc))) + real))))) + +(defun helm-bookmark-jump (candidate) + "Jump to bookmark from keyboard." + (let ((current-prefix-arg helm-current-prefix-arg) + non-essential) + (bookmark-jump candidate))) + +(defun helm-bookmark-jump-other-window (candidate) + (let (non-essential) + (bookmark-jump-other-window candidate))) + + +;;; bookmark-set +;; +(defvar helm-source-bookmark-set + '((name . "Set Bookmark") + (dummy) + (action . bookmark-set)) + "See (info \"(emacs)Bookmarks\").") + + +;;; Colorize bookmarks by category +;; +(defvar helm-source-pp-bookmarks + '((name . "PP-Bookmarks") + (init . (lambda () + (require 'bookmark) + (setq helm-bookmark-mode-line-string + (list (car helm-bookmark-mode-line-string) + (replace-regexp-in-string "Sort:\\[.*\\] " "" + (cadr helm-bookmark-mode-line-string)))) + (helm-init-candidates-in-buffer + 'global (cl-loop for b in (bookmark-all-names) collect + (propertize b 'location (bookmark-location b)))))) + (candidates-in-buffer) + (search helm-bookmark-search-fn) + (match-part . helm-pp-bookmark-match-fn) + (filtered-candidate-transformer + helm-adaptive-sort + helm-highlight-bookmark) + (type . bookmark)) + "See (info \"(emacs)Bookmarks\").") + +(defun helm-bookmark-search-fn (pattern) + "Search function for bookmark sources using `candidates-in-buffer'. +Should be used with `helm-pp-bookmark-match-fn' as `match-part' function." + (if helm-bookmark-show-location + (helm-aif (next-single-property-change (point) 'location) + (goto-char it)) + (re-search-forward pattern nil t))) + +(defun helm-pp-bookmark-match-fn (candidate) + "Search function for bookmark sources using `candidates-in-buffer'. +Should be used with `helm-bookmark-search-fn' as `search' function." + (helm-aif (and helm-bookmark-show-location + (bookmark-location candidate)) + ;; Match against bookmark-name and location. + (concat candidate " " it) + ;; Match against bookmark-name. + candidate)) + + +;;; Predicates +;; +(defconst helm-bookmark--non-file-filename " - no file -" + "Name to use for `filename' entry, for non-file bookmarks.") + +(defun helm-bookmark-gnus-bookmark-p (bookmark) + "Return non-nil if BOOKMARK is a Gnus bookmark. +BOOKMARK is a bookmark name or a bookmark record." + (or (eq (bookmark-get-handler bookmark) 'bmkext-jump-gnus) + (eq (bookmark-get-handler bookmark) 'gnus-summary-bookmark-jump) + (eq (bookmark-get-handler bookmark) 'bookmarkp-jump-gnus))) + +(defun helm-bookmark-w3m-bookmark-p (bookmark) + "Return non-nil if BOOKMARK is a W3m bookmark. +BOOKMARK is a bookmark name or a bookmark record." + (or (eq (bookmark-get-handler bookmark) 'bmkext-jump-w3m) + (eq (bookmark-get-handler bookmark) 'bookmark-w3m-bookmark-jump) + (eq (bookmark-get-handler bookmark) 'bookmarkp-jump-w3m))) + +(defun helm-bookmark-woman-bookmark-p (bookmark) + "Return non-nil if BOOKMARK is a Woman bookmark. +BOOKMARK is a bookmark name or a bookmark record." + (or (eq (bookmark-get-handler bookmark) 'bmkext-jump-woman) + (eq (bookmark-get-handler bookmark) 'woman-bookmark-jump) + (eq (bookmark-get-handler bookmark) 'bookmarkp-jump-woman))) + +(defun helm-bookmark-man-bookmark-p (bookmark) + "Return non-nil if BOOKMARK is a Man bookmark. +BOOKMARK is a bookmark name or a bookmark record." + (or (eq (bookmark-get-handler bookmark) 'bmkext-jump-man) + (eq (bookmark-get-handler bookmark) 'Man-bookmark-jump) + (eq (bookmark-get-handler bookmark) 'bookmarkp-jump-man))) + +(defun helm-bookmark-woman-man-bookmark-p (bookmark) + "Return non-nil if BOOKMARK is a Man or Woman bookmark. +BOOKMARK is a bookmark name or a bookmark record." + (or (helm-bookmark-man-bookmark-p bookmark) + (helm-bookmark-woman-bookmark-p bookmark))) + +(defun helm-bookmark-info-bookmark-p (bookmark) + "Return non-nil if BOOKMARK is an Info bookmark. +BOOKMARK is a bookmark name or a bookmark record." + (eq (bookmark-get-handler bookmark) 'Info-bookmark-jump)) + +(defun helm-bookmark-image-bookmark-p (bookmark) + "Return non-nil if BOOKMARK bookmarks an image file." + (if (stringp bookmark) + (assoc 'image-type (assoc bookmark bookmark-alist)) + (assoc 'image-type bookmark))) + +(defun helm-bookmark-file-p (bookmark) + "Return non-nil if BOOKMARK bookmarks a file or directory. +BOOKMARK is a bookmark name or a bookmark record. +This excludes bookmarks of a more specific kind (Info, Gnus, and W3m)." + (let* ((filename (bookmark-get-filename bookmark)) + (isnonfile (equal filename helm-bookmark--non-file-filename))) + (and filename (not isnonfile) (not (bookmark-get-handler bookmark))))) + +(defun helm-bookmark-addressbook-p (bookmark) + "Return non--nil if BOOKMARK is a contact recorded with addressbook-bookmark. +BOOKMARK is a bookmark name or a bookmark record." + (if (listp bookmark) + (string= (assoc-default 'type bookmark) "addressbook") + (string= (assoc-default + 'type (assoc bookmark bookmark-alist)) "addressbook"))) + +(defun helm-bookmark-uncategorized-bookmark-p (bookmark) + "Return non--nil if BOOKMARK match no known category." + (and (not (helm-bookmark-addressbook-p bookmark)) + (not (helm-bookmark-gnus-bookmark-p bookmark)) + (not (helm-bookmark-w3m-bookmark-p bookmark)) + (not (helm-bookmark-woman-man-bookmark-p bookmark)) + (not (helm-bookmark-info-bookmark-p bookmark)) + (not (helm-bookmark-image-bookmark-p bookmark)) + (not (helm-bookmark-file-p bookmark)) + (not (helm-bookmark-addressbook-p bookmark)))) + +(defun helm-bookmark-filter-setup-alist (fn) + "Return a filtered `bookmark-alist' sorted alphabetically." + (cl-loop with alist = (cl-loop for b in bookmark-alist + when (funcall fn b) collect b) + for bmk in alist + for name = (car bmk) + collect (propertize name 'location (bookmark-location name)))) + + +;;; Bookmark handlers +;; +(defvar w3m-async-exec) +(defun helm-bookmark-jump-w3m (bookmark) + "Jump to W3m bookmark BOOKMARK, setting a new tab. +If `browse-url-browser-function' is set to something else +than `w3m-browse-url' use it." + (require 'helm-net) + (let ((file (or (bookmark-prop-get bookmark 'filename) + (bookmark-prop-get bookmark 'url))) + (buf (generate-new-buffer-name "*w3m*")) + (w3m-async-exec nil) + (really-use-w3m (equal browse-url-browser-function 'w3m-browse-url))) + (helm-browse-url file really-use-w3m) + (when really-use-w3m + (bookmark-default-handler + `("" (buffer . ,buf) . ,(bookmark-get-bookmark-record bookmark)))))) + +;; All bookmarks recorded with the handler provided with w3m +;; (`bookmark-w3m-bookmark-jump') will use our handler which open +;; the bookmark in a new tab or in an external browser depending +;; on `browse-url-browser-function'. +(defalias 'bookmark-w3m-bookmark-jump 'helm-bookmark-jump-w3m) + +;; Provide compatibility with old handlers provided in external +;; packages bookmark-extensions.el and bookmark+. +(defalias 'bmkext-jump-woman 'woman-bookmark-jump) +(defalias 'bmkext-jump-man 'Man-bookmark-jump) +(defalias 'bmkext-jump-w3m 'helm-bookmark-jump-w3m) +(defalias 'bmkext-jump-gnus 'gnus-summary-bookmark-jump) +(defalias 'bookmarkp-jump-gnus 'gnus-summary-bookmark-jump) +(defalias 'bookmarkp-jump-w3m 'helm-bookmark-jump-w3m) +(defalias 'bookmarkp-jump-woman 'woman-bookmark-jump) +(defalias 'bookmarkp-jump-man 'Man-bookmark-jump) + + +;;;; Filtered bookmark sources + +;;; W3m bookmarks. +;; +(defvar helm-source-bookmark-w3m + '((name . "Bookmark W3m") + (init . (lambda () + (bookmark-maybe-load-default-file) + (helm-init-candidates-in-buffer + 'global (helm-bookmark-w3m-setup-alist)))) + (candidates-in-buffer) + (search helm-bookmark-search-fn) + (match-part . helm-pp-bookmark-match-fn) + (filtered-candidate-transformer + helm-adaptive-sort + helm-highlight-bookmark) + (type . bookmark))) + +(defun helm-bookmark-w3m-setup-alist () + "Specialized filter function for bookmarks w3m." + (helm-bookmark-filter-setup-alist 'helm-bookmark-w3m-bookmark-p)) + +;;; Images +;; +(defvar helm-source-bookmark-images + '((name . "Bookmark Images") + (init . (lambda () + (bookmark-maybe-load-default-file) + (helm-init-candidates-in-buffer + 'global (helm-bookmark-images-setup-alist)))) + (candidates-in-buffer) + (search helm-bookmark-search-fn) + (match-part . helm-pp-bookmark-match-fn) + (filtered-candidate-transformer + helm-adaptive-sort + helm-highlight-bookmark) + (type . bookmark))) + +(defun helm-bookmark-images-setup-alist () + "Specialized filter function for images bookmarks." + (helm-bookmark-filter-setup-alist 'helm-bookmark-image-bookmark-p)) + +;;; Woman Man +;; +(defvar helm-source-bookmark-man + '((name . "Bookmark Woman&Man") + (init . (lambda () + (bookmark-maybe-load-default-file) + (helm-init-candidates-in-buffer + 'global (helm-bookmark-man-setup-alist)))) + (candidates-in-buffer) + (search helm-bookmark-search-fn) + (match-part . helm-pp-bookmark-match-fn) + (filtered-candidate-transformer + helm-adaptive-sort + helm-highlight-bookmark) + (type . bookmark))) + +(defun helm-bookmark-man-setup-alist () + "Specialized filter function for bookmarks w3m." + (helm-bookmark-filter-setup-alist 'helm-bookmark-woman-man-bookmark-p)) + +;;; Gnus +;; +(defvar helm-source-bookmark-gnus + '((name . "Bookmark Gnus") + (init . (lambda () + (bookmark-maybe-load-default-file) + (helm-init-candidates-in-buffer + 'global (helm-bookmark-gnus-setup-alist)))) + (candidates-in-buffer) + (search helm-bookmark-search-fn) + (match-part . helm-pp-bookmark-match-fn) + (filtered-candidate-transformer + helm-adaptive-sort + helm-highlight-bookmark) + (type . bookmark))) + +(defun helm-bookmark-gnus-setup-alist () + "Specialized filter function for bookmarks gnus." + (helm-bookmark-filter-setup-alist 'helm-bookmark-gnus-bookmark-p)) + +;;; Info +;; +(defvar helm-source-bookmark-info + '((name . "Bookmark Info") + (init . (lambda () + (bookmark-maybe-load-default-file) + (helm-init-candidates-in-buffer + 'global (helm-bookmark-info-setup-alist)))) + (candidates-in-buffer) + (search helm-bookmark-search-fn) + (match-part . helm-pp-bookmark-match-fn) + (filtered-candidate-transformer + helm-adaptive-sort + helm-highlight-bookmark) + (type . bookmark))) + +(defun helm-bookmark-info-setup-alist () + "Specialized filter function for bookmarks info." + (helm-bookmark-filter-setup-alist 'helm-bookmark-info-bookmark-p)) + +;;; Files and directories +;; +(defvar helm-source-bookmark-files&dirs + '((name . "Bookmark Files&Directories") + (init . (lambda () + (bookmark-maybe-load-default-file) + (helm-init-candidates-in-buffer + 'global (helm-bookmark-local-files-setup-alist)))) + (candidates-in-buffer) + (search helm-bookmark-search-fn) + (match-part . helm-pp-bookmark-match-fn) + (filtered-candidate-transformer + helm-adaptive-sort + helm-highlight-bookmark) + (type . bookmark))) + +(defun helm-bookmark-local-files-setup-alist () + "Specialized filter function for bookmarks locals files." + (helm-bookmark-filter-setup-alist 'helm-bookmark-file-p)) + +;;; Addressbook. +;; +;; +(defvar helm-source-bookmark-addressbook + '((name . "Bookmark Addressbook") + (init . (lambda () + (require 'addressbook-bookmark nil t) + (bookmark-maybe-load-default-file) + (helm-init-candidates-in-buffer + 'global + (helm-bookmark-addressbook-setup-alist)))) + (candidates-in-buffer) + (search helm-bookmark-search-fn) + (match-part . helm-pp-bookmark-match-fn) + (persistent-action + . (lambda (candidate) + (let ((bmk (helm-bookmark-get-bookmark-from-name + candidate))) + (bookmark--jump-via bmk 'switch-to-buffer)))) + (persistent-help . "Show contact - Prefix with C-u to append") + (filtered-candidate-transformer + helm-adaptive-sort + helm-highlight-bookmark) + (action . (("Show Contact(s)" + . (lambda (candidate) + (let* ((contacts (helm-marked-candidates)) + (current-prefix-arg helm-current-prefix-arg)) + (bookmark-jump + (helm-bookmark-get-bookmark-from-name (car contacts))) + (helm-aif (cdr contacts) + (let ((current-prefix-arg '(4))) + (cl-loop for bmk in it do + (bookmark-jump + (helm-bookmark-get-bookmark-from-name bmk)))))))) + ("Send Mail" + . (lambda (candidate) + (let* ((contacts (helm-marked-candidates)) + (bmk (helm-bookmark-get-bookmark-from-name + (car contacts))) + (append (message-buffers))) + (if append + (addressbook-set-mail-buffer1 bmk 'append) + (addressbook-set-mail-buffer1 bmk)) + (setq contacts (cdr contacts)) + (when contacts + (cl-loop for bmk in contacts do + (addressbook-set-mail-buffer1 bmk 'append)))))) + ("Edit Bookmark" + . (lambda (candidate) + (let ((bmk (helm-bookmark-get-bookmark-from-name + candidate))) + (addressbook-bookmark-edit + (assoc bmk bookmark-alist))))) + ("Delete bookmark(s)" . helm-delete-marked-bookmarks) + ("Insert Email at point" + . (lambda (candidate) + (let* ((bmk (helm-bookmark-get-bookmark-from-name + candidate)) + (mlist (split-string + (assoc-default + 'email (assoc bmk bookmark-alist)) + ", "))) + (insert + (if (> (length mlist) 1) + (helm-comp-read + "Insert Mail Address: " mlist :must-match t) + (car mlist)))))) + ("Show annotation" + . (lambda (candidate) + (let ((bmk (helm-bookmark-get-bookmark-from-name + candidate))) + (bookmark-show-annotation bmk)))) + ("Edit annotation" + . (lambda (candidate) + (let ((bmk (helm-bookmark-get-bookmark-from-name + candidate))) + (bookmark-edit-annotation bmk)))) + ("Show Google map" + . (lambda (candidate) + (let* ((bmk (helm-bookmark-get-bookmark-from-name + candidate)) + (full-bmk (assoc bmk bookmark-alist))) + (addressbook-google-map full-bmk)))))))) + +(defun helm-bookmark-addressbook-setup-alist () + "Specialized filter function for addressbook bookmarks." + (helm-bookmark-filter-setup-alist 'helm-bookmark-addressbook-p)) + +(defvar helm-source-bookmark-uncategorized + '((name . "Bookmark uncategorized") + (init . (lambda () + (bookmark-maybe-load-default-file) + (helm-init-candidates-in-buffer + 'global (helm-bookmark-uncategorized-setup-alist)))) + (candidates-in-buffer) + (search helm-bookmark-search-fn) + (match-part . helm-pp-bookmark-match-fn) + (filtered-candidate-transformer + helm-adaptive-sort + helm-highlight-bookmark) + (type . bookmark))) + +(defun helm-bookmark-uncategorized-setup-alist () + "Specialized filter function for uncategorized bookmarks." + (helm-bookmark-filter-setup-alist 'helm-bookmark-uncategorized-bookmark-p)) + +;;; Transformer +;; + +(defun helm-highlight-bookmark (bookmarks _source) + "Used as `filtered-candidate-transformer' to colorize bookmarks. +Work both with standard Emacs bookmarks and bookmark-extensions.el." + (let ((non-essential t)) + (cl-loop for i in bookmarks + for isfile = (bookmark-get-filename i) + for handlerp = (and (fboundp 'bookmark-get-handler) + (bookmark-get-handler i)) + for isw3m = (and (fboundp 'helm-bookmark-w3m-bookmark-p) + (helm-bookmark-w3m-bookmark-p i)) + for isgnus = (and (fboundp 'helm-bookmark-gnus-bookmark-p) + (helm-bookmark-gnus-bookmark-p i)) + for isman = (and (fboundp 'helm-bookmark-man-bookmark-p) ; Man + (helm-bookmark-man-bookmark-p i)) + for iswoman = (and (fboundp 'helm-bookmark-woman-bookmark-p) ; Woman + (helm-bookmark-woman-bookmark-p i)) + for isannotation = (bookmark-get-annotation i) + for isabook = (string= (bookmark-prop-get i 'type) + "addressbook") + for isinfo = (eq handlerp 'Info-bookmark-jump) + for loc = (bookmark-location i) + for len = (string-width i) + for trunc = (if (and helm-bookmark-show-location + (> len bookmark-bmenu-file-column)) + (helm-substring + i bookmark-bmenu-file-column) + i) + ;; Add a * if bookmark have annotation + if (and isannotation (not (string-equal isannotation ""))) + do (setq trunc (concat "*" (if helm-bookmark-show-location trunc i))) + for sep = (and helm-bookmark-show-location + (make-string (- (+ bookmark-bmenu-file-column 2) + (string-width trunc)) + ? )) + for bmk = (cond ( ;; info buffers + isinfo + (propertize trunc 'face 'helm-bookmark-info + 'help-echo isfile)) + ( ;; w3m buffers + isw3m + (propertize trunc 'face 'helm-bookmark-w3m + 'help-echo isfile)) + ( ;; gnus buffers + isgnus + (propertize trunc 'face 'helm-bookmark-gnus + 'help-echo isfile)) + ( ;; Man Woman + (or iswoman isman) + (propertize trunc 'face 'helm-bookmark-man + 'help-echo isfile)) + ( ;; Addressbook + isabook + (propertize trunc 'face 'helm-bookmark-addressbook)) + ( ;; directories + (and isfile + ;; This is needed because `non-essential' + ;; is not working on Emacs-24.2 and the behavior + ;; of tramp seems to have changed since previous + ;; versions (Need to reenter password even if a + ;; first connection have been established, + ;; probably when host is named differently + ;; i.e machine/localhost) + (not (file-remote-p isfile)) + (file-directory-p isfile)) + (propertize trunc 'face 'helm-bookmark-directory + 'help-echo isfile)) + ( ;; regular files + t + (propertize trunc 'face 'helm-bookmark-file + 'help-echo isfile))) + collect (if helm-bookmark-show-location + (cons (concat bmk sep (if (listp loc) (car loc) loc)) + i) + (cons bmk i))))) + +(defun helm-bookmark-edit-bookmark (bookmark-name) + "Edit bookmark's name and file name, and maybe save them. +BOOKMARK-NAME is the current (old) name of the bookmark to be renamed." + (let ((bmk (helm-bookmark-get-bookmark-from-name bookmark-name)) + (handler (bookmark-prop-get bookmark-name 'handler))) + (if (eq handler 'addressbook-bookmark-jump) + (addressbook-bookmark-edit + (assoc bmk bookmark-alist)) + (helm-bookmark-edit-bookmark-1 bookmark-name handler)))) + +(defun helm-bookmark-edit-bookmark-1 (bookmark-name handler) + (let* ((bookmark-fname (bookmark-get-filename bookmark-name)) + (bookmark-loc (bookmark-prop-get bookmark-name 'location)) + (new-name (read-from-minibuffer "Name: " bookmark-name)) + (new-loc (read-from-minibuffer "FileName or Location: " + (or bookmark-fname + (if (consp bookmark-loc) + (car bookmark-loc) + bookmark-loc)))) + (docid (and (eq handler 'mu4e-bookmark-jump) + (read-number "Docid: " (cdr bookmark-loc))))) + (when docid + (setq new-loc (cons new-loc docid))) + (when (and (not (equal new-name "")) (not (equal new-loc "")) + (y-or-n-p "Save changes? ")) + (if bookmark-fname + (progn + (helm-bookmark-rename bookmark-name new-name 'batch) + (bookmark-set-filename new-name new-loc)) + (bookmark-prop-set + (bookmark-get-bookmark bookmark-name) 'location new-loc) + (helm-bookmark-rename bookmark-name new-name 'batch)) + (helm-bookmark-maybe-save-bookmark) + (list new-name new-loc)))) + +(defun helm-bookmark-maybe-save-bookmark () + "Increment save counter and maybe save `bookmark-alist'." + (setq bookmark-alist-modification-count (1+ bookmark-alist-modification-count)) + (when (bookmark-time-to-save-p) (bookmark-save))) + +(defun helm-bookmark-rename (old &optional new batch) + "Change bookmark's name from OLD to NEW. +Interactively: + If called from the keyboard, then prompt for OLD. + If called from the menubar, select OLD from a menu. +If NEW is nil, then prompt for its string value. + +If BATCH is non-nil, then do not rebuild the menu list. + +While the user enters the new name, repeated `C-w' inserts consecutive +words from the buffer into the new bookmark name." + (interactive (list (bookmark-completing-read "Old bookmark name"))) + (bookmark-maybe-historicize-string old) + (bookmark-maybe-load-default-file) + (save-excursion (skip-chars-forward " ") (setq bookmark-yank-point (point))) + (setq bookmark-current-buffer (current-buffer)) + (let ((newname (or new (read-from-minibuffer + "New name: " nil + (let ((now-map (copy-keymap minibuffer-local-map))) + (define-key now-map "\C-w" 'bookmark-yank-word) + now-map) + nil 'bookmark-history)))) + (bookmark-set-name old newname) + (setq bookmark-current-bookmark newname) + (unless batch (bookmark-bmenu-surreptitiously-rebuild-list)) + (helm-bookmark-maybe-save-bookmark) newname)) + +(defun helm-bookmark-run-edit () + "Run `helm-bookmark-edit-bookmark' from keyboard." + (interactive) + (with-helm-alive-p + (helm-quit-and-execute-action 'helm-bookmark-edit-bookmark))) + + +;;; Bookmarks attributes +;; +(define-helm-type-attribute 'bookmark + `((coerce . helm-bookmark-get-bookmark-from-name) + (action + ("Jump to bookmark" . helm-bookmark-jump) + ("Jump to BM other window" . helm-bookmark-jump-other-window) + ("Bookmark edit annotation" . bookmark-edit-annotation) + ("Bookmark show annotation" . bookmark-show-annotation) + ("Delete bookmark(s)" . helm-delete-marked-bookmarks) + ("Edit Bookmark" . helm-bookmark-edit-bookmark) + ("Rename bookmark" . helm-bookmark-rename) + ("Relocate bookmark" . bookmark-relocate)) + (keymap . ,helm-bookmark-map) + (mode-line . helm-bookmark-mode-line-string)) + "Bookmark name.") + + +(defun helm-bookmark-run-jump-other-window () + "Jump to bookmark from keyboard." + (interactive) + (with-helm-alive-p + (helm-quit-and-execute-action 'bookmark-jump-other-window))) + +(defun helm-bookmark-run-delete () + "Delete bookmark from keyboard." + (interactive) + (with-helm-alive-p + (when (y-or-n-p "Delete bookmark(s)?") + (helm-quit-and-execute-action 'helm-delete-marked-bookmarks)))) + +(defun helm-bookmark-get-bookmark-from-name (bmk) + "Return bookmark name even if it is a bookmark with annotation. +e.g prepended with *." + (let ((bookmark (replace-regexp-in-string "\\*" "" bmk))) + (if (assoc bookmark bookmark-alist) bookmark bmk))) + +(defun helm-delete-marked-bookmarks (_ignore) + "Delete this bookmark or all marked bookmarks." + (cl-dolist (i (helm-marked-candidates)) + (bookmark-delete (helm-bookmark-get-bookmark-from-name i) + 'batch))) + + +;;;###autoload +(defun helm-bookmarks () + "Preconfigured `helm' for bookmarks." + (interactive) + (helm :sources '(helm-source-bookmarks + helm-source-bookmark-set) + :buffer "*helm bookmarks*" + :default (buffer-name helm-current-buffer))) + +;;;###autoload +(defun helm-pp-bookmarks () + "Preconfigured `helm' for bookmarks (pretty-printed)." + (interactive) + (helm :sources '(helm-source-pp-bookmarks + helm-source-bookmark-set) + :buffer "*helm pp bookmarks*" + :default (buffer-name helm-current-buffer))) + +;;;###autoload +(defun helm-filtered-bookmarks () + "Preconfigured helm for bookmarks (filtered by category). +Optional source `helm-source-bookmark-addressbook' is loaded +only if external library addressbook-bookmark.el is available." + (interactive) + (helm :sources (append '(helm-source-bookmark-files&dirs + helm-source-bookmark-info + helm-source-bookmark-gnus + helm-source-bookmark-man + helm-source-bookmark-images + helm-source-bookmark-w3m) + (and (locate-library "addressbook-bookmark") + (list 'helm-source-bookmark-addressbook)) + (list helm-source-bookmark-uncategorized + 'helm-source-bookmark-set)) + :prompt "Search Bookmark: " + :buffer "*helm filtered bookmarks*" + :default (list (thing-at-point 'symbol) + (buffer-name helm-current-buffer)))) + +(provide 'helm-bookmark) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions obsolete) +;; coding: utf-8 +;; indent-tabs-mode: nil +;; End: + +;;; helm-bookmark.el ends here diff --git a/elpa/helm-20140808.2300/helm-bookmark.elc b/elpa/helm-20140808.2300/helm-bookmark.elc new file mode 100644 index 0000000000000000000000000000000000000000..dc9e987d170240d35cde2e1ab7275fd370dcdf2d GIT binary patch literal 24859 zcmd^H33nSua^@virr)mRbrSDxt|pX-prWDY1V}oGO-iy>YwNJ2jgpAkrvWe^5dkwW zW+0mT>+@ChF$V@DCDF=zj^Cq<>7%;3y1J^mx~jjr`~B@NmX?;*zxwJcaXT4LhNGx2 zx~F0sX5Zj1wH}1MgCu#qJxY4vNF=d%8fIdDb|l2EaDqK&XU}nkYdb!J7)+C~7yyX) z@=s|rO}_+;FSny{*h{zjUq+)z_~mgl8e7!C-m!PKUC*{0aI~iujA{+sqNj4l0{}N_skZ!MY<+I~qDsh;lQ7ZbUaX23KL_g`J z*>o5mrMFN!O*0Yp`cjsXA6Tpa*O!SgC3(v_x*2ueZAE^ z%_6Ip^dr$c!~)^Z**J6^`ayqg@xv>A_{EQ)_|euMokNcRIS&3@{CNQA{j-Gb_$UbQ z*Tx?jy7rwr_?McZ8Fh2f#r1A{B-^`a@1nhn_AUYDRtgwZdg$VzdwnHfdFbKMsB=95 z)&p3t4y+HbKEV2F0*+l6(+4OYAnPju)(2R>2-fa2#fxe5<7_yML~mq`hFzhzgP{Gw z|5&qZI7;QuVLV9Wudp9t54=IYS(+tds~`17;WV<2rpas~n;1~>a3q?Kr%^u|3}di9 zSb8u#noZ^Q5rbqZUeR#af}7h-u_s|v0KW;R!?24T&Kp_7w$kI|#3CU2U)YM5T%IjZc_|ze#fNcg5N|bKisn;*z=lyEl0i-bKhVfD4 z*TH+9pbI241eKD#=^Rj&v#8-(^WN>hSeGh6I{FiYw%D)uWN_EPL@tzZAf_r<*^1`a*(U35AQC(H?~ zw+wM0)o0UQly3jydJ8)U`=Ejvb*qR@N07K&zIxbH;?rA30fd7cTrZY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WD|F+u)2lPMMRlFn0XptvU zaSvC}fxyC3H&bY8JeOjY0vBHq-c->(D_vevic-tdqG9hjCgK700N^h!B?*q*>(g-a0zzZ*YFt_9SS4;I?4HO|=3?SWnJk;K&6O`25l(l+_L8;mT`Hl`YMJNA=9a|Ns4Eck z$_Y#>yp4U?CNH9Qu}5&u+l0ger6pB%3YgZrv>j=PF+bW{KM72j;Juk zyND!t5mq1pp2sK%rQkFA%*7Huj3y?f$2(cesN6WNAcmVa{pjAAB1|GPcPsZEG7N4T zJm&}dir>fDg&tx=w5>AJg~Qgv-xa}g4fatAY=k?4t8c|mISwz>fl_wPM?^yF^MbQi5)K24kK zCYn!xGd_NOgUPZw;Uli}1K7*^aJW&%7+jvn;zh$;q09wB80>Iu$}d}%_09sq^U*9% zmc+5w=8#4_SL#t@2<%>dzLyMQ0tkf$azX}mBwL?xCoUd`PnkP0HHc~dCw5a z+1aU3iV0t0n>?M^z+gZ9N65$}y^F?LcrdZ_PcPTen)uu~da!Xj+di`IGjPn*z~M{KV9OvRmm)SCI~St#bia+us=c8%4$H5jZms_>6&*jk literal 0 HcmV?d00001 diff --git a/elpa/helm-20140808.2300/helm-buffers.el b/elpa/helm-20140808.2300/helm-buffers.el new file mode 100644 index 000000000..9bfcd1c43 --- /dev/null +++ b/elpa/helm-20140808.2300/helm-buffers.el @@ -0,0 +1,784 @@ +;;; helm-buffers.el --- helm support for buffers. -*- lexical-binding: t -*- + +;; Copyright (C) 2012 ~ 2014 Thierry Volpiatto + +;; 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 . + +;;; Code: + +(require 'cl-lib) +(require 'helm) +(require 'helm-utils) +(require 'helm-elscreen) +(require 'helm-grep) +(require 'helm-regexp) + +(declare-function ido-make-buffer-list "ido" (default)) + +(defgroup helm-buffers nil + "Buffers related Applications and libraries for Helm." + :group 'helm) + +(defcustom helm-boring-buffer-regexp-list + '("\\` " "\\*helm" "\\*helm-mode" "\\*Echo Area" "\\*Minibuf") + "The regexp list that match boring buffers. +Buffer candidates matching these regular expression will be +filtered from the list of candidates if the +`helm-skip-boring-buffers' candidate transformer is used." + :type '(repeat (choice regexp)) + :group 'helm-buffers) + +(defcustom helm-buffers-favorite-modes '(lisp-interaction-mode + emacs-lisp-mode + text-mode + org-mode) + "List of preferred mode to open new buffers with." + :type '(repeat (choice function)) + :group 'helm-buffers) + +(defcustom helm-buffer-max-length 20 + "Max length of buffer names before truncate. +When disabled (nil) use the longest buffer-name length found." + :group 'helm-buffers + :type '(choice (const :tag "Disabled" nil) + (integer :tag "Length before truncate"))) + +(defcustom helm-buffer-details-flag t + "Always show details in buffer list when non--nil." + :group 'helm-buffers + :type 'boolean) + +(defcustom helm-buffers-fuzzy-matching nil + "Fuzzy matching buffer names when non--nil. +Only buffer names are fuzzy matched when this is enabled, +`major-mode' matching is not affected by this." + :group 'helm-buffers + :type 'boolean) + + +;;; Faces +;; +;; +(defface helm-buffer-saved-out + '((t (:foreground "red" :background "black"))) + "Face used for buffer files modified outside of emacs." + :group 'helm-buffers) + +(defface helm-buffer-not-saved + '((t (:foreground "Indianred2"))) + "Face used for buffer files not already saved on disk." + :group 'helm-buffers) + +(defface helm-buffer-size + '((((background dark)) :foreground "RosyBrown") + (((background light)) :foreground "SlateGray")) + "Face used for buffer size." + :group 'helm-buffers) + +(defface helm-buffer-process + '((t (:foreground "Sienna3"))) + "Face used for process status in buffer." + :group 'helm-buffers) + +(defface helm-buffer-directory + '((t (:foreground "DarkRed" :background "LightGray"))) + "Face used for directories in `helm-buffers-list'." + :group 'helm-buffers) + + +;;; Buffers keymap +;; +(defvar helm-buffer-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map helm-map) + (define-key map (kbd "C-c ?") 'helm-buffer-help) + ;; No need to have separate command for grep and zgrep + ;; as we don't use recursivity for buffers. + ;; 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-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) + (define-key map (kbd "M-=") 'helm-buffer-run-ediff-merge) + (define-key map (kbd "C-=") 'helm-buffer-diff-persistent) + (define-key map (kbd "M-U") 'helm-buffer-revert-persistent) + (define-key map (kbd "C-c d") 'helm-buffer-run-kill-persistent) + (define-key map (kbd "M-D") 'helm-buffer-run-kill-buffers) + (define-key map (kbd "C-x C-s") 'helm-buffer-save-persistent) + (define-key map (kbd "C-M-%") 'helm-buffer-run-query-replace-regexp) + (define-key map (kbd "M-%") 'helm-buffer-run-query-replace) + (define-key map (kbd "M-m") 'helm-toggle-all-marks) + (define-key map (kbd "M-a") 'helm-mark-all) + (define-key map (kbd "C-]") 'helm-toggle-buffers-details) + (define-key map (kbd "C-c a") 'helm-buffers-toggle-show-hidden-buffers) + (define-key map (kbd "") 'helm-buffers-mark-similar-buffers) + map) + "Keymap for buffer sources in helm.") + +(defvar helm-buffers-ido-virtual-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map helm-map) + (define-key map (kbd "C-c ?") 'helm-buffers-ido-virtual-help) + (define-key map (kbd "C-c o") 'helm-ff-run-switch-other-window) + (define-key map (kbd "C-c C-o") 'helm-ff-run-switch-other-frame) + (define-key map (kbd "M-g s") 'helm-ff-run-grep) + (define-key map (kbd "M-g z") 'helm-ff-run-zgrep) + (define-key map (kbd "M-D") 'helm-ff-run-delete-file) + (define-key map (kbd "C-c C-x") 'helm-ff-run-open-file-externally) + map)) + + +(defvar helm-buffers-list-cache nil) +(defvar helm-buffer-max-len-mode nil) +(defvar helm-source-buffers-list + `((name . "Buffers") + (init . (lambda () + ;; Issue #51 Create the list before `helm-buffer' creation. + (setq helm-buffers-list-cache (helm-buffer-list)) + (let ((result (cl-loop for b in helm-buffers-list-cache + maximize (length b) into len-buf + maximize (length (with-current-buffer b + (symbol-name major-mode))) + into len-mode + finally return (cons len-buf len-mode)))) + (unless helm-buffer-max-length + (setq helm-buffer-max-length (car result))) + (unless helm-buffer-max-len-mode + ;; If a new buffer is longer that this value + ;; this value will be updated + (setq helm-buffer-max-len-mode (cdr result)))))) + (candidates . helm-buffers-list-cache) + (no-matchplugin) + (type . buffer) + (match helm-buffers-list--match-fn) + (persistent-action . helm-buffers-list-persistent-action) + (keymap . ,helm-buffer-map) + (volatile) + (mode-line . helm-buffer-mode-line-string) + (persistent-help + . "Show this buffer / C-u \\[helm-execute-persistent-action]: Kill this buffer"))) + +(defvar helm-source-buffer-not-found + `((name . "Create buffer") + (keymap . ,helm-map) + (dummy) + (action . (lambda (candidate) + (let ((mjm (and helm-current-prefix-arg + (intern-soft (helm-comp-read + "Major-mode: " + helm-buffers-favorite-modes)))) + (buffer (get-buffer-create candidate))) + (if mjm + (with-current-buffer buffer (funcall mjm)) + (set-buffer-major-mode buffer)) + (helm-switch-to-buffer buffer)))))) + +(defvar ido-temp-list) +(defvar ido-ignored-list) +(defvar ido-process-ignore-lists) + +(defvar helm-source-ido-virtual-buffers + `((name . "Ido virtual buffers") + (candidates . (lambda () + (let (ido-temp-list + ido-ignored-list + (ido-process-ignore-lists t)) + (when ido-use-virtual-buffers + (ido-add-virtual-buffers-to-list) + ido-virtual-buffers)))) + (keymap . ,helm-buffers-ido-virtual-map) + (mode-line . helm-buffers-ido-virtual-mode-line-string) + (action . (("Find file" . helm-find-many-files) + ("Find file other window" . find-file-other-window) + ("Find file other frame" . find-file-other-frame) + ("Find file as root" . helm-find-file-as-root) + ("Grep File(s) `C-u recurse'" . helm-find-files-grep) + ("Zgrep File(s) `C-u Recurse'" . helm-ff-zgrep) + ("View file" . view-file) + ("Delete file(s)" . helm-delete-marked-files) + ("Open file externally (C-u to choose)" + . helm-open-file-externally))))) + + +(defvar ido-use-virtual-buffers) +(defun helm-buffer-list () + "Return the current list of buffers. +Currently visible buffers are put at the end of the list. +See `ido-make-buffer-list' for more infos." + (require 'ido) + (let ((ido-process-ignore-lists t) + ido-ignored-list + ido-use-virtual-buffers) + (ido-make-buffer-list nil))) + +(defun helm-buffer-size (buffer) + "Return size of BUFFER." + (with-current-buffer buffer + (save-restriction + (widen) + (helm-file-human-size + (- (position-bytes (point-max)) + (position-bytes (point-min))))))) + +(defun helm-buffer--show-details (buf-name prefix help-echo + size mode dir face1 face2 + proc details type) + (append + (list + (concat prefix + (propertize buf-name 'face face1 + 'help-echo help-echo + 'type type))) + (and details + (list size mode + (propertize + (if proc + (format "(%s %s in `%s')" + (process-name proc) + (process-status proc) dir) + (format "(in `%s')" dir)) + 'face face2))))) + +(defun helm-buffer--details (buffer &optional details) + (let* ((mode (with-current-buffer buffer (format-mode-line mode-name))) + (buf (get-buffer buffer)) + (size (propertize (helm-buffer-size buf) + 'face 'helm-buffer-size)) + (proc (get-buffer-process buf)) + (dir (with-current-buffer buffer (abbreviate-file-name default-directory))) + (file-name (helm-aif (buffer-file-name buf) (abbreviate-file-name it))) + (name (buffer-name buf)) + (name-prefix (when (file-remote-p dir) + (propertize "@ " 'face 'helm-ff-prefix)))) + (cond + ( ;; A dired buffer. + (rassoc buf dired-buffers) + (helm-buffer--show-details + name name-prefix dir size mode dir + 'helm-buffer-directory 'helm-buffer-process nil details 'dired)) + ;; A buffer file modified somewhere outside of emacs.=>red + ((and file-name (file-exists-p file-name) + (not (verify-visited-file-modtime buf))) + (helm-buffer--show-details + name name-prefix file-name size mode dir + 'helm-buffer-saved-out 'helm-buffer-process nil details 'modout)) + ;; A new buffer file not already saved on disk.=>indianred2 + ((and file-name (not (verify-visited-file-modtime buf))) + (helm-buffer--show-details + name name-prefix file-name size mode dir + 'helm-buffer-not-saved 'helm-buffer-process nil details 'notsaved)) + ;; A buffer file modified and not saved on disk.=>orange + ((and file-name (buffer-modified-p buf)) + (helm-buffer--show-details + name name-prefix file-name size mode dir + 'helm-ff-symlink 'helm-buffer-process nil details 'mod)) + ;; A buffer file not modified and saved on disk.=>green + (file-name + (helm-buffer--show-details + name name-prefix file-name size mode dir + 'font-lock-type-face 'helm-buffer-process nil details 'filebuf)) + ;; Any non--file buffer.=>grey italic + (t + (helm-buffer--show-details + name (and proc name-prefix) dir size mode dir + 'italic 'helm-buffer-process proc details 'nofile))))) + +(defun helm-highlight-buffers (buffers _source) + "Transformer function to highlight BUFFERS list. +Should be called after others transformers i.e (boring buffers)." + (cl-loop for i in buffers + for (name size mode meta) = (if helm-buffer-details-flag + (helm-buffer--details i 'details) + (helm-buffer--details i)) + for truncbuf = (if (> (string-width name) helm-buffer-max-length) + (helm-substring-by-width + name helm-buffer-max-length) + (concat name (make-string + (- (+ helm-buffer-max-length 3) + (string-width name)) ? ))) + for len = (length mode) + when (> len helm-buffer-max-len-mode) + do (setq helm-buffer-max-len-mode len) + for fmode = (concat (make-string + (- (max helm-buffer-max-len-mode len) len) ? ) + mode) + ;; The max length of a number should be 1023.9X where X is the + ;; units, this is 7 characters. + for formatted-size = (and size (format "%7s" size)) + collect (cons (if helm-buffer-details-flag + (concat truncbuf "\t" formatted-size + " " fmode " " meta) + name) + i))) + +(defun helm-buffer--get-preselection (buffer-name) + (concat "^" + (if (and (null helm-buffer-details-flag) + (numberp helm-buffer-max-length) + (> (string-width buffer-name) + helm-buffer-max-length)) + (regexp-quote + (helm-substring-by-width + buffer-name helm-buffer-max-length)) + (concat (regexp-quote buffer-name) + (if helm-buffer-details-flag + "$" "[[:blank:]]+"))))) + +(defun helm-toggle-buffers-details () + (interactive) + (let ((preselect (helm-buffer--get-preselection + (helm-get-selection)))) + (when helm-alive-p + (setq helm-buffer-details-flag (not helm-buffer-details-flag)) + (helm-force-update preselect)))) + +(defun helm-buffers-sort-transformer (candidates _source) + (if (string= helm-pattern "") + candidates + (sort candidates + #'(lambda (s1 s2) + (< (string-width s1) (string-width s2)))))) + +(defun helm-buffers-mark-similar-buffers-1 () + (with-helm-window + (let ((type (get-text-property + 0 'type (helm-get-selection nil 'withprop)))) + (save-excursion + (goto-char (helm-get-previous-header-pos)) + (helm-next-line) + (let* ((next-head (helm-get-next-header-pos)) + (end (and next-head + (save-excursion + (goto-char next-head) + (forward-line -1) + (point)))) + (maxpoint (or end (point-max)))) + (while (< (point) maxpoint) + (helm-mark-current-line) + (let ((cand (helm-get-selection nil 'withprop))) + (when (and (not (helm-this-visible-mark)) + (eq (get-text-property 0 'type cand) type)) + (helm-make-visible-mark))) + (forward-line 1) (end-of-line)))) + (helm-mark-current-line) + (message "%s candidates marked" (length helm-marked-candidates))))) + +(defun helm-buffers-mark-similar-buffers () + "Mark All buffers that have same property `type' than current. +i.e same color." + (interactive) + (let ((marked (helm-marked-candidates))) + (if (and (>= (length marked) 1) + (with-helm-window helm-visible-mark-overlays)) + (helm-unmark-all) + (helm-buffers-mark-similar-buffers-1)))) + + +;;; match functions +;; +(defun helm-buffer--match-mjm (pattern mjm) + (when (string-match "\\`\\*" pattern) + (setq pattern (split-string (substring pattern 1) ",")) + (cl-loop for pat in pattern + if (string-match "\\`!" pat) + collect (string-match (substring pat 1) mjm) into neg + else collect (string-match pat mjm) into pos + finally return + (or (and pos (cl-loop for i in pos + thereis (numberp i))) + (and neg (not (cl-loop for i in neg + thereis (numberp i)))))))) + +(defun helm-buffer--match-pattern (pattern candidate) + (let ((fun (if (and helm-buffers-fuzzy-matching + (not (string-match "\\`\\^" pattern))) + #'helm--mapconcat-candidate + #'identity))) + (if (string-match "\\`!" pattern) + (not (string-match (funcall fun (substring pattern 1)) + candidate)) + (string-match (funcall fun pattern) candidate)))) + +(defun helm-buffers-list--match-fn (candidate) + "Match maybe buffer by major-mode. +If you give a major-mode or partial major-mode, +it will list all buffers of this major-mode and/or buffers with name +matching this major-mode. +If you add a space after major-mode and then a space, +it will match all buffers of the major-mode +before space matching pattern after space. +If you give a pattern which doesn't match a major-mode, it will search buffer +with name matching pattern." + (let* ((cand (replace-regexp-in-string "^\\s-\\{1\\}" "" candidate)) + (buf (get-buffer cand)) + (buf-fname (buffer-file-name buf))) + (when buf + (with-current-buffer buf + (let ((mjm (format-mode-line mode-name)) + (split (split-string helm-pattern))) + (cond ((string-match "^@" helm-pattern) ; match inside. + (or (helm-buffers-match-inside cand split) + (helm-buffer--match-pattern helm-pattern cand))) + ;; Continue showing buffer after mjm matching and a space. + ((string-match "\\`\\*.*\\s-$" helm-pattern) + (helm-buffer--match-mjm (car split) mjm)) + ((and (string-match "\\s-[@]" helm-pattern) (cdr split)) + (and (or (helm-buffer--match-mjm (car split) mjm) + (and buf-fname + (string-match "\\`/" helm-pattern) + (string-match + (substring (car split) 1) + (helm-basedir buf-fname))) + (helm-buffer--match-pattern (car split) cand)) + (helm-buffers-match-inside cand (cdr split)))) + ;; Continue showing buffers after entering @ after a space. + ((string-match "\\s-[@]" helm-pattern) + (or (helm-buffer--match-mjm (car split) mjm) + (and buf-fname + (string-match "\\`/" helm-pattern) + (string-match + (substring (car split) 1) + (helm-basedir buf-fname))) + (helm-buffer--match-pattern (car split) cand))) + ;; Match on major-mode and multiple patterns. + ((and (string-match "\\`\\*" helm-pattern) (cdr split)) + (and (helm-buffer--match-mjm (car split) mjm) + (cl-loop for i in (cdr split) always + (helm-buffer--match-pattern i cand)))) + ;; Match only on major-mode. + ((string-match "\\`\\*" helm-pattern) + (helm-buffer--match-mjm (car split) mjm)) + ;; Match on dir of buffer-file-name and multiple patterns. + ((and (string-match "\\`/" helm-pattern) buf-fname (cdr split)) + ;; Exact match for this is better to match end of dir [1]. + (and (string-match + (substring (car split) 1) (helm-basedir buf-fname)) + (cl-loop for i in (cdr split) always + (helm-buffer--match-pattern i cand)))) + ;; Match only on dir of buffer-file-name. + ((and (string-match "\\`/" helm-pattern) buf-fname) + ;; [1] same. + (string-match + (substring (car split) 1) (helm-basedir buf-fname))) + ;; Normal string matching on multiple patterns. + ((string-match "\\s-" helm-pattern) + (cl-loop for i in split always + (helm-buffer--match-pattern i cand))) + ;; Normal string matching. + (t (helm-buffer--match-pattern helm-pattern cand)))))))) + +(defun helm-buffers-match-inside (candidate lst) + (cl-loop for i in lst always + (cond ((string-match "\\`[\\]@" i) + (helm-buffer--match-pattern i candidate)) + ((string-match "\\`@\\(.*\\)" i) + (save-excursion + (let ((str (match-string 1 i))) + (goto-char (point-min)) + (re-search-forward str nil t)))) + (t (helm-buffer--match-pattern i candidate))))) + + +(defun helm-buffer-query-replace-1 (&optional regexp-flag) + "Query replace in marked buffers. +If REGEXP-FLAG is given use `query-replace-regexp'." + (let ((fn (if regexp-flag 'query-replace-regexp 'query-replace)) + (prompt (if regexp-flag "Query replace regexp" "Query replace")) + (bufs (helm-marked-candidates)) + (helm--reading-passwd-or-string t)) + (cl-loop with replace = (query-replace-read-from prompt regexp-flag) + with tostring = (unless (consp replace) + (query-replace-read-to + replace prompt regexp-flag)) + for buf in bufs + do + (save-window-excursion + (helm-switch-to-buffer buf) + (save-excursion + (let ((case-fold-search t)) + (goto-char (point-min)) + (if (consp replace) + (apply fn (list (car replace) (cdr replace))) + (apply fn (list replace tostring))))))))) + +(defun helm-buffer-query-replace-regexp (_candidate) + (helm-buffer-query-replace-1 'regexp)) + +(defun helm-buffer-query-replace (_candidate) + (helm-buffer-query-replace-1)) + +(defun helm-buffer-toggle-diff (candidate) + "Toggle diff buffer CANDIDATE with it's file." + (let (helm-persistent-action-use-special-display) + (helm-aif (get-buffer-window "*Diff*") + (progn (kill-buffer "*Diff*") + (set-window-buffer it helm-current-buffer)) + (diff-buffer-with-file (get-buffer candidate))))) + +(defun helm-buffer-diff-persistent () + "Toggle diff buffer without quitting helm." + (interactive) + (with-helm-alive-p + (helm-attrset 'diff-action 'helm-buffer-toggle-diff) + (helm-execute-persistent-action 'diff-action))) + +(defun helm-revert-buffer (candidate) + (with-current-buffer candidate + (when (buffer-file-name) (revert-buffer t t)))) + +(defun helm-revert-marked-buffers (_ignore) + (mapc 'helm-revert-buffer (helm-marked-candidates))) + +(defun helm-buffer-revert-and-update (_candidate) + (let ((marked (helm-marked-candidates)) + (preselect (helm-get-selection nil t))) + (cl-loop for buf in marked do (helm-revert-buffer buf)) + (when (> (length marked) 1) (helm-unmark-all)) + (helm-force-update (regexp-quote preselect)))) + +(defun helm-buffer-revert-persistent () + "Revert buffer without quitting helm." + (interactive) + (with-helm-alive-p + (helm-attrset 'revert-action '(helm-buffer-revert-and-update . never-split)) + (helm-execute-persistent-action 'revert-action))) + +(defun helm-buffer-save-and-update (_candidate) + (let ((marked (helm-marked-candidates)) + (preselect (helm-get-selection nil t)) + (enable-recursive-minibuffers t)) + (cl-loop for buf in marked do + (with-current-buffer (get-buffer buf) + (when (buffer-file-name) (save-buffer)))) + (when (> (length marked) 1) (helm-unmark-all)) + (helm-force-update (regexp-quote preselect)))) + +(defun helm-buffer-save-persistent () + "Save buffer without quitting helm." + (interactive) + (with-helm-alive-p + (helm-attrset 'save-action '(helm-buffer-save-and-update . never-split)) + (helm-execute-persistent-action 'save-action))) + +(defun helm-buffer-run-kill-persistent () + "Kill buffer without quitting helm." + (interactive) + (with-helm-alive-p + (helm-attrset 'kill-action '(helm-buffers-persistent-kill . never-split)) + (helm-execute-persistent-action 'kill-action))) + +(defun helm-kill-marked-buffers (_ignore) + (mapc 'kill-buffer (helm-marked-candidates))) + +(defun helm-buffer-run-kill-buffers () + "Run kill buffer action from `helm-source-buffers-list'." + (interactive) + (with-helm-alive-p + (helm-quit-and-execute-action 'helm-kill-marked-buffers))) + +(defun helm-buffer-run-grep () + "Run Grep action from `helm-source-buffers-list'." + (interactive) + (with-helm-alive-p + (helm-quit-and-execute-action 'helm-grep-buffers))) + +(defun helm-buffer-run-zgrep () + "Run Grep action from `helm-source-buffers-list'." + (interactive) + (with-helm-alive-p + (helm-quit-and-execute-action 'helm-zgrep-buffers))) + +(defun helm-buffer-run-query-replace-regexp () + "Run Query replace regexp action from `helm-source-buffers-list'." + (interactive) + (with-helm-alive-p + (helm-quit-and-execute-action 'helm-buffer-query-replace-regexp))) + +(defun helm-buffer-run-query-replace () + "Run Query replace action from `helm-source-buffers-list'." + (interactive) + (with-helm-alive-p + (helm-quit-and-execute-action 'helm-buffer-query-replace))) + +(defun helm-buffer-switch-other-window () + "Run switch to other window action from `helm-source-buffers-list'." + (interactive) + (with-helm-alive-p + (helm-quit-and-execute-action 'switch-to-buffer-other-window))) + +(defun helm-buffer-switch-other-frame () + "Run switch to other frame action from `helm-source-buffers-list'." + (interactive) + (with-helm-alive-p + (helm-quit-and-execute-action 'switch-to-buffer-other-frame))) + +(defun helm-buffer-switch-to-elscreen () + "Run switch to elscreen action from `helm-source-buffers-list'." + (interactive) + (with-helm-alive-p + (helm-quit-and-execute-action 'helm-find-buffer-on-elscreen))) + +(defun helm-buffer-run-ediff () + "Run ediff action from `helm-source-buffers-list'." + (interactive) + (with-helm-alive-p + (helm-quit-and-execute-action 'helm-ediff-marked-buffers))) + +(defun helm-buffer-run-ediff-merge () + "Run ediff action from `helm-source-buffers-list'." + (interactive) + (with-helm-alive-p + (helm-quit-and-execute-action 'helm-ediff-marked-buffers-merge))) + +(defun helm-buffers-persistent-kill (buffer) + "Persistent action to kill buffer." + (with-current-buffer (get-buffer buffer) + (if (and (buffer-modified-p) + (buffer-file-name (current-buffer))) + (progn + (save-buffer) + (kill-buffer buffer)) + (kill-buffer buffer))) + (helm-delete-current-selection) + (when (helm-empty-source-p) (helm-next-source)) + (with-helm-temp-hook 'helm-after-persistent-action-hook + (helm-force-update (regexp-quote (helm-get-selection nil t))))) + +(defun helm-buffers-list-persistent-action (candidate) + (if current-prefix-arg + (helm-buffers-persistent-kill candidate) + (helm-switch-to-buffer candidate))) + +(defun helm-ediff-marked-buffers (_candidate &optional merge) + "Ediff 2 marked buffers or CANDIDATE and `helm-current-buffer'. +With optional arg MERGE call `ediff-merge-buffers'." + (let ((lg-lst (length (helm-marked-candidates))) + buf1 buf2) + (cl-case lg-lst + (0 + (error "Error:You have to mark at least 1 buffer")) + (1 + (setq buf1 helm-current-buffer + buf2 (cl-first (helm-marked-candidates)))) + (2 + (setq buf1 (cl-first (helm-marked-candidates)) + buf2 (cl-second (helm-marked-candidates)))) + (t + (error "Error:To much buffers marked!"))) + (if merge + (ediff-merge-buffers buf1 buf2) + (ediff-buffers buf1 buf2)))) + +(defun helm-ediff-marked-buffers-merge (candidate) + "Ediff merge `helm-current-buffer' with CANDIDATE. +See `helm-ediff-marked-buffers'." + (helm-ediff-marked-buffers candidate t)) + +(defun helm-multi-occur-as-action (_candidate) + "Multi occur action for `helm-source-buffers-list'. +Can be used by any source that list buffers." + (let ((helm-moccur-always-search-in-current + (if helm-current-prefix-arg + (not helm-moccur-always-search-in-current) + helm-moccur-always-search-in-current)) + (buffers (helm-marked-candidates)) + (input (cl-loop for i in (split-string helm-pattern " " t) + thereis (and (string-match "\\`@\\(.*\\)" i) + (match-string 1 i))))) + (helm-multi-occur-1 buffers input))) + +(defun helm-buffers-run-multi-occur () + "Run `helm-multi-occur-as-action' by key." + (interactive) + (with-helm-alive-p + (helm-quit-and-execute-action 'helm-multi-occur-as-action))) + +(defun helm-buffers-toggle-show-hidden-buffers () + (interactive) + (with-helm-alive-p + (let ((filter-attrs (helm-attr 'filtered-candidate-transformer + helm-source-buffers-list))) + (if (memq 'helm-shadow-boring-buffers filter-attrs) + (helm-attrset 'filtered-candidate-transformer + (cons 'helm-skip-boring-buffers + (remove 'helm-shadow-boring-buffers + filter-attrs)) + helm-source-buffers-list t) + (helm-attrset 'filtered-candidate-transformer + (cons 'helm-shadow-boring-buffers + (remove 'helm-skip-boring-buffers + filter-attrs)) + helm-source-buffers-list t)) + (helm-force-update)))) + + +;;; Candidate Transformers +;; +;; +(defun helm-skip-boring-buffers (buffers _source) + (helm-skip-entries buffers helm-boring-buffer-regexp-list)) + +(defun helm-shadow-boring-buffers (buffers _source) + "Buffers matching `helm-boring-buffer-regexp' will be +displayed with the `file-name-shadow' face if available." + (helm-shadow-entries buffers helm-boring-buffer-regexp-list)) + + +(define-helm-type-attribute 'buffer + `((action + ("Switch to buffer" . helm-switch-to-buffer) + ,(and (locate-library "popwin") '("Switch to buffer in popup window" . popwin:popup-buffer)) + ("Switch to buffer other window" . switch-to-buffer-other-window) + ("Switch to buffer other frame" . switch-to-buffer-other-frame) + ,(and (locate-library "elscreen") '("Display buffer in Elscreen" . helm-find-buffer-on-elscreen)) + ("Query replace regexp" . helm-buffer-query-replace-regexp) + ("Query replace" . helm-buffer-query-replace) + ("View buffer" . view-buffer) + ("Display buffer" . display-buffer) + ("Grep buffers (C-u grep all buffers)" . helm-zgrep-buffers) + ("Multi occur buffer(s)" . helm-multi-occur-as-action) + ("Revert buffer(s)" . helm-revert-marked-buffers) + ("Insert buffer" . insert-buffer) + ("Kill buffer(s)" . helm-kill-marked-buffers) + ("Diff with file" . diff-buffer-with-file) + ("Ediff Marked buffers" . helm-ediff-marked-buffers) + ("Ediff Merge marked buffers" . (lambda (candidate) + (helm-ediff-marked-buffers candidate t)))) + (persistent-help . "Show this buffer") + (filtered-candidate-transformer helm-skip-boring-buffers + helm-buffers-sort-transformer + helm-highlight-buffers)) + "Buffer or buffer name.") + +;;;###autoload +(defun helm-buffers-list () + "Preconfigured `helm' to list buffers." + (interactive) + (helm :sources '(helm-source-buffers-list + helm-source-ido-virtual-buffers + helm-source-buffer-not-found) + :buffer "*helm buffers*" + :keymap helm-buffer-map + :truncate-lines t)) + +(provide 'helm-buffers) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions obsolete) +;; coding: utf-8 +;; indent-tabs-mode: nil +;; End: + +;;; helm-buffers.el ends here diff --git a/elpa/helm-20140808.2300/helm-buffers.elc b/elpa/helm-20140808.2300/helm-buffers.elc new file mode 100644 index 0000000000000000000000000000000000000000..1d4340cfac8071360c3013bf5e1bdfa64d324824 GIT binary patch literal 26216 zcmdU23v(OCk>{xf810tstz|_0i$<=m-1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@8le{&AiOW6U6E%S>TtvpllqLXbXq>_7tM!A!1|1zA~|mT__QS>2ozIMSubf{3U6?;kw6bAaMoaOra^K6&ks^BG)9HiMoeXQgWiAD2pD=G|G&&nPxSz^JSt zo1s_{A9`*l{5cs>(&#`hGo$rjUs#uiUFyPp;fG7u2G&Uu(4ORSitUt3!_U~!w$R2L z@csQg#PYPPR$*f}pE(Vrh5#pIz8xVyt#b+<@>j$DO4CI}teUTsX6Iwo3{1yg4ouyd zdk0Kp?EV!cbyBSi>Bvqz{fyfHafP981tm)$0#nuIPtaymb%Dx{>A&`Bvuv54h(ra|gv_eb zp!y9Z<}dk}gvdLUnTiwzMU&oZ_TvR+>4~@CHEp~)}2!2ydle|2n#)HLy zxnWP*q{Ye47mjmH%bO45HCs1L9ZMSCpja%hIwQlz7(;3^L64ecpf7DP-iky^22&4#kmjta9h zHq2EN!r-s%#MW|=Pqtxlm5=`9+u||^%yLlQPzR*3&| zfV_F6F!GlMmFgaLdnCm&meBG&Y&n6|@pe}1ad(LS>kC&b!TF&6HmkQ`i{EFFfjq>L zR2Ey`Vxf=-63P(8OiB3^o2q$xU+iQ%Wt<+j7%8(~bDiYMRb5Tiwd^uA;m|T*@TKha z^}Kltp!1jAq1PE^GI!}5FaP>RI;%t%sVG(nJ%0>Z-p<{?fO*;f^8vb!x@~g&hPNv3 zQ0zCF<{{6TYK0|)xQKk5ro=^xxJJVv=Z$8QG1qzz2 + +;; 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 . + +;; + +;;; Code: + +(require 'cl-lib) +(require 'helm) + +(declare-function simple-call-tree-analyze "ext:simple-call-tree.el" (&optional test)) + +;; Function is called by +(defvar helm-source-simple-call-tree-functions-callers + '((name . "Function is called by") + (init . helm-simple-call-tree-functions-callers-init) + (multiline) + (candidates . helm-simple-call-tree-candidates) + (persistent-action . helm-simple-call-tree-persistent-action) + (persistent-help . "Show function definitions by rotation") + (action ("Find definition selected by persistent-action" . + helm-simple-call-tree-find-definition))) + "Needs simple-call-tree.el. +http://www.emacswiki.org/cgi-bin/wiki/download/simple-call-tree.el") + +(defvar helm-simple-call-tree-tick nil) +(make-variable-buffer-local 'helm-simple-call-tree-tick) +(defun helm-simple-call-tree-analyze-maybe () + (unless (eq (buffer-chars-modified-tick) helm-simple-call-tree-tick) + (simple-call-tree-analyze) + (setq helm-simple-call-tree-tick (buffer-chars-modified-tick)))) + +(defun helm-simple-call-tree-init-base (function message) + (require 'simple-call-tree) + (with-no-warnings + (when (helm-current-buffer-is-modified) + (helm-simple-call-tree-analyze-maybe) + (let ((list (funcall function simple-call-tree-alist))) + (with-current-buffer (helm-candidate-buffer 'local) + (cl-dolist (entry list) + (let ((funcs (concat " " (mapconcat #'identity (cdr entry) "\n ")))) + (insert (car entry) message + (if (string= funcs " ") + " no functions." + funcs) + "\n\n")))))))) + +(defun helm-simple-call-tree-functions-callers-init () + (helm-simple-call-tree-init-base 'simple-call-tree-invert + " is called by\n")) + +(defun helm-simple-call-tree-candidates () + (with-current-buffer (helm-candidate-buffer) + (split-string (buffer-string) "\n\n"))) + +(defvar helm-simple-call-tree-related-functions nil) +(defvar helm-simple-call-tree-function-index 0) +(defun helm-simple-call-tree-persistent-action (candidate) + (unless (eq last-command 'helm-execute-persistent-action) + (setq helm-simple-call-tree-related-functions + (delete "no functions." + (split-string + (replace-regexp-in-string " \\| is called by\\| calls " + "" candidate) + "\n"))) + (setq helm-simple-call-tree-function-index -1)) + (cl-incf helm-simple-call-tree-function-index) + (helm-simple-call-tree-find-definition candidate)) + +(defun helm-simple-call-tree-find-definition (_candidate) + (find-function + (intern + (nth (mod helm-simple-call-tree-function-index + (length helm-simple-call-tree-related-functions)) + helm-simple-call-tree-related-functions)))) + + +;;; Function calls +(defvar helm-source-simple-call-tree-callers-functions + '((name . "Function calls") + (init . helm-simple-call-tree-callers-functions-init) + (multiline) + (candidates . helm-simple-call-tree-candidates) + (persistent-action . helm-simple-call-tree-persistent-action) + (persistent-help . "Show function definitions by rotation") + (action ("Find definition selected by persistent-action" . + helm-simple-call-tree-find-definition))) + "Needs simple-call-tree.el. +http://www.emacswiki.org/cgi-bin/wiki/download/simple-call-tree.el") + +(defun helm-simple-call-tree-callers-functions-init () + (helm-simple-call-tree-init-base 'identity " calls \n")) + +;;;###autoload +(defun helm-simple-call-tree () + "Preconfigured `helm' for simple-call-tree. List function relationships. + +Needs simple-call-tree.el. +http://www.emacswiki.org/cgi-bin/wiki/download/simple-call-tree.el" + (interactive) + (helm-other-buffer + '(helm-source-simple-call-tree-functions-callers + helm-source-simple-call-tree-callers-functions) + "*helm simple-call-tree*")) + +(provide 'helm-call-tree) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions obsolete) +;; coding: utf-8 +;; indent-tabs-mode: nil +;; End: + +;;; helm-call-tree.el ends here diff --git a/elpa/helm-20140808.2300/helm-call-tree.elc b/elpa/helm-20140808.2300/helm-call-tree.elc new file mode 100644 index 0000000000000000000000000000000000000000..61c005876338aec0c7095c84902ea3d7ca676184 GIT binary patch literal 4038 zcmeHK+iu%N5Vg}baP-nPK-n00P!g$&cCZB-5r59v4#Cn}IW4R0tE`UqEQ zzZBk|aeQ45VowAVM|3VU^`}=v2jp}fJH5wFo7|?;HY!F*9MT9%sPQ_LN!oypMqP%& zOY43^1{2X3%OJFQL$lZH)!kOJnLUE~z}AVBbr~34DxwqKNbjLY;bga6Z`B>MHdA^` z*g)|_t5AIu8Uks(ViqsPD$R_TrZOe}CK93Y$dA2LCn~y1A7M2~H3{E`xASwHgSvZA z(&5L@5yhIkIMM>bQ$4bKcoNzD^W)P~^2Q<&o`#W+%<&@fDUHb!5e+2;u~<4JcP1q% zl0eCX^caF}D?1l3eAOQt@U?%HN~Joy(bD!}Uy?NdLb#mWf$Q)MUoL($_bqyp$ahnf zNb&+ZP(xyDFUhS{_KprZbS9;rQmVp90A-)RTd$0@o;+?eX0usFj+wev^*Fg|cvs3E zs;I#a8h$*BIDU;aI)1HGeK~qB5_71X#?!=;_Nt&gnns@ChA{vb(SvFge2`Qp>sh`? z;0xPlsBhJ%sv@N!V5s_Kl{SlGS2zu{3REO<5A=QI3k~kvre`4n`3ZA8)iTmHxWsI~ zZCgolc{gmHuy5z%ct(Zygix`OoFtsxNvuuAu&?=XRqL4oaTkJ=%0PnFrW}+GwQjW! z2l@6wO|6DA_I`tSx7n%HR#02vhOL!%O_2&97m90X179VEpwDnR8p*`Ys?dY=!0_hm z01+qwq}PjyNCY<@r5%bJ{e}D>O#u268b- z?J)M$NJ&5Qr^KM#0%Qt~js{V66xFQD4NPYY?V(87><;QKC#RF=qe;#d%x!j#*@d=o zVS8sc!H*8E?(RF|6#QYISn&5PzB|I={-DJQ9Os)pKHa@n+ehEsG0#zhs$rqm+t?!d}px1MtgCaeYz`p{!EocOe= z8S7hf<2SQ)9=$ZPkD1h@j72%|2#;C=3uqgl*9SeF1mJDfd?|-B|5XHbjcJS8zFH*` z8KAQIi{hS_jHQOKx~T{};^WH?)Z8H5N>vYGa69{C?XcHR;B)&YlWO>BG7R7IM7n!- zk2484T0e5?+#f_2_c?L4i{=@KRHMm;Ax{kJVJ>^RUT(!XBP2gaZ;Ccv_QFSH*J$l4 zBwvClk&{56qbBl7ewZL=1%615!Qk&@a^W}k&y;h=B#TA1bBjwW{o#^&b5_!E|Lp1M z)BeS#xwPDB3Uq*i%K+hO@7#Mnu zFf#KFT2*2G`oYMc`o)Q;q|4Ma^!@)QBD~MoD~w-EMD9VWosUGHomke#_bYnFqT%Iv zyRJR#9Xb1LdX-3Y$&tF6CKv_Za{fG^QJj?LdV0Y + +;; 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 . + +;;; Code: +(require 'cl-lib) +(require 'helm) + +;;; Customize Face +;; +;; +(defun helm-custom-faces-init () + "Initialize buffer for `helm-source-customize-face'." + (unless (helm-candidate-buffer) + (save-selected-window + (list-faces-display) + (message nil)) + (helm-init-candidates-in-buffer + 'global + (with-current-buffer (get-buffer "*Faces*") + (buffer-substring + (next-single-char-property-change (point-min) 'face) + (point-max)))) + (kill-buffer "*Faces*"))) + +(defvar helm-source-customize-face + '((name . "Customize Face") + (init . helm-custom-faces-init) + (candidates-in-buffer) + (get-line . buffer-substring) + (action . (("Customize" + . (lambda (line) + (customize-face (intern (car (split-string line)))))) + ("Copy name" + . (lambda (line) + (kill-new (car (split-string line " " t)))))))) + "See (info \"(emacs)Faces\")") + +;;; Colors browser +;; +;; +(defun helm-colors-init () + (unless (helm-candidate-buffer) + (save-selected-window + (list-colors-display) + (message nil)) + (helm-init-candidates-in-buffer + 'global + (with-current-buffer (get-buffer "*Colors*") + (buffer-string))) + (kill-buffer "*Colors*"))) + +(defun helm-color-insert-name (candidate) + (with-helm-current-buffer + (insert (helm-colors-get-name candidate)))) + +(defun helm-color-kill-name (candidate) + (kill-new (helm-colors-get-name candidate))) + +(defun helm-color-insert-rgb (candidate) + (with-helm-current-buffer + (insert (helm-colors-get-rgb candidate)))) + +(defun helm-color-kill-rgb (candidate) + (kill-new (helm-colors-get-rgb candidate))) + +(defun helm-color-run-insert-name () + "Insert name of color from `helm-source-colors'" + (interactive) + (with-helm-alive-p (helm-quit-and-execute-action 'helm-color-insert-name))) + +(defun helm-color-run-kill-name () + "Kill name of color from `helm-source-colors'" + (interactive) + (with-helm-alive-p (helm-quit-and-execute-action 'helm-color-kill-name))) + +(defun helm-color-run-insert-rgb () + "Insert RGB of color from `helm-source-colors'" + (interactive) + (with-helm-alive-p (helm-quit-and-execute-action 'helm-color-insert-rgb))) + +(defun helm-color-run-kill-rgb () + "Kill RGB of color from `helm-source-colors'" + (interactive) + (with-helm-alive-p (helm-quit-and-execute-action 'helm-color-kill-rgb))) + +(defvar helm-color-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map helm-map) + (define-key map (kbd "C-c n") 'helm-color-run-insert-name) + (define-key map (kbd "C-c N") 'helm-color-run-kill-name) + (define-key map (kbd "C-c r") 'helm-color-run-insert-rgb) + (define-key map (kbd "C-c R") 'helm-color-run-kill-rgb) + (define-key map (kbd "C-c ?") 'helm-color-help) + map)) + +(defvar helm-source-colors + `((name . "Colors") + (init . helm-colors-init) + (candidates-in-buffer) + (get-line . buffer-substring) + (keymap . ,helm-color-map) + (persistent-help . "Kill entry in RGB format.") + (persistent-action . helm-color-kill-rgb) + (mode-line . helm-color-mode-line-string) + (action + ("Copy Name (C-c N)" . helm-color-kill-name) + ("Copy RGB (C-c R)" . helm-color-kill-rgb) + ("Insert Name (C-c n)" . helm-color-insert-name) + ("Insert RGB (C-c r)" . helm-color-insert-rgb)))) + +(defun helm-colors-get-name (candidate) + "Get color name." + (replace-regexp-in-string + " " "" + (with-temp-buffer + (insert (capitalize candidate)) + (goto-char (point-min)) + (search-forward-regexp "\\s-\\{2,\\}") + (delete-region (point) (point-max)) + (buffer-string)))) + +(defun helm-colors-get-rgb (candidate) + "Get color RGB." + (replace-regexp-in-string + " " "" + (with-temp-buffer + (insert (capitalize candidate)) + (goto-char (point-max)) + (search-backward-regexp "\\s-\\{2,\\}") + (delete-region (point) (point-min)) + (buffer-string)))) + +;;;###autoload +(defun helm-colors () + "Preconfigured `helm' for color." + (interactive) + (helm-other-buffer + '(helm-source-colors helm-source-customize-face) + "*helm colors*")) + +(provide 'helm-color) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions obsolete) +;; coding: utf-8 +;; indent-tabs-mode: nil +;; End: + +;;; helm-color.el ends here diff --git a/elpa/helm-20140808.2300/helm-color.elc b/elpa/helm-20140808.2300/helm-color.elc new file mode 100644 index 0000000000000000000000000000000000000000..6ac06d25081d1cfd7ee939fb49032fdc1b532ad3 GIT binary patch literal 5667 zcmds5-A@}w5Qm~h)Rn5f^|8az3LE8&@6N^$9ujcU2&F|8X`e7s)^}@j;(X`qp7}`H z|GmH2z4Hf#sv%IRJ#^Tf-JPAC&)@9ctDigHEiElo_V)IulMP34A|vWu(@^9u@M`xL z5gugOc|FNOkx-V>TanZLctEsEUhA2+^UQ0K-|(7-MPFq@>VpYw{jR0bTi~%(mqQWi zdbA~zk=Qzu$Pbp6F}F!^7)?^B zB$kTuGfeaYyDv=eSq}^Fxlg51srIgO>4sS($?3v6c)hi*@9`IYef(&&9Xe6+{Ww;V z!o*GD9Y*fv-UGZ?~L(vHdZ0F80$QP{iNF$q1=EH zs{OR~eWe=7K2{1%8)mwlXC`Sk247k~X;|6lIb>64{lP7E4 z0P^EFo`=`}@nr`G!k8D3J(-6EUdtSFv!L*B8$5j++V|GpTe9y<{0zEI^sxqpMlC)T zV@9DCD>ED+jsz50oIXzBB&kSTw1uI-e=?Eqp2)q7(&cY8=wqW>xx+ZnTG~xn%?>58&I_eRu^uG?K`*ry14(I| z7;_qJyKrWE7S?`woAgW9tQ5-A^quGJb+q%yxGw1r@uAip|bp@(g8tARc%O89euHu4)@qZ`@g| zdDvCs^oFycgt2!8t0tL1atkBy#gyyPtY#+^|EVtlW8^L>kSnibI7UG&((Kgkb2~|; zAhvTnPE!;hSDUj{WY=E3}!SDl%8??`rsiQ!#eU~>S89U@2w2r#@!iZc-Ac*N)^UhkFSWyHuqOU z(B3K4z_n!pzD$~MhhjuG`Ua0U$d^}3klYBCK`^*{-NI%|F$jH@!i|RK%~62rylE znjmAtZ~+k;D$;74GiJR7{)7CtSh!GnwF=m;(PuDR;G;1bf5Ukd1a-~bH%AisAzTyG zS&W(aMV>EFx~VIr-Y|2B2DJp^GqqqsE`T&K+l=(Xgl2rkUb%67~% zi0YQ!*_yIMVkNqPe;7Q4&xz-(DTaL|>YFsr2t5;!`1EZfjpi3WOax9F>FqDqLJn)$ zv%&4P0p7V=^&0P@KP=7n2+j4jzl^{wZV=FR;wC`JfxH^Q;mYoZ+ZM+`cbQ7XO*C4Z zNt;QVxg3swhW}Z!-1>?U2cPn;-njs`hOw^&pDKdspl;rV^c zxw~83SOmNDtCF~v>Boby!rh{Q%^T+4%f#&67hEPtr?*TslphnEaOIXSmq0 w&Pr87nlB4;q`8ZR8abOhYI6s!Xt?#Tu(#E0H7A7~_cRv_kc)da7OPhI3qfSk#sB~S literal 0 HcmV?d00001 diff --git a/elpa/helm-20140808.2300/helm-command.el b/elpa/helm-20140808.2300/helm-command.el new file mode 100644 index 000000000..57631cd7c --- /dev/null +++ b/elpa/helm-20140808.2300/helm-command.el @@ -0,0 +1,200 @@ +;;; helm-command.el --- Helm execute-exended-command. -*- lexical-binding: t -*- + +;; Copyright (C) 2012 ~ 2014 Thierry Volpiatto + +;; 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 . + +;;; Code: + +(require 'cl-lib) +(require 'helm) +(require 'helm-mode) +(require 'helm-elisp) + + +(defgroup helm-command nil + "Emacs command related Applications and libraries for Helm." + :group 'helm) + +(defcustom helm-M-x-requires-pattern 0 + "Value of requires-pattern for `helm-M-x'. +Show all candidates on startup when 0 (default)." + :group 'helm-command + :type 'boolean) + +(defcustom helm-M-x-always-save-history nil + "`helm-M-x' Save command in `extended-command-history' even when it fail." + :group 'helm-command + :type 'boolean) + +(defcustom helm-M-x-reverse-history nil + "The history source of `helm-M-x' appear in second position when non--nil." + :group 'helm-command + :type 'boolean) + + +;;; Faces +;; +;; +(defface helm-M-x-key '((t (:foreground "orange" :underline t))) + "Face used in helm-M-x to show keybinding." + :group 'helm-command) + + +(defvar helm-M-x-input-history nil) + +(defvar helm-M-x-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map helm-map) + (define-key map (kbd "C-c ?") 'helm-M-x-help) + map) + "Keymap for `helm-M-x'.") + + +(cl-defun helm-M-x-get-major-mode-command-alist (mode-map) + "Return alist of MODE-MAP." + (cl-loop for key being the key-seqs of mode-map using (key-bindings com) + for str-key = (key-description key) + for ismenu = (string-match "" str-key) + unless ismenu collect (cons str-key com))) + +(defun helm-get-mode-map-from-mode (mode) + "Guess the mode-map name according to MODE. +Some modes don't use conventional mode-map name +so we need to guess mode-map name. e.g python-mode ==> py-mode-map. +Return nil if no mode-map found." + (cl-loop ;; Start with a conventional mode-map name. + with mode-map = (intern-soft (format "%s-map" mode)) + with mode-string = (symbol-name mode) + with mode-name = (replace-regexp-in-string "-mode" "" mode-string) + while (not mode-map) + for count downfrom (length mode-name) + ;; Return when no result after parsing entire string. + when (eq count 0) return nil + for sub-name = (substring mode-name 0 count) + do (setq mode-map (intern-soft (format "%s-map" (concat sub-name "-mode")))) + finally return mode-map)) + +(defun helm-M-x-current-mode-map-alist () + "Return mode-map alist of current `major-mode'." + (let ((map (helm-get-mode-map-from-mode major-mode))) + (when (and map (boundp map)) + (helm-M-x-get-major-mode-command-alist (symbol-value map))))) + + +(defun helm-M-x-transformer (candidates _source) + "filtered-candidate-transformer to show bindings in emacs commands. +Show global bindings and local bindings according to current `major-mode'." + (with-helm-current-buffer + (cl-loop with local-map = (helm-M-x-current-mode-map-alist) + for cand in candidates + for local-key = (car (rassq cand local-map)) + for key = (substitute-command-keys (format "\\[%s]" cand)) + collect + (cons (cond ((and (string-match "^M-x" key) local-key) + (format "%s (%s)" + cand (propertize + local-key + 'face 'helm-M-x-key))) + ((string-match "^M-x" key) cand) + (t (format "%s (%s)" + cand (propertize + key + 'face 'helm-M-x-key)))) + cand) + into ls + finally return + (sort ls #'helm-generic-sort-fn)))) + +(defun helm-M-x--notify-prefix-arg () + ;; Notify a prefix-arg set AFTER calling M-x. + (when prefix-arg + (with-helm-window + (helm-display-mode-line (helm-get-current-source) 'force)))) + +;;;###autoload +(defun helm-M-x () + "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'. + +You can get help on each command by persistent action." + (interactive) + (let* ((history (cl-loop for i in extended-command-history + when (commandp (intern i)) collect i)) + command sym-com in-help help-cand + (helm--mode-line-display-prefarg t) + (pers-help #'(lambda (candidate) + (let ((hbuf (get-buffer (help-buffer)))) + (if (and in-help (string= candidate help-cand) + (null helm-persistent-action-use-special-display)) + (progn + ;; When M-x is started from a help buffer, + ;; Don't kill it as it is helm-current-buffer. + (unless (equal hbuf helm-current-buffer) + (kill-buffer hbuf) + (set-window-buffer (get-buffer-window hbuf) + helm-current-buffer)) + (setq in-help nil)) + (helm-describe-function candidate) + (setq in-help t)) + (setq help-cand candidate)))) + (tm (run-at-time 1 0.1 'helm-M-x--notify-prefix-arg))) + (setq current-prefix-arg nil) + (unwind-protect + (setq command (helm-comp-read + "M-x " obarray + :test 'commandp + :requires-pattern helm-M-x-requires-pattern + :name "Emacs Commands" + :buffer "*helm M-x*" + :persistent-action pers-help + :persistent-help "Describe this command" + :history history + :reverse-history helm-M-x-reverse-history + :del-input nil + :mode-line helm-M-x-mode-line + :must-match t + :nomark t + :keymap helm-M-x-map + :candidates-in-buffer t + :fc-transformer 'helm-M-x-transformer)) + (cancel-timer tm) + (setq helm--mode-line-display-prefarg nil)) + (setq sym-com (intern command)) + (setq current-prefix-arg helm-current-prefix-arg) + ;; Avoid having `this-command' set to *exit-minibuffer. + (setq this-command sym-com + ;; Handle C-x z (repeat) Issue #322 + real-this-command sym-com) + (let ((prefix-arg current-prefix-arg)) + ;; This ugly construct is to save history even on error. + (unless helm-M-x-always-save-history + (command-execute sym-com 'record)) + (setq extended-command-history + (cons command (delete command history))) + (when helm-M-x-always-save-history + (command-execute sym-com 'record))))) + +(provide 'helm-command) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions obsolete) +;; coding: utf-8 +;; indent-tabs-mode: nil +;; End: + +;;; helm-command.el ends here diff --git a/elpa/helm-20140808.2300/helm-command.elc b/elpa/helm-20140808.2300/helm-command.elc new file mode 100644 index 0000000000000000000000000000000000000000..6f45e57f29d1ed0704ad893bc21eccee853624c1 GIT binary patch literal 6070 zcmbtY`*YjI5vCqyTzTqAG99P+q3xQgBGDtzc#)LoI*}|Xsq47*SaxPIqB=f;M+p@O zzyK&&`Rn`b9zar(<(W>TAs&ajy}i9}zumnj2S4w9Q>)cho;-O%d&xKrBR!S7bu_kkfW2jJwOr4(O;eDJ$0{DSbR?3(m=1UtokL8Bd0oHdwH*0& z5f-PUBB+xV;W+$F73h$+R^;Q`(=azGOmdym@G@58FrZ-)_ANc3a zzj*U6e)ZBuw+?>YzQ@BHhli~h8IFqv4?iD2baXoV`?zvf?uKD5hPcjmU(EWuJf`gL zdfeaTx7+)(+^WCGcW;&NVKxtvJj~&-ULqCB+T8{nW%|P;%rpg&6@>$0^vcB=vwZ~2 zItufYf=ON^V{52`NM+hO$&yKGzL&_RIE<)aKwULuI#LBtxSOU?7#JKALkM$aDhmO= zQIgR=F>9+qJtOqmOy}sQ25>o1=B4$~Ds|4SR24vGOruE*?~UZnzCx=N2--b*?RVagk(~H#CJ2Z|FMH2JCc>y)sn7 zzWrW*EOZPX1fGRoD#7cd&!Lwn7Zx;9VFbmds$}?@<^P`=Z%?rYrP_Hi$pW$8oN_8n z;rFaouE8fmN|QX4{SY;nR4l9ydR*J$k%FwLZfE+EHZ}^{=m8s=F#%DHBvbK;hHdet zK`ybTqSxYspKafk_F;cmZC@`|^B1~{zUUX>OXUTB~x8ncM8I@4C3 zD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rnY+@lG^AB5BA!uJm1^* zF{F*}@&@r8`#WOm)SGCtSuZBj`<<_sA9R-=Z1v;6Zr^A7f@?hotkH3h#dKWb`TPhz zum7Rnc=n}qYxmu@H{T6xAVhE-q0?$eT*;&d>{?dkY>YW3t;)mZm;`|}%haWDPLA_8 z3TzQ-zFaLrCFM6|Y>Ln=rG0Td)2|8+7|m`I=ZVPb0i{i(X`oF!V<+VuruztJ4iHrnT0psGsdlgyo0T8TT)d)bNj{%O0gmij9gu|WcJ0@Jby;hKg&YZ_G z&SN26N1dmG5OiA_)L5&sW*PsO!pcYX%`*;(foS-+YMBk1(j@|;XkyBifwq{s zrFbb&F;3ZVmdSu|vq@~J!ou;R#>t7@a%TJaiP%-e0z>}r0wI4fu;eaZ!SWn%M2*kE zNyUMVWY&zc;A>$(hJ%+n$ngU8BwLa2)Ena@t;{-laWYof z8THD7zc + +;; 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 . + +;;; Code: + + +;;; Require +;; +;; +(require 'easymenu) +(require 'helm-aliases) + + +(defgroup helm-config nil + "Various configurations for Helm." + :group 'helm) + +(defcustom helm-command-prefix-key "C-x c" + "The key `helm-command-prefix' is bound to in the global map." + :type '(choice (string :tag "Key") (const :tag "no binding")) + :group 'helm-config + :set + (lambda (var key) + (when (and (boundp var) (symbol-value var)) + (define-key (current-global-map) + (read-kbd-macro (symbol-value var)) nil)) + (when key + (define-key (current-global-map) + (read-kbd-macro key) 'helm-command-prefix)) + (set var key))) + +(defcustom helm-minibuffer-history-key "C-r" + "The key `helm-minibuffer-history' is bound to in minibuffer local maps." + :type '(choice (string :tag "Key") (const :tag "no binding")) + :group 'helm-config + :set + (lambda (var key) + (cl-dolist (map '(minibuffer-local-completion-map + minibuffer-local-filename-completion-map + minibuffer-local-filename-must-match-map ; Emacs 23.1.+ + minibuffer-local-isearch-map + minibuffer-local-map + minibuffer-local-must-match-filename-map ; Older Emacsen + minibuffer-local-must-match-map + minibuffer-local-ns-map)) + (when (and (boundp map) (keymapp (symbol-value map))) + (when (and (boundp var) (symbol-value var)) + (define-key (symbol-value map) + (read-kbd-macro (symbol-value var)) nil)) + (when key + (define-key (symbol-value map) + (read-kbd-macro key) 'helm-minibuffer-history)))) + (set var key))) + +;;; Command Keymap +;; +;; +(defvar helm-command-map + (let ((map (make-sparse-keymap))) + (define-key map (kbd "a") 'helm-apropos) + (define-key map (kbd "e") 'helm-etags-select) + (define-key map (kbd "l") 'helm-locate) + (define-key map (kbd "s") 'helm-surfraw) + (define-key map (kbd "r") 'helm-regexp) + (define-key map (kbd "w") 'helm-w3m-bookmarks) + (define-key map (kbd "x") 'helm-firefox-bookmarks) + (define-key map (kbd "#") 'helm-emms) + (define-key map (kbd "m") 'helm-man-woman) + (define-key map (kbd "t") 'helm-top) + (define-key map (kbd "/") 'helm-find) + (define-key map (kbd "i") 'helm-semantic-or-imenu) + (define-key map (kbd "") 'helm-lisp-completion-at-point) + (define-key map (kbd "p") 'helm-list-emacs-process) + (define-key map (kbd "C-x r b") 'helm-filtered-bookmarks) + (define-key map (kbd "M-y") 'helm-show-kill-ring) + (define-key map (kbd "C-c ") 'helm-all-mark-rings) + (define-key map (kbd "C-x C-f") 'helm-find-files) + (define-key map (kbd "f") 'helm-for-files) + (define-key map (kbd "C-:") 'helm-eval-expression-with-eldoc) + (define-key map (kbd "C-,") 'helm-calcul-expression) + (define-key map (kbd "M-x") 'helm-M-x) + (define-key map (kbd "M-s o") 'helm-occur) + (define-key map (kbd "M-g s") 'helm-do-grep) + (define-key map (kbd "c") 'helm-colors) + (define-key map (kbd "F") 'helm-select-xfont) + (define-key map (kbd "8") 'helm-ucs) + (define-key map (kbd "C-c f") 'helm-recentf) + (define-key map (kbd "C-c g") 'helm-google-suggest) + (define-key map (kbd "h i") 'helm-info-at-point) + (define-key map (kbd "h r") 'helm-info-emacs) + (define-key map (kbd "h g") 'helm-info-gnus) + (define-key map (kbd "C-x C-b") 'helm-buffers-list) + (define-key map (kbd "C-x r i") 'helm-register) + (define-key map (kbd "C-c C-x") 'helm-run-external-command) + (define-key map (kbd "b") 'helm-resume) + map)) + +;; Don't override the keymap we just defined with an empty +;; keymap. This also protect bindings changed by the user. +(defvar helm-command-prefix) +(define-prefix-command 'helm-command-prefix) +(fset 'helm-command-prefix helm-command-map) +(setq helm-command-prefix helm-command-map) + + +;;; Menu +;; +;; +(easy-menu-add-item + nil '("Tools") + '("Helm" + ["Find any Files/Buffers" helm-for-files t] + ["Helm Everywhere (Toggle)" helm-mode t] + ["Helm resume" helm-resume t] + "----" + ("Files" + ["Find files" helm-find-files t] + ["Recent Files" helm-recentf t] + ["Locate" helm-locate t] + ["Search Files with find" helm-find t] + ["Bookmarks" helm-filtered-bookmarks t]) + ("Buffers" + ["Find buffers" helm-buffers-list t]) + ("Commands" + ["Emacs Commands" helm-M-x t] + ["Externals Commands" helm-run-external-command t]) + ("Help" + ["Helm Apropos" helm-apropos t]) + ("Info" + ["Info at point" helm-info-at-point t] + ["Emacs Manual index" helm-info-emacs t] + ["Gnus Manual index" helm-info-gnus t]) + ("Org" + ["Org keywords" helm-org-keywords t] + ["Org headlines" helm-org-headlines t]) + ("Tools" + ["Occur" helm-occur t] + ["Grep" helm-do-grep t] + ["Etags" helm-etags-select t] + ["Lisp complete at point" helm-lisp-completion-at-point t] + ["Browse Kill ring" helm-show-kill-ring t] + ["Browse register" helm-register t] + ["Mark Ring" helm-all-mark-rings t] + ["Regexp handler" helm-regexp t] + ["Colors & Faces" helm-colors t] + ["Show xfonts" helm-select-xfont t] + ["Ucs Symbols" helm-ucs t] + ["Imenu" helm-imenu t] + ["Semantic or Imenu" helm-semantic-or-imenu t] + ["Google Suggest" helm-google-suggest t] + ["Eval expression" helm-eval-expression-with-eldoc t] + ["Calcul expression" helm-calcul-expression t] + ["Man pages" helm-man-woman t] + ["Top externals process" helm-top t] + ["Emacs internals process" helm-list-emacs-process t]) + "----" + ["Preferred Options" helm-configuration t]) + "Spell Checking") + +(easy-menu-add-item nil '("Tools") '("----") "Spell Checking") + +;;;###autoload +(defun helm-configuration () + "Customize `helm'." + (interactive) + (customize-group "helm")) + +;;; Fontlock +(cl-dolist (mode '(emacs-lisp-mode lisp-interaction-mode)) + (font-lock-add-keywords + mode + '(("(\\<\\(with-helm-after-update-hook\\)\\>" 1 font-lock-keyword-face) + ("(\\<\\(with-helm-temp-hook\\)\\>" 1 font-lock-keyword-face) + ("(\\<\\(with-helm-window\\)\\>" 1 font-lock-keyword-face) + ("(\\<\\(with-helm-quittable\\)\\>" 1 font-lock-keyword-face) + ("(\\<\\(with-helm-current-buffer\\)\\>" 1 font-lock-keyword-face) + ("(\\<\\(with-helm-buffer\\)\\>" 1 font-lock-keyword-face) + ("(\\<\\(with-helm-show-completion\\)\\>" 1 font-lock-keyword-face) + ("(\\<\\(with-helm-default-directory\\)\\>" 1 font-lock-keyword-face) + ("(\\<\\(with-helm-display-same-window\\)\\>" 1 font-lock-keyword-face) + ("(\\<\\(with-helm-restore-variables\\)\\>" 1 font-lock-keyword-face) + ("(\\<\\(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)))) + +;;; Compatibility emacs-24.4+ +;; Inlined from Emacs trunk. +(defalias 'function-put + ;; We don't want people to just use `put' because we can't conveniently + ;; hook into `put' to remap old properties to new ones. But for now, there's + ;; no such remapping, so we just call `put'. + #'(lambda (f prop value) (put f prop value)) + "Set function F's property PROP to VALUE. +The namespace for PROP is shared with symbols. +So far, F can only be a symbol, not a lambda expression.") + + +;;; Start of automatically extracted autoloads. + + +;;;### (autoloads nil "helm" "helm.el" (21464 47958 567939 782000)) +;;; Generated autoloads from helm.el + +(autoload 'helm-define-multi-key "helm" "\ +In KEYMAP, define key sequence KEY for function list FUNCTIONS. +Each function run sequentialy each time the key KEY is pressed. +If DELAY is specified switch back to initial function of FUNCTIONS list +after DELAY seconds. +The functions in FUNCTIONS list are functions with no args. +e.g + (defun foo () + (message \"Run foo\")) + (defun bar () + (message \"Run bar\")) + (defun baz () + (message \"Run baz\")) + +\(helm-define-multi-key global-map \" q\" '(foo bar baz) 2) + +Each time \" q\" is pressed the next function is executed, if you wait +More than 2 seconds, next hit will run again the first function and so on. + +\(fn KEYMAP KEY FUNCTIONS &optional DELAY)" nil nil) + +(autoload 'helm-multi-key-defun "helm" "\ +Define NAME as a multi-key command running FUNS. +After DELAY seconds the FUNS list is reinitialised. +See `helm-define-multi-key'. + +\(fn NAME DOCSTRING FUNS &optional DELAY)" nil t) + +(put 'helm-multi-key-defun 'lisp-indent-function '2) + +(autoload 'helm-define-key-with-subkeys "helm" "\ +Allow defining a KEY without having to type its prefix again on next calls. +Arg MAP is the keymap to use, SUBKEY is the initial long keybinding to +call COMMAND. +Arg OTHER-SUBKEYS is an unquoted alist specifying other short keybindings +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))) + + +In this example, `C-x v n' will run `git-gutter:next-hunk' subsequent hit on \"n\" +will run this command again and subsequent hit on \"p\" will run `git-gutter:previous-hunk'. + +Arg MENU is a string to display in minibuffer to describe SUBKEY and OTHER-SUBKEYS. +Arg EXIT-FN specify a function to run on exit. + +Any other keys pressed run their assigned command defined in MAP and exit the loop. + +\(fn MAP KEY SUBKEY COMMAND &optional OTHER-SUBKEYS MENU EXIT-FN)" nil t) + +(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' . + +\(fn)" t nil) + +(autoload 'helm "helm" "\ +Main function to execute helm sources. + +Keywords supported: +:sources :input :prompt :resume :preselect +:buffer :keymap :default :history :allow-nest + +Extra LOCAL-VARS keywords are supported, see below. + +PLIST is a list like (:key1 val1 :key2 val2 ...) or +\(&optional sources input prompt resume + preselect buffer keymap default history). + +Basic keywords are the following: + +:sources + +A list of sources used for this session. It also accepts a +symbol, interpreted as a variable of a helm source +i.e (a symbol can be passed instead of a list of sources). +It also accepts an alist representing a helm source, which is +detected by (assq 'name ANY-SOURCES). +NOTE: In this case the source is embedded in the helm command and +have no symbol name, so it is not reachable from outside. +It will be referenced in `helm-sources' as a whole alist. + +:input + +Temporary value of `helm-pattern', ie. initial input of minibuffer. + +:prompt + +Prompt other than \"pattern: \". + +:resume + +If t, Resurrect previously instance of `helm'. Skip the initialization. +If 'noresume, this instance of `helm' cannot be resumed. + +:preselect + +Initially selected candidate. Specified by exact candidate or a regexp. + +:buffer + +`helm-buffer' instead of *helm*. + +:keymap + +`helm-map' for current `helm' session. + +:default + +A default argument that will be inserted in minibuffer with \\\\[next-history-element]. +When nil or not present `thing-at-point' will be used instead. +If `helm-maybe-use-default-as-input' is non--nil display will be +updated using :default arg as input unless :input is specified, +which in this case will take precedence on :default +This is a string or a list, in this case the car of the list will +be used as initial default input, but you will be able to cycle in this +list with \\\\[next-history-element]. + +:history + +By default all minibuffer input is pushed to `minibuffer-history', +if an argument HISTORY is provided, input will be pushed to HISTORY. +History element should be a symbol. + +:allow-nest + +Allow running this helm command within a running helm session. + +Of course, conventional arguments are supported, the two are same. + +\(helm :sources sources :input input :prompt prompt :resume resume + :preselect preselect :buffer buffer :keymap keymap :default default + :history history) + +and + +\(helm sources input prompt resume preselect buffer keymap default history) + +are the same. + +However the use of non keyword args is deprecated and should not be used. + +Other keywords are interpreted as local variables of this helm session. +The `helm-' prefix can be omitted. For example, + +\(helm :sources 'helm-source-buffers-list + :buffer \"*buffers*\" :candidate-number-limit 10) + +means starting helm session with `helm-source-buffers' +source in *buffers* buffer and set variable `helm-candidate-number-limit' +to 10 as session local variable. + +\(fn &key SOURCES INPUT PROMPT RESUME PRESELECT BUFFER KEYMAP DEFAULT HISTORY ALLOW-NEST OTHER-LOCAL-VARS)" nil nil) + +(autoload 'helm-other-buffer "helm" "\ +Simplified interface of `helm' with other `helm-buffer'. +Call `helm' with only ANY-SOURCES and ANY-BUFFER as args. + +\(fn ANY-SOURCES ANY-BUFFER)" nil nil) + +;;;*** + +;;;### (autoloads nil "helm-adaptive" "helm-adaptive.el" (21430 15697 +;;;;;; 745354 26000)) +;;; Generated autoloads from helm-adaptive.el + +(autoload 'helm-reset-adaptive-history "helm-adaptive" "\ +Delete all `helm-adaptive-history' and his file. +Useful when you have a old or corrupted `helm-adaptive-history-file'. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads nil "helm-apt" "helm-apt.el" (21406 64798 644023 +;;;;;; 263000)) +;;; Generated autoloads from helm-apt.el + +(autoload 'helm-apt "helm-apt" "\ +Preconfigured `helm' : frontend of APT package manager. +With a prefix arg reload cache. + +\(fn ARG)" t nil) + +;;;*** + +;;;### (autoloads nil "helm-bbdb" "helm-bbdb.el" (21430 15697 565354 +;;;;;; 24000)) +;;; Generated autoloads from helm-bbdb.el + +(autoload 'helm-bbdb "helm-bbdb" "\ +Preconfigured `helm' for BBDB. + +Needs BBDB. + +http://bbdb.sourceforge.net/ + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads nil "helm-bookmark" "helm-bookmark.el" (21430 15697 +;;;;;; 577354 25000)) +;;; Generated autoloads from helm-bookmark.el + +(autoload 'helm-bookmarks "helm-bookmark" "\ +Preconfigured `helm' for bookmarks. + +\(fn)" t nil) + +(autoload 'helm-pp-bookmarks "helm-bookmark" "\ +Preconfigured `helm' for bookmarks (pretty-printed). + +\(fn)" t nil) + +(autoload 'helm-filtered-bookmarks "helm-bookmark" "\ +Preconfigured helm for bookmarks (filtered by category). +Optional source `helm-source-bookmark-addressbook' is loaded +only if external library addressbook-bookmark.el is available. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads nil "helm-buffers" "helm-buffers.el" (21435 58357 +;;;;;; 591422 470000)) +;;; Generated autoloads from helm-buffers.el + +(autoload 'helm-buffers-list "helm-buffers" "\ +Preconfigured `helm' to list buffers. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads nil "helm-call-tree" "helm-call-tree.el" (21341 +;;;;;; 6020 974577 405000)) +;;; Generated autoloads from helm-call-tree.el + +(autoload 'helm-simple-call-tree "helm-call-tree" "\ +Preconfigured `helm' for simple-call-tree. List function relationships. + +Needs simple-call-tree.el. +http://www.emacswiki.org/cgi-bin/wiki/download/simple-call-tree.el + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads nil "helm-color" "helm-color.el" (21430 15697 597354 +;;;;;; 25000)) +;;; Generated autoloads from helm-color.el + +(autoload 'helm-colors "helm-color" "\ +Preconfigured `helm' for color. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads nil "helm-command" "helm-command.el" (21430 15697 +;;;;;; 601354 25000)) +;;; Generated autoloads from helm-command.el + +(autoload 'helm-M-x "helm-command" "\ +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'. + +You can get help on each command by persistent action. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads nil "helm-dabbrev" "helm-dabbrev.el" (21341 6020 +;;;;;; 974577 405000)) +;;; Generated autoloads from helm-dabbrev.el + +(autoload 'helm-dabbrev "helm-dabbrev" "\ + + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads nil "helm-elisp" "helm-elisp.el" (21465 387 2705 +;;;;;; 912000)) +;;; Generated autoloads from helm-elisp.el + +(autoload 'helm-lisp-completion-at-point "helm-elisp" "\ +Helm lisp symbol completion at point. + +\(fn)" t nil) + +(autoload 'helm-complete-file-name-at-point "helm-elisp" "\ +Complete file name at point. + +\(fn &optional FORCE)" t nil) + +(autoload 'helm-lisp-indent "helm-elisp" "\ + + +\(fn)" t nil) + +(autoload 'helm-lisp-completion-or-file-name-at-point "helm-elisp" "\ +Complete lisp symbol or filename at point. +Filename completion happen if string start after or between a double quote. + +\(fn)" t nil) + +(autoload 'helm-apropos "helm-elisp" "\ +Preconfigured helm to describe commands, functions, variables and faces. + +\(fn)" t nil) + +(autoload 'helm-manage-advice "helm-elisp" "\ +Preconfigured `helm' to disable/enable function advices. + +\(fn)" t nil) + +(autoload 'helm-locate-library "helm-elisp" "\ + + +\(fn)" t nil) + +(autoload 'helm-timers "helm-elisp" "\ +Preconfigured `helm' for timers. + +\(fn)" t nil) + +(autoload 'helm-complex-command-history "helm-elisp" "\ + + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads nil "helm-elisp-package" "helm-elisp-package.el" +;;;;;; (21430 15697 613354 25000)) +;;; Generated autoloads from helm-elisp-package.el + +(autoload 'helm-list-elisp-packages "helm-elisp-package" "\ + + +\(fn ARG)" t nil) + +;;;*** + +;;;### (autoloads nil "helm-elscreen" "helm-elscreen.el" (21341 6020 +;;;;;; 974577 405000)) +;;; Generated autoloads from helm-elscreen.el + +(autoload 'helm-elscreen "helm-elscreen" "\ +Preconfigured helm to list elscreen. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads nil "helm-emms" "helm-emms.el" (21430 15697 641354 +;;;;;; 25000)) +;;; Generated autoloads from helm-emms.el + +(autoload 'helm-emms "helm-emms" "\ +Preconfigured `helm' for emms sources. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads nil "helm-eshell" "helm-eshell.el" (21341 6020 +;;;;;; 974577 405000)) +;;; Generated autoloads from helm-eshell.el + +(autoload 'helm-esh-pcomplete "helm-eshell" "\ +Preconfigured helm to provide helm completion in eshell. + +\(fn)" t nil) + +(autoload 'helm-eshell-history "helm-eshell" "\ +Preconfigured helm for eshell history. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads nil "helm-eval" "helm-eval.el" (21341 6020 974577 +;;;;;; 405000)) +;;; Generated autoloads from helm-eval.el + +(autoload 'helm-eval-expression "helm-eval" "\ +Preconfigured helm for `helm-source-evaluation-result'. + +\(fn ARG)" t nil) + +(autoload 'helm-eval-expression-with-eldoc "helm-eval" "\ +Preconfigured helm for `helm-source-evaluation-result' with `eldoc' support. + +\(fn)" t nil) + +(autoload 'helm-calcul-expression "helm-eval" "\ +Preconfigured helm for `helm-source-calculation-result'. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads nil "helm-external" "helm-external.el" (21430 15697 +;;;;;; 641354 25000)) +;;; Generated autoloads from helm-external.el + +(autoload 'helm-run-external-command "helm-external" "\ +Preconfigured `helm' to run External PROGRAM asyncronously from Emacs. +If program is already running exit with error. +You can set your own list of commands with +`helm-external-commands-list'. + +\(fn PROGRAM)" t nil) + +;;;*** + +;;;### (autoloads nil "helm-files" "helm-files.el" (21464 47958 303939 +;;;;;; 780000)) +;;; Generated autoloads from helm-files.el + +(autoload 'helm-browse-project "helm-files" "\ +Browse files and see status of project with its vcs. +Only hg and git are supported for now. +Fall back to `helm-find-files' if directory is not under +control of one of those vcs. +Need dependencies: + +and +. + +\(fn)" t nil) + +(autoload 'helm-find "helm-files" "\ +Preconfigured `helm' for the find shell command. + +\(fn ARG)" t nil) + +(autoload 'helm-find-files "helm-files" "\ +Preconfigured `helm' for helm implementation of `find-file'. +Called with a prefix arg show history if some. +Don't call it from programs, use `helm-find-files-1' instead. +This is the starting point for nearly all actions you can do on files. + +\(fn ARG)" t nil) + +(autoload 'helm-for-files "helm-files" "\ +Preconfigured `helm' for opening files. +Run all sources defined in `helm-for-files-preferred-list'. + +\(fn)" t nil) + +(autoload 'helm-recentf "helm-files" "\ +Preconfigured `helm' for `recentf'. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads nil "helm-firefox" "helm-firefox.el" (21430 15697 +;;;;;; 657354 25000)) +;;; Generated autoloads from helm-firefox.el + +(autoload 'helm-firefox-bookmarks "helm-firefox" "\ +Preconfigured `helm' for firefox bookmark. +You will have to enable html bookmarks in firefox: +open about:config in firefox and double click on this line to enable value to true: + +user_pref(\"browser.bookmarks.autoExportHTML\", false); + +You should have now: + +user_pref(\"browser.bookmarks.autoExportHTML\", true); + +After closing firefox, you will be able to browse you bookmarks. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads nil "helm-font" "helm-font.el" (21341 6020 974577 +;;;;;; 405000)) +;;; Generated autoloads from helm-font.el + +(autoload 'helm-select-xfont "helm-font" "\ +Preconfigured `helm' to select Xfont. + +\(fn)" t nil) + +(autoload 'helm-ucs "helm-font" "\ +Preconfigured helm for `ucs-names' math symbols. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads nil "helm-gentoo" "helm-gentoo.el" (21341 6020 +;;;;;; 974577 405000)) +;;; Generated autoloads from helm-gentoo.el + +(autoload 'helm-gentoo "helm-gentoo" "\ +Preconfigured `helm' for gentoo linux. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads nil "helm-grep" "helm-grep.el" (21464 47958 343939 +;;;;;; 781000)) +;;; Generated autoloads from helm-grep.el + +(autoload 'helm-goto-precedent-file "helm-grep" "\ +Go to precedent file in helm grep/etags buffers. + +\(fn)" t nil) + +(autoload 'helm-goto-next-file "helm-grep" "\ +Go to precedent file in helm grep/etags buffers. + +\(fn)" t nil) + +(autoload 'helm-grep-run-save-buffer "helm-grep" "\ +Run grep save results action from `helm-do-grep-1'. + +\(fn)" t nil) + +(autoload 'helm-grep-mode "helm-grep" "\ +Major mode to provide actions in helm grep saved buffer. + +Special commands: +\\{helm-grep-mode-map} + +\(fn)" t nil) + +(autoload 'helm-gm-next-file "helm-grep" "\ + + +\(fn)" t nil) + +(autoload 'helm-gm-precedent-file "helm-grep" "\ + + +\(fn)" t nil) + +(autoload 'helm-grep-mode-jump "helm-grep" "\ + + +\(fn)" t nil) + +(autoload 'helm-grep-mode-jump-other-window-forward "helm-grep" "\ + + +\(fn)" t nil) + +(autoload 'helm-grep-mode-jump-other-window-backward "helm-grep" "\ + + +\(fn)" t nil) + +(autoload 'helm-grep-mode-jump-other-window "helm-grep" "\ + + +\(fn)" t nil) + +(autoload 'helm-do-grep "helm-grep" "\ +Preconfigured helm for grep. +Contrarily to Emacs `grep', no default directory is given, but +the full path of candidates in ONLY. +That allow to grep different files not only in `default-directory' but anywhere +by marking them (C-). If one or more directory is selected +grep will search in all files of these directories. +You can also use wildcard in the base name of candidate. +If a prefix arg is given use the -r option of grep (recurse). +The prefix arg can be passed before or after start file selection. +See also `helm-do-grep-1'. + +\(fn)" t nil) + +(autoload 'helm-do-zgrep "helm-grep" "\ +Preconfigured helm for zgrep. + +\(fn)" t nil) + +(autoload 'helm-do-pdfgrep "helm-grep" "\ +Preconfigured helm for pdfgrep. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads nil "helm-help" "helm-help.el" (21458 29137 663428 +;;;;;; 241000)) +;;; Generated autoloads from helm-help.el + +(autoload 'helm-help "helm-help" "\ +Help of `helm'. + +\(fn)" t nil) + +(autoload 'helm-buffer-help "helm-help" "\ +Help command for helm buffers. + +\(fn)" t nil) + +(autoload 'helm-ff-help "helm-help" "\ +Help command for `helm-find-files'. + +\(fn)" t nil) + +(autoload 'helm-read-file-name-help "helm-help" "\ + + +\(fn)" t nil) + +(autoload 'helm-generic-file-help "helm-help" "\ + + +\(fn)" t nil) + +(autoload 'helm-grep-help "helm-help" "\ + + +\(fn)" t nil) + +(autoload 'helm-pdfgrep-help "helm-help" "\ + + +\(fn)" t nil) + +(autoload 'helm-etags-help "helm-help" "\ +The help function for etags. + +\(fn)" t nil) + +(autoload 'helm-ucs-help "helm-help" "\ +Help command for `helm-ucs'. + +\(fn)" t nil) + +(autoload 'helm-bookmark-help "helm-help" "\ +Help command for bookmarks. + +\(fn)" t nil) + +(autoload 'helm-esh-help "helm-help" "\ +Help command for `helm-find-files-eshell-command-on-file'. + +\(fn)" t nil) + +(autoload 'helm-buffers-ido-virtual-help "helm-help" "\ +Help command for ido virtual buffers. + +\(fn)" t nil) + +(autoload 'helm-moccur-help "helm-help" "\ + + +\(fn)" t nil) + +(autoload 'helm-top-help "helm-help" "\ + + +\(fn)" t nil) + +(autoload 'helm-apt-help "helm-help" "\ + + +\(fn)" t nil) + +(autoload 'helm-el-package-help "helm-help" "\ + + +\(fn)" t nil) + +(autoload 'helm-M-x-help "helm-help" "\ + + +\(fn)" t nil) + +(autoload 'helm-imenu-help "helm-help" "\ + + +\(fn)" t nil) + +(autoload 'helm-color-help "helm-help" "\ + + +\(fn)" t nil) + +(autoload 'helm-semantic-help "helm-help" "\ + + +\(fn)" t nil) + +(defvar helm-buffer-mode-line-string '("Buffer(s)" "\\\\[helm-buffer-help]:Help \\\\[helm-select-action]:Act \\[helm-maybe-exit-minibuffer]/f1/f2/f-n:NthAct" "String displayed in mode-line in `helm-source-buffers-list'")) + +(defvar helm-color-mode-line-string '("Colors" "\\\\[helm-color-help]:Help/\\[helm-color-run-insert-name]:Insert name/\\[helm-color-run-insert-rgb]:Insert RGB/with shift: Kill")) + +(defvar helm-buffers-ido-virtual-mode-line-string '("Killed Buffer(s)" "\\\\[helm-buffers-ido-virtual-help]:Help \\\\[helm-select-action]:Act \\[helm-maybe-exit-minibuffer]/f1/f2/f-n:NthAct" "String displayed in mode-line in `helm-source-buffers-list'")) + +(defvar helm-ff-mode-line-string "\\\\[helm-ff-help]:Help \\\\[helm-select-action]:Act \\[helm-maybe-exit-minibuffer]/f1/f2/f-n:NthAct" "\ +String displayed in mode-line in `helm-source-find-files'") + +(defvar helm-read-file-name-mode-line-string "\\\\[helm-read-file-name-help]:Help \\[helm-cr-empty-string]:Empty \\\\[helm-select-action]:Act \\[helm-maybe-exit-minibuffer]/f1/f2/f-n:NthAct" "\ +String displayed in mode-line in `helm-source-find-files'.") + +(defvar helm-generic-file-mode-line-string "\\\\[helm-generic-file-help]:Help \\\\[helm-select-action]:Act \\[helm-maybe-exit-minibuffer]/f1/f2/f-n:NthAct \\[helm-toggle-suspend-update]:Tog.suspend" "\ +String displayed in mode-line in Locate.") + +(defvar helm-grep-mode-line-string "\\\\[helm-grep-help]:Help \\\\[helm-select-action]:Act \\[helm-maybe-exit-minibuffer]/f1/f2/f-n:NthAct \\[helm-toggle-suspend-update]:Tog.suspend" "\ +String displayed in mode-line in `helm-do-grep'.") + +(defvar helm-pdfgrep-mode-line-string "\\\\[helm-pdfgrep-help]:Help \\\\[helm-select-action]:Act \\[helm-maybe-exit-minibuffer]/f1/f2/f-n:NthAct \\[helm-toggle-suspend-update]:Tog.suspend" "\ +String displayed in mode-line in `helm-do-pdfgrep'.") + +(defvar helm-etags-mode-line-string "\\\\[helm-etags-help]:Help \\\\[helm-select-action]:Act \\[helm-maybe-exit-minibuffer]/f1/f2/f-n:NthAct" "\ +String displayed in mode-line in `helm-etags-select'.") + +(defvar helm-ucs-mode-line-string "\\\\[helm-ucs-help]:Help \\\\[helm-select-action]:Act \\[helm-maybe-exit-minibuffer]/f1/f2/f-n:NthAct" "\ +String displayed in mode-line in `helm-ucs'.") + +(defvar helm-bookmark-mode-line-string '("Bookmark(s)" "\\\\[helm-bookmark-help]:Help \\\\[helm-select-action]:Act \\[helm-maybe-exit-minibuffer]/f1/f2/f-n:NthAct") "\ +String displayed in mode-line in `helm-source-buffers-list'") + +(defvar helm-occur-mode-line "\\\\[helm-help]:Help \\\\[helm-occur-run-query-replace-regexp]:Query replace regexp \\\\[helm-select-action]:Act \\[helm-maybe-exit-minibuffer]/f1/f2/f-n:NthAct \\[helm-toggle-suspend-update]:Tog.suspend") + +(defvar helm-moccur-mode-line "\\\\[helm-moccur-help]:Help \\\\[helm-select-action]:Act \\[helm-maybe-exit-minibuffer]/f1/f2/f-n:NthAct \\[helm-toggle-suspend-update]:Tog.suspend") + +(defvar helm-comp-read-mode-line "\\\\[helm-cr-empty-string]:Empty \\\\[helm-help]:Help \\[helm-select-action]:Act \\[helm-maybe-exit-minibuffer]/f1/f2/f-n:NthAct") + +(defvar helm-top-mode-line "\\\\[helm-top-help]:Help \\\\[helm-select-action]:Act \\[helm-maybe-exit-minibuffer]/f1/f2/f-n:NthAct \\[helm-toggle-suspend-update]:Tog.suspend") + +(defvar helm-apt-mode-line "\\\\[helm-apt-help]:Help \\\\[helm-select-action]:Act \\[helm-maybe-exit-minibuffer]/f1/f2/f-n:NthAct \\[helm-toggle-suspend-update]:Tog.suspend") + +(defvar helm-el-package-mode-line "\\\\[helm-el-package-help]:Help \\\\[helm-select-action]:Act \\[helm-maybe-exit-minibuffer]/f1/f2/f-n:NthAct \\[helm-toggle-suspend-update]:Tog.suspend") + +(defvar helm-M-x-mode-line "\\\\[helm-M-x-help]:Help \\\\[helm-select-action]:Act \\[helm-maybe-exit-minibuffer]/f1/f2/f-n:NthAct \\[helm-toggle-suspend-update]:Tog.suspend") + +(defvar helm-imenu-mode-line "\\\\[helm-imenu-help]:Help \\\\[helm-select-action]:Act \\[helm-maybe-exit-minibuffer]/f1/f2/f-n:NthAct \\[helm-toggle-suspend-update]:Tog.suspend") + +(defvar helm-semantic-mode-line "\\\\[helm-semantic-help]:Help \\\\[helm-select-action]:Act \\[helm-maybe-exit-minibuffer]/f1/f2/f-n:NthAct \\[helm-toggle-suspend-update]:Tog.suspend") + +(autoload 'helm-describe-helm-attribute "helm-help" "\ +Display the full documentation of HELM-ATTRIBUTE. +HELM-ATTRIBUTE should be a symbol. + +\(fn HELM-ATTRIBUTE)" t nil) + +;;;*** + +;;;### (autoloads nil "helm-imenu" "helm-imenu.el" (21436 11223 435576 +;;;;;; 850000)) +;;; Generated autoloads from helm-imenu.el + +(autoload 'helm-imenu "helm-imenu" "\ +Preconfigured `helm' for `imenu'. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads nil "helm-info" "helm-info.el" (21430 15697 685354 +;;;;;; 25000)) +;;; Generated autoloads from helm-info.el + +(autoload 'helm-info-at-point "helm-info" "\ +Preconfigured `helm' for searching info at point. +With a prefix-arg insert symbol at point. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads nil "helm-locate" "helm-locate.el" (21464 47958 +;;;;;; 387939 781000)) +;;; Generated autoloads from helm-locate.el + +(autoload 'helm-locate-read-file-name "helm-locate" "\ + + +\(fn PROMPT)" nil nil) + +(autoload 'helm-locate "helm-locate" "\ +Preconfigured `helm' for Locate. +Note: you can add locate options after entering pattern. +See 'man locate' for valid options and also `helm-locate-command'. + +You can specify a local database with prefix argument ARG. +With two prefix arg, refresh the current local db or create it +if it doesn't exists. +Many databases can be used: navigate and mark them. +See also `helm-locate-with-db'. + +To create a user specific db, use +\"updatedb -l 0 -o db_path -U directory\". +Where db_path is a filename matched by +`helm-locate-db-file-regexp'. + +\(fn ARG)" t nil) + +;;;*** + +;;;### (autoloads nil "helm-man" "helm-man.el" (21341 6020 978577 +;;;;;; 405000)) +;;; Generated autoloads from helm-man.el + +(autoload 'helm-man-woman "helm-man" "\ +Preconfigured `helm' for Man and Woman pages. +With a prefix arg reinitialize the cache. + +\(fn ARG)" t nil) + +;;;*** + +;;;### (autoloads nil "helm-match-plugin" "helm-match-plugin.el" +;;;;;; (21341 6020 978577 405000)) +;;; Generated autoloads from helm-match-plugin.el + +(defvar helm-match-plugin-mode nil "\ +Non-nil if Helm-Match-Plugin mode is enabled. +See the command `helm-match-plugin-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-match-plugin-mode'.") + +(custom-autoload 'helm-match-plugin-mode "helm-match-plugin" nil) + +(autoload 'helm-match-plugin-mode "helm-match-plugin" "\ +Add more flexible regexp matching for helm. +See `helm-mp-matching-method' for the behavior of each method. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads nil "helm-misc" "helm-misc.el" (21341 6020 978577 +;;;;;; 405000)) +;;; Generated autoloads from helm-misc.el + +(autoload 'helm-browse-menubar "helm-misc" "\ +Helm interface to the menubar using lacarte.el. + +\(fn)" t nil) + +(autoload 'helm-world-time "helm-misc" "\ +Preconfigured `helm' to show world time. + +\(fn)" t nil) + +(autoload 'helm-insert-latex-math "helm-misc" "\ +Preconfigured helm for latex math symbols completion. + +\(fn)" t nil) + +(autoload 'helm-eev-anchors "helm-misc" "\ +Preconfigured `helm' for eev anchors. + +\(fn)" t nil) + +(autoload 'helm-ratpoison-commands "helm-misc" "\ +Preconfigured `helm' to execute ratpoison commands. + +\(fn)" t nil) + +(autoload 'helm-stumpwm-commands "helm-misc" "\ + + +\(fn)" t nil) + +(autoload 'helm-mini "helm-misc" "\ +Preconfigured `helm' lightweight version (buffer -> recentf). + +\(fn)" t nil) + +(autoload 'helm-minibuffer-history "helm-misc" "\ +Preconfigured `helm' for `minibuffer-history'. + +\(fn)" t nil) + +(autoload 'helm-comint-input-ring "helm-misc" "\ +Predefined `helm' that provide completion of `comint' history. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads nil "helm-mode" "helm-mode.el" (21458 20740 105265 +;;;;;; 165000)) +;;; Generated autoloads from helm-mode.el + +(autoload 'helm-comp-read "helm-mode" "\ +Read a string in the minibuffer, with helm completion. + +It is helm `completing-read' equivalent. + +- PROMPT is the prompt name to use. + +- COLLECTION can be a list, vector, obarray or hash-table. + It can be also a function that receives three arguments: + the values string, predicate and t. See `all-completions' for more details. + +Keys description: + +- TEST: A predicate called with one arg i.e candidate. + +- INITIAL-INPUT: Same as input arg in `helm'. + +- PRESELECT: See preselect arg of `helm'. + +- DEFAULT: This option is used only for compatibility with regular + Emacs `completing-read' (Same as DEFAULT arg of `completing-read'). + +- BUFFER: Name of helm-buffer. + +- MUST-MATCH: Candidate selected must be one of COLLECTION. + +- REVERSE-HISTORY: When non--nil display history source after current + source completion. + +- REQUIRES-PATTERN: Same as helm attribute, default is 0. + +- HISTORY: A list containing specific history, default is nil. + When it is non--nil, all elements of HISTORY are displayed in + a special source before COLLECTION. + +- INPUT-HISTORY: A symbol. the minibuffer input history will be + stored there, if nil or not provided, `minibuffer-history' + will be used instead. + +- CASE-FOLD: Same as `helm-case-fold-search'. + +- DEL-INPUT: Boolean, when non--nil (default) remove the partial + minibuffer input from HISTORY is present. + +- PERSISTENT-ACTION: A function called with one arg i.e candidate. + +- PERSISTENT-HELP: A string to document PERSISTENT-ACTION. + +- MODE-LINE: A string or list to display in mode line. + Default is `helm-comp-read-mode-line'. + +- KEYMAP: A keymap to use in this `helm-comp-read'. + (the keymap will be shared with history source) + +- NAME: The name related to this local source. + +- EXEC-WHEN-ONLY-ONE: Bound `helm-execute-action-at-once-if-one' + to non--nil. (possibles values are t or nil). + +- VOLATILE: Use volatile attribute (enabled by default). + +- SORT: A predicate to give to `sort' e.g `string-lessp'. + +- FC-TRANSFORMER: A `filtered-candidate-transformer' function. + +- MARKED-CANDIDATES: If non--nil return candidate or marked candidates as a list. + +- NOMARK: When non--nil don't allow marking candidates. + +- ALISTP: (default is non--nil) See `helm-comp-read-get-candidates'. + +- CANDIDATES-IN-BUFFER: when non--nil use a source build with + `helm-candidates-in-buffer' which is much faster. + Argument VOLATILE have no effect when CANDIDATES-IN-BUFFER is non--nil. + +Any prefix args passed during `helm-comp-read' invocation will be recorded +in `helm-current-prefix-arg', otherwise if prefix args were given before +`helm-comp-read' invocation, the value of `current-prefix-arg' will be used. +That's mean you can pass prefix args before or after calling a command +that use `helm-comp-read' See `helm-M-x' for example. + +\(fn PROMPT COLLECTION &key TEST INITIAL-INPUT DEFAULT PRESELECT (buffer \"*Helm Completions*\") MUST-MATCH REVERSE-HISTORY (requires-pattern 0) HISTORY INPUT-HISTORY (case-fold helm-comp-read-case-fold-search) (del-input t) (persistent-action nil) (persistent-help \"DoNothing\") (mode-line helm-comp-read-mode-line) (keymap helm-comp-read-map) (name \"Helm Completions\") CANDIDATES-IN-BUFFER EXEC-WHEN-ONLY-ONE QUIT-WHEN-NO-CAND (volatile t) SORT (fc-transformer (quote helm-cr-default-transformer)) MARKED-CANDIDATES NOMARK (alistp t))" nil nil) + +(defvar helm-mode nil "\ +Non-nil if Helm mode is enabled. +See the command `helm-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-mode'.") + +(custom-autoload 'helm-mode "helm-mode" nil) + +(autoload 'helm-mode "helm-mode" "\ +Toggle generic helm completion. + +All functions in Emacs that use `completing-read' +or `read-file-name' and friends will use helm interface +when this mode is turned on. +However you can modify this behavior for functions of your choice +with `helm-completing-read-handlers-alist'. + +Called with a positive arg, turn on unconditionally, with a +negative arg turn off. +You can turn it on with `helm-mode'. + +Some crap emacs functions may not be supported, +e.g `ffap-alternate-file' and maybe others +You can add such functions to `helm-completing-read-handlers-alist' +with a nil value. + +Note: This mode is incompatible with Emacs23. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads nil "helm-net" "helm-net.el" (21435 58357 603422 +;;;;;; 471000)) +;;; Generated autoloads from helm-net.el + +(autoload 'helm-surfraw "helm-net" "\ +Preconfigured `helm' to search PATTERN with search ENGINE. + +\(fn PATTERN ENGINE)" t nil) + +(autoload 'helm-google-suggest "helm-net" "\ +Preconfigured `helm' for google search with google suggest. + +\(fn)" t nil) + +(autoload 'helm-yahoo-suggest "helm-net" "\ +Preconfigured `helm' for Yahoo searching with Yahoo suggest. + +\(fn)" t nil) + +(autoload 'helm-wikipedia-suggest "helm-net" "\ +Preconfigured `helm' for Wikipedia lookup with Wikipedia suggest. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads nil "helm-org" "helm-org.el" (21464 47958 427939 +;;;;;; 781000)) +;;; Generated autoloads from helm-org.el + +(autoload 'helm-org-keywords "helm-org" "\ +Preconfigured `helm' for org keywords. + +\(fn)" t nil) + +(autoload 'helm-org-headlines "helm-org" "\ +Preconfigured helm to show org headlines. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads nil "helm-regexp" "helm-regexp.el" (21448 61607 +;;;;;; 655322 985000)) +;;; Generated autoloads from helm-regexp.el + +(defvar helm-occur-match-plugin-mode t "\ +Non-nil if Helm-Occur-Match-Plugin mode is enabled. +See the command `helm-occur-match-plugin-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-occur-match-plugin-mode'.") + +(custom-autoload 'helm-occur-match-plugin-mode "helm-regexp" nil) + +(autoload 'helm-occur-match-plugin-mode "helm-regexp" "\ +Turn On/Off `helm-match-plugin-mode' only for `helm-m/occur'. + +\(fn &optional ARG)" t nil) + +(autoload 'helm-moccur-run-save-buffer "helm-regexp" "\ +Run grep save results action from `helm-do-grep-1'. + +\(fn)" t nil) + +(autoload 'helm-moccur-mode "helm-regexp" "\ +Major mode to provide actions in helm moccur saved buffer. + +Special commands: +\\{helm-moccur-mode-map} + +\(fn)" t nil) + +(autoload 'helm-regexp "helm-regexp" "\ +Preconfigured helm to build regexps. +`query-replace-regexp' can be run from there against found regexp. + +\(fn)" t nil) + +(autoload 'helm-occur "helm-regexp" "\ +Preconfigured helm for Occur. + +\(fn)" t nil) + +(autoload 'helm-occur-from-isearch "helm-regexp" "\ +Invoke `helm-occur' from isearch. + +\(fn)" t nil) + +(autoload 'helm-multi-occur "helm-regexp" "\ +Preconfigured helm for multi occur. + + BUFFERS is a list of buffers to search through. +With a prefix arg, reverse the behavior of +`helm-moccur-always-search-in-current'. +The prefix arg can be set before calling `helm-multi-occur' +or during the buffer selection. + +\(fn BUFFERS)" t nil) + +(autoload 'helm-multi-occur-from-isearch "helm-regexp" "\ +Invoke `helm-multi-occur' from isearch. + +With a prefix arg, reverse the behavior of +`helm-moccur-always-search-in-current'. +The prefix arg can be set before calling +`helm-multi-occur-from-isearch' or during the buffer selection. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads nil "helm-ring" "helm-ring.el" (21341 6020 978577 +;;;;;; 405000)) +;;; Generated autoloads from helm-ring.el + +(autoload 'helm-mark-ring "helm-ring" "\ +Preconfigured `helm' for `helm-source-mark-ring'. + +\(fn)" t nil) + +(autoload 'helm-global-mark-ring "helm-ring" "\ +Preconfigured `helm' for `helm-source-global-mark-ring'. + +\(fn)" t nil) + +(autoload 'helm-all-mark-rings "helm-ring" "\ +Preconfigured `helm' for `helm-source-global-mark-ring' and `helm-source-mark-ring'. + +\(fn)" t nil) + +(autoload 'helm-register "helm-ring" "\ +Preconfigured `helm' for Emacs registers. + +\(fn)" t nil) + +(autoload 'helm-show-kill-ring "helm-ring" "\ +Preconfigured `helm' for `kill-ring'. +It is drop-in replacement of `yank-pop'. + +First call open the kill-ring browser, next calls move to next line. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads nil "helm-semantic" "helm-semantic.el" (21436 11223 +;;;;;; 515576 851000)) +;;; Generated autoloads from helm-semantic.el + +(autoload 'helm-semantic "helm-semantic" "\ +Preconfigured `helm' for `semantic'. + +\(fn)" t nil) + +(autoload 'helm-semantic-or-imenu "helm-semantic" "\ +Run `helm' with `semantic' or `imenu'. + +If `semantic-mode' is active in the current buffer, then use +semantic for generating tags, otherwise fall back to `imenu'. +Fill in the symbol at point by default. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads nil "helm-sys" "helm-sys.el" (21341 6020 978577 +;;;;;; 405000)) +;;; Generated autoloads from helm-sys.el + +(autoload 'helm-top-run-sort-by-com "helm-sys" "\ + + +\(fn)" t nil) + +(autoload 'helm-top-run-sort-by-cpu "helm-sys" "\ + + +\(fn)" t nil) + +(autoload 'helm-top-run-sort-by-mem "helm-sys" "\ + + +\(fn)" t nil) + +(autoload 'helm-top-run-sort-by-user "helm-sys" "\ + + +\(fn)" t nil) + +(autoload 'helm-top "helm-sys" "\ +Preconfigured `helm' for top command. + +\(fn)" t nil) + +(autoload 'helm-list-emacs-process "helm-sys" "\ +Preconfigured `helm' for emacs process. + +\(fn)" t nil) + +(autoload 'helm-xrandr-set "helm-sys" "\ + + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads nil "helm-tags" "helm-tags.el" (21464 47958 527939 +;;;;;; 782000)) +;;; Generated autoloads from helm-tags.el + +(autoload 'helm-etags-select "helm-tags" "\ +Preconfigured helm for etags. +If called with a prefix argument or if any of the tag files have +been modified, reinitialize cache. + +This function aggregates three sources of tag files: + + 1) An automatically located file in the parent directories, by `helm-etags-get-tag-file'. + 2) `tags-file-name', which is commonly set by `find-tag' command. + 3) `tags-table-list' which is commonly set by `visit-tags-table' command. + +\(fn ARG)" t nil) + +;;;*** + +;;;### (autoloads nil "helm-utils" "helm-utils.el" (21452 52791 223493 +;;;;;; 3000)) +;;; Generated autoloads from helm-utils.el + +(autoload 'helm-show-all-in-this-source-only "helm-utils" "\ +Show only current source of this helm session with all its candidates. +With a numeric prefix arg show only the ARG number of candidates. + +\(fn ARG)" t nil) + +(autoload 'helm-display-all-sources "helm-utils" "\ +Display all sources previously hidden by `helm-set-source-filter'. + +\(fn)" t nil) + +(autoload 'helm-quit-and-find-file "helm-utils" "\ +Drop into `helm-find-files' from `helm'. +If current selection is a buffer or a file, `helm-find-files' +from its directory. + +\(fn)" t nil) + +(autoload 'helm-w32-shell-execute-open-file "helm-utils" "\ + + +\(fn FILE)" t nil) + +(autoload 'helm-yank-text-at-point "helm-utils" "\ +Yank text at point in `helm-current-buffer' into minibuffer. +If `helm-yank-symbol-first' is non--nil the first yank +grabs the entire symbol. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads nil "helm-w3m" "helm-w3m.el" (21430 15697 737354 +;;;;;; 26000)) +;;; Generated autoloads from helm-w3m.el + +(autoload 'helm-w3m-bookmarks "helm-w3m" "\ +Preconfigured `helm' for w3m bookmark. + +Needs w3m and emacs-w3m. + +http://w3m.sourceforge.net/ +http://emacs-w3m.namazu.org/ + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads nil "helm-yaoddmuse" "helm-yaoddmuse.el" (21341 +;;;;;; 6020 982577 405000)) +;;; Generated autoloads from helm-yaoddmuse.el + +(autoload 'helm-yaoddmuse-cache-pages "helm-yaoddmuse" "\ +Fetch the list of files on emacswiki and create cache file. +If load is non--nil load the file and feed `yaoddmuse-pages-hash'. + +\(fn &optional LOAD)" t nil) + +(autoload 'helm-yaoddmuse-emacswiki-edit-or-view "helm-yaoddmuse" "\ +Preconfigured `helm' to edit or view EmacsWiki page. + +Needs yaoddmuse.el. + +http://www.emacswiki.org/emacs/download/yaoddmuse.el + +\(fn)" t nil) + +(autoload 'helm-yaoddmuse-emacswiki-post-library "helm-yaoddmuse" "\ +Preconfigured `helm' to post library to EmacsWiki. + +Needs yaoddmuse.el. + +http://www.emacswiki.org/emacs/download/yaoddmuse.el + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads nil nil ("helm-aliases.el" "helm-pkg.el" "helm-plugin.el") +;;;;;; (21465 418 463922 118000)) + +;;;*** + +;;; End of automatically extracted autoloads. + +(provide 'helm-config) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions obsolete) +;; coding: utf-8 +;; indent-tabs-mode: nil +;; End: + +;;; helm-config.el ends here diff --git a/elpa/helm-20140808.2300/helm-config.elc b/elpa/helm-20140808.2300/helm-config.elc new file mode 100644 index 0000000000000000000000000000000000000000..e2c7e49330701099f8babf6223aeeffd7d152061 GIT binary patch literal 40956 zcmdUYZF3t(lBT`ho7ls*i;Ih!Z&wTN4M~R@#5+KG!fT2mE$&dHmZZkxFcr%N&>%4a z&=|akqA%{h-}7Wvbyox36fLiBW+q0K&|Q^Pm6et6mHqY6>EZwU?6c2GUw{3zIgBT> z(Ks5I-h-Kh%Wv^#5xfff&*S)AWgPdzv5BYVGF+O2)vYmmrq?EGi{=d385h=nPhiXki8q({M8C zn?c-PEa#)??cy2U&KFA)4hC3iGEQx;Qs3KvF^BB;xy`ke`4}Q`AIDudK zzf!5R-FsL@K|dZurhJXfuZYCeyq%RpBWU?pZAg@fQ-Z-5{Dc`Un@gO9hSjhQO)%pVUf z%pZ<^AQGkNWHcT1R>NU555Ovx@%%vs%h`;%+lqPdMr=ac*o?FZ_yL(H7P7#eeBy3+ z8vz^(e!uyQ|N53V{#^E^Lwwgi$5sIQ@}u^T^6#%c`$9JDD>i6g1F==V`HgIu?#DkQ zJ?z{6!o6ziUL9Q5+if(c^UvoTw3_bUcDl|$)(I9enT;coy6oM?d&&u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>hq!fTo8}JN%zV3~7+W6@>>A9W%ednBS){kJr4AeGY(CM&Nz-8wkQ=VL*lb?IELaI#8=Fzk0Got--6+5DGPJ z-7>w`C8wys(@$zS;7B7e23b@G$ZkcIN+hcxJq12Ln*xoZ_KZGS)-Xf35_P-0+E^$B z_F#2hy`{-m8fNaQvKV|a9N!BBhwyx+43z7aHidY^3KUHcpycK~+QUlFFbzXv;I0Zo zvU0Ta!y_=>kKokgEEbx^T4pLz2M6jedBHMB+nuWL+Y_Fe>$N zI+b1VahbNRbA=GIx6r*>W}*1PjJue@$vY~-EZv7Y??(8{DTytuZSYM53RLu*h2K2H!7jIg%!D{I$67}$D05dfk)EH7BM@3oF&hd?G z(G5LNB~|#bWsdG23V9vkbNIp*uHh&BEe~2>OskPyjJ-5*jKF`6;(Ony2U5TpHM&t9 z4vuj7hO!*Z{2lCMoE;?9AD}N8B(tI%A2I@CppBHb?9y{And0Kq^`cnr)QK z#j}K;G*N-hcT?1$i62LBNeaRwvj&Hpdkl_^FC$R0(LF2^x3@2Z@k<-oBl)PBzaR2| z_!m;)iifO*4&^x>43Oa#A(VU@p%NHU9_<=&Pt)1tTf6-~X3wNv_k$9z*J literal 0 HcmV?d00001 diff --git a/elpa/helm-20140808.2300/helm-dabbrev.el b/elpa/helm-20140808.2300/helm-dabbrev.el new file mode 100644 index 000000000..b97d9f4a9 --- /dev/null +++ b/elpa/helm-20140808.2300/helm-dabbrev.el @@ -0,0 +1,311 @@ +;;; helm-dabbrev.el --- Helm implementation of dabbrev. -*- lexical-binding: t -*- + +;; Copyright (C) 2012 ~ 2014 Thierry Volpiatto + +;; 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 . + +;;; Code: + +(require 'helm) +(require 'helm-elisp) ; For show-completion. + +(defgroup helm-dabbrev nil + "Dabbrev related Applications and libraries for Helm." + :group 'helm) + +(defcustom helm-dabbrev-always-search-all t + "Always search in all buffers when non--nil." + :group 'helm-dabbrev + :type 'boolean) + +(defcustom helm-dabbrev-max-length-result 20 + "Max length of candidates before searching in all buffers. +If number of candidates found in current-buffer is <= to this, +search in all buffers. +Have no effect when `helm-dabbrev-always-search-all' is non--nil." + :group 'helm-dabbrev + :type 'integer) + +(defcustom helm-dabbrev-ignored-buffers-regexps + '("\\*helm" "\\*Messages" "\\*Echo Area" "\\*Buffer List") + "List of regexps matching names of buffers that helm-dabbrev should not check." + :group 'helm-dabbrev + :type '(repeat regexp)) + +(defcustom helm-dabbrev-major-mode-assoc + '((emacs-lisp-mode . lisp-interaction-mode)) + "Major mode association alist. +This allow helm-dabbrev searching in buffers with the associated `major-mode'. +e.g \(emacs-lisp-mode . lisp-interaction-mode\) +will allow searching in the lisp-interaction-mode buffer when `current-buffer' +is an `emacs-lisp-mode' buffer and vice versa i.e +no need to provide \(lisp-interaction-mode . emacs-lisp-mode\) association." + :type '(alist :key-type symbol :value-type symbol) + :group 'helm-dabbrev) + +(defcustom helm-dabbrev-lineno-around 30 + "Search first in this number of lines before an after point." + :group 'helm-dabbrev + :type 'integer) + +(defcustom helm-dabbrev-cycle-thresold nil + "Number of time helm-dabbrev cycle before displaying helm completion. +When nil or 0 disable cycling." + :group 'helm-dabbrev + :type '(choice (const :tag "Cycling disabled" nil) integer)) + +(defcustom helm-dabbrev-case-fold-search 'smart + "Set `case-fold-search' in `helm-dabbrev'. +Same as `helm-case-fold-search' but for `helm-dabbrev'. +Note that this is not affecting searching in helm buffer, +but the initial search for all candidates in buffer(s)." + :group 'helm-dabbrev + :type '(choice (const :tag "Ignore case" t) + (const :tag "Respect case" nil) + (other :tag "Smart" 'smart))) + + +(defvar helm-dabbrev-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map helm-map) + (define-key map (kbd "M-/") 'helm-next-line) + (define-key map (kbd "M-:") 'helm-previous-line) + map)) + +;; Internal +(defvar helm-dabbrev--exclude-current-buffer-flag nil) +(defvar helm-dabbrev--cache nil) +(defvar helm-dabbrev--data nil) +(defvar helm-dabbrev--regexp "\\s-\\|\t\\|[(\[\{\"'`=<$;]\\|\\s\\\\|^") +(cl-defstruct helm-dabbrev-info dabbrev limits iterator) + + +(defun helm-dabbrev--buffer-list () + (cl-loop with lst = (buffer-list) + for buf in (if helm-dabbrev--exclude-current-buffer-flag + (cdr lst) lst) + unless (cl-loop for r in helm-dabbrev-ignored-buffers-regexps + thereis (string-match r (buffer-name buf))) + 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))))) + +(defun helm-dabbrev--collect (str limit ignore-case all) + (let* ((case-fold-search ignore-case) + (buffer1 (current-buffer)) ; start buffer. + (minibuf (minibufferp buffer1)) + result pos-before pos-after + (search-and-store + #'(lambda (pattern direction) + (while (cl-case direction + (1 (search-forward pattern nil t)) + (-1 (search-backward pattern nil t)) + (2 (let ((pos + (save-excursion + (forward-line + helm-dabbrev-lineno-around) + (point)))) + (setq pos-after pos) + (search-forward pattern pos t))) + (-2 (let ((pos + (save-excursion + (forward-line + (- helm-dabbrev-lineno-around)) + (point)))) + (setq pos-before pos) + (search-backward pattern pos t)))) + (let* ((match-1 (helm-aif (thing-at-point 'symbol) + (substring-no-properties it))) + (match-2 (helm-aif (thing-at-point 'filename) + (substring-no-properties it))) + (lst (if (string= match-1 match-2) + (list match-1) + (list match-1 match-2)))) + (cl-loop for match in lst + unless (or (string= str match) + (member match result)) + do (push match result))))))) + (cl-loop for buf in (if all (helm-dabbrev--buffer-list) + (list (current-buffer))) + + do (with-current-buffer buf + (when (or minibuf ; check against all buffers when in minibuffer. + (helm-dabbrev--same-major-mode-p buffer1)) + (save-excursion + ;; Start searching before thing before point. + (goto-char (- (point) (length str))) + ;; Search the last 30 lines before point. + (funcall search-and-store str -2)) ; store pos [1] + (save-excursion + ;; Search the next 30 lines after point. + (funcall search-and-store str 2)) ; store pos [2] + (save-excursion + ;; Search all before point. + (goto-char pos-before) ; start from [1] + (funcall search-and-store str -1)) + (save-excursion + ;; Search all after point. + (goto-char pos-after) ; start from [2] + (funcall search-and-store str 1)))) + when (> (length result) limit) return (nreverse result) + finally return (nreverse result)))) + +(defun helm-dabbrev--get-candidates (abbrev) + (cl-assert abbrev nil "[No Match]") + (with-current-buffer (current-buffer) + (let* ((dabbrev-get #'(lambda (str all-bufs) + (helm-dabbrev--collect + str helm-candidate-number-limit + (cl-case helm-dabbrev-case-fold-search + (smart (helm-set-case-fold-search-1 abbrev)) + (t helm-dabbrev-case-fold-search)) + all-bufs))) + (lst (funcall dabbrev-get abbrev helm-dabbrev-always-search-all))) + (if (and (not helm-dabbrev-always-search-all) + (<= (length lst) helm-dabbrev-max-length-result)) + ;; Search all but don't recompute current-buffer. + (let ((helm-dabbrev--exclude-current-buffer-flag t)) + (append lst (funcall dabbrev-get abbrev 'all-bufs))) + lst)))) + +(defvar helm-source-dabbrev + `((name . "Dabbrev Expand") + (init . (lambda () + (helm-init-candidates-in-buffer 'global + helm-dabbrev--cache))) + (candidates-in-buffer) + (persistent-action . (lambda (_candidate) (ignore))) + (persistent-help . "DoNothing") + (keymap . ,helm-dabbrev-map) + (action . helm-dabbrev-default-action))) + +(defun helm-dabbrev-default-action (candidate) + (with-helm-current-buffer + (let* ((limits (helm-bounds-of-thing-before-point + helm-dabbrev--regexp)) + (beg (car limits)) + (end (point))) + (run-with-timer + 0.01 nil + 'helm-insert-completion-at-point + beg end candidate)))) + +;;;###autoload +(defun helm-dabbrev () + (interactive) + (let ((dabbrev (helm-thing-before-point nil helm-dabbrev--regexp)) + (limits (helm-bounds-of-thing-before-point helm-dabbrev--regexp)) + (enable-recursive-minibuffers t) + (cycling-disabled-p (or (null helm-dabbrev-cycle-thresold) + (zerop helm-dabbrev-cycle-thresold))) + (helm-execute-action-at-once-if-one t) + (helm-quit-if-no-candidate + #'(lambda () + (message "[Helm-dabbrev: No expansion found]")))) + (cl-assert (and (stringp dabbrev) (not (string= dabbrev ""))) + nil "[Helm-dabbrev: Nothing found before point]") + (when (and + ;; have been called at least once. + (helm-dabbrev-info-p helm-dabbrev--data) + ;; But user have moved with some other command + ;; in the meaning time. + (not (eq last-command 'helm-dabbrev))) + (setq helm-dabbrev--data nil)) + (when cycling-disabled-p + (setq helm-dabbrev--cache (helm-dabbrev--get-candidates dabbrev))) + (unless (or cycling-disabled-p + (helm-dabbrev-info-p helm-dabbrev--data)) + (setq helm-dabbrev--cache (helm-dabbrev--get-candidates dabbrev)) + (setq helm-dabbrev--data (make-helm-dabbrev-info + :dabbrev dabbrev + :limits limits + :iterator + (helm-iter-list + (cl-loop for i in helm-dabbrev--cache when + (and i (string-match + (concat "^" (regexp-quote dabbrev)) i)) + collect i into selection + when (and selection + (= (length selection) + helm-dabbrev-cycle-thresold)) + ;; When selection len reach + ;; `helm-dabbrev-cycle-thresold' + ;; return selection. + return selection + ;; selection len never reach + ;; `helm-dabbrev-cycle-thresold' + ;; return selection. + finally return selection))))) + (let ((iter (and (helm-dabbrev-info-p helm-dabbrev--data) + (helm-dabbrev-info-iterator helm-dabbrev--data))) + deactivate-mark) + (helm-aif (and iter (helm-iter-next iter)) + (progn + (helm-insert-completion-at-point (car limits) (cdr limits) it) + ;; Move already tried candidates to end of list. + (setq helm-dabbrev--cache (append (remove it helm-dabbrev--cache) + (list it)))) + (unless cycling-disabled-p + (delete-region (car limits) (point)) + (setq dabbrev (helm-dabbrev-info-dabbrev helm-dabbrev--data) + limits (helm-dabbrev-info-limits helm-dabbrev--data)) + (setq helm-dabbrev--data nil) + (insert dabbrev)) + (with-helm-show-completion (car limits) (cdr limits) + (helm :sources 'helm-source-dabbrev + :buffer "*helm dabbrev*" + :input (concat "^" dabbrev " ") + :resume 'noresume + :allow-nest t)))))) + +(provide 'helm-dabbrev) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions obsolete) +;; coding: utf-8 +;; indent-tabs-mode: nil +;; End: + +;;; helm-dabbrev.el ends here diff --git a/elpa/helm-20140808.2300/helm-dabbrev.elc b/elpa/helm-20140808.2300/helm-dabbrev.elc new file mode 100644 index 0000000000000000000000000000000000000000..61e02c6e1f6e9556e5bc86303768d083cc1c7ae5 GIT binary patch literal 13855 zcmdU03v=5>k|y^A6649NU3vpiINLoX7^1qPayTo;G%q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c;yn#jq-Zd|kOs z0Vl36x<258EX#CFs_as)s8^nEK2rZC@lZ*}WZ*#O_RsJmc3gs!5@@SMxl=e!ZtfA!M#S;TpdGk}@O z=>%RyY)J=O>8TlSdrQ(p)VT~k&FFlAUmpwuiWsBzU2M^B4B$&sO+7!TEEZ~pQS12w z1#)nDQI!W*Y(&{*c`WkB8k+Q=u}RXom-s0HVtSEcnT2#C;X{osg|DcRU9uOk8z@A+ Wn#?;PDF$^*A+WSgyHI1%yz#&3c2E5P literal 0 HcmV?d00001 diff --git a/elpa/helm-20140808.2300/helm-elisp-package.el b/elpa/helm-20140808.2300/helm-elisp-package.el new file mode 100644 index 000000000..c20010ba7 --- /dev/null +++ b/elpa/helm-20140808.2300/helm-elisp-package.el @@ -0,0 +1,170 @@ +;;; helm-elisp-package.el --- helm interface for package.el -*- lexical-binding: t -*- + +;; Copyright (C) 2012 ~ 2014 Thierry Volpiatto + +;; 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 . + +;;; Code: +(require 'cl-lib) +(require 'helm) +(require 'package) + +;; internals vars +(defvar helm-el-package--show-only 'all) +(defvar helm-el-package--initialized-p nil) + +(defun helm-el-package--init () + (when (null package-alist) + (setq helm-el-package--show-only 'all)) + (save-selected-window + (list-packages helm-el-package--initialized-p) + (setq helm-el-package--initialized-p t) + (message nil)) + (helm-init-candidates-in-buffer + 'global + (with-current-buffer (get-buffer "*Packages*") + (buffer-string))) + (setq helm-el-package--show-only 'all) + (kill-buffer "*Packages*")) + +(defun helm-el-package-describe (candidate) + (let ((id (get-text-property 0 'tabulated-list-id candidate))) + (describe-package (if (fboundp 'package-desc-name) + (package-desc-name id) + (car id))))) + +(defun helm-el-package-install (_candidate) + (cl-loop with mkd = (helm-marked-candidates) + for p in mkd + for id = (get-text-property 0 'tabulated-list-id p) + do (package-install + (if (fboundp 'package-desc-name) + (package-desc-name id) + (car id))) + and 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-uninstall (_candidate) + (cl-loop with mkd = (helm-marked-candidates) + for p in mkd + for id = (get-text-property 0 'tabulated-list-id p) + do + (condition-case-unless-debug err + (with-no-warnings + (if (fboundp 'package-desc-full-name) + ;; emacs 24.4 + (package-delete id) + ;; emacs 24.3 + (package-delete (symbol-name (car id)) + (package-version-join (cdr id))))) + (error (message (cadr err)))) + and collect (if (fboundp 'package-desc-full-name) + id + (cons (symbol-name (car id)) + (package-version-join (cdr id)))) + into delete-list + finally do (if (fboundp 'package-desc-full-name) + ;; emacs 24.4 + (message (format "%d packages deleted:\n(%s)" + (length delete-list) + (mapconcat #'package-desc-full-name + delete-list ", "))) + ;; emacs 24.3 + (message (format "%d packages deleted:\n(%s)" + (length delete-list) + (mapconcat (lambda (x) + (concat (car x) "-" (cdr x))) + delete-list ", "))) + ;; emacs 24.3 doesn't update + ;; its `package-alist' after deleting. + (cl-loop for p in package-alist + when (assq (symbol-name (car p)) delete-list) + do (setq package-alist (delete p package-alist)))))) + +(defun helm-el-package--transformer (candidates _source) + (cl-loop for c in candidates + for id = (get-text-property 0 'tabulated-list-id c) + for installed-p = (assq (if (fboundp 'package-desc-name) + (package-desc-name id) + (car id)) + package-alist) + for cand = (cons c (car (split-string c))) + when (or (and installed-p + (eq helm-el-package--show-only 'installed)) + (and (not installed-p) + (eq helm-el-package--show-only 'uninstalled)) + (eq helm-el-package--show-only 'all)) + collect cand)) + +(defun helm-el-package-show-installed () + (interactive) + (with-helm-alive-p + (setq helm-el-package--show-only 'installed) + (helm-update))) + +(defun helm-el-package-show-all () + (interactive) + (with-helm-alive-p + (setq helm-el-package--show-only 'all) + (helm-update))) + +(defun helm-el-package-show-uninstalled () + (interactive) + (with-helm-alive-p + (setq helm-el-package--show-only 'uninstalled) + (helm-update))) + +(defvar helm-el-package-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map helm-map) + (define-key map (kbd "M-I") 'helm-el-package-show-installed) + (define-key map (kbd "M-U") 'helm-el-package-show-uninstalled) + (define-key map (kbd "M-A") 'helm-el-package-show-all) + (define-key map (kbd "C-c ?") 'helm-el-package-help) + map)) + +(defvar helm-source-list-el-package + `((name . "list packages") + (init . helm-el-package--init) + (get-line . buffer-substring) + (match-part . (lambda (c) (car (split-string c)))) + (filtered-candidate-transformer . helm-el-package--transformer) + (candidates-in-buffer) + (mode-line . helm-el-package-mode-line) + (keymap . ,helm-el-package-map) + (candidate-number-limit . 9999) + (action . (("Describe" . helm-el-package-describe) + ("Install" . helm-el-package-install) + ("Uninstall" . helm-el-package-uninstall))))) + +;;;###autoload +(defun helm-list-elisp-packages (arg) + (interactive "P") + (when arg (setq helm-el-package--initialized-p nil)) + (helm :sources 'helm-source-list-el-package + :buffer "*helm list packages*")) + +(provide 'helm-elisp-package) + +;;; helm-elisp-package.el ends here diff --git a/elpa/helm-20140808.2300/helm-elisp-package.elc b/elpa/helm-20140808.2300/helm-elisp-package.elc new file mode 100644 index 0000000000000000000000000000000000000000..cbea6e1a878de0c5754b741942f8263e92b327af GIT binary patch literal 5273 zcmcgwTW{M&7M847NxUy@vB2)*F||gmAe6}&U2JEIT6WyRK)c&IO;Nzo14WK(t|?L_ zDW~qQ-|q}bk+NjBXu2za5;b#p=3KsWZ0-ljqscwZob&`& zVt(tmr%`m<2_n}CC<^JFlhSZ;O>{(d@7O*(wtFNjyQ^7D<7h@xFrkC@iHeg0@HptG znd2rM??44}=io*KGm{^%4z0tEkd~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tj)^8%q z6Dm`^FFNy0bW5bcP-8mEu~Hpd^%%MGsw`QKdRf>=J!ILRY(mUG9s!5;^U6yVttlO6 z=u9%bAA#y|KB^n9*gAUHFB&0?=ws@a^ULt^Ym@@xJ3Yf + +;; 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 . + +;;; Code: +(require 'cl-lib) +(require 'helm) +(require 'helm-utils) +(require 'helm-info) +(require 'helm-eval) +(require 'helm-files) +(require 'advice) + + +(defgroup helm-elisp nil + "Elisp related Applications and libraries for Helm." + :group 'helm) + +(defcustom helm-turn-on-show-completion t + "Display candidate in buffer while moving selection when non--nil." + :group 'helm-elisp + :type 'boolean) + +(defcustom helm-show-completion-use-special-display t + "A special display will be used in lisp completion if non--nil. +All functions that are wrapped in macro `with-helm-show-completion' +will be affected." + :group 'helm-elisp + :type 'boolean) + +(defcustom helm-show-completion-min-window-height 7 + "Minimum completion window height used in show completion. +This is used in macro `with-helm-show-completion'." + :group 'helm-elisp + :type 'integer) + +(defcustom helm-lisp-quoted-function-list + '(funcall apply mapc cl-mapc mapcar cl-mapcar + callf callf2 cl-callf cl-callf2 fset + fboundp fmakunbound symbol-function) + "List of function where quoted function completion happen. +e.g give only function names after \(funcall '." + :group 'helm-elisp + :type '(repeat (choice symbol))) + +(defcustom helm-lisp-unquoted-function-list + '(function defadvice) + "List of function where unquoted function completion happen. +e.g give only function names after \(function ." + :group 'helm-elisp + :type '(repeat (choice symbol))) + + +;;; Faces +;; +;; +(defface helm-lisp-show-completion + '((t (:background "DarkSlateGray"))) + "Face used for showing candidates in `helm-lisp-completion'." + :group 'helm-elisp) + +(defface helm-lisp-completion-info + '((t (:foreground "red"))) + "Face used for showing info in `helm-lisp-completion'." + :group 'helm-elisp) + + +;;; Show completion. +;; +;; Provide show completion with macro `with-helm-show-completion'. + +(defvar helm-show-completion-overlay nil) +;; Called each time cursor move in helm-buffer. +(defun helm-show-completion () + (with-helm-current-buffer + (overlay-put helm-show-completion-overlay + 'display (helm-get-selection)))) + +(defun helm-show-completion-init-overlay (beg end) + (when (and helm-turn-on-show-completion beg end) + (setq helm-show-completion-overlay (make-overlay beg end)) + (overlay-put helm-show-completion-overlay + 'face 'helm-lisp-show-completion))) + +(defun helm-show-completion-display-function (buffer &rest _args) + "A special resized helm window is used depending on position in BUFFER." + (with-selected-window (selected-window) + (if (window-dedicated-p) + (helm-default-display-buffer buffer) + (let* ((screen-size (+ (count-screen-lines (window-start) (point) t) + 1 ; mode-line + (if header-line-format 1 0))) ; header-line + (def-size (- (window-height) + helm-show-completion-min-window-height)) + (upper-height (max window-min-height (min screen-size def-size))) + split-window-keep-point) + (recenter -1) + (set-window-buffer (if (active-minibuffer-window) + (minibuffer-selected-window) + (split-window nil upper-height)) + buffer))))) + +(defmacro with-helm-show-completion (beg end &rest body) + "Show helm candidate in an overlay at point. +BEG and END are the beginning and end position of the current completion +in `helm-current-buffer'. +BODY is an helm call where we want to enable show completion. +If `helm-turn-on-show-completion' is nil just do nothing." + (declare (indent 2) (debug t)) + `(let ((helm-move-selection-after-hook + (and helm-turn-on-show-completion + (append (list 'helm-show-completion) + helm-move-selection-after-hook)))) + (with-helm-temp-hook 'helm-after-initialize-hook + (with-helm-buffer + (set (make-local-variable 'helm-display-function) + (if helm-show-completion-use-special-display + 'helm-show-completion-display-function + 'helm-default-display-buffer)))) + (unwind-protect + (progn + (helm-show-completion-init-overlay ,beg ,end) + ,@body) + (when (and helm-turn-on-show-completion + helm-show-completion-overlay + (overlayp helm-show-completion-overlay)) + (delete-overlay helm-show-completion-overlay))))) + + +;;; Lisp symbol completion. +;; +;; +(defun helm-lisp-completion--predicate-at-point (beg) + ;; Return a predicate for `all-completions'. + (let ((fn-sym-p (lambda () + (or + (and (eq (char-before) ?\ ) + (save-excursion + (skip-syntax-backward " " (point-at-bol)) + (memq (symbol-at-point) + helm-lisp-unquoted-function-list))) + (and (eq (char-before) ?\') + (save-excursion + (forward-char -1) + (eq (char-before) ?\#))))))) + (save-excursion + (goto-char beg) + (if (or + ;; Complete on all symbols in non--lisp modes (logs mail etc..) + (not (memq major-mode '(emacs-lisp-mode + lisp-interaction-mode + inferior-emacs-lisp-mode))) + (not (or (funcall fn-sym-p) + (and (eq (char-before) ?\') + (save-excursion + (forward-char (if (funcall fn-sym-p) -2 -1)) + (skip-syntax-backward " " (point-at-bol)) + (memq (symbol-at-point) + helm-lisp-quoted-function-list))) + (eq (char-before) ?\())) ; no paren before str. + ;; Looks like we are in a let statement. + (condition-case nil + (progn (up-list -2) (forward-char 1) + (eq (char-after) ?\()) + (error nil))) + (lambda (sym) + (or (boundp sym) (fboundp sym) (symbol-plist sym))) + #'fboundp)))) + +(defun helm-thing-before-point (&optional limits regexp) + "Return symbol name before point. +If REGEXP is specified return what REGEXP find before point. +By default match the beginning of symbol before point. +With LIMITS arg specified return the beginning and end position +of symbol before point." + (save-excursion + (let (beg + (end (point)) + (boundary (field-beginning nil nil (point-at-bol)))) + (if (re-search-backward (or regexp "\\_<") boundary t) + (setq beg (match-end 0)) + (setq beg boundary)) + (unless (= beg end) + (if limits + (cons beg end) + (buffer-substring-no-properties beg end)))))) + +(defun helm-bounds-of-thing-before-point (&optional regexp) + "Get the beginning and end position of `helm-thing-before-point'. +Return a cons \(beg . end\)." + (helm-thing-before-point 'limits regexp)) + +(defun helm-insert-completion-at-point (beg end str) + ;; When there is no space after point + ;; we are completing inside a symbol or + ;; after a partial symbol with the next arg aside + ;; without space, in this case mark the region. + ;; deleting it would remove the + ;; next arg which is unwanted. + (delete-region beg end) + (insert str) + (let ((pos (cdr (or (bounds-of-thing-at-point 'symbol) + ;; needed for helm-dabbrev. + (bounds-of-thing-at-point 'filename))))) + (when (and pos (< (point) pos)) + (push-mark pos t t)))) + +(defvar helm-lisp-completion--cache nil) +(defvar helm-lgst-len nil) +;;;###autoload +(defun helm-lisp-completion-at-point () + "Helm lisp symbol completion at point." + (interactive) + (setq helm-lgst-len 0) + (let* ((target (helm-thing-before-point)) + (beg (car (helm-bounds-of-thing-before-point))) + (end (point)) + (pred (and beg (helm-lisp-completion--predicate-at-point beg))) + (loc-vars (and (fboundp 'lisp--local-variables) + (ignore-errors + (mapcar #'symbol-name (lisp--local-variables))))) + (glob-syms (and target pred (all-completions target obarray pred))) + (candidates (append loc-vars glob-syms)) + (helm-quit-if-no-candidate t) + (helm-execute-action-at-once-if-one t) + (enable-recursive-minibuffers t) + (helm-match-plugin-enabled + (member 'helm-compile-source--match-plugin + helm-compile-source-functions))) + (setq helm-lisp-completion--cache (cl-loop for sym in candidates + for len = (length sym) + when (> len helm-lgst-len) + do (setq helm-lgst-len len) + collect sym)) + (if candidates + (with-helm-show-completion beg end + ;; Overlay is initialized now in helm-current-buffer. + (helm + :sources `((name . "Lisp completion") + (init . (lambda () + (helm-init-candidates-in-buffer 'global + helm-lisp-completion--cache))) + (candidates-in-buffer) + (persistent-action . helm-lisp-completion-persistent-action) + (nomark) + (persistent-help . "Show brief doc in mode-line") + (filtered-candidate-transformer . helm-lisp-completion-transformer) + (action . (lambda (candidate) + (with-helm-current-buffer + (run-with-timer + 0.01 nil + 'helm-insert-completion-at-point + ,beg ,end candidate))))) + :input (if helm-match-plugin-enabled (concat target " ") target) + :resume 'noresume + :buffer "*helm lisp completion*" + :allow-nest t)) + (message "[No Match]")))) + +(defun helm-lisp-completion-persistent-action (candidate) + (let ((cursor-in-echo-area t) + mode-line-in-non-selected-windows) + (helm-show-info-in-mode-line + (propertize + (helm-get-first-line-documentation + (intern candidate)) + 'face 'helm-lisp-completion-info)))) + +(defun helm-lisp-completion-transformer (candidates _source) + "Helm candidates transformer for lisp completion." + (cl-loop for c in candidates + for sym = (intern c) + for annot = (cl-typecase sym + (command " (Com)") + (fbound " (Fun)") + (bound " (Var)") + (face " (Face)")) + for spaces = (make-string (- helm-lgst-len (length c)) ? ) + collect (cons (concat c spaces annot) c) into lst + finally return (sort lst #'helm-generic-sort-fn))) + +(defun helm-get-first-line-documentation (sym) + "Return first line documentation of symbol SYM. +If SYM is not documented, return \"Not documented\"." + (let ((doc (cond ((fboundp sym) + (documentation sym t)) + ((boundp sym) + (documentation-property sym 'variable-documentation t)) + ((facep sym) + (face-documentation sym)) + (t nil)))) + (if (and doc (not (string= doc "")) + ;; `documentation' return "\n\n(args...)" + ;; for CL-style functions. + (not (string-match-p "^\n\n" doc))) + (car (split-string doc "\n")) + "Not documented"))) + +;;; File completion. +;; +;; Complete file name at point. + +;;;###autoload +(defun helm-complete-file-name-at-point (&optional force) + "Complete file name at point." + (interactive) + (require 'helm-mode) + (let* ((tap (thing-at-point 'filename)) + beg + (init (and tap + (or force + (save-excursion + (end-of-line) + (search-backward tap (point-at-bol) t) + (setq beg (point)) + (looking-back "[^'`( ]"))) + (expand-file-name + (substring-no-properties tap)))) + (end (point)) + (helm-quit-if-no-candidate t) + (helm-execute-action-at-once-if-one t) + completion) + (with-helm-show-completion beg end + (setq completion (helm-read-file-name "FileName: " + :initial-input init))) + (when (and completion (not (string= completion ""))) + (delete-region beg end) (insert (if (string-match "^~" tap) + (abbreviate-file-name completion) + completion))))) + +;;;###autoload +(defun helm-lisp-indent () + ;; It is meant to use with `helm-define-multi-key' which + ;; does not support args for functions yet, so use `current-prefix-arg' + ;; for now instead of (interactive "P"). + (interactive) + (let ((tab-always-indent (or (eq tab-always-indent 'complete) + tab-always-indent))) + (indent-for-tab-command current-prefix-arg))) + +;;;###autoload +(defun helm-lisp-completion-or-file-name-at-point () + "Complete lisp symbol or filename at point. +Filename completion happen if string start after or between a double quote." + (interactive) + (let* ((tap (thing-at-point 'filename))) + (if (and tap (save-excursion + (end-of-line) + (search-backward tap (point-at-bol) t) + (looking-back "[^'`( ]"))) + (helm-complete-file-name-at-point) + (helm-lisp-completion-at-point)))) + +(helm-multi-key-defun helm-multi-lisp-complete-at-point + "Multi key function for completion in emacs lisp buffers. +First call indent, second complete symbol, third complete fname." + '(helm-lisp-indent + helm-lisp-completion-at-point + helm-complete-file-name-at-point) + 0.3) + + +;;; Apropos +;; +;; +(defun helm-apropos-init (test default) + "Init candidates buffer for `helm-apropos' sources." + (require 'helm-help) + (with-current-buffer (helm-candidate-buffer 'global) + (goto-char (point-min)) + (let ((default-symbol (and (stringp default) + (intern-soft default)))) + (when (and default-symbol (funcall test default-symbol)) + (insert (concat default "\n"))) + (cl-loop with all = (all-completions "" obarray test) + for sym in all + for s = (intern sym) + unless (or (and default (string= sym default)) + (keywordp s)) + do (insert (concat sym "\n")))))) + +(defun helm-def-source--emacs-variables (&optional default) + `((name . "Variables") + (init . (lambda () + (helm-apropos-init 'boundp ,default))) + (candidates-in-buffer) + (nomark) + (action . (("Describe Variable" . helm-describe-variable) + ("Find Variable" . helm-find-variable) + ("Info lookup" . helm-info-lookup-symbol) + ("Set variable" . helm-set-variable))))) + +(defun helm-def-source--emacs-faces (&optional default) + `((name . "Faces") + (init . (lambda () + (helm-apropos-init 'facep ,default))) + (candidates-in-buffer) + (nomark) + (filtered-candidate-transformer . (lambda (candidates _source) + (cl-loop for c in candidates + collect (propertize c 'face (intern c))))) + (action . (lambda (candidate) + (describe-face (intern candidate)))))) + +(defun helm-def-source--helm-attributes (&optional _default) + `((name . "Helm attributes") + (candidates . (lambda () + (mapcar 'symbol-name helm-attributes))) + (nomark) + (action . (lambda (candidate) + (let (special-display-buffer-names + special-display-regexps + helm-persistent-action-use-special-display) + (with-output-to-temp-buffer "*Help*" + (princ (get (intern candidate) 'helm-attrdoc)))))))) + +(defun helm-def-source--emacs-commands (&optional default) + `((name . "Commands") + (init . (lambda () + (helm-apropos-init 'commandp ,default))) + (candidates-in-buffer) + (nomark) + (action . (("Describe Function" . helm-describe-function) + ("Find Function" . helm-find-function) + ("Info lookup" . helm-info-lookup-symbol))))) + +(defun helm-def-source--emacs-functions (&optional default) + `((name . "Functions") + (init . (lambda () + (helm-apropos-init #'(lambda (x) (and (fboundp x) + (not (commandp x)))) + ,default))) + (nomark) + (candidates-in-buffer) + (action . (("Describe Function" . helm-describe-function) + ("Find Function" . helm-find-function) + ("Info lookup" . helm-info-lookup-symbol))))) + +(defun helm-info-lookup-symbol (candidate) + (let ((helm-execute-action-at-once-if-one t) + (helm-quit-if-no-candidate + `(lambda () + (message "`%s' Not Documented as a symbol" ,candidate)))) + (helm :sources '(helm-source-info-elisp + helm-source-info-cl + helm-source-info-eieio) + :resume 'noresume + :buffer "*helm lookup*" + :input candidate))) + +;;;###autoload +(defun helm-apropos () + "Preconfigured helm to describe commands, functions, variables and faces." + (interactive) + (let ((default (thing-at-point 'symbol))) + (helm :sources + (mapcar (lambda (func) + (funcall func default)) + '(helm-def-source--emacs-commands + helm-def-source--emacs-functions + helm-def-source--emacs-variables + helm-def-source--emacs-faces + helm-def-source--helm-attributes)) + :buffer "*helm apropos*" + :preselect (and default (concat "\\_<" (regexp-quote default) "\\_>"))))) + + +;;; Advices +;; +;; +(defvar helm-source-advice + '((name . "Function Advice") + (candidates . helm-advice-candidates) + (action ("Toggle Enable/Disable" . helm-advice-toggle)) + (persistent-action . helm-advice-persistent-action) + (nomark) + (multiline) + (persistent-help . "Describe function / C-u C-j: Toggle advice"))) + +(defun helm-advice-candidates () + (cl-loop for (fname) in ad-advised-functions + for function = (intern fname) + append + (cl-loop for class in ad-advice-classes append + (cl-loop for advice in (ad-get-advice-info-field function class) + for enabled = (ad-advice-enabled advice) + collect + (cons (format + "%s %s %s" + (if enabled "Enabled " "Disabled") + (propertize fname 'face 'font-lock-function-name-face) + (ad-make-single-advice-docstring advice class nil)) + (list function class advice)))))) + +(defun helm-advice-persistent-action (func-class-advice) + (if current-prefix-arg + (helm-advice-toggle func-class-advice) + (describe-function (car func-class-advice)))) + +(defun helm-advice-toggle (func-class-advice) + (cl-destructuring-bind (function _class advice) func-class-advice + (cond ((ad-advice-enabled advice) + (ad-advice-set-enabled advice nil) + (message "Disabled")) + (t + (ad-advice-set-enabled advice t) + (message "Enabled"))) + (ad-activate function) + (and helm-in-persistent-action + (helm-advice-update-current-display-string)))) + +(defun helm-advice-update-current-display-string () + (helm-edit-current-selection + (let ((newword (cond ((looking-at "Disabled") "Enabled") + ((looking-at "Enabled") "Disabled")))) + (when newword + (delete-region (point) (progn (forward-word 1) (point))) + (insert newword))))) + +;;;###autoload +(defun helm-manage-advice () + "Preconfigured `helm' to disable/enable function advices." + (interactive) + (helm-other-buffer 'helm-source-advice "*helm advice*")) + + +;;; Locate elisp library +;; +;; +(defvar helm-source-locate-library + `((name . "Elisp libraries (Scan)") + (init . (helm-locate-library-scan-init)) + (candidates-in-buffer) + (candidate-number-limit . 9999) + (keymap . ,helm-generic-files-map) + (type . file))) + +(defun helm-locate-library-scan-init () + "Init helm buffer status." + (helm-init-candidates-in-buffer + 'global (helm-locate-library-scan-list))) + +(defun helm-locate-library-scan-list () + (cl-loop for dir in load-path + when (file-directory-p dir) + append (directory-files dir t (concat (regexp-opt (get-load-suffixes)) + "\\'")) + into lst + finally return (helm-fast-remove-dups lst :test 'equal))) + +;;;###autoload +(defun helm-locate-library () + (interactive) + (helm :sources 'helm-source-locate-library + :buffer "*helm locate library*")) + +(defun helm-set-variable (var) + "Set value to VAR interactively." + (let ((sym (helm-symbolify var))) + (set sym (eval-minibuffer (format "Set %s: " var) + (prin1-to-string (symbol-value sym)))))) + + +;;; Type attributes +;; +;; +(let ((actions '(("Describe command" . describe-function) + ("Add command to kill ring" . helm-kill-new) + ("Go to command's definition" . find-function) + ("Debug on entry" . debug-on-entry) + ("Cancel debug on entry" . cancel-debug-on-entry) + ("Trace function" . trace-function) + ("Trace function (background)" . trace-function-background) + ("Untrace function" . untrace-function)))) + (define-helm-type-attribute 'command + `((action ("Call interactively" . helm-call-interactively) + ,@actions) + (coerce . helm-symbolify) + (persistent-action . describe-function)) + "Command. (string or symbol)") + + (define-helm-type-attribute 'function + `((action . ,actions) + (action-transformer helm-transform-function-call-interactively) + (candidate-transformer helm-mark-interactive-functions) + (coerce . helm-symbolify)) + "Function. (string or symbol)")) + +(define-helm-type-attribute 'variable + '((action + ("Describe variable" . describe-variable) + ("Add variable to kill ring" . helm-kill-new) + ("Go to variable's definition" . find-variable) + ("Set variable" . helm-set-variable)) + (coerce . helm-symbolify)) + "Variable.") + +(defun helm-btf--usable-p () + "Return t if current version of `backtrace-frame' accept 2 arguments." + (condition-case nil + (and (backtrace-frame 1 'condition-case) t) + (wrong-number-of-arguments nil))) + +(if (helm-btf--usable-p) ; Check if BTF accept more than one arg. + ;; Emacs 24.4. + (dont-compile + (defvar helm-sexp--last-sexp nil) + ;; This wont work compiled. + (defun helm-sexp-eval-1 () + (interactive) + (unwind-protect + (progn + ;; Trick called-interactively-p into thinking that `cand' is + ;; an interactive call, See `repeat-complex-command'. + (add-hook 'called-interactively-p-functions + #'helm-complex-command-history--called-interactively-skip) + (eval (read helm-sexp--last-sexp))) + (remove-hook 'called-interactively-p-functions + #'helm-complex-command-history--called-interactively-skip))) + + (defun helm-complex-command-history--called-interactively-skip (i _frame1 frame2) + (and (eq 'eval (cadr frame2)) + (eq 'helm-sexp-eval-1 + (cadr (backtrace-frame (+ i 2) #'called-interactively-p))) + 1)) + + (defun helm-sexp-eval (_candidate) + (call-interactively #'helm-sexp-eval-1))) + ;; Emacs 24.3 + (defun helm-sexp-eval (cand) + (let ((sexp (read cand))) + (condition-case err + (if (> (length (remove nil sexp)) 1) + (eval sexp) + (apply 'call-interactively sexp)) + (error (message "Evaluating gave an error: %S" err) + nil))))) + +(define-helm-type-attribute 'sexp + '((action + ("Eval" . (lambda (candidate) + (and (boundp 'helm-sexp--last-sexp) + (setq helm-sexp--last-sexp candidate)) + (helm-run-after-quit 'helm-sexp-eval candidate))) + ("Edit and eval" . + (lambda (cand) + (minibuffer-with-setup-hook + (lambda () (insert cand)) + (call-interactively #'eval-expression))))) + (persistent-action . helm-sexp-eval)) + "Sexp.") + +(define-helm-type-attribute 'timer + '((action + ("Cancel Timer" . (lambda (_timer) + (let ((mkd (helm-marked-candidates))) + (cl-loop for timer in mkd + do (cancel-timer timer))))) + ("Describe Function" . (lambda (tm) (describe-function (timer--function tm)))) + ("Find Function" . (lambda (tm) (find-function (timer--function tm))))) + (persistent-action . (lambda (tm) (describe-function (timer--function tm)))) + (persistent-help . "Describe Function")) + "Timer.") + + +;;; Elisp Timers. +;; +;; +(defvar helm-source-absolute-time-timers + '((name . "Absolute Time Timers") + (candidates . timer-list) + (filtered-candidate-transformer + . (lambda (candidates _source) + (cl-loop for timer in candidates + collect (cons (helm-elisp--format-timer timer) timer)))) + (allow-dups) + (volatile) + (type . timer))) + +(defvar helm-source-idle-time-timers + '((name . "Idle Time Timers") + (candidates . timer-idle-list) + (allow-dups) + (volatile) + (filtered-candidate-transformer + . (lambda (candidates _source) + (cl-loop for timer in candidates + collect (cons (helm-elisp--format-timer timer) timer)))) + (type . timer))) + +(defun helm-elisp--format-timer (timer) + (format "%s repeat=%s %s(%s)" + (let ((time (timer--time timer))) + (if (timer--idle-delay timer) + (format-time-string "idle-for=%5s" time) + (format-time-string "%m/%d %T" time))) + (or (timer--repeat-delay timer) "nil") + (mapconcat 'identity (split-string + (prin1-to-string (timer--function timer)) + "\n") " ") + (mapconcat 'prin1-to-string (timer--args timer) " "))) + +;;;###autoload +(defun helm-timers () + "Preconfigured `helm' for timers." + (interactive) + (helm-other-buffer '(helm-source-absolute-time-timers + helm-source-idle-time-timers) + "*helm timers*")) + + +;;; Complex command history +;; +;; +(defvar helm-source-complex-command-history + '((name . "Complex Command History") + (candidates . (lambda () + ;; Use cdr to avoid adding + ;; `helm-complex-command-history' here. + (cl-loop for i in command-history + unless (equal i '(helm-complex-command-history)) + collect (prin1-to-string i)))) + (type . sexp))) + +;;;###autoload +(defun helm-complex-command-history () + (interactive) + (helm :sources 'helm-source-complex-command-history + :buffer "*helm complex commands*")) + +(provide 'helm-elisp) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions obsolete) +;; coding: utf-8 +;; indent-tabs-mode: nil +;; End: + +;;; helm-elisp.el ends here diff --git a/elpa/helm-20140808.2300/helm-elisp.elc b/elpa/helm-20140808.2300/helm-elisp.elc new file mode 100644 index 0000000000000000000000000000000000000000..7823d5fde589af23e04c2315cc01f74073bcfedc GIT binary patch literal 24441 zcmds93v(OCk>*39X}RLqS9P)TsALFQCg^ynec(aT=R_1q$;!#HBT9A>Q#O~tg4_rM zU@RbssjIuce&5$KvpZM-lpN=(l9Npm*qxncPxsef_v|N!5BA?%SXj96$tRzv{r<%u z?Ivw?dZ{kr(QW)>-sf@aPQU+btJ`nIUDfZYqj;qD#%D_HsGz+ z7pj9w)U793GR$tFj$2#FMcm4^+P9MKAii~;bT2$U;BWieTVdq;`cl$Ov%yxi zI^;v@IVwrfYFOKfwgS2LA|0KpxQosVM(IWRw|ImC+13rY`S?7|bO**+lBxD(FTO}y zs@-p8qhZ=R%Ra{4VK!26yN!|N?F2hp;m%YY?LO-0^+&4J?~P&<9*;WSHm>x%y`%m6 z_f_jW9>%Q^I{C3QANSfS>#J7WQ>TgQ_T!00%wRH=#KUfy4Atly1;a?UizWC`|JZ>a z`|rk$8`aaxQR21w?L<|Mu{!t(){et~ANUixUn2KQ&HYk$zck!0P4k5{1_6FT{6zSv zvG$v~si2Mv4g55ZqYwqd;NSqiSro+=jB=tw7 z`lHCLKVr+ae4X`2?4i@2sOgrkIrZ11{#vR2T3&w*wbao68fvWNy*87p z6}ag)E9#qJ^8Gj+CaTr-y6LIn{*qtbc$9WC{W0xz`ubDy9NSp-Ah&6TeegVO;o)&M z>R)*6q}7dwiFY>aj|b)f?n~86yQ*?1ABRad9%1k74F=t`rFWmA;G^|nJWNq(r$1Dm zp&wfnwX3Tt)&Csj;!~&z>B(q3?0MKz*?Ip3B=2I-O}M93XWWC*>B?WZu>Os2gi;TE z^i&17&^zu`JH5@yQ&l-YXS?wwcVIhhqo3U3r{h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IETO(V?Qd{;#YvEjGePER&1>1* zSxP~kv2p&=mVlzsCpLA*x&=j+zNj8THq#N@b;%i`t?CZ@N{|m + +;; 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 . + +;;; Code: +(require 'cl-lib) +(require 'helm) + +(declare-function elscreen-find-screen-by-buffer "ext:elscreen.el" (buffer &optional create)) +(declare-function elscreen-find-file "ext:elscreen.el" (filename)) +(declare-function elscreen-goto "ext:elscreen.el" (screen)) + +(defun helm-find-buffer-on-elscreen (candidate) + "Open buffer in new screen, if marked buffers open all in elscreens." + (helm-require-or-error 'elscreen 'helm-find-buffer-on-elscreen) + (helm-aif (helm-marked-candidates) + (cl-dolist (i it) + (let ((target-screen (elscreen-find-screen-by-buffer + (get-buffer i) 'create))) + (elscreen-goto target-screen))) + (let ((target-screen (elscreen-find-screen-by-buffer + (get-buffer candidate) 'create))) + (elscreen-goto target-screen)))) + +(defun helm-elscreen-find-file (file) + (helm-require-or-error 'elscreen 'helm-elscreen-find-file) + (elscreen-find-file file)) + +(defvar helm-source-elscreen + '((name . "Elscreen") + (candidates + . (lambda () + (if (cdr (elscreen-get-screen-to-name-alist)) + (sort + (cl-loop for sname in (elscreen-get-screen-to-name-alist) + append (list (format "[%d] %s" (car sname) (cdr sname)))) + #'(lambda (a b) (compare-strings a nil nil b nil nil)))))) + (action + . (("Change Screen" . + (lambda (candidate) + (elscreen-goto (- (aref candidate 1) (aref "0" 0))))) + ("Kill Screen(s)" . + (lambda (candidate) + (cl-dolist (i (helm-marked-candidates)) + (elscreen-goto (- (aref i 1) (aref "0" 0))) + (elscreen-kill)))) + ("Only Screen" . + (lambda (candidate) + (elscreen-goto (- (aref candidate 1) (aref "0" 0))) + (elscreen-kill-others))))))) + +;;;###autoload +(defun helm-elscreen () + "Preconfigured helm to list elscreen." + (interactive) + (helm-other-buffer 'helm-source-elscreen "*Helm Elscreen*")) + +(provide 'helm-elscreen) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions obsolete) +;; coding: utf-8 +;; indent-tabs-mode: nil +;; End: + +;;; helm-elscreen.el ends here diff --git a/elpa/helm-20140808.2300/helm-elscreen.elc b/elpa/helm-20140808.2300/helm-elscreen.elc new file mode 100644 index 0000000000000000000000000000000000000000..a4af31d3ee07c2836d4693f53fb165fb66606a59 GIT binary patch literal 2059 zcmb_dU2oeq6m_~c|A9U3R%sEbh-69rh||2pb3HU@w+=}6l=y*`D4U2ZdL*5~`}I4d zq_~aKqChKvF(uxwbME2I#q9m`*G{L?y|}obsa$VF$#YulXwA$emJa`9+3!-`MWxJG zNwT7AW@xfq5}i{re4UJ6CnHMZWZ*&+O0KCu5bFJ-xzatv=tX?ZG9BeTUT#=##mjYQ z9pZ63j?#V{*PnQ)GsSro@zRA770s+4-6M`b;&c%8qr{zk5@toLL_HfL*5W^AV4$O} zJN&p3x~^fXxu$$qv9-u3mzg$7R7-t|Q>6{DJO|i^Jjr>Ko*%@>C1O<4P$nzGV7xU& zIL4PMoLo<@t|(hE#WI5;PhEOe<)kHLtfB>{QnD|SG+;Dwrb@vTnH3Dvew`Ox_@T!Z z@S{(++w~Va!^2GGoV;5!2rGGhn zalSQYA*7XyoEZqS#asK;^oEOF!w4<8X}7pr@Yp*nrIB+wBmejXMKp>B!8|x%_sj6^ zUVoEVOOq4E_dtCj_~EBH4ba8vwz5L_@kKlQ#@>D8r5(t zq=f^9opppIhLatizBk3FS#r8|W7eZK-UBhP-ID-$kRQTZ@xl(XT5*)vfcBFYdlc6R zymtZ@w+`#;;OWTVESEKILB7++ft+o%U#UPGX8z3f4h1-@-iNB({bYoX@`Tc?FzhXK zJLm=j`de}Qb11}et1!_lGy-`JYm26yWKYbm)&K)5J{(v3yX2C#ciFM`SoYqlw>I;v hk^C!fPW|R~C*u+N21VGbvr+P1V6xZqv&|oL{|7$sdO`pI literal 0 HcmV?d00001 diff --git a/elpa/helm-20140808.2300/helm-emms.el b/elpa/helm-20140808.2300/helm-emms.el new file mode 100644 index 000000000..a4b35dea5 --- /dev/null +++ b/elpa/helm-20140808.2300/helm-emms.el @@ -0,0 +1,186 @@ +;;; helm-emms.el --- Emms for Helm. -*- lexical-binding: t -*- + +;; Copyright (C) 2012 ~ 2014 Thierry Volpiatto + +;; 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 . + +;;; Code: + +(require 'cl-lib) +(require 'helm) + +(declare-function emms-streams "ext:emms-streams") +(declare-function emms-stream-delete-bookmark "ext:emms-streams") +(declare-function emms-stream-add-bookmark "ext:emms-streams" (name url fd type)) +(declare-function emms-stream-save-bookmarks-file "ext:emms-streams") +(declare-function emms-stream-quit "ext:emms-streams") +(declare-function with-current-emms-playlist "ext:emms" (&rest body)) +(declare-function emms-playlist-tracks-in-region "ext:emms" (beg end)) +(declare-function emms-playlist-first "ext:emms") +(declare-function emms-playlist-mode-play-smart "ext:emms-playlist-mode") + + +(defgroup helm-emms nil + "Predefined configurations for `helm.el'." + :group 'helm) + +(defface helm-emms-playlist + '((t (:foreground "Springgreen4" :underline t))) + "Face used for tracks in current emms playlist." + :group 'helm-emms) + + +(defvar emms-stream-list) +(defun helm-emms-stream-edit-bookmark (elm) + "Change the information of current emms-stream bookmark from helm." + (let* ((cur-buf helm-current-buffer) + (bookmark (assoc elm emms-stream-list)) + (name (read-from-minibuffer "Description: " + (nth 0 bookmark))) + (url (read-from-minibuffer "URL: " + (nth 1 bookmark))) + (fd (read-from-minibuffer "Feed Descriptor: " + (int-to-string (nth 2 bookmark)))) + (type (read-from-minibuffer "Type (url, streamlist, or lastfm): " + (format "%s" (car (last bookmark)))))) + (save-window-excursion + (emms-streams) + (when (re-search-forward (concat "^" name) nil t) + (forward-line 0) + (emms-stream-delete-bookmark) + (emms-stream-add-bookmark name url (string-to-number fd) type) + (emms-stream-save-bookmarks-file) + (emms-stream-quit) + (helm-switch-to-buffer cur-buf))))) + +(defun helm-emms-stream-delete-bookmark (_candidate) + "Delete emms-streams bookmarks from helm." + (let* ((cands (helm-marked-candidates)) + (bmks (cl-loop for bm in cands collect + (car (assoc bm emms-stream-list)))) + (bmk-reg (mapconcat 'regexp-quote bmks "\\|^"))) + (when (y-or-n-p (format "Really delete radios\n -%s: ? " + (mapconcat 'identity bmks "\n -"))) + (save-window-excursion + (emms-streams) + (goto-char (point-min)) + (cl-loop while (re-search-forward bmk-reg nil t) + do (progn (forward-line 0) + (emms-stream-delete-bookmark)) + finally do (progn + (emms-stream-save-bookmarks-file) + (emms-stream-quit))))))) + +(defvar helm-source-emms-streams + '((name . "Emms Streams") + (init . (lambda () + (emms-stream-init))) + (candidates . (lambda () + (mapcar 'car emms-stream-list))) + (action . (("Play" . (lambda (elm) + (let* ((stream (assoc elm emms-stream-list)) + (fn (intern (concat "emms-play-" (symbol-name (car (last stream)))))) + (url (cl-second stream))) + (funcall fn url)))) + ("Delete" . helm-emms-stream-delete-bookmark) + ("Edit" . helm-emms-stream-edit-bookmark))) + (filtered-candidate-transformer . helm-adaptive-sort))) + +;; Don't forget to set `emms-source-file-default-directory' +(defvar helm-source-emms-dired + '((name . "Music Directory") + (candidates . (lambda () + (cddr (directory-files emms-source-file-default-directory)))) + (action . + (("Play Directory" . (lambda (item) + (emms-play-directory + (expand-file-name + item + emms-source-file-default-directory)))) + ("Open dired in file's directory" . (lambda (item) + (helm-open-dired + (expand-file-name + item + emms-source-file-default-directory)))))) + (filtered-candidate-transformer . helm-adaptive-sort))) + +(defvar helm-emms-current-playlist nil) +(defun helm-emms-files-modifier (candidates _source) + (cl-loop for i in candidates + if (member (cdr i) helm-emms-current-playlist) + collect (cons (propertize (car i) + 'face 'helm-emms-playlist) + (cdr i)) + into lis + else collect i into lis + finally return (reverse lis))) + +(defun helm-emms-play-current-playlist () + "Play current playlist." + (emms-playlist-first) + (emms-playlist-mode-play-smart)) + +(defvar helm-source-emms-files + '((name . "Emms files") + (init . (lambda () + (setq helm-emms-current-playlist + (with-current-emms-playlist + (cl-loop with cur-list = (emms-playlist-tracks-in-region + (point-min) (point-max)) + for i in cur-list + for name = (assoc-default 'name i) + when name + collect name))))) + (candidates . (lambda () + (cl-loop for v being the hash-values in emms-cache-db + for name = (assoc-default 'name v) + for artist = (or (assoc-default 'info-artist v) "unknown") + for genre = (or (assoc-default 'info-genre v) "unknown") + for tracknum = (or (assoc-default 'info-tracknumber v) "unknown") + for song = (or (assoc-default 'info-title v) "unknown") + for info = (concat artist " - " genre " - " tracknum ": " song) + unless (string-match "^\\(http\\|mms\\):" name) + collect (cons info name)))) + (filtered-candidate-transformer . helm-emms-files-modifier) + (candidate-number-limit . 9999) + (action . (("Play file" . emms-play-file) + ("Add to Playlist and play (C-u clear current)" + . (lambda (candidate) + (with-current-emms-playlist + (when helm-current-prefix-arg + (emms-playlist-current-clear)) + (emms-playlist-new) + (mapc 'emms-add-playlist-file (helm-marked-candidates)) + (unless emms-player-playing-p + (helm-emms-play-current-playlist))))))))) + +;;;###autoload +(defun helm-emms () + "Preconfigured `helm' for emms sources." + (interactive) + (helm :sources '(helm-source-emms-streams + helm-source-emms-files + helm-source-emms-dired) + :buffer "*Helm Emms*")) + + +(provide 'helm-emms) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions obsolete) +;; coding: utf-8 +;; indent-tabs-mode: nil +;; End: + +;;; helm-emms ends here diff --git a/elpa/helm-20140808.2300/helm-emms.elc b/elpa/helm-20140808.2300/helm-emms.elc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?t!w}>mKfoG~P!T#t-Z)#oL5s~rHaAmaosQLw4s%o!=)>f= zp7zFIrJ)Evww0S=|L|9N3ow3n&)lu4QUdZ;9$iQAZ3NfwR<2Bhb`~dnNV5=FRg@b> zCH$CfCBxP7s)aPh6+E&s${)OpS=HkMv0j-c%cEJOP&O62ExuQ)lf{h+uhyhI0?njI zr_$vpG_l?ojlp2h7-!iOwHiWqFlhGCDWINcqFFE8%Zsspu(C`%JFu$C8Se_k zmN4-c*d)w_4=XfI6THRvj&QoVi?~Wc*5vD%Z&m;qnOlr;K}CBq!@X6-b#feP$Vw|U zHrp!QHaBS!(FKN3QWtvjxjA!G))|)gLtoW7AiRiyE9C_YlI!ohnc_t>?2ohD~kE|`&}ZqP#1UavH_{{t-b&Q1UT literal 0 HcmV?d00001 diff --git a/elpa/helm-20140808.2300/helm-eshell.el b/elpa/helm-20140808.2300/helm-eshell.el new file mode 100644 index 000000000..d79bdeb57 --- /dev/null +++ b/elpa/helm-20140808.2300/helm-eshell.el @@ -0,0 +1,236 @@ +;;; helm-eshell.el --- pcomplete and eshell completion for helm. -*- lexical-binding: t -*- + +;; Copyright (C) 2012 ~ 2014 Thierry Volpiatto + +;; 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 . + +;; Enable like this in .emacs: +;; +;; (add-hook 'eshell-mode-hook +;; #'(lambda () +;; (define-key eshell-mode-map [remap pcomplete] 'helm-esh-pcomplete))) +;; + +;;; Code: +(require 'cl-lib) +(require 'helm) +(require 'helm-elisp) +(require 'helm-regexp) + +(declare-function eshell-read-aliases-list "em-alias") +(declare-function eshell-send-input "esh-mode" (&optional use-region queue-p no-newline)) +(declare-function eshell-bol "esh-mode") +(declare-function eshell-parse-arguments "esh-arg" (beg end)) + +(defvar helm-eshell-history-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map helm-map) + (define-key map (kbd "M-p") 'helm-next-line) + map) + "Keymap for `helm-eshell-history'.") + +(defvar helm-esh-completion-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map helm-map) + (define-key map (kbd "TAB") 'helm-next-line) + map) + "Keymap for `helm-esh-pcomplete'.") + +(defvar helm-source-esh + '((name . "Eshell completions") + (init . (lambda () + (setq pcomplete-current-completions nil + pcomplete-last-completion-raw nil) + ;; Eshell-command add this hook in all minibuffers + ;; Remove it for the helm one. (Fixed in Emacs24) + (remove-hook 'minibuffer-setup-hook 'eshell-mode))) + (candidates . helm-esh-get-candidates) + (nomark) + (persistent-action . ignore) + (filtered-candidate-transformer + (lambda (candidates _sources) + (cl-loop for i in (sort candidates 'helm-generic-sort-fn) + collect + (cond ((string-match "\\`~/?" helm-ec-target) + (abbreviate-file-name i)) + ((string-match "\\`/" helm-ec-target) i) + (t + (file-relative-name i)))))) + (action . helm-ec-insert)) + "Helm source for Eshell completion.") + +;; Internal. +(defvar helm-ec-target "") +(defun helm-ec-insert (candidate) + "Replace text at point with CANDIDATE. +The function that call this should set `helm-ec-target' to thing at point." + (let ((pt (point))) + (when (and helm-ec-target + (search-backward helm-ec-target nil t) + (string= (buffer-substring (point) pt) helm-ec-target)) + (delete-region (point) pt))) + (cond ((string-match "\\`~/?" helm-ec-target) + (insert (helm-quote-whitespace (abbreviate-file-name candidate)))) + ((string-match "\\`/" helm-ec-target) + (insert (helm-quote-whitespace candidate))) + (t + (insert (concat (and (string-match "\\`[.]/" helm-ec-target) "./") + (helm-quote-whitespace + (file-relative-name candidate))))))) + +(defun helm-esh-get-candidates () + "Get candidates for eshell completion using `pcomplete'." + (catch 'pcompleted + (with-helm-current-buffer + (let* ((pcomplete-stub) + pcomplete-seen pcomplete-norm-func + pcomplete-args pcomplete-last pcomplete-index + (pcomplete-autolist pcomplete-autolist) + (pcomplete-suffix-list pcomplete-suffix-list) + (table (pcomplete-completions)) + (entry (or (try-completion helm-pattern + (pcomplete-entries)) + helm-pattern))) + (cl-loop ;; expand entry too to be able to compare it with file-cand. + with exp-entry = (and (stringp entry) + (not (string= entry "")) + (file-name-as-directory + (expand-file-name entry default-directory))) + for i in (all-completions pcomplete-stub table) + ;; Transform the related names to abs names. + for file-cand = (and exp-entry + (if (file-remote-p i) i + (expand-file-name + i (file-name-directory entry)))) + ;; Compare them to avoid dups. + for file-entry-p = (and (stringp exp-entry) + (stringp file-cand) + ;; Fix :/tmp/foo/ $ cd foo + (not (file-directory-p file-cand)) + (file-equal-p exp-entry file-cand)) + if (and file-cand (or (file-remote-p file-cand) + (file-exists-p file-cand)) + (not file-entry-p)) + collect file-cand into ls + else + ;; Avoid adding entry here. + unless file-entry-p collect i into ls + finally return + (if (and exp-entry + (file-directory-p exp-entry) + ;; If the car of completion list is + ;; an executable, probably we are in + ;; command completion, so don't add a + ;; possible file related entry here. + (and ls (not (executable-find (car ls)))) + ;; Don't add entry if already in prompt. + (not (file-equal-p exp-entry pcomplete-stub))) + (append (list exp-entry) + ;; Entry should not be here now but double check. + (remove entry ls)) + ls)))))) + +;;; Eshell history. +;; +;; +(defvar helm-source-eshell-history + `((name . "Eshell history") + (init . (lambda () + (let (eshell-hist-ignoredups) + (eshell-write-history eshell-history-file-name t) + (with-current-buffer (helm-candidate-buffer 'global) + (insert-file-contents eshell-history-file-name))) + ;; Same comment as in `helm-source-esh' + (remove-hook 'minibuffer-setup-hook 'eshell-mode))) + (candidates-in-buffer) + (nomark) + (keymap . ,helm-eshell-history-map) + (filtered-candidate-transformer . (lambda (candidates sources) + (reverse candidates))) + (candidate-number-limit . 9999) + (action . (lambda (candidate) + (eshell-kill-input) + (insert candidate)))) + "Helm source for Eshell history.") + +;;;###autoload +(defun helm-esh-pcomplete () + "Preconfigured helm to provide helm completion in eshell." + (interactive) + (let* ((helm-quit-if-no-candidate t) + (helm-execute-action-at-once-if-one t) + (end (point-marker)) + (beg (save-excursion (eshell-bol) (point))) + (args (catch 'eshell-incomplete + (eshell-parse-arguments beg end))) + ;; Use thing-at-point instead of last args value + ;; to exclude possible delimiters e.g "(". + (target (thing-at-point 'symbol)) + (first (car args)) ; Maybe lisp delimiter "(". + last) ; Will be the last but parsed by pcomplete. + (setq helm-ec-target (or target " ") + end (point) + ;; Reset beg for `with-helm-show-completion'. + beg (or (and target (- end (length target))) + ;; Nothing at point. + (progn (insert " ") (point)))) + (cond ((eq first ?\() + (helm-lisp-completion-or-file-name-at-point)) + ;; In eshell `pcomplete-parse-arguments' is called + ;; with `pcomplete-parse-arguments-function' + ;; locally bound to `eshell-complete-parse-arguments' + ;; which is calling `lisp-complete-symbol', + ;; calling it before would popup the + ;; *completions* buffer. + (t (setq last (car (last (ignore-errors + (pcomplete-parse-arguments))))) + (with-helm-show-completion beg end + (helm :sources 'helm-source-esh + :buffer "*helm pcomplete*" + :keymap helm-esh-completion-map + :resume 'noresume + :input (and (stringp last) + (helm-ff-set-pattern last)))))))) + +;;;###autoload +(defun helm-eshell-history () + "Preconfigured helm for eshell history." + (interactive) + (let* ((end (point)) + (beg (save-excursion (eshell-bol) (point))) + (input (buffer-substring beg end)) + flag-empty) + (when (eq beg end) + (insert " ") + (setq flag-empty t) + (setq end (point))) + (unwind-protect + (with-helm-show-completion beg end + (helm :sources 'helm-source-eshell-history + :buffer "*helm eshell history*" + :resume 'noresume + :input input)) + (when (and flag-empty + (looking-back " ")) + (delete-char -1))))) + +(provide 'helm-eshell) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions obsolete) +;; coding: utf-8 +;; indent-tabs-mode: nil +;; End: + +;;; helm-eshell ends here diff --git a/elpa/helm-20140808.2300/helm-eshell.elc b/elpa/helm-20140808.2300/helm-eshell.elc new file mode 100644 index 0000000000000000000000000000000000000000..b52a795327002d084484d601c7e440023210f75d GIT binary patch literal 7080 zcmeHL`)}LG5tbiO69)}?{h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jF;Qgkh_MfOK|=^cLh>h%!HK&|_m2uu>j_$vVdI2#u|< zu*L}DB8t8QLN(Ay1Mgw!jkR>hZ4r;cLq9?r`QAtsQ%3aP9DR35)aNQPEc#w;vBwkbt%;XEl9 z5*`Z2gQus%6e!;793BeSAdZB^YQ%Bf4@Eg9PW^C*gY2e?Ri0P2zRA((HKB;R~I-iaZLncU3O9Xp6_@Li}Hdj_gm$`(~7={w3vpHR{ z2^Q*AaUmc=bZ{Kxy4yBq7J(;T!Bw+#5+BbINV2646r9J%lL=nLw!t3DYH;w@O2!9-Vm3YW~(rUN&R$u&uhV1i@h_|jrA-|J@uW95f z^dbO65p>}?RKu1oiH5K1KF1GHBvpLsICxIS8LaOy&D_RB|8F!4!n=e0;bhnWK|>bT z!#bWMYM_kRgXo|pYBepir04T$nCk^M_S!$$t2#YIWua6FY1`Cf6pPw-+i8p3(ovwo!=Tkxx!tDi&>lmFb zLP!6_`ILmA)DW?z@N9ihdYEV)CCe9Jx0uXyyWxDjv8(dDb_%vL(oO9z^iqHqgoa2? zL!?82*$7lk3P49R%7s*T5vhlYmoL8k({~5YK}Hn?^0i-96;T-{85|I6sBihcsLjN1*{Iq06ga|l{h;6?1J@O+TOxT8{SM*6objfxW^4Lv1UrhZxA>+Aa z3s9O8Y(oD9-BD^mj0c88ZV1l%QhOS!op9X26lw1xrvQ0MtSli3h|jQw1cyjWM5}3` zePmGah#aiksCw`qP_vl}0wE$}62lC4(7yH6&EFblVr75Snm&y04dAY@vivw;1E*oo zcjyY)r`f)_3L)+4ariQZ + +;; 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 . + +;;; Code: +(require 'cl-lib) +(require 'helm) +(require 'eldoc) + + +(defgroup helm-eval nil + "Eval related Applications and libraries for Helm." + :group 'helm) + +(defcustom helm-eldoc-in-minibuffer-show-fn + 'helm-show-info-in-mode-line + "A function to display eldoc info. +Should take one arg: the string to display." + :group 'helm-eval + :type 'symbol) + +(defcustom helm-show-info-in-mode-line-delay 12 + "Eldoc will show info in mode-line during this delay if user is idle." + :type 'integer + :group 'helm-eval) + + +(declare-function eldoc-current-symbol "eldoc") +(declare-function eldoc-get-fnsym-args-string "eldoc" (sym &optional index)) +(declare-function eldoc-get-var-docstring "eldoc" (sym)) +(declare-function eldoc-fnsym-in-current-sexp "eldoc") + +;;; Evaluation Result +;; +;; +;; Internal +(defvar helm-eldoc-active-minibuffers-list nil) + +(defvar helm-eval-expression-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map helm-map) + (define-key map (kbd "") 'helm-eval-new-line-and-indent) + (define-key map (kbd "") 'lisp-indent-line) + (define-key map (kbd "") 'helm-lisp-completion-at-point) + (define-key map (kbd "C-p") 'previous-line) + (define-key map (kbd "C-n") 'next-line) + (define-key map (kbd "") 'previous-line) + (define-key map (kbd "") 'next-line) + (define-key map (kbd "") 'forward-char) + (define-key map (kbd "") 'backward-char) + map)) + +(defvar helm-source-evaluation-result + '((name . "Evaluation Result") + (init . (lambda () (require 'edebug))) + (dummy) + (multiline) + (mode-line . "C-RET: nl-and-indent, tab: reindent, C-tab:complete, C-p/n: next/prec-line.") + (filtered-candidate-transformer . (lambda (candidates _source) + (list + (condition-case nil + (with-helm-current-buffer + (pp-to-string + (if edebug-active + (edebug-eval-expression + (read helm-pattern)) + (eval (read helm-pattern))))) + (error "Error"))))) + (action . (("Copy result to kill-ring" . (lambda (candidate) + (kill-new + (replace-regexp-in-string + "\n" "" candidate)))) + ("copy sexp to kill-ring" . (lambda (candidate) + (kill-new helm-input))))))) + +(defun helm-eval-new-line-and-indent () + (interactive) + (newline) (lisp-indent-line)) + +(defun helm-eldoc-store-minibuffer () + "Store minibuffer buffer name in `helm-eldoc-active-minibuffers-list'." + (with-selected-window (minibuffer-window) + (push (current-buffer) helm-eldoc-active-minibuffers-list))) + +(defun helm-eldoc-show-in-eval () + "Return eldoc in mode-line for current minibuffer input." + (let ((buf (window-buffer (active-minibuffer-window)))) + (condition-case err + (when (member buf helm-eldoc-active-minibuffers-list) + (with-current-buffer buf + (let* ((sym (save-excursion + (unless (looking-back ")\\|\"") + (forward-char -1)) + (eldoc-current-symbol))) + (info-fn (eldoc-fnsym-in-current-sexp)) + (doc (or (eldoc-get-var-docstring sym) + (eldoc-get-fnsym-args-string + (car info-fn) (cadr info-fn))))) + (when doc (funcall helm-eldoc-in-minibuffer-show-fn doc))))) + (error (message "Eldoc in minibuffer error: %S" err) nil)))) + +(defun helm-show-info-in-mode-line (str) + "Display string STR in mode-line." + (save-selected-window + (with-current-buffer helm-buffer + (let ((mode-line-format (concat " " str))) + (force-mode-line-update) + (sit-for helm-show-info-in-mode-line-delay)) + (force-mode-line-update)))) + +;;; Calculation Result +;; +;; +(defvar helm-source-calculation-result + '((name . "Calculation Result") + (dummy) + (filtered-candidate-transformer . (lambda (candidates _source) + (list + (condition-case nil + (calc-eval helm-pattern) + (error "error"))))) + (action ("Copy result to kill-ring" . kill-new)))) + +;;;###autoload +(defun helm-eval-expression (arg) + "Preconfigured helm for `helm-source-evaluation-result'." + (interactive "P") + (helm :sources 'helm-source-evaluation-result + :input (when arg (thing-at-point 'sexp)) + :buffer "*helm eval*" + :history 'read-expression-history + :keymap helm-eval-expression-map)) + +(defvar eldoc-idle-delay) +;;;###autoload +(defun helm-eval-expression-with-eldoc () + "Preconfigured helm for `helm-source-evaluation-result' with `eldoc' support. " + (interactive) + (let ((timer (run-with-idle-timer + eldoc-idle-delay 'repeat + 'helm-eldoc-show-in-eval))) + (unwind-protect + (minibuffer-with-setup-hook + 'helm-eldoc-store-minibuffer + (call-interactively 'helm-eval-expression)) + (and timer (cancel-timer timer)) + (setq helm-eldoc-active-minibuffers-list + (cdr helm-eldoc-active-minibuffers-list))))) + +;;;###autoload +(defun helm-calcul-expression () + "Preconfigured helm for `helm-source-calculation-result'." + (interactive) + (helm-other-buffer 'helm-source-calculation-result "*helm calcul*")) + +(provide 'helm-eval) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions obsolete) +;; coding: utf-8 +;; indent-tabs-mode: nil +;; End: + +;;; helm-eval.el ends here diff --git a/elpa/helm-20140808.2300/helm-eval.elc b/elpa/helm-20140808.2300/helm-eval.elc new file mode 100644 index 0000000000000000000000000000000000000000..e7b20516e58b9284dad2d5fee477c69b7c31b593 GIT binary patch literal 5791 zcmcIoYj4}w5w(M2*Xsp}El{9nzjQ)38z~KCl6u%yP{3ZtXcuUKz)nBOLidWivWZY6 zmk&EG`r~_M?xjS@@+R%J0T`M0Ju_#{oXa;Ce?9-r&d$#Mn>TOhJX_>(q9d9;&_Y$G zcuMzgD*P_XKJ=0-R0(A%U8#!B>KmdH@`q#pcAR1s zTT%(ml2`E}{->%ipzQ5S=lk2ZH2c@3E-89Q)glfl%EGcL;`F9`jozZHNJSA0UGC$b z^n#N|YeX5=NVAH311zl*S1; z7yMVD6IB5aXL+8)p@9@}G_hcziWoSUX9fKQOZOZan}s%3zr#2+1M~&qasW3@-9?D-ZmD=3NkuQ=b5a6fWW#`Pszv7^g8X#)2=fm z=WMl1l~ELzd7>Vy{XDyOonGB$brMmfK4@gHCRN;w0X|J8DQGp1jjJAV^gJwPSz=7t zeh_$-H`+Y9A3QqYg~Z}MhQ+)TvTmMn>Ma_ZD5^O*aU^7~SvH;%GPoc##8IMgt~jmq zjV`8i+}-a)dJcEDJ&iPs?{v%CCESHXM~pYeBjB$7m>0TaZgCeXrw!Em1b_v*d)JOd zet#DY0`h})i@?3z!pQXfwH87CT8resS_|hwf31a+XxMHEuyU}ra)6ZsJ1anvwV=Z$ zEf8(D%vDip_k(`mrczh-PZ#Yvt>ElAFvX2DId=LDvbK4>#c)oN9cBMB&JxMeJ+*OsEXNVv<-#7%%-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fpI1tSGCe2?KYqCZ-v2pTN4F6+F@)fXHgo!d`oCGv_rEM1ifN_CU2{%7R0 zZS@UuLKS3Hg&Mgsr_NbeP#ITj*(#F#(ea2Qxu&_TyuvLetZ{Q^E z{~uAqCo+sDacOi2WQY+O^7HvZqi6I0Dzg;%gVWIwy<;j*=kZMqNhaZ!yP>JIPw7ru zX6fwm&s#vgsianEDpeMkmJ<65;BojhGoReGnZ=h_XS&1F-}@Gq!`4+`V`;hVuxn^+ zj#^p(Kc$z)Qfl~W1|nO^cu`AZn-b0|S&(;nh5I8eaVVOs+*H((hi=n8Hn$O|n!u99 zVBih9OBa)T8u~%F@+FmZo@YhXqbK#vx_mW7T_!Itwf-Jl%!LQntpAW> z5Q`z}9S)%VGSYnVXo%^EiHYxZ{s5m!2A(ZuEh>}GAabP?D#ML$HKS2e{9z;*JUeZu zJiuP9%HcK$OupP;qb5DPrTJdJk<*1Cb z6ya781MgOKZdzMs*p#_b>Pwki-@txu`oy|Z{<`>6`|`&hlz1pfV|wynl5iteR~$Sz z8lH5Q!hbaQtOR*X&QEK7Gq#nj%M=j7C}G975V2ppmf`bJ(MUdNdAcN6elUBy!Z)kF Y&HLeS@*=y7@zrs4ed_N28?mw>?EnA( literal 0 HcmV?d00001 diff --git a/elpa/helm-20140808.2300/helm-external.el b/elpa/helm-20140808.2300/helm-external.el new file mode 100644 index 000000000..bb02a7c6b --- /dev/null +++ b/elpa/helm-20140808.2300/helm-external.el @@ -0,0 +1,215 @@ +;;; helm-external.el --- Run Externals commands within Emacs with helm completion. -*- lexical-binding: t -*- + +;; Copyright (C) 2012 ~ 2014 Thierry Volpiatto + +;; 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 . + +;;; Code: + +(require 'cl-lib) +(require 'helm) + + +(defgroup helm-external nil + "External related Applications and libraries for Helm." + :group 'helm) + +(defcustom helm-raise-command nil + "A shell command to jump to a window running specific program. +Need external program wmctrl. +This will be use with `format', so use something like \"wmctrl -xa %s\"." + :type 'string + :group 'helm-external) + +(defcustom helm-external-programs-associations nil + "Alist to store externals programs associated with file extension. +This variable overhide setting in .mailcap file. +e.g : '\(\(\"jpg\" . \"gqview\"\) (\"pdf\" . \"xpdf\"\)\) " + :type '(alist :key-type string :value-type string) + :group 'helm-external) + +(defcustom helm-default-external-file-browser "nautilus" + "Default external file browser for your system. +Directories will be opened externally with it when +opening file externally in `helm-find-files'. +Set to nil if you do not have external file browser +or do not want to use it. +Windows users should set that to \"explorer.exe\"." + :group 'helm-external + :type 'string) + + +;;; Internals +(defvar helm-external-command-history nil) +(defvar helm-external-commands-list nil + "A list of all external commands the user can execute. +If this variable is not set by the user, it will be calculated +automatically.") + +(defun helm-external-commands-list-1 (&optional sort) + "Returns a list of all external commands the user can execute. +If `helm-external-commands-list' is non-nil it will +return its contents. Else it calculates all external commands +and sets `helm-external-commands-list'." + (helm-aif helm-external-commands-list + it + (setq helm-external-commands-list + (cl-loop + for dir in (split-string (getenv "PATH") path-separator) + when (and (file-exists-p dir) (file-accessible-directory-p dir)) + for lsdir = (cl-loop for i in (directory-files dir t) + for bn = (file-name-nondirectory i) + when (and (not (member bn completions)) + (not (file-directory-p i)) + (file-executable-p i)) + collect bn) + append lsdir into completions + finally return + (if sort (sort completions 'string-lessp) completions))))) + +(defun helm-run-or-raise (exe &optional file) + "Generic command that run asynchronously EXE. +If EXE is already running just jump to his window if `helm-raise-command' +is non--nil. +When FILE argument is provided run EXE with FILE. +In this case EXE must be provided as \"EXE %s\"." + (let* ((real-com (car (split-string (replace-regexp-in-string + "%s" "" exe)))) + (proc (if file (concat real-com " " file) real-com)) + process-connection-type) + (if (get-process proc) + (if helm-raise-command + (shell-command (format helm-raise-command real-com)) + (error "Error: %s is already running" real-com)) + (when (cl-loop for i in helm-external-commands-list thereis (string= real-com i)) + (message "Starting %s..." real-com) + (if file + (start-process-shell-command + proc nil (format exe (shell-quote-argument + (if (eq system-type 'windows-nt) + (helm-w32-prepare-filename file) + file)))) + (start-process-shell-command proc nil real-com)) + (set-process-sentinel + (get-process proc) + #'(lambda (process event) + (when (and (string= event "finished\n") + helm-raise-command + (not (helm-get-pid-from-process-name real-com))) + (shell-command (format helm-raise-command "emacs"))) + (message "%s process...Finished." process)))) + (setq helm-external-commands-list + (cons real-com + (delete real-com helm-external-commands-list)))))) + +(defun helm-get-mailcap-for-file (filename) + "Get the command to use for FILENAME from mailcap files. +The command is like and is meant to use with `format'." + (mailcap-parse-mailcaps) + (let* ((ext (file-name-extension filename)) + (mime (when ext (mailcap-extension-to-mime ext))) + (result (when mime (mailcap-mime-info mime)))) + ;; If elisp file have no associations in .mailcap + ;; `mailcap-maybe-eval' is returned, in this case just return nil. + (when (stringp result) result))) + +(defun helm-get-default-program-for-file (filename) + "Try to find a default program to open FILENAME. +Try first in `helm-external-programs-associations' and then in mailcap file +if nothing found return nil." + (let* ((ext (file-name-extension filename)) + (def-prog (assoc-default ext helm-external-programs-associations))) + (cond ((and def-prog (not (string= def-prog ""))) + (concat def-prog " %s")) + ((and helm-default-external-file-browser + (file-directory-p filename)) + (concat helm-default-external-file-browser " %s")) + (t (helm-get-mailcap-for-file filename))))) + +(defun helm-open-file-externally (file) + "Open FILE with an external program. +Try to guess which program to use with `helm-get-default-program-for-file'. +If not found or a prefix arg is given query the user which tool to use." + (let* ((fname (expand-file-name file)) + (collection (helm-external-commands-list-1 'sort)) + (def-prog (helm-get-default-program-for-file fname)) + (real-prog-name (if (or helm-current-prefix-arg (not def-prog)) + ;; Prefix arg or no default program. + (prog1 + (helm-comp-read + "Program: " collection + :must-match t + :name "Open file Externally" + :del-input nil + :history helm-external-command-history) + ;; Always prompt to set this program as default. + (setq def-prog nil)) + ;; No prefix arg or default program exists. + (replace-regexp-in-string " %s\\| '%s'" "" def-prog))) + (program (concat real-prog-name " %s"))) + (unless (or def-prog ; Association exists, no need to record it. + ;; Don't try to record non--filenames associations (e.g urls). + (not (file-exists-p fname))) + (when + (y-or-n-p + (format + "Do you want to make `%s' the default program for this kind of files? " + real-prog-name)) + (helm-aif (assoc (file-name-extension fname) + helm-external-programs-associations) + (setq helm-external-programs-associations + (delete it helm-external-programs-associations))) + (push (cons (file-name-extension fname) + (helm-read-string + "Program (Add args maybe and confirm): " real-prog-name)) + helm-external-programs-associations) + (customize-save-variable 'helm-external-programs-associations + helm-external-programs-associations))) + (helm-run-or-raise program file) + (setq helm-external-command-history + (cons real-prog-name + (delete real-prog-name + (cl-loop for i in helm-external-command-history + when (executable-find i) collect i)))))) + +;;;###autoload +(defun helm-run-external-command (program) + "Preconfigured `helm' to run External PROGRAM asyncronously from Emacs. +If program is already running exit with error. +You can set your own list of commands with +`helm-external-commands-list'." + (interactive (list + (helm-comp-read + "RunProgram: " + (helm-external-commands-list-1 'sort) + :must-match t + :del-input nil + :name "External Commands" + :history helm-external-command-history))) + (helm-run-or-raise program) + (setq helm-external-command-history + (cons program (delete program + (cl-loop for i in helm-external-command-history + when (executable-find i) collect i))))) + + +(provide 'helm-external) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions obsolete) +;; coding: utf-8 +;; indent-tabs-mode: nil +;; End: + +;;; helm-external ends here diff --git a/elpa/helm-20140808.2300/helm-external.elc b/elpa/helm-20140808.2300/helm-external.elc new file mode 100644 index 0000000000000000000000000000000000000000..15d6d12352dedd506d182c5719a5749cef8ec10d GIT binary patch literal 6927 zcmbtZ`*YjI5!S zXdEDkne>0}w|jRWDJhAku>%vh$L`(Ue!JgZ9`wI?e0yzet?}T&1MxVY&XQCP#oM`< zM&(01%6%5akMjI|E6w956?rC(qf#7IV<8TN-#PU65B;79JipB%MnygqBM1@q|Dj}| z?nB1?mYhbhY7OtpbQay8$aLz`1aIHlZv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l}VM8tFuYkoXK= z6fa-Bc-%ie7X5$rpPw`xF_bAH_i}XH?*=+LqMAo^B#MRlYEgv{CnHWt0p$77v%cW_ zfn_d@qWxrP4ni4M4}Y~ncGTawyh6uRE-}588pH%GtL2JNMdmVUT`Y)?ob!B-LzX8P zq$qPK4&iJAuk%|vOpZ(X8vzT4tNS0&fIsR8rlDtr!=X^knJ;|}p_3D_4X!ufP+Uqd zr{@;8%-v}M|Fb>x0d$S>*P>$*QQPlXQ+E%<35Y0&Eb(ZtH&Z0of`@vDg4b4ui7{T^ zdDI-dWm^B-3fde0_FJh6S`7KBHQoLafv-^J6|Wd=iqi9ThZID#lSO3sOSP{1B1r|^#t zl_YPpwT{+V=6PxqE`jq3V3MQiqSo#O{D}y-1}5RnTrts0cVio@+-rYkq1XPLj@!gj zos`Y>kxv&u^<~r6T?93{5F$QJ-a-^Zr+54Yo0NgD*`r%{he#w4J(EUt*TE)8 z45#;C6Ru0^_5BSlE3lN_+Qvge;lmyn0}~a`tGWNi5%m(c2~uOAn)`=_D||+BEO(Eq zqClFXM2KUhWO+3&sEc3r8hcQbb}mN__~ZQ zd_+Uk4qEpi2*)AuS%lmYzFvw$*6A=-2y&utuI|z~h9ZR_u+A!76Cc{5{-=ozU0n@+ z6uUcW*D#zK%XPgnCl;JhiJ{4j^CahM40|&{3_`qt1V)Js490q#ANfMyJw8XKEv_Ctl*7h!l*g0%gb>5`_Kcx*)N)r(hIcy*hfP z>!rF}Vp70&{Ty?wVGv<1R!%TE-6Y`pkqKn0@o(G~(M>yDp76z0ewNj@8P?T!MuV5M zxJa{|d_#g@$C=Bl?}|7@HmM!o%w398nl~UVX + +;; 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 . + +;;; Code: + +(require 'cl-lib) +(require 'helm) +(require 'helm-utils) +(require 'helm-external) +(require 'helm-grep) +(require 'helm-match-plugin) +(require 'helm-help) +(require 'helm-locate) +(require 'helm-bookmark) +(require 'helm-tags) +(require 'helm-buffers) +(require 'thingatpt) +(require 'ffap) +(require 'dired-aux) +(require 'dired-x) +(require 'tramp) +(require 'image-dired) + +(declare-function find-library-name "find-func.el" (library)) +(declare-function secure-hash "ext:fns.c" (algorithm object &optional start end binary)) +(declare-function w32-shell-execute "ext:w32fns.c" (operation document &optional parameters show-flag)) +(declare-function gnus-dired-attach "ext:gnus-dired.el" (files-to-attach)) +(declare-function image-dired-display-image "image-dired.el" (file &optional original-size)) +(declare-function image-dired-update-property "image-dired.el" (prop value)) +(declare-function eshell-read-aliases-list "em-alias") +(declare-function eshell-send-input "esh-mode" (&optional use-region queue-p no-newline)) +(declare-function eshell-kill-input "esh-mode") +(declare-function eshell-bol "esh-mode") +(declare-function helm-ls-git-ls "ext:helm-ls-git") +(declare-function helm-hg-find-files-in-project "ext:helm-ls-hg") + + +;;; Type attributes +;; +;; +(define-helm-type-attribute 'file + `((action + ("Find file" . helm-find-many-files) + ("Find file as root" . helm-find-file-as-root) + ("Find file other window" . find-file-other-window) + ("Find file other frame" . find-file-other-frame) + ("Open dired in file's directory" . helm-open-dired) + ("Grep File(s) `C-u recurse'" . helm-find-files-grep) + ("Zgrep File(s) `C-u Recurse'" . helm-ff-zgrep) + ("Pdfgrep File(s)" . helm-ff-pdfgrep) + ("Insert as org link" . helm-files-insert-as-org-link) + ("Checksum File" . helm-ff-checksum) + ("Ediff File" . helm-find-files-ediff-files) + ("Ediff Merge File" . helm-find-files-ediff-merge-files) + ("Etags `M-., C-u tap, C-u C-u reload tag file'" . helm-ff-etags-select) + ("View file" . view-file) + ("Insert file" . insert-file) + ("Delete file(s)" . helm-delete-marked-files) + ("Open file externally (C-u to choose)" . helm-open-file-externally) + ("Open file with default tool" . helm-open-file-with-default-tool) + ("Find file in hex dump" . hexl-find-file)) + (persistent-help . "Show this file") + (action-transformer helm-transform-file-load-el + helm-transform-file-browse-url) + (candidate-transformer helm-skip-boring-files + helm-highlight-files + helm-w32-pathname-transformer)) + "File name.") + + + +(defgroup helm-files nil + "Files applications and libraries for Helm." + :group 'helm) + +(defcustom helm-boring-file-regexp-list + (mapcar (lambda (f) + (concat + (rx-to-string + (replace-regexp-in-string + "/$" "" f) t) "$")) + completion-ignored-extensions) + "The regexp list matching boring files." + :group 'helm-files + :type '(repeat (choice regexp))) + +(defcustom helm-for-files-preferred-list + '(helm-source-buffers-list + helm-source-recentf + helm-source-bookmarks + helm-source-file-cache + helm-source-files-in-current-dir + helm-source-locate) + "Your preferred sources to find files." + :type '(repeat (choice symbol)) + :group 'helm-files) + +(defcustom helm-tramp-verbose 0 + "Just like `tramp-verbose' but specific to helm. +When set to 0 don't show tramp messages in helm. +If you want to have the default tramp messages set it to 3." + :type 'integer + :group 'helm-files) + +(defcustom helm-ff-auto-update-initial-value nil + "Auto update when only one candidate directory is matched. +Default value when starting `helm-find-files' is nil because +it prevent using to delete char backward and by the way +confuse beginners. +For a better experience with `helm-find-files' set this to non--nil +and use C- to toggle it." + :group 'helm-files + :type 'boolean) + +(defcustom helm-ff-lynx-style-map t + "Use arrow keys to navigate with `helm-find-files'. +You will have to restart Emacs or reeval `helm-find-files-map' +and `helm-read-file-map' for this take effect." + :group 'helm-files + :type 'boolean) + +(defcustom helm-ff-history-max-length 100 + "Number of elements shown in `helm-find-files' history." + :group 'helm-files + :type 'integer) + +(defcustom helm-ff-smart-completion t + "Try to complete filenames smarter when non--nil. +See `helm-ff--transform-pattern-for-completion' for more info." + :group 'helm-files + :type 'boolean) + +(defcustom helm-ff-tramp-not-fancy t + "No colors when listing remote files when set to non--nil. +This make listing much faster, specially on slow machines." + :group 'helm-files + :type 'boolean) + +(defcustom helm-ff-exif-data-program "exiftran" + "Program used to extract exif data of an image file." + :group 'helm-files + :type 'string) + +(defcustom helm-ff-exif-data-program-args "-d" + "Arguments used for `helm-ff-exif-data-program'." + :group 'helm-files + :type 'string) + +(defcustom helm-ff-newfile-prompt-p t + "Whether Prompt or not when creating new file. +This set `ffap-newfile-prompt'." + :type 'boolean + :group 'helm-files) + +(defcustom helm-ff-avfs-directory "~/.avfs" + "The default avfs directory, usually '~/.avfs'. +When this is set you will be able to expand archive filenames with `C-j' +inside an avfs directory mounted with mountavfs. +See ." + :type 'string + :group 'helm-files) + +(defcustom helm-ff-file-compressed-list '("gz" "bz2" "zip" "7z") + "Minimal list of compressed files extension." + :type '(repeat (choice string)) + :group 'helm-files) + +(defcustom helm-ff-printer-list nil + "A list of available printers on your system. +When non--nil let you choose a printer to print file. +Otherwise when nil the variable `printer-name' will be used. +On Unix based systems (lpstat command needed) you don't need to set this, +`helm-ff-find-printers' will find a list of available printers for you." + :type '(repeat (choice string)) + :group 'helm-files) + +(defcustom helm-ff-transformer-show-only-basename t + "Show only basename of candidates in `helm-find-files'. +This can be toggled at anytime from `helm-find-files' with \ +\\\\[helm-ff-run-toggle-basename]." + :type 'boolean + :group 'helm-files) + +(defcustom helm-ff-signal-error-on-dot-files t + "Signal error when file is `.' or `..' on file deletion when non--nil. +Default is non--nil. +WARNING: Setting this to nil is unsafe and can cause deletion of a whole tree." + :group 'helm-files + :type 'boolean) + +(defcustom helm-ff-search-library-in-sexp nil + "Search for library in `require' and `declare-function' sexp." + :group 'helm-files + :type 'boolean) + +(defcustom helm-tooltip-hide-delay 25 + "Hide tooltips automatically after this many seconds." + :group 'helm-files + :type 'integer) + +(defcustom helm-ff-file-name-history-use-recentf nil + "Use `recentf-list' instead of `file-name-history' in `helm-find-files'." + :group 'helm-files + :type 'boolean) + +(defcustom helm-ff-skip-boring-files nil + "Non--nil to skip files matching regexps in `helm-boring-file-regexp-list'. +This take effect in `helm-find-files' and file completion used by `helm-mode' +i.e `helm-read-file-name'." + :group 'helm-files + :type 'boolean) + +(defcustom helm-findutils-skip-boring-files t + "Ignore files matching regexps in `completion-ignored-extensions'." + :group 'helm-files + :type 'boolean) + +(defcustom helm-findutils-find-program "find" + "The program used for the Unix shell command 'find'." + :group 'helm-files + :type 'string) + +(defcustom helm-findutils-search-full-path nil + "Search in full path with shell command find when non--nil. +I.e use the -path/ipath arguments of find instead of -name/iname." + :group 'helm-files + :type 'boolean) + +(defcustom helm-files-save-history-extra-sources '("Find" "Locate") + "Extras source that save candidate to `file-name-history'." + :group 'helm-files + :type '(repeat (choice string))) + +;;; Faces +;; +;; +(defface helm-ff-prefix + '((t (:background "yellow" :foreground "black"))) + "Face used to prefix new file or url paths in `helm-find-files'." + :group 'helm-files) + +(defface helm-ff-executable + '((t (:foreground "green"))) + "Face used for executable files in `helm-find-files'." + :group 'helm-files) + +(defface helm-ff-directory + '((t (:foreground "DarkRed" :background "LightGray"))) + "Face used for directories in `helm-find-files'." + :group 'helm-files) + +(defface helm-ff-symlink + '((t (:foreground "DarkOrange"))) + "Face used for symlinks in `helm-find-files'." + :group 'helm-files) + +(defface helm-ff-invalid-symlink + '((t (:foreground "black" :background "red"))) + "Face used for invalid symlinks in `helm-find-files'." + :group 'helm-files) + +(defface helm-ff-file + '((t (:inherit font-lock-builtin-face))) + "Face used for file names in `helm-find-files'." + :group 'helm-files) + +(defface helm-history-deleted + '((t (:inherit helm-ff-invalid-symlink))) + "Face used for deleted files in `file-name-history'." + :group 'helm-files) + +(defface helm-history-remote + '((t (:foreground "Indianred1"))) + "Face used for remote files in `file-name-history'." + :group 'helm-files) + + +;;; Helm-find-files - The helm file browser. +;; +;; Keymaps +(defvar helm-find-files-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map helm-map) + (define-key map (kbd "C-]") 'helm-ff-run-toggle-basename) + (define-key map (kbd "C-x C-f") 'helm-ff-run-locate) + (define-key map (kbd "C-x C-d") 'helm-ff-run-browse-project) + (define-key map (kbd "C-s") 'helm-ff-run-grep) + (define-key map (kbd "M-g s") 'helm-ff-run-grep) + (define-key map (kbd "M-g p") 'helm-ff-run-pdfgrep) + (define-key map (kbd "M-g z") 'helm-ff-run-zgrep) + (define-key map (kbd "M-.") 'helm-ff-run-etags) + (define-key map (kbd "M-R") 'helm-ff-run-rename-file) + (define-key map (kbd "M-C") 'helm-ff-run-copy-file) + (define-key map (kbd "M-B") 'helm-ff-run-byte-compile-file) + (define-key map (kbd "M-L") 'helm-ff-run-load-file) + (define-key map (kbd "M-S") 'helm-ff-run-symlink-file) + (define-key map (kbd "M-H") 'helm-ff-run-hardlink-file) + (define-key map (kbd "M-D") 'helm-ff-run-delete-file) + (define-key map (kbd "M-K") 'helm-ff-run-kill-buffer-persistent) + (define-key map (kbd "C-c d") 'helm-ff-persistent-delete) + (define-key map (kbd "M-e") 'helm-ff-run-switch-to-eshell) + (define-key map (kbd "C-c i") 'helm-ff-run-complete-fn-at-point) + (define-key map (kbd "C-c o") 'helm-ff-run-switch-other-window) + (define-key map (kbd "C-c C-o") 'helm-ff-run-switch-other-frame) + (define-key map (kbd "C-c C-x") 'helm-ff-run-open-file-externally) + (define-key map (kbd "C-c X") 'helm-ff-run-open-file-with-default-tool) + (define-key map (kbd "M-!") 'helm-ff-run-eshell-command-on-file) + (define-key map (kbd "M-%") 'helm-ff-run-query-replace-on-marked) + (define-key map (kbd "C-=") 'helm-ff-run-ediff-file) + (define-key map (kbd "C-c =") 'helm-ff-run-ediff-merge-file) + (define-key map (kbd "M-p") 'helm-ff-run-switch-to-history) + (define-key map (kbd "C-c h") 'helm-ff-file-name-history) + (define-key map (kbd "M-i") 'helm-ff-properties-persistent) + (define-key map (kbd "C-c ?") 'helm-ff-help) + (define-key map (kbd "C-}") 'helm-narrow-window) + (define-key map (kbd "C-{") 'helm-enlarge-window) + (define-key map (kbd "C-") 'helm-ff-run-toggle-auto-update) + (define-key map (kbd "C-c ") 'helm-ff-run-toggle-auto-update) + (define-key map (kbd "C-c C-a") 'helm-ff-run-gnus-attach-files) + (define-key map (kbd "C-c p") 'helm-ff-run-print-file) + (define-key map (kbd "C-c /") 'helm-ff-run-find-sh-command) + ;; Next 2 have no effect if candidate is not an image file. + (define-key map (kbd "M-l") 'helm-ff-rotate-left-persistent) + (define-key map (kbd "M-r") 'helm-ff-rotate-right-persistent) + (define-key map (kbd "C-.") 'helm-find-files-up-one-level) + (define-key map (kbd "C-l") 'helm-find-files-up-one-level) + (define-key map (kbd "C-h C-b") 'helm-send-bug-report-from-helm) + (define-key map (kbd "C-x @") 'helm-ff-run-find-file-as-root) + (define-key map (kbd "C-c @") 'helm-ff-run-insert-org-link) + (helm-define-key-with-subkeys map (kbd "DEL") ?\d 'helm-ff-delete-char-backward + nil nil 'helm-ff-delete-char-backward--exit-fn) + (when helm-ff-lynx-style-map + (define-key map (kbd "") 'helm-find-files-up-one-level) + (define-key map (kbd "") 'helm-execute-persistent-action)) + (delq nil map)) + "Keymap for `helm-find-files'.") + +(defvar helm-read-file-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map helm-map) + (define-key map (kbd "") 'helm-cr-empty-string) + (define-key map (kbd "C-]") 'helm-ff-run-toggle-basename) + (define-key map (kbd "C-.") 'helm-find-files-up-one-level) + (define-key map (kbd "C-l") 'helm-find-files-up-one-level) + (define-key map (kbd "C-c h") 'helm-ff-file-name-history) + (define-key map (kbd "C-") 'helm-ff-run-toggle-auto-update) + (define-key map (kbd "C-c ?") 'helm-read-file-name-help) + (helm-define-key-with-subkeys map (kbd "DEL") ?\d 'helm-ff-delete-char-backward + nil nil 'helm-ff-delete-char-backward--exit-fn) + (when helm-ff-lynx-style-map + (define-key map (kbd "") 'helm-find-files-up-one-level) + (define-key map (kbd "") 'helm-execute-persistent-action) + (define-key map (kbd "C-o") nil) + (define-key map (kbd "") 'helm-previous-source) + (define-key map (kbd "") 'helm-next-source)) + (delq nil map)) + "Keymap for `helm-read-file-name'.") + +(defvar helm-esh-on-file-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map helm-map) + (define-key map (kbd "C-c ?") 'helm-esh-help) + map) + "Keymap for `helm-find-files-eshell-command-on-file'.") + + +;; Internal. +(defvar helm-find-files-doc-header " (`C-l': Go up one level)" + "*The doc that is inserted in the Name header of a find-files or dired source.") +(defvar helm-ff-auto-update-flag nil + "Internal, flag to turn on/off auto-update in `helm-find-files'. +Don't set it directly, use instead `helm-ff-auto-update-initial-value'.") +(defvar helm-ff-last-expanded nil + "Store last expanded directory or file.") +(defvar helm-ff-default-directory nil) +(defvar helm-ff-history nil) +(defvar helm-ff-cand-to-mark nil) +(defvar helm-ff-url-regexp + "\\`\\(news\\(post\\)?:\\|nntp:\\|mailto:\\|file:\\|\\(ftp\\|https?\\|telnet\\|gopher\\|www\\|wais\\):/?/?\\).*" + "Same as `ffap-url-regexp' but match earlier possible url.") +(defvar helm-tramp-file-name-regexp "\\`/\\([^[/:]+\\|[^/]+]\\):") +(defvar helm-marked-buffer-name "*helm marked*") +(defvar helm-ff--auto-update-state nil) +(defvar helm-ff--deleting-char-backward nil) + + +;;; Helm-find-files +;; +;; +(defvar helm-source-find-files + `((name . "Find Files") + (header-name . (lambda (name) + (concat name helm-find-files-doc-header))) + (init . (lambda () + (setq helm-ff-auto-update-flag + helm-ff-auto-update-initial-value) + (setq helm-ff--auto-update-state + helm-ff-auto-update-flag) + (helm-set-local-variable 'helm-in-file-completion-p t))) + (candidates . helm-find-files-get-candidates) + (filtered-candidate-transformer . helm-ff-sort-candidates) + (filter-one-by-one . helm-ff-filter-candidate-one-by-one) + (persistent-action . helm-find-files-persistent-action) + (persistent-help . "Hit1 Expand Candidate, Hit2 or (C-u) Find file") + (mode-line . helm-ff-mode-line-string) + (volatile) + (keymap . ,helm-find-files-map) + (nohighlight) + (candidate-number-limit . 9999) + (action-transformer . helm-find-files-action-transformer) + (action + . ,(delq + nil + `(("Find File" . helm-find-file-or-marked) + ("Find file in Dired" . helm-point-file-in-dired) + ,(and (locate-library "elscreen") + '("Find file in Elscreen" . helm-elscreen-find-file)) + ("View file" . view-file) + ("Checksum File" . helm-ff-checksum) + ("Query replace on marked" . helm-ff-query-replace-on-marked) + ("Serial rename files" . helm-ff-serial-rename) + ("Serial rename by symlinking files" . helm-ff-serial-rename-by-symlink) + ("Serial rename by copying files" . helm-ff-serial-rename-by-copying) + ("Open file with default tool" . helm-open-file-with-default-tool) + ("Find file in hex dump" . hexl-find-file) + ("Complete at point `C-c i'" + . helm-insert-file-name-completion-at-point) + ("Insert as org link `C-c @'" . helm-files-insert-as-org-link) + ("Find shell command `C-c /'" . helm-ff-find-sh-command) + ("Open file externally `C-c C-x, C-u to choose'" + . helm-open-file-externally) + ("Grep File(s) `C-s, C-u Recurse'" . helm-find-files-grep) + ("Zgrep File(s) `M-g z, C-u Recurse'" . helm-ff-zgrep) + ("Switch to Eshell `M-e'" . helm-ff-switch-to-eshell) + ("Etags `M-., C-u reload tag file'" . helm-ff-etags-select) + ("Eshell command on file(s) `M-!, C-u take all marked as arguments.'" + . helm-find-files-eshell-command-on-file) + ("Find file as root `C-x @'" . helm-find-file-as-root) + ("Ediff File `C-='" . helm-find-files-ediff-files) + ("Ediff Merge File `C-c ='" . 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) + ("Symlink files(s) `M-S, C-u to follow'" . helm-find-files-symlink) + ("Relsymlink file(s) `C-u to follow'" . helm-find-files-relsymlink) + ("Hardlink file(s) `M-H, C-u to follow'" . helm-find-files-hardlink) + ("Find file other window `C-c o'" . find-file-other-window) + ("Switch to history `M-p'" . helm-find-files-switch-to-hist) + ("Find file other frame `C-c C-o'" . find-file-other-frame) + ("Print File `C-c p, C-u to refresh'" . helm-ff-print) + ("Locate `C-x C-f, C-u to specify locate db'" . helm-ff-locate))))) + "The main source to browse files. +Should not be used among other sources.") + +(defun helm-dwim-target-directory () + "Return value of `default-directory' of buffer in other window. +If there is only one window return the value ot `default-directory' +for current buffer." + (with-helm-current-buffer + (let ((num-windows (length (remove (get-buffer-window helm-marked-buffer-name) + (window-list))))) + (if (> num-windows 1) + (save-selected-window + (other-window 1) + default-directory) + (car helm-ff-history))))) + +(defun helm-find-files-do-action (action) + "Generic function for creating actions from `helm-source-find-files'. +ACTION must be an action supported by `helm-dired-action'." + (let* ((ifiles (mapcar 'expand-file-name ; Allow modify '/foo/.' -> '/foo' + (helm-marked-candidates :with-wildcard t))) + (cand (helm-get-selection)) ; Target + (prompt (format "%s %s file(s) to: " + (capitalize (symbol-name action)) + (length ifiles))) + (helm-always-two-windows t) + (helm-reuse-last-window-split-state t) + (helm-split-window-default-side + (eq helm-split-window-default-side 'same)) + helm-split-window-in-side-p + (parg helm-current-prefix-arg) + helm-display-source-at-screen-top ; prevent setting window-start. + helm-ff-auto-update-initial-value + (dest (with-helm-display-marked-candidates + helm-marked-buffer-name + (mapcar #'(lambda (f) + (if (file-directory-p f) + (concat (helm-basename f) "/") + (helm-basename f))) + ifiles) + (with-helm-current-buffer + (helm-read-file-name + prompt + :preselect (if helm-ff-transformer-show-only-basename + (helm-basename cand) cand) + :initial-input (helm-dwim-target-directory) + :history (helm-find-files-history :comp-read nil)))))) + (helm-dired-action + dest :files ifiles :action action :follow parg))) + +(defun helm-find-files-copy (_candidate) + "Copy files from `helm-find-files'." + (helm-find-files-do-action 'copy)) + +(defun helm-find-files-rename (_candidate) + "Rename files from `helm-find-files'." + (helm-find-files-do-action 'rename)) + +(defun helm-find-files-symlink (_candidate) + "Symlink files from `helm-find-files'." + (helm-find-files-do-action 'symlink)) + +(defun helm-find-files-relsymlink (_candidate) + "Relsymlink files from `helm-find-files'." + (helm-find-files-do-action 'relsymlink)) + +(defun helm-find-files-hardlink (_candidate) + "Hardlink files from `helm-find-files'." + (helm-find-files-do-action 'hardlink)) + +(defun helm-find-files-byte-compile (_candidate) + "Byte compile elisp files from `helm-find-files'." + (let ((files (helm-marked-candidates :with-wildcard t)) + (parg helm-current-prefix-arg)) + (cl-loop for fname in files + do (byte-compile-file fname parg)))) + +(defun helm-find-files-load-files (_candidate) + "Load elisp files from `helm-find-files'." + (let ((files (helm-marked-candidates :with-wildcard t))) + (cl-loop for fname in files + do (load fname)))) + +(defun helm-find-files-ediff-files-1 (candidate &optional merge) + "Generic function to ediff/merge files in `helm-find-files'." + (let* ((bname (helm-basename candidate)) + (marked (helm-marked-candidates :with-wildcard t)) + (prompt (if merge "Ediff Merge `%s' With File: " + "Ediff `%s' With File: ")) + (fun (if merge 'ediff-merge-files 'ediff-files)) + (input (helm-dwim-target-directory)) + (presel (if helm-ff-transformer-show-only-basename + (helm-basename candidate) + (expand-file-name + (helm-basename candidate) + input)))) + (if (= (length marked) 2) + (funcall fun (car marked) (cadr marked)) + (funcall fun candidate (helm-read-file-name + (format prompt bname) + :initial-input input + :preselect presel))))) + +(defun helm-find-files-ediff-files (candidate) + (helm-find-files-ediff-files-1 candidate)) + +(defun helm-find-files-ediff-merge-files (candidate) + (helm-find-files-ediff-files-1 candidate 'merge)) + +(defun helm-find-files-grep (_candidate) + "Default action to grep files from `helm-find-files'." + (apply 'run-with-timer 0.01 nil + #'helm-do-grep-1 + (helm-marked-candidates :with-wildcard t) + helm-current-prefix-arg)) + +(defun helm-ff-zgrep (_candidate) + "Default action to zgrep files from `helm-find-files'." + (helm-ff-zgrep-1 (helm-marked-candidates :with-wildcard t) helm-current-prefix-arg)) + +(defun helm-ff-pdfgrep (_candidate) + "Default action to pdfgrep files from `helm-find-files'." + (let ((cands (cl-loop for file in (helm-marked-candidates :with-wildcard t) + if (or (string= (file-name-extension file) "pdf") + (string= (file-name-extension file) "PDF")) + collect file)) + (helm-pdfgrep-default-function 'helm-pdfgrep-init)) + (when cands + (helm-do-pdfgrep-1 cands)))) + +(defun helm-ff-etags-select (candidate) + "Default action to jump to etags from `helm-find-files'." + (when (get-buffer helm-action-buffer) + (kill-buffer helm-action-buffer)) + (let* ((source-name (assoc-default 'name (helm-get-current-source))) + (default-directory (if (string= source-name "Find Files") + helm-ff-default-directory + (file-name-directory candidate)))) + (helm-etags-select helm-current-prefix-arg))) + +(defun helm-find-files-switch-to-hist (_candidate) + "Switch to helm-find-files history." + (helm-find-files t)) + +(defvar eshell-command-aliases-list nil) +(defvar helm-eshell-command-on-file-input-history nil) +(defun helm-find-files-eshell-command-on-file-1 (&optional map) + "Run `eshell-command' on CANDIDATE or marked candidates. +This is done possibly with an eshell alias, if no alias found, you can type in +an eshell command. + +Basename of CANDIDATE can be a wild-card. +e.g you can do \"eshell-command command *.el\" +Where \"*.el\" is the CANDIDATE. + +It is possible to do eshell-command command +like this: \"command %s some more args\". + +If MAP is given run `eshell-command' on all marked files at once, +Otherwise, run `eshell-command' on each marked files. +In other terms, with a prefix arg do on the three marked files +\"foo\" \"bar\" \"baz\": + +\"eshell-command command foo bar baz\" + +otherwise do + +\"eshell-command command foo\" +\"eshell-command command bar\" +\"eshell-command command baz\" + +Note: +If `eshell' or `eshell-command' have not been run once, +or if you have no eshell aliases `eshell-command-aliases-list' +will not be loaded first time you use this." + (when (or eshell-command-aliases-list + (y-or-n-p "Eshell is not loaded, run eshell-command without alias anyway? ")) + (and eshell-command-aliases-list (eshell-read-aliases-list)) + (let* ((cand-list (helm-marked-candidates :with-wildcard t)) + (default-directory (or helm-ff-default-directory + ;; If candidate is an url *-ff-default-directory is nil + ;; so keep value of default-directory. + default-directory)) + (command (helm-comp-read + "Command: " + (cl-loop for (a . c) in eshell-command-aliases-list + when (string-match "\\(\\$1\\|\\$\\*\\)$" (car c)) + collect (propertize a 'help-echo (car c)) into ls + finally return (sort ls 'string<)) + :buffer "*helm eshell on file*" + :name "Eshell command" + :keymap helm-esh-on-file-map + :mode-line + '("Eshell alias" + "C-c ?: Help, \\[universal-argument]: Insert output at point") + :input-history + 'helm-eshell-command-on-file-input-history)) + (alias-value (car (assoc-default command eshell-command-aliases-list)))) + (when (and (= (length cand-list) 1) + (string-match "[*]" (helm-basename (car cand-list)))) + (setq cand-list (file-expand-wildcards (car cand-list) t))) + (if (or (equal helm-current-prefix-arg '(16)) + (equal map '(16))) + ;; Two time C-u from `helm-comp-read' mean print to current-buffer. + ;; i.e `eshell-command' will use this value. + (setq current-prefix-arg '(16)) + ;; Else reset the value of `current-prefix-arg' + ;; to avoid printing in current-buffer. + (setq current-prefix-arg nil)) + (if (and (or + ;; One prefix-arg have been passed before `helm-comp-read'. + ;; If map have been set with C-u C-u (value == '(16)) + ;; ignore it. + (and map (equal map '(4))) + ;; One C-u from `helm-comp-read'. + (equal helm-current-prefix-arg '(4)) + ;; An alias that finish with $* + (and alias-value + ;; If command is an alias be sure it accept + ;; more than one arg i.e $*. + (string-match "\\$\\*$" alias-value))) + (cdr cand-list)) + + ;; Run eshell-command with ALL marked files as arguments. + ;; This wont work on remote files, because tramp handlers depends + ;; on `default-directory' (limitation). + (let ((mapfiles (mapconcat 'shell-quote-argument cand-list " "))) + (if (string-match "'%s'\\|\"%s\"\\|%s" command) + (eshell-command (format command mapfiles)) ; See [1] + (eshell-command (format "%s %s" command mapfiles)))) + + ;; Run eshell-command on EACH marked files. + ;; To work with tramp handler we have to call + ;; COMMAND on basename of each file, using + ;; its basedir as `default-directory'. + (cl-loop for f in cand-list + for dir = (and (not (string-match ffap-url-regexp f)) + (helm-basedir f)) + for file = (format "'%s'" (if (and dir (file-remote-p dir)) + (helm-basename f) f)) + for com = (if (string-match "'%s'\\|\"%s\"\\|%s" command) + ;; [1] This allow to enter other args AFTER filename + ;; i.e + (format command file) + (format "%s %s" command file)) + do (let ((default-directory (or dir default-directory))) + (eshell-command com))))))) + +(defun helm-find-files-eshell-command-on-file (_candidate) + "Run `eshell-command' on CANDIDATE or marked candidates. +See `helm-find-files-eshell-command-on-file-1' for more info." + (helm-find-files-eshell-command-on-file-1 helm-current-prefix-arg)) + +(defun helm-ff-switch-to-eshell (_candidate) + "Switch to eshell and cd to `helm-ff-default-directory'." + (let ((cd-eshell #'(lambda () + (eshell-kill-input) + (goto-char (point-max)) + (insert + (format "cd '%s'" helm-ff-default-directory)) + (eshell-send-input)))) + (if (get-buffer "*eshell*") + (helm-switch-to-buffer "*eshell*") + (call-interactively 'eshell)) + (unless (get-buffer-process (current-buffer)) + (funcall cd-eshell)))) + +(defun helm-ff-serial-rename-action (method) + "Rename all marked files to `helm-ff-default-directory' with METHOD. +See `helm-ff-serial-rename-1'." + (let* ((cands (helm-marked-candidates :with-wildcard t)) + (def-name (car cands)) + (name (helm-read-string "NewName: " + (replace-regexp-in-string + "[0-9]+$" "" + (helm-basename + def-name + (file-name-extension def-name))))) + (start (read-number "StartAtNumber: ")) + (extension (helm-read-string "Extension: " + (file-name-extension (car cands)))) + (dir (expand-file-name + (helm-read-file-name + "Serial Rename to directory: " + :initial-input + (expand-file-name helm-ff-default-directory) + :test 'file-directory-p + :must-match t))) + done) + (with-helm-display-marked-candidates + helm-marked-buffer-name (mapcar 'helm-basename cands) + (if (y-or-n-p + (format "Rename %s file(s) to <%s> like this ?\n%s " + (length cands) dir (format "%s <-> %s%s.%s" + (helm-basename (car cands)) + name start extension))) + (progn + (helm-ff-serial-rename-1 + dir cands name start extension :method method) + (setq done t) + (message nil)))) + (if done + (with-helm-current-buffer (helm-find-files-1 dir)) + (message "Operation aborted")))) + +(defun helm-ff-member-directory-p (file directory) + (let ((dir-file (expand-file-name + (file-name-as-directory (file-name-directory file)))) + (cur-dir (expand-file-name (file-name-as-directory directory)))) + (string= dir-file cur-dir))) + +(cl-defun helm-ff-serial-rename-1 + (directory collection new-name start-at-num extension &key (method 'rename)) + "rename files in COLLECTION to DIRECTORY with the prefix name NEW-NAME. +Rename start at number START-AT-NUM - ex: prefixname-01.jpg. +EXTENSION is the file extension to use, in empty prompt, +reuse the original extension of file. +METHOD can be one of rename, copy or symlink. +Files will be renamed if they are files of current directory, otherwise they +will be treated with METHOD. +Default METHOD is rename." + ;; Maybe remove directories selected by error in collection. + (setq collection (cl-remove-if 'file-directory-p collection)) + (let* ((tmp-dir (file-name-as-directory + (concat (file-name-as-directory directory) + (symbol-name (cl-gensym "tmp"))))) + (fn (cl-case method + (copy 'copy-file) + (symlink 'make-symbolic-link) + (rename 'rename-file) + (t (error "Error: Unknown method %s" method))))) + (make-directory tmp-dir) + (unwind-protect + (progn + ;; Rename all files to tmp-dir with new-name. + ;; If files are not from start directory, use method + ;; to move files to tmp-dir. + (cl-loop for i in collection + for count from start-at-num + for fnum = (if (< count 10) "0%s" "%s") + for nname = (concat tmp-dir new-name (format fnum count) + (if (not (string= extension "")) + (format ".%s" (replace-regexp-in-string + "[.]" "" extension)) + (file-name-extension i 'dot))) + do (if (helm-ff-member-directory-p i directory) + (rename-file i nname) + (funcall fn i nname))) + ;; Now move all from tmp-dir to destination. + (cl-loop with dirlist = (directory-files + tmp-dir t directory-files-no-dot-files-regexp) + for f in dirlist do + (if (file-symlink-p f) + (make-symbolic-link (file-truename f) + (concat (file-name-as-directory directory) + (helm-basename f))) + (rename-file f directory)))) + (delete-directory tmp-dir t)))) + +(defun helm-ff-serial-rename (_candidate) + "Serial rename all marked files to `helm-ff-default-directory'. +Rename only file of current directory, and symlink files coming from +other directories. +See `helm-ff-serial-rename-1'." + (helm-ff-serial-rename-action 'rename)) + +(defun helm-ff-serial-rename-by-symlink (_candidate) + "Serial rename all marked files to `helm-ff-default-directory'. +Rename only file of current directory, and symlink files coming from +other directories. +See `helm-ff-serial-rename-1'." + (helm-ff-serial-rename-action 'symlink)) + +(defun helm-ff-serial-rename-by-copying (_candidate) + "Serial rename all marked files to `helm-ff-default-directory'. +Rename only file of current directory, and copy files coming from +other directories. +See `helm-ff-serial-rename-1'." + (helm-ff-serial-rename-action 'copy)) + +(defun helm-ff-query-replace-on-marked-1 (candidates) + (with-helm-display-marked-candidates + helm-marked-buffer-name + (mapcar 'helm-basename candidates) + (let* ((regexp (read-string "Replace regexp on filename(s): ")) + (str (read-string (format "Replace regexp `%s' with: " regexp)))) + (cl-loop with query = "y" + with count = 0 + for old in candidates + for new = (concat (helm-basedir old) + (replace-regexp-in-string + regexp str + (helm-basename old))) + ;; If `regexp' is not matched in `old' + ;; `replace-regexp-in-string' will + ;; return `old' unmodified. + unless (string= old new) + do (progn + (unless (string= query "!") + (while (not (member + (setq query + (string + (read-key + (propertize + (format + "Replace `%s' by `%s' [!,y,n,q]" + old new) + 'face 'minibuffer-prompt)))) + '("y" "!" "n" "q"))) + (message "Please answer by y,n,! or q") (sit-for 1))) + (when (string= query "q") + (cl-return (message "Operation aborted"))) + (unless (string= query "n") + (rename-file old new) + (cl-incf count))) + finally (message "%d Files renamed" count)))) + ;; This fix the emacs bug where "Emacs-Lisp:" is sent + ;; in minibuffer (not the echo area). + (sit-for 0.1) + (with-current-buffer (window-buffer (minibuffer-window)) + (delete-minibuffer-contents))) + +;; The action. +(defun helm-ff-query-replace-on-marked (_candidate) + (let ((marked (helm-marked-candidates))) + (helm-run-after-quit #'helm-ff-query-replace-on-marked-1 marked))) + +;; The command for `helm-find-files-map'. +(defun helm-ff-run-query-replace-on-marked () + (interactive) + (helm-ff-query-replace-on-marked nil)) + +(defun helm-ff-toggle-auto-update (_candidate) + (setq helm-ff-auto-update-flag (not helm-ff-auto-update-flag)) + (setq helm-ff--auto-update-state helm-ff-auto-update-flag) + (message "[Auto expansion %s]" + (if helm-ff-auto-update-flag "enabled" "disabled"))) + +(defun helm-ff-run-toggle-auto-update () + (interactive) + (with-helm-alive-p + (helm-attrset 'toggle-auto-update '(helm-ff-toggle-auto-update . never-split)) + (helm-execute-persistent-action 'toggle-auto-update))) + +(defun helm-ff-delete-char-backward () + "Disable helm find files auto update and delete char backward." + (interactive) + (setq helm-ff-auto-update-flag nil) + (setq helm-ff--deleting-char-backward t) + (call-interactively + (lookup-key (current-global-map) + (read-kbd-macro "DEL")))) + +(defun helm-ff-delete-char-backward--exit-fn () + (setq helm-ff-auto-update-flag helm-ff--auto-update-state) + (setq helm-ff--deleting-char-backward nil)) + +(defun helm-ff-run-switch-to-history () + "Run Switch to history action from `helm-source-find-files'." + (interactive) + (with-helm-alive-p + (when (helm-file-completion-source-p) + (helm-quit-and-execute-action 'helm-find-files-switch-to-hist)))) + +(defun helm-ff-run-grep () + "Run Grep action from `helm-source-find-files'." + (interactive) + (with-helm-alive-p + (helm-quit-and-execute-action 'helm-find-files-grep))) + +(defun helm-ff-run-pdfgrep () + "Run Pdfgrep action from `helm-source-find-files'." + (interactive) + (with-helm-alive-p + (helm-quit-and-execute-action 'helm-ff-pdfgrep))) + +(defun helm-ff-run-zgrep () + "Run Grep action from `helm-source-find-files'." + (interactive) + (with-helm-alive-p + (helm-quit-and-execute-action 'helm-ff-zgrep))) + +(defun helm-ff-run-copy-file () + "Run Copy file action from `helm-source-find-files'." + (interactive) + (with-helm-alive-p + (helm-quit-and-execute-action 'helm-find-files-copy))) + +(defun helm-ff-run-rename-file () + "Run Rename file action from `helm-source-find-files'." + (interactive) + (with-helm-alive-p + (helm-quit-and-execute-action 'helm-find-files-rename))) + +(defun helm-ff-run-byte-compile-file () + "Run Byte compile file action from `helm-source-find-files'." + (interactive) + (with-helm-alive-p + (helm-quit-and-execute-action 'helm-find-files-byte-compile))) + +(defun helm-ff-run-load-file () + "Run Load file action from `helm-source-find-files'." + (interactive) + (with-helm-alive-p + (helm-quit-and-execute-action 'helm-find-files-load-files))) + +(defun helm-ff-run-eshell-command-on-file () + "Run eshell command on file action from `helm-source-find-files'." + (interactive) + (with-helm-alive-p + (helm-quit-and-execute-action + 'helm-find-files-eshell-command-on-file))) + +(defun helm-ff-run-ediff-file () + "Run Ediff file action from `helm-source-find-files'." + (interactive) + (with-helm-alive-p + (helm-quit-and-execute-action 'helm-find-files-ediff-files))) + +(defun helm-ff-run-ediff-merge-file () + "Run Ediff merge file action from `helm-source-find-files'." + (interactive) + (with-helm-alive-p + (helm-quit-and-execute-action + 'helm-find-files-ediff-merge-files))) + +(defun helm-ff-run-symlink-file () + "Run Symlink file action from `helm-source-find-files'." + (interactive) + (with-helm-alive-p + (helm-quit-and-execute-action 'helm-find-files-symlink))) + +(defun helm-ff-run-hardlink-file () + "Run Hardlink file action from `helm-source-find-files'." + (interactive) + (with-helm-alive-p + (helm-quit-and-execute-action 'helm-find-files-hardlink))) + +(defun helm-ff-run-delete-file () + "Run Delete file action from `helm-source-find-files'." + (interactive) + (with-helm-alive-p + (helm-quit-and-execute-action 'helm-delete-marked-files))) + +(defun helm-ff-run-complete-fn-at-point () + "Run complete file name action from `helm-source-find-files'." + (interactive) + (with-helm-alive-p + (helm-quit-and-execute-action + 'helm-insert-file-name-completion-at-point))) + +(defun helm-ff-run-switch-to-eshell () + "Run switch to eshell action from `helm-source-find-files'." + (interactive) + (with-helm-alive-p + (helm-quit-and-execute-action 'helm-ff-switch-to-eshell))) + +(defun helm-ff-run-switch-other-window () + "Run switch to other window action from `helm-source-find-files'." + (interactive) + (with-helm-alive-p + (helm-quit-and-execute-action 'find-file-other-window))) + +(defun helm-ff-run-switch-other-frame () + "Run switch to other frame action from `helm-source-find-files'." + (interactive) + (with-helm-alive-p + (helm-quit-and-execute-action 'find-file-other-frame))) + +(defun helm-ff-run-open-file-externally () + "Run open file externally command action from `helm-source-find-files'." + (interactive) + (with-helm-alive-p + (helm-quit-and-execute-action 'helm-open-file-externally))) + +(defun helm-ff-run-open-file-with-default-tool () + "Run open file externally command action from `helm-source-find-files'." + (interactive) + (with-helm-alive-p + (helm-quit-and-execute-action 'helm-open-file-with-default-tool))) + +(defun helm-ff-locate (candidate) + "Locate action function for `helm-find-files'." + (helm-locate-set-command) + (let ((input (concat (helm-basename + (expand-file-name + candidate + helm-ff-default-directory)) + ;; The locate '-b' option doesn't exists + ;; in everything (es). + (unless (and (eq system-type 'windows-nt) + (string-match "^es" helm-locate-command)) + " -b")))) + (helm-locate-1 helm-current-prefix-arg nil 'from-ff input))) + +(defun helm-ff-run-locate () + "Run locate action from `helm-source-find-files'." + (interactive) + (with-helm-alive-p + (helm-quit-and-execute-action 'helm-ff-locate))) + +(defun helm-files-insert-as-org-link (candidate) + (insert (format "[[%s][]]" candidate)) + (goto-char (- (point) 2))) + +(defun helm-ff-run-insert-org-link () + (interactive) + (with-helm-alive-p + (helm-quit-and-execute-action 'helm-files-insert-as-org-link))) + +(defun helm-ff-run-find-file-as-root () + (interactive) + (with-helm-alive-p + (helm-quit-and-execute-action 'helm-find-file-as-root))) + +(defun helm-ff-run-gnus-attach-files () + "Run gnus attach files command action from `helm-source-find-files'." + (interactive) + (with-helm-alive-p + (helm-quit-and-execute-action 'helm-ff-gnus-attach-files))) + +(defun helm-ff-run-etags () + "Run Etags command action from `helm-source-find-files'." + (interactive) + (with-helm-alive-p + (helm-quit-and-execute-action 'helm-ff-etags-select))) + +(defun helm-ff-print (_candidate) + "Print marked files. +You have to set in order +variables `lpr-command',`lpr-switches' and/or `printer-name'. + +e.g: +\(setq lpr-command \"gtklp\"\) +\(setq lpr-switches '(\"-P\")\) +\(setq printer-name \"Epson-Stylus-Photo-R265\"\) + +Same as `dired-do-print' but for helm." + (when (or helm-current-prefix-arg + (not helm-ff-printer-list)) + (setq helm-ff-printer-list + (helm-ff-find-printers))) + (let* ((file-list (helm-marked-candidates :with-wildcard t)) + (len (length file-list)) + (printer-name (if helm-ff-printer-list + (helm-comp-read + "Printer: " helm-ff-printer-list) + printer-name)) + (command (helm-read-string + (format "Print *%s File(s):\n%s with: " + len + (mapconcat + (lambda (f) (format "- %s\n" f)) + file-list "")) + (when (and lpr-command + (or lpr-switches + printer-name)) + (mapconcat 'identity + (cons lpr-command + (append (if (stringp lpr-switches) + (list lpr-switches) + lpr-switches) + (list printer-name))) + " ")))) + (file-args (mapconcat #'(lambda (x) + (format "'%s'" x)) + file-list " ")) + (cmd-line (concat command " " file-args))) + (if command + (start-process-shell-command "helm-print" nil cmd-line) + (error "Error: Please verify your printer settings in Emacs.")))) + +(defun helm-ff-run-print-file () + "Run Print file action from `helm-source-find-files'." + (interactive) + (with-helm-alive-p + (helm-quit-and-execute-action 'helm-ff-print))) + +(defun helm-ff-checksum (file) + "Calculate the checksum of FILE. +Provide completion on different algorithms to use on Emacs24. +On Emacs23 only 'sha1' is available. +The checksum is copied to kill-ring." + (let ((algo (and (fboundp 'secure-hash) + (intern + (helm-comp-read + "Algorithm: " + '(md5 sha1 sha224 + sha256 sha384 sha512)))))) + (kill-new + (if algo + (with-temp-buffer + (insert-file-contents-literally file) + (secure-hash algo (current-buffer))) + (with-temp-buffer + (insert-file-contents-literally file) + (sha1 (current-buffer))))) + (message "Checksum copied to kill-ring."))) + +(defun helm-ff-toggle-basename (candidate) + (setq helm-ff-transformer-show-only-basename + (not helm-ff-transformer-show-only-basename)) + (let ((target (if helm-ff-transformer-show-only-basename + (helm-basename candidate) candidate))) + (helm-force-update (regexp-quote target)))) + +(defun helm-ff-run-toggle-basename () + (interactive) + (with-helm-alive-p + (helm-attrset 'toggle-basename '(helm-ff-toggle-basename . never-split)) + (helm-execute-persistent-action 'toggle-basename))) + +(cl-defun helm-reduce-file-name (fname level &key unix-close expand) + "Reduce FNAME by LEVEL from end or beginning depending LEVEL value. +If LEVEL is positive reduce from end else from beginning. +If UNIX-CLOSE is non--nil close filename with /. +If EXPAND is non--nil expand-file-name." + (let* ((exp-fname (expand-file-name fname)) + (fname-list (split-string (if (or (string= fname "~/") expand) + exp-fname fname) "/" t)) + (len (length fname-list)) + (pop-list (if (< level 0) + (cl-subseq fname-list (* level -1)) + (cl-subseq fname-list 0 (- len level)))) + (result (mapconcat 'identity pop-list "/")) + (empty (string= result ""))) + (when unix-close (setq result (concat result "/"))) + (if (string-match "^~" result) + (if (string= result "~/") "~/" result) + (if (< level 0) + (if empty "../" (concat "../" result)) + (cond ((eq system-type 'windows-nt) + (if empty (expand-file-name "/") ; Expand to "/" or "c:/". + result)) + (empty "/") + (t + (concat "/" result))))))) + +;; Internal +(defvar helm-file-completion-sources + '("Find Files" "Read File Name" "Read File Name History") + "Sources that use the *find-files mechanism can be added here. +Sources generated by `helm-mode' don't need to be added here, it will +be done automatically. +You should not modify this yourself unless you know what you do.") + +(defun helm-file-completion-source-p () + "Return non--nil if current source is a file completion source." + (or (with-helm-buffer helm-in-file-completion-p) + (let ((cur-source (cdr (assoc 'name (helm-get-current-source))))) + (cl-loop for i in helm-file-completion-sources + thereis (string= cur-source i))))) + +(defun helm-find-files-up-one-level (arg) + "Go up one level like unix command `cd ..'. +If prefix numeric arg is given go ARG level up." + (interactive "p") + (with-helm-alive-p + (when (and (helm-file-completion-source-p) + (not (helm-ff-invalid-tramp-name-p))) + (with-helm-window + (when helm-follow-mode + (helm-follow-mode -1) (message nil))) + ;; When going up one level we want to be at the line + ;; corresponding to actual directory, so store this info + ;; in `helm-ff-last-expanded'. + (let ((cur-cand (helm-get-selection)) + (new-pattern (helm-reduce-file-name + helm-pattern arg :unix-close t :expand t))) + (cond ((file-directory-p helm-pattern) + (setq helm-ff-last-expanded helm-ff-default-directory)) + ((file-exists-p helm-pattern) + (setq helm-ff-last-expanded helm-pattern)) + ((and cur-cand (file-exists-p cur-cand)) + (setq helm-ff-last-expanded cur-cand))) + (helm-set-pattern new-pattern helm-suspend-update-flag) + (with-helm-after-update-hook (helm-ff-retrieve-last-expanded)))))) + +(defun helm-ff-retrieve-last-expanded () + "Move overlay to last visited directory `helm-ff-last-expanded'. +This happen after using `helm-find-files-up-one-level', +or hitting C-j on \"..\"." + (when helm-ff-last-expanded + (let ((presel (if helm-ff-transformer-show-only-basename + (helm-basename + (directory-file-name helm-ff-last-expanded)) + (directory-file-name helm-ff-last-expanded)))) + (with-helm-window + (when (re-search-forward (concat "^" (regexp-quote presel) "$") nil t) + (forward-line 0) + (helm-mark-current-line))) + (setq helm-ff-last-expanded nil)))) + +(defun helm-ff-move-to-first-real-candidate () + "When candidate is an incomplete file name move to first real candidate." + (helm-aif (and (helm-file-completion-source-p) + (helm-get-selection)) + (unless (or (and (string-match helm-tramp-file-name-regexp it) + (not (file-remote-p it nil t))) + (file-exists-p it)) + (helm-next-line)))) +(add-hook 'helm-after-update-hook 'helm-ff-move-to-first-real-candidate) + +;;; Auto-update - helm-find-files auto expansion of directories. +;; +;; +(defun helm-ff-update-when-only-one-matched () + "Expand to directory when sole completion. +When only one candidate is remaining and it is a directory, +expand to this directory. +This happen only when `helm-ff-auto-update-flag' is non--nil +or when `helm-pattern' is equal to \"~/\"." + (when (or (and helm-ff-auto-update-flag + (null helm-ff--deleting-char-backward) + (helm-file-completion-source-p) + ;; Issue #295 + ;; File predicates are returning t + ;; with paths like //home/foo. + ;; So check it is not the case by regexp + ;; to allow user to do C-a / to start e.g + ;; entering a tramp method e.g /sudo::. + (not (string-match "\\`//" helm-pattern)) + (not (helm-ff-invalid-tramp-name-p))) + ;; Fix issue #542. + (string= helm-pattern "~/")) + (let* ((history-p (string= (assoc-default + 'name (helm-get-current-source)) + "Read File Name History")) + (pat (if (string-match helm-tramp-file-name-regexp + helm-pattern) + (helm-create-tramp-name helm-pattern) + helm-pattern)) + (completed-p (string= (file-name-as-directory + (expand-file-name pat)) + helm-ff-default-directory)) + (candnum (helm-get-candidate-number))) + (when (and (or + ;; Only one candidate remaining + ;; and at least 2 char in basename. + (and (<= candnum 2) + (>= (string-width (helm-basename helm-pattern)) 2)) + ;; Already completed. + completed-p) + (not history-p)) ; Don't try to auto complete in history. + (with-helm-window + (let ((cur-cand (prog2 + (unless completed-p + ;; Only one non--existing candidate + ;; and one directory candidate, move to it. + (helm-next-line)) + (helm-get-selection)))) + (when (and (stringp cur-cand) + (file-accessible-directory-p cur-cand)) + (if (and (not (helm-dir-is-dot cur-cand)) ; [1] + ;; Maybe we are here because completed-p is true + ;; but check this again to be sure. (Windows fix) + (<= candnum 2)) ; [2] + ;; If after going to next line the candidate + ;; is not one of "." or ".." [1] + ;; and only one candidate is remaining [2], + ;; assume candidate is a new directory to expand, and do it. + (helm-set-pattern (file-name-as-directory cur-cand)) + ;; The candidate is one of "." or ".." + ;; that mean we have entered the last letter of the directory name + ;; in prompt, so expansion is already done, just add the "/" at end + ;; of name unless helm-pattern ends with "." + ;; (i.e we are writing something starting with ".") + (unless (string-match "\\`.*[.]\\{1\\}\\'" helm-pattern) + (helm-set-pattern + ;; Need to expand-file-name to avoid e.g /ssh:host:./ in prompt. + (expand-file-name (file-name-as-directory helm-pattern))))) + (helm-check-minibuffer-input)))))))) + +(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:]]:/" + 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 "/./") default-directory) + ((string= helm-pattern "/../") "/") + (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 \"/\". +On windows system substitute from start up to \"/[[:lower:]]:/\"." + (with-temp-buffer + (insert fname) + (goto-char (point-min)) + (skip-chars-forward "//") ;; Avoid infloop in UNC paths Issue #424 + (if (re-search-forward "~/\\|//\\|/[[:alpha:]]:/" nil t) + (let ((match (match-string 0))) + (goto-char (if (or (string= match "//") + (string-match-p "/[[:alpha:]]:/" match)) + (1+ (match-beginning 0)) + (match-beginning 0))) + (buffer-substring-no-properties (point) (point-at-eol))) + fname))) + +(add-hook 'helm-after-update-hook 'helm-ff-update-when-only-one-matched) +(add-hook 'helm-after-update-hook 'helm-ff-auto-expand-to-home-or-root) + +(defun helm-point-file-in-dired (file) + "Put point on filename FILE in dired buffer." + (dired (file-name-directory file)) + (dired-goto-file file)) + +(defun helm-create-tramp-name (fname) + "Build filename for `helm-pattern' like /su:: or /sudo::." + (apply #'tramp-make-tramp-file-name + (cl-loop with v = (tramp-dissect-file-name fname) + for i across v collect i))) + +(cl-defun helm-ff-tramp-hostnames (&optional (pattern helm-pattern)) + "Get a list of hosts for tramp method found in `helm-pattern'. +Argument PATTERN default to `helm-pattern', it is here only for debugging +purpose." + (when (string-match helm-tramp-file-name-regexp pattern) + (let ((method (match-string 1 pattern)) + (tn (match-string 0 pattern)) + (all-methods (mapcar 'car tramp-methods))) + (helm-fast-remove-dups + (cl-loop for (f . h) in (tramp-get-completion-function method) + append (cl-loop for e in (funcall f (car h)) + for host = (and (consp e) (cadr e)) + when (and host (not (member host all-methods))) + collect (concat tn host))) + :test 'equal)))) + +(defun helm-ff-before-action-hook-fn () + "Exit helm when user try to execute action on an invalid tramp fname." + (let ((cand (helm-get-selection))) + (when (and (helm-file-completion-source-p) + (helm-ff-invalid-tramp-name-p cand) ; Check candidate. + (helm-ff-invalid-tramp-name-p)) ; check helm-pattern. + (error "Error: Unknown file or directory `%s'" cand)))) +(add-hook 'helm-before-action-hook 'helm-ff-before-action-hook-fn) + +(cl-defun helm-ff-invalid-tramp-name-p (&optional (pattern helm-pattern)) + "Return non--nil when PATTERN is an invalid tramp filename." + (string= (helm-ff-set-pattern pattern) + "Invalid tramp file name")) + +(defun helm-ff-set-pattern (pattern) + "Handle tramp filenames in `helm-pattern'." + (let ((methods (mapcar 'car tramp-methods)) + (reg "\\`/\\([^[/:]+\\|[^/]+]\\):.*:") + cur-method tramp-name) + ;; In some rare cases tramp can return a nil input, + ;; so be sure pattern is a string for safety (Issue #476). + (unless pattern (setq pattern "")) + (cond ((string= pattern "") "") + ((string-match "\\`[.]\\{1,2\\}/\\'" pattern) + (expand-file-name pattern)) + ((string-match ".*\\(~?/?[.]\\{1\\}/\\)\\'" pattern) + (expand-file-name default-directory)) + ((and (string-match ".*\\(~//\\|//\\)\\'" pattern) + (not (string-match helm-ff-url-regexp helm-pattern))) + (expand-file-name "/")) ; Expand to "/" or "c:/" + ((string-match "\\`\\(~/\\|.*/~/\\)\\'" pattern) + (expand-file-name "~/")) + ;; Match "/method:maybe_hostname:" + ((and (string-match reg pattern) + (setq cur-method (match-string 1 pattern)) + (member cur-method methods)) + (setq tramp-name (helm-create-tramp-name + (match-string 0 pattern))) + (replace-match tramp-name nil t pattern)) + ;; Match "/hostname:" + ((and (string-match helm-tramp-file-name-regexp pattern) + (setq cur-method (match-string 1 pattern)) + (and cur-method (not (member cur-method methods)))) + (setq tramp-name (helm-create-tramp-name + (match-string 0 pattern))) + (replace-match tramp-name nil t pattern)) + ;; Match "/method:" in this case don't try to connect. + ((and (not (string-match reg pattern)) + (string-match helm-tramp-file-name-regexp pattern) + (member (match-string 1 pattern) methods)) + "Invalid tramp file name") ; Write in helm-buffer. + ;; PATTERN is a directory, end it with "/". + ;; This will make PATTERN not ending yet with "/" + ;; candidate for `helm-ff-default-directory', + ;; allowing `helm-ff-retrieve-last-expanded' to retrieve it + ;; when descending level. + ;; However, we don't add automatically the "/" when + ;; `helm-ff-auto-update-flag' is enabled to avoid quick expansion. + ((and (file-accessible-directory-p pattern) + helm-ff-auto-update-flag) + (file-name-as-directory (expand-file-name pattern))) + ;; Return PATTERN unchanged. + (t pattern)))) + +(defun helm-find-files-get-candidates (&optional require-match) + "Create candidate list for `helm-source-find-files'." + (let* ((path (helm-ff-set-pattern helm-pattern)) + (dir-p (file-accessible-directory-p path)) + basedir + invalid-basedir + non-essential + (tramp-verbose helm-tramp-verbose)) ; No tramp message when 0. + (set-text-properties 0 (length path) nil path) + ;; Issue #118 allow creation of newdir+newfile. + (unless (or + ;; A tramp file name not completed. + (string= path "Invalid tramp file name") + ;; An empty pattern + (string= path "") + ;; Check if base directory of PATH is valid. + (helm-aif (file-name-directory path) + ;; If PATH is a valid directory IT=PATH, + ;; else IT=basedir of PATH. + (file-directory-p it))) + ;; BASEDIR is invalid, that's mean user is starting + ;; to write a non--existing path in minibuffer + ;; probably to create a 'new_dir' or a 'new_dir+new_file'. + (setq invalid-basedir t)) + ;; Don't set now `helm-pattern' if `path' == "Invalid tramp file name" + ;; like that the actual value (e.g /ssh:) is passed to + ;; `helm-ff-tramp-hostnames'. + (unless (or (string= path "Invalid tramp file name") + invalid-basedir) ; Leave helm-pattern unchanged. + (setq helm-ff-auto-update-flag ; [1] + ;; Unless auto update is disabled at startup or + ;; interactively, start auto updating only at third char. + (unless (or (null helm-ff-auto-update-initial-value) + (null helm-ff--auto-update-state) + ;; But don't enable auto update when + ;; deleting backward. + helm-ff--deleting-char-backward) + (or (>= (length (helm-basename path)) 3) dir-p))) + (setq helm-pattern (helm-ff--transform-pattern-for-completion path)) + ;; This have to be set after [1] to allow deleting char backward. + (setq basedir (expand-file-name + (if (and dir-p helm-ff-auto-update-flag) + ;; Add the final "/" to path + ;; when `helm-ff-auto-update-flag' is enabled. + (file-name-as-directory path) + (file-name-directory path)))) + (setq helm-ff-default-directory + (if (string= helm-pattern "") + (expand-file-name "/") ; Expand to "/" or "c:/" + ;; If path is an url *default-directory have to be nil. + (unless (or (string-match helm-ff-url-regexp path) + (and ffap-url-regexp + (string-match ffap-url-regexp path))) + basedir)))) + (cond ((string= path "Invalid tramp file name") + (or (helm-ff-tramp-hostnames) ; Hostnames completion. + (prog2 + ;; `helm-pattern' have not been modified yet. + ;; Set it here to the value of `path' that should be now + ;; "Invalid tramp file name" and set the candidates list + ;; to ("Invalid tramp file name") to make `helm-pattern' + ;; match single candidate "Invalid tramp file name". + (setq helm-pattern path) + ;; "Invalid tramp file name" is now printed + ;; in `helm-buffer'. + (list path)))) + ((or (file-regular-p path) + ;; `ffap-url-regexp' don't match until url is complete. + (string-match helm-ff-url-regexp path) + invalid-basedir + (and (not (file-exists-p path)) (string-match "/$" path)) + (and ffap-url-regexp (string-match ffap-url-regexp path))) + (list path)) + ((string= path "") (helm-ff-directory-files "/" t)) + ((and (file-directory-p path) (not (file-readable-p path))) + (list (format "Opening directory: access denied, `%s'" path))) + ;; A fast expansion of PATH is made only if `helm-ff-auto-update-flag' + ;; is enabled. + ((and dir-p helm-ff-auto-update-flag) + (helm-ff-directory-files path t)) + (t (append (unless (or require-match + ;; When `helm-ff-auto-update-flag' has been + ;; disabled, whe don't want PATH to be added on top + ;; if it is a directory. + dir-p) + (list path)) + (helm-ff-directory-files basedir t)))))) + +(defsubst helm-ff-directory-files (directory &optional full) + "List contents of DIRECTORY. +Argument FULL mean absolute path. +It is same as `directory-files' but always returns the +dotted filename '.' and '..' even on root directories in Windows +systems." + (setq directory (file-name-as-directory + (expand-file-name directory))) + (let ((ls (directory-files + directory full directory-files-no-dot-files-regexp)) + (dot (concat directory ".")) + (dot2 (concat directory ".."))) + (append (list dot dot2) ls))) + +(defun helm-ff-handle-backslash (fname) + ;; Allow creation of filenames containing a backslash. + (cl-loop with bad = '((92 . "")) + for i across fname + for isbad = (assq i bad) + if isbad concat (cdr isbad) + else concat (string i))) + +(defun helm-ff-smart-completion-p () + (and helm-ff-smart-completion + (not (memq helm-mp-matching-method '(multi1 multi3p))))) + +(defun helm-ff--transform-pattern-for-completion (pattern) + "Maybe return PATTERN with it's basename modified as a regexp. +This happen only when `helm-ff-smart-completion' is enabled. +This provide a similar behavior as `ido-enable-flex-matching'. +See also `helm--mapconcat-candidate'. +If PATTERN is an url returns it unmodified. +When PATTERN contain a space fallback to match-plugin. +If basename contain one or more space fallback to match-plugin. +If PATTERN is a valid directory name,return PATTERN unchanged." + ;; handle bad filenames containing a backslash. + (setq pattern (helm-ff-handle-backslash pattern)) + (let ((bn (helm-basename pattern)) + (bd (or (helm-basedir pattern) "")) + (dir-p (file-directory-p pattern)) + (tramp-p (cl-loop for (m . f) in tramp-methods + thereis (string-match m pattern)))) + ;; Always regexp-quote base directory name to handle + ;; crap dirnames such e.g bookmark+ + (cond + ((or (and dir-p tramp-p (string-match ":\\'" pattern)) + (string= pattern "") + (and dir-p (<= (length bn) 2)) + ;; Fix Issue #541 when BD have a subdir similar + ;; to BN, don't switch to match plugin + ;; which will match both. + (and dir-p (string-match (regexp-quote bn) bd))) + ;; Use full PATTERN on e.g "/ssh:host:". + (regexp-quote pattern)) + ;; Prefixing BN with a space call match-plugin completion. + ;; This allow showing all files/dirs matching BN (Issue #518). + ;; FIXME: some match-plugin methods may not work here. + (dir-p (concat (regexp-quote bd) " " (regexp-quote bn))) + ((or (not (helm-ff-smart-completion-p)) + (string-match "\\s-" bn)) ; Fall back to match-plugin. + (concat (regexp-quote bd) bn)) + ((or (string-match "[*][.]?.*" bn) ; Allow entering wilcard. + (string-match "/$" pattern) ; Allow mkdir. + (string-match helm-ff-url-regexp pattern) + (and (string= helm-ff-default-directory "/") tramp-p)) + ;; Don't treat wildcards ("*") as regexp char. + ;; (e.g ./foo/*.el => ./foo/[*].el) + (concat (regexp-quote bd) + (replace-regexp-in-string "[*]" "[*]" bn))) + (t + (setq bn (if (>= (length bn) 2) ; wait 2nd char before concating. + (helm--mapconcat-candidate bn) + (concat ".*" (regexp-quote bn)))) + (concat (regexp-quote bd) bn))))) + +(defun helm-dir-is-dot (dir) + (string-match "\\(?:/\\|\\`\\)\\.\\{1,2\\}\\'" dir)) + +(defun helm-ff-save-history () + "Store the last value of `helm-ff-default-directory' in `helm-ff-history'. +Note that only existing directories are saved here." + (when (and helm-ff-default-directory + (helm-file-completion-source-p) + (file-directory-p helm-ff-default-directory)) + (set-text-properties 0 (length helm-ff-default-directory) + nil helm-ff-default-directory) + (push helm-ff-default-directory helm-ff-history))) +(add-hook 'helm-cleanup-hook 'helm-ff-save-history) + +(defun helm-files-save-file-name-history (&optional force) + "Save selected file to `file-name-history'." + (let ((helm-file-completion-sources + (append helm-files-save-history-extra-sources + helm-file-completion-sources))) + (when (or force (helm-file-completion-source-p)) + (let ((mkd (helm-marked-candidates)) + (history-delete-duplicates t)) + (cl-loop for sel in mkd + when (and sel + (file-exists-p sel) + (not (file-directory-p sel))) + do + ;; we use `abbreviate-file-name' here because + ;; other parts of Emacs seems to, + ;; and we don't want to introduce duplicates. + (add-to-history 'file-name-history + (abbreviate-file-name sel))))))) +(add-hook 'helm-exit-minibuffer-hook 'helm-files-save-file-name-history) + +(defun helm-ff-valid-symlink-p (file) + (file-exists-p (file-truename file))) + +(defun helm-get-default-mode-for-file (filename) + "Return the default mode to open FILENAME." + (let ((mode (cl-loop for (r . m) in auto-mode-alist + thereis (and (string-match r filename) m)))) + (or (and (symbolp mode) mode) "Fundamental"))) + +(defun helm-ff-properties (candidate) + "Show file properties of CANDIDATE in a tooltip or message." + (let* ((all (helm-file-attributes candidate)) + (dired-line (helm-file-attributes + candidate :dired t :human-size t)) + (type (cl-getf all :type)) + (mode-type (cl-getf all :mode-type)) + (owner (cl-getf all :uid)) + (owner-right (cl-getf all :user t)) + (group (cl-getf all :gid)) + (group-right (cl-getf all :group)) + (other-right (cl-getf all :other)) + (size (helm-file-human-size (cl-getf all :size))) + (modif (cl-getf all :modif-time)) + (access (cl-getf all :access-time)) + (ext (helm-get-default-program-for-file candidate)) + (tooltip-hide-delay (or helm-tooltip-hide-delay tooltip-hide-delay))) + (if (and (window-system) tooltip-mode) + (tooltip-show + (concat + (helm-basename candidate) "\n" + dired-line "\n" + (format "Mode: %s\n" (helm-get-default-mode-for-file candidate)) + (format "Ext prog: %s\n" (or (and ext (replace-regexp-in-string + " %s" "" ext)) + "Not defined")) + (format "Type: %s: %s\n" type mode-type) + (when (string= type "symlink") + (format "True name: '%s'\n" + (cond ((string-match "^\.#" (helm-basename candidate)) + "Autosave symlink") + ((helm-ff-valid-symlink-p candidate) + (file-truename candidate)) + (t "Invalid Symlink")))) + (format "Owner: %s: %s\n" owner owner-right) + (format "Group: %s: %s\n" group group-right) + (format "Others: %s\n" other-right) + (format "Size: %s\n" size) + (format "Modified: %s\n" modif) + (format "Accessed: %s\n" access))) + (message dired-line) (sit-for 5)))) + +(defun helm-ff-properties-persistent () + "Show properties without quitting helm." + (interactive) + (with-helm-alive-p + (helm-attrset 'properties-action '(helm-ff-properties . never-split)) + (helm-execute-persistent-action 'properties-action))) + +(defun helm-ff-persistent-delete () + "Delete current candidate without quitting." + (interactive) + (with-helm-alive-p + (helm-attrset 'quick-delete '(helm-ff-quick-delete . never-split)) + (helm-execute-persistent-action 'quick-delete))) + +(defun helm-ff-dot-file-p (file) + "Check if FILE is `.' or `..'." + (member (helm-basename file) '("." ".."))) + +(defun helm-ff-quick-delete (_candidate) + "Delete file CANDIDATE without quitting." + (let ((marked (helm-marked-candidates))) + (unwind-protect + (save-selected-window + (cl-loop for c in marked do + (progn (helm-preselect (if (and helm-ff-transformer-show-only-basename + (not (helm-ff-dot-file-p c))) + (helm-basename c) c)) + (when (y-or-n-p (format "Really Delete file `%s'? " c)) + (helm-delete-file c helm-ff-signal-error-on-dot-files + 'synchro) + (helm-delete-current-selection) + (message nil))))) + (with-helm-buffer + (setq helm-marked-candidates nil + helm-visible-mark-overlays nil)) + (helm-force-update)))) + +(defun helm-ff-kill-buffer-fname (candidate) + (let ((buf (get-file-buffer candidate))) + (if buf + (progn + (kill-buffer buf) (message "Buffer `%s' killed" buf)) + (message "No buffer to kill")))) + +(defun helm-ff-kill-or-find-buffer-fname (candidate) + "Find file CANDIDATE or kill it's buffer if it is visible. +Never kill `helm-current-buffer'. +Never kill buffer modified. +This is called normally on third hit of \ +\\\\[helm-execute-persistent-action] +in `helm-find-files-persistent-action'." + (let* ((buf (get-file-buffer candidate)) + (buf-name (buffer-name buf)) + (win (get-buffer-window buf)) + (helm--reading-passwd-or-string t)) + (if (and buf win + (not (eq buf (get-buffer helm-current-buffer))) + (not (buffer-modified-p buf))) + (progn + (kill-buffer buf) + (set-window-buffer win helm-current-buffer) + (message "Buffer `%s' killed" buf-name)) + (find-file candidate)))) + +(defun helm-ff-run-kill-buffer-persistent () + "Execute `helm-ff-kill-buffer-fname' whitout quitting." + (interactive) + (with-helm-alive-p + (helm-attrset 'kill-buffer-fname 'helm-ff-kill-buffer-fname) + (helm-execute-persistent-action 'kill-buffer-fname))) + +(defun helm-ff-prefix-filename (fname &optional file-or-symlinkp new-file) + "Return filename FNAME maybe prefixed with [?] or [@]. +If FILE-OR-SYMLINKP is non--nil this mean we assume FNAME is an +existing filename or valid symlink and there is no need to test it. +NEW-FILE when non--nil mean FNAME is a non existing file and +return FNAME prefixed with [?]." + (let* ((prefix-new (propertize + " " 'display + (propertize "[?]" 'face 'helm-ff-prefix))) + (prefix-url (propertize + " " 'display + (propertize "[@]" 'face 'helm-ff-prefix)))) + (cond ((or file-or-symlinkp (file-exists-p fname)) fname) + ((or (string-match helm-ff-url-regexp fname) + (and ffap-url-regexp (string-match ffap-url-regexp fname))) + (concat prefix-url " " fname)) + ((or new-file (not (file-exists-p fname))) + (concat prefix-new " " fname))))) + +(defun helm-ff-sort-candidates (candidates _source) + "Sort function for `helm-source-find-files'. +Return candidates prefixed with basename of `helm-input' first." + (if (or (file-directory-p helm-input) + (null candidates)) + candidates + (let* ((c1 (car candidates)) + (cand1real (if (consp c1) (cdr c1) c1)) + (cand1 (unless (file-exists-p cand1real) + c1)) + (rest-cand (if cand1 (cdr candidates) candidates)) + (all (sort rest-cand + #'(lambda (s1 s2) + (let* ((score (lambda (str) + (if (condition-case _err + (string-match + (concat + "\\_<" + (helm-basename + helm-input)) str) + (invalid-regexp nil)) + 1 0))) + (bn1 (helm-basename (if (consp s1) (cdr s1) s1))) + (bn2 (helm-basename (if (consp s2) (cdr s2) s2))) + (sc1 (funcall score bn1)) + (sc2 (funcall score bn2))) + (cond ((= sc1 sc2) + (< (string-width bn1) + (string-width bn2))) + ((> sc1 sc2)) + (t (string-lessp bn1 bn2)))))))) + (if cand1 (cons cand1 all) all)))) + +(defun helm-ff-filter-candidate-one-by-one (file) + "`filter-one-by-one' Transformer function for `helm-source-find-files'." + ;; Handle boring files + (unless (and helm-ff-skip-boring-files + (cl-loop for r in helm-boring-file-regexp-list + thereis (string-match r file))) + ;; Handle tramp files. + (if (and (string-match helm-tramp-file-name-regexp helm-pattern) + helm-ff-tramp-not-fancy) + (if helm-ff-transformer-show-only-basename + (if (helm-dir-is-dot file) + file + (cons (or (helm-ff-get-host-from-tramp-invalid-fname file) + (helm-basename file)) + file)) + file) + ;; Now highlight. + (let* ((disp (if (and helm-ff-transformer-show-only-basename + (not (helm-dir-is-dot file)) + (not (and ffap-url-regexp + (string-match ffap-url-regexp file))) + (not (string-match helm-ff-url-regexp file))) + (or (helm-ff-get-host-from-tramp-invalid-fname file) + (helm-basename file)) file)) + (attr (file-attributes file)) + (type (car attr))) + + (cond ((string-match "access denied" file) file) + ( ;; A not already saved file. + (and (stringp type) + (not (helm-ff-valid-symlink-p file)) + (not (string-match "^\.#" (helm-basename file)))) + (cons (helm-ff-prefix-filename + (propertize disp 'face 'helm-ff-invalid-symlink) t) + file)) + ;; A symlink. + ((stringp type) + (cons (helm-ff-prefix-filename + (propertize disp 'face 'helm-ff-symlink) t) + file)) + ;; A directory. + ((eq t type) + (cons (helm-ff-prefix-filename + (propertize disp 'face 'helm-ff-directory) t) + file)) + ;; An executable file. + ((and attr (string-match "x" (nth 8 attr))) + (cons (helm-ff-prefix-filename + (propertize disp 'face 'helm-ff-executable) t) + file)) + ;; A file. + ((and attr (null type)) + (cons (helm-ff-prefix-filename + (propertize disp 'face 'helm-ff-file) t) + file)) + ;; A non--existing file. + (t + (cons (helm-ff-prefix-filename + (propertize disp 'face 'helm-ff-file) nil 'new-file) + file))))))) + +(defun helm-find-files-action-transformer (actions candidate) + "Action transformer for `helm-source-find-files'." + (cond ((with-helm-current-buffer + (eq major-mode 'message-mode)) + (append actions + '(("Gnus attach file(s)" . helm-ff-gnus-attach-files)))) + ((string-match (image-file-name-regexp) candidate) + (append actions + '(("Rotate image right `M-r'" . helm-ff-rotate-image-right) + ("Rotate image left `M-l'" . helm-ff-rotate-image-left)))) + ((string-match "\.el$" (helm-aif (helm-marked-candidates) + (car it) candidate)) + (append actions + '(("Byte compile lisp file(s) `M-B, C-u to load'" + . helm-find-files-byte-compile) + ("Load File(s) `M-L'" . helm-find-files-load-files)))) + ((and (string-match "\.html?$" candidate) + (file-exists-p candidate)) + (append actions + '(("Browse url file" . browse-url-of-file)))) + ((or (string= (file-name-extension candidate) "pdf") + (string= (file-name-extension candidate) "PDF")) + (append actions + '(("Pdfgrep File(s)" . helm-ff-pdfgrep)))) + (t actions))) + +(defun helm-ff-gnus-attach-files (_candidate) + "Run `gnus-dired-attach' on `helm-marked-candidates' or CANDIDATE." + (let ((flist (helm-marked-candidates :with-wildcard t))) + (gnus-dired-attach flist))) + +(defvar image-dired-display-image-buffer) +(defun helm-ff-rotate-current-image-1 (file &optional num-arg) + "Rotate current image at NUM-ARG degrees. +This is a destructive operation on FILE made by external tool mogrify." + (setq file (file-truename file)) ; For symlinked images. + ;; When FILE is not an image-file, do nothing. + (when (string-match (image-file-name-regexp) file) + (if (executable-find "mogrify") + (progn + (shell-command (format "mogrify -rotate %s %s" + (or num-arg 90) + (shell-quote-argument file))) + (when (buffer-live-p image-dired-display-image-buffer) + (kill-buffer image-dired-display-image-buffer)) + (image-dired-display-image file) + (message nil) + (display-buffer (get-buffer image-dired-display-image-buffer))) + (error "mogrify not found")))) + +(defun helm-ff-rotate-image-left (candidate) + "Rotate image file CANDIDATE left. +This affect directly file CANDIDATE." + (helm-ff-rotate-current-image-1 candidate -90)) + +(defun helm-ff-rotate-image-right (candidate) + "Rotate image file CANDIDATE right. +This affect directly file CANDIDATE." + (helm-ff-rotate-current-image-1 candidate)) + +(defun helm-ff-rotate-left-persistent () + "Rotate image left without quitting helm." + (interactive) + (with-helm-alive-p + (helm-attrset 'image-action1 'helm-ff-rotate-image-left) + (helm-execute-persistent-action 'image-action1))) + +(defun helm-ff-rotate-right-persistent () + "Rotate image right without quitting helm." + (interactive) + (with-helm-alive-p + (helm-attrset 'image-action2 'helm-ff-rotate-image-right) + (helm-execute-persistent-action 'image-action2))) + +(defun helm-ff-exif-data (candidate) + "Extract exif data from file CANDIDATE using `helm-ff-exif-data-program'." + (if (and helm-ff-exif-data-program + (executable-find helm-ff-exif-data-program)) + (shell-command-to-string (format "%s %s %s" + helm-ff-exif-data-program + helm-ff-exif-data-program-args + candidate)) + (format "No program %s found to extract exif" + helm-ff-exif-data-program))) + +(defun helm-find-files-persistent-action (candidate) + "Open subtree CANDIDATE without quitting helm. +If CANDIDATE is not a directory expand CANDIDATE filename. +If CANDIDATE is alone, open file CANDIDATE filename. +That's mean: +First hit on C-j expand CANDIDATE second hit open file. +If a prefix arg is given or `helm-follow-mode' is on open file." + (let* ((follow (or (buffer-local-value + 'helm-follow-mode + (get-buffer-create helm-buffer)) + helm--temp-follow-flag)) + (new-pattern (helm-get-selection)) + (num-lines-buf (with-current-buffer helm-buffer + (count-lines (point-min) (point-max)))) + (insert-in-minibuffer #'(lambda (fname) + (with-selected-window (minibuffer-window) + (unless follow + (delete-minibuffer-contents) + (set-text-properties 0 (length fname) + nil fname) + (insert fname)))))) + (cond ((and (helm-ff-invalid-tramp-name-p) + (string-match helm-tramp-file-name-regexp candidate)) + ;; First hit insert hostname and + ;; second hit insert ":" and expand. + (if (string= candidate helm-pattern) + (funcall insert-in-minibuffer (concat candidate ":")) + (funcall insert-in-minibuffer candidate))) + ( ;; A symlink directory, expand it's truename. + (and (file-directory-p candidate) (file-symlink-p candidate)) + (funcall insert-in-minibuffer (file-name-as-directory + (file-truename + (expand-file-name candidate))))) + ;; A directory, open it. + ((file-directory-p candidate) + (when (string= (helm-basename candidate) "..") + (setq helm-ff-last-expanded helm-ff-default-directory)) + (funcall insert-in-minibuffer (file-name-as-directory + (expand-file-name candidate)))) + ;; A symlink file, expand to it's true name. (cl-first hit) + ((and (file-symlink-p candidate) (not current-prefix-arg) (not follow)) + (funcall insert-in-minibuffer (file-truename candidate))) + ;; A regular file, expand it, (cl-first hit) + ((and (>= num-lines-buf 3) (not current-prefix-arg) (not follow)) + (funcall insert-in-minibuffer new-pattern)) + ;; An image file and it is the second hit on C-j, + ;; show the file in `image-dired'. + ((string-match (image-file-name-regexp) candidate) + (when (buffer-live-p (get-buffer image-dired-display-image-buffer)) + (kill-buffer image-dired-display-image-buffer)) + (image-dired-display-image candidate) + (message nil) + (helm-switch-to-buffer image-dired-display-image-buffer) + (with-current-buffer image-dired-display-image-buffer + (let ((exif-data (helm-ff-exif-data candidate))) + (setq default-directory helm-ff-default-directory) + (image-dired-update-property 'help-echo exif-data)))) + ;; Allow browsing archive on avfs fs. + ;; Assume volume is already mounted with mountavfs. + ((and helm-ff-avfs-directory + (string-match + (regexp-quote (expand-file-name helm-ff-avfs-directory)) + (file-name-directory candidate)) + (helm-ff-file-compressed-p candidate)) + (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))))) + +(defun helm-ff-file-compressed-p (candidate) + "Whether CANDIDATE is a compressed file or not." + (member (file-name-extension candidate) + helm-ff-file-compressed-list)) + +(defun helm-insert-file-name-completion-at-point (candidate) + "Insert file name completion at point." + (with-helm-current-buffer + (if buffer-read-only + (error "Error: Buffer `%s' is read-only" (buffer-name)) + (let* ((end (point)) + (tap (thing-at-point 'filename)) + (guess (and (stringp tap) (substring-no-properties tap))) + (beg (- (point) (length guess))) + (full-path-p (and (stringp guess) + (or (string-match-p (concat "^" (getenv "HOME")) guess) + (string-match-p "^[^\~]" guess))))) + (set-text-properties 0 (length candidate) nil candidate) + (if (and guess (not (string= guess "")) + (string-match-p "^\\(~/\\|/\\|[[:lower:][:upper:]]:/\\)" guess)) + (progn + (delete-region beg end) + (insert (if full-path-p + (expand-file-name candidate) + (abbreviate-file-name candidate)))) + (insert candidate)))))) + +(cl-defun helm-find-files-history (&key (comp-read t)) + "The `helm-find-files' history. +Show the first `helm-ff-history-max-length' elements of +`helm-ff-history' in an `helm-comp-read'." + (let ((history (when helm-ff-history + (helm-fast-remove-dups helm-ff-history + :test 'equal)))) + (when history + (setq helm-ff-history + (if (>= (length history) helm-ff-history-max-length) + (cl-subseq history 0 helm-ff-history-max-length) + history)) + (if comp-read + (helm-comp-read + "Switch to Directory: " + helm-ff-history + :name "Helm Find Files History" + :must-match t) + helm-ff-history)))) + +(defun helm-find-files-1 (fname &optional preselect) + "Find FNAME with `helm' completion. +Like `find-file' but with `helm' support. +Use it for non--interactive calls of `helm-find-files'." + (when (get-buffer helm-action-buffer) + (kill-buffer helm-action-buffer)) + (let* ( ;; Be sure we don't erase the precedent minibuffer if some. + (helm-ff-auto-update-initial-value + (and helm-ff-auto-update-initial-value + (not (minibuffer-window-active-p (minibuffer-window))))) + (tap (thing-at-point 'filename)) + (def (and tap (expand-file-name tap)))) + (helm :sources 'helm-source-find-files + :input fname + :case-fold-search helm-file-name-case-fold-search + :keymap helm-find-files-map + :preselect preselect + :default def + :prompt "Find Files or Url: " + :buffer "*Helm Find Files*"))) + + +(defun helm-find-files-initial-input (&optional input) + "Return INPUT if present, otherwise try to guess it." + (unless (eq major-mode 'image-mode) + (or (and input (or (and (file-remote-p input) input) + (expand-file-name input))) + (helm-find-files-input + (ffap-guesser) + (thing-at-point 'filename))))) + +(defun helm-find-files-input (file-at-pt thing-at-pt) + "Try to guess a default input for `helm-find-files'." + (let* ((def-dir (helm-current-directory)) + (urlp (and file-at-pt ffap-url-regexp + (string-match ffap-url-regexp file-at-pt))) + (abs (and file-at-pt + (not urlp) + (expand-file-name file-at-pt def-dir))) + (lib (when helm-ff-search-library-in-sexp + (helm-find-library-at-point))) + (hlink (helm-ff-find-url-at-point)) + (remp (and abs (file-remote-p abs))) + (file-p (and (not remp) + file-at-pt + (not (string= file-at-pt "")) + (file-exists-p file-at-pt) + thing-at-pt (not (string= thing-at-pt "")) + (file-exists-p + (file-name-directory + (expand-file-name thing-at-pt def-dir)))))) + (cond (lib) ; e.g we are inside a require sexp. + (hlink) ; String at point is an hyperlink. + (remp abs) ; A remote file + (file-p ; a regular file + (helm-aif (ffap-file-at-point) (expand-file-name it))) + (urlp file-at-pt) ; possibly an url or email. + ((and file-at-pt (file-exists-p file-at-pt)) + file-at-pt)))) + +(defun helm-ff-find-url-at-point () + "Try to find link to an url in text-property at point." + (let* ((he (get-text-property (point) 'help-echo)) + (ov (overlays-at (point))) + (ov-he (and ov (overlay-get + (car (overlays-at (point))) 'help-echo))) + (w3m-l (get-text-property (point) 'w3m-href-anchor)) + (nt-prop (get-text-property (point) 'nt-link))) + ;; Org link. + (when (and (stringp he) (string-match "^LINK: " he)) + (setq he (replace-match "" t t he))) + (cl-loop for i in (list he ov-he w3m-l nt-prop) + thereis (and (stringp i) ffap-url-regexp (string-match ffap-url-regexp i) i)))) + +(defun helm-find-library-at-point () + "Try to find library path at point. +Find inside `require' and `declare-function' sexp." + (require 'find-func) + (let* ((beg-sexp (save-excursion (search-backward "(" (point-at-bol) t))) + (end-sexp (save-excursion (search-forward ")" (point-at-eol) t))) + (sexp (and beg-sexp end-sexp + (buffer-substring-no-properties + (1+ beg-sexp) (1- end-sexp))))) + (ignore-errors + (cond ((and sexp (string-match "require \'.+[^)]" sexp)) + (find-library-name + (replace-regexp-in-string + "'\\|\)\\|\(" "" + ;; If require use third arg, ignore it, + ;; always use library path found in `load-path'. + (cl-second (split-string (match-string 0 sexp)))))) + ((and sexp (string-match-p "^declare-function" sexp)) + (find-library-name + (replace-regexp-in-string + "\"\\|ext:" "" + (cl-third (split-string sexp))))) + (t nil))))) + + +;;; Handle copy, rename, symlink, relsymlink and hardlink from helm. +;; +;; +(defvar dired-async-be-async) +(cl-defun helm-dired-action (candidate + &key action follow (files (dired-get-marked-files))) + "Execute ACTION on FILES to CANDIDATE. +Where ACTION is a symbol that can be one of: +'copy, 'rename, 'symlink,'relsymlink, 'hardlink. +Argument FOLLOW when non--nil specify to follow FILES to destination." + (when (get-buffer dired-log-buffer) (kill-buffer dired-log-buffer)) + (let ((fn (cl-case action + (copy 'dired-copy-file) + (rename 'dired-rename-file) + (symlink 'make-symbolic-link) + (relsymlink 'dired-make-relative-symlink) + (hardlink 'dired-hardlink))) + (marker (cl-case action + ((copy rename) dired-keep-marker-copy) + (symlink dired-keep-marker-symlink) + (relsymlink dired-keep-marker-relsymlink) + (hardlink dired-keep-marker-hardlink))) + (dirflag (and (= (length files) 1) + (file-directory-p (car files)) + (not (file-directory-p candidate)))) + ;; When FOLLOW is enabled, disable helm-async. + ;; If it is globally disabled use this nil value. + (dired-async-be-async (and (boundp 'dired-async-be-async) + dired-async-be-async + (not follow)))) + (dired-create-files + fn (symbol-name action) files + ;; CANDIDATE is the destination. + (if (file-directory-p candidate) + ;; When CANDIDATE is a directory, build file-name in this directory. + ;; Else we use CANDIDATE. + #'(lambda (from) + (expand-file-name (file-name-nondirectory from) candidate)) + #'(lambda (_from) candidate)) + marker) + (push (file-name-as-directory + (if (file-directory-p candidate) + (expand-file-name candidate) + (file-name-directory candidate))) + helm-ff-history) + ;; If follow is non--nil we should not be in async mode. + (when (and follow (not (get-buffer dired-log-buffer))) + (let ((target (directory-file-name candidate))) + (unwind-protect + (progn + (setq helm-ff-cand-to-mark + (helm-get-dest-fnames-from-list files candidate dirflag)) + (with-helm-after-update-hook (helm-ff-maybe-mark-candidates)) + (if (and dirflag (eq action 'rename)) + (helm-find-files-1 (file-name-directory target) + (if helm-ff-transformer-show-only-basename + (helm-basename target) target)) + (helm-find-files-1 (file-name-as-directory + (expand-file-name candidate))))) + (setq helm-ff-cand-to-mark nil)))))) + +(defun helm-get-dest-fnames-from-list (flist dest-cand rename-dir-flag) + "Transform filenames of FLIST to abs of DEST-CAND. +If RENAME-DIR-FLAG is non--nil collect the `directory-file-name' of transformed +members of FLIST." + ;; At this point files have been renamed/copied at destination. + ;; That's mean DEST-CAND exists. + (cl-loop + with dest = (expand-file-name dest-cand) + for src in flist + for basename-src = (helm-basename src) + for fname = (cond (rename-dir-flag (directory-file-name dest)) + ((file-directory-p dest) + (concat (file-name-as-directory dest) basename-src)) + (t dest)) + when (file-exists-p fname) + collect fname into tmp-list + finally return (sort tmp-list 'string<))) + +(defun helm-ff-maybe-mark-candidates () + "Mark all candidates of list `helm-ff-cand-to-mark'. +This is used when copying/renaming/symlinking etc... and +following files to destination." + (when (and (string= (assoc-default 'name (helm-get-current-source)) + (assoc-default 'name helm-source-find-files)) + helm-ff-cand-to-mark) + (with-helm-window + (while helm-ff-cand-to-mark + (if (string= (car helm-ff-cand-to-mark) (helm-get-selection)) + (progn + (helm-make-visible-mark) + (helm-next-line) + (setq helm-ff-cand-to-mark (cdr helm-ff-cand-to-mark))) + (helm-next-line))) + (unless (helm-this-visible-mark) + (helm-prev-visible-mark))))) + + +;;; Routines for files +;; +;; +(defun helm-file-buffers (filename) + "Returns a list of buffer names corresponding to FILENAME." + (cl-loop with name = (expand-file-name filename) + for buf in (buffer-list) + for bfn = (buffer-file-name buf) + when (and bfn (string= name bfn)) + collect (buffer-name buf))) + +(defun helm-delete-file (file &optional error-if-dot-file-p synchro) + "Delete the given file after querying the user. +Ask to kill buffers associated with that file, too." + (when (and error-if-dot-file-p + (helm-ff-dot-file-p file)) + (error "Error: Cannot operate on `.' or `..'")) + (let ((buffers (helm-file-buffers file))) + (if (or (< emacs-major-version 24) synchro) + ;; `dired-delete-file' in Emacs versions < 24 + ;; doesn't support delete-by-moving-to-trash + ;; so use `delete-directory' and `delete-file' + ;; that handle it. + (cond ((and (not (file-symlink-p file)) + (file-directory-p file) + (directory-files file t dired-re-no-dot)) + (when (y-or-n-p (format "Recursive delete of `%s'? " file)) + (delete-directory file 'recursive))) + ((and (not (file-symlink-p file)) + (file-directory-p file)) + (delete-directory file)) + (t (delete-file file))) + (dired-delete-file + file dired-recursive-deletes delete-by-moving-to-trash)) + (when buffers + (cl-dolist (buf buffers) + (when (y-or-n-p (format "Kill buffer %s, too? " buf)) + (kill-buffer buf)))))) + +(defun helm-delete-marked-files (_ignore) + (let* ((files (helm-marked-candidates :with-wildcard t)) + (len (length files))) + (with-helm-display-marked-candidates + helm-marked-buffer-name + (mapcar #'(lambda (f) + (if (file-directory-p f) + (concat (helm-basename f) "/") + (helm-basename f))) + files) + (if (not (y-or-n-p (format "Delete *%s File(s)" len))) + (message "(No deletions performed)") + (cl-dolist (i files) + (set-text-properties 0 (length i) nil i) + (helm-delete-file i helm-ff-signal-error-on-dot-files)) + (message "%s File(s) deleted" len))))) + +(defun helm-find-file-or-marked (candidate) + "Open file CANDIDATE or open helm marked files in background." + (let ((marked (helm-marked-candidates :with-wildcard t)) + (url-p (and ffap-url-regexp ; we should have only one candidate. + (string-match ffap-url-regexp candidate))) + (ffap-newfile-prompt helm-ff-newfile-prompt-p) + (find-file-wildcards nil) + (make-dir-fn + #'(lambda (dir &optional helm-ff) + (when (y-or-n-p (format "Create directory `%s'? " dir)) + (let ((dirfname (directory-file-name dir))) + (if (file-exists-p dirfname) + (error + "Mkdir: Unable to create directory `%s': file exists." + (helm-basename dirfname)) + (make-directory dir 'parent))) + (when helm-ff + ;; Allow having this new dir in history + ;; to be able to retrieve it immediately + ;; if we want to e.g copy a file from somewhere in it. + (setq helm-ff-default-directory + (file-name-as-directory dir)) + (push helm-ff-default-directory helm-ff-history)) + (or (and helm-ff (helm-find-files-1 dir)) t)))) + (helm--reading-passwd-or-string t)) + (if (> (length marked) 1) + ;; Open all marked files in background and display + ;; the first one. + (progn + (mapc 'find-file-noselect (cdr marked)) + (find-file (car marked))) + (if (and (not (file-exists-p candidate)) + (not url-p) + (string-match "/$" candidate)) + ;; A a non--existing filename ending with / + ;; Create a directory and jump to it. + (funcall make-dir-fn candidate 'helm-ff) + ;; A non--existing filename NOT ending with / or + ;; an existing filename, create or jump to it. + ;; If the basedir of candidate doesn't exists, + ;; ask for creating it. + (let ((dir (file-name-directory candidate))) + (if (or (and dir (file-directory-p dir)) url-p) + (find-file-at-point (car marked)) + (and (funcall make-dir-fn dir) + (find-file-at-point candidate)))))))) + +(defun helm-shadow-boring-files (files) + "Files matching `helm-boring-file-regexp' will be +displayed with the `file-name-shadow' face if available." + (helm-shadow-entries files helm-boring-file-regexp-list)) + +(defun helm-skip-boring-files (files) + "Files matching `helm-boring-file-regexp' will be skipped." + (helm-skip-entries files helm-boring-file-regexp-list)) + +(defun helm-skip-current-file (files) + "Current file will be skipped." + (remove (buffer-file-name helm-current-buffer) files)) + +(defun helm-w32-pathname-transformer (args) + "Change undesirable features of windows pathnames to ones more acceptable to +other candidate transformers." + (if (eq system-type 'windows-nt) + (helm-transform-mapcar + (lambda (x) + (replace-regexp-in-string + "/cygdrive/\\(.\\)" "\\1:" + (replace-regexp-in-string "\\\\" "/" x))) + args) + args)) + +(defun helm-transform-file-load-el (actions candidate) + "Add action to load the file CANDIDATE if it is an emacs lisp +file. Else return ACTIONS unmodified." + (if (member (file-name-extension candidate) '("el" "elc")) + (append actions '(("Load Emacs Lisp File" . load-file))) + actions)) + +(defun helm-transform-file-browse-url (actions candidate) + "Add an action to browse the file CANDIDATE if it is a html file or URL. +Else return ACTIONS unmodified." + (let ((browse-action '("Browse with Browser" . browse-url))) + (cond ((string-match "^http\\|^ftp" candidate) + (cons browse-action actions)) + ((string-match "\\.html?$" candidate) + (append actions (list browse-action))) + (t actions)))) + + +;;; List of files gleaned from every dired buffer +;; +;; +(defun helm-files-in-all-dired-candidates () + (save-excursion + (cl-loop for (f . b) in dired-buffers + when (buffer-live-p b) + append (let ((dir (with-current-buffer b dired-directory))) + (if (listp dir) (cdr dir) + (directory-files f t dired-re-no-dot)))))) + +;; (dired '("~/" "~/.emacs.d/.emacs-custom.el" "~/.emacs.d/.emacs.bmk")) + +(defvar helm-source-files-in-all-dired + '((name . "Files in all dired buffer.") + (candidates . helm-files-in-all-dired-candidates) + (type . file))) + + +;;; File Cache +;; +;; +(defvar helm-file-cache-initialized-p nil) +(defvar helm-file-cache-files nil) + +(defvar helm-source-file-cache + `((name . "File Cache") + (init + . (lambda () + (require 'filecache nil t) + (unless helm-file-cache-initialized-p + (setq helm-file-cache-files + (cl-loop for item in file-cache-alist append + (cl-destructuring-bind (base &rest dirs) item + (cl-loop for dir in dirs collect + (concat dir base))))) + (defadvice file-cache-add-file (after file-cache-list activate) + (add-to-list 'helm-file-cache-files (expand-file-name file))) + (setq helm-file-cache-initialized-p t)))) + (keymap . ,helm-generic-files-map) + (help-message . helm-generic-file-help-message) + (mode-line . helm-generic-file-mode-line-string) + (candidates . helm-file-cache-files) + (type . file))) + + +;;; File name history +;; +;; +(defvar helm-source-file-name-history + `((name . "File Name History") + (candidates . file-name-history) + (persistent-action . ignore) + (filtered-candidate-transformer . helm-file-name-history-transformer) + (action . ,(cdr (helm-get-actions-from-type + helm-source-locate))))) + +(defvar helm-source--ff-file-name-history + '((name . "File name history") + (init . (lambda () + (with-helm-alive-p + (when helm-ff-file-name-history-use-recentf + (require 'recentf) + (or recentf-mode (recentf-mode 1)))))) + (candidates . (lambda () + (if helm-ff-file-name-history-use-recentf + recentf-list + file-name-history))) + (persistent-action . ignore) + (filtered-candidate-transformer . helm-file-name-history-transformer) + (action . (("Find file" + . (lambda (candidate) + (helm-set-pattern + (expand-file-name candidate)) + (with-helm-after-update-hook (helm-exit-minibuffer)))) + ("Find file in helm" + . (lambda (candidate) + (helm-set-pattern + (expand-file-name candidate))))))) + "[Internal] This source is build to be used with `helm-find-files'. +Don't use it in your own code unless you know what you are doing.") + +(defun helm-file-name-history-transformer (candidates _source) + (cl-loop for c in candidates collect + (cond ((file-remote-p c) + (cons (propertize c 'face 'helm-history-remote) c)) + ((file-exists-p c) + (cons (propertize c 'face 'helm-ff-file) c)) + (t (cons (propertize c 'face 'helm-history-deleted) c))))) + +(defun helm-ff-file-name-history () + "Switch to `file-name-history' without quitting `helm-find-files'." + (interactive) + (with-helm-alive-p + (helm :sources 'helm-source--ff-file-name-history + :buffer "*helm-file-name-history*" + :allow-nest t + :resume 'noresume))) + +;;; Recentf files +;; +;; +(defvar helm-source-recentf + `((name . "Recentf") + (init . (lambda () + (require 'recentf) + (recentf-mode 1))) + (candidates . recentf-list) + (match . helm-files-match-only-basename) + (filtered-candidate-transformer . (lambda (candidates _source) + (cl-loop for i in candidates + if helm-ff-transformer-show-only-basename + collect (cons (helm-basename i) i) + else collect i))) + (keymap . ,helm-generic-files-map) + (help-message . helm-generic-file-help-message) + (mode-line . helm-generic-file-mode-line-string) + (action . ,(cdr (helm-get-actions-from-type + helm-source-locate)))) + "See (info \"(emacs)File Conveniences\"). +Set `recentf-max-saved-items' to a bigger value if default is too small.") + +;;; Browse project +;; Need dependencies: +;; +;; +;; Only hg and git are supported for now. + +;;;###autoload +(defun helm-browse-project () + "Browse files and see status of project with its vcs. +Only hg and git are supported for now. +Fall back to `helm-find-files' if directory is not under +control of one of those vcs. +Need dependencies: + +and +." + (interactive) + (cond ((and (fboundp 'helm-ls-git-root-dir) + (helm-ls-git-root-dir)) + (helm-ls-git-ls)) + ((and (fboundp 'helm-hg-root) + (helm-hg-root)) + (helm-hg-find-files-in-project)) + (t (helm-find-files nil)))) + +(defun helm-ff-browse-project (_candidate) + (with-helm-default-directory helm-ff-default-directory + ;; `helm-browse-project' will call `helm-ls-git-ls' + ;; which will set locally `helm-default-directory' + (helm-browse-project))) + +(defun helm-ff-run-browse-project () + (interactive) + (with-helm-alive-p + (helm-quit-and-execute-action 'helm-ff-browse-project))) + +;;; session.el files +;; +;; session (http://emacs-session.sourceforge.net/) is an alternative to +;; recentf that saves recent file history and much more. +(defvar helm-source-session + `((name . "Session") + (candidates . (lambda () + (cl-delete-if-not #'(lambda (f) + (or (string-match helm-tramp-file-name-regexp f) + (file-exists-p f))) + (mapcar 'car session-file-alist)))) + (keymap . ,helm-generic-files-map) + (help-message . helm-generic-file-help-message) + (mode-line . helm-generic-file-mode-line-string) + (action . ,(cdr (helm-get-actions-from-type + helm-source-locate)))) + "File list from emacs-session.") + + +;;; Files in current dir +;; +;; +(defun helm-highlight-files (files) + "A basic transformer for helm files sources. +Colorize only symlinks, directories and files." + (cl-loop for i in files + for disp = (if (and helm-ff-transformer-show-only-basename + (not (helm-dir-is-dot i)) + (not (and ffap-url-regexp + (string-match ffap-url-regexp i))) + (not (string-match helm-ff-url-regexp i))) + (helm-basename i) i) + for type = (car (file-attributes i)) + collect + (cond ((and helm-ff-tramp-not-fancy + (string-match helm-tramp-file-name-regexp i)) + (cons disp i)) + ((stringp type) + (cons (propertize disp + 'face 'helm-ff-symlink + 'help-echo (expand-file-name i)) + i)) + ((eq type t) + (cons (propertize disp + 'face 'helm-ff-directory + 'help-echo (expand-file-name i)) + i)) + (t (cons (propertize disp + 'face 'helm-ff-file + 'help-echo (expand-file-name i)) + i))))) + +(defvar helm-source-files-in-current-dir + `((name . "Files from Current Directory") + (candidates . (lambda () + (with-helm-current-buffer + (let ((dir (helm-current-directory))) + (when (file-accessible-directory-p dir) + (directory-files dir t)))))) + (match . helm-files-match-only-basename) + (keymap . ,helm-generic-files-map) + (help-message . helm-generic-file-help-message) + (mode-line . helm-generic-file-mode-line-string) + (type . file))) + + +;;; External searching file tools. +;; +;; Tracker desktop search +(defvar helm-source-tracker-cand-incomplete nil "Contains incomplete candidate") +(defun helm-source-tracker-transformer (candidates _source) + (helm-log "received: %S" candidates) + (cl-loop for cand in candidates + for path = (when (stringp helm-source-tracker-cand-incomplete) + (caar (helm-highlight-files + (list helm-source-tracker-cand-incomplete)))) + for built = (if (not (stringp cand)) cand + (let ((snippet cand)) + (unless (or (null path) + (string= "" path) + (not (string-match-p + "\\`[[:space:]]*\\.\\.\\." + snippet))) + (let ((complete-candidate + (cons (concat path "\n" snippet) path))) + (setq helm-source-tracker-cand-incomplete nil) + (helm-log "built: %S" complete-candidate) + complete-candidate)))) + when (and (stringp cand) + (string-match "\\`[[:space:]]*file://" cand)) + do (setq helm-source-tracker-cand-incomplete ; save path + (replace-match "" t t cand)) end + collect built)) + +(defvar helm-source-tracker-search + `((name . "Tracker Search") + (candidates-process + . (lambda () + (start-process "tracker-search-process" nil + "tracker-search" + "--disable-color" + "--limit=512" + helm-pattern))) + (filtered-candidate-transformer . helm-source-tracker-transformer) + ;;(multiline) ; https://github.com/emacs-helm/helm/issues/529 + (keymap . ,helm-generic-files-map) + (action . ,(cdr (helm-get-attribute-from-type 'action 'file))) + (action-transformer + helm-transform-file-load-el + helm-transform-file-browse-url) + (requires-pattern . 3)) + "Source for retrieving files matching the current input pattern +with the tracker desktop search.") + +;; Spotlight (MacOS X desktop search) +(defvar helm-source-mac-spotlight + '((name . "mdfind") + (candidates-process + . (lambda () (start-process "mdfind-process" nil "mdfind" helm-pattern))) + (type . file) + (requires-pattern . 3)) + "Source for retrieving files via Spotlight's command line +utility mdfind.") + + +;;; Findutils +;; +;; +(defvar helm-source-findutils + `((name . "Find") + (header-name . (lambda (name) + (concat name " in [" helm-default-directory "]"))) + (candidates-process . helm-find-shell-command-fn) + (filtered-candidate-transformer . helm-findutils-transformer) + (action-transformer helm-transform-file-load-el) + (action . ,(cdr (helm-inherit-attribute-from-source + 'action helm-source-locate))) + (mode-line . helm-generic-file-mode-line-string) + (keymap . ,helm-generic-files-map) + (candidate-number-limit . 9999) + (requires-pattern . 3))) + +(defun helm-findutils-transformer (candidates _source) + (cl-loop for i in candidates + for type = (car (file-attributes i)) + for abs = (expand-file-name i helm-default-directory) + for disp = (if (and helm-ff-transformer-show-only-basename + (not (string-match "[.]\\{1,2\\}$" i))) + (helm-basename i) abs) + collect (cond ((eq t type) + (cons (propertize disp 'face 'helm-ff-directory) abs)) + ((stringp type) + (cons (propertize disp 'face 'helm-ff-symlink) abs)) + (t (cons (propertize disp 'face 'helm-ff-file) abs))))) + +(defun helm-find-shell-command-fn () + "Asynchronously fetch candidates for `helm-find'." + (require 'find-cmd) + (let ((case-fold-search (helm-set-case-fold-search helm-pattern))) + (with-helm-default-directory (helm-default-directory) + (let* (process-connection-type + (pattern (mapconcat 'identity (split-string helm-pattern) "*")) + (ignored-dirs ()) + (ignored-files (when helm-findutils-skip-boring-files + (cl-loop for f in completion-ignored-extensions + if (string-match "/$" f) + do (push (replace-match "" nil t f) + ignored-dirs) + else collect (concat "*" f)))) + (path-or-name (if helm-findutils-search-full-path + '(ipath path) '(iname name))) + (name-or-iname (if case-fold-search + (car path-or-name) (cadr path-or-name))) + (cmd (find-cmd (and ignored-dirs + `(prune (name ,@ignored-dirs))) + (and ignored-files + `(not (name ,@ignored-files))) + `(and (,name-or-iname ,(concat "*" pattern "*")) + (type "d" "f")))) + (proc (start-file-process-shell-command "hfind" helm-buffer cmd))) + (helm-log "Find command:\n%s" cmd) + (prog1 proc + (set-process-sentinel + proc + #'(lambda (process event) + (helm-process-deferred-sentinel-hook + process event (helm-default-directory))))))))) + +(defun helm-find-1 (dir) + (helm :sources 'helm-source-findutils + :buffer "*helm find*" + ;; Make these vars local for further resuming. + :default-directory dir ; reset it when called from elsewhere. + :ff-transformer-show-only-basename nil + :case-fold-search helm-file-name-case-fold-search)) + +;; helm-find-files integration. +(defun helm-ff-find-sh-command (_candidate) + "Run `helm-find' from `helm-find-files'." + (helm-find-1 helm-ff-default-directory)) + +(defun helm-ff-run-find-sh-command () + "Run find shell command action with key from `helm-find-files'." + (interactive) + (with-helm-alive-p + (helm-quit-and-execute-action 'helm-ff-find-sh-command))) + + +;;; Preconfigured commands +;; +;; +;;;###autoload +(defun helm-find (arg) + "Preconfigured `helm' for the find shell command." + (interactive "P") + (let ((directory + (if arg + (file-name-as-directory + (read-directory-name "DefaultDirectory: ")) + default-directory))) + (helm-find-1 directory))) + +(defvar org-directory) +;;;###autoload +(defun helm-find-files (arg) + "Preconfigured `helm' for helm implementation of `find-file'. +Called with a prefix arg show history if some. +Don't call it from programs, use `helm-find-files-1' instead. +This is the starting point for nearly all actions you can do on files." + (interactive "P") + (let* ((hist (and arg helm-ff-history (helm-find-files-history))) + (default-input (or hist (helm-find-files-initial-input))) + (input (cond ((and (eq major-mode 'org-agenda-mode) + org-directory + (not default-input)) + (expand-file-name org-directory)) + ((and (eq major-mode 'dired-mode) default-input) + (file-name-directory default-input)) + (default-input) + (t (expand-file-name (helm-current-directory))))) + (presel (helm-aif (or hist + (buffer-file-name (current-buffer)) + (and (eq major-mode 'dired-mode) + default-input)) + (if helm-ff-transformer-show-only-basename + (helm-basename it) it)))) + (set-text-properties 0 (length input) nil input) + (helm-find-files-1 input (and presel (concat "^" (regexp-quote presel)))))) + +;;;###autoload +(defun helm-for-files () + "Preconfigured `helm' for opening files. +Run all sources defined in `helm-for-files-preferred-list'." + (interactive) + (let ((helm-ff-transformer-show-only-basename nil)) + (helm-other-buffer helm-for-files-preferred-list "*helm for files*"))) + +;;;###autoload +(defun helm-recentf () + "Preconfigured `helm' for `recentf'." + (interactive) + (let ((helm-ff-transformer-show-only-basename nil)) + (helm-other-buffer 'helm-source-recentf "*helm recentf*"))) + +(provide 'helm-files) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions obsolete) +;; coding: utf-8 +;; indent-tabs-mode: nil +;; End: + +;;; helm-files.el ends here diff --git a/elpa/helm-20140808.2300/helm-files.elc b/elpa/helm-20140808.2300/helm-files.elc new file mode 100644 index 0000000000000000000000000000000000000000..35371b5f1a522e7a316b2593db63422fb4a536a0 GIT binary patch literal 100550 zcmeFai+_{XmG5mE;t=u~Chg30dYL)%Ad&znGSZ`)anl5cTbSWiAd|M39AsO@YHZ1o z3Q~juf6VT?cZIyb>*KI78Xwa?svaSt_=4N z`g^_YWb=8l-<@3M-?)0ayYcxKQ#eV9=e(J@3>cxK2Vn1o@CrvjRX@h@F{bsbgo|AXf#z+ZBeaBm1g?>n|b-B>V)#mrj_TH zl~W5=uT);0hw`nO%D2=e|5}utE#E4%-?H{ws$CdQt6glrRcOC$?YF};7)}!fKMYv-|cA| zz%LA7ri>GMI_e$xH&~^u-Ri;K;Zqn5d&i&fPTbd|=TA3b$M(CUFa6h~`!uw>dAPF! zBLY(apVOTjOp=|Q?m@E6c($wE!*9a3Z<5KVyMK`M_q$JfRePIk_jdY&Ue!9CJU{4F zyA!yj%|p60X71cMm>jWT=PK9xusC{HNmhIWRNb!bcL&d_#=@O17D~F~WHcO3%7s;~ z+8tN*rd)hD*@Z27MvKE|s$*?iaeGtsH}mT3Few|;bQOD{8g~zR178ENeQNY93?i$u zH5rbcXCoX^%$G%#ZfJY1Q}*2WeDdT<^)R9Q;b`1Dn^nj<99OlOs`Y2v)l#+lGu3vg z-^TLyws(p(@}_sH2mVT}-WgTk-*VSN-9N#j-nVM+8;Z?Doq z0BSZg>tWj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vNMj>M=k(a0!kE&Z+bi!Q`hlyZK~j6gblq!?PS)eE zU$V?6F~WhZ`zM43l3Ki+E)m!}Jkp4v`$;;w!YAjT-RcS|b$jKZF6$kej`gs9Q2*hD zi}7Rq%}s+pQ_U`_mp_qXep(*2aO#(RXHaR{$RhL@RS(LYrV92)rYV&SC~|=i(z&ti z@MOOhLqT#s8UUy%(^g~*4qiOPk4I)I4mmlQ^i!mv4tBOY?QTLd*QVIhkzofO)4U-qof~ + +;; 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 . + +;;; Code: +(require 'cl-lib) +(require 'helm) +(require 'helm-utils) +(require 'helm-adaptive) +;; +;; You will have to set firefox to import bookmarks in his html file bookmarks.html. +;; (only for firefox versions >=3) +;; To achieve that, open about:config in firefox and double click on this line to enable value +;; to true: +;; user_pref("browser.bookmarks.autoExportHTML", false); +;; You should have now: +;; user_pref("browser.bookmarks.autoExportHTML", true); +;; NOTE: This is also working in the same way for mozilla aka seamonkey. + + +(defgroup helm-firefox nil + "Helm libraries and applications for Firefox navigator." + :group 'helm) + +(defcustom helm-firefox-default-directory "/.mozilla/firefox/" + "The root directory containing firefox config." + :group 'helm-firefox + :type 'string) + +(defvar helm-firefox-bookmark-url-regexp "\\(https\\|http\\|ftp\\|about\\|file\\)://[^ \"]*") +(defvar helm-firefox-bookmarks-regexp ">\\([^><]+.[^]\\)") + +(defun helm-get-firefox-user-init-dir () + "Guess the default Firefox user directory name." + (let* ((moz-dir (concat (getenv "HOME") helm-firefox-default-directory)) + (moz-user-dir + (with-current-buffer (find-file-noselect (concat moz-dir "profiles.ini")) + (goto-char (point-min)) + (prog1 + (when (search-forward "Path=" nil t) + (buffer-substring-no-properties (point) (point-at-eol))) + (kill-buffer))))) + (file-name-as-directory (concat moz-dir moz-user-dir)))) + +(defun helm-guess-firefox-bookmark-file () + "Return the path of the Firefox bookmarks file." + (concat (helm-get-firefox-user-init-dir) "bookmarks.html")) + +(defvar helm-firefox-bookmarks-alist nil) +(defvar helm-source-firefox-bookmarks + '((name . "Firefox Bookmarks") + (init . (lambda () + (setq helm-firefox-bookmarks-alist + (helm-html-bookmarks-to-alist + (helm-guess-firefox-bookmark-file) + helm-firefox-bookmark-url-regexp + helm-firefox-bookmarks-regexp)))) + (candidates . (lambda () + (mapcar #'car helm-firefox-bookmarks-alist))) + (filtered-candidate-transformer + helm-adaptive-sort + helm-highlight-firefox-bookmarks) + (action . (("Browse Url" + . (lambda (candidate) + (helm-browse-url + (helm-firefox-bookmarks-get-value candidate)))) + ("Copy Url" + . (lambda (candidate) + (let ((url (helm-firefox-bookmarks-get-value + candidate))) + (kill-new url) + (message "`%s' copied to kill-ring" url)))))))) + +(defun helm-firefox-bookmarks-get-value (elm) + (assoc-default elm helm-firefox-bookmarks-alist)) + +(defun helm-highlight-firefox-bookmarks (bookmarks _source) + (cl-loop for i in bookmarks + collect (propertize + i 'face '((:foreground "YellowGreen")) + 'help-echo (helm-firefox-bookmarks-get-value i)))) + +;;;###autoload +(defun helm-firefox-bookmarks () + "Preconfigured `helm' for firefox bookmark. +You will have to enable html bookmarks in firefox: +open about:config in firefox and double click on this line to enable value \ +to true: + +user_pref(\"browser.bookmarks.autoExportHTML\", false); + +You should have now: + +user_pref(\"browser.bookmarks.autoExportHTML\", true); + +After closing firefox, you will be able to browse you bookmarks. +" + (interactive) + (helm-other-buffer 'helm-source-firefox-bookmarks + "*Helm Firefox*")) + + +(provide 'helm-firefox) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions obsolete) +;; coding: utf-8 +;; indent-tabs-mode: nil +;; End: + +;;; helm-firefox.el ends here diff --git a/elpa/helm-20140808.2300/helm-firefox.elc b/elpa/helm-20140808.2300/helm-firefox.elc new file mode 100644 index 0000000000000000000000000000000000000000..54fe200589e8ec1f901cfa244a6174f8f19b79f7 GIT binary patch literal 3433 zcmbtWYje{^6b)gfF#ZGm)ai{q(pmb6 z87$C2!@YbnO?643&|Fh;nXy?KQzBz+RGLlneY{oL5K9vHI^QSU4x;TZFcJxjOd5)1 zW*8P1X6$d_N#^gK?7w(H@sueR8<4#3wr5#FT2jn18gUYmUD>2^MiXaBq+F4iVqw%R z_eBtX=wk`|=%>+WG)I?)`>{+oc>}};SGYEaLi@vB(ej_}@}G_RPY=r;;MyE?tyvga zvpXe57~w$|*9I;u3?Dpsg1cR6m%%K8NfiEmYY=rdJvvqVLjiG6EPRoU$O_2a{KBL{ zmp@s;poMcRDzuR^KjE=piu)5Ki@aP?35>E-koVkz08KHKBEmLmEYC$6ms+B+RP?k| zBxUS8oiHO+;8DK>{A`zVps*2C@5Ehg1P)_X2;(QfiD7<8<03;A3HNO^OY5hd>WoWQ zy>>8@pHd-MyFzJuLkj6D&j;BcYmT!P-g|GRoRox07h6?&h2X8+ZDv^skJE{D!d&K@ z%5)ggR;$qjRrqj~{s?J5W9rN=l<*aw@Q*pT4w_SAay=OQW54k=c6TUD({~Ts?9mWFFkgS%+n{F!*BaTvsXEnpbdcq0 z$!}ykM>g4$`PKQwM9MVXb&;8HIH9iHK2}g-_Xcho$7>&~ZuzLn zfGg5oheUh7tXS#3$1Q@(`0A2f+rqDn)zxFx)_yF28s{!oGWAHp35{d zJ~KX-g3cf}zcg@l)3-jkg zr>w@;$HYc<9+le2`96zpA#(Qj?>Yfg%Hp<3qoaF&aUtZz zGsSu4L5+|@?(=vmuaoUu2k5!c!tuSMqnC%fuV0?f$k6)*pAbB05HEcWt$R z$mzWm++8<3R8gV&c!S1YvY-ppTADJ%#n!C z-yFX3Fe@{md26TP=TwCP5d(Z96__XY9_s~|lRa=R+w!)Sz>^3)` Q$nzAFb2)HSgj$V%0W*4F@Bjb+ literal 0 HcmV?d00001 diff --git a/elpa/helm-20140808.2300/helm-font.el b/elpa/helm-20140808.2300/helm-font.el new file mode 100644 index 000000000..446880e01 --- /dev/null +++ b/elpa/helm-20140808.2300/helm-font.el @@ -0,0 +1,177 @@ +;;; helm-font --- Font and ucs selection for Helm -*- lexical-binding: t -*- + +;; Copyright (C) 2012 ~ 2014 Thierry Volpiatto + +;; 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 . + +;;; Code: + +(require 'cl-lib) +(require 'helm) + +(defvar helm-ucs-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map helm-map) + (define-key map (kbd "") 'helm-ucs-persistent-delete) + (define-key map (kbd "") 'helm-ucs-persistent-backward) + (define-key map (kbd "") 'helm-ucs-persistent-forward) + (define-key map (kbd "") 'helm-ucs-persistent-insert) + (define-key map (kbd "C-c ?") 'helm-ucs-help) + map) + "Keymap for `helm-ucs'.") + + +;;; Xfont selection +;; +;; +(defun helm-persistent-xfont-action (elm) + "Show current font temporarily" + (let ((current-font (cdr (assoc 'font (frame-parameters)))) + (default-font elm)) + (unwind-protect + (progn (set-frame-font default-font 'keep-size) (sit-for 2)) + (set-frame-font current-font)))) + +(defvar helm-xfonts-cache nil) +(defvar helm-source-xfonts + '((name . "X Fonts") + (init . (lambda () + (unless helm-xfonts-cache + (setq helm-xfonts-cache + (x-list-fonts "*"))))) + (candidates . helm-xfonts-cache) + (action . (("Copy to kill ring" . (lambda (elm) + (kill-new elm))) + ("Set Font" . (lambda (elm) + (kill-new elm) + (set-frame-font elm 'keep-size) + (message "New font have been copied to kill ring"))))) + (persistent-action . helm-persistent-xfont-action) + (persistent-help . "Switch to this font temporarily"))) + +;;; 𝕌𝕔𝕤 𝕊𝕪𝕞𝕓𝕠𝕝 𝕔𝕠𝕞𝕡𝕝𝕖𝕥𝕚𝕠𝕟 +;; +;; +(defvar helm-ucs-max-len 0) +(defun helm-calculate-ucs-max-len () + "Calculate the length of longest `ucs-names' candidate." + (cl-loop with count = 0 + for (n . v) in (ucs-names) + for len = (length n) + if (> len count) + do (setq count len) + finally return count)) + +(defun helm-ucs-init () + "Initialize an helm buffer with ucs symbols. +Only math* symbols are collected." + (unless (> helm-ucs-max-len 0) + (setq helm-ucs-max-len + (helm-calculate-ucs-max-len))) + (with-current-buffer (helm-candidate-buffer + (get-buffer-create "*helm ucs*")) + ;; `ucs-names' fn will not run again, data is cached in + ;; var `ucs-names'. + (cl-loop for (n . v) in (ucs-names) + for len = (length n) + for diff = (+ (- helm-ucs-max-len len) 2) + unless (string= "" n) + do (progn (insert (concat + n ":" + (make-string + diff ? ))) + (if (fboundp 'ucs-insert) + (ucs-insert v) + ;; call `insert-char' with nil nil + ;; to shutup byte compiler in 24.1. + (insert-char v nil nil)) + (insert "\n"))))) + +(defun helm-ucs-forward-char (_candidate) + (with-helm-current-buffer + (forward-char 1))) + +(defun helm-ucs-backward-char (_candidate) + (with-helm-current-buffer + (forward-char -1))) + +(defun helm-ucs-delete-backward (_candidate) + (with-helm-current-buffer + (delete-char -1))) + +(defun helm-ucs-insert-char (candidate) + (with-helm-current-buffer + (insert + (replace-regexp-in-string + " " "" + (cadr (split-string candidate ":")))))) + +(defun helm-ucs-persistent-insert () + (interactive) + (with-helm-alive-p + (helm-attrset 'action-insert 'helm-ucs-insert-char) + (helm-execute-persistent-action 'action-insert))) + +(defun helm-ucs-persistent-forward () + (interactive) + (with-helm-alive-p + (helm-attrset 'action-forward 'helm-ucs-forward-char) + (helm-execute-persistent-action 'action-forward))) + +(defun helm-ucs-persistent-backward () + (interactive) + (with-helm-alive-p + (helm-attrset 'action-back 'helm-ucs-backward-char) + (helm-execute-persistent-action 'action-back))) + +(defun helm-ucs-persistent-delete () + (interactive) + (with-helm-alive-p + (helm-attrset 'action-delete 'helm-ucs-delete-backward) + (helm-execute-persistent-action 'action-delete))) + +(defvar helm-source-ucs + '((name . "Ucs names") + (init . helm-ucs-init) + (candidate-number-limit . 9999) + (candidates-in-buffer) + (mode-line . helm-ucs-mode-line-string) + (action . (("Insert" . helm-ucs-insert-char) + ("Forward char" . helm-ucs-forward-char) + ("Backward char" . helm-ucs-backward-char) + ("Delete char backward" . helm-ucs-delete-backward)))) + "Source for collecting `ucs-names' math symbols.") + +;;;###autoload +(defun helm-select-xfont () + "Preconfigured `helm' to select Xfont." + (interactive) + (helm-other-buffer 'helm-source-xfonts "*helm select* xfont")) + +;;;###autoload +(defun helm-ucs () + "Preconfigured helm for `ucs-names' math symbols." + (interactive) + (helm :sources 'helm-source-ucs + :keymap helm-ucs-map)) + +(provide 'helm-font) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions obsolete) +;; coding: utf-8 +;; indent-tabs-mode: nil +;; End: + +;;; helm-font.el ends here diff --git a/elpa/helm-20140808.2300/helm-font.elc b/elpa/helm-20140808.2300/helm-font.elc new file mode 100644 index 0000000000000000000000000000000000000000..a92e114274126c3efc8727ac14ebf40fbd068e52 GIT binary patch literal 5212 zcmd5=>u=je5?5@ebzSt(Z$&?KOsBBqD`k>;_>m8_>!gKoecYX!BB*6FD{>_f=0o9< zj@`e$zu8^Nl;Z>!6lqU@AaZwhcAmeP(c`DzpM2J8wKg6(fEc^Q6Ax| z+#f{vO`czNlROj&(E<5`Lx2A;@F?*7zGg8g@{}fELc7nDEYvP|>~>`; zLe-6SWil7LGnu3=AMp0Q{ch0nJhL>(v$87_%_h$1DW9P$@Q86~(C_xTzTSHkmopLx zWSN(78viaz5UB2k-u!tMD|3IPq@w616KNb$l!vM;;%utE!fv5T5>W(27x(xF-QeIg z9#IY+Szb~I*#wBIa^mh|C3BC@PEJoLoQXn&C4~G+UoWzVR8FDDXe=qo#nL5K8AVbQ zNh}L0X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xMma}gfPdknkT5<_1YmK zbpKuAqERet$Xg6Tnt#IS%H0Ow0Qgh)v)lohHX08A1y6$l_te@Gh&(O0c_~ZuqL^27 zZw2XfZ>P5m=<&OWNxdkqWmutsZ-`~fo-7J9IL?2oEJMvUNF3&A$}>w|l`2NZk7C55 zj=U~mhTHT&>%#zVO5EMVXxvmcsPEGP^&JZnEJ4NJZ-W{q&<3LtGfcgQFyKoJ#&ZzV zSN^|*fgO3?rvdC0iy*j*gnvOCV0b#9Gu^W5IoEb6oLkLC4u62m>Tc%l0Bjq6_^{dS zKf|l;0vG+h?O091$0b_S+xneV=~xy3yA*>#mk#i0?sH#cF`YYTjP)SRc&b>~Zn0=V z5Oj-P|5W3R(Nx zf@mY=Xy=Q%aO#!iNzQgshUE_FX+z_ynZ^72!G6aA?AFm>ct>z%X#PlH|J(6kDXQKy zA#hyjB!tMfRR|OK`lF`!%$EQA&=(yV(d|Il2+%|GcL@GNuwDMZ^Lw?}?Rk-3aRD*^ K46tQ88-D=9Ye(t; literal 0 HcmV?d00001 diff --git a/elpa/helm-20140808.2300/helm-gentoo.el b/elpa/helm-20140808.2300/helm-gentoo.el new file mode 100644 index 000000000..075ea8c17 --- /dev/null +++ b/elpa/helm-20140808.2300/helm-gentoo.el @@ -0,0 +1,258 @@ +;;; helm-gentoo.el --- Helm UI for gentoo portage. -*- lexical-binding: t -*- + +;; Copyright (C) 2012 ~ 2014 Thierry Volpiatto + +;; 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 . + +;;; Code: +(require 'cl-lib) +(require 'helm) + +(declare-function term-line-mode "term") +(declare-function term-char-mode "term") +(declare-function term-send-input "term") +(declare-function term-send-eof "term") + + +(defgroup helm-gentoo nil + "Predefined configurations for `helm.el'." + :group 'helm) + +(defface helm-gentoo-match '((t (:foreground "red"))) + "Face for helm-gentoo installed packages." + :group 'traverse-faces) + + +;;; Internals +(defvar helm-gentoo-use-flags nil) +(defvar helm-gentoo-buffer "*helm-gentoo-output*") +(defvar helm-cache-gentoo nil) +(defvar helm-cache-world nil) +(defvar helm-source-gentoo + '((name . "Portage sources") + (init . (lambda () + (get-buffer-create helm-gentoo-buffer) + (unless helm-cache-gentoo + (helm-gentoo-setup-cache)) + (unless helm-cache-world + (setq helm-cache-world (helm-gentoo-get-world))) + (helm-gentoo-init-list))) + (candidates-in-buffer) + (match . identity) + (candidate-transformer helm-highlight-world) + (action . (("Show package" . (lambda (elm) + (helm-gentoo-eshell-action elm "eix"))) + ("Show history" . (lambda (elm) + (if (member elm helm-cache-world) + (helm-gentoo-eshell-action elm "genlop -qe") + (message "No infos on packages not yet installed")))) + ("Copy in kill-ring" . kill-new) + ("insert at point" . insert) + ("Browse HomePage" . (lambda (elm) + (let ((urls (helm-gentoo-get-url elm))) + (browse-url (helm-comp-read "Url: " urls :must-match t))))) + ("Show extra infos" . (lambda (elm) + (if (member elm helm-cache-world) + (helm-gentoo-eshell-action elm "genlop -qi") + (message "No infos on packages not yet installed")))) + ("Show use flags" . (lambda (elm) + (helm-gentoo-default-action elm "equery" "-C" "u") + (font-lock-add-keywords nil '(("^\+.*" . font-lock-variable-name-face))) + (font-lock-mode 1))) + ("Run emerge pretend" . (lambda (elm) + (helm-gentoo-eshell-action elm "emerge -p"))) + ("Emerge" . (lambda (elm) + (helm-gentoo-install elm :action 'install))) + ("Unmerge" . (lambda (elm) + (helm-gentoo-install elm :action 'uninstall))) + ("Show dependencies" . (lambda (elm) + (helm-gentoo-default-action elm "equery" "-C" "d"))) + ("Show related files" . (lambda (elm) + (helm-gentoo-default-action elm "equery" "files"))) + ("Refresh" . (lambda (elm) + (helm-gentoo-setup-cache) + (setq helm-cache-world (helm-gentoo-get-world)))))))) + + +(cl-defun helm-gentoo-install (_candidate &key action) + (setq helm-external-commands-list nil) + (ansi-term (getenv "SHELL") "Gentoo emerge") + (term-line-mode) + (let ((command (cl-case action + (install "sudo emerge -av ") + (uninstall "sudo emerge -avC ") + (t (error "Unknown action")))) + (elms (mapconcat 'identity (helm-marked-candidates) " "))) + (goto-char (point-max)) + (insert (concat command elms)) + (term-char-mode) (term-send-input))) + +(defun helm-gentoo-default-action (elm command &rest args) + "Gentoo default action that use `helm-gentoo-buffer'." + (if (member elm helm-cache-world) + (progn + (helm-switch-to-buffer helm-gentoo-buffer) + (erase-buffer) + (let ((com-list (append args (list elm)))) + (apply #'call-process command nil t nil + com-list))) + (message "No infos on packages not yet installed"))) + +(defvar helm-source-use-flags + '((name . "Use Flags") + (init . (lambda () + (unless helm-gentoo-use-flags + (helm-gentoo-setup-use-flags-cache)) + (helm-gentoo-get-use))) + (candidates-in-buffer) + (match . identity) + (candidate-transformer helm-highlight-local-use) + (action . (("Description" + . (lambda (elm) + (helm-switch-to-buffer helm-gentoo-buffer) + (erase-buffer) + (apply #'call-process "euse" nil t nil + `("-i" + ,elm)) + (font-lock-add-keywords nil `((,elm . font-lock-variable-name-face))) + (font-lock-mode 1))) + ("Enable" + . (lambda (elm) + (helm-gentoo-eshell-action elm "*sudo -p Password: euse -E"))) + ("Disable" + . (lambda (elm) + (helm-gentoo-eshell-action elm "*sudo -p Password: euse -D"))) + ("Remove" + . (lambda (elm) + (helm-gentoo-eshell-action elm "*sudo -p Password: euse -P"))) + ("Show which dep use this flag" + . (lambda (elm) + (helm-switch-to-buffer helm-gentoo-buffer) + (erase-buffer) + (apply #'call-process "equery" nil t nil + `("-C" + "h" + ,elm)))))))) + + + +(defun helm-gentoo-init-list () + "Initialize buffer with all packages in Portage." + (let* ((portage-buf (get-buffer-create "*helm-gentoo*")) + (buf (helm-candidate-buffer portage-buf))) + (with-current-buffer buf + (cl-dolist (i helm-cache-gentoo) + (insert (concat i "\n")))))) + +(defun helm-gentoo-setup-cache () + "Set up `helm-cache-gentoo'" + (setq helm-cache-gentoo + (split-string (with-temp-buffer + (call-process "eix" nil t nil + "--only-names") + (buffer-string))))) + +(defun helm-gentoo-eshell-action (elm command) + (when (get-buffer "*EShell Command Output*") + (kill-buffer "*EShell Command Output*")) + (message "Wait searching...") + (let ((buf-fname (buffer-file-name helm-current-buffer))) + (if (and buf-fname (string-match tramp-file-name-regexp buf-fname)) + (progn + (save-window-excursion + (pop-to-buffer "*scratch*") + (eshell-command (format "%s %s" command elm))) + (pop-to-buffer "*EShell Command Output*")) + (eshell-command (format "%s %s" command elm))))) + +(defun helm-gentoo-get-use () + "Initialize buffer with all use flags." + (let* ((use-buf (get-buffer-create "*helm-gentoo-use*")) + (buf (helm-candidate-buffer use-buf))) + (with-current-buffer buf + (cl-dolist (i helm-gentoo-use-flags) + (insert (concat i "\n")))))) + + +(defun helm-gentoo-setup-use-flags-cache () + "Setup `helm-gentoo-use-flags'" + (setq helm-gentoo-use-flags + (split-string (with-temp-buffer + (call-process "eix" nil t nil + "--print-all-useflags") + (buffer-string))))) + +(defun helm-gentoo-get-url (elm) + "Return a list of urls from eix output." + (cl-loop with url-list = (split-string + (with-temp-buffer + (call-process "eix" nil t nil + elm "--format" "\n") + (buffer-string))) + for i in url-list + when (and (string-match "^http://.*" i) + all + (not (member i all))) + collect i into all + finally return all)) + +(defun helm-gentoo-get-world () + "Return list of all installed package on your system." + (split-string (with-temp-buffer + (call-process "qlist" nil t nil + "-I") + (buffer-string)))) + +(defun helm-gentoo-get-local-use () + (split-string (with-temp-buffer + (call-process "portageq" nil t nil + "envvar" + "USE") + (buffer-string)))) + + +(defun helm-highlight-world (eix) + "Highlight all installed package." + (cl-loop for i in eix + if (member i helm-cache-world) + collect (propertize i 'face 'helm-gentoo-match) + else + collect i)) + +(defun helm-highlight-local-use (use-flags) + (let ((local-uses (helm-gentoo-get-local-use))) + (cl-loop for i in use-flags + if (member i local-uses) + collect (propertize i 'face 'helm-gentoo-match) + else + collect i))) + +;;;###autoload +(defun helm-gentoo () + "Preconfigured `helm' for gentoo linux." + (interactive) + (helm-other-buffer '(helm-source-gentoo + helm-source-use-flags) + "*helm gentoo*")) + + +(provide 'helm-gentoo) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions obsolete) +;; coding: utf-8 +;; indent-tabs-mode: nil +;; End: + +;;; helm-gentoo.el ends here diff --git a/elpa/helm-20140808.2300/helm-gentoo.elc b/elpa/helm-20140808.2300/helm-gentoo.elc new file mode 100644 index 0000000000000000000000000000000000000000..f02eeae6fb80e72188785229d6631b0757498287 GIT binary patch literal 8833 zcmdT~ZByGw62>G;Hr$u}c6A^2t|MQ9%|%9%-+)}DLV#?jBiU34cUJ{$MaW~ULY9Oi zL%hHKo}L-WvN0r^Wv?o!QetUldS1Hw>8E@0Y%YqwQ!I`+?}u>6nIY z_5x38zHz;mQFPu2BF_yd3hBVjXlryvv_W=z(_Y_nEOIQnB}Md;Xh?ksp|!(QBdC!r8;^sBJEGBUq0#CZbd-pTk)H_i0yFSWiA{pMQJO_V zvnRa3O@w)tM59=?n94FJ^aC>9C88(#ehAe;C4K*FlqmI6KT7B$OM(flGz{8Q5@y8q zT~CyynlMmrK($&%wM~c+JPJBAFpp8M*U5OrBUrdJT)h@QOfy&@RuQ}2xqBv3%$OxE zD_EF3NqRz^`f?46y>zF>ny^c=AGl{QEI*jv<#g2V!#a%B(wt^A%HmPBYRnArTyKEm zlHM~%qH4a1lAt%IHH}7zSBze%)!;3H8aU@D$*?WhGIvOgI@SEp&nR$*r#)BdqIM=S zQ?1nW65(dk2di2zZWIP0P1W&DEw)zPT`ICsY|3_=`kX;(3pMn+D9h5H%c6K)@-ypi zY7*W8EH2Hs0Y2LEdsudA`k~$kJ}ZN0kl(|R`q{YL(}aq{6vi-wcI1=;|7;N8$!DY* z(17u(W*iKntK2+{{NQRZ(3wSv6p{i{k7HLbg#QV~m&*X6Wl=JomErfXSTQ`sQh1PD zPD$IJp9MA(L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_W$FeB$T3<=?#$jHyS8{X>AmfkkX6Jx;?$1D?jXkw@#JtzRV*}4@mIatZ8 z{c|{}DaSNK+&M~K<3^uBN@glwh?eb*c8-=^M#};$XXpGfz{JF=OsW{#^tng}n8Xh4 zr~e1&oZSn3lkgd%QimE5_&iQo*OYF6(T>w>suo0~%WCq{2PI2V z73xWLbaPCU#*PYJ^~h;=CGG;(EROfibVQtU$6#A3BHE0g3StWcokm(Tca|OiAsIC7 zCl54yP6bBp!!W+M$(Vn*fQkXA#iBx4r*%(3`di6KxX0UtN<}AZE%kK~(YU3G4~tto z_#XN>4UCXL{7o8&LO{^Ne-2QajZvF@4rY{tyCw@$$Zq^H$g+5IZ4H&fQkvK4TH1U% zh56*h!&E{Sf+iO!Ty-Af(t*-(3fl1{sHv_1a(4Mg84{aOPOa<-wfdHHe8DF_VNrWC z3Y~DLuG3x5lk+*;iM_YTV+&yZBM)BsFDf09{*?UpTRQz%U8!9Z3P4p2Wp%E49qi6g zMNT<#n$e=y`DK&5{l4ZpIq>fNcMkB*TvQdvtFkPx*c<{^a|o;yg{i+X5oSyTDF!31 zR$j`)f?=)-I8<*X?7OGYvf0%bsFN+es8r6%c_>OrF|LL<&76NLJ1N+$+qN~&9w(bB zn`04DsDkB|w)V8x+WoxdMmKNm@w}~lSK6A)N1Np>YIZQ~A78lFjS0tuJ(#cdw@^#e z46{SH_s+>Ouu>+WEAm!aO^JXUjy`<`EU$a23~oiySyho056~BG)Az$tjk7g6T#?Ib jYR(<;A2=BOn>qzs@7UcsCv9BkgSszK#GSeas4xEy>cgHu literal 0 HcmV?d00001 diff --git a/elpa/helm-20140808.2300/helm-grep.el b/elpa/helm-20140808.2300/helm-grep.el new file mode 100644 index 000000000..628b88fef --- /dev/null +++ b/elpa/helm-20140808.2300/helm-grep.el @@ -0,0 +1,1196 @@ +;;; helm-grep.el --- Helm Incremental Grep. -*- lexical-binding: t -*- + +;; Copyright (C) 2012 ~ 2014 Thierry Volpiatto + +;; 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 . + +;;; Code: +(require 'cl-lib) +(require 'helm) +(require 'grep) +(require 'helm-regexp) + +;;; load wgrep proxy if it's available +(require 'wgrep-helm nil t) + +(declare-function helm-buffer-list "helm-buffers") +(declare-function helm-elscreen-find-file "helm-elscreen" (file)) +(declare-function View-quit "view") +(declare-function doc-view-goto-page "doc-view" (page)) + + +(defgroup helm-grep nil + "Grep related Applications and libraries for Helm." + :group 'helm) + +(defcustom helm-grep-default-command + "grep -a -d skip %e -n%cH -e %p %f" + "Default grep format command for `helm-do-grep-1'. +Where: +'%e' format spec is for --exclude or --include grep options or + ack-grep --type option. (Not mandatory) + +'%c' format spec is for case-fold-search, + whether to use the -i option of grep. (Not mandatory) + When you specify this spec, helm grep will use smartcase + that is when a upcase character is found in pattern case will + be respected and no '-i' option will be used, otherwise, when + no upcase character is found in pattern always use '-i'. + If you don't want this behavior, don't use this spec and + specify or not the '-i' option. + Note that with ack-grep this is not needed, just specify + the '--smart-case' option. + +'%p' format spec is for pattern. (Mandatory) + +'%f' format spec is for filenames. (Mandatory) + +If your grep version doesn't support the --exclude/include args +don't specify the '%e' format spec. + +Helm also support ack-grep and git-grep , +here a default command example for ack-grep: + +\(setq helm-grep-default-command \"ack-grep -Hn --no-group --no-color %e %p %f\" + helm-grep-default-recurse-command \"ack-grep -H --no-group --no-color %e %p %f\") + +You can ommit the %e spec if you don't want to be prompted for types. +`helm-grep-default-command' and `helm-grep-default-recurse-command'are +independents, so you can enable `helm-grep-default-command' with ack-grep +and `helm-grep-default-recurse-command' with grep if you want to be faster +on recursive grep. +NOTE: remote grepping is not available with ack-grep." + :group 'helm-grep + :type 'string) + +(defcustom helm-grep-default-recurse-command + "grep -a -d recurse %e -n%cH -e %p %f" + "Default recursive grep format command for `helm-do-grep-1'. +See `helm-grep-default-command' for format specs and infos about ack-grep." + :group 'helm-grep + :type 'string) + +(defcustom helm-default-zgrep-command + "zgrep -a -n%cH -e %p %f" + "Default command for Zgrep. +See `helm-grep-default-command' for infos on format specs." + :group 'helm-grep + :type 'string) + +(defcustom helm-ack-grep-executable "ack-grep" + "Default ack-grep command." + :group 'helm-grep + :type 'string) + +(defcustom helm-pdfgrep-default-command + "pdfgrep --color never -niH %s %s" + "Default command for pdfgrep." + :group 'helm-grep + :type 'string) + +(defcustom helm-grep-use-ioccur-style-keys t + "Use Arrow keys to jump to occurences." + :group 'helm-grep + :type 'boolean) + +(defcustom helm-pdfgrep-default-read-command nil + "Default command to read pdf files from pdfgrep. +Where '%f' format spec is filename and '%p' is page number. +e.g In Ubuntu you can set it to: + + \"evince --page-label=%p '%f'\" + +If set to nil `doc-view-mode' will be used instead of an external command." + :group 'helm-grep + :type 'string) + +(defcustom helm-grep-max-length-history 100 + "Max number of elements to save in `helm-grep-history'." + :group 'helm-grep + :type 'integer) + +(defcustom helm-zgrep-file-extension-regexp + ".*\\(\\.gz\\|\\.bz\\|\\.xz\\|\\.lzma\\)$" + "Default file extensions zgrep will search in." + :group 'helm-grep + :type 'string) + +(defcustom helm-do-grep-preselect-candidate nil + "When non--nil the file name of current buffer will be selected." + :group 'helm-grep + :type 'boolean) + +(defcustom helm-grep-preferred-ext nil + "This file extension will be preselected for grep." + :group 'helm-grep + :type 'string) + + +;;; Faces +;; +;; +(defface helm-grep-match + '((t (:inherit match))) + "Face used to highlight grep matches." + :group 'helm-grep) + +(defface helm-grep-file + '((t (:foreground "BlueViolet" + :underline t))) + "Face used to highlight grep results filenames." + :group 'helm-grep) + +(defface helm-grep-lineno + '((t (:foreground "Darkorange1"))) + "Face used to highlight grep number lines." + :group 'helm-grep) + +(defface helm-grep-running + '((t (:foreground "Red"))) + "Face used in mode line when grep is running." + :group 'helm-grep) + +(defface helm-grep-finish + '((t (:foreground "Green"))) + "Face used in mode line when grep is finish." + :group 'helm-grep) + +(defface helm-grep-cmd-line + '((t (:inherit diff-added))) + "Face used to highlight grep command line when no results." + :group 'helm-grep) + + +;;; Keymaps +;; +;; +(defvar helm-grep-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map helm-map) + (define-key map (kbd "M-") 'helm-goto-next-file) + (define-key map (kbd "M-") 'helm-goto-precedent-file) + (define-key map (kbd "C-c o") 'helm-grep-run-other-window-action) + (define-key map (kbd "C-c C-o") 'helm-grep-run-other-frame-action) + (define-key map (kbd "C-w") 'helm-yank-text-at-point) + (define-key map (kbd "C-x C-s") 'helm-grep-run-save-buffer) + (when helm-grep-use-ioccur-style-keys + (define-key map (kbd "") 'helm-execute-persistent-action) + (define-key map (kbd "") 'helm-grep-run-default-action)) + (define-key map (kbd "C-c ?") 'helm-grep-help) + (delq nil map)) + "Keymap used in Grep sources.") + +(defvar helm-pdfgrep-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map helm-map) + (define-key map (kbd "M-") 'helm-goto-next-file) + (define-key map (kbd "M-") 'helm-goto-precedent-file) + (define-key map (kbd "C-w") 'helm-yank-text-at-point) + (define-key map (kbd "C-c ?") 'helm-pdfgrep-help) + map) + "Keymap used in pdfgrep.") + +(defvar helm-grep-mode-map + (let ((map (make-sparse-keymap))) + (define-key map (kbd "RET") 'helm-grep-mode-jump) + (define-key map (kbd "C-o") 'helm-grep-mode-jump-other-window) + (define-key map (kbd "") 'helm-grep-mode-jump-other-window-forward) + (define-key map (kbd "") 'helm-grep-mode-jump-other-window-backward) + (define-key map (kbd "") 'helm-gm-next-file) + (define-key map (kbd "") 'helm-gm-precedent-file) + map)) + + +;;; Internals vars +;; +;; +(defvar helm-rzgrep-cache (make-hash-table :test 'equal)) +(defvar helm-grep-default-function 'helm-grep-init) +(defvar helm-zgrep-recurse-flag nil) +(defvar helm-grep-history nil) +(defvar helm-grep-last-targets nil) +(defvar helm-grep-include-files nil) +(defvar helm-grep-in-recurse nil) +(defvar helm-grep-use-zgrep nil) +(defvar helm-grep-last-default-directory nil) +(defvar helm-grep-default-directory-fn nil + "A function that should return a directory to expand candidate to. +It is intended to use as a let-bound variable, DON'T set this globaly.") +(defvar helm-pdfgrep-targets nil) +(defvar helm-grep-last-cmd-line nil) +(defvar helm-grep-split-line-regexp "^\\([[:lower:][:upper:]]?:?.*?\\):\\([0-9]+\\):\\(.*\\)") + + +;;; Init +;; +;; +(defun helm-grep-prepare-candidates (candidates) + "Prepare filenames and directories CANDIDATES for grep command line." + ;; If one or more candidate is a directory, search in all files + ;; of this candidate (e.g /home/user/directory/*). + ;; If r option is enabled search also in subdidrectories. + ;; We need here to expand wildcards to support crap windows filenames + ;; as grep doesn't accept quoted wildcards (e.g "dir/*.el"). + (setq candidates (if (file-remote-p default-directory) + ;; Grep don't understand tramp filenames + ;; use the local name. + (mapcar #'(lambda (x) + (file-remote-p x 'localname)) + candidates) + candidates)) + (if helm-zgrep-recurse-flag + (mapconcat 'shell-quote-argument candidates " ") + ;; When candidate is a directory, search in all its files. + ;; NOTE that `file-expand-wildcards' will return also + ;; directories, they will be ignored by grep but not + ;; by ack-grep that will grep all files of this directory + ;; without recursing in their subdirs though, see that as a one + ;; level recursion with ack-grep. + ;; So I leave it as it is, considering it is a feature. [1] + (cl-loop for i in candidates append + (cond ((string-match "^git" helm-grep-default-command) + (list i)) + ;; Candidate is a directory and we use recursion or ack. + ((and (file-directory-p i) + (or helm-grep-in-recurse + ;; ack-grep accept directory [1]. + (helm-grep-use-ack-p))) + (list (expand-file-name i))) + ;; Grep doesn't support directory only when not in recurse. + ((file-directory-p i) + (file-expand-wildcards + (concat (file-name-as-directory (expand-file-name i)) "*") t)) + ;; Candidate is a file or wildcard and we use recursion, use the + ;; current directory instead of candidate. + ((and (or (file-exists-p i) (string-match "[*]" i)) + helm-grep-in-recurse) + (list (expand-file-name + (directory-file-name ; Needed for windoze. + (file-name-directory (directory-file-name i)))))) + ;; Else should be one or more file/directory + ;; possibly marked. + ;; When real is a normal filename without wildcard + ;; file-expand-wildcards returns a list of one file. + ;; wildcards should have been already handled by + ;; helm-read-file-name or helm-find-files but do it from + ;; here too in case we are called from elsewhere. + (t (file-expand-wildcards i t))) into all-files ; [1] + finally return + (if (string-match "^git" helm-grep-default-command) + (mapconcat 'identity all-files " ") + (mapconcat 'shell-quote-argument all-files " "))))) + +(defun helm-grep-command (&optional recursive) + (let* ((com (if recursive + helm-grep-default-recurse-command + helm-grep-default-command)) + (exe (and com (car (split-string com " "))))) + (if (and exe (string= exe "git")) "git-grep" exe))) + +(cl-defun helm-grep-use-ack-p (&key where) + (let ((rec-com (helm-grep-command t)) + (norm-com (helm-grep-command))) + (cl-case where + (default (and norm-com + (string= norm-com helm-ack-grep-executable))) + (recursive (and rec-com + (string= rec-com helm-ack-grep-executable))) + (strict (and norm-com rec-com + (string= rec-com helm-ack-grep-executable) + (string= norm-com helm-ack-grep-executable))) + (t (and (not (and norm-com (string= norm-com "git-grep"))) + (or (and norm-com + (string= norm-com helm-ack-grep-executable)) + (and rec-com + (string= rec-com helm-ack-grep-executable)))))))) + +(defun helm-grep--prepare-cmd-line (only-files &optional include zgrep) + (let* ((default-directory (or helm-default-directory + (expand-file-name helm-ff-default-directory))) + (fnargs (helm-grep-prepare-candidates only-files)) + (ignored-files (unless (helm-grep-use-ack-p) + (mapconcat + #'(lambda (x) + (concat "--exclude=" + (shell-quote-argument x))) + grep-find-ignored-files " "))) + (ignored-dirs (unless (helm-grep-use-ack-p) + (mapconcat + ;; Need grep version >=2.5.4 + ;; of Gnuwin32 on windoze. + #'(lambda (x) + (concat "--exclude-dir=" + (shell-quote-argument x))) + grep-find-ignored-directories " "))) + (exclude (unless (helm-grep-use-ack-p) + (if helm-grep-in-recurse + (concat (or include ignored-files) + " " ignored-dirs) + ignored-files))) + (types (and (helm-grep-use-ack-p) + ;; When %e format spec is not specified + ;; in `helm-grep-default-command' + ;; we need to pass an empty string + ;; to types to avoid error. + (or include ""))) + (smartcase (if (helm-grep-use-ack-p) "" + (unless (let ((case-fold-search nil)) + (string-match-p + "[[:upper:]]" helm-pattern)) "i")))) + (format-spec + helm-grep-default-command + (delq nil + (list (unless zgrep + (if types + (cons ?e types) + (cons ?e exclude))) + (cons ?c (or smartcase "")) + (cons ?p (shell-quote-argument helm-pattern)) + (cons ?f fnargs)))))) + +(defun helm-grep-init (cmd-line) + "Start an asynchronous grep process with CMD-LINE using ZGREP if non--nil." + (let* ((zgrep (string-match "\\`zgrep" cmd-line)) + ;; Use pipe only with grep, zgrep or git-grep. + (process-connection-type (and (not zgrep) (helm-grep-use-ack-p))) + (tramp-verbose helm-tramp-verbose)) + ;; Start grep process. + (helm-log "Starting Grep process in directory `%s'" default-directory) + (helm-log "Command line used was:\n\n%s" + (concat ">>> " (propertize cmd-line 'face 'helm-grep-cmd-line) "\n\n")) + (prog1 ; This function should return the process first. + (start-file-process-shell-command + "grep" helm-buffer cmd-line) + ;; Init sentinel. + (set-process-sentinel + (get-buffer-process helm-buffer) + #'(lambda (process event) + (let ((noresult (= (process-exit-status process) 1))) + (unless noresult + (helm-process-deferred-sentinel-hook + process event helm-ff-default-directory)) + (cond ((and noresult + ;; [FIXME] This is a workaround for zgrep + ;; that exit with code 1 + ;; after a certain amount of results. + (not (with-helm-buffer helm-grep-use-zgrep))) + (with-current-buffer 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)] " + (if helm-grep-use-zgrep + "Zgrep" + (capitalize + (if helm-grep-in-recurse + (helm-grep-command t) + (helm-grep-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)] " + (if helm-grep-use-zgrep + "Zgrep" + (capitalize + (if helm-grep-in-recurse + (helm-grep-command t) + (helm-grep-command)))) + (max (1- (count-lines + (point-min) + (point-max))) + 0)) + 'face 'helm-grep-finish)))) + (force-mode-line-update))) + ;; Catch error output in log. + (t (helm-log + "Error: %s %s" + (if helm-grep-use-zgrep "Zgrep" "Grep") + (replace-regexp-in-string "\n" "" event)))))))))) + +(defun helm-grep-collect-candidates () + (let ((cmd-line (helm-grep--prepare-cmd-line + helm-grep-last-targets + helm-grep-include-files + helm-grep-use-zgrep))) + (set (make-local-variable 'helm-grep-last-cmd-line) cmd-line) + (funcall helm-grep-default-function cmd-line))) + + +;;; Actions +;; +;; +(defun helm-grep-action (candidate &optional where mark) + "Define a default action for `helm-do-grep' on CANDIDATE. +WHERE can be one of other-window, elscreen, other-frame." + (let* ((split (helm-grep-split-line candidate)) + (lineno (string-to-number (nth 1 split))) + (loc-fname (or (with-current-buffer + (if (eq major-mode 'helm-grep-mode) + (current-buffer) + helm-buffer) + (get-text-property (point-at-bol) 'help-echo)) + (car split))) + (tramp-method (file-remote-p (or helm-ff-default-directory + default-directory) 'method)) + (tramp-host (file-remote-p (or helm-ff-default-directory + default-directory) 'host)) + (tramp-prefix (concat "/" tramp-method ":" tramp-host ":")) + (fname (if tramp-host + (concat tramp-prefix loc-fname) loc-fname))) + (cl-case where + (other-window (find-file-other-window fname)) + (elscreen (helm-elscreen-find-file fname)) + (other-frame (find-file-other-frame fname)) + (grep (helm-grep-save-results-1)) + (pdf (if helm-pdfgrep-default-read-command + (helm-pdfgrep-action-1 split lineno (car split)) + (find-file (car split)) (doc-view-goto-page lineno))) + (t (find-file fname))) + (unless (or (eq where 'grep) (eq where 'pdf)) + (helm-goto-line lineno)) + (when mark + (set-marker (mark-marker) (point)) + (push-mark (point) 'nomsg)) + ;; Save history + (unless (or helm-in-persistent-action + (eq major-mode 'helm-grep-mode) + (string= helm-pattern "")) + (setq helm-grep-history + (cons helm-pattern + (delete helm-pattern helm-grep-history))) + (when (> (length helm-grep-history) + helm-grep-max-length-history) + (setq helm-grep-history + (delete (car (last helm-grep-history)) + helm-grep-history)))))) + +(defun helm-grep-persistent-action (candidate) + "Persistent action for `helm-do-grep'. +With a prefix arg record CANDIDATE in `mark-ring'." + (if current-prefix-arg + (helm-grep-action candidate nil 'mark) + (helm-grep-action candidate)) + (helm-highlight-current-line)) + +(defun helm-grep-other-window (candidate) + "Jump to result in other window from helm grep." + (helm-grep-action candidate 'other-window)) + +(defun helm-grep-other-frame (candidate) + "Jump to result in other frame from helm grep." + (helm-grep-action candidate 'other-frame)) + +(defun helm-grep-jump-elscreen (candidate) + "Jump to result in elscreen from helm grep." + (helm-grep-action candidate 'elscreen)) + +(defun helm-goto-next-or-prec-file (n &optional type) + "Go to next or precedent candidate file in helm grep/etags buffers. +If N is positive go forward otherwise go backward." + (let* ((allow-mode (or (eq major-mode 'helm-grep-mode) + (eq major-mode 'helm-moccur-mode))) + (sel (if allow-mode + (buffer-substring (point-at-bol) (point-at-eol)) + (helm-get-selection nil t))) + (current-line-list (if (eq type 'etags) + (split-string sel ": +" t) + (helm-grep-split-line sel))) + (current-fname (nth 0 current-line-list)) + (bob-or-eof (if (eq n 1) 'eobp 'bobp)) + (mark-maybe #'(lambda () + (if allow-mode + (ignore) + (helm-mark-current-line))))) + (catch 'break + (while (not (funcall bob-or-eof)) + (forward-line n) ; Go forward or backward depending of n value. + ;; Exit when current-fname is not matched or in `helm-grep-mode' + ;; the line is not a grep line i.e 'fname:num:tag'. + (setq sel (buffer-substring (point-at-bol) (point-at-eol))) + (unless (or (string= current-fname + (car (if (eq type 'etags) + (split-string sel ": +" t) + (helm-grep-split-line sel)))) + (and (eq major-mode 'helm-grep-mode) + (not (get-text-property (point-at-bol) 'help-echo)))) + (funcall mark-maybe) + (throw 'break nil)))) + (cond ((and (> n 0) (eobp)) + (re-search-backward ".") + (forward-line 0) + (funcall mark-maybe)) + ((and (< n 0) (bobp)) + (helm-aif (next-single-property-change (point-at-bol) 'help-echo) + (goto-char it) + (forward-line 1)) + (funcall mark-maybe))))) + +;;;###autoload +(defun helm-goto-precedent-file () + "Go to precedent file in helm grep/etags buffers." + (interactive) + (let ((etagp (when (string= (assoc-default + 'name (helm-get-current-source)) "Etags") + 'etags))) + (with-helm-window + (helm-goto-next-or-prec-file -1 etagp)))) + +;;;###autoload +(defun helm-goto-next-file () + "Go to precedent file in helm grep/etags buffers." + (interactive) + (let ((etagp (when (string= (assoc-default + 'name (helm-get-current-source)) "Etags") + 'etags))) + (with-helm-window + (helm-goto-next-or-prec-file 1 etagp)))) + +(defun helm-grep-run-default-action () + "Run grep default action from `helm-do-grep-1'." + (interactive) + (with-helm-alive-p + (helm-quit-and-execute-action 'helm-grep-action))) + +(defun helm-grep-run-other-window-action () + "Run grep goto other window action from `helm-do-grep-1'." + (interactive) + (with-helm-alive-p + (helm-quit-and-execute-action 'helm-grep-other-window))) + +(defun helm-grep-run-other-frame-action () + "Run grep goto other frame action from `helm-do-grep-1'." + (interactive) + (with-helm-alive-p + (helm-quit-and-execute-action 'helm-grep-other-frame))) + +;;;###autoload +(defun helm-grep-run-save-buffer () + "Run grep save results action from `helm-do-grep-1'." + (interactive) + (with-helm-alive-p + (helm-quit-and-execute-action 'helm-grep-save-results))) + + +;;; helm-grep-mode +;; +;; +(defun helm-grep-save-results (candidate) + (helm-grep-action candidate 'grep)) + +(defun helm-grep-save-results-1 () + "Save helm grep result in a `helm-grep-mode' buffer." + (let ((buf "*hgrep*") + new-buf) + (when (get-buffer buf) + (setq new-buf (helm-read-string "GrepBufferName: " buf)) + (cl-loop for b in (helm-buffer-list) + when (and (string= new-buf b) + (not (y-or-n-p + (format "Buffer `%s' already exists overwrite? " + new-buf)))) + do (setq new-buf (helm-read-string "GrepBufferName: " "*hgrep "))) + (setq buf new-buf)) + (with-current-buffer (get-buffer-create buf) + (setq buffer-read-only t) + (let ((inhibit-read-only t)) + (erase-buffer) + (insert "-*- mode: helm-grep -*-\n\n" + (format "Grep Results for `%s':\n\n" helm-pattern)) + (save-excursion + (insert (with-current-buffer helm-buffer + (goto-char (point-min)) (forward-line 1) + (buffer-substring (point) (point-max)))))) + (helm-grep-mode) (pop-to-buffer buf)) + (message "Helm Grep Results saved in `%s' buffer" buf))) + +;;;###autoload +(define-derived-mode helm-grep-mode + special-mode "helm-grep" + "Major mode to provide actions in helm grep saved buffer. + +Special commands: +\\{helm-grep-mode-map}" + (set (make-local-variable 'helm-grep-last-cmd-line) + (with-helm-buffer helm-grep-last-cmd-line)) + (set (make-local-variable 'revert-buffer-function) + #'helm-grep-mode--revert-buffer-function)) + +(defun helm-grep-mode--revert-buffer-function (&optional _ignore-auto _noconfirm) + (goto-char (point-min)) + (re-search-forward "^Grep Results for" nil t) + (forward-line 0) + (when (re-search-forward "^$" nil t) + (forward-line 1)) + (let ((inhibit-read-only t)) + (delete-region (point) (point-max))) + (message "Reverting buffer...") + (set-process-sentinel + (start-file-process-shell-command + "hgrep" (generate-new-buffer "*hgrep revert*") helm-grep-last-cmd-line) + (lambda (process event) + (when (string= event "finished\n") + (with-current-buffer (current-buffer) + (let ((inhibit-read-only t)) + (save-excursion + (cl-loop for line in (with-current-buffer (process-buffer process) + (prog1 (split-string (buffer-string) "\n") + (kill-buffer))) + when (string-match helm-grep-split-line-regexp line) + do (insert (propertize + (car (helm-grep-filter-one-by-one line)) + ;; needed for wgrep. + 'helm-realvalue line) + "\n")))) + (message "Reverting buffer done")))))) + +;;;###autoload +(defun helm-gm-next-file () + (interactive) + (helm-goto-next-or-prec-file 1)) + +;;;###autoload +(defun helm-gm-precedent-file () + (interactive) + (helm-goto-next-or-prec-file -1)) + +;;;###autoload +(defun helm-grep-mode-jump () + (interactive) + (let ((candidate (buffer-substring (point-at-bol) (point-at-eol)))) + (condition-case nil + (progn (helm-grep-action candidate) (delete-other-windows)) + (error nil)))) + +(defun helm-grep-mode-jump-other-window-1 (arg) + (let ((candidate (buffer-substring (point-at-bol) (point-at-eol)))) + (condition-case nil + (progn + (save-selected-window + (helm-grep-action candidate 'other-window) + (recenter)) + (forward-line arg)) + (error nil)))) + +;;;###autoload +(defun helm-grep-mode-jump-other-window-forward () + (interactive) + (helm-grep-mode-jump-other-window-1 1)) + +;;;###autoload +(defun helm-grep-mode-jump-other-window-backward () + (interactive) + (helm-grep-mode-jump-other-window-1 -1)) + +;;;###autoload +(defun helm-grep-mode-jump-other-window () + (interactive) + (let ((candidate (buffer-substring (point-at-bol) (point-at-eol)))) + (condition-case nil + (helm-grep-action candidate 'other-window) + (error nil)))) + + +;;; ack-grep types +;; +;; +(defun helm-grep-hack-types () + "Return a list of known ack-grep types." + (with-temp-buffer + ;; "--help-types" works with both 1.96 and 2.1+, while + ;; "--help types" works only with 1.96 Issue #422 + (call-process helm-ack-grep-executable nil t nil "--help-types") + (goto-char (point-min)) + (cl-loop while (re-search-forward + "^ *--\\(\\[no\\]\\)\\([^. ]+\\) *\\(.*\\)" nil t) + collect (cons (concat (match-string 2) + " [" (match-string 3) "]") + (match-string 2)) + collect (cons (concat "no" (match-string 2) + " [" (match-string 3) "]") + (concat "no" (match-string 2)))))) + +(defun helm-grep-ack-types-transformer (candidates _source) + (cl-loop for i in candidates + if (stringp i) + collect (rassoc i helm-grep-ack-types-cache) + else + collect i)) + +(defvar helm-grep-ack-types-cache nil) +(defun helm-grep-read-ack-type () + "Select types for the '--type' argument of ack-grep." + (require 'helm-mode) + (require 'helm-adaptive) + (setq helm-grep-ack-types-cache (helm-grep-hack-types)) + (let ((types (helm-comp-read + "Types: " helm-grep-ack-types-cache + :name "*Ack-grep types*" + :marked-candidates t + :must-match t + :fc-transformer '(helm-adaptive-sort + helm-grep-ack-types-transformer) + :buffer "*helm ack-types*"))) + (mapconcat #'(lambda (type) (concat "--type=" type)) types " "))) + + +;;; grep extensions +;; +;; +(defun helm-grep-guess-extensions (files) + "Try to guess file extensions in FILES list when using grep recurse. +These extensions will be added to command line with --include arg of grep." + (cl-loop with ext-list = (list helm-grep-preferred-ext "*") + with lst = (if (file-directory-p (car files)) + (directory-files + (car files) nil + directory-files-no-dot-files-regexp) + files) + for i in lst + for ext = (file-name-extension i 'dot) + for glob = (and ext (not (string= ext "")) + (concat "*" ext)) + unless (or (not glob) + (and glob-list (member glob glob-list)) + (and glob-list (member glob ext-list)) + (and glob-list (member glob grep-find-ignored-files))) + collect glob into glob-list + finally return (delq nil (append ext-list glob-list)))) + +(defun helm-grep-get-file-extensions (files) + "Try to return a list of file extensions to pass to '--include' arg of grep." + (let* ((all-exts (helm-grep-guess-extensions + (mapcar 'expand-file-name files))) + (extensions (helm-comp-read "Search Only in: " all-exts + :marked-candidates t + :fc-transformer 'helm-adaptive-sort + :buffer "*helm grep exts*" + :name "*helm grep extensions*"))) + (when (listp extensions) ; Otherwise it is empty string returned by C-RET. + ;; If extensions is a list of one string containing spaces, + ;; assume user entered more than one glob separated by space(s) and + ;; split this string to pass it later to mapconcat. + ;; e.g '("*.el *.py") + (cl-loop for i in extensions + append (split-string-and-unquote i " "))))) + + +;;; Set up source +;; +;; +(defvar helm-source-grep nil) +(defun helm-do-grep-1 (targets &optional recurse zgrep exts) + "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. +e.g *.el *.py *.tex. +If you are using ack-grep, you will be prompted for --type +instead. +If prompt is empty '--exclude `grep-find-ignored-files' is used instead. +ZGREP when non--nil use zgrep instead, without prompting for a choice +in recurse, search being made on `helm-zgrep-file-extension-regexp'." + (when (and (helm-grep-use-ack-p) + helm-ff-default-directory + (file-remote-p helm-ff-default-directory)) + (error "Error: Remote operation not supported with ack-grep.")) + (let* ((exts (and recurse + ;; [FIXME] I could handle this from helm-walk-directory. + (not 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 (and exts + (mapconcat #'(lambda (x) + (concat "--include=" + (shell-quote-argument x))) + (if (> (length exts) 1) + (remove "*" exts) + exts) " "))) + (types (and (not include-files) + (not zgrep) + recurse + (helm-grep-use-ack-p :where 'recursive) + ;; When %e format spec is not specified + ;; ignore types and do not prompt for choice. + (string-match "%e" helm-grep-default-command) + (helm-grep-read-ack-type))) + (follow (and helm-follow-mode-persistent + (assoc-default 'follow helm-source-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) + (kill-buffer helm-action-buffer)) + ;; If `helm-find-files' haven't already started, + ;; give a default value to `helm-ff-default-directory'. + (unless helm-ff-default-directory + (setq helm-ff-default-directory default-directory)) + ;; 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-grep-last-targets targets + 'helm-grep-include-files (or include-files types) + 'helm-grep-in-recurse recurse + 'helm-grep-use-zgrep zgrep + 'helm-grep-last-default-directory helm-ff-default-directory + 'helm-grep-default-command + (cond (zgrep helm-default-zgrep-command) + (recurse helm-grep-default-recurse-command) + ;; When resuming the local value of + ;; `helm-grep-default-command' is used, only git-grep + ;; should need this. + (t helm-grep-default-command))) + ;; Setup the source. + (setq helm-source-grep + `((name . ,(if zgrep "Zgrep" (capitalize (if recurse + (helm-grep-command t) + (helm-grep-command))))) + (header-name . (lambda (name) + (concat name "(C-c ? Help)"))) + (candidates-process . helm-grep-collect-candidates) + (filter-one-by-one . helm-grep-filter-one-by-one) + (candidate-number-limit . 9999) + (no-matchplugin) + (nohighlight) + (mode-line . helm-grep-mode-line-string) + ;; We need to specify keymap here and as :keymap arg [1] + ;; to make it available in further resuming. + (keymap . ,helm-grep-map) + (history . ,'helm-grep-history) + (action . ,(delq + nil + `(("Find File" . helm-grep-action) + ("Find file other frame" . helm-grep-other-frame) + ,(and (locate-library "elscreen") + '("Find file in Elscreen" + . helm-grep-jump-elscreen)) + ("Save results in grep buffer" . helm-grep-save-results) + ("Find file other window" . helm-grep-other-window)))) + (persistent-action . helm-grep-persistent-action) + (persistent-help . "Jump to line (`C-u' Record in mark ring)") + (requires-pattern . 2))) + (and follow (helm-attrset 'follow follow helm-source-grep)) + (helm + :sources '(helm-source-grep) + :buffer (format "*helm %s*" (if zgrep "zgrep" (helm-grep-command recurse))) + :default-directory helm-ff-default-directory + :keymap helm-grep-map ; [1] + :history 'helm-grep-history + :truncate-lines t))) + + +;;; zgrep +;; +;; +(defun helm-ff-zgrep-1 (flist recursive) + (unwind-protect + (let* ((def-dir (or helm-ff-default-directory + default-directory)) + (only (if recursive + (or (gethash def-dir helm-rzgrep-cache) + (puthash + def-dir + (helm-walk-directory + def-dir + :directories nil + :path 'full + :match helm-zgrep-file-extension-regexp) + helm-rzgrep-cache)) + flist))) + (helm-do-grep-1 only recursive 'zgrep)) + (setq helm-zgrep-recurse-flag nil))) + + +;;; transformers +;; +;; +(defun helm-grep-split-line (line) + "Split a grep output line." + ;; The output of grep may send a truncated line in this chunk, + ;; so don't split until grep line is valid, that is + ;; once the second part of the line comes with next chunk + ;; send by process. + (when (string-match helm-grep-split-line-regexp line) + ;; Don't use split-string because buffer/file name or string + ;; may contain a ":". + (cl-loop for n from 1 to 3 collect (match-string n line)))) + +(defun helm-grep--filter-candidate-1 (candidate &optional dir) + (let* ((root (or dir (and helm-grep-default-directory-fn + (funcall helm-grep-default-directory-fn)))) + (split (helm-grep-split-line candidate)) + (fname (if (and root split) + (expand-file-name (car split) root) + (car-safe split))) + (lineno (nth 1 split)) + (str (nth 2 split))) + (when (and fname lineno str) + (cons (concat (propertize (file-name-nondirectory fname) + 'face 'helm-grep-file + 'help-echo fname) ":" + (propertize lineno 'face 'helm-grep-lineno) ":" + (helm-grep-highlight-match str)) + candidate)))) + +(defun helm-grep-filter-one-by-one (candidate) + "`filter-one-by-one' transformer function for `helm-do-grep'." + (let ((helm-grep-default-directory-fn + (or helm-grep-default-directory-fn + (lambda () (or helm-ff-default-directory + helm-default-directory + default-directory))))) + (helm-grep--filter-candidate-1 candidate))) + +(defun helm-grep-highlight-match (str &optional multi-match) + "Highlight in string STR all occurences matching `helm-pattern'." + (require 'helm-match-plugin) + (let (beg end) + (condition-case nil + (with-temp-buffer + (insert str) + (goto-char (point-min)) + (cl-loop for reg in (if multi-match + (cl-loop for r in (helm-mp-split-pattern + helm-pattern) + unless (string-match "\\`!" r) + collect r) + (list helm-pattern)) + do + (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))) + do (goto-char (point-min))) + (buffer-string)) + (error nil)))) + + +;;; Grep from buffer list +;; +;; +(defun helm-grep-buffers-1 (candidate &optional zgrep) + "Run grep on all file--buffers or CANDIDATE if it is a file--buffer. +If one of selected buffers is not a file--buffer, +it is ignored and grep will run on all others file--buffers. +If only one candidate is selected and it is not a file--buffer, +switch to this buffer and run `helm-occur'. +If a prefix arg is given run grep on all buffers ignoring non--file-buffers." + (let* ((prefarg (or current-prefix-arg helm-current-prefix-arg)) + (helm-ff-default-directory + (if (and helm-ff-default-directory + (file-remote-p helm-ff-default-directory)) + default-directory + helm-ff-default-directory)) + (cands (if prefarg + (buffer-list) + (helm-marked-candidates))) + (win-conf (current-window-configuration)) + ;; Non--fname and remote buffers are ignored. + (bufs (cl-loop for buf in cands + for fname = (buffer-file-name (get-buffer buf)) + when (and fname (not (file-remote-p fname))) + collect (expand-file-name fname)))) + (if bufs + (if zgrep + (helm-do-grep-1 bufs nil 'zgrep) + (helm-do-grep-1 bufs)) + ;; bufs is empty, thats mean we have only CANDIDATE + ;; and it is not a buffer-filename, fallback to occur. + (helm-switch-to-buffer candidate) + (when (get-buffer helm-action-buffer) + (kill-buffer helm-action-buffer)) + (helm-occur) + (when (eq helm-exit-status 1) + (set-window-configuration win-conf))))) + +(defun helm-grep-buffers (candidate) + "Action to grep buffers." + (helm-grep-buffers-1 candidate)) + +(defun helm-zgrep-buffers (candidate) + "Action to zgrep buffers." + (helm-grep-buffers-1 candidate 'zgrep)) + + +;;; Helm interface for pdfgrep +;; pdfgrep program +;; and a pdf-reader (e.g xpdf) are needed. +;; +(defvar helm-pdfgrep-default-function 'helm-pdfgrep-init) +(defun helm-pdfgrep-init (only-files) + "Start an asynchronous pdfgrep process in ONLY-FILES list." + (let* ((default-directory (or helm-ff-default-directory + default-directory)) + (fnargs (helm-grep-prepare-candidates + (if (file-remote-p default-directory) + (mapcar #'(lambda (x) + (file-remote-p x 'localname)) + only-files) + only-files))) + (cmd-line (format helm-pdfgrep-default-command + helm-pattern + fnargs)) + process-connection-type) + ;; Start pdf grep process. + (helm-log "Starting Pdf Grep process in directory `%s'" default-directory) + (helm-log "Command line used was:\n\n%s" + (concat ">>> " (propertize cmd-line 'face 'helm-grep-cmd-line) "\n\n")) + (prog1 + (start-file-process-shell-command + "pdfgrep" helm-buffer cmd-line) + (message nil) + (set-process-sentinel + (get-buffer-process helm-buffer) + #'(lambda (_process event) + (if (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 "[Pdfgrep Process Finish - %s result(s)] " + (max (1- (count-lines + (point-min) (point-max))) 0)) + 'face 'helm-grep-finish)))) + (force-mode-line-update)) + (helm-log "Error: Pdf grep %s" + (replace-regexp-in-string "\n" "" event)))))))) + +(defun helm-do-pdfgrep-1 (only) + "Launch pdfgrep with a list of ONLY files." + (unless (executable-find "pdfgrep") + (error "Error: No such program `pdfgrep'.")) + (let* (helm-grep-in-recurse) ; recursion is never used in pdfgrep. + ;; When called as action from an other source e.g *-find-files + ;; we have to kill action buffer. + (when (get-buffer helm-action-buffer) + (kill-buffer helm-action-buffer)) + (setq helm-pdfgrep-targets only) + (helm + :sources + `(((name . "PdfGrep") + (init . (lambda () + ;; If `helm-find-files' haven't already started, + ;; give a default value to `helm-ff-default-directory'. + (setq helm-ff-default-directory (or helm-ff-default-directory + default-directory)))) + (candidates-process + . (lambda () + (funcall helm-pdfgrep-default-function helm-pdfgrep-targets))) + (filter-one-by-one . helm-grep-filter-one-by-one) + (candidate-number-limit . 9999) + (no-matchplugin) + (nohighlight) + (history . ,'helm-grep-history) + (keymap . ,helm-pdfgrep-map) + (mode-line . helm-pdfgrep-mode-line-string) + (action . helm-pdfgrep-action) + (persistent-help . "Jump to PDF Page") + (requires-pattern . 2))) + :buffer "*helm pdfgrep*" + :history 'helm-grep-history))) + +(defun helm-pdfgrep-action (candidate) + (helm-grep-action candidate 'pdf)) + +(defun helm-pdfgrep-action-1 (_split pageno fname) + (save-selected-window + (start-file-process-shell-command + "pdf-reader" nil + (format-spec helm-pdfgrep-default-read-command + (list (cons ?f fname) (cons ?p pageno)))))) + +;;;###autoload +(defun helm-do-grep () + "Preconfigured helm for grep. +Contrarily to Emacs `grep', no default directory is given, but +the full path of candidates in ONLY. +That allow to grep different files not only in `default-directory' but anywhere +by marking them (C-). If one or more directory is selected +grep will search in all files of these directories. +You can also use wildcard in the base name of candidate. +If a prefix arg is given use the -r option of grep (recurse). +The prefix arg can be passed before or after start file selection. +See also `helm-do-grep-1'." + (interactive) + (require 'helm-mode) + (let* ((preselection (or (dired-get-filename nil t) + (buffer-file-name (current-buffer)))) + (only (helm-read-file-name + "Search in file(s): " + :marked-candidates t + :preselect (and helm-do-grep-preselect-candidate + (if helm-ff-transformer-show-only-basename + (helm-basename preselection) + preselection)))) + (prefarg (or current-prefix-arg helm-current-prefix-arg))) + (helm-do-grep-1 only prefarg))) + +;;;###autoload +(defun helm-do-zgrep () + "Preconfigured helm for zgrep." + (interactive) + (require 'helm-mode) + (let* ((prefarg (or current-prefix-arg helm-current-prefix-arg)) + (preselection (or (dired-get-filename nil t) + (buffer-file-name (current-buffer)))) + (ls (helm-read-file-name + "Search in file(s): " + :marked-candidates t + :preselect (and helm-do-grep-preselect-candidate + (if helm-ff-transformer-show-only-basename + (helm-basename preselection) + preselection))))) + (helm-ff-zgrep-1 ls prefarg))) + +;;;###autoload +(defun helm-do-pdfgrep () + "Preconfigured helm for pdfgrep." + (interactive) + (require 'helm-mode) + (let* ((preselection (or (dired-get-filename nil t) + (buffer-file-name (current-buffer)))) + (only (helm-read-file-name + "Search in file(s): " + :marked-candidates t + :test #'(lambda (file) + (or (string= (file-name-extension file) "pdf") + (string= (file-name-extension file) "PDF") + (file-directory-p file))) + :preselect (and helm-do-grep-preselect-candidate + (if helm-ff-transformer-show-only-basename + (helm-basename preselection) + preselection)))) + (helm-grep-default-function 'helm-pdfgrep-init)) + (helm-do-pdfgrep-1 only))) + + +(provide 'helm-grep) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions obsolete) +;; coding: utf-8 +;; indent-tabs-mode: nil +;; End: + +;;; helm-grep.el ends here diff --git a/elpa/helm-20140808.2300/helm-grep.elc b/elpa/helm-20140808.2300/helm-grep.elc new file mode 100644 index 0000000000000000000000000000000000000000..5ff4fa9b0a2890d8cc7b2953a430041dd3e0ee94 GIT binary patch literal 39378 zcmeHwiF*^*)xHdg1I~lHq)qqqS_EuU#+gM6IBjBM454K!CfyKuEK6fsMV1svhB*ED z``dr-d(OSHNF(ErHtqL3Us^0_=FVNtJ^MNL%*WgJw|-J8l@>n!_+zuxKN@tpaog;j zn4{)+1OG#{csTk9eSEYQA2nN}wf0AGchLOkFzz0Ce89iq-&hMH-`7hA!+5Y3ccq(7&usG< z^Ade@Flbm=i`D|U_o_2KG|evNG8lJ`I$t-(XfRq^keg2rJ0l(ccodIJ`=r-A>a(NRnFATr&{5Bs$9{``B&N2wXd^%jVsEu&(FWc(QW%$DDBxc(>~qb8rE9F z=ry#jB~Y};!kcvrRY!;Q1Z3Hp=(Em7$^5f7(Ph2f0RP!2x#82>xV%~7&0F$!tGLN+ zxw$QW?_`_!^|E<3jK4hY3}e&kdfm>RA-gl=ZSu_<#s~3N1M`YkJh|8FbPYJn@o3yX z^4f8$+Z@K;!LWa9pO9zEciF=*?l#9@TbqMHx6@L_XUKCf(6Bk|fLrbNhvqX3xmGso z+Q~%E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VPfgC4vffOKiO?dE>LNk*d?ffvp2kLct2_Zq{NR7DV@hc}bRb0vo zIAEZG2_$9i@(h4!@pxMxsobBxc@#fv_hmXvihno-F3*@Sm zI^TZj%sAvQaHl2ZiEMCfVGAX}5OD3ln*oDq`>5F(nO)w(QF*x0ElAVcN_siO|8N~9 z%@~L8QAvb>A?UD&^uHwT5J}Lb$Y2UCVvF#mpw^=^%J`abyb2AkF{B~sUSlSubIh*W z$Al5FP!W3Qoyhys7Lb)j!<9Y`jDKVhod504Psq~dp9D>ArKCGD3YVa7PD|T#e>7_ zG(I?;(}(CT4DnICD*4M<_YdG}Q1hSJrr1oa(nu$nU?1Foe3=wMYF$w%)v~s*6C4Z6jcShxfGV9k^StkevYKf(y8!dw>ExGDtzLF8{T*l|{ z4mF&AfrsUC>Fq1xKB}!svH$ux4dW$dwwoo)9QCTDhE5{GGJzNmFVMxS^pHG?YN62Y z5koT0mvIKaOWr5XRDJG!Tk6pgoYEgf?0DJ%B0v?M!+U%JE4#MI#fPm-%<72UuwAy)+9@#dikH*TX`9J*24lem^ck;q!)1?(siJY1idEjCJ{camAu#Rlr literal 0 HcmV?d00001 diff --git a/elpa/helm-20140808.2300/helm-help.el b/elpa/helm-20140808.2300/helm-help.el new file mode 100644 index 000000000..8c0d0ec2e --- /dev/null +++ b/elpa/helm-20140808.2300/helm-help.el @@ -0,0 +1,1487 @@ +;;; helm-help.el --- Help messages for Helm. -*- lexical-binding: t -*- + +;; Copyright (C) 2012 ~ 2014 Thierry Volpiatto + +;; 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 . + +;;; Code: +(require 'helm) + +(defgroup helm-help nil + "Embedded help for `helm'." + :group 'helm) + +(defface helm-helper + '((t :inherit helm-header)) + "Face for helm help string in minibuffer." + :group 'helm-help) + + +;;; Global help message - Used by `helm-help' +;; +;; +(defvar helm-help-message + (lambda () + (concat + "\\" + "`helm' is an Emacs incremental completion and selection narrowing framework. + +Narrow the list by typing some pattern, +Multiple patterns are allowed by splitting by space. +Select with natural Emacs operations, choose with RET. + +== Help == +C-h m : Run this generic help for helm. +C-c ? : Run specific helm help for current source. + +== Basic Operations == +C-p, Up: Previous Line +C-n, Down : Next Line +M-v, PageUp : Previous Page +C-v, PageDown : Next Page +Enter : Execute first (default) action / Select +M-< : First Line +M-> : Last Line +M-PageUp, C-M-S-v, C-M-y : Previous Page (other-window) +M-PageDown, C-M-v : Next Page (other-window) + +Tab, C-i : Show action list +Left : Previous Source +Right, C-o : Next Source +C-k : Delete pattern (with prefix arg delete from point to end) +C-j or C-z: Persistent Action (Execute action with helm session kept) + +== Shortcuts For nth Action == + +f1-12: Execute nth 1 to 12 Action(s). + +== Visible Marks == +Visible marks store candidate. Some actions uses marked candidates. + +\\[helm-toggle-visible-mark] : Toggle Visible Mark +\\[helm-prev-visible-mark] : Previous Mark +\\[helm-next-visible-mark] : Next Mark + +== Miscellaneous Commands == +\\[helm-toggle-resplit-window] : Toggle vertical/horizontal split helm window. +\\[helm-quit-and-find-file] : Drop into `find-file'. +\\[helm-delete-current-selection] : Delete selected item (visually). +\\[helm-kill-selection-and-quit] : Kill display value of candidate and quit (with prefix arg kill the real value). +\\[helm-yank-selection] : Yank selection into pattern. +\\[helm-follow-mode] : Toggle automatical execution of persistent action. +\\[helm-follow-action-forward] : Run persistent action and goto next line. +\\[helm-follow-action-backward] : Run persistent action and goto previous line. +\\[helm-force-update] : Recalculate and redisplay candidates. + +== Global Commands == +\\\\[helm-resume] revives last `helm' session. +It is very useful, so you should bind any key.")) + "Detailed help message string for `helm'. +It also accepts function or variable symbol.") + +(defun helm-help-internal (bufname insert-content-fn) + "Show long message during `helm' session in BUFNAME. +INSERT-CONTENT-FN is the function that insert +text to be displayed in BUFNAME." + (let ((winconf (current-frame-configuration))) + (unwind-protect + (progn + (setq helm-suspend-update-flag t) + (switch-to-buffer (get-buffer-create bufname)) + (delete-other-windows) + (erase-buffer) + (funcall insert-content-fn) + (setq cursor-type nil) + (goto-char 1) + (helm-help-event-loop)) + (setq helm-suspend-update-flag nil) + (set-frame-configuration winconf)))) + +(defun helm-help-event-loop () + (let ((prompt (propertize + "[SPC,C-v,down:NextPage b,M-v,up:PrevPage C-s/r:Isearch Other:Exit]" + 'face 'helm-helper)) + (scroll-error-top-bottom t)) + (condition-case _err + (cl-loop for event = (read-key prompt) do + (cl-case event + ((?\C-v ? down) (scroll-up-command helm-scroll-amount)) + ((?\M-v ?b up) (scroll-down-command helm-scroll-amount)) + ((?\C-s) (isearch-forward)) + ((?\C-r) (isearch-backward)) + (t (cl-return)))) + (beginning-of-buffer (message "Beginning of buffer")) + (end-of-buffer (message "End of Buffer"))))) + +;;;###autoload +(defun helm-help () + "Help of `helm'." + (interactive) + (save-selected-window + (helm-help-internal + " *Helm Help*" + (lambda () + (insert (substitute-command-keys + (helm-interpret-value (or (assoc-default + 'help-message + (helm-get-current-source)) + helm-help-message)))))))) + +;;; `helm-buffer-list' help +;; +;; +(defvar helm-buffer-help-message + "== Helm Buffer == +\nTips: + +Completion: + +- Major-mode: + +You can enter a partial name of major-mode (e.g lisp, sh) to narrow down buffers. +To specify the major-mode, prefix it with \"*\" e.g \"*lisp\". +If you want to match all buffers but the ones with a specific major-mode (negation), +prefix the major-mode with \"!\" e.g \"*!lisp\". +If you want to specify more than one major-mode, separate them with \",\", +e.g \"*!lisp,!sh,!fun\" will list all buffers but the ones in lisp-mode, sh-mode and +fundamental-mode. + +Enter then a space and a pattern to narrow down to buffers matching this pattern. + +- Search inside buffers: + +If you enter a space and a pattern prefixed by \"@\" helm will search for text matching +this pattern INSIDE the buffer (i.e not in the name of buffer). +NOTE that if you enter your pattern prefixed with \"@\" but escaped, helm will search a buffer +matching \"@pattern\" but will not search inside. + +- Search by directory name: + +If you prefix the beginning of pattern with \"/\" the match will occur on directory name +of buffer, it is interesting to narrow down to one directory for example, subsequent string +entered after a space will match on buffer-name only. +Note that negation is not supported for matching on buffer-file-name. +You can't cumulate both major-mode matching AND directory matching, choose one or the other. + +- Fuzzy matching: + +Note that if `helm-buffers-fuzzy-matching' is non--nil you will have +fuzzy matching on buffer names (not on directory name matching and major-mode though). +A pattern starting with \"^\" will disable fuzzy matching and will match by exact regexp. + +- Examples: + +if I enter in pattern prompt: +\"*lisp ^helm @moc\" +helm will narrow down the list by selecting only buffers that are in lisp mode, start by helm +and match \"moc\" in their contents. + +if I enter in pattern prompt: +\"*lisp ^helm moc\" +Notice there is no \"@\" this time +helm will look for lisp mode buffers starting by \"helm\" and have \"moc\" in their name. + +if I enter in pattern prompt: +\"*!lisp !helm\" +helm will narrow down to buffers that are not in \"lisp\" mode and that do not match \"helm\" + +if I enter in pattern prompt: +/helm/ w3 +helm will narrow down to buffers that are in any \"helm\" subdirectory and matching w3. + + +- Creating buffers + +When creating a new buffer use \\[universal-argument] to choose a mode for your buffer in a list. +This list is customizable, see `helm-buffers-favorite-modes'. + +- Killing buffers + +You have a command to kill buffer(s) and quit emacs and a command to kill buffers one by one +\(no marked\) without quitting helm. +You can run this persistent kill buffer command either with the regular +`helm-execute-persistent-action' called with a prefix arg (C-u C-j) or with its specific command +`helm-buffer-run-kill-persistent' see binding below. + +- Meaning of colors and prefixes for buffers: + +Remote buffers are prefixed with '@'. +Red => Buffer have its file modified on disk by an external process. +Indianred2 => Buffer exists but its file have been deleted. +Orange => Buffer is modified and its file not saved to disk. +Italic => A non--file buffer. + +\nSpecific commands for `helm-buffers-list': +\\ +\\[helm-buffer-run-zgrep]\t\t->Grep Buffer(s) works as zgrep too (C-u grep all buffers but non--file buffers). +\\[helm-buffers-run-multi-occur]\t\t->Multi Occur buffer or marked buffers. (C-u toggle force searching current-buffer). +\\[helm-buffer-switch-other-window]\t\t->Switch other window. +\\[helm-buffer-switch-other-frame]\t\t->Switch other frame. +\\[helm-buffer-run-query-replace-regexp]\t\t->Query replace regexp in marked buffers. +\\[helm-buffer-run-query-replace]\t\t->Query replace in marked buffers. +\\[helm-buffer-run-ediff]\t\t->Ediff current buffer with candidate. If two marked buffers ediff those buffers. +\\[helm-buffer-run-ediff-merge]\t\t->Ediff merge current buffer with candidate. If two marked buffers ediff merge those buffers. +\\[helm-buffer-diff-persistent]\t\t->Toggle Diff buffer with saved file without quitting. +\\[helm-buffer-revert-persistent]\t\t->Revert buffer without quitting. +\\[helm-buffer-save-persistent]\t\t->Save buffer without quitting. +\\[helm-buffer-run-kill-buffers]\t\t->Delete marked buffers and quit. +\\[helm-buffer-run-kill-persistent]\t\t->Delete buffer without quitting helm. +\\[helm-toggle-all-marks]\t\t->Toggle all marks. +\\[helm-mark-all]\t\t->Mark all. +\\[helm-toggle-buffers-details]\t\t->Toggle details. +\\[helm-buffers-toggle-show-hidden-buffers]\t\t->Show hidden buffers. +\\[helm-buffers-mark-similar-buffers]\t\t->Mark all buffers with same type (color) than current. +\\[helm-buffer-help]\t\t->Display this help. +\n== Helm Map == +\\{helm-map}") + +;;;###autoload +(defun helm-buffer-help () + "Help command for helm buffers." + (interactive) + (let ((helm-help-message helm-buffer-help-message)) + (helm-help))) + +;;; Find files help (`helm-find-files') +;; +;; +(defvar helm-ff-help-message + "== Helm Find Files == +\nTips: +\n- Enter `~/' at end of pattern to quickly reach home directory. + +- Enter `/' at end of pattern to quickly reach root of your file system. + +- Enter `./' at end of pattern to quickly reach `default-directory' (initial start of session). + If you are in `default-directory' move cursor on top. + +- Enter `../' at end of pattern will reach upper directory, moving cursor on top. + NOTE: This different to using `C-l' in that `C-l' don't move cursor on top but stay on previous + subdir name. + +- You can complete with partial basename (start on third char entered) + + e.g \"fob\" or \"fbr\" will complete \"foobar\" + but \"fb\" will wait for a third char for completing. + +- Use `C-u C-j' to watch an image. + +- `C-j' on a filename will expand in helm-buffer to this filename. + Second hit on `C-j' will display buffer filename. + Third hit on `C-j' will kill buffer filename. + NOTE: `C-u C-j' will display buffer directly. + +- To browse images directories turn on `helm-follow-mode' and navigate with arrow keys. + You can also use `helm-follow-action-forward' and `helm-follow-action-backward' + (`C-'). + +- You can turn off/on (toggle) autoupdate completion at any moment with `C-DEL'. + NOTE: On a terminal C- may not work, use in this case C-c . + +- You can create a new directory and a new file at the same time, just write the path in prompt + and press `'. + e.g You can create \"~/new/newnew/newnewnew/my_newfile.txt\". + +- To create a new directory, add a \"/\" at end of new name and press . + +- To create a new file just write the filename not ending with \"/\". + +- You can start a recursive search with Locate of 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. + +\nSpecific commands for `helm-find-files': +\\ +\\[helm-ff-run-locate]\t\t->Run Locate (C-u to specify locate db, M-n insert basename of candidate) +\\[helm-ff-run-find-sh-command]\t\t->Run Find shell command from this directory. +\\[helm-ff-run-grep]\t\t->Run Grep (C-u Recursive). +\\[helm-ff-run-pdfgrep]\t\t->Run Pdfgrep on marked files. +\\[helm-ff-run-zgrep]\t\t->Run zgrep (C-u Recursive). +\\[helm-ff-run-etags]\t\t->Run Etags (C-u use thing-at-point `C-u C-u' reload cache) +\\[helm-ff-run-rename-file]\t\t->Rename File (C-u Follow). +\\[helm-ff-run-query-replace-on-marked]\t\t->Query replace on marked files. +\\[helm-ff-run-copy-file]\t\t->Copy File (C-u Follow). +\\[helm-ff-run-byte-compile-file]\t\t->Byte Compile File (C-u Load). +\\[helm-ff-run-load-file]\t\t->Load File. +\\[helm-ff-run-symlink-file]\t\t->Symlink File. +\\[helm-ff-run-hardlink-file]\t\t->Hardlink file. +\\[helm-ff-run-delete-file]\t\t->Delete File. +\\[helm-ff-run-kill-buffer-persistent]\t\t->Kill buffer candidate without quitting. +\\[helm-ff-persistent-delete]\t\t->Delete file without quitting. +\\[helm-ff-run-switch-to-eshell]\t\t->Switch to Eshell. +\\[helm-ff-run-eshell-command-on-file]\t\t->Eshell command on file (C-u Apply on marked files, otherwise treat them sequentially). +\\[helm-ff-run-ediff-file]\t\t->Ediff file. +\\[helm-ff-run-ediff-merge-file]\t\t->Ediff merge file. +\\[helm-ff-run-complete-fn-at-point]\t\t->Complete file name at point. +\\[helm-ff-run-switch-other-window]\t\t->Switch other window. +\\[helm-ff-run-switch-other-frame]\t\t->Switch other frame. +\\[helm-ff-run-open-file-externally]\t\t->Open file with external program (C-u to choose). +\\[helm-ff-run-open-file-with-default-tool]\t\t->Open file externally with default tool. +\\[helm-ff-rotate-left-persistent]\t\t->Rotate Image Left. +\\[helm-ff-rotate-right-persistent]\t\t->Rotate Image Right. +\\[helm-find-files-up-one-level]\t\t->Go down precedent directory. +\\[helm-ff-run-switch-to-history]\t\t->Switch to last visited directories history. +\\[helm-ff-file-name-history]\t\t->Switch to file name history. +\\[helm-ff-properties-persistent]\t\t->Show file properties in a tooltip. +\\[helm-mark-all]\t\t->Mark all visibles candidates. +\\[helm-ff-run-toggle-auto-update]\t\t->Toggle auto expansion of directories. +\\[helm-unmark-all]\t\t->Unmark all candidates, visibles and invisibles. +\\[helm-ff-run-gnus-attach-files]\t\t->Gnus attach files to message buffer. +\\[helm-ff-run-print-file]\t\t->Print file, (C-u to refresh printers list). +\\[helm-enlarge-window]\t\t->Enlarge helm window. +\\[helm-narrow-window]\t\t->Narrow helm window. +\\[helm-ff-run-toggle-basename]\t\t->Toggle basename/fullpath. +\\[helm-ff-run-find-file-as-root]\t\t->Find file as root. +\\[helm-ff-run-insert-org-link]\t\t->Insert org link. +\\[helm-ff-help]\t\t->Display this help info. +\n== Helm Map == +\\{helm-map}") + +;;;###autoload +(defun helm-ff-help () + "Help command for `helm-find-files'." + (interactive) + (let ((helm-help-message helm-ff-help-message)) + (helm-help))) + +;;; Help for `helm-read-file-name' +;; +;; +(defvar helm-read-file-name-help-message + "== Helm read file name ==\ +\nTips: +\n- Enter `~/' at end of pattern to quickly reach home directory. + +- Enter `/' at end of pattern to quickly reach root of your file system. + +- Enter `./' at end of pattern to quickly reach `default-directory' (initial start of session). + If you are in `default-directory' move cursor on top. + +- Enter `../' at end of pattern will reach upper directory, moving cursor on top. + NOTE: This different to using `C-l' in that `C-l' don't move cursor on top but stay on previous + subdir name. + +- You can complete with partial basename (start on third char entered) + + e.g \"fob\" or \"fbr\" will complete \"foobar\" + but \"fb\" will wait for a third char for completing. + +Persistent actions: + +By default `helm-read-file-name' use the persistent actions of `helm-find-files'. + +- Use `C-u C-j' to watch an image. + +- `C-j' on a filename will expand in helm-buffer to this filename. + Second hit on `C-j' will display buffer filename. + Third hit on `C-j' will kill buffer filename. + NOTE: `C-u C-j' will display buffer directly. + +- To browse images directories turn on `helm-follow-mode' and navigate with arrow keys. + +- When you want to delete backward characters to e.g creating a new file or directory, + autoupdate may keep updating to an existent directory + preventing you to do so, in this case just hit C- and then . + This should not needed when copying/renaming files because autoupdate is disabled + by default in this case. + NOTE: On a terminal C- may not work, use in this case C-c . + +- You can create a new directory and a new file at the same time, just write the path in prompt + and press . + e.g You can create \"~/new/newnew/newnewnew/my_newfile.txt\". + +- To create a new directory, add a \"/\" at end of new name and press . + +- To create a new file just write the filename not ending with \"/\". + +\nSpecific commands for helm-read-file-name: +\\ +\\[helm-find-files-up-one-level]\t\t->Go down precedent directory. +\\[helm-ff-run-toggle-auto-update]\t->Toggle auto expansion of directories. +\\[helm-ff-run-toggle-basename]\t\t->Toggle basename. +\\[helm-ff-file-name-history]\t\t->File name history. +\\[helm-cr-empty-string]\t->Maybe return empty string (unless `must-match'). +\\[helm-next-source]\t->Goto next source. +\\[helm-previous-source]\t->Goto previous source. +\\[helm-read-file-name-help]\t\t->Display this help info. +\n== Helm Map == +\\{helm-map}") + +;;;###autoload +(defun helm-read-file-name-help () + (interactive) + (let ((helm-help-message helm-read-file-name-help-message)) + (helm-help))) + +;;; Generic file help - Used by locate. +;; +;; +(defvar helm-generic-file-help-message + "== Helm Generic files Map ==\ + +\nLocate tips: +You can add after writing search pattern any of the locate command line options. +e.g -b, -e, -n ...etc. +See Man locate for more infos. + +Note: +Some other sources (at the moment recentf and file in current directory sources) +support the -b flag for compatibility with locate when they are used with it. + +\nSpecific commands for helm locate and others files sources: +\\ +\\[helm-ff-run-toggle-basename]\t\t->Toggle basename. +\\[helm-ff-run-grep]\t\t->Run grep (C-u recurse). +\\[helm-ff-run-pdfgrep]\t\t->Run Pdfgrep on marked files. +\\[helm-ff-run-delete-file]\t\t->Delete file. +\\[helm-ff-run-ediff-file]\t\t->Ediff file. +\\[helm-ff-run-ediff-merge-file]\t\t->Ediff merge file. +\\[helm-ff-run-switch-other-window]\t\t->Switch other window. +\\[helm-ff-properties-persistent]\t\t->Show file properties. +\\[helm-ff-run-etags]\t\t->Run etags (C-u use tap, C-u C-u reload DB). +\\[helm-yank-text-at-point]\t\t->Yank text at point. +\\[helm-ff-run-open-file-externally]\t\t->Open file with external program (C-u to choose). +\\[helm-ff-run-open-file-with-default-tool]\t\t->Open file externally with default tool. +\\[helm-ff-run-insert-org-link]\t\t->Insert org link. +\n== Helm Map == +\\{helm-map}") + +;;;###autoload +(defun helm-generic-file-help () + (interactive) + (let ((helm-help-message helm-generic-file-help-message)) + (helm-help))) + +;;; Grep help +;; +;; +(defvar helm-grep-help-message + "== Helm Grep Map ==\ +\nHelm Grep tips: +You can start grep with a prefix arg to recurse in subdirectories. +You can use wild card when selecting files (e.g *.el) +You can grep in many differents directories by marking files or wild cards. +You can save your results in a grep-mode buffer, see below. + +Grepping on remote file will work only with grep, not ack-grep, but it is +anyway bad supported as tramp doesn't support multiple process running in a +short delay (less than 5s actually), so I strongly advice hitting `C-!' (i.e +suspend process) before entering anything in pattern, and hit again `C-!' when +your regexp is ready to send to remote process. + +\nSpecific commands for Helm Grep: +\\ +\\[helm-goto-next-file]\t->Next File. +\\[helm-goto-precedent-file]\t\t->Precedent File. +\\[helm-yank-text-at-point]\t\t->Yank Text at point in minibuffer. +\\[helm-grep-run-other-window-action]\t\t->Jump other window. +\\[helm-grep-run-other-frame-action]\t\t->Jump other frame. +\\[helm-grep-run-persistent-action]\t\t->Run persistent action (Same as `C-j'). +\\[helm-grep-run-default-action]\t\t->Run default action (Same as RET). +\\[helm-grep-run-save-buffer]\t\t->Save to a `grep-mode' enabled buffer. +\\[helm-grep-help]\t\t->Show this help. +\n== Helm Map == +\\{helm-map}") + +;;;###autoload +(defun helm-grep-help () + (interactive) + (let ((helm-help-message helm-grep-help-message)) + (helm-help))) + +;;; Pdf grep help +;; +;; +(defvar helm-pdfgrep-help-message + "== Helm PdfGrep Map ==\ +\nSpecific commands for Pdf Grep: +\\ +\\[helm-goto-next-file]\t->Next File. +\\[helm-goto-precedent-file]\t\t->Precedent File. +\\[helm-yank-text-at-point]\t\t->Yank Text at point in minibuffer. +\\[helm-pdfgrep-help]\t\t->Show this help. +\n== Helm Map == +\\{helm-map}") + +;;;###autoload +(defun helm-pdfgrep-help () + (interactive) + (let ((helm-help-message helm-pdfgrep-help-message)) + (helm-help))) + +;;; Etags help +;; +;; +(defvar helm-etags-help-message + "== Helm Etags Map ==\ +\nSpecific commands for Etags: +\\ +\\[helm-goto-next-file]\t->Next File. +\\[helm-goto-precedent-file]\t\t->Precedent File. +\\[helm-yank-text-at-point]\t\t->Yank Text at point in minibuffer. +\\[helm-etags-help]\t\t->Show this help. +\n== Helm Map == +\\{helm-map}") + +;;;###autoload +(defun helm-etags-help () + "The help function for etags." + (interactive) + (let ((helm-help-message helm-etags-help-message)) + (helm-help))) + +;;; Ucs help +;; +;; +(defvar helm-ucs-help-message + "== Helm Ucs == +\nSpecific commands for `helm-ucs': +\\ +\\[helm-ucs-persistent-insert]\t->Insert char. +\\[helm-ucs-persistent-forward]\t->Forward char. +\\[helm-ucs-persistent-backward]\t->Backward char. +\\[helm-ucs-persistent-delete]\t->Delete char backward. +\\[helm-ucs-help]\t\t->Show this help. + +\n== Helm Map == +\\{helm-map}") + +;;;###autoload +(defun helm-ucs-help () + "Help command for `helm-ucs'." + (interactive) + (let ((helm-help-message helm-ucs-help-message)) + (helm-help))) + +;;; Bookmark help +;; +;; +(defvar helm-bookmark-help-message + "== Helm bookmark name Map ==\ +\nSpecific commands for bookmarks: +\\ +\\[helm-bookmark-run-jump-other-window]\t\t->Jump other window. +\\[helm-bookmark-run-delete]\t\t->Delete bookmark. +\\[helm-bookmark-run-edit]\t\t->Edit bookmark. +\\[helm-bmkext-run-sort-by-frequency]\t\t->Sort by frequency (only for bmkext). +\\[helm-bmkext-run-sort-by-last-visit]\t\t->Sort by last visited (only for bmkext). +\\[helm-bmkext-run-sort-alphabetically]\t\t->Sort alphabetically (only for bmkext). +\\[helm-bookmark-toggle-filename]\t\t->Toggle bookmark location visibility. +\\[helm-bookmark-help]\t\t->Run this help. +\n== Helm Map == +\\{helm-map}") + +;;;###autoload +(defun helm-bookmark-help () + "Help command for bookmarks." + (interactive) + (let ((helm-help-message helm-bookmark-help-message)) + (helm-help))) + +;;; Eshell command on file help +;; +;; +(defvar helm-esh-help-message + "== Helm eshell on file == +\nTips: + +- Passing extra args after filename: + +Normally your command or alias will be called with file as argument. + +e.g 'candidate_file' + +But you can also pass an argument or more after 'candidate_file' like this: + + %s [extra_args]\n + +'candidate_file' will be added at '%s' and your command will look at this: + + 'candidate_file' [extra_args] + +- Specify many files as args (marked files): + +e.g file1 file2 ... + +Call `helm-find-files-eshell-command-on-file' with one prefix-arg +Otherwise you can pass one prefix-arg from the command selection buffer. +NOTE: This is not working on remote files. + +With two prefix-arg before starting or from the command selection buffer +the output is printed to your `current-buffer'. + +Note that with no prefix-arg or a prefix-arg value of '(16) (C-u C-u) +the command is called once for each file like this: + + file1 file2 etc... + +\nSpecific commands for `helm-find-files-eshell-command-on-file': +\\ +\\[helm-esh-help]\t\t->Display this help. +\n== Helm Map == +\\{helm-map}") + +;;;###autoload +(defun helm-esh-help () + "Help command for `helm-find-files-eshell-command-on-file'." + (interactive) + (let ((helm-help-message helm-esh-help-message)) + (helm-help))) + +;;; Ido virtual buffer help +;; +;; +(defvar helm-buffers-ido-virtual-help-message + "== Helm ido virtual buffers Map ==\ +\nSpecific commands for ido virtuals buffers: +\\ +\\[helm-ff-run-switch-other-window]\t\t->Switch other window. +\\[helm-ff-run-switch-other-frame]\t\t->Switch other frame. +\\[helm-ff-run-grep]\t\t->Grep file. +\\[helm-ff-run-zgrep]\t\t->Zgrep file. +\\[helm-ff-run-delete-file]\t\t->Delete file. +\\[helm-ff-run-open-file-externally]\t\t->Open file externally. +\\[helm-buffers-ido-virtual-help]\t\t->Display this help. +\n== Helm Map == +\\{helm-map}") + +;;;###autoload +(defun helm-buffers-ido-virtual-help () + "Help command for ido virtual buffers." + (interactive) + (let ((helm-help-message helm-buffers-ido-virtual-help-message)) + (helm-help))) + +;;; Moccur help +;; +;; +(defvar helm-moccur-help-message + "== Helm Moccur Map ==\ +\nHelm Moccur tips: + +\nSpecific commands for Helm Moccur: +\\ +\\[helm-goto-next-file]\t->Next Buffer. +\\[helm-goto-precedent-file]\t\t->Precedent Buffer. +\\[helm-yank-text-at-point]\t\t->Yank Text at point in minibuffer. +\\[helm-moccur-run-goto-line-ow]\t\t->Goto line in other window. +\\[helm-moccur-run-goto-line-of]\t\t->Goto line in new frame. +\\[helm-moccur-help]\t\t->Show this help. +\n== Helm Map == +\\{helm-map}") + +;;;###autoload +(defun helm-moccur-help () + (interactive) + (let ((helm-help-message helm-moccur-help-message)) + (helm-help))) + +;;; Helm Top +;; +;; +(defvar helm-top-help-message + "== Helm Top Map ==\ +\nHelm Top tips: + +\nSpecific commands for Helm Top: +\\ +\\[helm-top-run-sort-by-com]\t->Sort by commands. +\\[helm-top-run-sort-by-cpu]\t->Sort by cpu usage. +\\[helm-top-run-sort-by-user]\t->Sort alphabetically by user. +\\[helm-top-run-sort-by-mem]\t->Sort by memory. +\n== Helm Map == +\\{helm-map}") + +;;;###autoload +(defun helm-top-help () + (interactive) + (let ((helm-help-message helm-top-help-message)) + (helm-help))) + +;;; Helm Apt +;; +;; +(defvar helm-apt-help-message + "== Helm Apt Map ==\ +\nHelm Apt tips: + +\nSpecific commands for Helm Apt: +\\ +\\[helm-apt-show-all]\t->Show all packages. +\\[helm-apt-show-only-installed]\t->Show installed packages only. +\\[helm-apt-show-only-not-installed]\t->Show not installed packages only. +\\[helm-apt-show-only-deinstalled]\t-Show deinstalled (not purged yet) packages only.> +\n== Helm Map == +\\{helm-map}") + +;;;###autoload +(defun helm-apt-help () + (interactive) + (let ((helm-help-message helm-apt-help-message)) + (helm-help))) + +;;; Helm elisp package +;; +;; +(defvar helm-el-package-help-message + "== Helm elisp package Map ==\ +\nHelm elisp package tips: + +\nSpecific commands for Helm elisp package: +\\ +\\[helm-el-package-show-all]\t->Show all packages. +\\[helm-el-package-show-installed]\t->Show installed packages only. +\\[helm-el-package-show-uninstalled]\t->Show not installed packages only. +\\[helm-el-package-help]\t->Show this help. +\n== Helm Map == +\\{helm-map}") + +;;;###autoload +(defun helm-el-package-help () + (interactive) + (let ((helm-help-message helm-el-package-help-message)) + (helm-help))) + +;;; Helm M-x +;; +;; +(defvar helm-M-x-help-message + "== Helm M-x ==\ +\nHelm M-x tips: + +You can get help on any command with persistent action (C-j). + +All the prefix args passed BEFORE running `helm-M-x' are ignored. +When you want to pass prefix args, pass them AFTER starting `helm-M-x', +you will have a prefix arg counter appearing in mode-line notifying you +the amount of prefix args entered. + +\nSpecific commands for Helm M-x: +\\ +\\[helm-M-x-help]\t\t->Show this help. +\n== Helm Map == +\\{helm-map}") + +;;;###autoload +(defun helm-M-x-help () + (interactive) + (let ((helm-help-message helm-M-x-help-message)) + (helm-help))) + +;;; helm-imenu +;; +;; +(defvar helm-imenu-help-message + "== Helm imenu ==\ +\nHelm imenu tips: + +\nSpecific commands for Helm imenu: +\\ +\\[helm-imenu-help]\t->Show this help. +\n== Helm Map == +\\{helm-map}") + +;;;###autoload +(defun helm-imenu-help () + (interactive) + (let ((helm-help-message helm-imenu-help-message)) + (helm-help))) + +;;; helm-colors +;; +;; +(defvar helm-colors-help-message + "== Helm colors ==\ +\nSpecific commands for Helm colors: +\\ +\\[helm-color-run-insert-name]\t\tInsert the entry'name. +\\[helm-color-run-kill-name]\t\tKill the entry's name. +\\[helm-color-run-insert-rgb]\t\tInsert entry in RGB format. +\\[helm-color-run-kill-rgb]\t\tKill entry in RGB format. +\\[helm-color-help]\t\tShow this help. +\n== Helm Map == +\\{helm-map}") + +;;;###autoload +(defun helm-color-help () + (interactive) + (let ((helm-help-message helm-colors-help-message)) + (helm-help))) + +;;; helm semantic +;; +;; +(defvar helm-semantic-help-message + "== Helm semantic ==\ +\nHelm semantic tips: + +\nSpecific commands for Helm semantic: +\\ +\\[helm-semantic-help]\t->Show this help. +\n== Helm Map == +\\{helm-map}") + +;;;###autoload +(defun helm-semantic-help () + (interactive) + (let ((helm-help-message helm-semantic-help-message)) + (helm-help))) + + +;;; Mode line strings +;; +;; +;;;###autoload +(defvar helm-buffer-mode-line-string + '("Buffer(s)" "\ +\\\ +\\[helm-buffer-help]:Help \ +\\\ +\\[helm-select-action]:Act \ +\\[helm-maybe-exit-minibuffer]/\ +f1/f2/f-n:NthAct" + "String displayed in mode-line in `helm-source-buffers-list'")) + +;;;###autoload +(defvar helm-color-mode-line-string + '("Colors" "\ +\\\ +\\[helm-color-help]:Help/\ +\\[helm-color-run-insert-name]:Insert name/\ +\\[helm-color-run-insert-rgb]:Insert RGB/\ +with shift: Kill")) + +;;;###autoload +(defvar helm-buffers-ido-virtual-mode-line-string + '("Killed Buffer(s)" "\ +\\\ +\\[helm-buffers-ido-virtual-help]:Help \ +\\\ +\\[helm-select-action]:Act \ +\\[helm-maybe-exit-minibuffer]/\ +f1/f2/f-n:NthAct" + "String displayed in mode-line in `helm-source-buffers-list'")) + +;;;###autoload +(defvar helm-ff-mode-line-string "\ +\\\ +\\[helm-ff-help]:Help \ +\\\ +\\[helm-select-action]:Act \ +\\[helm-maybe-exit-minibuffer]/\ +f1/f2/f-n:NthAct" + "String displayed in mode-line in `helm-source-find-files'") + +;;;###autoload +(defvar helm-read-file-name-mode-line-string "\ +\\\ +\\[helm-read-file-name-help]:Help \ +\\[helm-cr-empty-string]:Empty \ +\\\ +\\[helm-select-action]:Act \ +\\[helm-maybe-exit-minibuffer]/\ +f1/f2/f-n:NthAct" + "String displayed in mode-line in `helm-source-find-files'.") + +;;;###autoload +(defvar helm-generic-file-mode-line-string "\ +\\\ +\\[helm-generic-file-help]:Help \ +\\\ +\\[helm-select-action]:Act \ +\\[helm-maybe-exit-minibuffer]/\ +f1/f2/f-n:NthAct \ +\\[helm-toggle-suspend-update]:Tog.suspend" + "String displayed in mode-line in Locate.") + +;;;###autoload +(defvar helm-grep-mode-line-string"\ +\\\ +\\[helm-grep-help]:Help \ +\\\ +\\[helm-select-action]:Act \ +\\[helm-maybe-exit-minibuffer]/\ +f1/f2/f-n:NthAct \ +\\[helm-toggle-suspend-update]:Tog.suspend" + "String displayed in mode-line in `helm-do-grep'.") + +;;;###autoload +(defvar helm-pdfgrep-mode-line-string "\ +\\\ +\\[helm-pdfgrep-help]:Help \ +\\\ +\\[helm-select-action]:Act \ +\\[helm-maybe-exit-minibuffer]/\ +f1/f2/f-n:NthAct \ +\\[helm-toggle-suspend-update]:Tog.suspend" + "String displayed in mode-line in `helm-do-pdfgrep'.") + +;;;###autoload +(defvar helm-etags-mode-line-string "\ +\\\ +\\[helm-etags-help]:Help \ +\\\ +\\[helm-select-action]:Act \ +\\[helm-maybe-exit-minibuffer]/\ +f1/f2/f-n:NthAct" + "String displayed in mode-line in `helm-etags-select'.") + +;;;###autoload +(defvar helm-ucs-mode-line-string "\ +\\\ +\\[helm-ucs-help]:Help \ +\\\ +\\[helm-select-action]:Act \ +\\[helm-maybe-exit-minibuffer]/\ +f1/f2/f-n:NthAct" + "String displayed in mode-line in `helm-ucs'.") + +;;;###autoload +(defvar helm-bookmark-mode-line-string + '("Bookmark(s)" "\ +\\\ +\\[helm-bookmark-help]:Help \ +\\\ +\\[helm-select-action]:Act \ +\\[helm-maybe-exit-minibuffer]/\ +f1/f2/f-n:NthAct") + "String displayed in mode-line in `helm-source-buffers-list'") + +;;;###autoload +(defvar helm-occur-mode-line "\ +\\\ +\\[helm-help]:Help \ +\\\ +\\[helm-occur-run-query-replace-regexp]:Query replace regexp \ +\\\ +\\[helm-select-action]:Act \ +\\[helm-maybe-exit-minibuffer]/\ +f1/f2/f-n:NthAct \ +\\[helm-toggle-suspend-update]:Tog.suspend") + +;;;###autoload +(defvar helm-moccur-mode-line "\ +\\\ +\\[helm-moccur-help]:Help \ +\\\ +\\[helm-select-action]:Act \ +\\[helm-maybe-exit-minibuffer]/\ +f1/f2/f-n:NthAct \ +\\[helm-toggle-suspend-update]:Tog.suspend") + +;;;###autoload +(defvar helm-comp-read-mode-line "\ +\\\ +\\[helm-cr-empty-string]:Empty \ +\\\ +\\[helm-help]:Help \ +\\[helm-select-action]:Act \ +\\[helm-maybe-exit-minibuffer]/\ +f1/f2/f-n:NthAct") + +;;;###autoload +(defvar helm-top-mode-line "\ +\\\ +\\[helm-top-help]:Help \ +\\\ +\\[helm-select-action]:Act \ +\\[helm-maybe-exit-minibuffer]/\ +f1/f2/f-n:NthAct \ +\\[helm-toggle-suspend-update]:Tog.suspend") + +;;;###autoload +(defvar helm-apt-mode-line "\ +\\\ +\\[helm-apt-help]:Help \ +\\\ +\\[helm-select-action]:Act \ +\\[helm-maybe-exit-minibuffer]/\ +f1/f2/f-n:NthAct \ +\\[helm-toggle-suspend-update]:Tog.suspend") + +;;;###autoload +(defvar helm-el-package-mode-line "\ +\\\ +\\[helm-el-package-help]:Help \ +\\\ +\\[helm-select-action]:Act \ +\\[helm-maybe-exit-minibuffer]/\ +f1/f2/f-n:NthAct \ +\\[helm-toggle-suspend-update]:Tog.suspend") + +;;;###autoload +(defvar helm-M-x-mode-line "\ +\\\ +\\[helm-M-x-help]:Help \ +\\\ +\\[helm-select-action]:Act \ +\\[helm-maybe-exit-minibuffer]/\ +f1/f2/f-n:NthAct \ +\\[helm-toggle-suspend-update]:Tog.suspend") + +;;;###autoload +(defvar helm-imenu-mode-line "\ +\\\ +\\[helm-imenu-help]:Help \ +\\\ +\\[helm-select-action]:Act \ +\\[helm-maybe-exit-minibuffer]/\ +f1/f2/f-n:NthAct \ +\\[helm-toggle-suspend-update]:Tog.suspend") + +;;;###autoload +(defvar helm-semantic-mode-line "\ +\\\ +\\[helm-semantic-help]:Help \ +\\\ +\\[helm-select-action]:Act \ +\\[helm-maybe-exit-minibuffer]/\ +f1/f2/f-n:NthAct \ +\\[helm-toggle-suspend-update]:Tog.suspend") + + +;;; Attribute Documentation +;; +;; +;;;###autoload +(defun helm-describe-helm-attribute (helm-attribute) + "Display the full documentation of HELM-ATTRIBUTE. +HELM-ATTRIBUTE should be a symbol." + (interactive (list (intern + (completing-read + "Describe helm attribute: " + (mapcar 'symbol-name helm-attributes) + nil t)))) + (with-output-to-temp-buffer "*Help*" + (princ (get helm-attribute 'helm-attrdoc)))) + +(helm-document-attribute 'name "mandatory" + " The name of the source. It is also the heading which appears + above the list of matches from the source. Must be unique.") + +(helm-document-attribute 'header-name "optional" + " A function returning the display string of the header. Its + argument is the name of the source. This attribute is useful to + add an additional information with the source name.") + +(helm-document-attribute 'candidates "mandatory if candidates-in-buffer attribute is not provided" + " Specifies how to retrieve candidates from the source. It can + either be a variable name, a function called with no parameters + or the actual list of candidates. + + The list must be a list whose members are strings, symbols + or (DISPLAY . REAL) pairs. + + In case of (DISPLAY . REAL) pairs, the DISPLAY string is shown + in the Helm buffer, but the REAL one is used as action + argument when the candidate is selected. This allows a more + readable presentation for candidates which would otherwise be, + for example, too long or have a common part shared with other + candidates which can be safely replaced with an abbreviated + string for display purposes. + + Note that if the (DISPLAY . REAL) form is used then pattern + matching is done on the displayed string, not on the real + value. + + If the candidates have to be retrieved asynchronously (for + example, by an external command which takes a while to run) + then the function should start the external command + asynchronously and return the associated process object. + Helm will take care of managing the process (receiving the + output from it, killing it if necessary, etc.). The process + should return candidates matching the current pattern (see + variable `helm-pattern'.) + You should use instead `candidates-process' attribute for + async processes, a warning will popup when using async process + in a `candidates' attribute. + + Note that currently results from asynchronous sources appear + last in the helm buffer regardless of their position in + `helm-sources'.") + +(helm-document-attribute 'candidates-process + "Same as `candidates' attributes but for process function." + " You should use this attribute when using a function involving + an async process instead of `candidates'.") + +(helm-document-attribute 'action "mandatory if type attribute is not provided" + " It is a list of (DISPLAY . FUNCTION) pairs or FUNCTION. + FUNCTION is called with one parameter: the selected candidate. + + An action other than the default can be chosen from this list + of actions for the currently selected candidate (by default + with TAB). The DISPLAY string is shown in the completions + buffer and the FUNCTION is invoked when an action is + selected. The first action of the list is the default.") + +(helm-document-attribute 'coerce "optional" + " It's a function called with one argument: the selected + candidate. + + This function is intended for type convertion. In normal case, + the selected candidate (string) is passed to action + function. If coerce function is specified, it is called just + before action function. + + Example: converting string to symbol + (coerce . intern)") + +(helm-document-attribute 'type "optional if action attribute is provided" + " Indicates the type of the items the source returns. + + Merge attributes not specified in the source itself from + `helm-type-attributes'. + + This attribute is implemented by plug-in.") + +(helm-document-attribute 'init "optional" + " Function called with no parameters when helm is started. It + is useful for collecting current state information which can be + used to create the list of candidates later. + + For example, if a source needs to work with the current + directory then it can store its value here, because later + helm does its job in the minibuffer and in the + `helm-buffer' and the current directory can be different + there.") + +(helm-document-attribute 'delayed-init "optional" + " Function called with no parameters before candidate function + is called. It is similar with `init' attribute, but its + evaluation is deferred. It is useful to combine with ") + +(helm-document-attribute 'match "optional" + " List of functions called with one parameter: a candidate. The + function should return non-nil if the candidate matches the + current pattern (see variable `helm-pattern'). + + This attribute allows the source to override the default + pattern matching based on `string-match'. It can be used, for + example, to implement a source for file names and do the + pattern matching on the basename of files, since it's more + likely one is typing part of the basename when searching for a + file, instead of some string anywhere else in its path. + + If the list contains more than one function then the list of + matching candidates from the source is constructed by appending + the results after invoking the first function on all the + potential candidates, then the next function, and so on. The + matching candidates supplied by the first function appear first + in the list of results and then results from the other + functions, respectively. + + This attribute has no effect for asynchronous sources (see + attribute `candidates'), since they perform pattern matching + themselves.") + +(helm-document-attribute 'candidate-transformer "optional" + " It's a function or a list of functions called with one argument + when the completion list from the source is built. The argument + is the list of candidates retrieved from the source. The + function should return a transformed list of candidates which + will be used for the actual completion. If it is a list of + functions, it calls each function sequentially. + + This can be used to transform or remove items from the list of + candidates. + + Note that `candidates' is run already, so the given transformer + function should also be able to handle candidates with (DISPLAY + . REAL) format.") + +(helm-document-attribute 'filtered-candidate-transformer "optional" + " It has the same format as `candidate-transformer', except the + function is called with two parameters: the candidate list and + the source. + + This transformer is run on the candidate list which is already + filtered by the current pattern. While `candidate-transformer' + is run only once, it is run every time the input pattern is + changed. + + It can be used to transform the candidate list dynamically, for + example, based on the current pattern. + + In some cases it may also be more efficent to perform candidate + transformation here, instead of with `candidate-transformer' + even if this transformation is done every time the pattern is + changed. For example, if a candidate set is very large then + `candidate-transformer' transforms every candidate while only + some of them will actually be dislpayed due to the limit + imposed by `helm-candidate-number-limit'. + + Note that `candidates' and `candidate-transformer' is run + already, so the given transformer function should also be able + to handle candidates with (DISPLAY . REAL) format. + + This option has no effect for asynchronous sources. (Not yet, + at least.") + +(helm-document-attribute 'action-transformer "optional" + " It's a function or a list of functions called with two + arguments when the action list from the source is + assembled. The first argument is the list of actions, the + second is the current selection. If it is a list of functions, + it calls each function sequentially. + + The function should return a transformed action list. + + This can be used to customize the list of actions based on the + currently selected candidate.") + +(helm-document-attribute 'pattern-transformer "optional" + " It's a function or a list of functions called with one argument + before computing matches. Its argument is `helm-pattern'. + Functions should return transformed `helm-pattern'. + + It is useful to change interpretation of `helm-pattern'.") + +(helm-document-attribute 'delayed "optional" + " Candidates from the source are shown only if the user stops + typing and is idle for `helm-idle-delay' seconds. + If a value is given to delayed attr, this value is used instead only + if it is > to `helm-idle-delay'.") + +(helm-document-attribute 'volatile "optional" + " Indicates the source assembles the candidate list dynamically, + so it shouldn't be cached within a single Helm + invocation. It is only applicable to synchronous sources, + because asynchronous sources are not cached.") + +(helm-document-attribute 'requires-pattern "optional" + " If present matches from the source are shown only if the + pattern is not empty. Optionally, it can have an integer + parameter specifying the required length of input which is + useful in case of sources with lots of candidates.") + +(helm-document-attribute 'persistent-action "optional" + " Can be a either a Function called with one parameter (the + selected candidate) or a cons cell where first element is this + same function and second element a symbol (e.g never-split) + that inform `helm-execute-persistent-action'to not split his + window to execute this persistent action.") + +(helm-document-attribute 'candidates-in-buffer "optional" + " Shortcut attribute for making and narrowing candidates using + buffers. This newly-introduced attribute prevents us from + forgetting to add volatile and match attributes. + + See docstring of `helm-candidates-in-buffer'. + + (candidates-in-buffer) is equivalent of three attributes: + (candidates . helm-candidates-in-buffer) + (volatile) + (match identity) + + (candidates-in-buffer . candidates-function) is equivalent of: + (candidates . candidates-function) + (volatile) + (match identity) + + This attribute is implemented by plug-in.") + +(helm-document-attribute 'search "optional" + " List of functions like `re-search-forward' or `search-forward'. + Buffer search function used by `helm-candidates-in-buffer'. + By default, `helm-candidates-in-buffer' uses + `re-search-forward'. This attribute is meant to be used with + (candidates . helm-candidates-in-buffer) or + (candidates-in-buffer) in short.") + +(helm-document-attribute 'search-from-end "optional" + " Make `helm-candidates-in-buffer' search from the end of buffer. + If this attribute is specified, `helm-candidates-in-buffer' + uses `re-search-backward' instead.") + +(helm-document-attribute 'get-line "optional" + " A function like `buffer-substring-no-properties' or `buffer-substring'. + This function converts point of line-beginning and point of line-end, + which represents a candidate computed by `helm-candidates-in-buffer'. + By default, `helm-candidates-in-buffer' uses + `buffer-substring-no-properties'.") + +(helm-document-attribute 'display-to-real "optional" + " Function called with one parameter; the selected candidate. + + The function transforms the selected candidate, and the result + is passed to the action function. The display-to-real + attribute provides another way to pass other string than one + shown in Helm buffer. + + Traditionally, it is possible to make candidates, + candidate-transformer or filtered-candidate-transformer + function return a list with (DISPLAY . REAL) pairs. But if REAL + can be generated from DISPLAY, display-to-real is more + convenient and faster.") + +(helm-document-attribute 'real-to-display "optional" + " Function called with one parameter; the selected candidate. + + The inverse of display-to-real attribute. + + The function transforms the selected candidate, which is passed + to the action function, for display. The real-to-display + attribute provides the other way to pass other string than one + shown in Helm buffer. + + Traditionally, it is possible to make candidates, + candidate-transformer or filtered-candidate-transformer + function return a list with (DISPLAY . REAL) pairs. But if + DISPLAY can be generated from REAL, real-to-display is more + convenient. + + Note that DISPLAY parts returned from candidates / + candidate-transformer are IGNORED as the name `display-to-real' + says.") + +(helm-document-attribute 'cleanup "optional" + " Function called with no parameters when *helm* buffer is + closed. It is useful for killing unneeded candidates buffer. + + Note that the function is executed BEFORE performing action.") + +(helm-document-attribute 'candidate-number-limit "optional" + " Override `helm-candidate-number-limit' only for this source.") + +(helm-document-attribute 'accept-empty "optional" + " Pass empty string \"\" to action function.") + +(helm-document-attribute 'dummy "optional" + " Set `helm-pattern' to candidate. If this attribute is + specified, The candidates attribute is ignored. + + This attribute is implemented by plug-in.") + +(helm-document-attribute 'multiline "optional" + " Enable to selection multiline candidates.") + +(helm-document-attribute 'update "optional" + (substitute-command-keys + " Function called with no parameters at end of reinitialization when \ +\\\\[helm-force-update] is pressed.")) + +(helm-document-attribute 'mode-line "optional" + " Source local `helm-mode-line-string' (included in + `mode-line-format'). It accepts also variable/function name.") + +(helm-document-attribute 'header-line "optional" + " Source local `header-line-format'. + It accepts also variable/function name. ") + +(helm-document-attribute + 'resume "optional" + " Function called with no parameters at end of initialization + when `helm-resume' is started. + If this function try to do something against `helm-buffer', \(e.g updating, + searching etc...\) probably you should run it in a timer to ensure + `helm-buffer' is ready.") + +(helm-document-attribute 'keymap "optional" + " Specific keymap for this source. + It is useful to have a keymap per source when using more than + one source. Otherwise, a keymap can be set per command with + `helm' argument KEYMAP. NOTE: when a source have `helm-map' as + keymap attr, the global value of `helm-map' will override the + actual local one.") + +(helm-document-attribute 'help-message "optional" + " Help message for this source. + If not present, `helm-help-message' value will be used.") + +(helm-document-attribute 'match-part "optional" + " Allow matching candidate in the line with `candidates-in-buffer'. + In candidates-in-buffer sources, match is done with + `re-search-forward' which allow matching only a regexp on the + `helm-buffer'; when this search is done, match-part allow + matching only a specific part of the current line e.g with a + line like this: + + filename:candidate-containing-the-word-filename + + What you want is to ignore \"filename\" part and match only + \"candidate-containing-the-word-filename\" + + So give a function matching only the part of candidate after \":\" + + If source contain match-part attribute, match is computed only + on part of candidate returned by the call of function provided + by this attribute. The function should have one arg, candidate, + and return only a specific part of candidate. + + NOTE: This have effect only on sources using + `candidates-in-buffer'.") + +(helm-document-attribute 'match-strict "optional" + " When specifying a match function within a source and + helm-match-plugin is enabled, the result of all matching + functions will be concatened, which in some cases is not what + is wanted. When using `match-strict' only this or these + functions will be used. You can specify those functions as a + list of functions or a single symbol function. For anonymous + function don't add the dot, e.g: + + \(match-strict (lambda () (foo))).") + +(helm-document-attribute 'nohighlight "optional" + " Disable highlight match in this source.") + +(helm-document-attribute 'no-matchplugin "optional" + " Disable matchplugin for this source.") + +(helm-document-attribute 'history "optional" + " Allow passing history variable to helm from source. + It should be a quoted symbol evaluated from source, i.e: + (history . ,'history-var)") + +(helm-document-attribute 'follow "optional" + " Enable `helm-follow-mode' for this source only. + You must give it a value of 1 or -1, though giving a -1 value + is surely not what you want, e.g: (follow . 1) + + See `helm-follow-mode' for more infos") + +(helm-document-attribute 'follow-delay "optional" + " `helm-follow-mode' will execute persistent-action after this delay. +Otherwise value of `helm-follow-input-idle-delay' is used if non--nil, +If none of these are found fallback to `helm-input-idle-delay'.") + +(helm-document-attribute 'allow-dups "optional" + " Allow helm collecting duplicates candidates.") + +(helm-document-attribute 'filter-one-by-one "optional" + " A transformer function that treat candidates one by one. + It is called with one arg the candidate. + It is faster than `filtered-candidate-transformer' or `candidates-transformer', + but should be used only in sources that recompute constantly their candidates, + e.g `helm-source-find-files'. + Filtering happen early and candidates are treated + one by one instead of re-looping on the whole list. + If used with `filtered-candidate-transformer' or `candidates-transformer' + these functions should treat the candidates transformed by the `filter-one-by-one' + function in consequence.") + +(helm-document-attribute 'nomark "optional" + " Don't allow marking candidates when this attribute is present.") + +(provide 'helm-help) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions obsolete) +;; coding: utf-8 +;; indent-tabs-mode: nil +;; End: + +;;; helm-help.el ends here diff --git a/elpa/helm-20140808.2300/helm-help.elc b/elpa/helm-20140808.2300/helm-help.elc new file mode 100644 index 0000000000000000000000000000000000000000..962c785f98098d7083048232cd5337c05463112c GIT binary patch literal 51558 zcmeHw`F9*glAhM~ThGY9?ArUD?e}~Xp`8a{i~@<1hcvQyfD(6jXh~>gt-u`?x(h&y z-PJvP5QO}^f4jf$i^#03>TVJgsa<(JGmjKIE04&C$ha~x^V5TecmLx@AAR)kr=NbB z-5m}_y?)uvjxVx7G5rF6Ci$bHb7wewx!E6fihee%vS-CKyFEM2vYXk~-mR@0x3;&k z?Q2`R>f&TP9AqcxB)j^}q#RGKqK~Va<)G+HHoI5L{;0TmR`v%u8(h0_?Z)Qz&b4b+ zg!0j5*;hBcDm!4C>=pXxVbJZ}&7I9HeLL?>&$6NqSVq&{p!Z`jMTN=c$NG49)|=S) zvq?G0x))V3=ykI0urryCd)4V=17F9JX;yT*m}nel>*nV6&AC3hL-bJ%r&(uMO$$_> zO;7S0D5>(>&+a~Wkaf3ktl~{|LbQ{_o?DKVCb&n3j2G*e$b_BM=9Fwyqp)Z}A`7__KpQyZEz*Kl}Kz z^&9_q{b+}kwzlwx75Q-oAFo|s$-W<#f1LHkWk%v>o!MkM9OT`y(=WzlemWk`M*5PI z2ePWy&sGiw$E8T5qLbk`d%?D=n=9EZYtZWDr07`p>IBGLTbpLLdevDu?oC7QpvQQ9 zJzKfY%Is9|Xb9sEa>Srl^^RvJC*^o^<$1Qh{_!VY+_;|IE5QL=9I8DiCzIl|%)C_s z-^UNYTzxP>(dm?_vd&MzU$K+ygJnV1&_m9`QnEsOQlzJ#^s;{qxQkCgHgZKsA9>oUm6TmF&+=k zu@JJ8aWN>*hvS!!`m7U&+RT|Va zJG1c^xWe>iV}W>7VW>OB1T~*Tn0(mLM)u9|uQ1Z% z^7YhTC=KbGmsq;!MofVTji(^VB)g9;D`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L zz0rsna)~hB!mL)NwL*$P6yuiy8Q@e^x;NoZoQTlzxFUbf7^IWIkUung>I~&P$ zxGfZkZIYaAeC4(tGumr;hPD<|!gE6-CCS+?4+(mir9OVy?Aqw%Yv`5lS%5nuSy~Cjp}-72-}kE5`r^$ zKlJM{0UY`=g+~3yI}WDcJD?xuit6swBMk?`y{#nZe>iH??8?oDucmx4tzYJ8BGsuF zqcf_ex+@V?xU;i^HP#?kViqlIDm+>i-sq+@!!c3p#4@|UFm_@bWJcY4Ad3smxGj(u ztIzbUQJ8}#;K!gW*w=Nt(< + +;; 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 . + +;;; Code: + +(require 'cl-lib) +(require 'helm) +(require 'imenu) +(require 'helm-utils) + + +(defgroup helm-imenu nil + "Imenu related libraries and applications for helm." + :group 'helm) + +(defcustom helm-imenu-delimiter " / " + "Delimit types of candidates and his value in `helm-buffer'." + :group 'helm-imenu + :type 'string) + +(defcustom helm-imenu-execute-action-at-once-if-one t + "Goto the candidate when only one is remaining." + :group 'helm-imenu + :type 'boolean) + +(defcustom helm-imenu-lynx-style-map t + "Use Arrow keys to jump to occurences." + :group 'helm-imenu + :type 'boolean) + + +;;; keymap +(defvar helm-imenu-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map helm-map) + (define-key map (kbd "C-c ?") 'helm-imenu-help) + (when helm-imenu-lynx-style-map + (define-key map (kbd "") 'helm-maybe-exit-minibuffer) + (define-key map (kbd "") 'helm-execute-persistent-action)) + (delq nil map))) + + +;;; Internals +(defvar helm-cached-imenu-alist nil) +(make-variable-buffer-local 'helm-cached-imenu-alist) + +(defvar helm-cached-imenu-candidates nil) +(make-variable-buffer-local 'helm-cached-imenu-candidates) + +(defvar helm-cached-imenu-tick nil) +(make-variable-buffer-local 'helm-cached-imenu-tick) + + +(defvar helm-source-imenu + `((name . "Imenu") + (candidates . helm-imenu-candidates) + (allow-dups) + (candidate-transformer . helm-imenu-transformer) + (persistent-action . helm-imenu-persistent-action) + (persistent-help . "Show this entry") + (keymap . ,helm-imenu-map) + (mode-line . helm-imenu-mode-line) + (action . helm-imenu-action) + "See (info \"(emacs)Imenu\")")) + + +(defun helm-imenu-action (candidate) + "Default action for `helm-source-imenu'." + (imenu candidate) + ;; If semantic is supported in this buffer + ;; imenu used `semantic-imenu-goto-function' + ;; and position have been highlighted, + ;; no need to highlight again. + (unless (eq imenu-default-goto-function + 'semantic-imenu-goto-function) + (helm-highlight-current-line nil nil nil nil 'pulse))) + +(defun helm-imenu-persistent-action (candidate) + "Default persistent action for `helm-source-imenu'." + (imenu candidate) + (helm-highlight-current-line)) + +(defun helm-imenu-candidates () + (with-helm-current-buffer + (let ((tick (buffer-modified-tick))) + (if (eq helm-cached-imenu-tick tick) + helm-cached-imenu-candidates + (setq imenu--index-alist nil) + (setq helm-cached-imenu-tick tick + helm-cached-imenu-candidates + (let ((index (imenu--make-index-alist))) + (helm-imenu--candidates-1 + (delete (assoc "*Rescan*" index) index)))))))) + +(defun helm-imenu--candidates-1 (alist) + (cl-loop for elm in alist + append (if (imenu--subalist-p elm) + (helm-imenu--candidates-1 + (cl-loop for (e . v) in (cdr elm) collect + (cons (propertize + e 'helm-imenu-type (car elm)) + v))) + (and (cdr elm) ; bug in imenu, should not be needed. + (list elm))))) + +(defun helm-imenu--get-prop (item) + ;; property value of ITEM can have itself + ;; a property value which have itself a property value + ;; ...and so on; Return a list of all these + ;; properties values starting at ITEM. + (let* ((prop (get-text-property 0 'helm-imenu-type item)) + (lst (list prop item))) + (when prop + (while prop + (setq prop (get-text-property 0 'helm-imenu-type prop)) + (and prop (push prop lst))) + lst))) + +(defun helm-imenu-transformer (candidates) + (cl-loop for (k . v) in candidates + for types = (or (helm-imenu--get-prop k) + (list "Function" k)) + collect + (cons (mapconcat (lambda (x) + (propertize + x 'face (cond ((string= x "Variables") + 'font-lock-variable-name-face) + ((string= x "Function") + 'font-lock-function-name-face) + ((string= x "Types") + 'font-lock-type-face)))) + types helm-imenu-delimiter) + (cons k v)))) + +;;;###autoload +(defun helm-imenu () + "Preconfigured `helm' for `imenu'." + (interactive) + (let ((imenu-auto-rescan t) + (str (thing-at-point 'symbol)) + (helm-execute-action-at-once-if-one + helm-imenu-execute-action-at-once-if-one)) + (helm :sources 'helm-source-imenu + :default (list (concat "\\_<" str "\\_>") str) + :candidate-number-limit 9999 + :buffer "*helm imenu*"))) + +(provide 'helm-imenu) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions obsolete) +;; coding: utf-8 +;; indent-tabs-mode: nil +;; End: + +;;; helm-imenu.el ends here diff --git a/elpa/helm-20140808.2300/helm-imenu.elc b/elpa/helm-20140808.2300/helm-imenu.elc new file mode 100644 index 0000000000000000000000000000000000000000..273c2653cb853c37083506934aba084a87fb2fa2 GIT binary patch literal 4621 zcmb_f`ETRK6_zZ!bzHP)(;tEqZSs~%v(h3Xlhoz)Hi@rIVIW(ywOh1U8Ql>zvRLz4 z9$qVdeZMzDN|YThiX;YTQZw(G_r7<`i=Dtao=a{P#1G85fGh!3sqpx5s?dheZ|FGvP3 zCdvKK|4!y0$a;Hv^K#*5#(*MI8O@fF41JGgv6tnkA6;i(U^mTjlCv33y3*r3@43$( z$e6{D5yd%qag<9C7x`QqU?mdA7pLdvy&OhGs`gjI-Kd7adY!7bg`X<&0ulIAVtA6qqW%;`?gtrpMV7~*m?a4*R{%1|0~jM@F5<{j!k^=<9@v&^ zyXr>$InHBb0wPcuL+=(ULahmw_y=1uI5kB2A%9`VG>!v>ys7ynSVngu%a?%?p-lb{ zohVLpoTl+Rx>3uFV8DNiFyVLXc}1#lfUF0P9d!3PGc`v%>grg>y)eNDS;y~ zai;R}Q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0Zwx=-jWNQb-Cu*tTza^w{jWEQR$T+UU9gecbSCvq^XFf03_#t^fc4 literal 0 HcmV?d00001 diff --git a/elpa/helm-20140808.2300/helm-info.el b/elpa/helm-20140808.2300/helm-info.el new file mode 100644 index 000000000..9dbf5c4d2 --- /dev/null +++ b/elpa/helm-20140808.2300/helm-info.el @@ -0,0 +1,144 @@ +;;; helm-info.el --- Browse info index with helm -*- lexical-binding: t -*- + +;; Copyright (C) 2012 ~ 2014 Thierry Volpiatto + +;; 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 . + +;;; Code: + +(require 'cl-lib) +(require 'helm) +(require 'helm-plugin) +(require 'helm-net) + +(declare-function Info-index-nodes "info" (&optional file)) +(declare-function Info-goto-node "info" (&optional fork)) +(declare-function Info-find-node "info.el" (filename nodename &optional no-going-back)) + + +(defgroup helm-info nil + "Info related Applications and libraries for Helm." + :group 'helm) + +;;; Build info-index sources with info-index plug-in. +;; +;; +(defun helm-build-info-index-command (name doc source buffer) + "Define an helm command NAME with documentation DOC. +Arg SOURCE will be an existing helm source named +`helm-source-info-' and BUFFER a string buffer name." + (eval (list 'defun name nil doc + (list 'interactive) + (list 'helm + :sources source + :buffer buffer + :candidate-number-limit 1000)))) + +(defun helm-define-info-index-sources (var-value &optional commands) + "Define helm sources named helm-source-info-. +Sources are generated for all entries of `helm-default-info-index-list'. +If COMMANDS arg is non--nil build also commands named `helm-info'. +Where NAME is one of `helm-default-info-index-list'." + (cl-loop with symbols = (cl-loop for str in var-value + collect + (intern (concat "helm-source-info-" str))) + for sym in symbols + for str in var-value + do (set sym (list (cons 'name (format "Info index: %s" str)) + (cons 'info-index str))) + when commands + do (let ((com (intern (concat "helm-info-" str)))) + (helm-build-info-index-command + com (format "Predefined helm for %s info." str) + sym (format "*helm info %s*" str))))) + +(defun helm-info-index-set (var value) + (set var value) + (helm-define-info-index-sources value t)) + +(defcustom helm-default-info-index-list + '("elisp" "cl" "org" "gnus" "tramp" "ratpoison" + "zsh" "bash" "coreutils" "fileutils" + "find" "sh-utils" "textutils" "libc" + "make" "automake" "autoconf" "eintr" + "emacs" "elib" "eieio" "gauche-refe" "guile" + "guile-tut" "goops" "screen" "latex" "gawk" + "sed" "m4" "wget" "binutils" "as" "bfd" "gprof" + "ld" "diff" "flex" "grep" "gzip" "libtool" + "texinfo" "info" "gdb" "stabs" "cvsbook" "cvs" + "bison" "id-utils" "global") + "Info Manual entries to use for building helm info index commands." + :group 'helm-info + :type '(repeat (choice string)) + :set 'helm-info-index-set) + +(defcustom helm-info-default-sources + '(helm-source-info-elisp + helm-source-info-cl + helm-source-info-eieio + helm-source-info-pages) + "The default sources to use in `helm-info-at-point'." + :group 'helm-info + :type '(repeat (choice symbol))) + + +;;; Info pages +(defvar helm-info-pages nil + "All info pages on system. +Will be calculated the first time you invoke helm with this +source.") + +(defun helm-info-pages-init () + "Collect candidates for initial Info node Top." + (if helm-info-pages + helm-info-pages + (let ((info-topic-regexp "\\* +\\([^:]+: ([^)]+)[^.]*\\)\\.") + topics) + (require 'info) + (with-temp-buffer + (Info-find-node "dir" "top") + (goto-char (point-min)) + (while (re-search-forward info-topic-regexp nil t) + (push (match-string-no-properties 1) topics)) + (kill-buffer)) + (setq helm-info-pages topics)))) + +(defvar helm-source-info-pages + `((name . "Info Pages") + (init . helm-info-pages-init) + (candidates . helm-info-pages) + (action . (("Show with Info" .(lambda (node-str) + (info (replace-regexp-in-string + "^[^:]+: " "" node-str)))))) + (requires-pattern . 2))) + +;;;###autoload +(defun helm-info-at-point () + "Preconfigured `helm' for searching info at point. +With a prefix-arg insert symbol at point." + (interactive) + (let ((helm-google-suggest-default-function + 'helm-google-suggest-emacs-lisp)) + (helm :sources helm-info-default-sources + :buffer "*helm info*"))) + +(provide 'helm-info) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions obsolete) +;; coding: utf-8 +;; indent-tabs-mode: nil +;; End: + +;;; helm-info.el ends here diff --git a/elpa/helm-20140808.2300/helm-info.elc b/elpa/helm-20140808.2300/helm-info.elc new file mode 100644 index 0000000000000000000000000000000000000000..11d437cd574b25f6ed27188746eae06b3a584c55 GIT binary patch literal 4380 zcmbtX+iu%P67?nVZ1l8myAKO&n@(cM31yLzEL#~2B3}k;AejVlGV@?Mm=@Wh8m8D9 zUVO>dwC(%25Lzz7hVY<5>wSDiXld~@>d=wB-tCKYG05Th~{;y`%)p|?Nuec^Y!9*dY{W+o;OB6h#zD$92vW4Enl zGR)i2u1e-|cdC+^OB*`-o&C1o?R4yvPA8_V5*DLVaYB2<6=Y~A^?U7Z+v9iFx|j-? zz?ONTXZo8gupnu?{svE4YU zmH{dvRw;}kNKo8~DiA%!ftd&!3G!N*6w8iE5WMYn<8&g9KD>WF`sMgcNQ4=DLiz3z z-q^ViNGWdJTH9r%QedmNwi~}q6>MP`L52au{txXO>|aNp++RoUzMP1c#BnBt%WIn+ z2|3OJ052b<_Sx2X-|Grz72)h4g}t>QqS*b<%G%q&-}Bcn&8fNmadY*MW>(imG^}Hl zzrI2{0>3-J)E@2QXGnTN;?`MIyt2-s)>o^?ReoG0(Ovu*RZjxv5chlQhsW=TNS?B= zU#Cp$r8aRwgdhj=X2%P6+!P+|8_GFcZH8SxziNL`am=qsIV=9~n z$>uP82o9)66>V^O48@Dw!9FA;KUaHs!m()kZbmsDGi7~mami?Vk+U=qjkCk}B~eha z;{fda3hbUY=n>lQC-1@zHwOb!_<9K6D!Yx&Nv0nHE2B&9+`r-&N~&4S*cA&A$jL;d6?j0vKZGmEfHC#$mERPfDh(I z=O)Gdw|t80Sn?2>OqGRBXfZV|i~BUfR6cd2_B{ zIeTno){J{s!!2rf#jv=YE78PZ6!N$!Nx;z~w59gFd$RAG6Wvudt4*EP*RADI>?y6tqAoNGSFKm{D3rwe|TF%3> z-_FJ+X_52}mDPj37$Jw)TdbE_`TRC7)C{Gn>S2&(VQHJG0!G+Q8BMklx2DA2D|1}RWoh}qV7FpA$IWBOfuYb1#Z(dE_Mfo;-sstXNZoDyrM z)P#OEbK3(wQu!8I5L5INObq`3*K{{lXh08RD;!3qHFPn|Tg+^m8CA4Ds;Q-B)sh@h z+XnicuGa_SGOKxm7sp3f4|4NCeLl*U?-Lz+9W}Oc{O-EtL%+90hWvyYp4`?%D4-apA`G|7t?TOT?>up?dtLG%3U@Z!}_U~FByYMp;=U+e@y zD+qu9@^jr>bC~Nk$W7I?TXkcO*g?eSJI)=e5^uSSYG6@Mb-4p)b^6b!#uB~rBW$|@ zyP?U(mswb#yE?amU24z7C2&+}x)AI|1^pSGVX^AES zsC^&3j4Qldg6V@bcugHJ@~P>ZP0h9aY9ItVB9XIkBt?@>P3K`nfHqN8B15A8Sl!H_ zraG-~zE&}Ye-PAqUkfybP5kYYyK`Bf?@rM-BcV9G4+OdqDm*$a(Uw@6*k(qx-X%(9 zSRi)H8kF|*B`xMCLHfq!W;ex0J6MOwLo8NOTl&5Ht69iqAED*nxNy4B=LDzP^VTx3 zQP<)G?kHpUzQ7lr?Zv6ivl|!auV2|X<~BO_wsU#KM@4SG4ng+Sr$GG$vebxC7gjf6 Zy-u&&qO75I2mrg%U>o}pMSf~E{sj17J!Aj? literal 0 HcmV?d00001 diff --git a/elpa/helm-20140808.2300/helm-locate.el b/elpa/helm-20140808.2300/helm-locate.el new file mode 100644 index 000000000..ec7c661b6 --- /dev/null +++ b/elpa/helm-20140808.2300/helm-locate.el @@ -0,0 +1,325 @@ +;;; helm-locate.el --- helm interface for locate. -*- lexical-binding: t -*- + +;; Copyright (C) 2012 ~ 2014 Thierry Volpiatto + +;; 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 . + +;; NOTE for WINDOZE users: +;; You have to install Everything with his command line interface here: +;; http://www.voidtools.com/download.php + +;;; Code: + +(require 'cl-lib) +(require 'helm) + + +(defgroup helm-locate nil + "Locate related Applications and libraries for Helm." + :group 'helm) + +(defcustom helm-locate-db-file-regexp "m?locate\.db$" + "Default regexp to match locate database. +If nil Search in all files." + :type 'string + :group 'helm-locate) + +(defcustom helm-ff-locate-db-filename "locate.db" + "The basename of the locatedb file you use locally in your directories. +When this is set and `helm' find such a file in the directory from +where you launch locate, it will use this file and will not prompt you +for a db file. +Note that this happen only when locate is launched with a prefix arg." + :group 'helm-locate + :type 'string) + +(defcustom helm-locate-command nil + "A list of arguments for locate program. +Normally you should not have to modify this yourself. + +If nil it will be calculated when `helm-locate' startup +with these default values for different systems: + +Gnu/linux: \"locate %s -e -A %s\" +berkeley-unix: \"locate %s %s\" +windows-nt: \"es %s %s\" +Others: \"locate %s %s\" + +This string will be passed to format so it should end with `%s'. +The first format spec is used for the \"-i\" value of locate/es, +So don't set it directly but use `helm-locate-case-fold-search' +for this. +The \"-r\" option must be the last option, however if not specified you will +be able to specify it during helm invocation by prefixing the pattern +you enter with \"-r\"." + :type 'string + :group 'helm-locate) + +(defcustom helm-locate-create-db-command + "updatedb -l 0 -o %s -U %s" + "Command used to create a locale locate db file." + :type 'string + :group 'helm-locate) + +(defcustom helm-locate-case-fold-search helm-case-fold-search + "It have the same meaning as `helm-case-fold-search'. +The -i option of locate will be used depending of value of +`helm-pattern' when this is set to 'smart. +When nil \"-i\" will not be used at all. +and when non--nil it will always be used. +NOTE: the -i option of the \"es\" command used on windows does +the opposite of \"locate\" command." + :group 'helm-locate + :type 'symbol) + + +(defvar helm-generic-files-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map helm-map) + (define-key map (kbd "C-]") 'helm-ff-run-toggle-basename) + (define-key map (kbd "C-s") 'helm-ff-run-grep) + (define-key map (kbd "M-g s") 'helm-ff-run-grep) + (define-key map (kbd "M-g z") 'helm-ff-run-zgrep) + (define-key map (kbd "M-g p") 'helm-ff-run-pdfgrep) + (define-key map (kbd "M-D") 'helm-ff-run-delete-file) + (define-key map (kbd "C-=") 'helm-ff-run-ediff-file) + (define-key map (kbd "C-c =") 'helm-ff-run-ediff-merge-file) + (define-key map (kbd "C-c o") 'helm-ff-run-switch-other-window) + (define-key map (kbd "M-i") 'helm-ff-properties-persistent) + (define-key map (kbd "C-c C-x") 'helm-ff-run-open-file-externally) + (define-key map (kbd "C-c X") 'helm-ff-run-open-file-with-default-tool) + (define-key map (kbd "M-.") 'helm-ff-run-etags) + (define-key map (kbd "C-w") 'helm-yank-text-at-point) + (define-key map (kbd "C-c @") 'helm-ff-run-insert-org-link) + (define-key map (kbd "C-c ?") 'helm-generic-file-help) + map) + "Generic Keymap for files.") + + +(defface helm-locate-finish + '((t (:foreground "Green"))) + "Face used in mode line when locate process is finish." + :group 'helm-locate) + + +(defun helm-ff-find-locatedb (&optional from-ff) + "Try to find if a local locatedb file is available. +The search is done in `helm-ff-default-directory' or +fall back to `default-directory' if FROM-FF is nil." + (when helm-ff-locate-db-filename + (cond ((and helm-ff-default-directory + from-ff + (file-exists-p (expand-file-name + helm-ff-locate-db-filename + helm-ff-default-directory)) + (expand-file-name + helm-ff-locate-db-filename + helm-ff-default-directory))) + ((and (not from-ff) + (file-exists-p (expand-file-name + helm-ff-locate-db-filename + default-directory)) + (expand-file-name + helm-ff-locate-db-filename + default-directory)))))) + +(defun helm-locate-1 (&optional localdb init from-ff default) + "Generic function to run Locate. +Prefix arg LOCALDB when (4) search and use a local locate db file when it +exists or create it, when (16) force update of existing db file +even if exists. +It have no effect when locate command is 'es'. +INIT is a string to use as initial input in prompt. +See `helm-locate-with-db' and `helm-locate'." + (require 'helm-mode) + (let ((pfn #'(lambda (candidate) + (if (file-directory-p candidate) + (message "Error: The locate Db should be a file") + (if (= (shell-command + (format helm-locate-create-db-command + candidate + helm-ff-default-directory)) + 0) + (message "New locatedb file `%s' created" candidate) + (error "Failed to create locatedb file `%s'" candidate))))) + (locdb (and localdb + (not (string-match "^es" helm-locate-command)) + (or (and (equal '(4) localdb) + (helm-ff-find-locatedb from-ff)) + (helm-read-file-name + "Create Locate Db file: " + :initial-input (expand-file-name "locate.db" + (or helm-ff-default-directory + default-directory)) + :preselect helm-locate-db-file-regexp + :test #'(lambda (x) + (if helm-locate-db-file-regexp + ;; Select only locate db files and directories + ;; to allow navigation. + (or (string-match + helm-locate-db-file-regexp x) + (file-directory-p x)) + x))))))) + (when (and locdb (or (equal localdb '(16)) + (not (file-exists-p locdb)))) + (funcall pfn locdb)) + (helm-locate-with-db (and localdb locdb) init default))) + +(defun helm-locate-set-command () + "Setup `helm-locate-command' if not already defined." + (unless helm-locate-command + (setq helm-locate-command + (cl-case system-type + (gnu/linux "locate %s -e -r %s") + (berkeley-unix "locate %s %s") + (windows-nt "es %s %s") + (t "locate %s %s"))))) + +(defvar helm-file-name-history nil) +(defun helm-locate-with-db (&optional db initial-input default) + "Run locate -d DB. +If DB is not given or nil use locate without -d option. +Argument DB can be given as a string or list of db files. +Argument INITIAL-INPUT is a string to use as initial-input. +See also `helm-locate'." + (when (and db (stringp db)) (setq db (list db))) + (helm-locate-set-command) + (let ((helm-ff-transformer-show-only-basename nil) + (helm-locate-command + (if db + (replace-regexp-in-string + "locate" + (format "locate -d %s" + (mapconcat 'identity + ;; Remove eventually + ;; marked directories by error. + (cl-loop for i in db + unless (file-directory-p i) + collect i) ":")) + helm-locate-command) + helm-locate-command))) + (setq helm-file-name-history (mapcar 'helm-basename file-name-history)) + (helm :sources 'helm-source-locate + :buffer "*helm locate*" + :input initial-input + :default default + :history 'helm-file-name-history))) + +(defun helm-locate-init () + "Initialize async locate process for `helm-source-locate'." + (let* ((locate-is-es (string-match "\\`es" helm-locate-command)) + (real-locate (string-match "\\`locate" helm-locate-command)) + (case-sensitive-flag (if locate-is-es "-i" "")) + (ignore-case-flag (if (or locate-is-es + (not real-locate)) "" "-i")) + process-connection-type + (args (split-string helm-pattern " "))) + (prog1 + (start-process-shell-command + "locate-process" helm-buffer + (format helm-locate-command + (cl-case helm-locate-case-fold-search + (smart (let ((case-fold-search nil)) + (if (string-match "[[:upper:]]" helm-pattern) + case-sensitive-flag + ignore-case-flag))) + (t (if helm-locate-case-fold-search + ignore-case-flag + case-sensitive-flag))) + (concat + ;; The pattern itself. + (shell-quote-argument (car args)) " " + ;; Possible locate args added + ;; after pattern, don't quote them. + (mapconcat 'identity (cdr args) " ")))) + (set-process-sentinel + (get-buffer-process helm-buffer) + #'(lambda (_process event) + (if (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 "[Locate Process Finish- (%s results)]" + (max (1- (count-lines + (point-min) (point-max))) + 0)) + 'face 'helm-locate-finish)))) + (force-mode-line-update)) + (helm-log "Error: Locate %s" + (replace-regexp-in-string "\n" "" event)))))))) + +(defvar helm-source-locate + `((name . "Locate") + (init . helm-locate-set-command) + (candidates-process . helm-locate-init) + (type . file) + (requires-pattern . 3) + (history . ,'helm-file-name-history) + (keymap . ,helm-generic-files-map) + (help-message . helm-generic-file-help-message) + (candidate-number-limit . 9999) + (no-matchplugin) + (mode-line . helm-generic-file-mode-line-string)) + "Find files matching the current input pattern with locate.") + +;;;###autoload +(defun helm-locate-read-file-name (prompt) + (let* (helm-ff-transformer-show-only-basename + (src `((name . "Locate read fname") + (init . helm-locate-set-command) + (candidates-process . helm-locate-init) + (action . identity) + (requires-pattern . 3) + (history . ,'helm-file-name-history) + (candidate-transformer . (helm-skip-boring-files + helm-highlight-files)) + (candidate-number-limit . 9999) + (no-matchplugin)))) + (or (helm :sources src + :prompt prompt + :buffer "*helm locate read fname*" + :resume 'noresume) + (keyboard-quit)))) + +;;;###autoload +(defun helm-locate (arg) + "Preconfigured `helm' for Locate. +Note: you can add locate options after entering pattern. +See 'man locate' for valid options and also `helm-locate-command'. + +You can specify a local database with prefix argument ARG. +With two prefix arg, refresh the current local db or create it +if it doesn't exists. +Many databases can be used: navigate and mark them. +See also `helm-locate-with-db'. + +To create a user specific db, use +\"updatedb -l 0 -o db_path -U directory\". +Where db_path is a filename matched by +`helm-locate-db-file-regexp'." + (interactive "P") + (setq helm-ff-default-directory default-directory) + (helm-locate-1 arg)) + +(provide 'helm-locate) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions obsolete) +;; coding: utf-8 +;; indent-tabs-mode: nil +;; End: + +;;; helm-locate.el ends here diff --git a/elpa/helm-20140808.2300/helm-locate.elc b/elpa/helm-20140808.2300/helm-locate.elc new file mode 100644 index 0000000000000000000000000000000000000000..2b4d1fdfe0b6b9ece30e8dba8c0bc8ecb49cf02e GIT binary patch literal 10350 zcmb_i`*YjI5!NG7WM(=|CO;&ZHq9A|Eiz-!1i*(xPZG

}o1MYRgSJqFRH*k;DiD z7yy*a{Pq2I?~Vj0tC=+Qm?CjF>^=6|Zy$#TM<NYchfaGU6l`gCx#AfPrBbQ(=ee{8Ng##QgL?3BZueY= ze$dA?7alH}__Xk8{w_VE`@0VH zcX6fqndeIVNv`S7^4x6+XQW*jNfjF2>qY$P*m=**l zh)ex61Q3TwD*g(=bxU-Wu$2)m(a-P0`q;?SAa>BV$s+Akj^w+k7|vo?a>U;>h}b!6 zXhplc5^M5Mb&}hZW1~GhNJ6O>=Qsoa5 z44M55EAy2|h@f$dgt;JM?8R4O35d{mkq^8V0R}YW<=@gSqVk`zj#zr5QxEdEQQzQzhau~i7ema64il`YR zlL?K#iVi@QAyM4o17H-4ip_|bL3 zKu;2c!?{`nsUVZl5RWb3W3~y@3Jecs%3^qltO*U8U0}&i^Vt+TPQC)Fz`h0=te1W? z)5e6+hR{fyi)^0da*}mvu&43teiX*D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US%1&HC=xg>6zS(XDB4Qg|D0d{g0T#OUe*;#jnQ-!p9es02_pJzCB zuuaMTeWpNGwiuDjBbM+!XjEHZ?g2tAhg>>katIp`(vo-cs!(r(jsQJzJH^+^VWT=@ z+}a`)5+HOGediF=$f#+pKSX0&=?=d-pFpV%!JLC%*Z2wHG3LM;roffz0aV=Ps=KAK zZW;7q3(1EnTiAAA;=V*p1QiMu49UP$NLazTT4GM!xcam_U{#hwi*6AA0$Z1wPA>WA zNt`W*@`o7oy(66qcM%WOpdAj%%q(KeZ;+&cr~)HgTu|%MDp0gF)F+PUfnc&LQLhzM zv+@%nx+<>*ZZ!z0?rq1j3F3rBU4_dSg=e94t^|Q`7IMx`RJ{38molD!KC-bbs;HbJ zl*B<|Rs*=I6aO6oIu1y;>(O(e$+%v9X#}lX(OiXl&D8=aKqXN&4chrrTPL3jbRFd#%g*h z0?P^laot@?#@e^Rqpl-L-V4>NUx}+IEUK0f0K4!3U~2rof&p*P(3xF*5k&p3kf<*4 zS6rTstuDf;-N$);JmRXG4!OqRXdK~_tH$4s50!c^134tdd{qD5=&i7Y6vz?p;nBRi#3Wb$%-N> zJz~+il7bQ@s*kW{I<2E)Y*UDQ=Eq3i^&2UfNf4>%-W9Qb8IIu9cvU!jL^XRXCpYAF z$^{2~TI6Zr%od_jb8d|n&ieN#U9DU{Cl31m#zv3nuy~OrSXeZ_8)9y936v<04UkJc z&~blWVKuK5qIK4y!*$xj8$*q47cR$9KzqG + +;; 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 . + +;;; Code: + +(require 'cl-lib) +(require 'helm) + +(declare-function woman-file-name-all-completions "woman.el" (topic)) +(declare-function Man-getpage-in-background "man.el" (topic)) +(declare-function helm-generic-sort-fn "helm-utils.el" (S1 S2)) + +(defgroup helm-man nil + "Man and Woman applications for helm." + :group 'helm) + +(defcustom helm-man-or-woman-function 'Man-getpage-in-background + "Default command to display a man page." + :group 'helm-man + :type '(radio :tag "Preferred command to display a man page" + (const :tag "Man" Man-getpage-in-background) + (const :tag "Woman" woman))) + +;; Internal +(defvar helm-man-pages nil + "All man pages on system. +Will be calculated the first time you invoke helm with this +source.") + +(defun helm-man-default-action (candidate) + "Default action for jumping to a woman or man page from helm." + (let ((wfiles (mapcar + 'car (woman-file-name-all-completions candidate)))) + (condition-case nil + (if (> (length wfiles) 1) + (let ((file (helm-comp-read + "ManFile: " wfiles :must-match t))) + (if (eq helm-man-or-woman-function 'Man-getpage-in-background) + (manual-entry (format "-l %s" file)) + (woman-find-file file))) + (funcall helm-man-or-woman-function candidate)) + ;; If woman is unable to format correctly + ;; use man instead. + (error (kill-buffer) ; Kill woman buffer. + (Man-getpage-in-background candidate))))) + +(defvar helm-source-man-pages + '((name . "Manual Pages") + (init . (lambda () + (require 'woman) + (require 'helm-utils) + (unless helm-man-pages + (setq helm-man-pages + (ignore-errors + (woman-file-name "" t) + (sort (mapcar 'car woman-topic-all-completions) + 'string-lessp)))) + (helm-init-candidates-in-buffer 'global helm-man-pages))) + (candidates-in-buffer) + (persistent-action . ignore) + (filtered-candidate-transformer + . (lambda (candidates _source) + (sort candidates #'helm-generic-sort-fn))) + (action . (("Display Man page" . helm-man-default-action))) + ;; Woman does not work OS X + ;; http://xahlee.org/emacs/modernization_man_page.html + (action-transformer . (lambda (actions candidate) + (if (eq system-type 'darwin) + '(("Display Man page" . man)) + actions))))) + +;;;###autoload +(defun helm-man-woman (arg) + "Preconfigured `helm' for Man and Woman pages. +With a prefix arg reinitialize the cache." + (interactive "P") + (when arg (setq helm-man-pages nil)) + (helm-other-buffer 'helm-source-man-pages "*Helm man woman*")) + +(provide 'helm-man) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions obsolete) +;; coding: utf-8 +;; indent-tabs-mode: nil +;; End: + +;;; helm-man.el ends here diff --git a/elpa/helm-20140808.2300/helm-man.elc b/elpa/helm-20140808.2300/helm-man.elc new file mode 100644 index 0000000000000000000000000000000000000000..d2a65eb2e4494a309644284bd07f3feadd94c7b0 GIT binary patch literal 2839 zcmbtWO>Y}F5Oop24Rq?Qmjaor<4OubS-Y0%F9e8dxv7CB4U)7uSVl|jQWER^%986; z`SpE6uB7;@mk8iuMGj|%Gw(g_(dlm|-*0Sew2qFB=%mO>ovMT;3(BN@fnmfe8UI`q zm%X%zWlBX(@1&*UdPa0W;qWlrKa3)Z`r*L2m{vtbQ#hfWKa8r(4t(tNR3>B7OLkOR z%AL7NGr=4B`~Cf1wA=6dsZ8cQl{zmvr&HcSS8$;bGaB@Ed!bwVr0tw!id0IgGyPdw z7?@tmExw;?K+~df#=U?J{ni`)u4JX<1VD9o#C}m!;uAX((>jkC zRm3k0wbjJddA})(&l?GdnX;vvDWP*Qk?|!5%aaQVVVIBe&NS}^7Zi-tRMsg&DMN^a zY(a@OWhxgWLAIRO2PbP6rJ_zH6J6ksoKf(mQd3n`!0Z2R4yXg10^5EUQVZzb{JPhT zT>%4f$M1G8XusRqdT}tIV;p{&oMG~tg|RB@wLWO90OKf6T&L0^IXhPkxxhcUht_tso=}g%{&3jkRQC31SwQg3wFdqD zr-okTGp?odxf5oW`I6Hj?k)(1HqgoO>(SZh`2A_uhnA_9hT5zCBO7j!Xd-N#N5j1} z2^iiF9*>z6cR=4Ge)HkxL$(0!`RS0qy+nRP7LRb~N zJW_Q*!!JllC=(J~HaVn5<)B%s!<=6N=VDS%LBRWSxS-vYUpjmF`uDe|BPM+qEpZ$k z47wNH>wxz(U@;RO_w7!HdkWmMu;EbjhWQYHt2)<~QkhK>>FKc)%(ka21fx+<59iwI z)L>tor^=X{1nU@OKi-<5H9 z1w5VVS3>O9GpZDKP(wmLE2sRijOVHm+T*t` z?~zysDq1RQ1X+Q=Y_bG}-{Ha3^Wqw?uHeI9RXk4-z8c(Af!n5964TAxqEqnnSN@DZ h0laEH1tSLyA*10i>f&Y%n3QEzTxopotZssC>pz`BdU5~& literal 0 HcmV?d00001 diff --git a/elpa/helm-20140808.2300/helm-match-plugin.el b/elpa/helm-20140808.2300/helm-match-plugin.el new file mode 100644 index 000000000..60d2ce290 --- /dev/null +++ b/elpa/helm-20140808.2300/helm-match-plugin.el @@ -0,0 +1,437 @@ +;;; helm-match-plugin.el --- Multiple regexp matching methods for helm -*- lexical-binding: t -*- + +;; Original Author: rubikitch + +;; Copyright (C) 2008 ~ 2011 rubikitch +;; Copyright (C) 2011 ~ 2014 Thierry Volpiatto + +;; Author: Thierry Volpiatto +;; URL: http://github.com/emacs-helm/helm + +;; 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 . + +;;; Code: + +(require 'helm) +(require 'cl-lib) + +;;;; Match-plugin + +;; Internal +(defvar helm-mp-default-match-functions nil) +(defvar helm-mp-default-search-functions nil) +(defvar helm-mp-default-search-backward-functions nil) + +(defun helm-mp-set-matching-method (var key) + "Default function to set matching methods in helm match plugin." + (set-default var key) + (cl-case (symbol-value var) + (multi1 (setq helm-mp-default-match-functions + '(helm-mp-exact-match helm-mp-1-match) + helm-mp-default-search-functions + '(helm-mp-exact-search helm-mp-1-search) + helm-mp-default-search-backward-functions + '(helm-mp-exact-search-backward + helm-mp-1-search-backward))) + (multi2 (setq helm-mp-default-match-functions + '(helm-mp-exact-match helm-mp-2-match) + helm-mp-default-search-functions + '(helm-mp-exact-search helm-mp-2-search) + helm-mp-default-search-backward-functions + '(helm-mp-exact-search-backward + helm-mp-2-search-backward))) + (multi3 (setq helm-mp-default-match-functions + '(helm-mp-exact-match helm-mp-3-match) + helm-mp-default-search-functions + '(helm-mp-exact-search helm-mp-3-search) + helm-mp-default-search-backward-functions + '(helm-mp-exact-search-backward + helm-mp-3-search-backward))) + (multi3p (setq helm-mp-default-match-functions + '(helm-mp-exact-match helm-mp-3p-match) + helm-mp-default-search-functions + '(helm-mp-exact-search helm-mp-3p-search) + helm-mp-default-search-backward-functions + '(helm-mp-exact-search-backward + helm-mp-3p-search-backward))) + (t (error "Unknown value: %s" helm-mp-matching-method)))) + +(defgroup helm-match-plugin nil + "Helm match plugin." + :group 'helm) + +(defcustom helm-mp-matching-method 'multi3 + "Matching method for helm match plugin. +You can set here different methods to match candidates in helm. +Here are the possible value of this symbol and their meaning: +- multi1: Respect order, prefix of pattern must match. +- multi2: Same but with partial match. +- multi3: The best, multiple regexp match, allow negation. +- multi3p: Same but prefix must match. +Default is multi3." + :type '(radio :tag "Matching methods for helm" + (const :tag "Multiple regexp 1 ordered with prefix match" multi1) + (const :tag "Multiple regexp 2 ordered with partial match" multi2) + (const :tag "Multiple regexp 3 matching no order, partial, best." multi3) + (const :tag "Multiple regexp 3p matching with prefix match" multi3p)) + :set 'helm-mp-set-matching-method + :group 'helm-match-plugin) + +(defface helm-match + '((t (:inherit match))) + "Face used to highlight matches." + :group 'helm-match-plugin) + +(defcustom helm-mp-highlight-delay 0.7 + "Highlight matches with `helm-match' face after this many seconds. + If nil, no highlight. " + :type 'integer + :group 'helm-match-plugin) + +(defcustom helm-mp-highlight-threshold 2 + "Minimum length of pattern to highlight. +The smaller this value is, the slower highlight is." + :type 'integer + :group 'helm-match-plugin) + +;;;###autoload +(define-minor-mode helm-match-plugin-mode + "Add more flexible regexp matching for helm. +See `helm-mp-matching-method' for the behavior of each method." + :group 'helm-match-plugin + :require 'helm-match-plugin + :global t + (if helm-match-plugin-mode + (progn + (add-to-list 'helm-compile-source-functions 'helm-compile-source--match-plugin) + (add-hook 'helm-update-hook 'helm-mp-highlight-match)) + (setq helm-compile-source-functions + (delq 'helm-compile-source--match-plugin + helm-compile-source-functions)) + (remove-hook 'helm-update-hook 'helm-mp-highlight-match))) + + +;;; Build regexps +;; +;; +(defvar helm-mp-space-regexp "[\\ ] " + "Regexp to represent space itself in multiple regexp match.") + +(defun helm-mp-split-pattern (pattern) + "Split PATTERN if it contain spaces and return resulting list. +If spaces in PATTERN are escaped, don't split at this place. +i.e \"foo bar\"=> (\"foo\" \"bar\") +but \"foo\ bar\"=> (\"foobar\")." + (if (string= pattern "") + '("") + (cl-loop for s in (split-string + (replace-regexp-in-string helm-mp-space-regexp + "\000\000" pattern) + " " t) + collect (replace-regexp-in-string "\000\000" " " s)))) + +(defun helm-mp-1-make-regexp (pattern) + "Replace spaces in PATTERN with \"\.*\"." + (mapconcat 'identity (helm-mp-split-pattern pattern) ".*")) + + +;;; Exact match. +;; +;; +;; Internal. +(defvar helm-mp-exact-pattern-str nil) +(defvar helm-mp-exact-pattern-real nil) + +(defun helm-mp-exact-get-pattern (pattern) + (unless (equal pattern helm-mp-exact-pattern-str) + (setq helm-mp-exact-pattern-str pattern + helm-mp-exact-pattern-real (concat "\n" pattern "\n"))) + helm-mp-exact-pattern-real) + + +(defun helm-mp-exact-match (str &optional pattern) + (string= str (or pattern helm-pattern))) + +(defun helm-mp-exact-search (pattern &rest _ignore) + (and (search-forward (helm-mp-exact-get-pattern pattern) nil t) + (forward-line -1))) + +(defun helm-mp-exact-search-backward (pattern &rest _ignore) + (and (search-backward (helm-mp-exact-get-pattern pattern) nil t) + (forward-line 1))) + + +;;; Prefix match +;; +;; +;; Internal +(defvar helm-mp-prefix-pattern-str nil) +(defvar helm-mp-prefix-pattern-real nil) + +(defun helm-mp-prefix-get-pattern (pattern) + (unless (equal pattern helm-mp-prefix-pattern-str) + (setq helm-mp-prefix-pattern-str pattern + helm-mp-prefix-pattern-real (concat "\n" pattern))) + helm-mp-prefix-pattern-real) + +(defun helm-mp-prefix-match (str &optional pattern) + (setq pattern (or pattern helm-pattern)) + (let ((len (length pattern))) + (and (<= len (length str)) + (string= (substring str 0 len) pattern )))) + +(defun helm-mp-prefix-search (pattern &rest _ignore) + (search-forward (helm-mp-prefix-get-pattern pattern) nil t)) + +(defun helm-mp-prefix-search-backward (pattern &rest _ignore) + (and (search-backward (helm-mp-prefix-get-pattern pattern) nil t) + (forward-line 1))) + + +;;; Multiple regexp patterns 1 (order is preserved / prefix). +;; +;; +;; Internal +(defvar helm-mp-1-pattern-str nil) +(defvar helm-mp-1-pattern-real nil) + +(defun helm-mp-1-get-pattern (pattern) + (unless (equal pattern helm-mp-1-pattern-str) + (setq helm-mp-1-pattern-str pattern + helm-mp-1-pattern-real + (concat "^" (helm-mp-1-make-regexp pattern)))) + helm-mp-1-pattern-real) + +(cl-defun helm-mp-1-match (str &optional (pattern helm-pattern)) + (string-match (helm-mp-1-get-pattern pattern) str)) + +(defun helm-mp-1-search (pattern &rest _ignore) + (re-search-forward (helm-mp-1-get-pattern pattern) nil t)) + +(defun helm-mp-1-search-backward (pattern &rest _ignore) + (re-search-backward (helm-mp-1-get-pattern pattern) nil t)) + + +;;; Multiple regexp patterns 2 (order is preserved / partial). +;; +;; +;; Internal +(defvar helm-mp-2-pattern-str nil) +(defvar helm-mp-2-pattern-real nil) + +(defun helm-mp-2-get-pattern (pattern) + (unless (equal pattern helm-mp-2-pattern-str) + (setq helm-mp-2-pattern-str pattern + helm-mp-2-pattern-real + (concat "^.*" (helm-mp-1-make-regexp pattern)))) + helm-mp-2-pattern-real) + +(cl-defun helm-mp-2-match (str &optional (pattern helm-pattern)) + (string-match (helm-mp-2-get-pattern pattern) str)) + +(defun helm-mp-2-search (pattern &rest _ignore) + (re-search-forward (helm-mp-2-get-pattern pattern) nil t)) + +(defun helm-mp-2-search-backward (pattern &rest _ignore) + (re-search-backward (helm-mp-2-get-pattern pattern) nil t)) + + +;;; Multiple regexp patterns 3 (permutation). +;; +;; +;; Internal +(defvar helm-mp-3-pattern-str nil) +(defvar helm-mp-3-pattern-list nil) + +(defun helm-mp-3-get-patterns (pattern) + "Return `helm-mp-3-pattern-list', a list of predicate/regexp cons cells. +e.g ((identity . \"foo\") (identity . \"bar\")). +This is done only if `helm-mp-3-pattern-str' is same as PATTERN." + (unless (equal pattern helm-mp-3-pattern-str) + (setq helm-mp-3-pattern-str pattern + helm-mp-3-pattern-list + (helm-mp-3-get-patterns-internal pattern))) + helm-mp-3-pattern-list) + +(defun helm-mp-3-get-patterns-internal (pattern) + "Return a list of predicate/regexp cons cells. +e.g ((identity . \"foo\") (identity . \"bar\"))." + (unless (string= pattern "") + (cl-loop for pat in (helm-mp-split-pattern pattern) + collect (if (string= "!" (substring pat 0 1)) + (cons 'not (substring pat 1)) + (cons 'identity pat))))) + +(defun helm-mp-3-match (str &optional pattern) + "Check if PATTERN match STR. +When PATTERN contain a space, it is splitted and matching is done +with the several resulting regexps against STR. +e.g \"bar foo\" will match \"foobar\" and \"barfoo\". +Argument PATTERN, a string, is transformed in a list of +cons cell with `helm-mp-3-get-patterns' if it contain a space. +e.g \"foo bar\"=>((identity . \"foo\") (identity . \"bar\")). +Then each predicate of cons cell(s) is called with regexp of same +cons cell against STR (a candidate). +i.e (identity (string-match \"foo\" \"foo bar\")) => t." + (let ((pat (helm-mp-3-get-patterns (or pattern helm-pattern)))) + (cl-loop for (predicate . regexp) in pat + always (funcall predicate (string-match regexp str))))) + +(defun helm-mp-3-search-base (pattern searchfn1 searchfn2) + "Try to find PATTERN in `helm-buffer' with SEARCHFN1 and SEARCHFN2. +This is the search function for `candidates-in-buffer' enabled sources. +Use the same method as `helm-mp-3-match' except it search in buffer +instead of matching on a string. +i.e (identity (re-search-forward \"foo\" (point-at-eol) t)) => t." + (cl-loop with pat = (if (stringp pattern) + (helm-mp-3-get-patterns pattern) + pattern) + while (funcall searchfn1 (or (cdar pat) "") nil t) + for bol = (point-at-bol) + for eol = (point-at-eol) + if (cl-loop for (pred . str) in (cdr pat) always + (progn (goto-char bol) + (funcall pred (funcall searchfn2 str eol t)))) + do (goto-char eol) and return t + else do (goto-char eol) + finally return nil)) + +(defun helm-mp-3-search (pattern &rest _ignore) + (when (stringp pattern) + (setq pattern (helm-mp-3-get-patterns pattern))) + (helm-mp-3-search-base + pattern 're-search-forward 're-search-forward)) + +(defun helm-mp-3-search-backward (pattern &rest _ignore) + (when (stringp pattern) + (setq pattern (helm-mp-3-get-patterns pattern))) + (helm-mp-3-search-base + pattern 're-search-backward 're-search-backward)) + + +;;; mp-3p- (multiple regexp pattern 3 with prefix search) +;; +;; +(defun helm-mp-3p-match (str &optional pattern) + "Check if PATTERN match STR. +Same as `helm-mp-3-match' but more strict, matching against prefix also. +e.g \"bar foo\" will match \"barfoo\" but not \"foobar\" contrarily to +`helm-mp-3-match'." + (let* ((pat (helm-mp-3-get-patterns (or pattern helm-pattern))) + (first (car pat))) + (and (funcall (car first) (helm-mp-prefix-match str (cdr first))) + (cl-loop for (predicate . regexp) in (cdr pat) + always (funcall predicate (string-match regexp str)))))) + +(defun helm-mp-3p-search (pattern &rest _ignore) + (when (stringp pattern) + (setq pattern (helm-mp-3-get-patterns pattern))) + (helm-mp-3-search-base + pattern 'helm-mp-prefix-search 're-search-forward)) + +(defun helm-mp-3p-search-backward (pattern &rest _ignore) + (when (stringp pattern) + (setq pattern (helm-mp-3-get-patterns pattern))) + (helm-mp-3-search-base + pattern 'helm-mp-prefix-search-backward 're-search-backward)) + + +;;; source compiler +;; +;; +(defun helm-compile-source--match-plugin (source) + (if (assoc 'no-matchplugin source) + source + (let* ((searchers (if (assoc 'search-from-end source) + helm-mp-default-search-backward-functions + helm-mp-default-search-functions)) + (defmatch (helm-aif (assoc-default 'match source) + (helm-mklist it))) + (defmatch-strict (helm-aif (assoc-default 'match-strict source) + (helm-mklist it))) + (defsearch (helm-aif (assoc-default 'search source) + (helm-mklist it))) + (defsearch-strict (helm-aif (assoc-default 'search-strict source) + (helm-mklist it))) + (matchfns (cond (defmatch-strict) + (defmatch + (append helm-mp-default-match-functions defmatch)) + (t helm-mp-default-match-functions))) + (searchfns (cond (defsearch-strict) + (defsearch + (append searchers defsearch)) + (t searchers)))) + `(,(if (or (assoc 'candidates-in-buffer source) + (equal '(identity) matchfns)) + '(match identity) `(match ,@matchfns)) + (search ,@searchfns) + ,@source)))) + + +;;; Highlight matches. +;; +;; +(defun helm-mp-highlight-match () + "Highlight matches after `helm-mp-highlight-delay' seconds." + (unless (or (assoc 'nohighlight (helm-get-current-source)) + (not helm-mp-highlight-delay) + (helm-empty-buffer-p) + (string= helm-pattern "")) + (helm-mp-highlight-match-internal (window-end (helm-window))) + (run-with-idle-timer helm-mp-highlight-delay nil + 'helm-mp-highlight-match-internal + (with-current-buffer helm-buffer (point-max))))) + +(defun helm-mp-highlight-region (start end regexp face) + (save-excursion + (goto-char start) + (let ((case-fold-search (helm-set-case-fold-search regexp)) me) + (condition-case _err + (while (and (setq me (re-search-forward regexp nil t)) + (< (point) end) + (< 0 (- (match-end 0) (match-beginning 0)))) + (unless (helm-pos-header-line-p) + (put-text-property (match-beginning 0) me 'face face))) + (invalid-regexp nil))))) + +(defun helm-mp-highlight-match-internal (end) + (when helm-alive-p + (set-buffer helm-buffer) + (let ((requote (cl-loop for (pred . re) in + (helm-mp-3-get-patterns helm-pattern) + when (and (eq pred 'identity) + (>= (length re) + helm-mp-highlight-threshold)) + collect re into re-list + finally return + (if (and re-list (>= (length re-list) 1)) + (mapconcat 'identity re-list "\\|") + (regexp-quote helm-pattern))))) + (when (>= (length requote) helm-mp-highlight-threshold) + (helm-mp-highlight-region + (point-min) end requote 'helm-match))))) + +;; Enable match-plugin by default. +(helm-match-plugin-mode 1) + +(provide 'helm-match-plugin) + + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions obsolete) +;; coding: utf-8 +;; indent-tabs-mode: nil +;; End: + +;;; helm-match-plugin.el ends here diff --git a/elpa/helm-20140808.2300/helm-match-plugin.elc b/elpa/helm-20140808.2300/helm-match-plugin.elc new file mode 100644 index 0000000000000000000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&w)=p_TtX=it8hQdyZF!OohR4U@TU!a^6hQm5+DikW(Yt6fvY=cC=*jrS=idK?(ulKJy(hh2ivR+Q(%ycN1JK?nU zsQJ1(pvrvHcmf5i{g~Zn + +;; 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 . + +;;; Code: +(require 'cl-lib) +(require 'helm) + + +(defgroup helm-misc nil + "Various Applications and libraries for Helm." + :group 'helm) + +(defcustom helm-time-zone-home-location "Paris" + "The time zone of your home" + :group 'helm-misc + :type 'string) + +(defcustom helm-mini-default-sources '(helm-source-buffers-list + helm-source-recentf + helm-source-buffer-not-found) + "Default sources list used in `helm-mini'." + :group 'helm-misc + :type '(repeat (choice symbol))) + +(defface helm-time-zone-current + '((t (:foreground "green"))) + "Face used to colorize current time in `helm-world-time'." + :group 'helm-misc) + +(defface helm-time-zone-home + '((t (:foreground "red"))) + "Face used to colorize home time in `helm-world-time'." + :group 'helm-misc) + + +;;; Latex completion +(defvar LaTeX-math-menu) +(defun helm-latex-math-candidates () + "Collect candidates for latex math completion." + (cl-loop for i in (cddr LaTeX-math-menu) + for elm = (cl-loop for s in i when (vectorp s) + collect (cons (aref s 0) (aref s 1))) + append elm)) + +(defvar helm-source-latex-math + '((name . "Latex Math Menu") + (init . (lambda () + (with-helm-current-buffer + (LaTeX-math-mode 1)))) + (candidate-number-limit . 9999) + (candidates . helm-latex-math-candidates) + (action . (lambda (candidate) + (call-interactively candidate))))) + + +;;;; +(defvar helm-source-fixme + '((name . "TODO/FIXME/DRY comments") + (headline . "^.*\\<\\(TODO\\|FIXME\\|DRY\\)\\>.*$") + (adjust) + (recenter)) + "Show TODO/FIXME/DRY comments in current file.") + +(defvar helm-source-rd-headline + '((name . "RD HeadLine") + (headline "^= \\(.+\\)$" "^== \\(.+\\)$" "^=== \\(.+\\)$" "^==== \\(.+\\)$") + (condition . (memq major-mode '(rdgrep-mode rd-mode))) + (migemo) + (subexp . 1)) + "Show RD headlines. + +RD is Ruby's POD. +http://en.wikipedia.org/wiki/Ruby_Document_format") + +(defvar helm-source-oddmuse-headline + '((name . "Oddmuse HeadLine") + (headline "^= \\(.+\\) =$" "^== \\(.+\\) ==$" + "^=== \\(.+\\) ===$" "^==== \\(.+\\) ====$") + (condition . (memq major-mode '(oddmuse-mode yaoddmuse-mode))) + (migemo) + (subexp . 1)) + "Show Oddmuse headlines, such as EmacsWiki.") + +(defvar helm-source-emacs-source-defun + '((name . "Emacs Source DEFUN") + (headline . "DEFUN\\|DEFVAR") + (condition . (string-match "/emacs2[0-9].+/src/.+c$" + (or buffer-file-name "")))) + "Show DEFUN/DEFVAR in Emacs C source file.") + +(defvar helm-source-emacs-lisp-expectations + '((name . "Emacs Lisp Expectations") + (headline . "(desc[ ]\\|(expectations") + (condition . (eq major-mode 'emacs-lisp-mode))) + "Show descriptions (desc) in Emacs Lisp Expectations. + +http://www.emacswiki.org/cgi-bin/wiki/download/el-expectations.el") + +(defvar helm-source-emacs-lisp-toplevels + '((name . "Emacs Lisp Toplevel / Level 4 Comment / Linkd Star") + (headline . "^(\\|(@\\*\\|^;;;;") + (get-line . buffer-substring) + (condition . (eq major-mode 'emacs-lisp-mode)) + (adjust)) + "Show top-level forms, level 4 comments and linkd stars (optional) in Emacs Lisp. +linkd.el is optional because linkd stars are extracted by regexp. +http://www.emacswiki.org/cgi-bin/wiki/download/linkd.el") + + +;;; Eev anchors +(defvar helm-source-eev-anchor + '((name . "Anchors") + (candidates + . (lambda () + (ignore-errors + (with-helm-current-buffer + (cl-loop initially (goto-char (point-min)) + while (re-search-forward + (format ee-anchor-format "\\([^\.].+\\)") nil t) + for anchor = (match-string-no-properties 1) + collect (cons (format "%5d:%s" + (line-number-at-pos (match-beginning 0)) + (format ee-anchor-format anchor)) + anchor)))))) + (persistent-action . (lambda (item) + (ee-to item) + (helm-highlight-current-line))) + (persistent-help . "Show this entry") + (action . (("Goto link" . ee-to))))) + +;;; Jabber Contacts (jabber.el) +(defun helm-jabber-online-contacts () + "List online Jabber contacts." + (with-no-warnings + (cl-loop for item in (jabber-concat-rosters) + when (get item 'connected) + collect + (if (get item 'name) + (cons (get item 'name) item) + (cons (symbol-name item) item))))) + +(defvar helm-source-jabber-contacts + '((name . "Jabber Contacts") + (init . (lambda () (require 'jabber))) + (candidates . (lambda () (mapcar 'car (helm-jabber-online-contacts)))) + (action . (lambda (x) + (jabber-chat-with + (jabber-read-account) + (symbol-name + (cdr (assoc x (helm-jabber-online-contacts))))))))) + +;;; World time +;; +(defun helm-time-zone-transformer (candidates _source) + (cl-loop for i in candidates + collect + (cond ((string-match (format-time-string "%H:%M" (current-time)) i) + (propertize i 'face 'helm-time-zone-current)) + ((string-match helm-time-zone-home-location i) + (propertize i 'face 'helm-time-zone-home)) + (t i)))) + +(defvar helm-source-time-world + '((name . "Time World List") + (init . (lambda () + (require 'time) + (let ((helm-buffer (helm-candidate-buffer 'global))) + (with-current-buffer helm-buffer + (display-time-world-display display-time-world-list))))) + (candidates-in-buffer) + (filtered-candidate-transformer . helm-time-zone-transformer))) + +;;; LaCarte +;; +;; +(defun helm-create-lacarte-source (name &optional maps) + "Create lacarte source named NAME for MAPS. +MAPS is like in `lacarte-get-overall-menu-item-alist'. +See + http://www.emacswiki.org/cgi-bin/wiki/download/lacarte.el" + `((name . ,name) + (init . (lambda () (require 'lacarte))) + (candidates . (lambda () + (with-helm-current-buffer + (delete '(nil) (lacarte-get-overall-menu-item-alist ,@maps))))) + (candidate-transformer . helm-lacarte-candidate-transformer) + (candidate-number-limit . 9999) + (type . command))) + +(defun helm-lacarte-candidate-transformer (cands) + (mapcar (lambda (cand) + (let* ((item (car cand)) + (match (string-match "[^>] \\((.*)\\)$" item))) + (when match + (put-text-property (match-beginning 1) (match-end 1) + 'face 'helm-M-x-key item)) + cand)) + cands)) + +(defvar helm-source-lacarte (helm-create-lacarte-source "Lacarte") + "Helm interface for lacarte.el. +See + http://www.emacswiki.org/cgi-bin/wiki/download/lacarte.el") + +;;;###autoload +(defun helm-browse-menubar () + "Helm interface to the menubar using lacarte.el." + (interactive) + (require 'lacarte) + (helm :sources 'helm-source-lacarte :buffer "*helm lacarte*")) + +(defun helm-call-interactively (cmd-or-name) + "Execute CMD-OR-NAME as Emacs command. +It is added to `extended-command-history'. +`helm-current-prefix-arg' is used as the command's prefix argument." + (setq extended-command-history + (cons (helm-stringify cmd-or-name) + (delete (helm-stringify cmd-or-name) extended-command-history))) + (let ((current-prefix-arg helm-current-prefix-arg) + (cmd (helm-symbolify cmd-or-name))) + (if (stringp (symbol-function cmd)) + (execute-kbd-macro (symbol-function cmd)) + (setq this-command cmd) + (call-interactively cmd)))) + +;;; Minibuffer History +;; +;; +(defvar helm-source-minibuffer-history + '((name . "Minibuffer History") + (header-name . (lambda (name) + (format "%s (%s)" name minibuffer-history-variable))) + (candidates + . (lambda () + (let ((history (cl-loop for i in + (symbol-value minibuffer-history-variable) + unless (string= "" i) collect i))) + (if (consp (car history)) + (mapcar 'prin1-to-string history) + history)))) + (migemo) + (multiline) + (action . (lambda (candidate) + (delete-minibuffer-contents) + (insert candidate))))) + +;;; Shell history +;; +;; +(defun helm-comint-input-ring-action (candidate) + "Default action for comint history." + (with-helm-current-buffer + (delete-region (comint-line-beginning-position) (point-max)) + (insert candidate))) + +(defvar helm-source-comint-input-ring + '((name . "Comint history") + (candidates . (lambda () + (with-helm-current-buffer + (ring-elements comint-input-ring)))) + (action . helm-comint-input-ring-action)) + "Source that provide helm completion against `comint-input-ring'.") + + +;;; Helm ratpoison UI +;; +;; +(defvar helm-source-ratpoison-commands + '((name . "Ratpoison Commands") + (init . helm-ratpoison-commands-init) + (candidates-in-buffer) + (action ("Execute the command" . helm-ratpoison-commands-execute)) + (display-to-real . helm-ratpoison-commands-display-to-real) + (candidate-number-limit))) + +(defun helm-ratpoison-commands-init () + (unless (helm-candidate-buffer) + (with-current-buffer (helm-candidate-buffer 'global) + ;; with ratpoison prefix key + (save-excursion + (call-process "ratpoison" nil (current-buffer) nil "-c" "help")) + (while (re-search-forward "^\\([^ ]+\\) \\(.+\\)$" nil t) + (replace-match " \\1: \\2")) + (goto-char (point-max)) + ;; direct binding + (save-excursion + (call-process "ratpoison" nil (current-buffer) nil "-c" "help top")) + (while (re-search-forward "^\\([^ ]+\\) \\(.+\\)$" nil t) + (replace-match "\\1: \\2"))))) + +(defun helm-ratpoison-commands-display-to-real (display) + (and (string-match ": " display) + (substring display (match-end 0)))) + +(defun helm-ratpoison-commands-execute (candidate) + (call-process "ratpoison" nil nil nil "-ic" candidate)) + +;;; Helm stumpwm UI +;; +;; +(defvar helm-source-stumpwm-commands + '((name . "Stumpwm Commands") + (init . helm-stumpwm-commands-init) + (candidates-in-buffer) + (action ("Execute the command" . helm-stumpwm-commands-execute)) + (candidate-number-limit))) + +(defun helm-stumpwm-commands-init () + (with-current-buffer (helm-candidate-buffer 'global) + (save-excursion + (call-process "stumpish" nil (current-buffer) nil "commands")) + (while (re-search-forward "[ ]*\\([^ ]+\\)[ ]*\n?" nil t) + (replace-match "\n\\1\n")) + (delete-blank-lines) + (sort-lines nil (point-min) (point-max)) + (goto-char (point-max)))) + +(defun helm-stumpwm-commands-execute (candidate) + (call-process "stumpish" nil nil nil candidate)) + +;;;###autoload +(defun helm-world-time () + "Preconfigured `helm' to show world time." + (interactive) + (helm-other-buffer 'helm-source-time-world "*helm world time*")) + +;;;###autoload +(defun helm-insert-latex-math () + "Preconfigured helm for latex math symbols completion." + (interactive) + (helm-other-buffer 'helm-source-latex-math "*helm latex*")) + +;;;###autoload +(defun helm-eev-anchors () + "Preconfigured `helm' for eev anchors." + (interactive) + (helm-other-buffer 'helm-source-eev-anchor "*Helm eev anchors*")) + +;;;###autoload +(defun helm-ratpoison-commands () + "Preconfigured `helm' to execute ratpoison commands." + (interactive) + (helm-other-buffer 'helm-source-ratpoison-commands + "*helm ratpoison commands*")) + +;;;###autoload +(defun helm-stumpwm-commands() + (interactive) + (helm-other-buffer 'helm-source-stumpwm-commands + "*helm stumpwm commands*")) + + +;;;###autoload +(defun helm-mini () + "Preconfigured `helm' lightweight version \(buffer -> recentf\)." + (interactive) + (require 'helm-files) + (let ((helm-ff-transformer-show-only-basename nil)) + (helm-other-buffer helm-mini-default-sources "*helm mini*"))) + +;;;###autoload +(defun helm-minibuffer-history () + "Preconfigured `helm' for `minibuffer-history'." + (interactive) + (let ((enable-recursive-minibuffers t)) + (helm-other-buffer 'helm-source-minibuffer-history + "*helm minibuffer-history*"))) + +;;;###autoload +(defun helm-comint-input-ring () + "Predefined `helm' that provide completion of `comint' history." + (interactive) + (when (derived-mode-p 'comint-mode) + (helm :sources 'helm-source-comint-input-ring + :input (buffer-substring-no-properties (comint-line-beginning-position) + (point-at-eol)) + :buffer "*helm comint history*"))) + + +(provide 'helm-misc) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions obsolete) +;; coding: utf-8 +;; indent-tabs-mode: nil +;; End: + +;;; helm-misc.el ends here diff --git a/elpa/helm-20140808.2300/helm-misc.elc b/elpa/helm-20140808.2300/helm-misc.elc new file mode 100644 index 0000000000000000000000000000000000000000..6ed42c1083b60b19955b8e9fe1aeb61eae52a243 GIT binary patch literal 11948 zcmb_i`E%PwmX_sNZ=$W*O4aVx&de{FSu3~Q*`XWgDEKkGuBKrn+(<~QW z5P;EQ9cRDg?k~{@63~c~T=+?xdzd`W$MzmZV*Bvy=-D&jPrTIgb8PY(UfzoXktM?S zVlk2;O1#=4nwd;UFO5Q(ihP2JZda`f4g6Dow1I#2Z)(J}y3(==6?{@t>yBG(6_u5oh>(i8rbIaUP~p_>mojBSF?E z{CSoqQ#+7;)6u$6ELbl=C$r9l zBh=4fJd7LTxQQX_^+XDyEQqp5#^NfOr-D|%uJWsy6v`6}e{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Ch(3TT)zSiP!9 JZ{aq#{vScA(&PXD literal 0 HcmV?d00001 diff --git a/elpa/helm-20140808.2300/helm-mode.el b/elpa/helm-20140808.2300/helm-mode.el new file mode 100644 index 000000000..2dc238a26 --- /dev/null +++ b/elpa/helm-20140808.2300/helm-mode.el @@ -0,0 +1,1042 @@ +;;; helm-mode.el --- Enable helm completion everywhere. -*- lexical-binding: t -*- + +;; Copyright (C) 2012 ~ 2014 Thierry Volpiatto + +;; 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 . + +;;; Code: + +(require 'cl-lib) +(require 'helm) +(require 'helm-files) + + +(defgroup helm-mode nil + "Enable helm completion." + :group 'helm) + +(defcustom helm-completing-read-handlers-alist + '((describe-function . helm-completing-read-symbols) + (describe-variable . helm-completing-read-symbols) + (debug-on-entry . helm-completing-read-symbols) + (find-function . helm-completing-read-symbols) + (find-tag . helm-completing-read-with-cands-in-buffer) + (ffap-alternate-file . nil) + (tmm-menubar . nil)) + "Alist of handlers to replace `completing-read', `read-file-name' in `helm-mode'. +Each entry is a cons cell like \(emacs_command . completing-read_handler\) +where key and value are symbols. + +Each key is an Emacs command that use originaly `completing-read'. + +Each value maybe an helm function that take same arguments as +`completing-read' plus NAME and BUFFER, where NAME is the name of the new +helm source and BUFFER the name of the buffer we will use. +This function prefix name must start by \"helm\". + +See `helm-completing-read-symbols' for example. + +Note that this function will be reused for ALL the `completing-read' +of this command, so it should handle all cases, e.g +If first `completing-read' complete against symbols and +second `completing-read' should handle only buffer, +your specialized function should handle the both. + +If the value of an entry is nil completion will fall back to +emacs vanilla behavior. +e.g If you want to disable helm completion for `describe-function': +\(describe-function . nil\). + +Ido is also supported, you can use `ido-completing-read' and +`ido-read-file-name' as value of an entry or just 'ido. +e.g ido completion for `find-file': +\(find-file . ido\) +same as +\(find-file . ido-read-file-name\) +Note that you don't need to enable `ido-mode' for this to work." + :group 'helm-mode + :type '(alist :key-type symbol :value-type symbol)) + +(defcustom helm-comp-read-case-fold-search helm-case-fold-search + "Default Local setting of `helm-case-fold-search' for `helm-comp-read'. +See `helm-case-fold-search' for more info." + :group 'helm-mode + :type 'symbol) + +(defcustom helm-mode-handle-completion-in-region t + "Whether to replace or not `completion-in-region-function'. +This enable support for `completing-read-multiple' and `completion-at-point' +when non--nil." + :group 'helm-mode + :type 'boolean) + +(defcustom helm-mode-reverse-history t + "Display history source after current source in `helm-mode' handled commands." + :group 'helm-mode + :type 'boolean) + + +(defvar helm-comp-read-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map helm-map) + (define-key map (kbd "") 'helm-cr-empty-string) + map) + "Keymap for `helm-comp-read'.") + + +;;; Internal +;; +;; +;; Flag to know if `helm-pattern' have been added +;; to candidate list in `helm-comp-read'. +(defvar helm-cr-unknown-pattern-flag nil) + + +;;; Helm `completing-read' replacement +;; +;; +(defun helm-cr-empty-string () + "Return empty string." + (interactive) + (with-helm-alive-p + (helm-quit-and-execute-action + #'(lambda (_candidate) + (identity ""))))) + +(defun helm-comp-read-get-candidates (collection &optional test sort-fn alistp) + "Convert COLLECTION to list removing elements that don't match TEST. +See `helm-comp-read' about supported COLLECTION arguments. + +SORT-FN is a predicate to sort COLLECTION. + +ALISTP when non--nil will not use `all-completions' to collect +candidates because it doesn't handle alists correctly for helm. +i.e In `all-completions' the car of each pair is used as value. +In helm we want to use the cdr instead like \(display . real\), +so we return the alist as it is with no transformation by all-completions. + +e.g + +\(setq A '((a . 1) (b . 2) (c . 3))) +==>((a . 1) (b . 2) (c . 3)) +\(helm-comp-read \"test: \" A :alistp nil + :exec-when-only-one t + :initial-input \"a\") +==>\"a\" Which is not what we expect. + +\(helm-comp-read \"test: \" A :alistp t + :exec-when-only-one t + :initial-input \"1\") +==>\"1\" + +See docstring of `all-completions' for more info. + +If COLLECTION is an `obarray', a TEST should be needed. See `obarray'." + + (let ((cands + (cond ((vectorp collection) + (all-completions "" collection test)) + ((and (symbolp collection) (boundp collection) + ;; Issue #324 history is let-bounded and given + ;; quoted as hist argument of completing-read. + ;; See example in `rcirc-browse-url'. + (symbolp (symbol-value collection))) + nil) + ;; When collection is a symbol, most of the time + ;; it should be a symbol used as a minibuffer-history. + ;; The value of this symbol in this case return a list + ;; of string which maybe are converted later as symbol + ;; in special cases. + ;; we treat here commandp as a special case as it return t + ;; also with a string unless its last arg is provided. + ;; Also, the history collections generally collect their + ;; elements as string, so intern them to call predicate. + ((and (symbolp collection) (boundp collection) test) + (let ((predicate `(lambda (elm) + (condition-case err + (if (eq (quote ,test) 'commandp) + (funcall (quote ,test) (intern elm)) + (funcall (quote ,test) elm)) + (wrong-type-argument + (funcall (quote ,test) (intern elm))))))) + (all-completions "" (symbol-value collection) predicate))) + ((and (symbolp collection) (boundp collection)) + (all-completions "" (symbol-value collection))) + ((and alistp test) + (cl-loop for i in collection when (funcall test i) collect i)) + (alistp collection) + (t (all-completions "" collection test))))) + (if sort-fn (sort cands sort-fn) cands))) + +(defun helm-cr-default-transformer (candidates _source) + "Default filter candidate function for `helm-comp-read'." + (cl-loop for c in candidates + for cand = (if (stringp c) (replace-regexp-in-string "\\s\\" "" c) c) + for pat = (replace-regexp-in-string "\\s\\" "" helm-pattern) + if (and (equal cand pat) helm-cr-unknown-pattern-flag) + collect + (cons (concat (propertize + " " 'display + (propertize "[?]" 'face 'helm-ff-prefix)) + c) + c) + into lst + else collect c into lst + finally return (helm-fast-remove-dups lst :test 'equal))) + +;;;###autoload +(cl-defun helm-comp-read (prompt collection + &key + test + initial-input + default + preselect + (buffer "*Helm Completions*") + must-match + reverse-history + (requires-pattern 0) + history + input-history + (case-fold helm-comp-read-case-fold-search) + (del-input t) + (persistent-action nil) + (persistent-help "DoNothing") + (mode-line helm-comp-read-mode-line) + (keymap helm-comp-read-map) + (name "Helm Completions") + candidates-in-buffer + exec-when-only-one + quit-when-no-cand + (volatile t) + sort + (fc-transformer 'helm-cr-default-transformer) + marked-candidates + nomark + (alistp t)) + "Read a string in the minibuffer, with helm completion. + +It is helm `completing-read' equivalent. + +- PROMPT is the prompt name to use. + +- COLLECTION can be a list, vector, obarray or hash-table. + It can be also a function that receives three arguments: + the values string, predicate and t. See `all-completions' for more details. + +Keys description: + +- TEST: A predicate called with one arg i.e candidate. + +- INITIAL-INPUT: Same as input arg in `helm'. + +- PRESELECT: See preselect arg of `helm'. + +- DEFAULT: This option is used only for compatibility with regular + Emacs `completing-read' (Same as DEFAULT arg of `completing-read'). + +- BUFFER: Name of helm-buffer. + +- MUST-MATCH: Candidate selected must be one of COLLECTION. + +- REVERSE-HISTORY: When non--nil display history source after current + source completion. + +- REQUIRES-PATTERN: Same as helm attribute, default is 0. + +- HISTORY: A list containing specific history, default is nil. + When it is non--nil, all elements of HISTORY are displayed in + a special source before COLLECTION. + +- INPUT-HISTORY: A symbol. the minibuffer input history will be + stored there, if nil or not provided, `minibuffer-history' + will be used instead. + +- CASE-FOLD: Same as `helm-case-fold-search'. + +- DEL-INPUT: Boolean, when non--nil (default) remove the partial + minibuffer input from HISTORY is present. + +- PERSISTENT-ACTION: A function called with one arg i.e candidate. + +- PERSISTENT-HELP: A string to document PERSISTENT-ACTION. + +- MODE-LINE: A string or list to display in mode line. + Default is `helm-comp-read-mode-line'. + +- KEYMAP: A keymap to use in this `helm-comp-read'. + (the keymap will be shared with history source) + +- NAME: The name related to this local source. + +- EXEC-WHEN-ONLY-ONE: Bound `helm-execute-action-at-once-if-one' + to non--nil. (possibles values are t or nil). + +- VOLATILE: Use volatile attribute \(enabled by default\). + +- SORT: A predicate to give to `sort' e.g `string-lessp'. + +- FC-TRANSFORMER: A `filtered-candidate-transformer' function. + +- MARKED-CANDIDATES: If non--nil return candidate or marked candidates as a list. + +- NOMARK: When non--nil don't allow marking candidates. + +- ALISTP: \(default is non--nil\) See `helm-comp-read-get-candidates'. + +- CANDIDATES-IN-BUFFER: when non--nil use a source build with + `helm-candidates-in-buffer' which is much faster. + Argument VOLATILE have no effect when CANDIDATES-IN-BUFFER is non--nil. + +Any prefix args passed during `helm-comp-read' invocation will be recorded +in `helm-current-prefix-arg', otherwise if prefix args were given before +`helm-comp-read' invocation, the value of `current-prefix-arg' will be used. +That's mean you can pass prefix args before or after calling a command +that use `helm-comp-read' See `helm-M-x' for example." + + (when (get-buffer helm-action-buffer) + (kill-buffer helm-action-buffer)) + (let ((action-fn `(("Sole action (Identity)" + . (lambda (candidate) + (if ,marked-candidates + (helm-marked-candidates) + (identity candidate))))))) + ;; Assume completion have been already required, + ;; so always use 'confirm. + (when (eq must-match 'confirm-after-completion) + (setq must-match 'confirm)) + (let* ((minibuffer-completion-confirm must-match) + (must-match-map (when must-match + (let ((map (make-sparse-keymap))) + (define-key map (kbd "RET") + 'helm-confirm-and-exit-minibuffer) + map))) + (loc-map (if must-match-map + (make-composed-keymap + must-match-map (or keymap helm-map)) + (or keymap helm-map))) + (helm-read-file-name-mode-line-string + (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)) + (setq cands (append (list helm-pattern) cands)) + (setq helm-cr-unknown-pattern-flag t)) + (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)))))) + (src-hist `((name . ,(format "%s History" name)) + (candidates . ,history-get-candidates) + (filtered-candidate-transformer + . (lambda (candidates sources) + (cl-loop for i in candidates + ;; Input is added to history in completing-read's + ;; and may be regexp-quoted, so unquote it. + for cand = (replace-regexp-in-string "\\s\\" "" i) + do (set-text-properties 0 (length cand) nil cand) + collect cand))) + (persistent-action . ,persistent-action) + (persistent-help . ,persistent-help) + (keymap . ,loc-map) + (mode-line . ,mode-line) + (action . ,action-fn))) + (src `((name . ,name) + (candidates . ,get-candidates) + (filtered-candidate-transformer . ,fc-transformer) + (requires-pattern . ,requires-pattern) + (persistent-action . ,persistent-action) + (persistent-help . ,persistent-help) + (keymap . ,loc-map) + (mode-line . ,mode-line) + (action . ,action-fn))) + (src-1 `((name . ,name) + (init . (lambda () + (helm-init-candidates-in-buffer + 'global (funcall ',get-candidates)))) + (candidates-in-buffer) + (filtered-candidate-transformer . ,fc-transformer) + (requires-pattern . ,requires-pattern) + (persistent-action . ,persistent-action) + (persistent-help . ,persistent-help) + (keymap . ,loc-map) + (mode-line . ,mode-line) + (action . ,action-fn))) + (src-list (list src-hist + (if candidates-in-buffer + src-1 + (if volatile + (append src '((volatile))) + src)))) + (helm-execute-action-at-once-if-one exec-when-only-one) + (helm-quit-if-no-candidate quit-when-no-cand) + result) + (when nomark + (setq src-list (cl-loop for src in src-list + collect (cons '(nomark) src)))) + (when reverse-history (setq src-list (nreverse src-list))) + (setq result (helm + :sources src-list + :input initial-input + :default default + :preselect preselect + :prompt prompt + :resume 'noresume + :case-fold-search case-fold + :keymap loc-map + :history (and (symbolp input-history) input-history) + :buffer buffer)) + ;; Avoid adding an incomplete input to history. + (when (and result history del-input) + (cond ((and (symbolp history) ; History is a symbol. + (not (symbolp (symbol-value history)))) ; Fix Issue #324. + ;; Be sure history is not a symbol with a nil value. + (helm-aif (symbol-value history) (setcar it result))) + ((consp history) ; A list with a non--nil value. + (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) + (keyboard-quit))))) + +;; Generic completing-read +;; +;; Support also function as collection. +;; e.g M-x man is supported. +;; Support hash-table and vectors as collection. +;; NOTE: +;; Some crap emacs functions may not be supported +;; like ffap-alternate-file (bad use of completing-read) +;; and maybe others. +;; Provide a mode `helm-mode' which turn on +;; helm in all `completing-read' and `read-file-name' in Emacs. +;; +(defvar helm-completion-mode-string " Helm") + +(defvar helm-completion-mode-quit-message + "Helm completion disabled") + +(defvar helm-completion-mode-start-message + "Helm completion enabled") + +;;; Specialized handlers +;; +;; +(defun helm-completing-read-symbols + (prompt _collection test _require-match init + hist default _inherit-input-method name buffer) + "Specialized function for fast symbols completion in `helm-mode'." + (or + (helm + :sources `((name . ,name) + (init . (lambda () + (with-current-buffer (helm-candidate-buffer 'global) + (goto-char (point-min)) + (when (and ,default (stringp ,default) + ;; Some defaults args result as + ;; (symbol-name nil) == "nil". + ;; e.g debug-on-entry. + (not (string= ,default "nil")) + (not (string= ,default ""))) + (insert (concat ,default "\n"))) + (cl-loop for sym in (all-completions "" obarray ',test) + for s = (intern sym) + unless (or (and ,default (string= sym ,default)) + (keywordp s)) + do (insert (concat sym "\n")))))) + (persistent-action . helm-lisp-completion-persistent-action) + (persistent-help . "Show brief doc in mode-line") + (candidates-in-buffer) + (action . identity)) + :prompt prompt + :buffer buffer + :input init + :history hist + :resume 'noresume + :default (or default "")) + (keyboard-quit))) + + +;;; Generic completing read +;; +;; +(defun helm-completing-read-default-1 + (prompt collection test require-match + init hist default _inherit-input-method + name buffer &optional cands-in-buffer exec-when-only-one) + "Call `helm-comp-read' with same args as `completing-read'. +Extra optional arg CANDS-IN-BUFFER mean use `candidates-in-buffer' +method which is faster. +It should be used when candidate list don't need to rebuild dynamically." + (let ((history (or (car-safe hist) hist))) + (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 (if (listp collection) + (append default collection) + ;; Else COLLECTION is maybe a function or a table. + (append default (all-completions "" collection)))) + (setq default (car default))) + (helm-comp-read + prompt collection + :test test + :history history + :reverse-history helm-mode-reverse-history + :input-history history + :must-match require-match + :alistp nil ; Be sure `all-completions' is used. + :name name + :requires-pattern (if (and (string= default "") + (or (eq require-match 'confirm) + (eq require-match + 'confirm-after-completion))) + 1 0) + :candidates-in-buffer cands-in-buffer + :exec-when-only-one exec-when-only-one + :buffer buffer + ;; If DEF is not provided, fallback to empty string + ;; to avoid `thing-at-point' to be appended on top of list + :default (or default "") + ;; Fail with special characters (e.g in gnus "nnimap+gmail:") + ;; if regexp-quote is not used. + ;; when init is added to history, it will be unquoted by + ; helm-comp-read. + :initial-input (and (stringp init) (regexp-quote init))))) + +(defun helm-completing-read-with-cands-in-buffer + (prompt collection test require-match + init hist default inherit-input-method + name buffer) + "Same as `helm-completing-read-default-1' but use candidates-in-buffer." + ;; Some commands like find-tag may use `read-file-name' from inside + ;; the calculation of collection. in this case it clash with + ;; candidates-in-buffer that reuse precedent data (files) which is wrong. + ;; So (re)calculate collection outside of main helm-session. + (let ((cands (all-completions "" collection))) + (helm-completing-read-default-1 prompt cands test require-match + init hist default inherit-input-method + name buffer t))) + +(cl-defun helm--completing-read-default + (prompt collection &optional + predicate require-match + initial-input hist def + inherit-input-method) + "An helm replacement of `completing-read'. +This function should be used only as a `completing-read-function'. + +Don't use it directly, use instead `helm-comp-read' in your programs. + +See documentation of `completing-read' and `all-completions' for details." + (let* ((current-command (or (helm-this-command) this-command)) + (str-command (if (consp current-command) ; Maybe a lambda. + "Anonymous" + (symbol-name current-command))) + (buf-name (format "*helm-mode-%s*" str-command)) + (entry (assq current-command + helm-completing-read-handlers-alist)) + (def-com (cdr-safe entry)) + (str-defcom (and def-com (symbol-name def-com))) + (def-args (list prompt collection predicate require-match + initial-input hist def inherit-input-method)) + ;; Append the two extra args needed to set the buffer and source name + ;; in helm specialized functions. + (any-args (append def-args (list str-command buf-name))) + helm-completion-mode-start-message ; Be quiet + helm-completion-mode-quit-message + ;; Be sure this pesty *completion* buffer doesn't popup. + ;; Note: `minibuffer-with-setup-hook' may setup a lambda + ;; calling `minibuffer-completion-help' or other minibuffer + ;; functions we DONT WANT here, in these cases removing the hook + ;; (a symbol) have no effect. Issue #448. + ;; But because `minibuffer-completion-table' and + ;; `minibuffer-completion-predicate' are not bound + ;; anymore here, these functions should have no effect now. + (minibuffer-setup-hook (remove 'minibuffer-completion-help + minibuffer-setup-hook)) + ;; Disable hack that could be used before `completing-read'. + ;; i.e (push ?\t unread-command-events). + unread-command-events) + (when (eq def-com 'ido) (setq def-com 'ido-completing-read)) + (unless (or (not entry) def-com) + ;; An entry in *read-handlers-alist exists but have + ;; a nil value, so we exit from here, disable `helm-mode' + ;; and run the command again with it original behavior. + ;; `helm-mode' will be restored on exit. + (cl-return-from helm--completing-read-default + (unwind-protect + (progn + (helm-mode -1) + (apply completing-read-function def-args)) + (helm-mode 1)))) + ;; If we use now `completing-read' we MUST turn off `helm-mode' + ;; to avoid infinite recursion and CRASH. It will be reenabled on exit. + (when (or (eq def-com 'completing-read) + ;; All specialized functions are prefixed by "helm" + (and (stringp str-defcom) + (not (string-match "^helm" str-defcom)))) + (helm-mode -1)) + (unwind-protect + (cond (;; An helm specialized function exists, run it. + (and def-com helm-mode) + (apply def-com any-args)) + (;; Try to handle `ido-completing-read' everywhere. + (and def-com (eq def-com 'ido-completing-read)) + (setcar (memq collection def-args) + (all-completions "" collection predicate)) + (apply def-com def-args)) + (;; User set explicitely `completing-read' or something similar + ;; in *read-handlers-alist, use this with exactly the same + ;; args as in `completing-read'. + ;; If we are here `helm-mode' is now disabled. + def-com + (apply def-com def-args)) + (t ; Fall back to classic `helm-comp-read'. + (helm-completing-read-default-1 + prompt collection predicate require-match + initial-input hist def inherit-input-method + str-command buf-name))) + (helm-mode 1) + ;; When exiting minibuffer, `this-command' is set to + ;; `helm-exit-minibuffer', which is unwanted when starting + ;; on another `completing-read', so restore `this-command' to + ;; initial value when exiting. + (setq this-command current-command)))) + +;;; Generic read-file-name +;; +;; +(cl-defun helm-read-file-name + (prompt + &key + (name "Read File Name") + (initial-input (expand-file-name default-directory)) + (buffer "*Helm file completions*") + test + (case-fold helm-file-name-case-fold-search) + preselect + history + must-match + default + marked-candidates + nomark + (alistp t) + (persistent-action 'helm-find-files-persistent-action) + (persistent-help "Hit1 Expand Candidate, Hit2 or (C-u) Find file") + (mode-line helm-read-file-name-mode-line-string)) + "Read a file name with helm completion. +It is helm `read-file-name' emulation. + +Argument PROMPT is the default prompt to use. + +Keys description: + +- NAME: Source name, default to \"Read File Name\". + +- INITIAL-INPUT: Where to start read file name, default to `default-directory'. + +- BUFFER: `helm-buffer' name default to \"*Helm Completions*\". + +- TEST: A predicate called with one arg 'candidate'. + +- CASE-FOLD: Same as `helm-case-fold-search'. + +- PRESELECT: helm preselection. + +- HISTORY: Display HISTORY in a special source. + +- MUST-MATCH: Can be 'confirm, nil, or t. + +- MARKED-CANDIDATES: When non--nil return a list of marked candidates. + +- NOMARK: When non--nil don't allow marking candidates. + +- ALISTP: Don't use `all-completions' in history (take effect only on history). + +- PERSISTENT-ACTION: a persistent action function. + +- PERSISTENT-HELP: persistent help message. + +- MODE-LINE: A mode line message, default is `helm-read-file-name-mode-line-string'." + + (when (get-buffer helm-action-buffer) + (kill-buffer helm-action-buffer)) + ;; Assume completion have been already required, + ;; so always use 'confirm. + (when (eq must-match 'confirm-after-completion) + (setq must-match 'confirm)) + (let* ((action-fn `(("Sole action (Identity)" + . (lambda (candidate) + (if ,marked-candidates + (helm-marked-candidates :with-wildcard t) + (identity candidate)))))) + (helm-mp-highlight-delay nil) + ;; Be sure we don't erase the underlying minibuffer if some. + (helm-ff-auto-update-initial-value + (and helm-ff-auto-update-initial-value + (not (minibuffer-window-active-p (minibuffer-window))))) + helm-full-frame + (hist (and history (helm-comp-read-get-candidates + history nil nil alistp))) + (minibuffer-completion-confirm must-match) + (must-match-map (when must-match + (let ((map (make-sparse-keymap))) + (define-key map (kbd "RET") + 'helm-confirm-and-exit-minibuffer) + map))) + (cmap (if must-match-map + (make-composed-keymap + must-match-map helm-read-file-map) + helm-read-file-map)) + (helm-read-file-name-mode-line-string + (replace-regexp-in-string "helm-maybe-exit-minibuffer" + "helm-confirm-and-exit-minibuffer" + helm-read-file-name-mode-line-string)) + (src-list `(((name . ,(format "%s History" name)) + (header-name . (lambda (hname) + (concat hname + helm-find-files-doc-header))) + (mode-line . ,mode-line) + (candidates . ,hist) + (keymap . ,cmap) + (persistent-action . ,persistent-action) + (persistent-help . ,persistent-help) + (action . ,action-fn)) + ((name . ,name) + (header-name . (lambda (hname) + (concat hname + helm-find-files-doc-header))) + (init . (lambda () + (setq helm-ff-auto-update-flag + helm-ff-auto-update-initial-value) + (setq helm-ff-auto-update--state + helm-ff-auto-update-flag) + (helm-set-local-variable 'helm-in-file-completion-p t))) + (mode-line . ,mode-line) + (candidates + . (lambda () + (append (and (not (file-exists-p helm-pattern)) + (list helm-pattern)) + (if ',test + (cl-loop with hn = (helm-ff-tramp-hostnames) + for i in (helm-find-files-get-candidates + ',must-match) + when (or (member i hn) ; A tramp host + (funcall ',test i)) ; Test ok + collect i) + (helm-find-files-get-candidates ',must-match))))) + (filtered-candidate-transformer . helm-ff-sort-candidates) + (filter-one-by-one . helm-ff-filter-candidate-one-by-one) + (keymap . ,cmap) + (persistent-action . ,persistent-action) + (candidate-number-limit . 9999) + (persistent-help . ,persistent-help) + (volatile) + (action . ,action-fn)))) + (result (helm + :sources (if nomark + (cl-loop for src in src-list + collect (cons '(nomark) src)) + src-list) + :input initial-input + :prompt prompt + :resume 'noresume + :case-fold-search case-fold + :default default + :buffer buffer + :preselect preselect))) + (or + (cond ((and result (stringp result) + (string= result "") "")) + ((and result + (stringp result) + (file-equal-p result initial-input) + default) + default) + ((and result (stringp result)) + (expand-file-name result)) + ((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)) + (keyboard-quit)))) + +(cl-defun helm--generic-read-file-name + (prompt &optional dir default-filename mustmatch initial predicate) + "Generic helm replacement of `read-file-name'. +Don't use it directly, use instead `helm-read-file-name' in your programs." + (let* ((init (or initial dir default-directory)) + (current-command (or (helm-this-command) this-command)) + (str-command (symbol-name current-command)) + (helm-file-completion-sources + (cons str-command + (remove str-command helm-file-completion-sources))) + (buf-name (format "*helm-mode-%s*" str-command)) + (entry (assq current-command + helm-completing-read-handlers-alist)) + (def-com (cdr-safe entry)) + (str-defcom (and def-com (symbol-name def-com))) + (def-args (list prompt dir default-filename mustmatch initial predicate)) + ;; Append the two extra args needed to set the buffer and source name + ;; in helm specialized functions. + (any-args (append def-args (list str-command buf-name))) + (ido-state ido-mode) + helm-completion-mode-start-message ; Be quiet + helm-completion-mode-quit-message ; Same here + fname) + ;; Some functions that normally call `completing-read' can switch + ;; brutally to `read-file-name' (e.g find-tag), in this case + ;; the helm specialized function will fail because it is build + ;; for `completing-read', so set it to 'incompatible to be sure + ;; we switch to `helm-read-file-name' and don't try to call it + ;; with wrong number of args. + (when (eq def-com 'ido) + (setq def-com 'ido-read-file-name) (ido-mode 1)) + (when (and def-com (> (length (help-function-arglist def-com)) 8)) + (setq def-com 'incompatible)) + (unless (or (not entry) def-com) + (cl-return-from helm--generic-read-file-name + (unwind-protect + (progn + (helm-mode -1) + (apply read-file-name-function def-args)) + (helm-mode 1)))) + ;; If we use now `read-file-name' we MUST turn off `helm-mode' + ;; to avoid infinite recursion and CRASH. It will be reenabled on exit. + (when (or (eq def-com 'read-file-name) + (eq def-com 'ido-read-file-name) + (and (stringp str-defcom) + (not (string-match "^helm" str-defcom)))) + (helm-mode -1)) + (unwind-protect + (setq fname + (cond (;; A specialized function exists, run it + ;; with the two extra args specific to helm.. + (and def-com helm-mode + (not (eq def-com 'ido-read-file-name)) + (not (eq def-com 'incompatible))) + (apply def-com any-args)) + (;; Def-com value is `ido-read-file-name' + ;; run it with default args. + (and def-com (eq def-com 'ido-read-file-name)) + (ido-mode 1) + (apply def-com def-args)) + (;; Def-com value is `read-file-name' + ;; run it with default args. + (eq def-com 'read-file-name) + (apply def-com def-args)) + (t ; Fall back to classic `helm-read-file-name'. + (helm-read-file-name + prompt + :name str-command + :buffer buf-name + :default default-filename + :initial-input (expand-file-name init dir) + :alistp nil + :must-match mustmatch + :test predicate)))) + (helm-mode 1) + (ido-mode (if ido-state 1 -1)) + ;; Same comment as in `helm--completing-read-default'. + (setq this-command current-command)) + fname)) + +(defun helm-mode--advice-lisp--local-variables (old--fn &rest args) + (ignore-errors + (apply old--fn args))) + +(defun helm--completion-in-region (start end collection &optional predicate) + "[EXPERIMENTAL] Helm replacement of `completion--in-region'. +Can be used as value for `completion-in-region-function'." + (cl-declare (special require-match prompt)) + (advice-add + 'lisp--local-variables + :around #'helm-mode--advice-lisp--local-variables) + (unwind-protect + (let* ((enable-recursive-minibuffers t) + (input (buffer-substring-no-properties start end)) + (current-command (or (helm-this-command) this-command)) + (str-command (symbol-name current-command)) + (buf-name (format "*helm-mode-%s*" str-command)) + (require-match (or (and (boundp 'require-match) require-match) + minibuffer-completion-confirm + ;; If prompt have not been propagated here, that's + ;; probably mean we have no prompt and we are in + ;; completion-at-point or friend, so use a non--nil + ;; value for require-match. + (not (boundp 'prompt)))) + ;; `completion-extra-properties' is let-bounded in `completion-at-point'. + ;; `afun' is a closure to call against each string in `data'. + ;; it provide the annotation info for each string. + ;; e.g "foo" => "foo " where foo is a function. + ;; See Issue #407. + (afun (plist-get completion-extra-properties :annotation-function)) + (data (all-completions input collection predicate)) + (file-comp-p (helm-mode--in-file-completion-p input (car data))) + ;; Completion-at-point and friends have no prompt. + (result (helm-comp-read + (or (and (boundp 'prompt) prompt) "Pattern: ") + (if file-comp-p + (cl-loop for f in data unless + (string-match "\\`\\.\\{1,2\\}/\\'" f) + collect f) + (if afun + (mapcar (lambda (s) + (let ((ann (funcall afun s))) + (if ann + (cons + (concat + s + (propertize + " " 'display + (propertize + ann + 'face 'completions-annotations))) + s) + s))) + data) + data)) + :name str-command + :nomark t + :initial-input + (cond ((and file-comp-p + (not (string-match "/\\'" input))) + (concat (helm-basename input) + (unless (string= input "") " "))) + ((string-match "/\\'" input) nil) + ((or (null require-match) + (stringp require-match)) + input) + (t (concat input " "))) + :buffer buf-name + :fc-transformer (append (list 'helm-cr-default-transformer) + (list (lambda (candidates _source) + (sort candidates 'helm-generic-sort-fn)))) + :exec-when-only-one t + :quit-when-no-cand + #'(lambda () + ;; Delay message to overwrite "Quit". + (run-with-timer + 0.01 nil + #'(lambda () + (message "[No matches]"))) + t) ; exit minibuffer immediately. + :must-match require-match))) + (when result + (delete-region (if (and file-comp-p + (save-excursion + (re-search-backward "~?/" start t))) + (match-end 0) start) + end) + (insert (if file-comp-p + (shell-quote-argument result) + result)))) + (advice-remove 'lisp--local-variables + #'helm-mode--advice-lisp--local-variables))) + +(defun helm-mode--in-file-completion-p (target candidate) + (when (and candidate target) + (or (string-match "/\\'" candidate) + (string-match "/\\'" target) + (if (string-match "~?/" target) + (file-exists-p (expand-file-name candidate (helm-basedir target))) + (file-exists-p (expand-file-name + candidate (with-helm-current-buffer + default-directory))))))) + +(when (boundp 'completion-in-region-function) + (defconst helm--old-completion-in-region-function completion-in-region-function)) + +;;;###autoload +(define-minor-mode helm-mode + "Toggle generic helm completion. + +All functions in Emacs that use `completing-read' +or `read-file-name' and friends will use helm interface +when this mode is turned on. +However you can modify this behavior for functions of your choice +with `helm-completing-read-handlers-alist'. + +Called with a positive arg, turn on unconditionally, with a +negative arg turn off. +You can turn it on with `helm-mode'. + +Some crap emacs functions may not be supported, +e.g `ffap-alternate-file' and maybe others +You can add such functions to `helm-completing-read-handlers-alist' +with a nil value. + +Note: This mode is incompatible with Emacs23." + :group 'helm-mode + :global t + :lighter helm-completion-mode-string + (cl-assert (boundp 'completing-read-function) nil + "`helm-mode' not available, upgrade to Emacs-24") + (if helm-mode + (progn + (setq completing-read-function 'helm--completing-read-default + read-file-name-function 'helm--generic-read-file-name) + (when (and (boundp 'completion-in-region-function) + helm-mode-handle-completion-in-region) + (setq completion-in-region-function #'helm--completion-in-region)) + (message helm-completion-mode-start-message)) + (setq completing-read-function (and (fboundp 'completing-read-default) + 'completing-read-default) + read-file-name-function (and (fboundp 'read-file-name-default) + 'read-file-name-default)) + (when (and (boundp 'completion-in-region-function) + (boundp 'helm--old-completion-in-region-function)) + (setq completion-in-region-function helm--old-completion-in-region-function)) + (message helm-completion-mode-quit-message))) + +(provide 'helm-mode) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions obsolete) +;; coding: utf-8 +;; indent-tabs-mode: nil +;; End: + +;;; helm-mode.el ends here diff --git a/elpa/helm-20140808.2300/helm-mode.elc b/elpa/helm-20140808.2300/helm-mode.elc new file mode 100644 index 0000000000000000000000000000000000000000..913a4dcd0457780d2ee06b0aba7d1e4026a53b5c GIT binary patch literal 30662 zcmeHw33nUEwI)bOZJ9cv<-~~-+fhoOErNb*8r_XWqQ|i*60&GZltNN=Jc3>b5)Bd& z2+&w0Gs(>S_4j@ER&_TPEl&K-nK@@<6KGUdRo~j~`c?Jkwfmdz=W@A)&p-d%Z1zsi z+MT#*4$sYLWB3*R2L6M_(VbrJ*;=P})aaOA*X%WhW@B`0%xx2t*MnQ@VPwK$P?9QI z{obi*p%U}i<3ZdXe1N{M}xKIXL0AO@!3h-IrUkfc&m78EsTmqO*-v0S*JkVQDQ|3*_F5_VC0sI-uoj*gkFly)i_F!PS*>*N4GaLN4@T_fy|>}%fE$` zuD`LjxxH32^yKWBHlt@>e9kBg5v8 z#_EqU^+!^FG*Q3iFIMyBNk9H^)b7XTsN;9qhlUeaK73B}fjJrthP_k286R~T{n$V5 z_eN)WpHtd&+Z~gybsL9R6jJmE%d8V~)~@Bvx@MoK<9VasP6}W!v_SXR@5ha%k6F{~ zV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0l)Chn)}L+89#GIY>THa?@=_a1)H#O*ENAD=R}QgZG2} w3+!#;^1u&jW8xPYTPElNbV{?CmCi~3&TgG5pl)VTyMYnLBe`*y!pg#b0XWj9(f|Me literal 0 HcmV?d00001 diff --git a/elpa/helm-20140808.2300/helm-net.el b/elpa/helm-20140808.2300/helm-net.el new file mode 100644 index 000000000..4e9d3dcdd --- /dev/null +++ b/elpa/helm-20140808.2300/helm-net.el @@ -0,0 +1,607 @@ +;;; helm-net.el --- helm browse url and search web. -*- lexical-binding: t -*- + +;; Copyright (C) 2012 ~ 2014 Thierry Volpiatto + +;; 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 . + +;;; Code: + +(require 'cl-lib) +(require 'helm) +(require 'url) +(require 'xml) +(require 'browse-url) + + +(defgroup helm-net nil + "Net related applications and libraries for Helm." + :group 'helm) + +(defcustom helm-google-suggest-default-browser-function nil + "The browse url function you prefer to use with google suggest. +When nil, use the first browser function available +See `helm-browse-url-default-browser-alist'." + :group 'helm-net + :type 'symbol) + +(defcustom helm-home-url "http://www.google.fr" + "Default url to use as home url." + :group 'helm-net + :type 'string) + +(defcustom helm-surfraw-default-browser-function nil + "The browse url function you prefer to use with surfraw. +When nil, fallback to `browse-url-browser-function'." + :group 'helm-net + :type 'symbol) + +(defcustom helm-google-suggest-url + "http://google.com/complete/search?output=toolbar&q=" + "URL used for looking up Google suggestions." + :type 'string + :group 'helm-net) + +(defcustom helm-google-suggest-search-url + "http://www.google.com/search?ie=utf-8&oe=utf-8&q=" + "URL used for Google searching." + :type 'string + :group 'helm-net) + +(defcustom helm-google-suggest-use-curl-p nil + "When non--nil use CURL to get info from `helm-google-suggest-url'. +Otherwise `url-retrieve-synchronously' is used." + :type 'boolean + :group 'helm-net) + +(defcustom helm-yahoo-suggest-url + "http://search.yahooapis.com/WebSearchService/V1/relatedSuggestion?appid=Generic&query=" + "Url used for looking up Yahoo suggestions." + :type 'string + :group 'helm-net) + +(defcustom helm-yahoo-suggest-search-url + "http://search.yahoo.com/search?&ei=UTF-8&fr&h=c&p=" + "Url used for Yahoo searching." + :type 'string + :group 'helm-net) + +(defcustom helm-surfraw-duckduckgo-url + "https://duckduckgo.com/lite/?q=%s&kp=1" + "The duckduckgo url. +This is a format string, don't forget the `%s'. +If you have personal settings saved on duckduckgo you should have +a personal url, see your settings on duckduckgo." + :type 'string + :group 'helm-net) + +(defcustom helm-wikipedia-suggest-url + "http://en.wikipedia.org/w/api.php?action=opensearch&search=" + "Url used for looking up Wikipedia suggestions." + :type 'string + :group 'helm-net) + +(defcustom helm-search-suggest-action-wikipedia-url + "https://en.wikipedia.org/wiki/Special:Search?search=%s" + "The Wikipedia search url. +This is a format string, don't forget the `%s'." + :type 'string + :group 'helm-net) + +(defcustom helm-wikipedia-summary-url + "http://en.wikipedia.org/w/api.php?action=parse&format=json&prop=text§ion=0&page=" + "URL for getting the summary of a Wikipedia topic." + :type 'string + :group 'helm-net) + +(defcustom helm-wikipedia-follow-delay 2 + "Delay before wikipedia summary popup." + :type 'number + :group 'helm-net) + +(defcustom helm-search-suggest-action-youtube-url + "http://www.youtube.com/results?aq=f&search_query=%s" + "The Youtube search url. +This is a format string, don't forget the `%s'." + :type 'string + :group 'helm-net) + +(defcustom helm-search-suggest-action-imdb-url + "http://www.imdb.com/find?s=all&q=%s" + "The IMDb search url. +This is a format string, don't forget the `%s'." + :type 'string + :group 'helm-net) + +(defcustom helm-search-suggest-action-google-maps-url + "http://maps.google.com/maps?f=q&source=s_q&q=%s" + "The Google Maps search url. +This is a format string, don't forget the `%s'." + :type 'string + :group 'helm-net) + +(defcustom helm-search-suggest-action-google-news-url + "http://www.google.com/search?safe=off&prmd=nvlifd&source=lnms&tbs=nws:1&q=%s" + "The Google News search url. +This is a format string, don't forget the `%s'." + :type 'string + :group 'helm-net) + + +;;; Additional actions for search suggestions +;; +;; +;; Internal + +(defun helm-search-suggest-perform-additional-action (url query) + "Perform the search via URL using QUERY as input." + (browse-url (format url (url-hexify-string query)))) + +(defvar helm-search-suggest-additional-actions + '(("Wikipedia" . (lambda (candidate) + (helm-search-suggest-perform-additional-action + helm-search-suggest-action-wikipedia-url + candidate))) + ("Youtube" . (lambda (candidate) + (helm-search-suggest-perform-additional-action + helm-search-suggest-action-youtube-url + candidate))) + ("IMDb" . (lambda (candidate) + (helm-search-suggest-perform-additional-action + helm-search-suggest-action-imdb-url + candidate))) + ("Google Maps" . (lambda (candidate) + (helm-search-suggest-perform-additional-action + helm-search-suggest-action-google-maps-url + candidate))) + ("Google News" . (lambda (candidate) + (helm-search-suggest-perform-additional-action + helm-search-suggest-action-google-news-url + candidate)))) + "List of additional actions for suggest sources.") + + +;;; Google Suggestions +;; +;; +;; Internal +(defvar helm-ggs-max-length-real-flag 0) +(defvar helm-ggs-max-length-num-flag 0) + +(defun helm-google-suggest-fetch (input) + "Fetch suggestions for INPUT from XML buffer. +Return an alist with elements like (data . number_results)." + (setq helm-ggs-max-length-real-flag 0 + helm-ggs-max-length-num-flag 0) + (let ((request (concat helm-google-suggest-url + (url-hexify-string input))) + (fetch #'(lambda () + (cl-loop + with result-alist = (xml-get-children + (car (xml-parse-region + (point-min) (point-max))) + 'CompleteSuggestion) + for i in result-alist + for data = (cdr (cl-caadr (assoc 'suggestion i))) + for nqueries = (cdr (cl-caadr (assoc 'num_queries i))) + for lqueries = (length (helm-ggs-set-number-result + nqueries)) + for ldata = (length data) + do + (progn + (when (> ldata helm-ggs-max-length-real-flag) + (setq helm-ggs-max-length-real-flag ldata)) + (when (> lqueries helm-ggs-max-length-num-flag) + (setq helm-ggs-max-length-num-flag lqueries))) + collect (cons data nqueries) into cont + finally return cont)))) + (if helm-google-suggest-use-curl-p + (with-temp-buffer + (call-process "curl" nil t nil request) + (funcall fetch)) + (with-current-buffer + (url-retrieve-synchronously request) + (funcall fetch))))) + +(defun helm-google-suggest-set-candidates (&optional request-prefix) + "Set candidates with result and number of google results found." + (let ((suggestions + (cl-loop with suggested-results = (helm-google-suggest-fetch + (or (and request-prefix + (concat request-prefix + " " helm-pattern)) + helm-pattern)) + for (real . numresult) in suggested-results + ;; Prepare number of results with "," + for fnumresult = (helm-ggs-set-number-result numresult) + ;; Calculate number of spaces to add before fnumresult + ;; if it is smaller than longest result + ;; `helm-ggs-max-length-num-flag'. + ;; e.g 1,234,567 + ;; 345,678 + ;; To be sure it is aligned properly. + for nspaces = (if (< (length fnumresult) + helm-ggs-max-length-num-flag) + (- helm-ggs-max-length-num-flag + (length fnumresult)) + 0) + ;; Add now the spaces before fnumresult. + for align-fnumresult = (concat (make-string nspaces ? ) + fnumresult) + for interval = (- helm-ggs-max-length-real-flag + (length real)) + for spaces = (make-string (+ 2 interval) ? ) + for display = (format "%s%s(%s results)" + real spaces align-fnumresult) + collect (cons display real)))) + (if (cl-loop for (_disp . dat) in suggestions + thereis (equal dat helm-pattern)) + suggestions + ;; if there is no suggestion exactly matching the input then + ;; prepend a Search on Google item to the list + (append + suggestions + (list (cons (concat "Search for " "'" helm-input "'" " on Google") + helm-input)))))) + +(defun helm-ggs-set-number-result (num) + (if num + (progn + (and (numberp num) (setq num (number-to-string num))) + (cl-loop for i in (reverse (split-string num "" t)) + for count from 1 + append (list i) into C + when (= count 3) + append (list ",") into C + and do (setq count 0) + finally return + (replace-regexp-in-string + "^," "" (mapconcat 'identity (reverse C) "")))) + "?")) + +(defun helm-google-suggest-action (candidate) + "Default action to jump to a google suggested candidate." + (let ((arg (concat helm-google-suggest-search-url + (url-hexify-string candidate)))) + (helm-aif helm-google-suggest-default-browser-function + (funcall it arg) + (helm-browse-url arg)))) + +(defvar helm-google-suggest-default-function + 'helm-google-suggest-set-candidates + "Default function to use in helm google suggest.") + +(defvar helm-source-google-suggest + `((name . "Google Suggest") + (candidates . (lambda () + (funcall helm-google-suggest-default-function))) + (action . ,(cons '("Google Search" . helm-google-suggest-action) + helm-search-suggest-additional-actions)) + (volatile) + (keymap . ,helm-map) + (requires-pattern . 3))) + +(defun helm-google-suggest-emacs-lisp () + "Try to emacs lisp complete with google suggestions." + (helm-google-suggest-set-candidates "emacs lisp")) + + +;;; Yahoo suggestions +;; +;; +(defun helm-yahoo-suggest-fetch (input) + "Fetch Yahoo suggestions for INPUT from XML buffer. +Return an alist with elements like (data . number_results)." + (let ((request (concat helm-yahoo-suggest-url + (url-hexify-string input)))) + (with-current-buffer + (url-retrieve-synchronously request) + (cl-loop with result-alist = + (xml-get-children + (car (xml-parse-region + (point-min) (point-max))) + 'Result) + for i in result-alist + collect (cl-caddr i))))) + +(defun helm-yahoo-suggest-set-candidates () + "Set candidates with Yahoo results found." + (let ((suggestions (helm-yahoo-suggest-fetch helm-input))) + (or suggestions + (append + suggestions + (list (cons (concat "Search for " "'" helm-input "'" " on Yahoo") + helm-input)))))) + +(defun helm-yahoo-suggest-action (candidate) + "Default action to jump to a Yahoo suggested candidate." + (helm-browse-url (concat helm-yahoo-suggest-search-url + (url-hexify-string candidate)))) + +(defvar helm-source-yahoo-suggest + `((name . "Yahoo Suggest") + (candidates . helm-yahoo-suggest-set-candidates) + (action . (("Yahoo Search" . helm-yahoo-suggest-action))) + (volatile) + (keymap . ,helm-map) + (requires-pattern . 3))) + +;;; Wikipedia suggestions +;; +;; +(declare-function json-read-from-string "json" (string)) +(defun helm-wikipedia-suggest-fetch () + "Fetch Wikipedia suggestions and return them as a list." + (require 'json) + (let ((request (concat helm-wikipedia-suggest-url + (url-hexify-string helm-pattern)))) + (if helm-google-suggest-use-curl-p + (with-temp-buffer + (call-process "curl" nil t nil request) + (helm-wikipedia--parse-buffer)) + (with-current-buffer + (url-retrieve-synchronously request) + (helm-wikipedia--parse-buffer))))) + +(defun helm-wikipedia--parse-buffer () + (goto-char (point-min)) + (when (re-search-forward "^\\[.+\\[\\(.*\\)\\]\\]" nil t) + (cl-loop for i across (aref (json-read-from-string (match-string 0)) 1) + collect i into result + finally return (or result + (append + result + (list (cons (format "Search for '%s' on wikipedia" + helm-pattern) + helm-pattern))))))) + +(defvar helm-wikipedia--summary-cache (make-hash-table :test 'equal)) +(defun helm-wikipedia-persistent-action (candidate) + (unless (string= (format "Search for '%s' on wikipedia" + helm-pattern) + (helm-get-selection nil t)) + (message "Fetching summary from Wikipedia...") + (let ((buf (get-buffer-create "*helm wikipedia summary*")) + result mess) + (while (progn + (setq result (or (gethash candidate helm-wikipedia--summary-cache) + (puthash candidate + (prog1 + (helm-wikipedia-fetch-summary candidate) + (setq mess "Done")) + helm-wikipedia--summary-cache))) + (when (and result + (listp result)) + (setq candidate (cdr result)) + (message "Redirected to %s" candidate) + t))) + (if (not result) + (message "Error when getting summary.") + (with-current-buffer buf + (erase-buffer) + (setq cursor-type nil) + (insert result) + (fill-region (point-min) (point-max)) + (goto-char (point-min))) + (display-buffer buf) + (message mess))))) + + +(defun helm-wikipedia-fetch-summary (input) + (let* ((request (concat helm-wikipedia-summary-url (url-hexify-string input)))) + (if helm-google-suggest-use-curl-p + (with-temp-buffer + (call-process "curl" nil t nil request) + (helm-wikipedia--parse-summary)) + (with-current-buffer + (url-retrieve-synchronously request) + (helm-wikipedia--parse-summary))))) + + +(defun helm-wikipedia--parse-summary () + (goto-char (point-min)) + (when (search-forward "{" nil t) + (let ((result (cdr (assoc '* + (assoc 'text + (assoc 'parse + (json-read-from-string + (buffer-substring-no-properties + (1- (point)) (point-max))))))))) + (when result + (if (string-match "]+>\\([^<]+\\)" result) + (cons 'redirect (match-string 1 result)) + + ;; find the beginning of the summary text in the result + + ;; check if there is a table before the summary and skip that + (when (or (string-match "\\(\n\\)?\n

" result) + ;; otherwise just find the first paragraph + (string-match "

" result)) + ;; remove cruft and do a simple formatting + (replace-regexp-in-string + "Cite error: .*" "" + (replace-regexp-in-string + " " "" + (replace-regexp-in-string + "\\[[^\]]+\\]" "" + (replace-regexp-in-string + "<[^>]*>" "" + (replace-regexp-in-string + "

\n

" "\n\n" + (substring result (match-end 0))))))))))))) + + +(defvar helm-source-wikipedia-suggest + `((name . "Wikipedia Suggest") + (candidates . helm-wikipedia-suggest-fetch) + (action . (("Wikipedia" . (lambda (candidate) + (helm-search-suggest-perform-additional-action + helm-search-suggest-action-wikipedia-url + candidate))))) + (persistent-action . helm-wikipedia-persistent-action) + (volatile) + (keymap . ,helm-map) + (follow . 1) + (follow-delay . ,helm-wikipedia-follow-delay) + (requires-pattern . 3))) + + +;;; Web browser functions. +;; +;; +;; If default setting of `w3m-command' is not +;; what you want and you modify it, you will have to reeval +;; also `helm-browse-url-default-browser-alist'. + +(defvar helm-browse-url-chromium-program "chromium-browser") +(defvar helm-browse-url-uzbl-program "uzbl-browser") +(defvar helm-browse-url-conkeror-program "conkeror") +(defvar helm-browse-url-default-browser-alist + `((,(or (and (boundp 'w3m-command) w3m-command) + "/usr/bin/w3m") . w3m-browse-url) + (,browse-url-firefox-program . browse-url-firefox) + (,helm-browse-url-chromium-program . helm-browse-url-chromium) + (,helm-browse-url-conkeror-program . helm-browse-url-conkeror) + (,helm-browse-url-uzbl-program . helm-browse-url-uzbl) + (,browse-url-kde-program . browse-url-kde) + (,browse-url-gnome-moz-program . browse-url-gnome-moz) + (,browse-url-mozilla-program . browse-url-mozilla) + (,browse-url-galeon-program . browse-url-galeon) + (,browse-url-netscape-program . browse-url-netscape) + (,browse-url-mosaic-program . browse-url-mosaic) + (,browse-url-xterm-program . browse-url-text-xterm) + ("emacs" . eww-browse-url)) + "*Alist of \(executable . function\) to try to find a suitable url browser.") + +(cl-defun helm-generic-browser (url cmd-name &rest args) + "Browse URL with NAME browser." + (let ((proc (concat cmd-name " " url))) + (message "Starting %s..." cmd-name) + (apply 'start-process proc nil cmd-name + (append args (list url))) + (set-process-sentinel + (get-process proc) + #'(lambda (process event) + (when (string= event "finished\n") + (message "%s process %s" process event)))))) + +(defun helm-browse-url-chromium (url &optional _ignore) + "Browse URL with google chrome browser." + (interactive "sURL: ") + (helm-generic-browser + url helm-browse-url-chromium-program)) + +(defun helm-browse-url-uzbl (url &optional _ignore) + "Browse URL with uzbl browser." + (interactive "sURL: ") + (helm-generic-browser url helm-browse-url-uzbl-program "-u")) + +(defun helm-browse-url-conkeror (url &optional _ignore) + "Browse URL with conkeror browser." + (interactive "sURL: ") + (helm-generic-browser url helm-browse-url-conkeror-program)) + +(defun helm-browse-url-default-browser (url &rest args) + "Find the first available browser and ask it to load URL." + (let ((default-browser-fn + (cl-loop for (exe . fn) in helm-browse-url-default-browser-alist + thereis (and exe (executable-find exe) (fboundp fn) fn)))) + (if default-browser-fn + (apply default-browser-fn url args) + (error "No usable browser found")))) + +(defun helm-browse-url (url &rest args) + "Default command to browse URL." + (if browse-url-browser-function + (browse-url url args) + (helm-browse-url-default-browser url args))) + + +;;; Surfraw +;; +;; Need external program surfraw. +;; + +;; Internal +(defvar helm-surfraw-engines-history nil) +(defvar helm-surfraw-input-history nil) +(defvar helm-surfraw--elvi-cache nil) + +(defun helm-build-elvi-list () + "Return list of all engines and descriptions handled by surfraw." + (or helm-surfraw--elvi-cache + (setq helm-surfraw--elvi-cache + (cdr (with-temp-buffer + (call-process "surfraw" nil t nil "-elvi") + (split-string (buffer-string) "\n")))))) + +;;;###autoload +(defun helm-surfraw (pattern engine) + "Preconfigured `helm' to search PATTERN with search ENGINE." + (interactive (list (read-string "SearchFor: " + nil 'helm-surfraw-input-history + (thing-at-point 'symbol)) + (helm-comp-read + "Engine: " + (helm-build-elvi-list) + :must-match t + :name "Surfraw Search Engines" + :del-input nil + :history helm-surfraw-engines-history))) + (let* ((engine-nodesc (car (split-string engine))) + (url (if (string= engine-nodesc "duckduckgo") + ;; "sr duckduckgo -p foo" is broken, workaround. + (format helm-surfraw-duckduckgo-url + (url-hexify-string pattern)) + (with-temp-buffer + (apply 'call-process "surfraw" nil t nil + (append (list engine-nodesc "-p") (split-string pattern))) + (replace-regexp-in-string + "\n" "" (buffer-string))))) + (browse-url-browser-function (or helm-surfraw-default-browser-function + browse-url-browser-function))) + (if (string= engine-nodesc "W") + (helm-browse-url helm-home-url) + (helm-browse-url url) + (setq helm-surfraw-engines-history + (cons engine (delete engine helm-surfraw-engines-history)))))) + +;;;###autoload +(defun helm-google-suggest () + "Preconfigured `helm' for google search with google suggest." + (interactive) + (helm-other-buffer 'helm-source-google-suggest "*helm google*")) + +;;;###autoload +(defun helm-yahoo-suggest () + "Preconfigured `helm' for Yahoo searching with Yahoo suggest." + (interactive) + (helm-other-buffer 'helm-source-yahoo-suggest "*helm yahoo*")) + +;;;###autoload +(defun helm-wikipedia-suggest () + "Preconfigured `helm' for Wikipedia lookup with Wikipedia suggest." + (interactive) + (helm :sources 'helm-source-wikipedia-suggest + :buffer "*helm wikipedia*")) + + +(provide 'helm-net) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions obsolete) +;; coding: utf-8 +;; indent-tabs-mode: nil +;; End: + +;;; helm-net.el ends here diff --git a/elpa/helm-20140808.2300/helm-net.elc b/elpa/helm-20140808.2300/helm-net.elc new file mode 100644 index 0000000000000000000000000000000000000000..f16df3043a290a49ad1bd97698f3225090d77268 GIT binary patch literal 19534 zcmdU1`G4ESmDgq3az1t2-Co;Yb_~a|clC8MjPwcps-840o1|mTT6$#J) zC|TWqe!uU{3@(Cl>@?k7ClqlEX5O25^L;1y`N3C@e!H-+aP#xeKNpX}@x&i_195yQ z#%}TupSb?a?eB--Sz{FT-H`|bap)#uZ+arcmatmeR(IQO3fr`r+{G{o$6|<1#OCYR zi{ef6vDxs(Za;1eHoeir-8}V1<2pTHcFk_Xc1%-V3cRG@jkp&-5C`;#I7b&g#s?$4>U)Qeo<0@*Q#W$^35fiRhj)X4 zh(pnL199w$QRo&1QOv}`bEA>(MIt#xL)($#VgY{CKO*4A{=0ee=KAqv;??`%z!OFf zYlDwMxGOuf99(GP)4~T0t6-{$tZ-^%t);!d@1TGYOYKB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9{N zcNgE261YdOCIb%Q#ont|2QQz?yu7-0@chZs=LZV!bOU*@V*M4ltXgGBerxgeLj`XL z#IiNva79W7$Y+_?C`1Fqc>?hu47BWmcx2fmxzw_Xmc;|%7pQKOe_^##@!%K?M2UWq z!G?HXJo#;*tX~zg#qZ(emx1~J;G z%;1N6NZ-aU^jF4_g1{IVC8!mZrD*@RLzGf=6iZD@TSHm6Mtwq&sd+_RWUC^QRN6A% zs5c3-$rgB34%NFbQJdNv>U2z)LnWV?5e-6BfU(=3;tGKiMa^e?k8fK%ae>l`7;bCz~Fc2WEaRLY-8?FNQaz+*j9RsO#Rfn zuS6k;VOsGe`>XoFi+Osd7ORiACiVR`!MLMA&w++9+Q?BU$#R5lLW(U#@ z13_0Z&RwN6x(I7HJi{+UFiY806+oTKRu(nXq1M^uQX2|&%IVG!+v+tdDWP-Yw%aOE gRnD3bx4I6|+OoSTx9jj%&r#l~UOPjuVdLii08n=E-v9sr literal 0 HcmV?d00001 diff --git a/elpa/helm-20140808.2300/helm-org.el b/elpa/helm-20140808.2300/helm-org.el new file mode 100644 index 000000000..a0f772408 --- /dev/null +++ b/elpa/helm-20140808.2300/helm-org.el @@ -0,0 +1,185 @@ +;;; helm-org.el --- Helm for org headlines and keywords completion -*- lexical-binding: t -*- + +;; Copyright (C) 2012 ~ 2014 Thierry Volpiatto + +;; 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 . + +;;; Code: +(require 'cl-lib) +(require 'helm) +(require 'helm-plugin) +(require 'org) + +(declare-function org-get-current-options "ext:org-exp.el") + +;;; Org headlines +;; +;; +(defvar helm-source-org-headline + `((name . "Org Headline") + (headline + ,@(mapcar + (lambda (num) + (format "^\\*\\{%d\\} \\(.+?\\)\\([ \t]*:[[:lower:][:upper:]0-9_@:]+:\\)?[ \t]*$" + num)) + (number-sequence 1 8))) + (condition . (eq major-mode 'org-mode)) + (migemo) + (subexp . 1) + (persistent-action . (lambda (elm) + (helm-action-line-goto elm) + (org-cycle))) + (action-transformer + . (lambda (actions candidate) + '(("Go to line" . helm-action-line-goto) + ("Refile to this headline" . helm-org-headline-refile) + ("Insert link to this headline" + . helm-org-headline-insert-link-to-headline))))) + "Show Org headlines. +org-mode is very very much extended text-mode/outline-mode. + +See (find-library \"org.el\") +See http://orgmode.org for the latest version.") + +(defun helm-org-headline-insert-link-to-headline (lineno-and-content) + (insert + (save-excursion + (helm-goto-line (car lineno-and-content)) + (and (looking-at org-complex-heading-regexp) + (org-make-link-string (concat "*" (match-string 4))))))) + +(defun helm-org-headline-refile (lineno-and-content) + "Refile current org entry to LINENO-AND-CONTENT." + (with-helm-current-buffer + (org-cut-subtree) + (helm-goto-line (car lineno-and-content)) + (org-end-of-subtree t t) + (let ((org-yank-adjusted-subtrees t)) + (org-yank)))) + + +;;; Org keywords +;; +;; Stop supporting this in emacs-24.3.50.1. +(when (boundp 'org-additional-option-like-keywords) + (defvar helm-source-org-keywords + '((name . "Org Keywords") + (init . helm-org-keywords-init) + (candidates . helm-org-keywords-candidates) + (action . helm-org-keywords-insert) + (persistent-action . helm-org-keywords-show-help) + (persistent-help . "Show an example and info page to describe this keyword.") + (keywords-examples) + (keywords))) + + (defvar helm-org-keywords-info-location + '(("#+TITLE:" . "(org)Export options") + ("#+AUTHOR:" . "(org)Export options") + ("#+DATE:" . "(org)Export options") + ("#+EMAIL:" . "(org)Export options") + ("#+DESCRIPTION:" . "(org)Export options") + ("#+KEYWORDS:" . "(org)Export options") + ("#+LANGUAGE:" . "(org)Export options") + ("#+TEXT:" . "(org)Export options") + ("#+TEXT:" . "(org)Export options") + ("#+OPTIONS:" . "(org)Export options") + ("#+BIND:" . "(org)Export options") + ("#+LINK_UP:" . "(org)Export options") + ("#+LINK_HOME:" . "(org)Export options") + ("#+LATEX_HEADER:" . "(org)Export options") + ("#+EXPORT_SELECT_TAGS:" . "(org)Export options") + ("#+EXPORT_EXCLUDE_TAGS:" . "(org)Export options") + ("#+INFOJS_OPT" . "(org)Javascript support") + ("#+BEGIN_HTML" . "(org)Quoting HTML tags") + ("#+BEGIN_LaTeX" . "(org)Quoting LaTeX code") + ("#+ORGTBL" . "(org)Radio tables") + ("#+HTML:" . "(org)Quoting HTML tags") + ("#+LaTeX:" . "(org)Quoting LaTeX code") + ("#+BEGIN:" . "(org)Dynamic blocks") ;clocktable columnview + ("#+BEGIN_EXAMPLE" . "(org)Literal examples") + ("#+BEGIN_QUOTE" . "(org)Paragraphs") + ("#+BEGIN_VERSE" . "(org)Paragraphs") + ("#+BEGIN_SRC" . "(org)Literal examples") + ("#+CAPTION" . "(org)Tables in HTML export") + ("#+LABEL" . "(org)Tables in LaTeX export") + ("#+ATTR_HTML" . "(org)Links") + ("#+ATTR_LaTeX" . "(org)Images in LaTeX export"))) + + (defun helm-org-keywords-init () + (unless (helm-attr 'keywords-examples) + (require 'org) + (helm-attrset 'keywords-examples + (append + (mapcar + (lambda (x) + (string-match "^#\\+\\(\\([[:upper:]_]+:?\\).*\\)" x) + (cons (match-string 2 x) (match-string 1 x))) + (org-split-string (org-get-current-options) "\n")) + (mapcar 'list org-additional-option-like-keywords))) + (helm-attrset 'keywords (mapcar 'car (helm-attr 'keywords-examples))))) + + (defun helm-org-keywords-candidates () + (and (or (eq (buffer-local-value 'major-mode helm-current-buffer) 'org-mode) + (eq (buffer-local-value 'major-mode helm-current-buffer) 'message-mode)) + (helm-attr 'keywords))) + + (defun helm-org-keywords-insert (keyword) + (cond ((and (string-match "BEGIN" keyword) + (helm-region-active-p)) + (let ((beg (region-beginning)) + (end (region-end))) + (goto-char end) + (insert "\n#+" (replace-regexp-in-string + "BEGIN" "END" keyword) "\n") + (goto-char beg) + (insert "#+" keyword " ") + (save-excursion (insert "\n")))) + ((string-match "BEGIN" keyword) + (insert "#+" keyword " ") + (save-excursion + (insert "\n#+" (replace-regexp-in-string + "BEGIN" "END" keyword) "\n"))) + (t (insert "#+" keyword " ")))) + + (defun helm-org-keywords-show-help (keyword) + (info (or (assoc-default (concat "#+" keyword) helm-org-keywords-info-location) + "(org)In-buffer settings")) + (search-forward (concat "#+" keyword) nil t) + (helm-highlight-current-line) + (message "%s" (or (cdr (assoc keyword (helm-attr 'keywords-examples))) "")))) + +;;;###autoload +(defun helm-org-keywords () + "Preconfigured `helm' for org keywords." + (interactive) + (cl-assert (boundp 'org-additional-option-like-keywords) nil + "Helm-org-keyword not supported in %s" emacs-version) + (helm-other-buffer 'helm-source-org-keywords "*org keywords*")) + +;;;###autoload +(defun helm-org-headlines () + "Preconfigured helm to show org headlines." + (interactive) + (helm-other-buffer 'helm-source-org-headline "*org headlines*")) + + +(provide 'helm-org) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions obsolete) +;; coding: utf-8 +;; indent-tabs-mode: nil +;; End: + +;;; helm-org.el ends here diff --git a/elpa/helm-20140808.2300/helm-org.elc b/elpa/helm-20140808.2300/helm-org.elc new file mode 100644 index 0000000000000000000000000000000000000000..df1b192d78049cc575de423981559467a2319d45 GIT binary patch literal 5847 zcmbtY`)}gN9naoYr)^HEs#aCipE_%9yO69220{{6r(Ke`3AY4tKzcdFX*$>g_+o6< zHhHw_|K87c#x{`0vDGDVV$Xc%`+m-Qvvu(2wY9bN_wV1cgJ3dsJ>jsyJ)7|OBc4b< z;r4zITo=8-<{k@t*5fg2%tnmuF=M-K?AFUwRxTM;iDDQA6E*}AwsjVXFxmo+t)iH4 zJ1RO`!khA~vG6839VqRVc8ldosic;Ia8wkY#NztQq$BJGC|uAiSBsURA@^?Gc+9v5 zR;IB#asSO@07S)gx!E7Pks?2fM8uqXpHEzyIe{I;q3e&Lci0W1m~qE}oEaTsuUOuD zgu@Ad!w+I+2Y$=}Jd20=E>?WK(K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vj}6PtJEKSfwA59~z^%@&Et; literal 0 HcmV?d00001 diff --git a/elpa/helm-20140808.2300/helm-plugin.el b/elpa/helm-20140808.2300/helm-plugin.el new file mode 100644 index 000000000..28e8ae2a8 --- /dev/null +++ b/elpa/helm-20140808.2300/helm-plugin.el @@ -0,0 +1,342 @@ +;;; helm-plugin.el --- Helm plugins -*- lexical-binding: t -*- + +;; Copyright (C) 2012 ~ 2014 Thierry Volpiatto + +;; 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 . + +;;; Code: + +(require 'cl-lib) +(require 'helm) +(require 'helm-utils) + +(declare-function Info-index-nodes "info" (&optional file)) +(declare-function Info-goto-node "info" (&optional fork)) +(declare-function Info-find-node "info.el" (filename nodename &optional no-going-back)) + + +;;; Plug-in: `info-index' +;; +;; +(defvar Info-history) +(cl-defun helm-info-init (&optional (file (helm-attr 'info-file))) + ;; Allow reinit candidate buffer when using edebug. + (helm-aif (and debug-on-error + (helm-candidate-buffer)) + (kill-buffer it)) + (unless (helm-candidate-buffer) + (save-window-excursion + (info file) + (let (Info-history + (tobuf (helm-candidate-buffer 'global)) + (infobuf (current-buffer)) + s e + (nodes (or (helm-attr 'index-nodes) (Info-index-nodes)))) + (cl-dolist (node 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) + (save-current-buffer (buffer-substring-no-properties + (point-at-bol) (point-at-eol))) + (setq s (point-at-bol) + e (point-at-eol)) + (with-current-buffer tobuf + (insert-buffer-substring infobuf s e) + (insert "\n"))))))))) + +(defun helm-info-goto (node-line) + (Info-goto-node (car node-line)) + (helm-goto-line (cdr node-line))) + +(defun helm-info-display-to-real (line) + (and (string-match + ;; This regexp is stolen from Info-apropos-matches + "\\* +\\([^\n]*.+[^\n]*\\):[ \t]+\\([^\n]*\\)\\.\\(?:[ \t\n]*(line +\\([0-9]+\\))\\)?" line) + (cons (format "(%s)%s" (helm-attr 'info-file) (match-string 2 line)) + (string-to-number (or (match-string 3 line) "1"))))) + +(defun helm-make-info-source (source file) + `(,@source + (name . ,(concat "Info Index: " file)) + (info-file . ,file) + (init . helm-info-init) + (display-to-real . helm-info-display-to-real) + (get-line . buffer-substring) + (candidates-in-buffer) + (action ("Goto node" . helm-info-goto)))) + +(defun helm-compile-source--info-index (source) + (helm-aif (helm-interpret-value (assoc-default 'info-index source)) + (helm-make-info-source source it) + source)) + +(add-to-list 'helm-compile-source-functions 'helm-compile-source--info-index) + +(helm-document-attribute 'info-index "info-index plugin" + " Create a source of info index very easily. + + Example: + + (defvar helm-source-info-wget '((info-index . \"wget\"))") + +(helm-document-attribute 'index-nodes "info-index plugin (optional)" + " Index nodes of info file. + + If it is omitted, `Info-index-nodes' is used to collect index + nodes. Some info files are missing index specification. + + See `helm-source-info-screen'.") + + +;;; Plug-in: `candidates-file' +;; +;; List all lines in a file. +(defun helm-compile-source--candidates-file (source) + (if (assoc-default 'candidates-file source) + `((init helm-p-candidates-file-init + ,@(let ((orig-init (assoc-default 'init source))) + (cond ((null orig-init) nil) + ((functionp orig-init) (list orig-init)) + (t orig-init)))) + (candidates-in-buffer) + ,@source) + source)) +(add-to-list 'helm-compile-source-functions 'helm-compile-source--candidates-file) + +(defun helm-p-candidates-file-init () + (cl-destructuring-bind (file &optional updating) + (helm-mklist (helm-attr 'candidates-file)) + (setq file (helm-interpret-value file)) + (with-current-buffer (helm-candidate-buffer 'global) + (insert-file-contents file) + (when updating + (buffer-disable-undo) + (font-lock-mode -1) + (auto-revert-mode 1))))) + +(helm-document-attribute 'candidates-file "candidates-file plugin" + " Use a file as the candidates buffer. + + 1st argument is a filename, string or function name or variable + name. If optional 2nd argument is non-nil, the file is opened with + `auto-revert-mode' enabled. + + Example: + + \(defvar helm-source-test-file + '((name . \"test1\") + (candidates-file \"~/.emacs.el\" t))) + + Will list all lines in .emacs.el.") + + +;;; Plug-in: `headline' +;; +;; +(defun helm-compile-source--helm-headline (source) + (if (assoc-default 'headline source) + (append '((init . helm-headline-init) + (get-line . buffer-substring) + (type . line)) + source + '((candidates-in-buffer) + (persistent-help . "Show this line"))) + source)) +(add-to-list 'helm-compile-source-functions 'helm-compile-source--helm-headline) + +(defun helm-headline-init () + (when (and (helm-current-buffer-is-modified) + (with-helm-current-buffer + (eval (or (helm-attr 'condition) t)))) + (helm-headline-make-candidate-buffer + (helm-interpret-value (helm-attr 'headline)) + (helm-interpret-value (helm-attr 'subexp))))) + +(helm-document-attribute 'headline "Headline plug-in" + " Regexp string for helm-headline to scan.") +(helm-document-attribute 'condition "Headline plug-in" + " A sexp representing the condition to use helm-headline.") +(helm-document-attribute 'subexp "Headline plug-in" + " Display (match-string-no-properties subexp).") + +(defun helm-headline-get-candidates (regexp subexp) + (with-helm-current-buffer + (save-excursion + (goto-char (point-min)) + (if (functionp regexp) (setq regexp (funcall regexp))) + (let ((matched + #'(lambda () + (if (numberp subexp) + (cons (match-string-no-properties subexp) + (match-beginning subexp)) + (cons (buffer-substring (point-at-bol) (point-at-eol)) + (point-at-bol))))) + (arrange + #'(lambda (headlines) + (unless (null headlines) ; FIX headlines empty bug! + (cl-loop with curhead = (make-vector + (1+ (cl-loop for (_ . hierarchy) in headlines + maximize hierarchy)) + "") + for ((str . pt) . hierarchy) in headlines + do (aset curhead hierarchy str) + collecting + (cons + (format "H%d:%s" (1+ hierarchy) + (mapconcat 'identity + (cl-loop for i from 0 to hierarchy + collecting (aref curhead i)) + " / ")) + pt)))))) + (if (listp regexp) + (funcall arrange + (sort + (cl-loop for re in regexp + for hierarchy from 0 + do (goto-char (point-min)) + appending + (cl-loop + while (re-search-forward re nil t) + collect (cons (funcall matched) hierarchy))) + (lambda (a b) (> (cdar b) (cdar a))))) + (cl-loop while (re-search-forward regexp nil t) + collect (funcall matched))))))) + +(defun helm-headline-make-candidate-buffer (regexp subexp) + (with-current-buffer (helm-candidate-buffer 'local) + (cl-loop for (content . pos) in (helm-headline-get-candidates regexp subexp) + do (insert + (format "%5d:%s\n" + (with-helm-current-buffer + (line-number-at-pos pos)) + content))))) + +(defun helm-headline-goto-position (pos recenter) + (goto-char pos) + (unless recenter + (set-window-start (get-buffer-window helm-current-buffer) (point)))) + + +;;; Plug-in: `persistent-help' +;; +;; Add help about persistent action in `helm-buffer' header. +(defun helm-compile-source--persistent-help (source) + (append source '((header-line . helm-persistent-help-string)))) +(add-to-list 'helm-compile-source-functions 'helm-compile-source--persistent-help) + +(defun helm-persistent-help-string () + (substitute-command-keys + (concat "\\\\[helm-execute-persistent-action]: " + (or (helm-interpret-value (helm-attr 'persistent-help)) + (helm-aif (or (assoc-default + 'persistent-action + (helm-get-current-source)) + (assoc-default + 'action (helm-get-current-source))) + (cond ((symbolp it) + (symbol-name it)) + ((listp it) + (or (ignore-errors (caar it)) "")))) + "") + " (keeping session)"))) + +(defun helm-display-to-real-numbered-line (candidate) + "This is used to display a line in occur style in helm sources. +e.g \" 12:some_text\". +It is used with type attribute 'line'." + (if (string-match "^ *\\([0-9]+\\):\\(.*\\)$" candidate) + (list (string-to-number (match-string 1 candidate)) + (match-string 2 candidate)) + (error "Line number not found"))) + + +;;; Type attributes +;; +;; +(define-helm-type-attribute 'line + '((display-to-real . helm-display-to-real-numbered-line) + (action ("Go to Line" . helm-action-line-goto))) + "LINENO:CONTENT string, eg. \" 16:foo\". + +Optional `target-file' attribute is a name of target file. + +Optional `before-jump-hook' attribute is a function with no +arguments which is called before jumping to position. + +Optional `after-jump-hook' attribute is a function with no +arguments which is called after jumping to position. + +If `adjust' attribute is specified, searches the line whose +content is CONTENT near the LINENO. + +If `recenter' attribute is specified, the line is displayed at +the center of window, otherwise at the top of window.") + +(define-helm-type-attribute 'file-line + `((filtered-candidate-transformer helm-filtered-candidate-transformer-file-line) + (multiline) + (action ("Go to" . helm-action-file-line-goto))) + "FILENAME:LINENO:CONTENT string, eg. \"~/.emacs:16:;; comment\". + +Optional `default-directory' attribute is a default-directory +FILENAME is interpreted. + +Optional `before-jump-hook' attribute is a function with no +arguments which is called before jumping to position. + +Optional `after-jump-hook' attribute is a function with no +arguments which is called after jumping to position. + +If `adjust' attribute is specified, searches the line whose +content is CONTENT near the LINENO. + +If `recenter' attribute is specified, the line is displayed at +the center of window, otherwise at the top of window.") + + +;;; Document new attributes +;; +;; +(helm-document-attribute 'persistent-help "persistent-help plug-in" + " A string to explain persistent-action of this source. It also + accepts a function or a variable name.") + +(helm-document-attribute 'default-directory "type . file-line" + " `default-directory' to interpret file.") + +(helm-document-attribute 'before-jump-hook "type . file-line / line" + " Function to call before jumping to the target location.") + +(helm-document-attribute 'after-jump-hook "type . file-line / line" + " Function to call after jumping to the target location.") + +(helm-document-attribute 'adjust "type . file-line" + " Search around line matching line contents.") + +(helm-document-attribute 'recenter "type . file-line / line" + " `recenter' after jumping.") + +(helm-document-attribute 'target-file "type . line" + " Goto line of target-file.") + +(provide 'helm-plugin) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions obsolete) +;; coding: utf-8 +;; indent-tabs-mode: nil +;; End: + +;;; helm-plugin ends here diff --git a/elpa/helm-20140808.2300/helm-plugin.elc b/elpa/helm-20140808.2300/helm-plugin.elc new file mode 100644 index 0000000000000000000000000000000000000000..4a933359193f2ad306d581f056541cfbeea9a02c GIT binary patch literal 10526 zcmeHN`)}J;nw1~%wi!&(nPSm)v5#xI8B1xX@FB^G+nL(2J*hEm(v8#I0+G9+CCX+k zkt#{W@eZ(m`=0aNONyfG6oc+B3yc9- zaH!6%)g;LG@X73NgTa#|xonSTHtWJVl?a$7YdaT^;uKQ@$>nhK2J2J#5O(trD zLDa+VvoOsbVvL9Fa1so%_V8gio(2yu!tumr2j`LVsO|ZVql>2F*?APV!?6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kaRa!pG>v~Wp-WC?Qqm3 z3ssg$+?L)WnY7nS4Y#?r(tsDCcjhN0x=EXycO05TzhhdsG0 zv{VhG$)1+RS_0o&h7ttk2q*Hp6 + +;; 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 . + +;;; Code: + +(require 'cl-lib) +(require 'helm) +(require 'helm-utils) + + +(defgroup helm-regexp nil + "Regexp related Applications and libraries for Helm." + :group 'helm) + +(defcustom helm-moccur-always-search-in-current nil + "Helm multi occur always search in current buffer when non--nil." + :group 'helm-regexp + :type 'boolean) + +(defcustom helm-moccur-use-ioccur-style-keys t + "Similar to `helm-grep-use-ioccur-style-keys' but for multi occur." + :group 'helm-regexp + :type 'boolean) + +(defcustom helm-moccur-auto-update-on-resume nil + "Allow auto updating helm-(m)occur buffer when outdated. +noask => Always update without asking +nil => Don't update but signal buffer needs update +never => Never update and do not signal buffer needs update +Any other non--nil value update after confirmation." + :group 'helm-regexp + :type '(radio :tag "Allow auto updating helm-(m)occur buffer when outdated." + (const :tag "Always update without asking" noask) + (const :tag "Never update and do not signal buffer needs update" never) + (const :tag "Don't update but signal buffer needs update" nil) + (const :tag "Update after confirmation" t))) + + +(defface helm-moccur-buffer + '((t (:foreground "DarkTurquoise" :underline t))) + "Face used to highlight moccur buffer names." + :group 'helm-regexp) + +(defface helm-resume-need-update + '((t (:background "red"))) + "Face used to flash moccur buffer when it needs update." + :group 'helm-regexp) + + +(defvar helm-moccur-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map helm-map) + (define-key map (kbd "M-") 'helm-goto-next-file) + (define-key map (kbd "M-") 'helm-goto-precedent-file) + (define-key map (kbd "C-w") 'helm-yank-text-at-point) + (define-key map (kbd "C-c ?") 'helm-moccur-help) + (define-key map (kbd "C-c o") 'helm-moccur-run-goto-line-ow) + (define-key map (kbd "C-c C-o") 'helm-moccur-run-goto-line-of) + (define-key map (kbd "C-x C-s") 'helm-moccur-run-save-buffer) + (when helm-moccur-use-ioccur-style-keys + (define-key map (kbd "") 'helm-execute-persistent-action) + (define-key map (kbd "") 'helm-moccur-run-default-action)) + (delq nil map)) + "Keymap used in Moccur source.") + + +(defvar helm-build-regexp-history nil) +(defun helm-query-replace-regexp (_candidate) + "Query replace regexp from `helm-regexp'. +With a prefix arg replace only matches surrounded by word boundaries, +i.e Don't replace inside a word, regexp is surrounded with \\bregexp\\b." + (let ((regexp (funcall (helm-attr 'regexp)))) + (apply 'query-replace-regexp + (helm-query-replace-args regexp)))) + +(defun helm-kill-regexp-as-sexp (_candidate) + "Kill regexp in a format usable in lisp code." + (helm-regexp-kill-new + (prin1-to-string (funcall (helm-attr 'regexp))))) + +(defun helm-kill-regexp (_candidate) + "Kill regexp as it is in `helm-pattern'." + (helm-regexp-kill-new (funcall (helm-attr 'regexp)))) + +(defun helm-query-replace-args (regexp) + "create arguments of `query-replace-regexp' action in `helm-regexp'." + (let ((region-only (helm-region-active-p))) + (list + regexp + (query-replace-read-to regexp + (format "Query replace %sregexp %s" + (if helm-current-prefix-arg "word " "") + (if region-only "in region " "")) + t) + helm-current-prefix-arg + (when region-only (region-beginning)) + (when region-only (region-end))))) + +(defvar helm-source-regexp + '((name . "Regexp Builder") + (init . (lambda () + (helm-init-candidates-in-buffer + 'global (with-temp-buffer + (insert-buffer-substring helm-current-buffer) + (buffer-string))))) + (candidates-in-buffer) + (get-line . helm-regexp-get-line) + (persistent-action . helm-regexp-persistent-action) + (persistent-help . "Show this line") + (multiline) + (no-matchplugin) + (requires-pattern . 2) + (mode-line . "Press TAB to select action.") + (regexp . (lambda () helm-input)) + (action . (("Kill Regexp as sexp" . helm-kill-regexp-as-sexp) + ("Query Replace Regexp (C-u Not inside word.)" + . helm-query-replace-regexp) + ("Kill Regexp" . helm-kill-regexp))))) + +(defun helm-regexp-get-line (s e) + (let ((matches (match-data)) + (line (buffer-substring s e))) + (propertize + (cl-loop with ln = (format "%5d: %s" (line-number-at-pos (1- s)) line) + for i from 0 to (1- (/ (length matches) 2)) + concat (format "\n %s'%s'" (format "Group %d: " i) + (match-string i)) + into ln1 + finally return (concat ln ln1)) + ;; match beginning + ;; KLUDGE: point of helm-candidate-buffer is +1 than that of helm-current-buffer. + ;; It is implementation problem of candidates-in-buffer. + 'helm-real-value (1- s)))) + +(defun helm-regexp-persistent-action (pt) + (helm-goto-char pt) + (helm-highlight-current-line)) + +(defun helm-regexp-kill-new (input) + (kill-new input) + (message "Killed: %s" input)) + +(defun helm-quote-whitespace (candidate) + "Quote whitespace, if some, in string CANDIDATE." + (replace-regexp-in-string " " "\\\\ " candidate)) + + +;;; Occur +;; +;; +(defvar helm-source-occur nil) +(defun helm-occur-init-source () + (unless helm-source-occur + (setq helm-source-occur (copy-alist helm-source-moccur)) + (helm-attrset 'name "Occur" helm-source-occur))) + + +;;; Multi occur +;; +;; + +;; Internal +(defvar helm-multi-occur-buffer-list nil) +(defvar helm-multi-occur-buffer-tick nil) +(defun helm-moccur-init () + "Create the initial helm multi occur buffer." + (helm-init-candidates-in-buffer + 'global + (cl-loop with buffers = (helm-attr 'moccur-buffers) + for buf in buffers + for bufstr = (with-current-buffer buf (buffer-string)) + do (add-text-properties + 0 (length bufstr) + `(buffer-name ,(buffer-name (get-buffer buf))) + bufstr) + concat bufstr))) + +(defun helm-moccur-get-line (beg end) + "Format line for `helm-source-moccur'." + (format "%s:%d:%s" + (get-text-property beg 'buffer-name) + (save-restriction + (narrow-to-region (previous-single-property-change + (point) 'buffer-name) + (next-single-property-change + (point) 'buffer-name)) + (line-number-at-pos beg)) + (buffer-substring beg end))) + +(cl-defun helm-moccur-action (candidate + &optional (method (quote buffer)) mark) + "Jump to CANDIDATE with METHOD. +arg METHOD can be one of buffer, buffer-other-window, buffer-other-frame." + (require 'helm-grep) + (let* ((split (helm-grep-split-line candidate)) + (buf (car split)) + (lineno (string-to-number (nth 1 split))) + (split-pat (if helm-occur-match-plugin-mode + (helm-mp-split-pattern helm-pattern) + (list helm-pattern)))) + (cl-case method + (buffer (switch-to-buffer buf)) + (buffer-other-window (switch-to-buffer-other-window buf)) + (buffer-other-frame (switch-to-buffer-other-frame buf))) + (helm-goto-line lineno) + ;; Move point to the nearest matching regexp from bol. + (cl-loop for reg in split-pat + when (save-excursion + (re-search-forward reg (point-at-eol) t)) + collect (match-beginning 0) into pos-ls + finally (when pos-ls (goto-char (apply #'min pos-ls)))) + (when mark + (set-marker (mark-marker) (point)) + (push-mark (point) 'nomsg)))) + +(defun helm-moccur-persistent-action (candidate) + (helm-moccur-goto-line candidate) + (helm-highlight-current-line)) + +(defun helm-moccur-goto-line (candidate) + "From multi occur, switch to buffer and go to nth 1 CANDIDATE line." + (helm-moccur-action + candidate 'buffer (or current-prefix-arg ; persistent. + helm-current-prefix-arg))) ; exit. + +(defun helm-moccur-goto-line-ow (candidate) + "Go to CANDIDATE line in other window. +Same as `helm-moccur-goto-line' but go in other window." + (helm-moccur-action + candidate 'buffer-other-window + (or current-prefix-arg ; persistent. + helm-current-prefix-arg))) ; exit. + +(defun helm-moccur-goto-line-of (candidate) + "Go to CANDIDATE line in new frame. +Same as `helm-moccur-goto-line' but go in new frame." + (helm-moccur-action + candidate 'buffer-other-frame + (or current-prefix-arg ; persistent. + helm-current-prefix-arg))) ; exit. + +(defun helm-moccur-run-goto-line-ow () + "Run goto line other window action from `helm-source-moccur'." + (interactive) + (with-helm-alive-p + (helm-quit-and-execute-action 'helm-moccur-goto-line-ow))) + +(defun helm-moccur-run-goto-line-of () + "Run goto line new frame action from `helm-source-moccur'." + (interactive) + (with-helm-alive-p + (helm-quit-and-execute-action 'helm-moccur-goto-line-of))) + +(defun helm-moccur-run-default-action () + (interactive) + (with-helm-alive-p + (helm-quit-and-execute-action 'helm-moccur-goto-line))) + +;;;###autoload +(define-minor-mode helm-occur-match-plugin-mode + "Turn On/Off `helm-match-plugin-mode' only for `helm-m/occur'." + :global t + :init-value t + (if helm-occur-match-plugin-mode + (setq helm-source-moccur + (remove (assoc 'no-matchplugin helm-source-moccur) + helm-source-moccur) + helm-source-occur helm-source-moccur) + (helm-attrset 'no-matchplugin nil helm-source-moccur) + (setq helm-source-occur helm-source-moccur))) + +(defvar helm-source-moccur + `((name . "Moccur") + (init . (lambda () + (require 'helm-grep) + (helm-moccur-init))) + (candidates-in-buffer) + (filter-one-by-one . helm-moccur-filter-one-by-one) + (get-line . helm-moccur-get-line) + (nohighlight) + (migemo) + (action . (("Go to Line" . helm-moccur-goto-line) + ("Goto line other window" . helm-moccur-goto-line-ow) + ("Goto line new frame" . helm-moccur-goto-line-of))) + (persistent-action . helm-moccur-persistent-action) + (persistent-help . "Go to line") + (recenter) + (resume . helm-moccur-resume-fn) + (candidate-number-limit . 9999) + (mode-line . helm-moccur-mode-line) + (keymap . ,helm-moccur-map) + (history . ,'helm-grep-history) + (requires-pattern . 2)) + "Helm source for multi occur.") + +(defun helm-moccur-resume-fn () + (with-helm-buffer + (let (new-tick-ls buffer-is-modified) + (set (make-local-variable 'helm-multi-occur-buffer-list) + (cl-loop for b in helm-multi-occur-buffer-list + when (buffer-live-p (get-buffer b)) + collect b)) + (setq buffer-is-modified (/= (length helm-multi-occur-buffer-list) + (length (helm-attr 'moccur-buffers)))) + (helm-attrset 'moccur-buffers helm-multi-occur-buffer-list) + (setq new-tick-ls (cl-loop for b in helm-multi-occur-buffer-list + collect (buffer-chars-modified-tick (get-buffer b)))) + (when buffer-is-modified + (setq helm-multi-occur-buffer-tick new-tick-ls)) + (cl-assert (> (length helm-multi-occur-buffer-list) 0) nil + "helm-resume error: helm-(m)occur buffer list is empty") + (unless (eq helm-moccur-auto-update-on-resume 'never) + (when (or buffer-is-modified + (cl-loop for b in helm-multi-occur-buffer-list + for new-tick = (buffer-chars-modified-tick (get-buffer b)) + for tick in helm-multi-occur-buffer-tick + thereis (/= tick new-tick))) + (helm-aif helm-moccur-auto-update-on-resume + (when (or (eq it 'noask) + (y-or-n-p "Helm (m)occur Buffer outdated, update? ")) + (run-with-idle-timer 0.1 nil (lambda () + (with-helm-buffer + (helm-force-update) + (message "Helm (m)occur Buffer have been udated") + (sit-for 1) (message nil)))) + (unless buffer-is-modified (setq helm-multi-occur-buffer-tick new-tick-ls))) + (run-with-idle-timer 0.1 nil (lambda () + (with-helm-buffer + (let ((ov (make-overlay (save-excursion + (goto-char (point-min)) + (forward-line 1) + (point)) + (point-max)))) + (overlay-put ov 'face 'helm-resume-need-update) + (sit-for 0.3) (delete-overlay ov) + (message "[Helm occur Buffer outdated (C-c C-u to update)]"))))) + (unless buffer-is-modified + (with-helm-after-update-hook + (setq helm-multi-occur-buffer-tick new-tick-ls) + (message "Helm (m)occur Buffer have been udated"))))))))) + +(defun helm-moccur-filter-one-by-one (candidate) + "`filter-one-by-one' function for `helm-source-moccur'." + (require 'helm-grep) + (let* ((split (helm-grep-split-line candidate)) + (buf (car split)) + (lineno (nth 1 split)) + (str (nth 2 split))) + (cons (concat (propertize + buf + 'face 'helm-moccur-buffer + 'help-echo (buffer-file-name + (get-buffer buf)) + 'buffer-name buf) + ":" + (propertize lineno 'face 'helm-grep-lineno) + ":" + (helm-grep-highlight-match + str helm-occur-match-plugin-mode)) + candidate))) + +(defun helm-multi-occur-1 (buffers &optional input) + "Main function to call `helm-source-moccur' with BUFFERS list." + (let ((bufs (if helm-moccur-always-search-in-current + (cons + ;; will become helm-current-buffer later. + (buffer-name (current-buffer)) + (remove helm-current-buffer helm-multi-occur-buffer-list)) + buffers))) + (helm-attrset 'moccur-buffers bufs helm-source-moccur) + (helm-set-local-variable 'helm-multi-occur-buffer-list bufs) + (helm-set-local-variable + 'helm-multi-occur-buffer-tick + (cl-loop for b in bufs + collect (buffer-chars-modified-tick (get-buffer b))))) + (helm :sources 'helm-source-moccur + :buffer "*helm multi occur*" + :history 'helm-grep-history + :input input + :truncate-lines t)) + +;;;###autoload +(defun helm-moccur-run-save-buffer () + "Run grep save results action from `helm-do-grep-1'." + (interactive) + (with-helm-alive-p + (helm-quit-and-execute-action 'helm-moccur-save-results))) + + +;;; helm-moccur-mode +;; +;; +(defvar helm-moccur-mode-map + (let ((map (make-sparse-keymap))) + (define-key map (kbd "RET") 'helm-moccur-mode-goto-line) + (define-key map (kbd "C-o") 'helm-moccur-mode-goto-line-ow) + (define-key map (kbd "") 'undefined) + (define-key map (kbd "") 'undefined) + (define-key map (kbd "") 'helm-gm-next-file) + (define-key map (kbd "") 'helm-gm-precedent-file) + map)) + +(defun helm-moccur-mode-goto-line () + (interactive) + (helm-moccur-goto-line + (buffer-substring (point-at-bol) (point-at-eol)))) + +(defun helm-moccur-mode-goto-line-ow () + (interactive) + (helm-moccur-goto-line-ow + (buffer-substring (point-at-bol) (point-at-eol)))) + +(defun helm-moccur-save-results (_candidate) + "Save helm moccur results in a `helm-moccur-mode' buffer." + (let ((buf "*hmoccur*") + new-buf) + (when (get-buffer buf) + (setq new-buf (helm-read-string "OccurBufferName: " buf)) + (cl-loop for b in (helm-buffer-list) + when (and (string= new-buf b) + (not (y-or-n-p + (format "Buffer `%s' already exists overwrite? " + new-buf)))) + do (setq new-buf (helm-read-string "OccurBufferName: " "*hmoccur "))) + (setq buf new-buf)) + (with-current-buffer (get-buffer-create buf) + (setq buffer-read-only t) + (let ((inhibit-read-only t)) + (erase-buffer) + (insert "-*- mode: helm-moccur -*-\n\n" + (format "Moccur Results for `%s':\n\n" helm-pattern)) + (save-excursion + (insert (with-current-buffer helm-buffer + (goto-char (point-min)) (forward-line 1) + (buffer-substring (point) (point-max)))))) + (helm-moccur-mode) (pop-to-buffer buf)) + (message "Helm Moccur Results saved in `%s' buffer" buf))) + +;;;###autoload +(define-derived-mode helm-moccur-mode + special-mode "helm-moccur" + "Major mode to provide actions in helm moccur saved buffer. + +Special commands: +\\{helm-moccur-mode-map}" + (set (make-local-variable 'helm-multi-occur-buffer-list) + (with-helm-buffer helm-multi-occur-buffer-list)) + (set (make-local-variable 'revert-buffer-function) + #'helm-moccur-mode--revert-buffer-function)) + +(defun helm-moccur-mode--revert-buffer-function (&optional _ignore-auto _noconfirm) + (goto-char (point-min)) + (let (pattern) + (when (re-search-forward "^Moccur Results for `\\(.*\\)'" nil t) + (setq pattern (match-string 1)) + (forward-line 0) + (when (re-search-forward "^$" nil t) + (forward-line 1)) + (let ((inhibit-read-only t) + (buffer (current-buffer)) + (buflst helm-multi-occur-buffer-list)) + (delete-region (point) (point-max)) + (message "Reverting buffer...") + (save-excursion + (with-temp-buffer + (insert + "\n" + (cl-loop for buf in buflst + for bufstr = (or (and (buffer-live-p (get-buffer buf)) + (with-current-buffer buf + (buffer-string))) + "") + unless (string= bufstr "") + do (add-text-properties + 0 (length bufstr) + `(buffer-name ,(buffer-name (get-buffer buf))) + bufstr) + concat bufstr) + "\n") + (goto-char (point-min)) + (cl-loop while (re-search-forward pattern nil t) + for line = (helm-moccur-get-line (point-at-bol) (point-at-eol)) + when line + do (with-current-buffer buffer + (insert + (propertize + (car (helm-moccur-filter-one-by-one line)) + 'helm-real-value line) + "\n"))))) + (message "Reverting buffer done"))))) + + +;;; Predefined commands +;; +;; + +;;;###autoload +(defun helm-regexp () + "Preconfigured helm to build regexps. +`query-replace-regexp' can be run from there against found regexp." + (interactive) + (save-restriction + (when (and (helm-region-active-p) + ;; Don't narrow to region if buffer is already narrowed. + (not (helm-current-buffer-narrowed-p (current-buffer)))) + (narrow-to-region (region-beginning) (region-end))) + (helm :sources helm-source-regexp + :buffer "*helm regexp*" + :prompt "Regexp: " + :history 'helm-build-regexp-history))) + +;;;###autoload +(defun helm-occur () + "Preconfigured helm for Occur." + (interactive) + (helm-occur-init-source) + (let ((bufs (list (buffer-name (current-buffer))))) + (helm-attrset 'moccur-buffers bufs helm-source-occur) + (helm-set-local-variable 'helm-multi-occur-buffer-list bufs) + (helm-set-local-variable + 'helm-multi-occur-buffer-tick + (cl-loop for b in bufs + collect (buffer-chars-modified-tick (get-buffer b))))) + (helm :sources 'helm-source-occur + :buffer "*helm occur*" + :history 'helm-grep-history + :preselect (and (memq 'helm-source-occur helm-sources-using-default-as-input) + (format "%s:%d:" (buffer-name) (line-number-at-pos (point)))) + :truncate-lines t)) + +;;;###autoload +(defun helm-occur-from-isearch () + "Invoke `helm-occur' from isearch." + (interactive) + (let ((input (if isearch-regexp + isearch-string + (regexp-quote isearch-string))) + (bufs (list (buffer-name (current-buffer))))) + (isearch-exit) + (helm-occur-init-source) + (helm-attrset 'moccur-buffers bufs helm-source-occur) + (helm-set-local-variable 'helm-multi-occur-buffer-list bufs) + (helm-set-local-variable + 'helm-multi-occur-buffer-tick + (cl-loop for b in bufs + collect (buffer-chars-modified-tick (get-buffer b)))) + (helm :sources 'helm-source-occur + :buffer "*helm occur*" + :history 'helm-grep-history + :input input + :truncate-lines t))) + +;;;###autoload +(defun helm-multi-occur (buffers) + "Preconfigured helm for multi occur. + + BUFFERS is a list of buffers to search through. +With a prefix arg, reverse the behavior of +`helm-moccur-always-search-in-current'. +The prefix arg can be set before calling `helm-multi-occur' +or during the buffer selection." + (interactive (list (helm-comp-read + "Buffers: " (helm-buffer-list) + :marked-candidates t))) + (let ((helm-moccur-always-search-in-current + (if (or current-prefix-arg + helm-current-prefix-arg) + (not helm-moccur-always-search-in-current) + helm-moccur-always-search-in-current))) + (helm-multi-occur-1 buffers))) + +;;;###autoload +(defun helm-multi-occur-from-isearch (&optional _arg) + "Invoke `helm-multi-occur' from isearch. + +With a prefix arg, reverse the behavior of +`helm-moccur-always-search-in-current'. +The prefix arg can be set before calling +`helm-multi-occur-from-isearch' or during the buffer selection." + (interactive "p") + (let (buf-list + helm-moccur-always-search-in-current + (input (if isearch-regexp + isearch-string + (regexp-quote isearch-string)))) + (isearch-exit) + (setq buf-list (helm-comp-read "Buffers: " + (helm-buffer-list) + :name "Occur in buffer(s)" + :marked-candidates t)) + (setq helm-moccur-always-search-in-current + (if (or current-prefix-arg + helm-current-prefix-arg) + (not helm-moccur-always-search-in-current) + helm-moccur-always-search-in-current)) + (helm-multi-occur-1 buf-list input))) + + +(provide 'helm-regexp) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions obsolete) +;; coding: utf-8 +;; indent-tabs-mode: nil +;; End: + +;;; helm-regexp.el ends here diff --git a/elpa/helm-20140808.2300/helm-regexp.elc b/elpa/helm-20140808.2300/helm-regexp.elc new file mode 100644 index 0000000000000000000000000000000000000000..ec467c65059894a0730cdc3c0811c869572adf37 GIT binary patch literal 23134 zcmds9`Ewh`mF8i|5?xMgZeZJ#+N6+W?{&eS8OG`^@pMUbTRur-@JNFp}EgHGM1yP!Qr1;e(1n zUc-elbEWu`sJ#)H1sN!q=5lz6A3 z!DOiSmAp;b?U~vWA$2oKdhr-EcrYCHx^1OmLjpp}qj=N>>75Kl<}38EQ#1S8*i;X% zP%l0PzX@CQ2krJ`e3t<6ENH+XIMypiW2V6^3}{XR< zce(@YbbM-RKXOsf3R;C^cC84N&0Uxp#)c)@u0HX@XNz{YLR0PhfVD;g-QLvW-v}X@ z*>$R!@%Hw#h&YMcRpzxjy0tYnTl=8fgnW;!tKE%9FP}|D-%bYIECE-cFo70H6E?eT zYG1M?@IZ%ban?OO>)|stDid--iTg?B$X^NFBk@@BH`?uS+suTR?M!7_kP`O04P^ColMWuwgrP7XSrg9x>rZAL}tI!J3!4mrC zAgG|idZj9w3te*|Milug9Ji~A?OOk1X9rw?@)Hd-Y_ zNHzq1@Z_dr!Hs|z)waH$XrrVU=*539D%8zDf{@4X{v5O4( z5mT!}13{n&0zy%*n+>6wI>}p1@+DexTN@KBeK(w*qnqKnSqIE5m{!N&NegN68r#}U z0}o85CWdldX$e4Oc0P~~4V@3xvOFKGJtQYK4zp0&8KQw?l!AEPxL>8I%$ov+f6?e= z6Dp&vyV2Ggk&bpZH0@CW>_XZFI7-Kv8Jw7-dAqu4EGy2>Pr!ZvleW(!?Yw}&t&%EghA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=GkNO=<%J$kG_2HaU})-^Bk;fp|~iVHJ@Fn#2>AD+;%4GjqA$W0Hn~VxO`uc z%>5eJa>%7%^?4`zbFq&WEo*%jesC*W1d4~Hz7 zvvXuoal$NIZ*_Y(aL2bN$ZAHz^*nWDg$G!rRGbQV7=_9szzcAwDj+sBj8dH3va3Hg zjPff=Ej(39WC4cLFbcsUHI%&hgZ!fc^RND%Ob-D}g(2#K37G(WM{tN(XV+Aa z#qPIGR(95gAMlbfFpf*2Wmchv6{LX>}(73dg}eDS}c2ZvMsL6`9f-0xNK4 z+t(a`e8eTEr#$DLrN1ct0#0oqjmnW|JunZ_R|8~P9~H}sC@@b(;T2eXx!uKN>anV4 ztEz~QKp;*ufg-~9C?R-;5n@5f7bgZS;kpYE4l9SLrDzorIYrCQh!kDQ(E5ETFi70g zoJ-Ny=2A4d#>E1up^A8*5^mVIj07n4&lV(WX9$ExaqHH`9WO4Cucrj9^}OV@@#)F1FIjtamxN>E@MEYRQP8hWyh0J;ZMx!G5nK&dGcx;f5s3lwdE3*|LZ@mO2ZPOB<2ZmalqiOaL}YWr7W;A_wNrY-4nxoOWl&+muZp_T2xkP|{~>KS zVk`EuB4Tmy<826~$l;iO{-ZScO7lWHdH@6`CYY>BYbsS?4kChedUbu71cciRrUBbo zIWBTl03LSHy(U%@Fh0XOqhOQr&{KVT2_7Oey5lGkvAXmlisV(ue1`~~l)OOPzKIMM zk?)*xHLm0hbSki2_l1ytTM`r)qOSzu30dXitqcK>dDJ + +;; 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 . + +;;; Code: + +(require 'cl-lib) +(require 'helm) +(require 'helm-utils) +(require 'helm-elisp) + +(declare-function undo-tree-restore-state-from-register "ext:undo-tree.el" (register)) + + +(defgroup helm-ring nil + "Ring related Applications and libraries for Helm." + :group 'helm) + +(defcustom helm-kill-ring-threshold 3 + "Minimum length of a candidate to be listed by `helm-source-kill-ring'." + :type 'integer + :group 'helm-ring) + +(defcustom helm-kill-ring-max-lines-number 5 + "Max number of lines displayed per candidate in kill-ring browser. +If nil or zero (disabled), don't truncate candidate, show all." + :type '(choice (const :tag "Disabled" nil) + (integer :tag "Max number of lines")) + :group 'helm-ring) + +(defcustom helm-kill-ring-show-completion t + "Show yank contents with an overlay in current buffer." + :group 'helm-ring + :type 'boolean) + +(defcustom helm-register-max-offset 160 + "Max size of string register entries before truncating." + :group 'helm-ring + :type 'integer) + + +;;; Kill ring +;; +;; +(defvar helm-kill-ring-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map helm-map) + (define-key map (kbd "M-y") 'helm-next-line) + (define-key map (kbd "M-u") 'helm-previous-line) + map) + "Keymap for `helm-show-kill-ring'.") + +(defvar helm-source-kill-ring + `((name . "Kill Ring") + (init . (lambda () (helm-attrset 'last-command last-command))) + (candidates . helm-kill-ring-candidates) + (filtered-candidate-transformer helm-kill-ring-transformer) + (action . (("Yank" . helm-kill-ring-action) + ("Delete" . (lambda (candidate) + (cl-loop for cand in (helm-marked-candidates) + do (setq kill-ring + (delete cand kill-ring))))))) + (persistent-action . (lambda (_candidate) (ignore))) + (persistent-help . "DoNothing") + (keymap . ,helm-kill-ring-map) + (last-command) + (migemo) + (multiline)) + "Source for browse and insert contents of kill-ring.") + +(defun helm-kill-ring-candidates () + (cl-loop for kill in (helm-fast-remove-dups kill-ring :test 'equal) + unless (or (< (length kill) helm-kill-ring-threshold) + (string-match "\\`[\n[:blank:]]+\\'" kill)) + collect kill)) + +(defun helm-kill-ring-transformer (candidates _source) + "Display only the `helm-kill-ring-max-lines-number' lines of candidate." + (cl-loop for i in candidates + for nlines = (with-temp-buffer (insert i) (count-lines (point-min) (point-max))) + if (and helm-kill-ring-max-lines-number + (> nlines helm-kill-ring-max-lines-number)) + collect (cons + (with-temp-buffer + (insert i) + (goto-char (point-min)) + (concat + (buffer-substring + (point-min) + (save-excursion + (forward-line helm-kill-ring-max-lines-number) + (point))) + "[...]")) i) + else collect i)) + +(defun helm-kill-ring-action (str) + "Insert STR in `kill-ring' and set STR to the head. +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)) + (if (not (eq (helm-attr 'last-command helm-source-kill-ring) 'yank)) + (run-with-timer 0.01 nil `(lambda () (insert-for-yank ,str))) + ;; from `yank-pop' + (let ((inhibit-read-only t) + (before (< (point) (mark t)))) + (if before + (funcall (or yank-undo-function 'delete-region) (point) (mark t)) + (funcall (or yank-undo-function 'delete-region) (mark t) (point))) + (setq yank-undo-function nil) + (set-marker (mark-marker) (point) helm-current-buffer) + (run-with-timer 0.01 nil `(lambda () (insert-for-yank ,str))) + ;; Set the window start back where it was in the yank command, + ;; if possible. + (set-window-start (selected-window) yank-window-start t) + (when before + ;; This is like exchange-point-and-mark, but doesn't activate the mark. + ;; It is cleaner to avoid activation, even though the command + ;; loop would deactivate the mark because we inserted text. + (goto-char (prog1 (mark t) + (set-marker (mark-marker) (point) helm-current-buffer)))))) + (kill-new str))) + + + + +;;;; +;; DO NOT use these sources with other sources use +;; the commands `helm-mark-ring', `helm-global-mark-ring' or +;; `helm-all-mark-rings' instead. + +(defun helm-mark-ring-get-marks (pos) + (save-excursion + (goto-char pos) + (forward-line 0) + (let ((line (car (split-string (thing-at-point 'line) "[\n\r]")))) + (when (string= "" line) + (setq line "")) + (format "%7d: %s" (line-number-at-pos) line)))) + +(defun helm-mark-ring-get-candidates () + (with-helm-current-buffer + (cl-loop with marks = (if (mark t) (cons (mark-marker) mark-ring) mark-ring) + for i in marks + for m = (helm-mark-ring-get-marks i) + unless (and recip (member m recip)) + collect m into recip + finally return recip))) + +(defvar helm-source-mark-ring + '((name . "mark-ring") + (candidates . helm-mark-ring-get-candidates) + (action . (("Goto line" + . (lambda (candidate) + (helm-goto-line (string-to-number candidate)))))) + (persistent-action . (lambda (candidate) + (helm-goto-line (string-to-number candidate)) + (helm-highlight-current-line))) + (persistent-help . "Show this line"))) + + +;;; Global-mark-ring +(defvar helm-source-global-mark-ring + '((name . "global-mark-ring") + (candidates . helm-global-mark-ring-get-candidates) + (action . (("Goto line" + . (lambda (candidate) + (let ((items (split-string candidate ":"))) + (helm-switch-to-buffer (cl-second items)) + (helm-goto-line (string-to-number (car items)))))))) + (persistent-action . (lambda (candidate) + (let ((items (split-string candidate ":"))) + (helm-switch-to-buffer (cl-second items)) + (helm-goto-line (string-to-number (car items))) + (helm-highlight-current-line)))) + (persistent-help . "Show this line"))) + +(defun helm-global-mark-ring-format-buffer (marker) + (with-current-buffer (marker-buffer marker) + (goto-char marker) + (forward-line 0) + (let (line) + (if (string= "" line) + (setq line "") + (setq line (car (split-string (thing-at-point 'line) + "[\n\r]")))) + (format "%7d:%s: %s" + (line-number-at-pos) (marker-buffer marker) line)))) + +(defun helm-global-mark-ring-get-candidates () + (let ((marks global-mark-ring)) + (when marks + (cl-loop for i in marks + for gm = (unless (or (string-match + "^ " (format "%s" (marker-buffer i))) + (null (marker-buffer i))) + (helm-global-mark-ring-format-buffer i)) + when (and gm (not (member gm recip))) + collect gm into recip + finally return recip)))) + + +;;;; +;;; Insert from register +(defvar helm-source-register + '((name . "Registers") + (candidates . helm-register-candidates) + (action-transformer . helm-register-action-transformer) + (multiline) + (action)) + "See (info \"(emacs)Registers\")") + +(defun helm-register-candidates () + "Collecting register contents and appropriate commands." + (cl-loop for (char . val) in register-alist + for key = (single-key-description char) + for string-actions = + (cond + ((numberp val) + (list (int-to-string val) + 'insert-register + 'increment-register)) + ((markerp val) + (let ((buf (marker-buffer val))) + (if (null buf) + (list "a marker in no buffer") + (list (concat + "a buffer position:" + (buffer-name buf) + ", position " + (int-to-string (marker-position val))) + 'jump-to-register + 'insert-register)))) + ((and (consp val) (window-configuration-p (car val))) + (list "window configuration." + 'jump-to-register)) + ((and (vectorp val) + (fboundp 'undo-tree-register-data-p) + (undo-tree-register-data-p (elt val 1))) + (list + "Undo-tree entry." + 'undo-tree-restore-state-from-register)) + ((or (and (vectorp val) (eq 'registerv (aref val 0))) + (and (consp val) (frame-configuration-p (car val)))) + (list "frame configuration." + 'jump-to-register)) + ((and (consp val) (eq (car val) 'file)) + (list (concat "file:" + (prin1-to-string (cdr val)) + ".") + 'jump-to-register)) + ((and (consp val) (eq (car val) 'file-query)) + (list (concat "file:a file-query reference: file " + (car (cdr val)) + ", position " + (int-to-string (car (cdr (cdr val)))) + ".") + 'jump-to-register)) + ((consp val) + (let ((lines (format "%4d" (length val)))) + (list (format "%s: %s\n" lines + (truncate-string-to-width + (mapconcat 'identity (list (car val)) + "^J") (- (window-width) 15))) + 'insert-register))) + ((stringp val) + (list + ;; without properties + (concat (substring-no-properties + val 0 (min (length val) helm-register-max-offset)) + (if (> (length val) helm-register-max-offset) + "[...]" "")) + 'insert-register + 'append-to-register + 'prepend-to-register)) + (t + "GARBAGE!")) + collect (cons (format "Register %3s:\n %s" key (car string-actions)) + (cons char (cdr string-actions))))) + +(defun helm-register-action-transformer (_actions register-and-functions) + "Decide actions by the contents of register." + (cl-loop with func-actions = + '((insert-register + "Insert Register" . + (lambda (c) (insert-register (car c)))) + (jump-to-register + "Jump to Register" . + (lambda (c) (jump-to-register (car c)))) + (append-to-register + "Append Region to Register" . + (lambda (c) (append-to-register + (car c) (region-beginning) (region-end)))) + (prepend-to-register + "Prepend Region to Register" . + (lambda (c) (prepend-to-register + (car c) (region-beginning) (region-end)))) + (increment-register + "Increment Prefix Arg to Register" . + (lambda (c) (increment-register + helm-current-prefix-arg (car c)))) + (undo-tree-restore-state-from-register + "Restore Undo-tree register" + (lambda (c) (and (fboundp 'undo-tree-restore-state-from-register) + (undo-tree-restore-state-from-register (car c)))))) + for func in (cdr register-and-functions) + for cell = (assq func func-actions) + when cell + collect (cdr cell))) + +;;;###autoload +(defun helm-mark-ring () + "Preconfigured `helm' for `helm-source-mark-ring'." + (interactive) + (helm :sources 'helm-source-mark-ring + :resume 'noresume + :buffer "*helm mark*")) + +;;;###autoload +(defun helm-global-mark-ring () + "Preconfigured `helm' for `helm-source-global-mark-ring'." + (interactive) + (helm :sources 'helm-source-global-mark-ring + :resume 'noresume + :buffer "*helm global mark*")) + +;;;###autoload +(defun helm-all-mark-rings () + "Preconfigured `helm' for `helm-source-global-mark-ring' and \ +`helm-source-mark-ring'." + (interactive) + (helm :sources '(helm-source-mark-ring + helm-source-global-mark-ring) + :resume 'noresume + :buffer "*helm mark ring*")) + +;;;###autoload +(defun helm-register () + "Preconfigured `helm' for Emacs registers." + (interactive) + (helm :sources 'helm-source-register + :resume 'noresume + :buffer "*helm register*")) + +;;;###autoload +(defun helm-show-kill-ring () + "Preconfigured `helm' for `kill-ring'. +It is drop-in replacement of `yank-pop'. + +First call open the kill-ring browser, next calls move to next line." + (interactive) + (helm :sources helm-source-kill-ring + :buffer "*helm kill ring*" + :resume 'noresume + :allow-nest t)) + +(provide 'helm-ring) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions obsolete) +;; coding: utf-8 +;; indent-tabs-mode: nil +;; End: + +;;; helm-ring.el ends here diff --git a/elpa/helm-20140808.2300/helm-ring.elc b/elpa/helm-20140808.2300/helm-ring.elc new file mode 100644 index 0000000000000000000000000000000000000000..c8f0718a4ce228321893f51f5616c89f7f5be253 GIT binary patch literal 10567 zcmd5?`E%RG6{b$h%B0h4CeulquAn#~U4zEKLz2@*)Dgu=d{nZNNkyds$t8sv1ZV)X zt)w&k*ZaM<3lJhD%SrP?Jr)V<@%HW8_r7;59~^wW_d%&tT7B@~f!K?NBR`Nm(YX*q zFWtdkVm|V^yHWI_8bn<$5K$X- z?t{ktsvLUVq}sbLgOPXtTn0mvCRm%+X4P>mOEtxQIH<~i$@rl-pgH0dX!uyvsa4&o z&3&)^^jvrWcp0Vs(Eq_pF(9d~a_6&i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A}^E z;S0|cC~Uh@3_P1wBY)UPLKRW_B%uLrfsVU?29k$zGmZ|j*gperJSF;d%g`|Z7`=# zQ;;M+7-AX5a^M2p>#DiTXB&qD%TI2Ve4_ z+B_m9_?&+*$G;sytN}*@XFs_`&_AiUC+JrXxZn)%BPhCcB~0cfD&$>@Cj4uc39;;_ zKU6cHTqS3Cf^V*ve?k{S8Lnh{J0WrzZKhy^hH3q{LfqgUHyZdY5`O +;; Author: Daniel Hackney + +;; 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: + +;; Uses `candidates-in-buffer' for speed. + +;;; Code: + +(require 'cl-lib) +(require 'semantic) +(require 'helm-imenu) + +(declare-function pulse-momentary-highlight-one-line "pulse.el" (point &optional face)) + +(defcustom helm-semantic-lynx-style-map t + "Use Arrow keys to jump to occurences." + :group 'helm-imenu + :type 'boolean) + +;;; keymap +(defvar helm-semantic-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map helm-map) + (define-key map (kbd "C-c ?") 'helm-semantic-help) + (when helm-imenu-lynx-style-map + (define-key map (kbd "") 'helm-maybe-exit-minibuffer) + (define-key map (kbd "") 'helm-execute-persistent-action)) + (delq nil map))) + +(defun helm-semantic-init-candidates (tags depth &optional class) + "Write the contents of TAGS to the current buffer." + (let ((class class) cur-type) + (cl-dolist (tag tags) + (when (listp tag) + (cl-case (setq cur-type (semantic-tag-class tag)) + ((function variable type) + (let ((spaces (make-string (* depth 2) ?\s)) + (type-p (eq cur-type 'type))) + (unless (and (> depth 0) (not type-p)) + (setq class nil)) + (insert + (if (and class (not type-p)) + (format "%s%sClass(%s) " + spaces (if (< depth 2) "" "├►") class) + spaces) + ;; Save the tag for later + (propertize (semantic-format-tag-summarize tag nil t) + 'semantic-tag tag) + "\n") + (and type-p (setq class (car tag))) + ;; Recurse to children + (helm-semantic-init-candidates + (semantic-tag-components tag) (1+ depth) class))) + + ;; Don't do anything with packages or includes for now + ((package include)) + ;; Catch-all + (t)))))) + +(defun helm-semantic-default-action (_candidate &optional persistent) + ;; By default, helm doesn't pass on the text properties of the selection. + ;; Fix this. + (helm-log-run-hook 'helm-goto-line-before-hook) + (with-current-buffer helm-buffer + (when (looking-at " ") + (goto-char (next-single-property-change + (point-at-bol) 'semantic-tag nil (point-at-eol)))) + (let ((tag (get-text-property (point) 'semantic-tag))) + (semantic-go-to-tag tag) + (unless persistent + (pulse-momentary-highlight-one-line (point)))))) + +(defun helm-semantic--maybe-set-needs-update () + (with-helm-current-buffer + (let ((tick (buffer-modified-tick))) + (unless (eq helm-cached-imenu-tick tick) + (setq helm-cached-imenu-tick tick) + (semantic-parse-tree-set-needs-update))))) + +(defvar helm-source-semantic + `((name . "Semantic Tags") + (init . (lambda () + (helm-semantic--maybe-set-needs-update) + (let ((tags (semantic-fetch-tags))) + (with-current-buffer (helm-candidate-buffer 'global) + (helm-semantic-init-candidates tags 0))))) + (candidates-in-buffer) + (allow-dups) + (get-line . buffer-substring) + (persistent-action . (lambda (elm) + (helm-semantic-default-action elm t) + (helm-highlight-current-line))) + (persistent-help . "Show this entry") + (keymap . ,helm-semantic-map) + (mode-line . helm-semantic-mode-line) + (action . helm-semantic-default-action) + "Source to search tags using Semantic from CEDET.")) + +;;;###autoload +(defun helm-semantic () + "Preconfigured `helm' for `semantic'." + (interactive) + (let ((str (thing-at-point 'symbol))) + (helm :sources 'helm-source-semantic + :default (list (concat "\\_<" str "\\_>") str) + :candidate-number-limit 9999 + :buffer "*helm semantic*"))) + +;;;###autoload +(defun helm-semantic-or-imenu () + "Run `helm' with `semantic' or `imenu'. + +If `semantic-mode' is active in the current buffer, then use +semantic for generating tags, otherwise fall back to `imenu'. +Fill in the symbol at point by default." + (interactive) + (let* ((source (if (semantic-active-p) + 'helm-source-semantic + 'helm-source-imenu)) + (imenu-p (eq source 'helm-source-imenu)) + (str (thing-at-point 'symbol)) + (imenu-auto-rescan imenu-p) + (helm-execute-action-at-once-if-one + (and imenu-p + helm-imenu-execute-action-at-once-if-one))) + (helm :sources source + :default (list (concat "\\_<" str "\\_>") str) + :buffer "*helm semantic/imenu*" + :candidate-number-limit 9999 + :preselect (unless imenu-p (thing-at-point 'symbol))))) + +(provide 'helm-semantic) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions obsolete) +;; coding: utf-8 +;; indent-tabs-mode: nil +;; End: + +;;; helm-semantic.el ends here diff --git a/elpa/helm-20140808.2300/helm-semantic.elc b/elpa/helm-20140808.2300/helm-semantic.elc new file mode 100644 index 0000000000000000000000000000000000000000..3edea4d5af27be41fc7d53a35d5c573dcd2a6c25 GIT binary patch literal 4260 zcma)9;d0x?5vHnGmg$*J+aGN@owjSpwm^@MA^?h#WxF;lsjX%bj~g+~4^tC?;E_ZH z9AF$EndxhE`m0aU$H|lQ+XFy}v>lfcNZ@X7Z*TY8Zx>IGzdHO)qtR$SefpFRlQ<0{ zIi}H^Vn2V0ON+1l;8l`bw4)^OBT5vV`Z@KBDbW*hb`PBW1Gh(R$LSgslPrm80wuKb zt(KYIfsUQFjQv2j$2&4g{hgVNV!;bK`vcNikcO1X!=NoAqbgK%%_a8J|jPZJ!u}s;SYWe0o`tz$-yktr42!%az9j>ihLsWNhM13PY+K{D46+~ zALLN{*evnYm~=vcuT+xLNK%yeV>lvIc~V*7x|C!j{VWP))^6Io#2zJu8mF{v4k#)^ zTTSAR{fulslM`B+B-;^WM^a63f~A>Ot3@yR^z?;Ehe)JR$1o{ z^fq1jnu0on6AYK`b3HaZ@^M;=w(hrD#!HCzCqB()(;m%pDS~7y$r>U+xSV@K*Wnw! z+?x+x{m{kCF0LM~y`krHj*jr{;BqnI;g_%O!`nl*vuDxUOuj3^Oi~buC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HcmV?d00001 diff --git a/elpa/helm-20140808.2300/helm-sys.el b/elpa/helm-20140808.2300/helm-sys.el new file mode 100644 index 000000000..a1ec822bf --- /dev/null +++ b/elpa/helm-20140808.2300/helm-sys.el @@ -0,0 +1,295 @@ +;;; helm-sys.el --- System related functions for helm. -*- lexical-binding: t -*- + +;; Copyright (C) 2012 ~ 2014 Thierry Volpiatto + +;; 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 . + +;;; Code: + +(require 'cl-lib) +(require 'helm) +(require 'helm-utils) + + +(defgroup helm-sys nil + "System related helm library." + :group 'helm) + +(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" + "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 +is used by default instead. +If you modify this the number and order of elements displayed +should be the same as top command to have the sort commands +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) + + +;;; Top (process) +;; +;; +(defvar helm-top-sort-fn nil) +(defvar helm-top-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map helm-map) + (define-key map (kbd "C-c ?") 'helm-top-help) + (define-key map (kbd "M-P") 'helm-top-run-sort-by-cpu) + (define-key map (kbd "M-C") 'helm-top-run-sort-by-com) + (define-key map (kbd "M-M") 'helm-top-run-sort-by-mem) + (define-key map (kbd "M-U") 'helm-top-run-sort-by-user) + map)) + +(defvar helm-source-top + `((name . "Top") + (header-name . (lambda (name) (concat name " (Press C-c C-u to refresh)"))) + (init . helm-top-init) + (candidates-in-buffer) + (nomark) + (display-to-real . helm-top-display-to-real) + (persistent-action . helm-top-sh-persistent-action) + (persistent-help . "SIGTERM") + (mode-line . helm-top-mode-line) + (follow . never) + (keymap . ,helm-top-map) + (filtered-candidate-transformer . helm-top-sort-transformer) + (action-transformer . helm-top-action-transformer))) + +(defun helm-top-transformer (candidates _source) + "Transformer for `helm-top'. +Return empty string for non--valid candidates." + (cl-loop for disp in candidates collect + (if (string-match "^ *[0-9]+" disp) disp (cons disp "")))) + +(defun helm-top-action-transformer (actions _candidate) + "Action transformer for `top'. +Show actions only on line starting by a PID." + (let ((disp (helm-get-selection nil t))) + (cond ((string-match "^ *[0-9]+" disp) + (list '("kill (SIGTERM)" . (lambda (pid) (helm-top-sh "TERM" pid))) + '("kill (SIGKILL)" . (lambda (pid) (helm-top-sh "KILL" pid))) + '("kill (SIGINT)" . (lambda (pid) (helm-top-sh "INT" pid))) + '("kill (Choose signal)" + . (lambda (pid) + (helm-top-sh + (helm-comp-read (format "Kill [%s] with signal: " pid) + '("ALRM" "HUP" "INT" "KILL" "PIPE" "POLL" + "PROF" "TERM" "USR1" "USR2" "VTALRM" + "STKFLT" "PWR" "WINCH" "CHLD" "URG" + "TSTP" "TTIN" "TTOU" "STOP" "CONT" + "ABRT" "FPE" "ILL" "QUIT" "SEGV" + "TRAP" "SYS" "EMT" "BUS" "XCPU" "XFSZ") + :must-match t) + pid))))) + (t actions)))) + +(defun helm-top-sh (sig pid) + "Run kill shell command with signal SIG on PID for `helm-top'." + (let ((cmd (format "kill -%s %s" sig pid))) + (message "Executed %s\n%s" cmd (shell-command-to-string cmd)))) + +(defun helm-top-sh-persistent-action (pid) + (delete-other-windows) + (helm-top-sh "TERM" pid) + (helm-force-update)) + +(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)))) + +(defun helm-top-display-to-real (line) + "Return pid only from LINE." + (car (split-string line))) + +;; Sort top command + +(defun helm-top-set-mode-line (str) + (if (string-match "Sort:\\[\\(.*\\)\\] " helm-top-mode-line) + (setq helm-top-mode-line (replace-match str nil nil helm-top-mode-line 1)) + (setq helm-top-mode-line (concat (format "Sort:[%s] " str) helm-top-mode-line)))) + +(defun helm-top-sort-transformer (candidates source) + (helm-top-transformer + (if helm-top-sort-fn + (cl-loop for c in candidates + if (string-match "^ *[0-9]+" c) collect c into pid-cands + else collect c into header-cands + finally return (append (if (cdr header-cands) + (butlast header-cands) + header-cands) + (sort pid-cands helm-top-sort-fn))) + candidates) + source)) + +(defun helm-top-sort-by-com (s1 s2) + (let* ((split-1 (split-string s1)) + (split-2 (split-string s2)) + (com-1 (nth 11 split-1)) + (com-2 (nth 11 split-2))) + (string< com-1 com-2))) + +(defun helm-top-sort-by-mem (s1 s2) + (let* ((split-1 (split-string s1)) + (split-2 (split-string s2)) + (mem-1 (string-to-number (nth 9 split-1))) + (mem-2 (string-to-number (nth 9 split-2)))) + (> mem-1 mem-2))) + +(defun helm-top-sort-by-user (s1 s2) + (let* ((split-1 (split-string s1)) + (split-2 (split-string s2)) + (user-1 (nth 1 split-1)) + (user-2 (nth 1 split-2))) + (string< user-1 user-2))) + +;;;###autoload +(defun helm-top-run-sort-by-com () + (interactive) + (helm-top-set-mode-line "COM") + (setq helm-top-sort-fn 'helm-top-sort-by-com) + (helm-force-update)) + +;;;###autoload +(defun helm-top-run-sort-by-cpu () + (interactive) + (helm-top-set-mode-line "CPU") + (setq helm-top-sort-fn nil) + (helm-force-update)) + +;;;###autoload +(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)) + +;;;###autoload +(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)) + + +;;; X RandR resolution change +;; +;; +;;; FIXME I do not care multi-display. + +(defun helm-xrandr-info () + "Return a pair with current X screen number and current X display name." + (with-temp-buffer + (call-process "xrandr" nil (current-buffer) nil + "--current") + (let (screen output) + (goto-char (point-min)) + (save-excursion + (when (re-search-forward "\\(^Screen \\)\\([0-9]\\):" nil t) + (setq screen (match-string 2)))) + (when (re-search-forward "^\\(.*\\) connected" nil t) + (setq output (match-string 1))) + (list screen output)))) + +(defun helm-xrandr-screen () + "Return current X screen number." + (car (helm-xrandr-info))) + +(defun helm-xrandr-output () + "Return current X display name." + (cadr (helm-xrandr-info))) + +(defvar helm-source-xrandr-change-resolution + '((name . "Change Resolution") + (candidates + . (lambda () + (with-temp-buffer + (call-process "xrandr" nil (current-buffer) nil + "--screen" (helm-xrandr-screen) "-q") + (goto-char 1) + (cl-loop with modes = nil + while (re-search-forward " \\([0-9]+x[0-9]+\\)" nil t) + for mode = (match-string 1) + unless (member mode modes) + collect mode into modes + finally return modes)))) + (action + ("Change Resolution" + . (lambda (mode) + (call-process "xrandr" nil nil nil + "--screen" (helm-xrandr-screen) + "--output" (helm-xrandr-output) + "--mode" mode)))))) + + +;;; Emacs process +;; +;; +(defvar helm-source-emacs-process + '((name . "Emacs Process") + (init . (lambda () (list-processes--refresh))) + (candidates . (lambda () (mapcar #'process-name (process-list)))) + (persistent-action . (lambda (elm) + (delete-process (get-process elm)) + (helm-delete-current-selection))) + (update . list-processes--refresh) + (persistent-help . "Kill Process") + (action ("Kill Process" . (lambda (elm) + (delete-process (get-process elm))))))) + + +;;;###autoload +(defun helm-top () + "Preconfigured `helm' for top command." + (interactive) + (save-window-excursion + (unless helm-alive-p (delete-other-windows)) + (helm :sources 'helm-source-top + :buffer "*helm top*" :full-frame t + :candidate-number-limit 9999))) + +;;;###autoload +(defun helm-list-emacs-process () + "Preconfigured `helm' for emacs process." + (interactive) + (helm-other-buffer 'helm-source-emacs-process "*helm process*")) + +;;;###autoload +(defun helm-xrandr-set () + (interactive) + (helm :sources 'helm-source-xrandr-change-resolution + :buffer "*helm xrandr*")) + +(provide 'helm-sys) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions obsolete) +;; coding: utf-8 +;; indent-tabs-mode: nil +;; End: + +;;; helm-sys.el ends here diff --git a/elpa/helm-20140808.2300/helm-sys.elc b/elpa/helm-20140808.2300/helm-sys.elc new file mode 100644 index 0000000000000000000000000000000000000000..6ce3f82762a849fb4925dcaafdb4236d35f43c7d GIT binary patch literal 8947 zcmb_i|8v?#7B_aLlX~W6dUH3^oBnbexvn9H93;SC=Q?MCos_8^`wUKd7u>0U#b_cV zA_+V6ufNZGyAlFJ+Fs)cNbIiOzW4UM&-g1+O4z!z;N7LDnx5QoC59$EDx`#{(wtHLCPVK5d$5E0L=BN;}| zK;zlI96SAJfACCt6X)4TdSjCwDAh~#eY;#Lsi9~V?MsiTxV|{0N5maSxY*OK?3ec~ zp1XJBk#Ib)GKt->`->A}LA1Zklbw+psqLqcjKpB(J7c#m20=fHL)X8JikJ-2n+49+7}1#hyI9xKl-=5y`AsPVrlk+ffPm;XM>ORq-$Gr zLmxZ)qn!MxV5W-C0Y0^EnOEDpUAt5>#M@B5pSqzGeb4mVo}lyRFLN5ZUL^X{C=SNv zK=wT+l;&+1Oebm{79o7s6GnR$#d0h{={YfujVXXs=!CO3j&p#2pl2dtq@Bx<%jZ%i@$6D8})u z7{yK)7w@89io3i0$rRsXIW9_=u`FsXjR%Awf-rl+^o3 zaRbR$oEu9=LP4C96MQcnk!9hiY<$Y!e6FQkI*dCfbe$f&d0CrcIQ4-C9$(1=q1TeO z7@9=atY3H*WpcKA}lXF==27eGF7(f%<@4@e>-e=ioA z7+lx|roiWM{+i9M4?4^$V3h1}>cv1BSdl}7TSGAmrnI>`obmJclER;kdw>K&kRTl3 z4pK=^j-?+1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140808.2300/helm-tags.el b/elpa/helm-20140808.2300/helm-tags.el new file mode 100644 index 000000000..06d51dac1 --- /dev/null +++ b/elpa/helm-20140808.2300/helm-tags.el @@ -0,0 +1,339 @@ +;;; helm-tags.el --- Helm for Etags and Ctags. -*- lexical-binding: t -*- + +;; Copyright (C) 2012 ~ 2014 Thierry Volpiatto + +;; 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 . + +;;; Code: + +(require 'cl-lib) +(require 'helm) +(require 'helm-utils) + + +(defgroup helm-tags nil + "Tags related Applications and libraries for Helm." + :group 'helm) + +(defcustom helm-etags-tag-file-name "TAGS" + "Etags tag file name." + :type 'string + :group 'helm-tags) + +(defcustom helm-etags-tag-file-search-limit 10 + "The limit level of directory to search tag file. +Don't search tag file deeply if outside this value." + :type 'number + :group 'helm-tags) + +(defcustom helm-etags-match-part-only t + "Whether to match only the tag part of CANDIDATE in +helm-source-ctags-select." + :type 'boolean + :group 'helm-tags) + +(defcustom helm-etags-execute-action-at-once-if-one t + "Whether to jump straight to the selected tag if there's only +one match." + :type 'boolean + :group 'helm-tags) + +(defun helm-etags-run-switch-other-window () + "Run switch to other window action from `helm-source-etags-select'." + (interactive) + (with-helm-alive-p + (helm-quit-and-execute-action + (lambda (c) + (helm-etags-action-goto 'find-file-other-window c))))) + +(defun helm-etags-run-switch-other-frame () + "Run switch to other frame action from `helm-source-etags-select'." + (interactive) + (with-helm-alive-p + (helm-quit-and-execute-action + (lambda (c) + (helm-etags-action-goto 'find-file-other-frame c))))) + +(defvar helm-etags-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map helm-map) + (define-key map (kbd "M-") 'helm-goto-next-file) + (define-key map (kbd "M-") 'helm-goto-precedent-file) + (define-key map (kbd "C-w") 'helm-yank-text-at-point) + (define-key map (kbd "C-c ?") 'helm-etags-help) + (define-key map (kbd "C-c o") 'helm-etags-run-switch-other-window) + (define-key map (kbd "C-c C-o") 'helm-etags-run-switch-other-frame) + map) + "Keymap used in Etags.") + + +;;; Ctags +;; +;; +(defvar helm-ctags-modes + '( c-mode c++-mode awk-mode csharp-mode java-mode javascript-mode lua-mode + makefile-mode pascal-mode perl-mode cperl-mode php-mode python-mode + scheme-mode sh-mode slang-mode sql-mode tcl-mode )) + +(defun helm-ctags-init () + (when (and buffer-file-name + (memq major-mode helm-ctags-modes) + (helm-current-buffer-is-modified)) + (with-current-buffer (helm-candidate-buffer 'local) + (call-process-shell-command + (if (string-match "\\.el\\.gz$" helm-buffer-file-name) + (format "ctags -e -u -f- --language-force=lisp --fields=n =(zcat %s) " + helm-buffer-file-name) + (format "ctags -e -u -f- --fields=n %s " helm-buffer-file-name)) + nil (current-buffer)) + (goto-char (point-min)) + (forward-line 2) + (delete-region (point-min) (point)) + (cl-loop while (and (not (eobp)) (search-forward "\001" (point-at-eol) t)) + for lineno-start = (point) + for lineno = (buffer-substring + lineno-start + (1- (search-forward "," (point-at-eol) t))) + do + (forward-line 0) + (insert (format "%5s:" lineno)) + (search-forward "\177" (point-at-eol) t) + (delete-region (1- (point)) (point-at-eol)) + (forward-line 1))))) + +(defvar helm-source-ctags + '((name . "Exuberant ctags") + (init . helm-ctags-init) + (candidates-in-buffer) + (adjust) + (type . line)) + "Needs Exuberant Ctags. + +http://ctags.sourceforge.net/") + + +;;; Etags +;; +;; +(defvar helm-etags-mtime-alist nil + "Store the last modification time of etags files here.") +(defvar helm-etags-cache (make-hash-table :test 'equal) + "Cache content of etags files used here for faster access.") + +(defun helm-etags-get-tag-file (&optional directory) + "Return the path of etags file if found. +Lookes recursively in parents directorys for a +`helm-etags-tag-file-name' file." + ;; Get tag file from `default-directory' or upper directory. + (let ((current-dir (helm-etags-find-tag-file-directory + (or directory default-directory)))) + ;; Return nil if not find tag file. + (when current-dir + (expand-file-name helm-etags-tag-file-name current-dir)))) + +(defun helm-etags-all-tag-files () + "Return files from the following sources; + 1) An automatically located file in the parent directories, by `helm-etags-get-tag-file'. + 2) `tags-file-name', which is commonly set by `find-tag' command. + 3) `tags-table-list' which is commonly set by `visit-tags-table' command." + (helm-fast-remove-dups + (delq nil + (append (list (helm-etags-get-tag-file) + tags-file-name) + tags-table-list)) + :test 'equal)) + +(defun helm-etags-find-tag-file-directory (current-dir) + "Try to find the directory containing tag file. +If not found in CURRENT-DIR search in upper directory." + (let ((file-exists? #'(lambda (dir) + (let ((tag-path (expand-file-name + helm-etags-tag-file-name dir))) + (and (stringp tag-path) + (file-regular-p tag-path) + (file-readable-p tag-path)))))) + (cl-loop with count = 0 + until (funcall file-exists? current-dir) + ;; Return nil if outside the value of + ;; `helm-etags-tag-file-search-limit'. + if (= count helm-etags-tag-file-search-limit) + do (cl-return nil) + ;; Or search upper directories. + else + do (cl-incf count) + (setq current-dir (expand-file-name (concat current-dir "../"))) + finally return current-dir))) + +(defun helm-etags-get-header-name (_x) + "Create header name for this helm etags session." + (concat "Etags in " + (with-helm-current-buffer + (helm-etags-get-tag-file)))) + +(defun helm-etags-create-buffer (file) + "Create the `helm-buffer' based on contents of etags tag FILE." + (let* ((tag-fname file) + max + (split (with-current-buffer (find-file-noselect tag-fname) + (prog1 + (split-string (buffer-string) "\n" 'omit-nulls) + (setq max (line-number-at-pos (point-max))) + (kill-buffer)))) + (progress-reporter (make-progress-reporter "Loading tag file..." 0 max))) + (cl-loop + with fname + with cand + for i in split for count from 0 + for elm = (unless (string-match "^\x0c" i) + (helm-aif (string-match "\177" i) + (substring i 0 it) + i)) + do (cond ((and elm (string-match "^\\([^,]+\\),[0-9]+$" elm)) + (setq fname (match-string 1 elm))) + (elm (setq cand (concat fname ": " elm))) + (t (setq cand nil))) + when cand do (progn + (insert (concat cand "\n")) + (progress-reporter-update progress-reporter count))))) + +(defun helm-etags-init () + "Feed `helm-buffer' using `helm-etags-cache' or tag file. +If no entry in cache, create one." + (let ((tagfiles (helm-etags-all-tag-files))) + (when tagfiles + (with-current-buffer (helm-candidate-buffer 'global) + (dolist (f tagfiles) + (helm-aif (gethash f helm-etags-cache) + ;; An entry is present in cache, insert it. + (insert it) + ;; No entry, create a new buffer using content of tag file (slower). + (helm-etags-create-buffer f) + ;; Store content of buffer in cache. + (puthash f (buffer-string) helm-etags-cache) + ;; Store or set the last modification of tag file. + (helm-aif (assoc f helm-etags-mtime-alist) + ;; If an entry exists modify it. + (setcdr it (helm-etags-mtime f)) + ;; No entry create a new one. + (add-to-list 'helm-etags-mtime-alist + (cons f (helm-etags-mtime f)))))))))) + +(defun helm-etags-split-line (line) + (let ((regexp "\\`\\([[:lower:][:upper:]]?:?.*?\\): \\(.*\\)")) + (when (string-match regexp line) + (cl-loop for n from 1 to 2 collect (match-string n line))))) + +(defvar helm-source-etags-select + `((name . "Etags") + (header-name . helm-etags-get-header-name) + (init . helm-etags-init) + (candidates-in-buffer) + (match-part . (lambda (candidate) + ;; Match only the tag part of CANDIDATE + ;; and not the filename. + (if helm-etags-match-part-only + (cadr (helm-etags-split-line candidate)) + candidate))) + (mode-line . helm-etags-mode-line-string) + (keymap . ,helm-etags-map) + (action . (("Go to tag" . (lambda (c) + (helm-etags-action-goto 'find-file c))) + ("Go to tag in other window" . (lambda (c) + (helm-etags-action-goto + 'find-file-other-window + c))) + ("Go to tag in other frame" . (lambda (c) + (helm-etags-action-goto + 'find-file-other-frame + c))))) + (persistent-help . "Go to line") + (persistent-action . (lambda (candidate) + (helm-etags-action-goto 'find-file candidate) + (helm-highlight-current-line)))) + "Helm source for Etags.") + +(defvar find-tag-marker-ring) + +(defun helm-etags-action-goto (switcher candidate) + "Helm default action to jump to an etags entry in other window." + (require 'etags) + (helm-log-run-hook 'helm-goto-line-before-hook) + (let* ((split (helm-etags-split-line candidate)) + (fname (cl-loop for tagf being the hash-keys of helm-etags-cache + for f = (expand-file-name + (car split) (file-name-directory tagf)) + when (file-exists-p f) + return f)) + (elm (cadr split))) + (if (null fname) + (error "file %s not found" fname) + (ring-insert find-tag-marker-ring (point-marker)) + (funcall switcher fname) + (goto-char (point-min)) + (search-forward elm nil t) + (goto-char (match-beginning 0))))) + +(defun helm-etags-mtime (file) + "Last modification time of etags tag FILE." + (cadr (nth 5 (file-attributes file)))) + +(defun helm-etags-file-modified-p (file) + "Check if tag FILE have been modified in this session. +If FILE is nil return nil." + (let ((last-modif (and file + (assoc-default file helm-etags-mtime-alist)))) + (and last-modif + (/= last-modif (helm-etags-mtime file))))) + + +;;;###autoload +(defun helm-etags-select (arg) + "Preconfigured helm for etags. +If called with a prefix argument or if any of the tag files have +been modified, reinitialize cache. + +This function aggregates three sources of tag files: + + 1) An automatically located file in the parent directories, by `helm-etags-get-tag-file'. + 2) `tags-file-name', which is commonly set by `find-tag' command. + 3) `tags-table-list' which is commonly set by `visit-tags-table' command." + (interactive "P") + (let ((tag-files (helm-etags-all-tag-files)) + (helm-execute-action-at-once-if-one helm-etags-execute-action-at-once-if-one) + (str (thing-at-point 'symbol))) + (if (cl-notany 'file-exists-p tag-files) + (message "Error: No tag file found. Create with etags shell command, or visit with `find-tag' or `visit-tags-table'.") + (cl-loop for k being the hash-keys of helm-etags-cache + unless (member k tag-files) + do (remhash k helm-etags-cache)) + (mapc (lambda (f) + (when (or (equal arg '(4)) + (and helm-etags-mtime-alist + (helm-etags-file-modified-p f))) + (remhash f helm-etags-cache))) + tag-files) + (helm :sources 'helm-source-etags-select + :keymap helm-etags-map + :default (list (concat "\\_<" str "\\_>") str) + :buffer "*helm etags*")))) + +(provide 'helm-tags) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions obsolete) +;; coding: utf-8 +;; indent-tabs-mode: nil +;; End: + +;;; helm-tags.el ends here diff --git a/elpa/helm-20140808.2300/helm-tags.elc b/elpa/helm-20140808.2300/helm-tags.elc new file mode 100644 index 0000000000000000000000000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(JjF*u?H#`LgCM5wxy@q>2KRMyYH)hEl9KPKZ)LbY)!3ooQQf})hE^XlFDDKe3 z8bv`DGw3BJ341FKF#~TyVTK26>v>P5WPkx4D0o=L!z6F}ldcDk>NTB}kMY<2?aIdo z_=dA>Ha}mzB}1Bj4};R^>T4}xF899qQn9F;*%q$AEB*6X7JLI7E6H5qD`sg@^foZ^yxmAcY~9SX03Wy*Zu93(MnPGD`b2`M|Da^ z!&Gm}(K;rf=#)+tndN`~CrT{%`W4 + +;; 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 . + +;;; Code: + +(require 'cl-lib) +(require 'helm) +(require 'compile) ; Fixme: Is this needed? +(require 'dired) + +(declare-function helm-find-files-1 "helm-files.el" (fname &optional preselect)) + + +(defgroup helm-utils nil + "Utilities routines for Helm." + :group 'helm) + +(defcustom helm-su-or-sudo "sudo" + "What command to use for root access." + :type 'string + :group 'helm-utils) + +(defcustom helm-yank-symbol-first nil + "`helm-yank-text-at-point' yanks symbol at point on first +invocation if this is non-nil." + :type 'boolean + :group 'helm-utils) + +(defcustom helm-default-kbsize 1024.0 + "Default Kbsize to use for showing files size. +It is a float, usually 1024.0 but could be 1000.0 on some systems." + :group 'helm-utils + :type 'float) + +(defvar helm-goto-line-before-hook '(helm-save-current-pos-to-mark-ring) + "Run before jumping to line. +This hook run when jumping from `helm-goto-line', `helm-etags-default-action', +and `helm-imenu-default-action'.") + +(defvar helm-save-pos-before-jump-register ?_ + "The register where `helm-save-pos-to-register-before-jump' save position.") + +(defface helm-selection-line + '((t (:background "IndianRed4" :underline t))) + "Face used in the `helm-current-buffer' when jumping to candidate." + :group 'helm-utils) + + +;;; compatibility +;; +;; +(unless (fboundp 'window-system) + (defun window-system (&optional _arg) + window-system)) + +(unless (fboundp 'make-composed-keymap) + (defun make-composed-keymap (maps &optional parent) + "Construct a new keymap composed of MAPS and inheriting from PARENT. +When looking up a key in the returned map, the key is looked in each +keymap of MAPS in turn until a binding is found. +If no binding is found in MAPS, the lookup continues in PARENT, if non-nil. +As always with keymap inheritance, a nil binding in MAPS overrides +any corresponding binding in PARENT, but it does not override corresponding +bindings in other keymaps of MAPS. +MAPS can be a list of keymaps or a single keymap. +PARENT if non-nil should be a keymap." + `(keymap + ,@(if (keymapp maps) (list maps) maps) + ,@parent))) + +(unless (fboundp 'assoc-default) + (defun assoc-default (key alist &optional test default) + "Find object KEY in a pseudo-alist ALIST. +ALIST is a list of conses or objects. Each element (or the element's car, +if it is a cons) is compared with KEY by evaluating (TEST (car elt) KEY). +If that is non-nil, the element matches; +then `assoc-default' returns the element's cdr, if it is a cons, +or DEFAULT if the element is not a cons. + +If no element matches, the value is nil. +If TEST is omitted or nil, `equal' is used." + (let (found (tail alist) value) + (while (and tail (not found)) + (let ((elt (car tail))) + (when (funcall (or test 'equal) (if (consp elt) (car elt) elt) key) + (setq found t value (if (consp elt) (cdr elt) default)))) + (setq tail (cdr tail))) + value))) + +;; Function not available in XEmacs, +(unless (fboundp 'minibuffer-contents) + (defun minibuffer-contents () + "Return the user input in a minbuffer as a string. +The current buffer must be a minibuffer." + (field-string (point-max))) + + (defun delete-minibuffer-contents () + "Delete all user input in a minibuffer. +The current buffer must be a minibuffer." + (delete-field (point-max)))) + +;; Function not available in older Emacs (<= 22.1). +(unless (fboundp 'buffer-chars-modified-tick) + (defun buffer-chars-modified-tick (&optional buffer) + "Return BUFFER's character-change tick counter. +Each buffer has a character-change tick counter, which is set to the +value of the buffer's tick counter (see `buffer-modified-tick'), each +time text in that buffer is inserted or deleted. By comparing the +values returned by two individual calls of `buffer-chars-modified-tick', +you can tell whether a character change occurred in that buffer in +between these calls. No argument or nil as argument means use current +buffer as BUFFER." + (with-current-buffer (or buffer (current-buffer)) + (if (listp buffer-undo-list) + (length buffer-undo-list) + (buffer-modified-tick))))) + +;; Functions not available in versions < emacs-24. +;; Allow using helm-async.el in Emacs-23 among other things. +(unless (and (fboundp 'file-equal-p) + (fboundp 'file-in-directory-p)) + (defun file-equal-p (file1 file2) + "Return non-nil if files FILE1 and FILE2 name the same file. +If FILE1 or FILE2 does not exist, the return value is unspecified." + (let ((handler (or (find-file-name-handler file1 'file-equal-p) + (find-file-name-handler file2 'file-equal-p)))) + (if handler + (funcall handler 'file-equal-p file1 file2) + (let (f1-attr f2-attr) + (and (setq f1-attr (file-attributes (file-truename file1))) + (setq f2-attr (file-attributes (file-truename file2))) + (equal f1-attr f2-attr)))))) + + ;; This is the original loop version, more readable, not the one of 24.1+. + (defun file-in-directory-p (file dir) + "Return non-nil if FILE is in DIR or a subdirectory of DIR. +A directory is considered to be \"in\" itself. +Return nil if DIR is not an existing directory." + (let ((handler (or (find-file-name-handler file 'file-in-directory-p) + (find-file-name-handler dir 'file-in-directory-p)))) + (if handler + (funcall handler 'file-in-directory-p file dir) + (when (file-directory-p dir) + (cl-loop with f1 = (file-truename file) + with f2 = (file-truename dir) + with ls1 = (or (split-string f1 "/" t) (list "/")) + with ls2 = (or (split-string f2 "/" t) (list "/")) + for p = (string-match "^/" f1) + for i in ls1 for j in ls2 + when (string= i j) + concat (if p (concat "/" i) (concat i "/")) into root + finally return (file-equal-p (file-truename root) f2))))))) + + +;; CUA workaround +(defadvice cua-delete-region (around helm-avoid-cua activate) + (ignore-errors ad-do-it)) + +(defadvice copy-region-as-kill (around helm-avoid-cua activate) + (if cua-mode + (ignore-errors ad-do-it) + ad-do-it)) + + +;;; Utils functions +;; +;; +(defun helm-ff-find-printers () + "Return a list of available printers on Unix systems." + (when (executable-find "lpstat") + (let ((printer-list (with-temp-buffer + (call-process "lpstat" nil t nil "-a") + (split-string (buffer-string) "\n")))) + (cl-loop for p in printer-list + for printer = (car (split-string p)) + when printer + collect printer)))) + +;; Shut up byte compiler in emacs24*. +(defun helm-switch-to-buffer (buffer-or-name) + "Same as `switch-to-buffer' whithout warnings at compile time." + (with-no-warnings + (switch-to-buffer buffer-or-name))) + +(cl-defmacro helm-position (item seq &key (test 'eq) all) + "A simple and faster replacement of CL `position'. +Return position of first occurence of ITEM found in SEQ. +Argument SEQ can be a string, in this case ITEM have to be a char. +Argument ALL, if non--nil specify to return a list of positions of +all ITEM found in SEQ." + (let ((key (if (stringp seq) 'across 'in))) + `(cl-loop for c ,key ,seq + for index from 0 + when (funcall ,test c ,item) + if ,all collect index into ls + else return index + finally return ls))) + +(defun helm-substring (str width) + "Return the substring of string STR from 0 to WIDTH. +Handle multibyte characters by moving by columns." + (with-temp-buffer + (save-excursion + (insert str)) + (move-to-column width) + (buffer-substring (point-at-bol) (point)))) + +(cl-defun helm-substring-by-width (str width &optional (endstr "...")) + "Truncate string STR to end at column WIDTH. +Similar to `truncate-string-to-width'. +Add ENDSTR (default \"...\") at end of truncated STR. +Add spaces at end if needed to reach WIDTH when STR is shorter than WIDTH." + (cl-loop for ini-str = str + then (substring ini-str 0 (1- (length ini-str))) + for sw = (string-width ini-str) + when (<= sw width) return + (concat ini-str endstr (make-string (- width sw) ? )))) + +(defun helm-string-multibyte-p (str) + "Check if string STR contains multibyte characters." + (cl-loop for c across str + thereis (> (char-width c) 1))) + +(defun helm-get-pid-from-process-name (process-name) + "Get pid from running process PROCESS-NAME." + (cl-loop with process-list = (list-system-processes) + for pid in process-list + for process = (assoc-default 'comm (process-attributes pid)) + when (and process (string-match process-name process)) + return pid)) + +(cl-defun helm-current-buffer-narrowed-p (&optional + (buffer helm-current-buffer)) + "Check if BUFFER is narrowed. +Default is `helm-current-buffer'." + (with-current-buffer buffer + (let ((beg (point-min)) + (end (point-max)) + (total (buffer-size))) + (or (/= beg 1) (/= end (1+ total)))))) + +(defun helm-region-active-p () + (and transient-mark-mode mark-active (/= (mark) (point)))) + +(defun helm-goto-char (loc) + "Go to char, revealing if necessary." + (goto-char loc) + (when (or (eq major-mode 'org-mode) + (and (boundp 'outline-minor-mode) + outline-minor-mode)) + (require 'org) ; On some old Emacs versions org may not be loaded. + (org-reveal))) + +(defun helm-goto-line (lineno &optional noanim) + "Goto LINENO opening only outline headline if needed. +Animation is used unless NOANIM is non--nil." + (helm-log-run-hook 'helm-goto-line-before-hook) + (goto-char (point-min)) + (helm-goto-char (point-at-bol lineno)) + (unless noanim + (helm-highlight-current-line nil nil nil nil 'pulse))) + +(defun helm-save-pos-to-register-before-jump () + "Save current buffer position to `helm-save-pos-before-jump-register'. +To use this add it to `helm-goto-line-before-hook'." + (with-helm-current-buffer + (unless helm-in-persistent-action + (point-to-register helm-save-pos-before-jump-register)))) + +(defun helm-save-current-pos-to-mark-ring () + "Save current buffer position to mark ring. +To use this add it to `helm-goto-line-before-hook'." + (with-helm-current-buffer + (unless helm-in-persistent-action + (set-marker (mark-marker) (point)) + (push-mark (point) 'nomsg)))) + +;;;###autoload +(defun helm-show-all-in-this-source-only (arg) + "Show only current source of this helm session with all its candidates. +With a numeric prefix arg show only the ARG number of candidates." + (interactive "p") + (with-helm-window + (with-helm-default-directory helm-default-directory + (let ((helm-candidate-number-limit (and (> arg 1) arg))) + (helm-set-source-filter + (list (assoc-default 'name (helm-get-current-source)))))))) + +;;;###autoload +(defun helm-display-all-sources () + "Display all sources previously hidden by `helm-set-source-filter'." + (interactive) + (helm-set-source-filter nil)) + +(defun helm-displaying-source-names () + "Return the list of sources name for this helm session." + (with-current-buffer helm-buffer + (goto-char (point-min)) + (cl-loop with pos + while (setq pos (next-single-property-change (point) 'helm-header)) + do (goto-char pos) + collect (buffer-substring-no-properties (point-at-bol)(point-at-eol)) + do (forward-line 1)))) + +(defun helm-files-match-only-basename (candidate) + "Allow matching only basename of file when \" -b\" is added at end of pattern. +If pattern contain one or more spaces, fallback to match-plugin +even is \" -b\" is specified." + (let ((source (helm-get-current-source))) + (if (string-match "\\([^ ]*\\) -b\\'" helm-pattern) + (progn + (helm-attrset 'no-matchplugin nil source) + (string-match (match-string 1 helm-pattern) + (helm-basename candidate))) + ;; Disable no-matchplugin by side effect. + (helm-aif (assq 'no-matchplugin source) + (setq source (delete it source))) + (string-match + (replace-regexp-in-string " -b\\'" "" helm-pattern) + candidate)))) + +(defun helm--mapconcat-candidate (candidate) + "Transform string CANDIDATE in regexp. +e.g helm.el$ + => \"[^h]*h[^e]*e[^l]*l[^m]*m[^.]*[.][^e]*e[^l]*l$\" + ^helm.el$ + => \"helm[.]el$\"." + (let ((ls (split-string candidate "" t))) + (if (string= "^" (car ls)) + (mapconcat (lambda (c) + (if (string= c ".") + (concat "[" c "]") c)) + (cdr ls) "") + (mapconcat (lambda (c) + (cond ((string= c ".") + (concat "[^" c "]*" (concat "[" c "]"))) + ((string= c "$") c) + (t (concat "[^" c "]*" (regexp-quote c))))) + ls "")))) + +(defun helm-skip-entries (seq regexp-list) + "Remove entries which matches one of REGEXP-LIST from SEQ." + (cl-loop for i in seq + unless (cl-loop for regexp in regexp-list + thereis (and (stringp i) + (string-match regexp i))) + collect i)) + +(defun helm-shadow-entries (seq regexp-list) + "Put shadow property on entries in SEQ matching a regexp in REGEXP-LIST." + (let ((face 'italic)) + (cl-loop for i in seq + if (cl-loop for regexp in regexp-list + thereis (and (stringp i) + (string-match regexp i))) + collect (propertize i 'face face) + else collect i))) + +(defun helm-stringify (str-or-sym) + "Get string of STR-OR-SYM." + (if (stringp str-or-sym) + str-or-sym + (symbol-name str-or-sym))) + +(defun helm-symbolify (str-or-sym) + "Get symbol of STR-OR-SYM." + (if (symbolp str-or-sym) + str-or-sym + (intern str-or-sym))) + +(defun helm-describe-function (func) + "FUNC is symbol or string." + (describe-function (helm-symbolify func)) + (message nil)) + +(defun helm-describe-variable (var) + "VAR is symbol or string." + (describe-variable (helm-symbolify var)) + (message nil)) + +(defun helm-find-function (func) + "FUNC is symbol or string." + (find-function (helm-symbolify func))) + +(defun helm-find-variable (var) + "VAR is symbol or string." + (find-variable (helm-symbolify var))) + +(defun helm-kill-new (candidate &optional replace) + "CANDIDATE is symbol or string. +See `kill-new' for argument REPLACE." + (kill-new (helm-stringify candidate) replace)) + +(cl-defun helm-fast-remove-dups (seq &key (test 'eq)) + "Remove duplicates elements in list SEQ. +This is same as `remove-duplicates' but with memoisation. +It is much faster, especially in large lists. +A test function can be provided with TEST argument key. +Default is `eq'." + (cl-loop with cont = (make-hash-table :test test) + for elm in seq + unless (gethash elm cont) + do (puthash elm elm cont) + finally return + (cl-loop for i being the hash-values in cont collect i))) + +;;;###autoload +(defun helm-quit-and-find-file () + "Drop into `helm-find-files' from `helm'. +If current selection is a buffer or a file, `helm-find-files' +from its directory." + (interactive) + (require 'helm-grep) + (helm-run-after-quit + (lambda (f) + (if (file-exists-p f) + (helm-find-files-1 (file-name-directory f) + (regexp-quote + (if helm-ff-transformer-show-only-basename + (helm-basename f) f))) + (helm-find-files-1 f))) + (let* ((sel (helm-get-selection)) + (grep-line (and (stringp sel) + (helm-grep-split-line sel)))) + (if (stringp sel) + (helm-aif (get-buffer (or (get-text-property + (1- (length sel)) 'buffer-name sel) + sel)) + (or (buffer-file-name it) + (car (rassoc it dired-buffers)) + (and (with-current-buffer it + (eq major-mode 'org-agenda-mode)) + org-directory + (expand-file-name org-directory)) + (with-current-buffer it default-directory)) + (cond ((or (file-remote-p sel) + (file-exists-p sel)) + (expand-file-name sel)) + ((and grep-line (file-exists-p (car grep-line))) + (expand-file-name (car grep-line))) + ((and ffap-url-regexp (string-match ffap-url-regexp sel)) sel) + (t default-directory))) + default-directory)))) + +;; Same as `vc-directory-exclusion-list'. +(defvar helm-walk-ignore-directories + '("SCCS" "RCS" "CVS" "MCVS" ".svn" ".git" ".hg" ".bzr" + "_MTN" "_darcs" "{arch}")) + +(cl-defun helm-walk-directory (directory &key path (directories t) match skip-subdirs) + "Walk through DIRECTORY tree. +Argument PATH can be one of basename, relative, or full, 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 +instead of `helm-walk-ignore-directories'." + (let* (result + (fn (cl-case path + (basename 'file-name-nondirectory) + (relative 'file-relative-name) + (full 'identity) + (t 'file-name-nondirectory))) + ls-R) + (setq ls-R (lambda (dir) + (unless (and skip-subdirs + (member (helm-basename dir) + (if (listp skip-subdirs) + skip-subdirs + helm-walk-ignore-directories))) + (cl-loop with ls = (directory-files + dir t directory-files-no-dot-files-regexp) + for f in ls + if (file-directory-p f) + do (progn (when directories + (push (funcall fn f) result)) + ;; Don't recurse in directory symlink. + (unless (file-symlink-p f) + (funcall ls-R f))) + else do + (if match + (and (if (functionp match) + (funcall match f) + (and (stringp match) + (string-match + match (file-name-nondirectory f)))) + (push (funcall fn f) result)) + (push (funcall fn f) result)))))) + (funcall ls-R directory) + (nreverse result))) + +(defun helm-generic-sort-fn (s1 s2) + "Sort predicate function for helm candidates. +Args S1 and S2 can be single or \(display . real\) candidates, +that is sorting is done against real value of candidate." + (let* ((reg1 (concat "\\_<" helm-pattern "\\_>")) + (reg2 (concat "\\_<" helm-pattern)) + (split (split-string helm-pattern)) + (str1 (if (consp s1) (cdr s1) s1)) + (str2 (if (consp s2) (cdr s2) s2)) + (score #'(lambda (str r1 r2 lst) + (cond ((string-match r1 str) 4) + ((and (string-match " " helm-pattern) + (string-match (concat "\\_<" (car lst)) str) + (cl-loop for r in (cdr lst) + always (string-match r str))) 3) + ((and (string-match " " helm-pattern) + (cl-loop for r in lst always (string-match r str))) 2) + ((string-match r2 str) 1) + (t 0)))) + (sc1 (funcall score str1 reg1 reg2 split)) + (sc2 (funcall score str2 reg1 reg2 split))) + (cond ((or (zerop (string-width helm-pattern)) + (and (zerop sc1) (zerop sc2))) + (string-lessp str1 str2)) + ((= sc1 sc2) + (< (length str1) (length str2))) + (t (> sc1 sc2))))) + +(defun helm-basename (fname &optional ext) + "Print FNAME with any leading directory components removed. +If specified, also remove filename extension EXT." + (let ((non-essential t)) + (if (and ext (or (string= (file-name-extension fname) ext) + (string= (file-name-extension fname t) ext)) + (not (file-directory-p fname))) + (file-name-sans-extension (file-name-nondirectory fname)) + (file-name-nondirectory (directory-file-name fname))))) + +(defun helm-basedir (fname) + "Return the base directory of filename." + (helm-aif (and fname (file-name-directory fname)) + (file-name-as-directory it))) + +(defun helm-ff-get-host-from-tramp-invalid-fname (fname) + "Extract hostname from an incomplete tramp file name. +Return nil on valid file name remote or not." + (let* ((str (helm-basename fname)) + (split (split-string str ":")) + (meth (car (member (car split) (mapcar 'car tramp-methods))))) + (when (and meth (<= (length split) 2)) + (cadr split)))) + +(cl-defun helm-file-human-size (size &optional (kbsize helm-default-kbsize)) + "Return a string showing SIZE of a file in human readable form. +SIZE can be an integer or a float depending it's value. +`file-attributes' will take care of that to avoid overflow error. +KBSIZE if a floating point number, defaulting to `helm-default-kbsize'." + (let ((M (cons "M" (/ size (expt kbsize 2)))) + (G (cons "G" (/ size (expt kbsize 3)))) + (K (cons "K" (/ size kbsize))) + (B (cons "B" size))) + (cl-loop with result = B + for (a . b) in + (cl-loop for (x . y) in (list M G K B) + unless (< y 1) collect (cons x y)) + when (< b (cdr result)) do (setq result (cons a b)) + finally return (if (string= (car result) "B") + (format "%s" size) + (format "%.1f%s" (cdr result) (car result)))))) + +(cl-defun helm-file-attributes + (file &key type links uid gid access-time modif-time + status size mode gid-change inode device-num dired human-size + mode-type mode-owner mode-group mode-other (string t)) + "Return `file-attributes' elements of FILE separately according to key value. +Availables keys are: +- TYPE: Same as nth 0 `files-attributes' if STRING is nil + otherwise return either symlink, directory or file (default). +- LINKS: See nth 1 `files-attributes'. +- UID: See nth 2 `files-attributes'. +- GID: See nth 3 `files-attributes'. +- ACCESS-TIME: See nth 4 `files-attributes', however format time + when STRING is non--nil (the default). +- MODIF-TIME: See nth 5 `files-attributes', same as above. +- STATUS: See nth 6 `files-attributes', same as above. +- SIZE: See nth 7 `files-attributes'. +- MODE: See nth 8 `files-attributes'. +- GID-CHANGE: See nth 9 `files-attributes'. +- INODE: See nth 10 `files-attributes'. +- DEVICE-NUM: See nth 11 `files-attributes'. +- DIRED: A line similar to what 'ls -l' return. +- HUMAN-SIZE: The size in human form, see `helm-file-human-size'. +- MODE-TYPE, mode-owner,mode-group, mode-other: Split what + nth 7 `files-attributes' return in four categories. +- STRING: When non--nil (default) `helm-file-attributes' return + more friendly values. +If you want the same behavior as `files-attributes' , +\(but with return values in proplist\) use a nil value for STRING. +However when STRING is non--nil, time and type value are different from what +you have in `file-attributes'." + (let* ((all (cl-destructuring-bind + (type links uid gid access-time modif-time + status size mode gid-change inode device-num) + (file-attributes file string) + (list :type (if string + (cond ((stringp type) "symlink") ; fname + (type "directory") ; t + (t "file")) ; nil + type) + :links links + :uid uid + :gid gid + :access-time (if string + (format-time-string + "%Y-%m-%d %R" access-time) + access-time) + :modif-time (if string + (format-time-string + "%Y-%m-%d %R" modif-time) + modif-time) + :status (if string + (format-time-string + "%Y-%m-%d %R" status) + status) + :size size + :mode mode + :gid-change gid-change + :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)) + (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))) + (human-size (helm-file-human-size (cl-getf all :size))) + (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))))) + +(defun helm-split-mode-file-attributes (str &optional string) + "Split mode file attributes STR into a proplist. +If STRING is non--nil return instead a space separated string." + (cl-loop with type = (substring str 0 1) + with cdr = (substring str 1) + for i across cdr + for count from 1 + if (<= count 3) + concat (string i) into user + if (and (> count 3) (<= count 6)) + concat (string i) into group + if (and (> count 6) (<= count 9)) + concat (string i) into other + finally return + (if string + (mapconcat 'identity (list type user group other) " ") + (list :mode-type type :user user :group group :other other)))) + +(defun helm-current-directory () + "Return current-directory name at point. +Useful in dired buffers when there is inserted subdirs." + (if (eq major-mode 'dired-mode) + (dired-current-directory) + default-directory)) + +(defmacro with-helm-display-marked-candidates (buffer-or-name candidates &rest body) + (declare (indent 0) (debug t)) + (let ((buffer (make-symbol "buffer")) + (window (make-symbol "window"))) + `(let* ((,buffer (temp-buffer-window-setup ,buffer-or-name)) + ,window) + (unwind-protect + (with-current-buffer ,buffer + (dired-format-columns-of-files ,candidates) + (select-window + (setq ,window (temp-buffer-window-show + ,buffer + '(display-buffer-below-selected + (window-height . fit-window-to-buffer))))) + (progn ,@body)) + (quit-window 'kill ,window))))) + +;;; Persistent Action Helpers +;; +;; +;; Internal +(defvar helm-match-line-overlay nil) + +(defun helm-highlight-current-line (&optional start end buf face pulse) + "Highlight and underline current position" + (let* ((start (or start (line-beginning-position))) + (end (or end (1+ (line-end-position)))) + (args (list start end buf))) + (if (not helm-match-line-overlay) + (setq helm-match-line-overlay (apply 'make-overlay args)) + (apply 'move-overlay helm-match-line-overlay args)) + (overlay-put helm-match-line-overlay + 'face (or face 'helm-selection-line)) + (recenter) + (when pulse + (sit-for 0.3) + (helm-match-line-cleanup)))) + +(defun helm-match-line-cleanup () + (when helm-match-line-overlay + (delete-overlay helm-match-line-overlay) + (setq helm-match-line-overlay nil))) + +(defun helm-match-line-update () + (when helm-match-line-overlay + (delete-overlay helm-match-line-overlay) + (helm-highlight-current-line))) + +(add-hook 'helm-cleanup-hook 'helm-match-line-cleanup) +(add-hook 'helm-after-persistent-action-hook 'helm-match-line-update) + +(defun helm-w32-prepare-filename (file) + "Convert filename FILE to something usable by external w32 executables." + (replace-regexp-in-string ; For UNC paths + "/" "\\" + (replace-regexp-in-string ; Strip cygdrive paths + "/cygdrive/\\(.\\)" "\\1:" + file nil nil) nil t)) + +;;;###autoload +(defun helm-w32-shell-execute-open-file (file) + (interactive "fOpen file:") + (with-no-warnings + (w32-shell-execute "open" (helm-w32-prepare-filename file)))) + +(defun helm-open-file-with-default-tool (file) + "Open FILE with the default tool on this platform." + (let (process-connection-type) + (if (eq system-type 'windows-nt) + (helm-w32-shell-execute-open-file file) + (start-process "helm-open-file-with-default-tool" + nil + (cond ((eq system-type 'gnu/linux) + "xdg-open") + ((or (eq system-type 'darwin) ;; Mac OS X + (eq system-type 'macos)) ;; Mac OS 9 + "open")) + file)))) + +(defun helm-open-dired (file) + "Opens a dired buffer in FILE's directory. If FILE is a +directory, open this directory." + (if (file-directory-p file) + (dired file) + (dired (file-name-directory file)) + (dired-goto-file file))) + +(defun helm-action-line-goto (lineno-and-content) + (apply #'helm-goto-file-line + (append lineno-and-content + (list (helm-interpret-value (helm-attr 'target-file)) + (if (and (helm-attr-defined 'target-file) + (not helm-in-persistent-action)) + 'find-file-other-window + 'find-file))))) + +(cl-defun helm-action-file-line-goto (file-line-content) + (apply #'helm-goto-file-line + (if (stringp file-line-content) + ;; Case: filtered-candidate-transformer is skipped + (cdr (helm-filtered-candidate-transformer-file-line-1 + file-line-content)) + file-line-content))) + +(defun helm-require-or-error (feature function) + (or (require feature nil t) + (error "Need %s to use `%s'." feature function))) + +(defun helm-filtered-candidate-transformer-file-line (candidates _source) + (delq nil (mapcar 'helm-filtered-candidate-transformer-file-line-1 + candidates))) + +(defun helm-filtered-candidate-transformer-file-line-1 (candidate) + (when (string-match "^\\(.+?\\):\\([0-9]+\\):\\(.*\\)$" candidate) + (let ((filename (match-string 1 candidate)) + (lineno (match-string 2 candidate)) + (content (match-string 3 candidate))) + (cons (format "%s:%s\n %s" + (propertize filename 'face compilation-info-face) + (propertize lineno 'face compilation-line-face) + content) + (list (string-to-number lineno) content + (expand-file-name + filename + (or (helm-interpret-value (helm-attr 'default-directory)) + (and (helm-candidate-buffer) + (buffer-local-value + 'default-directory (helm-candidate-buffer)))))))))) + +(cl-defun helm-goto-file-line (lineno &optional content file (find-file-function #'find-file)) + (helm-aif (helm-attr 'before-jump-hook) + (funcall it)) + (when file (funcall find-file-function file)) + (if (helm-attr-defined 'adjust) + (helm-goto-line-with-adjustment lineno content) + (helm-goto-line lineno)) + (unless (helm-attr-defined 'recenter) + (set-window-start (get-buffer-window helm-current-buffer) (point))) + (helm-aif (helm-attr 'after-jump-hook) + (funcall it)) + (when helm-in-persistent-action + (helm-highlight-current-line))) + +(defun helm-find-file-as-root (candidate) + (let ((buf (helm-basename candidate)) + non-essential) + (if (buffer-live-p (get-buffer buf)) + (progn + (set-buffer buf) + (find-alternate-file (concat "/" helm-su-or-sudo + "::" (expand-file-name candidate)))) + (find-file (concat "/" helm-su-or-sudo "::" (expand-file-name candidate)))))) + +(defun helm-find-many-files (_ignore) + (let ((helm--reading-passwd-or-string t)) + (mapc 'find-file (helm-marked-candidates)))) + +(defun helm-goto-line-with-adjustment (line line-content) + (let ((startpos) + offset found pat) + ;; This constant is 1/2 the initial search window. + ;; There is no sense in making it too small, + ;; since just going around the loop once probably + ;; costs about as much as searching 2000 chars. + (setq offset 1000 + found nil + pat (concat (if (eq selective-display t) + "\\(^\\|\^m\\) *" "^ *") ;allow indent + (regexp-quote line-content))) + ;; If no char pos was given, try the given line number. + (setq startpos (progn (helm-goto-line line) (point))) + (or startpos (setq startpos (point-min))) + ;; First see if the tag is right at the specified location. + (goto-char startpos) + (setq found (looking-at pat)) + (while (and (not found) + (progn + (goto-char (- startpos offset)) + (not (bobp)))) + (setq found + (re-search-forward pat (+ startpos offset) t) + offset (* 3 offset))) ; expand search window + (or found + (re-search-forward pat nil t) + (error "not found"))) + ;; Position point at the right place + ;; if the search string matched an extra Ctrl-m at the beginning. + (and (eq selective-display t) + (looking-at "\^m") + (forward-char 1)) + (forward-line 0)) + +(defun helm-quit-and-execute-action (action) + "Quit current helm session and execute ACTION." + (setq helm-saved-action action) + (helm-exit-minibuffer)) + +;; Yank text at point. +;; +;; +;; Internal +(defvar helm-yank-point nil) + +;;;###autoload +(defun helm-yank-text-at-point () + "Yank text at point in `helm-current-buffer' into minibuffer. +If `helm-yank-symbol-first' is non--nil the first yank +grabs the entire symbol." + (interactive) + (with-helm-current-buffer + (let ((fwd-fn (if helm-yank-symbol-first + 'forward-symbol 'forward-word))) + ;; Start to initial point if C-w have never been hit. + (unless helm-yank-point (setq helm-yank-point (point))) + (save-excursion + (goto-char helm-yank-point) + (funcall fwd-fn 1) + (helm-set-pattern + (concat + helm-pattern (replace-regexp-in-string + "\\`\n" "" + (buffer-substring-no-properties + helm-yank-point (point))))) + (setq helm-yank-point (point)))))) + +(defun helm-reset-yank-point () + (setq helm-yank-point nil)) + +(add-hook 'helm-after-persistent-action-hook 'helm-reset-yank-point) +(add-hook 'helm-cleanup-hook 'helm-reset-yank-point) +(add-hook 'helm-after-initialize-hook 'helm-reset-yank-point) + +(defun helm-html-bookmarks-to-alist (file url-regexp bmk-regexp) + "Parse html bookmark FILE and return an alist with (title . url) as elements." + (let (bookmarks-alist url title) + (with-temp-buffer + (insert-file-contents file) + (goto-char (point-min)) + (while (re-search-forward "href=\\|^ *

\\([^><]+.[^]\\)") +(defvar helm-w3m-bookmark-url-regexp "\\(https\\|http\\|ftp\\|file\\)://[^>]*") +(defvar helm-w3m-bookmarks-alist nil) +(defvar helm-source-w3m-bookmarks + '((name . "W3m Bookmarks") + (init . (lambda () + (setq helm-w3m-bookmarks-alist + (helm-html-bookmarks-to-alist + w3m-bookmark-file + helm-w3m-bookmark-url-regexp + helm-w3m-bookmarks-regexp)))) + (candidates . (lambda () + (mapcar #'car helm-w3m-bookmarks-alist))) + (filtered-candidate-transformer + helm-adaptive-sort + helm-highlight-w3m-bookmarks) + (action . (("Browse Url" + . (lambda (candidate) + (helm-w3m-browse-bookmark candidate))) + ("Copy Url" + . (lambda (elm) + (kill-new (helm-w3m-bookmarks-get-value elm)))) + ("Browse Url Externally" + . (lambda (candidate) + (helm-w3m-browse-bookmark candidate t))) + ("Delete Bookmark" + . (lambda (candidate) + (helm-w3m-delete-bookmark candidate))) + ("Rename Bookmark" + . (lambda (candidate) + (helm-w3m-rename-bookmark candidate))))) + (persistent-action . (lambda (candidate) + (if current-prefix-arg + (helm-w3m-browse-bookmark candidate t) + (helm-w3m-browse-bookmark candidate nil t)))) + (persistent-help . "Open URL with emacs-w3m in new tab / \ +C-u \\[helm-execute-persistent-action]: Open URL with Firefox")) + "Needs w3m and emacs-w3m. + +http://w3m.sourceforge.net/ +http://emacs-w3m.namazu.org/") + + +(defun helm-w3m-bookmarks-get-value (elm) + (replace-regexp-in-string + "\"" "" (cdr (assoc elm helm-w3m-bookmarks-alist)))) + +(defun helm-w3m-browse-bookmark (elm &optional use-external new-tab) + (let* ((fn (if use-external 'helm-browse-url 'w3m-browse-url)) + (arg (and (eq fn 'w3m-browse-url) new-tab))) + (funcall fn (helm-w3m-bookmarks-get-value elm) arg))) + +(defun helm-highlight-w3m-bookmarks (bookmarks _source) + (cl-loop for i in bookmarks + collect (propertize + i 'face 'helm-w3m-bookmarks + 'help-echo (helm-w3m-bookmarks-get-value i)))) + + +(defun helm-w3m-delete-bookmark (elm) + "Delete w3m bookmark from `w3m-bookmark-file'." + (with-current-buffer + (find-file-literally w3m-bookmark-file) + (goto-char (point-min)) + (when (re-search-forward elm nil t) + (forward-line 0) + (delete-region (point) + (line-end-position)) + (delete-blank-lines)) + (save-buffer) + (kill-buffer))) + +(defun helm-w3m-rename-bookmark (elm) + "Rename w3m bookmark in `w3m-bookmark-file'." + (let* ((old-title (replace-regexp-in-string ">" "" elm)) + (new-title (helm-read-string "NewTitle: " old-title))) + (with-current-buffer + (find-file-literally w3m-bookmark-file) + (goto-char (point-min)) + (when (re-search-forward (concat elm "<") nil t) + (goto-char (1- (point))) + (delete-char (- (length old-title))) + (insert new-title)) + (save-buffer) + (kill-buffer)))) + +;;;###autoload +(defun helm-w3m-bookmarks () + "Preconfigured `helm' for w3m bookmark. + +Needs w3m and emacs-w3m. + +http://w3m.sourceforge.net/ +http://emacs-w3m.namazu.org/" + (interactive) + (helm-other-buffer 'helm-source-w3m-bookmarks + "*helm w3m bookmarks*")) + + +(provide 'helm-w3m) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions obsolete) +;; coding: utf-8 +;; indent-tabs-mode: nil +;; End: + +;;; helm-w3m.el ends here diff --git a/elpa/helm-20140808.2300/helm-w3m.elc b/elpa/helm-20140808.2300/helm-w3m.elc new file mode 100644 index 0000000000000000000000000000000000000000..812b27d4c64e1240f5cee8d0e4e7bf1ba976cb67 GIT binary patch literal 3894 zcmb_fS#R4$5VoBnP5sojz7*(~YHBIXN+e}Twv!q@>a;-|r|^LkuoPrPt}G%H$?UFt z1VMj$zg<$7EvG?J!z7p7nQ!Nw(Ubjyy&o197M7npc|v>XAd6xVQumq$TyNu2>?IF& z)AU_6P6HlOn$R)Vv@<*>+90p7>8)@2>*TxMnuX}ebU;0TQ0-I+scOKeRmFe@sv6cr zobg&;!~epR2|8!X&R7Gr2qJ;Jh3ta#r!kPYBwO;k?-esiw#AAq(>1Ysr z;2H#~x@LrSrb>QT{mo= zXV@O*7@m(0bzEz>Kxj9c*mPSCok{V27)e1v%;Km^CQ|H;4RsW&e91!&$6tVGsB}7D zp$K9w1v{7NFw030Nt8q}Ij^yhBIX*t-pR5!3i4 z-Q$56L$fZ@VZh}(Mdh-l@+R1YVFRWUT=T>O3|<7BoCwmDN`;(f2Em+TWE%rG9cosV z%c1C9aJx0eW;TbMe`-}Q)J6=|z8=KRgu|v12*zxRK@@S7k+aoqm(Sj8J?;EjJ$v)C z#6&h8>{tSk_S{ zF_lW4f9gl){TP>?H6j2}=1d_jJG(NyRDw=r?2JU4NDIP=RF-gTDN_}5m5hAOUYcFc zf*=90@h*yEmWaz~ppnbixzOx_$3sDe*y2pYq5UhUoS-#af2m|9Ss~l+A{JWEC{+Ff zEwt2k>3Jk<^nE6lwA6F4AXsL)q0%DJtZ+vWyE6`mdMJ$&NSb9*^r9=q<@vNZ@A3<@ z|12_7T5VOE76@+7Opd+EL_()W2W0#7IBQL-HD1-cOEubKLu$9rY^aDU5e(6CZYkH< zq*<_MXbrve$}v7F{fxsrukKg!YKXw+idHAVHz#IFXMUq)yPEAt=t^ir?%FpG+Rjd? z=s%O?upIS%2UE0qQvG6y8>q};;@bMUg_bncMvh7(F>t>y+f zix8v!U;$#eSoz!NpX?tU?i|qJ{%dx!vpZLzJE{hi&KlmDQOc_0c}tr{y_JQf z?Y7_amyAy4hLIrm1fGri->y7d+%@})OFQOq&luv~f;EC)ZxtGw7|djfpwZC>bk;i> zG&Ikc2>R)~VmW04&z~4!_tmQxFL#b!9Mkcu)1$q8t8!@@p;OcaSa;mQ$qu}4Z`J-) zbhS|o-S2q z6~<1tfy6OpZr(I=>mCMD_pf{^^?YmV%EH^@!VO-1>5sE~$VEm5g{jv@rfz(~)OS~p zEn7TnhDyQ1aaB1KmnV^q#U?qQ=_u!^Q#h+|jQMqPw?|rqN9x{2EBA<3cj+%F@MEVJ zoewcQ&|4$d>aDpIvHkzgayDNo^K)f1|0 i*->;1{RqQ&ePolS>sE|0P4z~Zxrp#{Xxv;X%l`t99@4)6 literal 0 HcmV?d00001 diff --git a/elpa/helm-20140808.2300/helm-yaoddmuse.el b/elpa/helm-20140808.2300/helm-yaoddmuse.el new file mode 100644 index 000000000..7df533248 --- /dev/null +++ b/elpa/helm-20140808.2300/helm-yaoddmuse.el @@ -0,0 +1,171 @@ +;;; helm-yaoddmuse.el --- Helm extension for yaoddmuse -*- lexical-binding: t -*- + +;; Copyright (C) 2012 ~ 2014 Thierry Volpiatto + +;; 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 . + +;;; Code: + +(require 'cl-lib) +(require 'helm) + +(declare-function yaoddmuse-update-pagename "ext:yaoddmuse.el" (&optional unforced)) +(declare-function yaoddmuse-get-library-list "ext:yaoddmuse.el" (&optional dirs string)) + +;; Be sure to have yaoddmuse.el installed +;; install-elisp may be required if you want to install elisp file from here. +(defvar helm-yaoddmuse-use-cache-file nil) +(defvar helm-yaoddmuse-cache-file "~/.emacs.d/yaoddmuse-cache.el") +(defvar helm-yaoddmuse-ew-cache nil) +(defvar yaoddmuse-pages-hash) + +(defun helm-yaoddmuse-get-candidates () + (if helm-yaoddmuse-use-cache-file + (ignore-errors + (unless helm-yaoddmuse-ew-cache + (load helm-yaoddmuse-cache-file) + (setq helm-yaoddmuse-ew-cache + (gethash "EmacsWiki" yaoddmuse-pages-hash))) + helm-yaoddmuse-ew-cache) + (yaoddmuse-update-pagename t) + (gethash "EmacsWiki" yaoddmuse-pages-hash))) + +(defvar helm-source-yaoddmuse-emacswiki-edit-or-view + '((name . "Yaoddmuse Edit or View (EmacsWiki)") + (candidates . helm-yaoddmuse-get-candidates) + (action . (("Edit page" . (lambda (candidate) + (yaoddmuse-edit "EmacsWiki" candidate))) + ("Browse page" + . (lambda (candidate) + (yaoddmuse-browse-page "EmacsWiki" candidate))) + ("Browse page other window" + . (lambda (candidate) + (if (one-window-p) + (split-window-vertically)) + (yaoddmuse-browse-page "EmacsWiki" candidate))) + ("Browse diff" + . (lambda (candidate) + (yaoddmuse-browse-page-diff "EmacsWiki" candidate))) + ("Copy URL" + . (lambda (candidate) + (kill-new (yaoddmuse-url "EmacsWiki" candidate)) + (message "Have copy page %s's URL to yank." candidate))) + ("Create page" + . (lambda (candidate) + (yaoddmuse-edit "EmacsWiki" helm-input))) + ("Update cache" + . (lambda (candidate) + (if helm-yaoddmuse-use-cache-file + (progn + (helm-yaoddmuse-cache-pages t) + (setq helm-yaoddmuse-ew-cache + (gethash "EmacsWiki" yaoddmuse-pages-hash))) + (yaoddmuse-update-pagename)))))) + (action-transformer helm-yaoddmuse-action-transformer)) + "Needs yaoddmuse.el. + +http://www.emacswiki.org/emacs/download/yaoddmuse.el") + + +(defvar helm-source-yaoddmuse-emacswiki-post-library + '((name . "Yaoddmuse Post library (EmacsWiki)") + (init . (helm-yaoddmuse-init)) + (candidates-in-buffer) + (action . (("Post library and Browse" + . (lambda (candidate) + (yaoddmuse-post-file + (find-library-name candidate) + "EmacsWiki" + (file-name-nondirectory (find-library-name candidate)) + nil t))) + ("Post library" + . (lambda (candidate) + (yaoddmuse-post-file + (find-library-name candidate) + "EmacsWiki" + (file-name-nondirectory + (find-library-name candidate)))))))) + "Needs yaoddmuse.el. + +http://www.emacswiki.org/emacs/download/yaoddmuse.el") + + +(defun helm-yaoddmuse-action-transformer (actions candidate) + "Allow the use of `install-elisp' only on elisp files." + (if (string-match "\.el$" candidate) + (append actions '(("Install Elisp" + . (lambda (elm) + (install-elisp-from-emacswiki elm))))) + actions)) + +;;;###autoload +(defun helm-yaoddmuse-cache-pages (&optional load) + "Fetch the list of files on emacswiki and create cache file. +If load is non--nil load the file and feed `yaoddmuse-pages-hash'." + (interactive) + (yaoddmuse-update-pagename) + (save-excursion + (find-file helm-yaoddmuse-cache-file) + (erase-buffer) + (insert "(puthash \"EmacsWiki\" '(") + (cl-loop for i in (gethash "EmacsWiki" yaoddmuse-pages-hash) + do + (insert (concat "(\"" (car i) "\") "))) + (insert ") yaoddmuse-pages-hash)\n") + (save-buffer) + (kill-buffer (current-buffer)) + (when (or current-prefix-arg + load) + (load helm-yaoddmuse-cache-file)))) + +(defun helm-yaoddmuse-init () + "Init helm buffer status." + (let ((helm-buffer (helm-candidate-buffer 'global)) + (library-list (yaoddmuse-get-library-list))) + (with-current-buffer helm-buffer + ;; Insert library name. + (cl-dolist (library library-list) + (insert (format "%s\n" library))) + ;; Sort lines. + (sort-lines nil (point-min) (point-max))))) + +;;;###autoload +(defun helm-yaoddmuse-emacswiki-edit-or-view () + "Preconfigured `helm' to edit or view EmacsWiki page. + +Needs yaoddmuse.el. + +http://www.emacswiki.org/emacs/download/yaoddmuse.el" + (interactive) + (helm :sources 'helm-source-yaoddmuse-emacswiki-edit-or-view)) + +;;;###autoload +(defun helm-yaoddmuse-emacswiki-post-library () + "Preconfigured `helm' to post library to EmacsWiki. + +Needs yaoddmuse.el. + +http://www.emacswiki.org/emacs/download/yaoddmuse.el" + (interactive) + (helm :sources 'helm-source-yaoddmuse-emacswiki-post-library)) + +(provide 'helm-yaoddmuse) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions obsolete) +;; coding: utf-8 +;; indent-tabs-mode: nil +;; End: + +;;; helm-yaoddmuse.el ends here diff --git a/elpa/helm-20140808.2300/helm-yaoddmuse.elc b/elpa/helm-20140808.2300/helm-yaoddmuse.elc new file mode 100644 index 0000000000000000000000000000000000000000..9466d9bd94379c9a1bbe16eab9853978fb5f6f69 GIT binary patch literal 4717 zcmd5=-;diw5WefvH4*~E1H3W#fJ+cgVmrB?0yVum;H1(P+JaDX5_|SKvCi?jyUvB< zfxn$^){gU|>8S{$a*~_a8PCqneDlq>Jvo1L`tjD*R^#O4gih5YPf{7t)h$g#@c@@` ze-zmt@_LNT0B=Y^5lbl{`YmJ<=0 zcGQt+E;?hGPF#MWd)Pf}`$4x`KDreuiY8Md+cLGjl8nyzMY@5b1S|W!cF^|hZ?mKr zlSmOzUL=#`Pf@_Yv>W!v=i|hbLBN}#=r$9RB&0}%rqD??GGF6YZ3+@mgx%Kbct>sj z=rtdaf{#oU6soKcFrF5%dx$5QJ9u__aY5l&Xb~0&@@u=i$RaX|LXpvxq*RHOMXJph zl0v76)KrXN=m+JxD8s+{;{g8cU!&1zUfmYb4OJw`8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?nUgKS48oh6QNiCr2OMW4zi8*8S z;&35Eh7O3$*`(`ii#yGs;~=F_Ncd2}gE;=sNyeX&TTS|LA;gss2=XDPjX!3&Kjd|k1 rSdVGstxnau%95SbbKUS?Wog;zQkHt%V4fvbhc^lS=V0xa-D>;|W(V^q literal 0 HcmV?d00001 diff --git a/elpa/helm-20140808.2300/helm.el b/elpa/helm-20140808.2300/helm.el new file mode 100644 index 000000000..1bd0430bd --- /dev/null +++ b/elpa/helm-20140808.2300/helm.el @@ -0,0 +1,4695 @@ +;;; helm.el --- Emacs incremental and narrowing framework -*- lexical-binding: t -*- + +;; Copyright (C) 2007 Tamas Patrovics +;; 2008 ~ 2011 rubikitch +;; 2011 ~ 2014 Thierry Volpiatto + +;; This is a fork of anything.el wrote by Tamas Patrovics. + +;; Authors of anything.el: Tamas Patrovics +;; rubikitch +;; Thierry Volpiatto + +;; Author: Thierry Volpiatto +;; URL: http://github.com/emacs-helm/helm + +;; 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 . + +;;; Code: + +(require 'cl-lib) + + +;;; Multi keys +;; +;; +;;;###autoload +(defun helm-define-multi-key (keymap key functions &optional delay) + "In KEYMAP, define key sequence KEY for function list FUNCTIONS. +Each function run sequentialy each time the key KEY is pressed. +If DELAY is specified switch back to initial function of FUNCTIONS list +after DELAY seconds. +The functions in FUNCTIONS list are functions with no args. +e.g + \(defun foo () + (message \"Run foo\")) + \(defun bar () + (message \"Run bar\")) + \(defun baz () + (message \"Run baz\")) + +\(helm-define-multi-key global-map \" q\" '(foo bar baz) 2) + +Each time \" q\" is pressed the next function is executed, if you wait +More than 2 seconds, next hit will run again the first function and so on." + (define-key keymap key (helm-make-multi-command functions delay))) + +;;;###autoload +(defmacro helm-multi-key-defun (name docstring funs &optional delay) + "Define NAME as a multi-key command running FUNS. +After DELAY seconds the FUNS list is reinitialised. +See `helm-define-multi-key'." + (declare (indent 2)) + (setq docstring (if docstring (concat docstring "\n\n") + "This is a helmish multi-key command.")) + `(defalias (quote ,name) (helm-make-multi-command ,funs ,delay) ,docstring)) + +(defun helm-make-multi-command (functions &optional delay) + "Return an anonymous multi-key command running FUNCTIONS. +Run each function of FUNCTIONS list in turn when called within DELAY seconds." + (declare (indent 1)) + (let ((funs functions) + (iter (cl-gensym "helm-iter-key")) + (timeout delay)) + (eval (list 'defvar iter nil)) + #'(lambda () (interactive) (helm-run-multi-key-command funs iter timeout)))) + +(defun helm-run-multi-key-command (functions iterator delay) + (let ((fn #'(lambda () + (cl-loop for count from 1 to (length functions) + collect count))) + next) + (unless (and (symbol-value iterator) + ;; Reset iterator when another key is pressed. + (eq this-command real-last-command)) + (set iterator (helm-iter-list (funcall fn)))) + (setq next (helm-iter-next (symbol-value iterator))) + (unless next + (set iterator (helm-iter-list (funcall fn))) + (setq next (helm-iter-next (symbol-value iterator)))) + (and next (symbol-value iterator) (call-interactively (nth (1- next) functions))) + (when delay (run-with-idle-timer delay nil `(lambda () + (setq ,iterator nil)))))) + +(defun helm-iter-list (seq) + "Return an iterator object from SEQ." + (let ((lis seq)) + (lambda () + (let ((elm (car lis))) + (setq lis (cdr lis)) + elm)))) + +(defun helm-iter-next (iterator) + "Return next elm of ITERATOR." + (funcall iterator)) + +(helm-multi-key-defun helm-toggle-resplit-and-swap-windows + "Multi key command to resplit and swap helm window. +First call run `helm-toggle-resplit-window', +second call within 0.5s run `helm-swap-windows'." + '(helm-toggle-resplit-window helm-swap-windows) 1) + +;;;###autoload +(defmacro helm-define-key-with-subkeys (map key subkey command + &optional other-subkeys menu exit-fn) + "Allow defining a KEY without having to type its prefix again on next calls. +Arg MAP is the keymap to use, SUBKEY is the initial long keybinding to +call COMMAND. +Arg OTHER-SUBKEYS is an unquoted alist specifying other short keybindings +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))\) + + +In this example, `C-x v n' will run `git-gutter:next-hunk' subsequent hit on \"n\" +will run this command again and subsequent hit on \"p\" will run `git-gutter:previous-hunk'. + +Arg MENU is a string to display in minibuffer to describe SUBKEY and OTHER-SUBKEYS. +Arg EXIT-FN specify a function to run on exit. + +Any other keys pressed run their assigned command defined in MAP and exit the loop." + + (let ((other-keys (and other-subkeys + (cl-loop for (x . y) in other-subkeys + collect (list x (list 'call-interactively y) t))))) + `(define-key ,map ,key + #'(lambda () + (interactive) + (unwind-protect + (progn + (call-interactively ,command) + (while (let ((input (read-key ,menu)) kb com) + (cl-case input + (,subkey (call-interactively ,command) t) + ,@other-keys + (t (setq kb (this-command-keys-vector)) + (setq com (lookup-key ,map kb)) + (if (commandp com) + (call-interactively com) + (setq unread-command-events + (nconc (mapcar 'identity + (this-single-command-raw-keys)) + unread-command-events))) + nil))))) + (and ,exit-fn (funcall ,exit-fn))))))) + + +;;; Keymap +;; +;; +(defvar helm-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map minibuffer-local-map) + (define-key map (kbd "") 'helm-next-line) + (define-key map (kbd "") 'helm-previous-line) + (define-key map (kbd "C-n") 'helm-next-line) + (define-key map (kbd "C-p") 'helm-previous-line) + (define-key map (kbd "") 'helm-follow-action-forward) + (define-key map (kbd "") 'helm-follow-action-backward) + (define-key map (kbd "") 'helm-previous-page) + (define-key map (kbd "") 'helm-next-page) + (define-key map (kbd "M-v") 'helm-previous-page) + (define-key map (kbd "C-v") 'helm-next-page) + (define-key map (kbd "M-<") 'helm-beginning-of-buffer) + (define-key map (kbd "M->") 'helm-end-of-buffer) + (define-key map (kbd "C-g") 'helm-keyboard-quit) + (define-key map (kbd "") 'helm-next-source) + (define-key map (kbd "") 'helm-previous-source) + (define-key map (kbd "") 'helm-maybe-exit-minibuffer) + (define-key map (kbd "C-i") 'helm-select-action) + (define-key map (kbd "C-z") 'helm-execute-persistent-action) + (define-key map (kbd "C-j") 'helm-execute-persistent-action) + (define-key map (kbd "C-o") 'helm-next-source) + (define-key map (kbd "C-l") 'helm-recenter-top-bottom-other-window) + (define-key map (kbd "M-C-l") 'helm-reposition-window-other-window) + (define-key map (kbd "C-M-v") 'helm-scroll-other-window) + (define-key map (kbd "M-") 'helm-scroll-other-window) + (define-key map (kbd "C-M-y") 'helm-scroll-other-window-down) + (define-key map (kbd "C-M-S-v") 'helm-scroll-other-window-down) + (define-key map (kbd "M-") 'helm-scroll-other-window-down) + (define-key map (kbd "") 'helm-scroll-other-window) + (define-key map (kbd "") 'helm-scroll-other-window-down) + (define-key map (kbd "C-@") 'helm-toggle-visible-mark) + (define-key map (kbd "C-SPC") 'helm-toggle-visible-mark) + (define-key map (kbd "M-SPC") 'helm-toggle-visible-mark) + (define-key map (kbd "M-[") nil) + (define-key map (kbd "M-(") 'helm-prev-visible-mark) + (define-key map (kbd "M-)") 'helm-next-visible-mark) + (define-key map (kbd "C-k") 'helm-delete-minibuffer-contents) + (define-key map (kbd "C-x C-f") 'helm-quit-and-find-file) + (define-key map (kbd "M-m") 'helm-toggle-all-marks) + (define-key map (kbd "M-a") 'helm-mark-all) + (define-key map (kbd "M-u") 'helm-unmark-all) + (define-key map (kbd "C-w") 'helm-yank-text-at-point) + (define-key map (kbd "C-M-a") 'helm-show-all-in-this-source-only) + (define-key map (kbd "C-M-e") 'helm-display-all-sources) + (define-key map (kbd "C-r") 'undefined) + (define-key map (kbd "C-s") 'undefined) + (define-key map (kbd "M-s") 'undefined) + (define-key map (kbd "C-}") 'helm-narrow-window) + (define-key map (kbd "C-{") 'helm-enlarge-window) + (define-key map (kbd "C-c -") 'helm-swap-windows) + (define-key map (kbd "C-c C-d") 'helm-delete-current-selection) + (define-key map (kbd "C-c C-y") 'helm-yank-selection) + (define-key map (kbd "C-c C-k") 'helm-kill-selection-and-quit) + (define-key map (kbd "C-c C-i") 'helm-copy-to-buffer) + (define-key map (kbd "C-c C-f") 'helm-follow-mode) + (define-key map (kbd "C-c C-u") 'helm-force-update) + (define-key map (kbd "M-p") 'previous-history-element) + (define-key map (kbd "M-n") 'next-history-element) + (define-key map (kbd "C-!") 'helm-toggle-suspend-update) + (define-key map (kbd "C-x b") 'helm-resume-previous-session-after-quit) + (define-key map (kbd "C-x C-b") 'helm-resume-list-buffers-after-quit) + ;; Disable usage of the mouse while in helm. + (define-key map (kbd "") 'ignore) + (define-key map (kbd "") 'ignore) + (define-key map (kbd "") 'ignore) + (define-key map (kbd "") 'ignore) + (define-key map (kbd "") 'ignore) + (define-key map (kbd "") 'ignore) + (define-key map (kbd "") 'ignore) + (define-key map (kbd "") 'ignore) + (define-key map (kbd "") 'ignore) + (define-key map (kbd "") 'ignore) + (define-key map (kbd "") 'ignore) + (define-key map (kbd "") 'ignore) + (define-key map (kbd "") 'ignore) + (define-key map (kbd "") 'ignore) + (define-key map (kbd "") 'ignore) + ;; Disable `file-cache-minibuffer-complete'. + (define-key map (kbd "") 'undefined) + ;; Multi keys + (define-key map (kbd "C-t") 'helm-toggle-resplit-and-swap-windows) + ;; Debugging command + (define-key map (kbd "C-h C-d") 'undefined) + (define-key map (kbd "C-h C-d") 'helm-debug-output) + ;; Use `describe-mode' key in `global-map'. + (define-key map [f1] nil) ; Allow to eval keymap without errors. + (define-key map (kbd "C-h C-h") 'undefined) + (define-key map (kbd "C-h h") 'undefined) + (cl-dolist (k (where-is-internal 'describe-mode global-map)) + (define-key map k 'helm-help)) + ;; Bind all actions from 1 to 12 to their corresponding nth index+1. + (cl-loop for n from 0 to 12 do + (define-key map (kbd (format "" (1+ n))) + `(lambda () + (interactive) + (helm-select-nth-action ,n)))) + map) + "Keymap for helm.") + + +(defgroup helm nil + "Open helm." + :prefix "helm-" :group 'convenience) + +(defcustom helm-completion-window-scroll-margin 5 + " `scroll-margin' to use for helm completion window. +Which see. Set to 0 to disable. +NOTE: This have no effect when `helm-display-source-at-screen-top' +id non--nil." + :group 'helm + :type 'integer) + +(defcustom helm-display-source-at-screen-top t + "Display candidates at the top of screen. +This happen when using `helm-next-source' and `helm-previous-source'. +NOTE: When non--nil (default) disable `helm-completion-window-scroll-margin'." + :group 'helm + :type 'boolean) + +(defcustom helm-candidate-number-limit 100 + "Limit candidate number globally. +Do not show more candidates than this limit from individual sources. +It is usually pointless to show hundreds of matches +when the pattern is empty, because it is much simpler to type a +few characters to narrow down the list of potential candidates. + +Set it to nil if you don't want this limit." + :group 'helm + :type '(choice (const :tag "Disabled" nil) integer)) + +(defcustom helm-idle-delay 0.01 + "Be idle for this many seconds, before updating in delayed sources. +This is useful for sources involving heavy operations +\(like launching external programs\), so that candidates +from the source are not retrieved unnecessarily if the user keeps typing. + +It also can be used to declutter the results helm displays, +so that results from certain sources are not shown with every +character typed, only if the user hesitates a bit. +Be sure to know what you are doing when modifying this." + :group 'helm + :type 'float) + +(defcustom helm-input-idle-delay 0.01 + "Be idle for this many seconds, before updating. + +Unlike `helm-idle-delay', it is also effective for non-delayed sources. +If nil, candidates are collected immediately. + +Note: If this value is too low compared to `helm-idle-delay', +you may have duplicated sources when using multiples sources. +Safe value is always >= `helm-idle-delay'. +Default settings are equal value for both. +Be sure to know what you are doing when modifying this." + :group 'helm + :type 'float) + +(defcustom helm-exit-idle-delay 0 + "Be idle for this many seconds before exiting minibuffer while helm is updating. +Note that this does nothing when helm-buffer is up to date +\(i.e exit without delay in this condition\)." + :group 'helm + :type 'float) + +(defcustom helm-full-frame nil + "Use current window to show the candidates. +If t then Helm doesn't pop up a new window." + :group 'helm + :type 'boolean) + +(defvaralias 'helm-samewindow 'helm-full-frame) +(make-obsolete-variable 'helm-samewindow 'helm-full-frame "1.4.8.1") + +(defcustom helm-quick-update nil + "If non-nil, suppress displaying sources which are out of screen at first. +They are treated as delayed sources at this input. +This flag makes `helm' a bit faster with many sources." + :group 'helm + :type 'boolean) + +(defcustom helm-candidate-separator + "--------------------" + "Candidates separator of `multiline' source." + :group 'helm + :type 'string) + +(defcustom helm-save-configuration-functions + '(set-window-configuration . current-window-configuration) + "The functions used to restore/save window or frame configurations. +It is a pair where the car is the function to restore window or frame config, +and the cdr is the function to save the window or frame config. + +If you want to save and restore frame configuration, set this variable to + '\(set-frame-configuration . current-frame-configuration\) +NOTE: This may not work properly with own-frame minibuffer settings. +Older version saves/restores frame configuration, but the default is changed now +because flickering can occur in some environment." + :group 'helm + :type 'sexp) + +(defcustom helm-persistent-action-use-special-display nil + "If non-nil, use `special-display-function' in persistent action." + :group 'helm + :type 'boolean) + +(defcustom helm-scroll-amount nil + "Scroll amount when scrolling other window in a helm session. +It is used by `helm-scroll-other-window' +and `helm-scroll-other-window-down'. + +If you prefer scrolling line by line, set this value to 1." + :group 'helm + :type 'integer) + +(defcustom helm-display-function 'helm-default-display-buffer + "Function to display *helm* buffer. +It is `helm-default-display-buffer' by default, +which affects `helm-full-frame'." + :group 'helm + :type 'symbol) + +(defcustom helm-case-fold-search 'smart + "Add 'smart' option to `case-fold-search'. +When smart is enabled, ignore case in the search strings +if pattern contains no uppercase characters. +Otherwise, with a nil or t value, the behavior is same as +`case-fold-search'. +Default value is smart, other possible values are nil and t. +NOTE: This have no effect in asynchronous sources, you will +have to implement a similar feature directly in the process. +See in helm-grep.el how it is implemented." + :group 'helm + :type '(choice (const :tag "Ignore case" t) + (const :tag "Respect case" nil) + (other :tag "Smart" 'smart))) + +(defcustom helm-file-name-case-fold-search + (if (memq system-type + '(cygwin windows-nt ms-dos darwin)) + t + helm-case-fold-search) + "Local setting of `helm-case-fold-search' for reading filenames. + +See `helm-case-fold-search' for more info." + :group 'helm + :type 'symbol) + +(defcustom helm-reuse-last-window-split-state nil + "Reuse the last state of window split, vertical or horizontal. +That is when you use `helm-toggle-resplit-window' the next helm session +will reuse the same window scheme than the one of last session unless +`helm-split-window-default-side' is 'same or 'other." + :group 'helm + :type 'boolean) + +(defcustom helm-split-window-preferred-function 'helm-split-window-default-fn + "Default function used for splitting window." + :group 'helm + :type 'function) + +(defcustom helm-split-window-default-side 'below + "The default side to display `helm-buffer'. +Must be one acceptable arg for `split-window' SIDE, +that is 'below, 'above, 'left or 'right. + +Other acceptable values are 'same which always display `helm-buffer' +in current window and 'other that display `helm-buffer' below if only one +window or in `other-window-for-scrolling' if available. + +A nil value as same effect as 'below. +If `helm-full-frame' is non--nil, it take precedence on this. + +See also `helm-split-window-in-side-p' and `helm-always-two-windows' that +take precedence on this. + +NOTE: this have no effect if `helm-split-window-preferred-function' is not +`helm-split-window-default-fn' unless this new function handle this." + :group 'helm + :type 'symbol) + +(defcustom helm-split-window-in-side-p nil + "Force splitting inside selected window when non--nil. +See also `helm-split-window-default-side'. + +NOTE: this have no effect if `helm-split-window-preferred-function' is not +`helm-split-window-default-fn' unless this new function handle this." + :group 'helm + :type 'boolean) + +(defcustom helm-always-two-windows nil + "When non--nil helm will use two windows in this frame. +That is one window to display `helm-buffer' and one to display +`helm-current-buffer'. +Note: this have no effect when `helm-split-window-in-side-p' is non--nil, +or when `helm-split-window-default-side' is set to 'same." + :group 'helm + :type 'boolean) + +(defcustom helm-sources-using-default-as-input '(helm-source-imenu + helm-source-semantic + helm-source-info-elisp + helm-source-etags-select) + "List of helm sources that need to use `helm-maybe-use-default-as-input'. +When a source is member of this list, default `thing-at-point' +will be used as input." + :group 'helm + :type '(repeat (choice symbol))) + +(defcustom helm-delete-minibuffer-contents-from-point nil + "When non--nil, `helm-delete-minibuffer-contents' delete region from `point'. +Otherwise (default) delete `minibuffer-contents'." + :group 'helm + :type 'boolean) + +(defcustom helm-follow-mode-persistent nil + "Retrieve last state of `helm-follow-mode' in next helm session when non--nil. +This will not make it persistent through emacs sessions though, +you will have to set explicitely the `follow' attribute in the source where +you want this mode enabled definitely." + :group 'helm + :type 'boolean) + +(defcustom helm-prevent-escaping-from-minibuffer t + "Prevent escaping from minibuffer during helm session." + :group 'helm + :type 'boolean) + +(defcustom helm-truncate-lines nil + "Truncate long lines when non--nil. +See `truncate-lines'." + :group 'helm + :type 'boolean) + +(defcustom helm-move-to-line-cycle-in-source nil + "Move to end or beginning of source when reaching top or bottom of source. +This happen when using `helm-next/previous-line'." + :group 'helm + :type 'boolean) + + +;;; Faces +;; +;; +(defface helm-source-header + '((((background dark)) + :background "#22083397778B" + :foreground "white" + :weight bold :height 1.3 :family "Sans Serif") + (((background light)) + :background "#abd7f0" + :foreground "black" + :weight bold :height 1.3 :family "Sans Serif")) + "Face for source header in the helm buffer." + :group 'helm) + +(defface helm-visible-mark + '((((min-colors 88) (background dark)) + (:background "green1" :foreground "black")) + (((background dark)) + (:background "green" :foreground "black")) + (((background light)) :background "#d1f5ea") + (((min-colors 88)) + (:background "green1")) + (t (:background "green"))) + "Face for visible mark." + :group 'helm) + +(defface helm-header + '((t (:inherit header-line))) + "Face for header lines in the helm buffer." + :group 'helm) + +(defface helm-candidate-number + '((((background dark)) :background "Yellow" :foreground "black") + (((background light)) :background "#faffb5" :foreground "black")) + "Face for candidate number in mode-line." :group 'helm) + +(defface helm-selection + '((((background dark)) :background "ForestGreen" :underline t) + (((background light)) :background "#b5ffd1" :underline t)) + "Face for currently selected item in the helm buffer." + :group 'helm) + +(defface helm-separator + '((((background dark)) :foreground "red") + (((background light)) :foreground "#ffbfb5")) + "Face for multiline source separator." + :group 'helm) + +(defface helm-action + '((t (:underline t))) + "Face for action lines in the helm action buffer." + :group 'helm) + +(defface helm-prefarg + '((((background dark)) :foreground "green") + (((background light)) :foreground "red")) + "Face for showing prefix arg in mode-line." + :group 'helm) + + +;;; Variables. +;; +;; +(defvar helm-type-attributes nil + "It's a list of \(TYPE ATTRIBUTES ...\). +ATTRIBUTES are the same as attributes for `helm-sources'. +TYPE connects the value to the appropriate sources. +Don't set this directly, use instead `define-helm-type-attribute'. + +This allows specifying common attributes for several sources. +For example, sources which provide files can specify +common attributes with a `file' type.") + +(defvar helm-source-filter nil + "A list of source names to be displayed. +Other sources won't appear in the search results. +If nil then there is no filtering. +See also `helm-set-source-filter'.") + +(defvar helm-action-buffer "*helm action*" + "Buffer showing actions.") + +(defvar helm-selection-overlay nil + "Overlay used to highlight the currently selected item.") + +(defvar helm-async-processes nil + "List of information about asynchronous processes managed by helm.") + +(defvar helm-before-initialize-hook nil + "Run before helm initialization. +This hook is run before init functions in `helm-sources'.") + +(defvar helm-after-initialize-hook nil + "Run after helm initialization. +Global variables are initialized and the helm buffer is created. +But the helm buffer has no contents.") + +(defvar helm-update-hook nil + "Run after the helm buffer was updated according the new input pattern. +This hook is run at the beginning of buffer. +The first candidate is selected after running this hook. +See also `helm-after-update-hook'.") + +(defvar helm-after-update-hook nil + "Run after the helm buffer was updated according the new input pattern. +This is very similar to `helm-update-hook' but selection is not moved. +It is useful to select a particular object instead of the first one.") + +(defvar helm-cleanup-hook nil + "Run after helm minibuffer is closed. +IOW this hook is executed BEFORE performing action.") + +(defvar helm-select-action-hook nil + "Run when opening the action buffer.") + +(defvar helm-before-action-hook nil + "Run before executing action. +Contrarily to `helm-cleanup-hook', +this hook run before helm minibuffer is closed +and before performing action.") + +(defvar helm-after-action-hook nil + "Run after executing action.") + +(defvar helm-exit-minibuffer-hook nil + "Run just before exiting minibuffer.") + +(defvar helm-after-persistent-action-hook nil + "Run after executing persistent action.") + +(defvar helm-move-selection-before-hook nil + "Run before moving selection in `helm-buffer'.") + +(defvar helm-move-selection-after-hook nil + "Run after moving selection in `helm-buffer'.") + +(defvar helm-restored-variables + '(helm-candidate-number-limit + helm-source-filter + helm-source-in-each-line-flag + helm-map + helm-sources) + "Variables which are restored after `helm' invocation.") + +(defvar helm-execute-action-at-once-if-one nil + "Execute default action and exit when only one candidate is remaining.") + +(defvar helm-quit-if-no-candidate nil + "Quit when there is no candidates when non--nil. +This variable accepts a function, which is executed if no candidate.") + +(defvar helm-maybe-use-default-as-input nil + "Use :default arg of `helm' as input to update display. +Note that if also :input is specified as `helm' arg, it will take +precedence on :default.") + +(defvar helm-source-in-each-line-flag nil + "Non-nil means add helm-source text-property in each candidate. +experimental feature.") + +(defvar helm-debug-variables nil + "A list of helm variables to show in `helm-debug-output'. +Otherwise all variables started with `helm-' are shown.") + +(defvar helm-debug-buffer "*Debug Helm Log*") + +(defvar helm-debug nil + "If non-nil, write log message into `helm-debug-buffer' buffer. +It is disabled by default because `helm-debug-buffer' grows quickly.") + +(defvar helm-compile-source-functions + '(helm-compile-source--type + helm-compile-source--dummy + helm-compile-source--candidates-in-buffer) + "Functions to compile elements of `helm-sources' (plug-in).") + +(defvar helm-mode-line-string "\ +\\\ +\\[helm-help]:Help \ +\\[helm-select-action]:Act \ +\\[helm-maybe-exit-minibuffer]/\ +f1/f2/f-n:NthAct" + "Help string displayed in mode-line in `helm'. +It can be a string or a list of two args, in this case, +first arg is a string that will be used as name for candidates number, +second arg any string to display in mode line. +If nil, use default `mode-line-format'.") + + +;;; Internal Variables +;; +;; +(defvar helm-current-prefix-arg nil + "Record `current-prefix-arg' when exiting minibuffer.") +(defvar helm-saved-action nil + "Saved value of the currently selected action by key.") +(defvar helm-saved-current-source nil + "Value of the current source when the action list is shown.") +(defvar helm-compiled-sources nil + "Compiled version of `helm-sources'.") +(defvar helm-in-persistent-action nil + "Flag whether in persistent-action or not.") +(defvar helm-last-buffer nil + "`helm-buffer' of previously `helm' session.") +(defvar helm-saved-selection nil + "Value of the currently selected object when the action list is shown.") +(defvar helm-sources nil + "[INTERNAL] Value of current sources in used, a list.") +(defvar helm-delayed-init-executed nil) +(defvar helm-buffer "*helm*" + "Buffer showing completions.") +(defvar helm-current-buffer nil + "Current buffer when `helm' is invoked.") +(defvar helm-buffer-file-name nil + "Variable `buffer-file-name' when `helm' is invoked.") +(defvar helm-default-directory nil + "The value of `default-directory' when `helm' is initialized.") +(defvar helm-candidate-cache (make-hash-table :test 'equal) + "Holds the available candidate within a single helm invocation.") +(defvar helm-pattern "" + "The input pattern used to update the helm buffer.") +(defvar helm-input "" + "The input typed in the candidates panel.") +(defvar helm-input-local nil + "Internal, store locally `helm-pattern' value for later use in `helm-resume'.") +(defvar helm-source-name nil) +(defvar helm-current-source nil) +(defvar helm-candidate-buffer-alist nil) +(defvar helm-match-hash (make-hash-table :test 'equal)) +(defvar helm-cib-hash (make-hash-table :test 'equal)) +(defvar helm-tick-hash (make-hash-table :test 'equal)) +(defvar helm-issued-errors nil) +(defvar helm-debug-root-directory nil + "When non--nil, save helm log to `helm-last-log-file'. +Be aware that if you set that, you will end up with a huge directory +of log files, so use that only for debugging purpose. +See `helm-log-save-maybe' for more info.") +(defvar helm-last-log-file nil + "The name of the last helm session log file.") +(defvar helm-follow-mode nil) +(defvar helm--local-variables nil) +(defvar helm-split-window-state nil) +(defvar helm--window-side-state nil) +(defvar helm-selection-point nil) +(defvar helm-alive-p nil) +(defvar helm-visible-mark-overlays nil) +(defvar helm-update-blacklist-regexps '("^" "^ *" "$" "!" " " "\\b" + "\\<" "\\>" "\\_<" "\\_>" ".*")) +(defvar helm-suspend-update-flag nil) +(defvar helm-force-updating-p nil) +(defvar helm-exit-status 0 + "Flag to inform whether helm have exited or quitted. +Exit with 0 mean helm have exited executing an action. +Exit with 1 mean helm have quitted with \\[keyboard-quit] +It is useful for example to restore a window config if helm abort +in special cases. +See `helm-exit-minibuffer' and `helm-keyboard-quit'.") +(defvar helm-minibuffer-confirm-state nil) +(defvar helm-quit nil) +(defvar helm-attributes nil "List of all `helm' attributes.") +(defvar helm-buffers nil + "All of `helm-buffer' in most recently used order.") +(defvar helm-current-position nil + "Cons of \(point . window-start\) when `helm' is invoked. +It is needed to restore position in `helm-current-buffer' +when `helm' is keyboard-quitted.") +(defvar helm-last-frame-or-window-configuration nil + "Used to store window or frame configuration when helm start.") +(defvar helm-onewindow-p nil) +(defvar helm-types nil) +(defvar helm--mode-line-string-real nil) ; The string to display in mode-line. +(defvar helm-persistent-action-display-window nil) +(defvar helm-marked-candidates nil + "Marked candadates. List of \(source . real\) pair.") +(defvar helm-in-file-completion-p nil) +(defvar helm--mode-line-display-prefarg nil) +(defvar helm--temp-follow-flag nil + "[INTERNAL] A simple flag to notify persistent action we are following.") +(defvar helm--reading-passwd-or-string nil) +(defvar helm--in-update nil) + + +;; Utility: logging +(defun helm-log (format-string &rest args) + "Log message `helm-debug' is non-nil. +Messages are written to the `helm-debug-buffer' buffer. + +Argument FORMAT-STRING is a string to use with `format'. +Use optional arguments ARGS like in `format'." + (when helm-debug + (with-current-buffer (get-buffer-create helm-debug-buffer) + (outline-mode) + (buffer-disable-undo) + (set (make-local-variable 'inhibit-read-only) t) + (goto-char (point-max)) + (insert (let ((tm (current-time))) + (format (concat (if (string-match "Start session" format-string) + "* " "** ") + "%s.%06d (%s)\n %s\n") + (format-time-string "%H:%M:%S" tm) + (nth 2 tm) + (helm-log-get-current-function) + (apply #'format (cons format-string args)))))))) + +(defun helm-log-run-hook (hook) + "Run HOOK like `run-hooks' but write these actions to helm log buffer." + (helm-log "Executing %s with value = %S" hook (symbol-value hook)) + (helm-log "Executing %s with global value = %S" hook (default-value hook)) + (run-hooks hook) + (helm-log "executed %s" hook)) + +(defun helm-log-get-current-function () + "Get function name calling `helm-log'. +The original idea is from `tramp-debug-message'." + (cl-loop with exclude-func-re = "^helm-\\(?:interpret\\|log\\|.*funcall\\)" + for btn from 1 to 40 + for btf = (cl-second (backtrace-frame btn)) + for fn = (if (symbolp btf) (symbol-name btf) "") + if (and (string-match "^helm" fn) + (not (string-match exclude-func-re fn))) + return fn)) + +(defun helm-log-error (&rest args) + "Accumulate error messages into `helm-issued-errors'. +ARGS are args given to `format'. +e.g (helm-log-error \"Error %s: %s\" (car err) (cdr err))." + (apply 'helm-log (concat "ERROR: " (car args)) (cdr args)) + (let ((msg (apply 'format args))) + (unless (member msg helm-issued-errors) + (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 and a valid directory, +a directory named 'helm-debug-' +will be created there and the log recorded in a file named +at the date and time of today in this directory." + (when (and (stringp helm-debug-root-directory) + (file-directory-p helm-debug-root-directory) + helm-debug) + (let ((logdir (expand-file-name (concat "helm-debug-" + (format-time-string "%Y%m%d")) + helm-debug-root-directory))) + (make-directory logdir t) + (with-current-buffer (get-buffer-create helm-debug-buffer) + (write-region (point-min) (point-max) + (setq helm-last-log-file + (expand-file-name + (format-time-string "%Y%m%d-%H%M%S") + logdir)) + nil 'silent) + (kill-buffer))))) + +;;;###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' ." + (interactive) + (if helm-last-log-file + (view-file helm-last-log-file) + (switch-to-buffer helm-debug-buffer) + (view-mode 1) (visual-line-mode 1))) + +(defun helm-print-error-messages () + "Print error messages in `helm-issued-errors'." + (and helm-issued-errors + (message "Helm issued errors: %s" + (mapconcat 'identity (reverse helm-issued-errors) "\n")))) + +;; [FIXME] It seem it is no more needed to have cursor at end of +;; insertion, so I keep the advices fo now but don't activate +;; them, need to clarify why I needed that IIRC it was +;; a problem with keybinding not activated. + +;; These advices are needed to fix cursor position in minibuffer +;; after insertion, otherwise cursor stay at beginning of insertion. +;; Using a timer ensure `minibuffer-temporary-goal-position' is set +;; to nil in `goto-history-element' because `last-command' +;; will be one of `next-history-element' or `previous-history-element'. +;; Activate deactivate them by hook because they may not work outside +;; of helm (Issue #338). +(defadvice next-history-element (around helm-delay-next-history-element) + (interactive "p") + (or (zerop n) + (run-with-timer + 0.01 nil + `(lambda () + (condition-case _err + (goto-history-element (- minibuffer-history-position ,n)) + (user-error (message "End of history; no default available") + (sit-for 0.5) (message nil))))))) + +(defadvice previous-history-element (around helm-delay-previous-history-element) + (interactive "p") + (or (zerop n) + (run-with-timer + 0.01 nil + `(lambda () + (condition-case _err + (goto-history-element (+ minibuffer-history-position ,n)) + (user-error (message "Beginning of history; no preceding item") + (sit-for 0.5) (message nil))))))) + +;; (add-hook 'helm-before-initialize-hook +;; (lambda () +;; (ad-enable-advice 'next-history-element 'around +;; 'helm-delay-next-history-element) +;; (ad-enable-advice 'previous-history-element 'around +;; 'helm-delay-previous-history-element))) +;; (add-hook 'helm-cleanup-hook +;; (lambda () +;; (ad-disable-advice 'next-history-element 'around +;; 'helm-delay-next-history-element) +;; (ad-disable-advice 'previous-history-element 'around +;; 'helm-delay-previous-history-element))) + + +;; Programming Tools +(defmacro helm-aif (test-form then-form &rest else-forms) + "Like `if' but set the result of TEST-FORM in a temprary variable called `it'. +THEN-FORM and ELSE-FORMS are then excuted just like in `if'." + (declare (indent 2) (debug t)) + `(let ((it ,test-form)) + (if it ,then-form ,@else-forms))) + +(defun helm-mklist (obj) + "If OBJ is a list \(but not lambda\), return itself. +Otherwise make a list with one element." + (if (and (listp obj) (not (functionp obj))) + obj + (list obj))) + +(defun helm-this-command () + "Return the actual command in action. +Like `this-command' but return the real command, +not `exit-minibuffer' or unwanted functions." + (cl-loop with bl = '(helm-maybe-exit-minibuffer + helm-confirm-and-exit-minibuffer + helm-exit-minibuffer + exit-minibuffer) + for count from 1 to 50 + for btf = (backtrace-frame count) + for fn = (cl-second btf) + if (and (commandp fn) (not (memq fn bl))) return fn + else + if (and (eq fn 'call-interactively) + (> (length btf) 2)) + return (cadr (cdr btf)))) + + +;; Helm API + +(defun helm-buffer-get () + "Return `helm-action-buffer' if shown otherwise `helm-buffer'." + (if (helm-action-window) + helm-action-buffer + helm-buffer)) + +(defun helm-window () + "Window of `helm-buffer'." + (get-buffer-window (helm-buffer-get) 'visible)) + +(defun helm-action-window () + "Window of `helm-action-buffer'." + (get-buffer-window helm-action-buffer 'visible)) + +(defmacro with-helm-window (&rest body) + "Be sure BODY is excuted in the helm window." + (declare (indent 0) (debug t)) + `(with-selected-window (helm-window) + ,@body)) + +(defmacro with-helm-current-buffer (&rest body) + "Eval BODY inside `helm-current-buffer'." + (declare (indent 0) (debug t)) + `(with-current-buffer (or (and (buffer-live-p helm-current-buffer) + helm-current-buffer) + (setq helm-current-buffer + (current-buffer))) + ,@body)) + +(defmacro with-helm-buffer (&rest body) + "Eval BODY inside `helm-buffer'." + (declare (indent 0) (debug t)) + `(with-current-buffer (helm-buffer-get) + ,@body)) + +(defmacro with-helm-restore-variables(&rest body) + "Restore `helm-restored-variables' after executing BODY." + (declare (indent 0) (debug t)) + `(let ((orig-vars (mapcar (lambda (v) + (cons v (symbol-value v))) + helm-restored-variables))) + (unwind-protect (progn ,@body) + (cl-loop for (var . value) in orig-vars + do (set var value)) + (helm-log "restore variables")))) + +(defmacro with-helm-default-directory (directory &rest body) + (declare (indent 2) (debug t)) + `(let ((default-directory (or (and ,directory + (file-name-as-directory ,directory)) + default-directory))) + ,@body)) + +(defun helm-default-directory () + "Return the value of `helm-default-directory'." + (buffer-local-value 'helm-default-directory (get-buffer helm-buffer))) + +(defmacro with-helm-temp-hook (hook &rest body) + "Execute temporarily BODY as a function for HOOK." + (declare (indent 1) (debug t)) + (let ((fun (cl-gensym "helm-hook"))) + `(progn + (defun ,fun () + (unwind-protect + (progn ,@body) + (remove-hook ,hook (quote ,fun)))) + (add-hook ,hook (quote ,fun))))) + +(defmacro with-helm-after-update-hook (&rest body) + "Execute BODY at end of `helm-update'." + (declare (indent 0) (debug t)) + `(with-helm-temp-hook 'helm-after-update-hook ,@body)) + +(defmacro with-helm-alive-p (&rest body) + "Return error when BODY run outside helm context." + (declare (indent 0) (debug t)) + `(progn + (if helm-alive-p + (progn ,@body) + (error "Running helm command outside of context")))) + +(cl-defun helm-attr (attribute-name + &optional (src (helm-get-current-source)) compute) + "Get the value of ATTRIBUTE-NAME of SRC. +If SRC is omitted, use current source. +If COMPUTE is non--nil compute value of ATTRIBUTE-NAME +with `helm-interpret-value'." + (helm-aif (or (assq attribute-name src) + (helm-get-attribute-from-source-type attribute-name src)) + (if compute (helm-interpret-value (cdr it)) (cdr it)))) + +(cl-defun helm-attr-defined (attribute-name + &optional (src (helm-get-current-source))) + "Return non-nil if ATTRIBUTE-NAME of SRC is defined. +if SRC is omitted, use current source." + (and (helm-attr attribute-name src) t)) + +(cl-defun helm-attrset (attribute-name value + &optional + (src (helm-get-current-source)) + alter-type) + "Set the value of ATTRIBUTE-NAME of source SRC to VALUE. +If ATTRIBUTE-NAME doesn't exists in source it is created with value VALUE. +If ALTER-TYPE is non--nil alter the value of ATTRIBUTE-NAME in `helm-attributes' +if it exists. +If SRC is omitted, use current source. +If operation succeed, return value, otherwise nil." + (let ((from-type (helm-get-attribute-from-source-type attribute-name src)) + done) + (helm-aif (or (assq attribute-name src) + (and alter-type from-type)) + (prog1 (setcdr it value) (setq done t)) + (unless from-type + (setcdr src (cons (cons attribute-name value) (cdr src))) + (setq done t))) + (and done value))) + +(defun helm-get-attribute-from-source-type (attribute source) + "Get ATTRIBUTE from type attribute of SOURCE." + (when (assq 'type source) + (assq attribute + (assq (cdr (assq 'type source)) + helm-type-attributes)))) + +(defun helm-get-attribute-from-type (attribute type) + "Get ATTRIBUTE from TYPE. +arg TYPE is an existing type defined in `helm-type-attributes'." + (assq attribute (assq type helm-type-attributes))) + +(defun helm-get-actions-from-type (source) + "Get actions list from type attribute of SOURCE." + (when (assq 'type source) + (helm-get-attribute-from-source-type 'action source))) + +(defun helm-inherit-attribute-from-source (attribute source) + "Get the ATTRIBUTE of SOURCE." + (helm-aif (assq attribute source) + it + (helm-get-attribute-from-source-type attribute source))) + +(defun helm-append-at-nth (seq elm index) + "Append ELM at INDEX in SEQ." + (let ((len (length seq))) + (when (> index len) (setq index len)) + (cl-loop for i in seq + for count from 1 collect i + when (= count index) + if (listp elm) append elm + else collect elm))) + +(defun helm-add-action-to-source (name fn source &optional index) + "Add new action NAME linked to function FN to SOURCE. +Function FN should be a valid function that take one arg i.e candidate, +argument NAME is a string that will appear in action menu +and SOURCE should be an existing helm source already loaded. +If INDEX is specified, action is added in action list at INDEX, +otherwise it is added at end. +This allow user to add a specific action to an existing source +without modifying source code." + (let ((actions (helm-attr 'action source)) + (new-action (list (cons name fn)))) + (when (symbolp actions) + (setq actions (list (cons "Default action" actions)))) + (helm-attrset 'action + (if index + (helm-append-at-nth actions new-action index) + (append actions new-action)) + source))) + +(defun helm-delete-action-from-source (action-or-name source) + "Delete ACTION-OR-NAME from SOURCE. +ACTION-OR-NAME can either be the name of action or the symbol function +associated to name." + (let* ((actions (helm-attr 'action source)) + (del-action (if (symbolp action-or-name) + (rassoc action-or-name actions) + (assoc action-or-name actions)))) + (helm-attrset 'action (delete del-action actions) source))) + +(cl-defun helm-add-action-to-source-if (name fn source predicate + &optional (index 4) test-only) + "Add new action NAME linked to function FN to SOURCE. +Action is added only if current candidate match PREDICATE. +This function add an entry in the `action-transformer' attribute +of SOURCE (or create one if not found). +Function PREDICATE should take one arg candidate. +Function FN should be a valid function that take one arg i.e candidate, +argument NAME is a string that will appear in action menu +and SOURCE should be an existing helm source already loaded. +If INDEX is specified, action is added in action list at INDEX. +Value of INDEX should be always >=1, default to 4. +This allow user to add a specific `action-tranformer' +to an existing source without modifying source code. +E.g +Add the action \"Byte compile file async\" linked to +function 'async-byte-compile-file to source `helm-source-find-files' +only when predicate helm-ff-candidates-lisp-p return non--nil: + +\(helm-add-action-to-source-if \"Byte compile file async\" + 'async-byte-compile-file + helm-source-find-files + 'helm-ff-candidates-lisp-p\)." + (let* ((actions (helm-attr 'action source)) + (action-transformers (helm-attr 'action-transformer source)) + (new-action (list (cons name fn))) + (transformer `(lambda (actions candidate) + (cond ((funcall (quote ,predicate) candidate) + (helm-append-at-nth + actions (quote ,new-action) ,index)) + (t actions))))) + (when (symbolp actions) + (helm-attrset 'action (list (cons "Default action" actions)) source)) + (when (symbolp action-transformers) + (setq action-transformers (list action-transformers))) + (if test-only ; debug + (delq nil (append (list transformer) action-transformers)) + (helm-attrset 'action-transformer + (delq nil (append (list transformer) action-transformers)) + source)))) + +(defun helm-set-source-filter (sources) + "Set the value of `helm-source-filter' to SOURCES and update. + +This function sets a filter for helm sources and it may be +called while helm is running. It can be used to toggle +displaying of sources dynamically. For example, additional keys +can be bound into `helm-map' to display only the file-related +results if there are too many matches from other sources and +you're after files only: + +Shift+F shows only file results from some sources: + +\(define-key helm-map \"F\" 'helm-my-show-files-only) + +\(defun helm-my-show-files-only () + (interactive) + (helm-set-source-filter '(\"File Name History\" + \"Files from Current Directory\"))) + +Shift+A shows all results: + +\(define-key helm-map \"A\" 'helm-my-show-all) + +\(defun helm-my-show-all () + (interactive) + (helm-set-source-filter nil)) + +The -my- part is added to avoid collisions with +existing Helm function names." + (unless (and (listp sources) + (cl-loop for name in sources always (stringp name))) + (error "Invalid data in `helm-set-source-filter': %S" sources)) + (let ((cur-disp-sel (with-current-buffer helm-buffer + (helm-get-selection nil t)))) + (setq helm-source-filter sources) + (helm-log "helm-source-filter = %S" helm-source-filter) + ;; Use force-update to run init/update functions. + (helm-force-update (regexp-quote cur-disp-sel)))) + +(defun helm-set-sources (sources &optional no-init no-update) + "Set SOURCES during `helm' invocation. +If NO-INIT is non-nil, skip executing init functions of SOURCES. +If NO-UPDATE is non-nil, skip executing `helm-update'." + (with-current-buffer helm-buffer + (setq helm-compiled-sources nil + helm-sources sources) + (helm-log "helm-compiled-sources = %S" helm-compiled-sources) + (helm-log "helm-sources = %S" helm-sources)) + (unless no-init (helm-funcall-foreach 'init)) + (unless no-update (helm-update))) + +(defun helm-get-sources () + "Return compiled `helm-sources', which is memoized. + +Attributes: + +- type + `helm-type-attributes' are merged in. +- candidates-buffer + candidates, volatile and match attribute are created." + (cond + ;; action + ((helm-action-window) + helm-sources) + ;; memoized + (helm-compiled-sources) + ;; first time + (t + (prog1 + (setq helm-compiled-sources + (helm-compile-sources + helm-sources helm-compile-source-functions)) + (helm-log "helm-compiled-sources = %S" helm-compiled-sources))))) + +(cl-defun helm-get-selection (&optional (buffer nil buffer-s) + force-display-part) + "Return the currently selected item or nil. +if BUFFER is nil or unspecified, use helm-buffer as default value. +If FORCE-DISPLAY-PART is non-nil, return the display string. +If FORCE-DISPLAY-PART value is 'withprop the display string is returned +with its properties." + (setq buffer (if (and buffer buffer-s) buffer helm-buffer)) + (unless (helm-empty-buffer-p buffer) + (with-current-buffer buffer + (let* ((disp-fn (if (eq force-display-part 'withprop) + 'buffer-substring + 'buffer-substring-no-properties)) + (selection + (or (and (not force-display-part) + (get-text-property (overlay-start + helm-selection-overlay) + 'helm-realvalue)) + ;; It is needed to return properties of DISP in some case, + ;; e.g for `helm-confirm-and-exit-minibuffer', + ;; so use `buffer-substring' here when 'withprop is specified. + (let ((disp (funcall + disp-fn + (overlay-start helm-selection-overlay) + (1- (overlay-end helm-selection-overlay)))) + (source (helm-get-current-source))) + (helm-aif (and (not force-display-part) + (assoc-default 'display-to-real source)) + (helm-funcall-with-source source it disp) + disp))))) + (unless (equal selection "") + (helm-log "selection = %S" selection) + selection))))) + +(defun helm-get-actions-from-current-source () + "Return the associated action for the selected candidate. +It is a function symbol \(sole action\) or list +of \(action-display . function\)." + (unless (helm-empty-buffer-p (helm-buffer-get)) + (helm-aif (helm-attr 'action-transformer) + (helm-composed-funcall-with-source + (helm-get-current-source) it + (helm-attr 'action) (helm-get-selection)) + (helm-attr 'action)))) + +(defun helm-get-current-source () + "Return the source for the current selection. +Allow also checking if helm-buffer contain candidates." + (or helm-current-source + (with-current-buffer (helm-buffer-get) + (or + ;; This happen only when `helm-source-in-each-line-flag' + ;; is non--nil and there is candidates in buffer. + (get-text-property (point) 'helm-source) + ;; Return nil when no--candidates. + (cl-block exit + ;; This goto-char shouldn't be necessary, but point is moved to + ;; point-min somewhere else which shouldn't happen. + (goto-char (overlay-start helm-selection-overlay)) + (let* ((header-pos (or (helm-get-previous-header-pos) + (helm-get-next-header-pos))) + (source-name + (save-excursion + (unless header-pos + (cl-return-from exit nil)) + (goto-char header-pos) + (helm-current-line-contents)))) + (cl-loop for source in (helm-get-sources) thereis + (and (equal (assoc-default 'name source) source-name) + source)))))))) + +(defun helm-buffer-is-modified (buffer) + "Return non-nil when BUFFER is modified since `helm' was invoked." + (let* ((b (get-buffer buffer)) + (key (concat (buffer-name b) "/" (helm-attr 'name))) + (source-tick (or (gethash key helm-tick-hash) 0)) + (buffer-tick (buffer-chars-modified-tick b)) + (modifiedp (/= source-tick buffer-tick))) + (puthash key buffer-tick helm-tick-hash) + (helm-log "buffer = %S" buffer) + (helm-log "modifiedp = %S" modifiedp) + modifiedp)) + +(defun helm-current-buffer-is-modified () + "Check if `helm-current-buffer' is modified since `helm' was invoked." + (helm-buffer-is-modified helm-current-buffer)) + +(defun helm-run-after-quit (function &rest args) + "Perform an action after quitting `helm'. +The action is to call FUNCTION with arguments ARGS." + (setq helm-quit t) + (helm-kill-async-processes) + (helm-log "function = %S" function) + (helm-log "args = %S" args) + (apply 'run-with-timer 0.1 nil function args) + (helm-exit-minibuffer)) + + +(defun define-helm-type-attribute (type definition &optional doc) + "Register type attribute of TYPE as DEFINITION with DOC. +DOC is displayed in `helm-type-attributes' docstring. + +Use this function is better than setting `helm-type-attributes' directly." + (cl-loop for i in definition do + ;; without `ignore-errors', error at emacs22 + (ignore-errors (setf i (delete nil i)))) + (helm-add-type-attribute type definition) + (and doc (helm-document-type-attribute type doc)) + nil) + +(defun helm-document-attribute (attribute short-doc &optional long-doc) + "Register ATTRIBUTE documentation introduced by plug-in. +SHORT-DOC is displayed beside attribute name. +LONG-DOC is displayed below attribute name and short documentation." + (if long-doc + (setq short-doc (concat "(" short-doc ")")) + (setq long-doc short-doc + short-doc "")) + (add-to-list 'helm-attributes attribute t) + (put attribute 'helm-attrdoc + (concat "- " (symbol-name attribute) + " " short-doc "\n\n" long-doc "\n"))) + +(put 'helm-document-attribute 'lisp-indent-function 2) + +(defun helm-interpret-value (value &optional source) + "Interpret VALUE as variable, function or literal and return it. +If VALUE is a function, call it with no arguments and return the value. +If SOURCE compute VALUE for this source. +If VALUE is a variable, return the value. +If VALUE is a symbol, but it is not a function or a variable, cause an error. +Otherwise, return VALUE itself." + (cond ((and source (functionp value)) + (helm-funcall-with-source source value)) + ((functionp value) + (funcall value)) + ((and (symbolp value) (boundp value)) + (symbol-value value)) + ((symbolp value) + (error + "helm-interpret-value: Symbol must be a function or a variable")) + (t + value))) + +(defun helm-set-local-variable (&rest args) + "Bind each pair in ARGS locally to `helm-buffer'. +Use this to set local vars before calling helm. +Usage: helm-set-local-variable ([VAR VALUE]...) +Just like `setq' except that the vars are not set sequentially. +IOW Don't use VALUE of previous VAR to eval the VALUE of next VAR. +When helm is alive use `make-local-variable' as usual on `helm-buffer'. + +\(fn VAR VALUE ...)" + (setq helm--local-variables + (append (cl-loop for i on args by #'cddr + collect (cons (car i) (cadr i))) + helm--local-variables))) + + +;; Core: API helper +(cl-defun helm-empty-buffer-p (&optional (buffer helm-buffer)) + "Check if BUFFER have candidates. +Default value for BUFFER is `helm-buffer'." + (zerop (buffer-size (and buffer (get-buffer buffer))))) + +(defun helm-empty-source-p () + "Check if current source contains candidates. +This happen only in certains cases when e.g the last element +of a source is deleted without updating the source." + (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 +(defun helm-current-line-contents () + "Current line string without properties." + (buffer-substring-no-properties (point-at-bol) (point-at-eol))) + +(defun helm-funcall-with-source (source functions &rest args) + "Call from SOURCE FUNCTIONS list or single function FUNCTIONS with ARGS. +FUNCTIONS can be a symbol or a list of functions. +Return the result of last function call." + (let ((helm-source-name (assoc-default 'name source)) + (helm-current-source source) + (funs (if (functionp functions) (list functions) functions))) + (helm-log "helm-source-name = %S" helm-source-name) + (helm-log "functions = %S" functions) + (helm-log "args = %S" args) + (cl-loop with result for fn in funs + do (setq result (apply fn args)) finally return result))) + +(defun helm-funcall-foreach (sym &optional sources) + "Call the associated function to SYM for each source if any." + (let ((sources (or sources (helm-get-sources)))) + (cl-dolist (source sources) + (helm-aif (assoc-default sym source) + (helm-funcall-with-source source it))))) + +(defun helm-normalize-sources (sources) + "If SOURCES is only one source, make a list of one element." + (cond ((or (and sources + (symbolp sources)) + (and (listp sources) (assq 'name sources))) + (list sources)) + (sources) + (t helm-sources))) + +(defun helm-get-candidate-number (&optional in-current-source) + "Return candidates number in `helm-buffer'. +If IN-CURRENT-SOURCE is provided return number of candidates +in the source where point is." + (with-current-buffer (helm-buffer-get) + (if (or (helm-empty-buffer-p) + (helm-empty-source-p)) + 0 + (save-excursion + (if in-current-source + (goto-char (helm-get-previous-header-pos)) + (goto-char (point-min))) + (forward-line 1) + (if (helm-pos-multiline-p) + (save-excursion + (cl-loop with count-multi = 1 + while (and (not (if in-current-source + (save-excursion + (forward-line 2) + (or (helm-pos-header-line-p) (eobp))) + (eobp))) + (search-forward helm-candidate-separator nil t)) + do (cl-incf count-multi) + finally return count-multi)) + (save-excursion + (cl-loop with ln = 0 + while (not (if in-current-source + (or (helm-pos-header-line-p) (eobp)) + (eobp))) + unless (helm-pos-header-line-p) + do (cl-incf ln) + do (forward-line 1) finally return ln))))))) + +(defmacro with-helm-quittable (&rest body) + "If an error occur in execution of BODY, quit helm safely." + (declare (indent 0) (debug t)) + `(let (inhibit-quit) + (condition-case _v + (progn ,@body) + (quit (setq helm-quit t) + (exit-minibuffer) + (keyboard-quit))))) + +(defun helm-compose (arg-lst func-lst) + "Apply arguments specified in ARG-LST with each function of FUNC-LST. +The result of each function will be the new `car' of ARG-LST. +Each function in FUNC-LST must accept (length ARG-LST) arguments +\(See examples below) . +This function allows easy sequencing of transformer functions. +Where generally, ARG-LST is '(candidates-list source) and FUNC-LST a +list of transformer functions that take one or two arguments depending +we are using 'filtered-candidate-transformer' or 'candidate-transformer'. +e.g +filtered-candidate-transformer: +\(helm-compose '((1 2 3 4 5 6 7) + '((name . \"A helm source\") (candidates . (a b c)))) + '((lambda (candidates _source) + (cl-loop for i in candidates + when (cl-oddp i) collect i)) + (lambda (candidates _source) + (cl-loop for i in candidates collect (1+ i))))) +=>(2 4 6 8) + +candidate-transformer: +\(helm-compose '((1 2 3 4 5 6 7)) + '((lambda (candidates) + (cl-loop for i in candidates + when (cl-oddp i) collect i)) + (lambda (candidates) + (cl-loop for i in candidates collect (1+ i))))) +=> (2 4 6 8)." + (cl-dolist (func func-lst) + (setcar arg-lst (apply func arg-lst))) + (car arg-lst)) + +(defun helm-composed-funcall-with-source (source funcs &rest args) + "With SOURCE apply `helm-funcall-with-source' with each FUNCS and ARGS. +This is used in transformers to modify candidates list." + (if (functionp funcs) + (apply 'helm-funcall-with-source source funcs args) + (apply 'helm-funcall-with-source source + (lambda (&rest oargs) (helm-compose oargs funcs)) + args))) + + +;; Core: entry point +;; `:allow-nest' is not in this list because it is treated before. +(defconst helm-argument-keys + '(:sources :input :prompt :resume + :preselect :buffer :keymap :default :history)) + +;;;###autoload +(defun helm (&rest plist) + "Main function to execute helm sources. + +Keywords supported: +:sources :input :prompt :resume :preselect +:buffer :keymap :default :history :allow-nest + +Extra LOCAL-VARS keywords are supported, see below. + +PLIST is a list like \(:key1 val1 :key2 val2 ...\) or +\(&optional sources input prompt resume + preselect buffer keymap default history\). + +Basic keywords are the following: + +\:sources + +A list of sources used for this session. It also accepts a +symbol, interpreted as a variable of a helm source +i.e (a symbol can be passed instead of a list of sources). +It also accepts an alist representing a helm source, which is +detected by \(assq 'name ANY-SOURCES\). +NOTE: In this case the source is embedded in the helm command and +have no symbol name, so it is not reachable from outside. +It will be referenced in `helm-sources' as a whole alist. + +\:input + +Temporary value of `helm-pattern', ie. initial input of minibuffer. + +\:prompt + +Prompt other than \"pattern: \". + +\:resume + +If t, Resurrect previously instance of `helm'. Skip the initialization. +If 'noresume, this instance of `helm' cannot be resumed. + +\:preselect + +Initially selected candidate. Specified by exact candidate or a regexp. + +\:buffer + +`helm-buffer' instead of *helm*. + +\:keymap + +`helm-map' for current `helm' session. + +\:default + +A default argument that will be inserted in minibuffer \ +with \\\\[next-history-element]. +When nil or not present `thing-at-point' will be used instead. +If `helm-maybe-use-default-as-input' is non--nil display will be +updated using :default arg as input unless :input is specified, +which in this case will take precedence on :default +This is a string or a list, in this case the car of the list will +be used as initial default input, but you will be able to cycle in this +list with \\\\[next-history-element]. + +\:history + +By default all minibuffer input is pushed to `minibuffer-history', +if an argument HISTORY is provided, input will be pushed to HISTORY. +History element should be a symbol. + +\:allow-nest + +Allow running this helm command within a running helm session. + +Of course, conventional arguments are supported, the two are same. + +\(helm :sources sources :input input :prompt prompt :resume resume + :preselect preselect :buffer buffer :keymap keymap :default default + :history history\) + +and + +\(helm sources input prompt resume preselect buffer keymap default history\) + +are the same. + +However the use of non keyword args is deprecated and should not be used. + +Other keywords are interpreted as local variables of this helm session. +The `helm-' prefix can be omitted. For example, + +\(helm :sources 'helm-source-buffers-list + :buffer \"*buffers*\" :candidate-number-limit 10\) + +means starting helm session with `helm-source-buffers' +source in *buffers* buffer and set variable `helm-candidate-number-limit' +to 10 as session local variable. + +\(fn &key SOURCES INPUT PROMPT RESUME PRESELECT BUFFER KEYMAP DEFAULT HISTORY ALLOW-NEST OTHER-LOCAL-VARS)" + (let ((fn (cond ((or (and helm-alive-p (plist-get plist :allow-nest)) + (and helm-alive-p (memq 'allow-nest plist))) + #'helm-nest) + ((keywordp (car plist)) + #'helm) + (t #'helm-internal)))) + (if (and helm-alive-p (eq fn #'helm)) + (if (helm-alive-p) + ;; A helm session is normally running. + (error "Error: Trying to run helm within a running helm session") + ;; A helm session is already running and user jump somewhere else + ;; without desactivating it. + (with-helm-buffer + (prog1 + (message "Aborting an helm session running in background") + ;; `helm-alive-p' will be reset in unwind-protect forms. + (helm-keyboard-quit)))) + (if (keywordp (car plist)) + ;; Parse `plist' and move not regular `helm-argument-keys' + ;; to `helm--local-variables', then calling helm on itself + ;; with normal arguments (the non--arguments-keys removed) + ;; will end up in [1]. + (progn + (setq helm--local-variables + (append helm--local-variables + ;; Vars passed by keyword on helm call + ;; take precedence on same vars + ;; that may have been passed before helm call. + (helm-parse-keys plist))) + (apply fn (mapcar #'(lambda (key) (plist-get plist key)) + helm-argument-keys))) + (apply fn plist))))) ; [1] fn == helm-internal. + +(defun helm-alive-p () + "Check if `helm' is alive. +An `helm' session is considered alive if `helm-alive-p' is non--nil, +the `helm-buffer' is visible, and cursor is in minibuffer." + (and helm-alive-p + (get-buffer-window helm-buffer 'visible) + (minibuffer-window-active-p (minibuffer-window)) + (minibufferp (current-buffer)))) + +(defun helm-parse-keys (keys) + "Parse the KEYS arguments of `helm'. +Return only the keys that are not in `helm-argument-keys', +prefix them with \"helm\" and convert them to alist. +This allow to add arguments that are not part of `helm-argument-keys', +but are valid helm variables. +e.g :candidate-number-limit will be bound to `helm-candidate-number-limit' +in source. + + (helm-parse-keys '(:sources ((name . \"test\") + (candidates . (a b c))) + :buffer \"toto\" + :candidate-number-limit 4)) + ==> ((helm-candidate-number-limit . 4))." + + (cl-loop for (key value) on keys by #'cddr + for symname = (substring (symbol-name key) 1) + for sym = (intern (if (string-match "^helm-" symname) + symname + (concat "helm-" symname))) + unless (memq key helm-argument-keys) + collect (cons sym value))) + +;;; Core: entry point helper +(defun helm-internal (&optional + any-sources any-input + any-prompt any-resume + any-preselect any-buffer + any-keymap any-default any-history) + "The internal helm function called by `helm'. +For ANY-SOURCES ANY-INPUT ANY-PROMPT ANY-RESUME ANY-PRESELECT ANY-BUFFER and +ANY-KEYMAP ANY-DEFAULT ANY-HISTORY See `helm'." + ;; Activate the advice for `tramp-read-passwd'. + (if (fboundp 'advice-add) + (advice-add 'tramp-read-passwd :around #'helm--advice-tramp-read-passwd) + (ad-activate 'tramp-read-passwd)) + (catch 'exit ; `exit-minibuffer' use this tag on exit. + (helm-log (concat "[Start session] " (make-string 41 ?+))) + (helm-log "any-prompt = %S" any-prompt) + (helm-log "any-preselect = %S" any-preselect) + (helm-log "any-buffer = %S" any-buffer) + (helm-log "any-keymap = %S" any-keymap) + (helm-log "any-default = %S" any-default) + (helm-log "any-history = %S" any-history) + (let ((old-overriding-local-map overriding-terminal-local-map) + ;; #163 no cursor in minibuffer in <=Emacs-24.2. + ;; Apart this bug in <=24.2, this is needed for + ;; messages in minibuffer on top of helm prompt. + (cursor-in-echo-area t) + (non-essential t) + (old--cua cua-mode) + (helm-maybe-use-default-as-input + (or helm-maybe-use-default-as-input ; it is let-bounded so use it. + (cl-loop for s in (helm-normalize-sources any-sources) + thereis (memq s helm-sources-using-default-as-input))))) + ;; cua-mode overhide local helm bindings. + ;; disable this stupid thing if enabled. + (and cua-mode (cua-mode -1)) + (unwind-protect + (condition-case _v + (let (;; `helm-source-name' is non-nil + ;; when `helm' is invoked by action, reset it. + helm-source-name + helm-current-source + helm-in-persistent-action + helm-quit + (helm-buffer (or any-buffer helm-buffer))) + (with-helm-restore-variables + (helm-initialize + any-resume any-input any-default any-sources) + (helm-display-buffer helm-buffer) + (add-hook 'post-command-hook 'helm--maybe-update-keymap) + (helm-log "show prompt") + (unwind-protect + (helm-read-pattern-maybe + any-prompt any-input any-preselect + any-resume any-keymap any-default any-history) + (helm-cleanup))) + (prog1 + (unless helm-quit (helm-execute-selection-action)) + (helm-log (concat "[End session] " (make-string 41 ?-))))) + (quit + (helm-restore-position-on-quit) + (helm-log (concat "[End session (quit)] " (make-string 34 ?-))) + nil)) + (remove-hook 'post-command-hook 'helm--maybe-update-keymap) + (if (fboundp 'advice-add) + (advice-remove 'tramp-read-passwd #'helm--advice-tramp-read-passwd) + (ad-deactivate 'tramp-read-passwd)) + (helm-log "helm-alive-p = %S" (setq helm-alive-p nil)) + (setq overriding-terminal-local-map old-overriding-local-map) + (setq helm-alive-p nil) + (setq helm-in-file-completion-p nil) + (and old--cua (cua-mode 1)) + (helm-log-save-maybe))))) + + +;;; Helm resume +;; +;; +(defun helm-resume (arg) + "Resurrect previously invoked `helm'. +Called with a prefix arg, allow choosing among all existing +helm buffers. i.e choose among various helm sessions. +Called from lisp, you can specify a buffer-name as a string with ARG." + (interactive "P") + (let (any-buffer helm-full-frame cur-dir) + (if arg + (if (and (stringp arg) (bufferp (get-buffer arg))) + (setq any-buffer arg) + (setq any-buffer (helm-resume-select-buffer))) + (setq any-buffer helm-last-buffer)) + (cl-assert any-buffer nil + "helm-resume: No helm buffers found to resume") + ;; Reset `cursor-type' to nil as it have been set to t + ;; when quitting previous session. + (with-current-buffer any-buffer (setq cursor-type nil)) + (setq helm-full-frame (buffer-local-value + 'helm-full-frame (get-buffer any-buffer))) + (setq helm-compiled-sources nil) + (setq cur-dir (buffer-local-value + 'helm-default-directory (get-buffer any-buffer))) + (unless (buffer-live-p helm-current-buffer) + ;; `helm-current-buffer' may have been killed. + (setq helm-current-buffer (current-buffer))) + ;; Restart with same `default-directory' value this session + ;; was initially started with. + (with-helm-default-directory cur-dir + (helm + :sources (buffer-local-value + 'helm-sources (get-buffer any-buffer)) + :input (buffer-local-value 'helm-input-local (get-buffer any-buffer)) + :resume t + :buffer any-buffer)))) + +(defun helm-resume-previous-session-after-quit (arg) + "Resume previous helm session within running helm." + (interactive "p") + (if (and helm-alive-p (> (length helm-buffers) arg)) + (helm-run-after-quit `(lambda () (helm-resume (nth ,arg helm-buffers)))) + (message "No previous helm sessions to resume yet!"))) + +(defun helm-resume-list-buffers-after-quit () + "List resumable helm buffers within running helm." + (interactive) + (if (and helm-alive-p (> (length helm-buffers) 0)) + (helm-run-after-quit #'(lambda () (helm-resume t))) + (message "No previous helm sessions to resume yet!"))) + +(defun helm-resume-p (any-resume) + "Whether current helm session is resumed or not." + (eq any-resume t)) + +(defun helm-resume-select-buffer () + "Select an `helm-buffer' in `helm-buffers' list to resume a helm session. +Return nil if no `helm-buffer' found." + (when helm-buffers + (or (helm :sources '(((name . "Resume helm buffer") + (candidates . helm-buffers) + (action . identity))) + :resume 'noresume + :buffer "*helm resume*") + (keyboard-quit)))) + + +;;;###autoload +(defun helm-other-buffer (any-sources any-buffer) + "Simplified interface of `helm' with other `helm-buffer'. +Call `helm' with only ANY-SOURCES and ANY-BUFFER as args." + (helm :sources any-sources :buffer any-buffer)) + +(defun helm-nest (&rest same-as-helm) + "Allow calling `helm' whithin a running helm session. +Arguments SAME-AS-HELM are the same as `helm', which see." + (with-helm-window + (let ((orig-helm-current-buffer helm-current-buffer) + (orig-helm-buffer helm-buffer) + (orig-helm-last-frame-or-window-configuration + helm-last-frame-or-window-configuration) + (orig-one-window-p helm-onewindow-p)) + (unwind-protect + (let (helm-current-position + helm-current-buffer + helm-pattern + (helm-buffer (or (cl-getf same-as-helm :buffer) + (nth 5 same-as-helm) + "*Helm*")) + helm-sources + helm-compiled-sources + (helm-full-frame t) + (enable-recursive-minibuffers t)) + (apply #'helm same-as-helm)) + (with-current-buffer orig-helm-buffer + (setq helm-alive-p t) ; Nested session set this to nil on exit. + (setq helm-buffer orig-helm-buffer) + (helm-initialize-overlays helm-buffer) + (unless (helm-empty-buffer-p) (helm-mark-current-line t)) + (setq helm-last-frame-or-window-configuration + orig-helm-last-frame-or-window-configuration) + (setq cursor-type nil) + (setq helm-current-buffer orig-helm-current-buffer) + (setq helm-onewindow-p orig-one-window-p)))))) + + +;;; Core: Accessors +;; +(defun helm-current-position (save-or-restore) + "Restore or save current position in `helm-current-buffer'. +Argument SAVE-OR-RESTORE is one of save or restore." + (cl-case save-or-restore + (save + (helm-log "Save position at %S" (cons (point) (window-start))) + (setq helm-current-position (cons (point) (window-start)))) + (restore + (helm-log "Restore position at %S in buffer %s" + helm-current-position + (buffer-name (current-buffer))) + (goto-char (car helm-current-position)) + ;; Fix this position with the NOFORCE arg of `set-window-start' + ;; otherwise, if there is some other buffer than `helm-current-buffer' + ;; one, position will be lost. + (set-window-start (selected-window) (cdr helm-current-position) t)))) + + +(defun helm-frame-or-window-configuration (save-or-restore) + "Save or restore last frame or window configuration. +Possible value of SAVE-OR-RESTORE are 'save and 'restore. +window or frame configuration is saved/restored according to values of +`helm-save-configuration-functions'." + (helm-log "helm-save-configuration-functions = %S" + helm-save-configuration-functions) + (let ((window-persistent-parameters (append '((no-other-window . t)) + window-persistent-parameters))) + (cl-case save-or-restore + (save (setq helm-last-frame-or-window-configuration + (funcall (cdr helm-save-configuration-functions)))) + (restore (funcall (car helm-save-configuration-functions) + helm-last-frame-or-window-configuration) + ;; Restore frame focus. + ;; This is needed for minibuffer own-frame config + ;; when recursive minibuffers are in use. + ;; e.g M-: + helm-minibuffer-history. + (let ((frame (if (minibufferp helm-current-buffer) + (selected-frame) + (last-nonminibuffer-frame)))) + (select-frame-set-input-focus frame)))))) + +(defun helm-split-window-default-fn (window) + (let (split-width-threshold) + (if (and (fboundp 'window-in-direction) + ;; Don't try to split when starting in a minibuffer + ;; e.g M-: and try to use helm-show-kill-ring. + (not (minibufferp helm-current-buffer))) + (if (or (one-window-p t) + helm-split-window-in-side-p) + (split-window + (selected-window) nil (if (eq helm-split-window-default-side 'other) + 'below helm-split-window-default-side)) + ;; If more than one window reuse one of them. + (cl-case helm-split-window-default-side + (left (or (helm-window-in-direction 'left) + (helm-window-in-direction 'above) + (selected-window))) + (above (or (helm-window-in-direction 'above) + (helm-window-in-direction 'left) + (selected-window))) + (right (or (helm-window-in-direction 'right) + (helm-window-in-direction 'below) + (selected-window))) + (below (or (helm-window-in-direction 'below) + (helm-window-in-direction 'right) + (selected-window))) + (same (selected-window)) + (other (other-window-for-scrolling)) + (t (or (window-next-sibling) (selected-window))))) + (split-window-sensibly window)))) + +(defun helm-window-in-direction (direction) + "Same as `window-in-direction' but check if window is dedicated." + (helm-aif (window-in-direction direction) + (and (not (window-dedicated-p it)) it))) + + +;;; Display helm buffer +;; +;; +(defun helm-display-buffer (buffer) + "Display BUFFER. +The function used to display `helm-buffer'." + (let (pop-up-frames + (split-window-preferred-function + helm-split-window-preferred-function) + (helm-split-window-default-side + (if (and (not helm-full-frame) + helm-reuse-last-window-split-state) + (cond ((eq helm-split-window-default-side 'same) 'same) + ((eq helm-split-window-default-side 'other) 'other) + (helm--window-side-state) + (t helm-split-window-default-side)) + helm-split-window-default-side))) + (prog1 + (funcall (with-current-buffer buffer helm-display-function) buffer) + (setq helm-onewindow-p (one-window-p t)) + ;; Don't allow other-window and friends switching out of minibuffer. + (when helm-prevent-escaping-from-minibuffer + (helm-prevent-switching-other-window))))) + +(cl-defun helm-prevent-switching-other-window (&key (enabled t)) + "Allow setting `no-other-window' window parameter in all windows. +Arg ENABLE will be the value of the `no-other-window' window property." + (walk-windows + #'(lambda (w) + (unless (window-dedicated-p w) + (set-window-parameter w 'no-other-window enabled))) 0)) + +(defun helm-default-display-buffer (buffer) + "Default function to display `helm-buffer' BUFFER. +It uses `switch-to-buffer' or `pop-to-buffer' depending of value of +`helm-full-frame' and/or `helm-split-window-default-side'." + (if (or (buffer-local-value 'helm-full-frame (get-buffer buffer)) + (and (eq helm-split-window-default-side 'same) + (one-window-p t))) + (progn (delete-other-windows) (switch-to-buffer buffer)) + (when (and helm-always-two-windows + (not (eq helm-split-window-default-side 'same)) + (not (minibufferp helm-current-buffer)) + (not helm-split-window-in-side-p)) + (delete-other-windows)) + (pop-to-buffer buffer))) + + +;;; Core: initialize +;; +(defun helm-initialize (any-resume any-input any-default any-sources) + "Start initialization of `helm' session. +For ANY-RESUME ANY-INPUT ANY-DEFAULT and ANY-SOURCES See `helm'." + (helm-log "start initialization: any-resume=%S any-input=%S" + any-resume any-input) + (helm-frame-or-window-configuration 'save) + (setq helm-sources (helm-normalize-sources any-sources)) + (helm-log "sources = %S" helm-sources) + (helm-current-position 'save) + (if (helm-resume-p any-resume) + (helm-initialize-overlays (helm-buffer-get)) + (helm-initial-setup any-default)) + (setq helm-alive-p t) + (unless (eq any-resume 'noresume) + (helm-recent-push helm-buffer 'helm-buffers) + (setq helm-last-buffer helm-buffer)) + (when any-input (setq helm-input any-input + helm-pattern any-input)) + ;; If a `resume' attribute is present `helm-funcall-foreach' + ;; will run its function. + (when (helm-resume-p any-resume) + (helm-funcall-foreach 'resume)) + (helm-log "end initialization")) + +(defun helm-initialize-overlays (buffer) + "Initialize helm overlays in BUFFER." + (helm-log "overlay setup") + (if helm-selection-overlay + ;; make sure the overlay belongs to the helm buffer if + ;; it's newly created + (move-overlay helm-selection-overlay (point-min) (point-min) + (get-buffer buffer)) + + (setq helm-selection-overlay + (make-overlay (point-min) (point-min) (get-buffer buffer))) + (overlay-put helm-selection-overlay 'face 'helm-selection))) + +(defun helm-restore-position-on-quit () + "Restore position in `helm-current-buffer' when quitting." + (helm-current-position 'restore)) + +(defun helm-recent-push (elt list-var) + "Add ELT to the value of LIST-VAR as most recently used value." + (let ((m (member elt (symbol-value list-var)))) + (and m (set list-var (delq (car m) (symbol-value list-var)))) + (push elt (symbol-value list-var)))) + +(defun helm--current-buffer () + "[internal] Return `current-buffer' BEFORE `helm-buffer' is initialized. +Note that this will return the minibuffer in use after helm have started, +so to get the buffer where helm started while in a helm session, +use `helm-current-buffer'. +It is intended to use this only in `helm-initial-setup'." + (if (minibuffer-window-active-p (minibuffer-window)) + ;; If minibuffer is active be sure to use it's buffer + ;; as `helm-current-buffer', this allow to use helm + ;; from an already active minibuffer (M-: etc...) + (window-buffer (active-minibuffer-window)) + ;; Fix Issue #456 + ;; Use this instead of `current-buffer' to ensure + ;; helm session started in helm-mode from a completing-read + ;; Use really the buffer where we started and not the one + ;; where the completing-read is wrapped. i.e + ;; (with-current-buffer SOME-OTHER-BUFFER (completing-read [...]) + (window-buffer (with-selected-window (minibuffer-window) + (minibuffer-selected-window))))) + +(defun helm-initial-setup (any-default) + "Initialize helm settings and set up the helm buffer." + (helm-log-run-hook 'helm-before-initialize-hook) + (setq helm-current-prefix-arg nil) + (setq helm-suspend-update-flag nil) + (setq helm-delayed-init-executed nil) + (setq helm-current-buffer (helm--current-buffer)) + (setq helm-buffer-file-name buffer-file-name) + (setq helm-issued-errors nil) + (setq helm-compiled-sources nil) + (setq helm-saved-current-source nil) + (unless (and (or helm-split-window-state + helm--window-side-state) + helm-reuse-last-window-split-state) + (setq helm-split-window-state + (if (or (null split-width-threshold) + (and (integerp split-width-threshold) + (>= split-width-threshold (+ (frame-width) 4)))) + 'vertical 'horizontal)) + (setq helm--window-side-state + (or helm-split-window-default-side 'below))) + ;; Call the init function for sources where appropriate + (helm-funcall-foreach + 'init (and helm-source-filter + (cl-remove-if-not #'(lambda (s) + (member (assoc-default 'name s) + helm-source-filter)) + (helm-get-sources)))) + (setq helm-pattern (or (and helm-maybe-use-default-as-input + (or (if (listp any-default) + (car any-default) any-default) + (with-helm-current-buffer + (thing-at-point 'symbol)))) + "")) + (setq helm-input "") + (clrhash helm-candidate-cache) + (helm-create-helm-buffer) + (helm-clear-visible-mark) + (helm-log-run-hook 'helm-after-initialize-hook)) + +(defun helm-create-helm-buffer () + "Create and setup `helm-buffer'." + (let ((root-dir default-directory)) + (with-current-buffer (get-buffer-create helm-buffer) + (helm-log "kill local variables: %S" (buffer-local-variables)) + (kill-all-local-variables) + (set (make-local-variable 'inhibit-read-only) t) + (buffer-disable-undo) + (erase-buffer) + (set (make-local-variable 'helm-map) helm-map) + (make-local-variable 'helm-sources) + (set (make-local-variable 'helm-follow-mode) nil) + (set (make-local-variable 'helm-display-function) helm-display-function) + (set (make-local-variable 'helm-selection-point) nil) + (set (make-local-variable 'scroll-margin) + (if helm-display-source-at-screen-top + 0 helm-completion-window-scroll-margin)) + (set (make-local-variable 'helm-default-directory) root-dir) + (set (make-local-variable 'default-directory) root-dir) + (set (make-local-variable 'helm-marked-candidates) nil) + (helm-initialize-persistent-action) + (helm-log "helm-display-function = %S" helm-display-function) + (helm-log "helm--local-variables = %S" helm--local-variables) + (cl-loop for (var . val) in helm--local-variables + do (set (make-local-variable var) val) + finally (setq helm--local-variables nil)) + (setq truncate-lines helm-truncate-lines) ; already local. + (setq cursor-type nil) + (setq mode-name "Helm")) + (helm-initialize-overlays helm-buffer) + (get-buffer helm-buffer))) + +(defun helm-read-pattern-maybe (any-prompt any-input + any-preselect any-resume any-keymap + any-default any-history) + "Read pattern with prompt ANY-PROMPT and initial input ANY-INPUT. +For ANY-PRESELECT ANY-RESUME ANY-KEYMAP ANY-DEFAULT ANY-HISTORY, See `helm'." + (if (and (helm-resume-p any-resume) + ;; When no source, helm-buffer is empty + ;; or contain non--candidate lines (e.g grep exit status) + (helm-get-current-source)) + (helm-mark-current-line t) + (helm-update any-preselect)) + (with-current-buffer (helm-buffer-get) + (let* ((src (helm-get-current-source)) + (src-keymap (assoc-default 'keymap src)) + (hist (or (and any-history (symbolp any-history) any-history) + ;; Needed for resuming. + (assoc-default 'history src))) + (timer nil) + blink-matching-paren + (first-src (car helm-sources)) + (source-delayed-p (or (assq 'delayed src) + (assq 'delayed (if (symbolp first-src) + (symbol-value first-src) + first-src))))) + ;; Startup with the first keymap found either in current source + ;; or helm arg, otherwise use global value of `helm-map'. + ;; This map will be used as a `minibuffer-local-map'. + ;; Maybe it will be overriden when changing source + ;; by `helm--maybe-update-keymap'. + ;; Note that helm-map have been made buffer-local + ;; in `helm-create-helm-buffer'. + (setq helm-map (or src-keymap any-keymap helm-map)) + (helm-log "helm-get-candidate-number => %S" + (helm-get-candidate-number)) + (helm-log "helm-execute-action-at-once-if-one = %S" + helm-execute-action-at-once-if-one) + (helm-log "helm-quit-if-no-candidate = %S" helm-quit-if-no-candidate) + ;; If source is delayed `helm-execute-action-at-once-if-one' + ;; and `helm-quit-if-no-candidate' are handled after update finish. + (when source-delayed-p + ;; Note that we quickly add the hook now when `helm-update' + ;; is already started, but because source is delayed the hook + ;; should have the time to be passed !!! + ;; the hook will remove itself once done. + (with-helm-after-update-hook (helm-exit-or-quit-maybe))) + ;; Reset `helm-pattern' for non--delayed sources and update + ;; display if no result found with precedent value of `helm-pattern' + ;; unless `helm-quit-if-no-candidate' is non--nil, in this case + ;; Don't force update with an empty pattern. + ;; Reset also `helm-maybe-use-default-as-input' as this checking + ;; happen only on startup. + (when (and helm-maybe-use-default-as-input (not source-delayed-p)) + (setq helm-pattern "") + (setq helm-maybe-use-default-as-input nil) + (and (helm-empty-buffer-p) + (null helm-quit-if-no-candidate) + (helm-force-update))) + ;; Handle `helm-execute-action-at-once-if-one' and + ;; `helm-quit-if-no-candidate' now only for not--delayed sources. + (cond ((and helm-execute-action-at-once-if-one + (not source-delayed-p) + (= (helm-get-candidate-number) 1)) + (ignore)) ; Don't enter the minibuffer loop. + ((and helm-quit-if-no-candidate + (not source-delayed-p) + (= (helm-get-candidate-number) 0)) + (setq helm-quit t) + (and (functionp helm-quit-if-no-candidate) + (funcall helm-quit-if-no-candidate))) + (t ; Enter now minibuffer and wait for input. + (let ((tap (or any-default + (with-helm-current-buffer + (thing-at-point 'symbol))))) + (unwind-protect + (minibuffer-with-setup-hook + #'(lambda () + (setq timer (run-with-idle-timer + (max helm-input-idle-delay 0.001) 'repeat + #'(lambda () + ;; Stop updating when in persistent action + ;; or when `helm-suspend-update-flag' is + ;; non--nil. + (unless (or helm-in-persistent-action + helm-suspend-update-flag) + (save-selected-window + (helm-check-minibuffer-input) + (helm-print-error-messages))))))) + (read-from-minibuffer (or any-prompt "pattern: ") + any-input helm-map + nil hist tap t)) + (when timer (cancel-timer timer) (setq timer nil))))))))) + +(defun helm-exit-or-quit-maybe () + "Exit and run default action if only one candidate, quit if no candidates. +This function is handling `helm-execute-action-at-once-if-one' and +`helm-quit-if-no-candidate' in delayed sources." + (with-helm-window + (cond ((and helm-execute-action-at-once-if-one + (= (helm-get-candidate-number) 1)) + (helm-exit-minibuffer)) + ((and helm-quit-if-no-candidate + (= (helm-get-candidate-number) 0)) + (setq helm-quit t) + (and (functionp helm-quit-if-no-candidate) + (funcall helm-quit-if-no-candidate)) + (keyboard-quit))))) + +(defun helm-toggle-suspend-update () + "Enable or disable update of display in helm. +This can be useful for e.g writing quietly a complex regexp." + (interactive) + (when (setq helm-suspend-update-flag (not helm-suspend-update-flag)) + (helm-kill-async-processes) + (setq helm-pattern "")) + (message (if helm-suspend-update-flag + "Helm update suspended!" + "Helm update reenabled!"))) + +(defadvice tramp-read-passwd (around disable-helm-update) + ;; Suspend update when prompting for a tramp password. + (setq helm-suspend-update-flag t) + (setq overriding-terminal-local-map nil) + (setq helm--reading-passwd-or-string t) + (let (stimers) + (unwind-protect + (progn + (setq stimers (with-timeout-suspend)) + ad-do-it) + (with-timeout-unsuspend stimers) + (setq helm--reading-passwd-or-string nil) + (setq helm-suspend-update-flag nil)))) + +(defun helm--advice-tramp-read-passwd (old--fn &rest args) + ;; Suspend update when prompting for a tramp password. + (setq helm-suspend-update-flag t) + (setq overriding-terminal-local-map nil) + (setq helm--reading-passwd-or-string t) + (unwind-protect + ;; No need to suspend timer in emacs-24.4 + (apply old--fn args) + (setq helm--reading-passwd-or-string nil) + (setq helm-suspend-update-flag nil))) + +(defun helm--maybe-update-keymap () + "Handle differents keymaps in multiples sources. + +It will override `helm-map' with the local map of current source. +If no map is found in current source do nothing (keep previous map)." + (with-helm-buffer + (helm-aif (assoc-default 'keymap (helm-get-current-source)) + ;; Fix #466; we use here set-transient-map + ;; to not overhide other minor-mode-map's. + (if (fboundp 'set-transient-map) + (set-transient-map it) + (set-temporary-overlay-map it))))) + + +;; Core: clean up + +(defun helm-cleanup () + "Clean up the mess when helm exit or quit." + (helm-log "start cleanup") + (with-current-buffer helm-buffer + ;; bury-buffer from this window. + (bury-buffer) ;[1] + ;; Be sure we call this from helm-buffer. + (helm-funcall-foreach 'cleanup)) + (helm-kill-async-processes) + (helm-log-run-hook 'helm-cleanup-hook) + (helm-frame-or-window-configuration 'restore) + ;; [1] now bury-buffer from underlying windows otherwise, + ;; if this window is killed the underlying buffer will + ;; be a helm buffer. + (replace-buffer-in-windows helm-buffer) + (setq helm-alive-p nil) + (setq helm-in-file-completion-p nil) + ;; This is needed in some cases where last input + ;; is yielded infinitely in minibuffer after helm session. + (helm-clean-up-minibuffer)) + +(defun helm-clean-up-minibuffer () + "Remove contents of minibuffer." + (let ((miniwin (minibuffer-window))) + ;; Clean only current minibuffer used by helm. + ;; i.e The precedent one is active. + (unless (minibuffer-window-active-p miniwin) + (with-current-buffer (window-buffer miniwin) + (delete-minibuffer-contents))))) + + +;;; Core: input handling +;; +;; +(defun helm-check-minibuffer-input () + "Check minibuffer content." + (with-helm-quittable + (with-selected-window (or (active-minibuffer-window) + (minibuffer-window)) + (helm-check-new-input (minibuffer-contents))))) + +(defun helm-check-new-input (input) + "Check INPUT string and update the helm buffer if necessary." + ;; First time minibuffer is entered + ;; we check value of `helm-pattern' that have been set + ;; in `helm-initial-setup' when `helm-maybe-use-default-as-input' + ;; is non--nil. After this initial check, reset + ;; `helm-maybe-use-default-as-input' and ignore this. + ;; This happen only when source is `delayed'. + (when helm-maybe-use-default-as-input ; nil when non--delayed. + (setq input helm-pattern) + (with-helm-after-update-hook (setq helm-pattern "")) + (setq helm-maybe-use-default-as-input nil)) + ;; In delayed sources `helm-pattern' have not been resat yet. + (unless (equal input helm-pattern) + (setq helm-pattern input) + (unless (helm-action-window) + (setq helm-input helm-pattern)) + (helm-log "helm-pattern = %S" helm-pattern) + (helm-log "helm-input = %S" helm-input) + (setq helm--in-update t) + (helm-update))) + +(defun helm--reset-update-flag () + (run-with-idle-timer + helm-exit-idle-delay nil + (lambda () (setq helm--in-update nil)))) + +(add-hook 'helm-after-update-hook #'helm--reset-update-flag) + + +;;; Core: source compiler +;; +;; +(defun helm-compile-sources (sources funcs) + "Compile SOURCES with FUNCS. +See `helm-compile-source-functions'. +Helm plug-ins are realized by this function." + (mapcar + (lambda (source) + (cl-loop with src = (if (listp source) source (symbol-value source)) + for f in funcs + do (setq src (funcall f src)) + finally (cl-return src))) + sources)) + + +;; Core: all candidates +(defun helm-process-delayed-init (source) + "Initialize delayed SOURCE." + (let ((name (assoc-default 'name source))) + (unless (member name helm-delayed-init-executed) + (helm-aif (assoc-default 'delayed-init source) + (with-current-buffer helm-current-buffer + (helm-funcall-with-source source it) + (cl-dolist (_f (if (functionp it) (list it) it)) + (add-to-list 'helm-delayed-init-executed name))))))) + +(defun helm-get-candidates (source) + "Retrieve and return the list of candidates from SOURCE." + (helm-process-delayed-init source) + (let* (inhibit-quit + (candidate-fn (assoc-default 'candidates source)) + (candidate-proc (assoc-default 'candidates-process source)) + (type-error (lambda () + (error + "`%s' must either be a function, a variable or a list" + (or candidate-fn candidate-proc)))) + (candidates (condition-case err + ;; Process candidates-(process) function + ;; It may return a process or a list of candidates. + (if candidate-proc + (helm-interpret-value candidate-proc source) + (helm-interpret-value candidate-fn source)) + (error (helm-log "Error: %S" err) nil)))) + (when (and (processp candidates) (not candidate-proc)) + (warn "Candidates function `%s' should be called in a `candidates-process' attribute" + candidate-fn)) + (cond ((processp candidates) + ;; Candidates will be filtered later in process filter. + candidates) + ((null candidates) candidates) + ((listp candidates) + ;; Transform candidates with `candidate-transformer' functions if + ;; some, otherwise return candidates. + (helm-transform-candidates candidates source)) + (t (funcall type-error))))) + +(defmacro helm-while-no-input (&rest body) + "Same as `while-no-input' but without testing with `input-pending-p'." + (declare (debug t) (indent 0)) + (let ((catch-sym (make-symbol "input")) + inhibit-quit) + `(with-local-quit + (catch ',catch-sym + (let ((throw-on-input ',catch-sym)) + ,@body))))) + +(defun helm-get-cached-candidates (source) + "Return the cached value of candidates for SOURCE. +Cache the candidates if there is not yet a cached value." + (let* ((name (assoc-default 'name source)) + (candidate-cache (gethash name helm-candidate-cache))) + (helm-aif candidate-cache + (prog1 it (helm-log "Use cached candidates")) + (helm-log "No cached candidates, calculate candidates") + (let ((candidates (helm-get-candidates source))) + (cond ((processp candidates) + (push (cons candidates + (append source + (list (cons 'item-count 0) + (cons 'incomplete-line "")))) + helm-async-processes) + (set-process-filter candidates 'helm-output-filter) + (setq candidates nil)) + ((not (assoc 'volatile source)) + (puthash name candidates helm-candidate-cache))) + candidates)))) + + +;;; Core: candidate transformers +(defun helm-transform-mapcar (function args) + "`mapcar' for candidate-transformer. + +ARGS is (cand1 cand2 ...) or ((disp1 . real1) (disp2 . real2) ...) + +\(helm-transform-mapcar 'upcase '(\"foo\" \"bar\")) +=> (\"FOO\" \"BAR\") +\(helm-transform-mapcar 'upcase '((\"1st\" . \"foo\") (\"2nd\" . \"bar\"))) +=> ((\"1st\" . \"FOO\") (\"2nd\" . \"BAR\")) +" + (cl-loop for arg in args + if (consp arg) + collect (cons (car arg) (funcall function (cdr arg))) + else + collect (funcall function arg))) + +(defun helm-process-candidate-transformer (candidates source) + "Execute `candidate-transformer' function(s) on CANDIDATES in SOURCE." + (helm-aif (assoc-default 'candidate-transformer source) + (helm-composed-funcall-with-source source it candidates) + candidates)) + +(defun helm-process-filtered-candidate-transformer (candidates source) + "Execute `filtered-candidate-transformer' function(s) on CANDIDATES in SOURCE." + (helm-aif (assoc-default 'filtered-candidate-transformer source) + (helm-composed-funcall-with-source source it candidates source) + candidates)) + +(defmacro helm--maybe-process-filter-one-by-one-candidate (candidate source) + "Execute `filter-one-by-one' function(s) on CANDIDATE in SOURCE." + `(helm-aif (assoc-default 'filter-one-by-one ,source) + (if (listp it) + (cl-loop for f in it + do (setq ,candidate (funcall f ,candidate))) + (setq ,candidate (funcall it ,candidate))))) + +(defun helm--initialize-one-by-one-candidates (candidates source) + "Process the CANDIDATES with the `filter-one-by-one' function in SOURCE. +Return CANDIDATES when pattern is empty." + (helm-aif (and (string= helm-pattern "") + (assoc-default 'filter-one-by-one source)) + (cl-loop for cand in candidates + do (helm--maybe-process-filter-one-by-one-candidate cand source) + collect cand) + candidates)) + +(defun helm-process-filtered-candidate-transformer-maybe + (candidates source process-p) + "Execute `filtered-candidate-transformer' function(s) on CANDIDATES in SOURCE. +When PROCESS-P is non-nil execute `filtered-candidate-transformer' +functions if some, otherwise return CANDIDATES." + (if process-p + ;; When no filter return CANDIDATES unmodified. + (helm-process-filtered-candidate-transformer candidates source) + candidates)) + +(defun helm-process-real-to-display (candidates source) + "Execute real-to-display function on all CANDIDATES of SOURCE." + (helm-aif (assoc-default 'real-to-display source) + (setq candidates (helm-funcall-with-source + source 'mapcar + (lambda (cand_) + (if (consp cand_) + ;; override DISPLAY from candidate-transformer + (cons (funcall it (cdr cand_)) (cdr cand_)) + (cons (funcall it cand_) cand_))) + candidates)) + candidates)) + +(defun helm-transform-candidates (candidates source &optional process-p) + "Transform CANDIDATES of SOURCE according to candidate transformers. +When PROCESS-P is non-nil execute the `filtered-candidate-transformer' functions +otherwise only the `candidate-transformer' functions are processed. +When attribute `real-to-display' is present, execute its function on all maybe +filtered CANDIDATES." + (helm-process-real-to-display + (helm-process-filtered-candidate-transformer-maybe + (helm-process-candidate-transformer + (helm--initialize-one-by-one-candidates candidates source) source) + source process-p) + source)) + + +;; Core: narrowing candidates +(defun helm-candidate-number-limit (source) + "Apply candidate-number-limit attribute value. +This overhide variable `helm-candidate-number-limit'. + +e.g: +If \(candidate-number-limit\) is in SOURCE, show all candidates in SOURCE. +If \(candidate-number-limit . 123\) is in SOURCE limit candidate to 123." + (helm-aif (assq 'candidate-number-limit source) + (or (cdr it) 99999999) + (or helm-candidate-number-limit 99999999))) + +(defun helm-candidate-get-display (candidate) + "Get searched display part from CANDIDATE. +CANDIDATE is a string, a symbol, or \(DISPLAY . REAL\) cons cell." + (format "%s" (or (car-safe candidate) candidate))) + +(defun helm-process-pattern-transformer (pattern source) + "Execute pattern-transformer attribute PATTERN function in SOURCE." + (helm-aif (assoc-default 'pattern-transformer source) + (helm-composed-funcall-with-source source it pattern) + pattern)) + +(defun helm-default-match-function (candidate) + "Check if `helm-pattern' match CANDIDATE. +Default function to match candidates according to `helm-pattern'." + (string-match helm-pattern candidate)) + +(defun helm-match-functions (source) + (let ((matchfns (or (assoc-default 'match source) + (assoc-default 'match-strict source) + #'helm-default-match-function))) + (if (listp matchfns) matchfns (list matchfns)))) + +(defmacro helm--accumulate-candidates (candidate newmatches + hash item-count limit source) + "Add CAND into NEWMATCHES and use HASH to uniq NEWMATCHES. +Argument ITEM-COUNT count the matches. +if ITEM-COUNT reaches LIMIT, exit from inner loop." + `(unless (gethash ,candidate ,hash) + (unless (assq 'allow-dups ,source) + (puthash ,candidate t ,hash)) + (helm--maybe-process-filter-one-by-one-candidate ,candidate source) + (push ,candidate ,newmatches) + (cl-incf ,item-count) + (when (= ,item-count ,limit) (cl-return)))) + +(defun helm-take-first-elements (seq n) + "Return the N first element of SEQ if SEQ is longer than N. +It is used to narrow down list of candidates to `helm-candidate-number-limit'." + (if (> (length seq) n) (cl-subseq seq 0 n) seq)) + +(cl-defun helm-set-case-fold-search (&optional (pattern helm-pattern)) + "Used to set the value of `case-fold-search' in helm. +Return t or nil depending of value of `helm-case-fold-search' +and `helm-pattern'." + (let ((helm-case-fold-search + (helm-aif (assq 'case-fold-search (helm-get-current-source)) + (cdr it) + helm-case-fold-search)) + ;; Only parse basename for filenames + ;; to avoid setting case sensitivity + ;; when expanded directories contains upcase + ;; characters. + (bn-or-pattern (if (string-match "[~/]*" pattern) + ;; `helm-basename' is not available yet. + (file-name-nondirectory + (directory-file-name pattern)) + pattern))) + (helm-set-case-fold-search-1 bn-or-pattern))) + +(defun helm-set-case-fold-search-1 (pattern) + (cl-case helm-case-fold-search + (smart (let ((case-fold-search nil)) + (if (string-match "[[:upper:]]" pattern) nil t))) + (t helm-case-fold-search))) + +(defun helm-match-from-candidates (cands matchfns limit source) + (let (matches) + (condition-case err + (let ((item-count 0) + (case-fold-search (helm-set-case-fold-search))) + (clrhash helm-match-hash) + (cl-dolist (match matchfns) + (let (newmatches) + (cl-dolist (candidate cands) + (unless (gethash candidate helm-match-hash) + (when (funcall match + (helm-candidate-get-display candidate)) + (helm--accumulate-candidates + candidate newmatches + helm-match-hash item-count limit source)))) + ;; filter-one-by-one may return nil candidates, so delq them if some. + (setq matches (nconc matches (nreverse (delq nil newmatches))))))) + (error (unless (eq (car err) 'invalid-regexp) ; Always ignore regexps errors. + (helm-log-error "helm-match-from-candidates in source `%s': %s %s" + (assoc-default 'name source) (car err) (cdr err))) + (setq matches nil))) + matches)) + +(defun helm-compute-matches (source) + "Start computing candidates in SOURCE." + (save-current-buffer + (let ((matchfns (helm-match-functions source)) + (helm-source-name (assoc-default 'name source)) + (helm-current-source source) + (limit (helm-candidate-number-limit source)) + (helm-pattern (helm-process-pattern-transformer + helm-pattern source))) + ;; If source have a `filtered-candidate-transformer' attr + ;; Filter candidates with this func, otherwise just compute + ;; candidates. + (helm-process-filtered-candidate-transformer + (if (or (equal helm-pattern "") + (equal matchfns '(identity))) + ;; Compute all candidates up to LIMIT. + (helm-take-first-elements + (helm-get-cached-candidates source) limit) + ;; Compute candidates according to pattern with their match fns. + (helm-match-from-candidates + (helm-get-cached-candidates source) matchfns limit source)) + source)))) + +(defun helm-render-source (source matches) + "Display MATCHES from SOURCE according to its settings." + (helm-log "Source name = %S" (assoc-default 'name source)) + (when matches + (helm-insert-header-from-source source) + (if (not (assq 'multiline source)) + (cl-loop for m in matches + for count from 1 + do (helm-insert-match m 'insert source count)) + (let ((start (point)) + (count 0) + separate) + (cl-dolist (match matches) + (cl-incf count) + (if separate + (helm-insert-candidate-separator) + (setq separate t)) + (helm-insert-match match 'insert source count)) + (put-text-property start (point) 'helm-multiline t))))) + +(defmacro helm--maybe-use-while-no-input (&rest body) + "Wrap BODY in `helm-while-no-input' unless initializing a remote connection." + `(progn + (if (and (file-remote-p helm-pattern) + (not (file-remote-p helm-pattern nil t))) + ;; Tramp will ask for passwd, don't use `helm-while-no-input'. + ,@body + (helm-log "Using here `helm-while-no-input'") + (helm-while-no-input ,@body)))) + +(defun helm--compute-sources (src-list) + (cl-loop with matches = (helm--maybe-use-while-no-input + (cl-loop for src in src-list + collect (helm-compute-matches src))) + when (eq matches t) do (setq matches nil) + for src in src-list + for mtc in matches + do (helm-render-source src mtc))) + +(cl-defun helm-process-delayed-sources (delayed-sources &optional preselect source) + "Process helm DELAYED-SOURCES. +Move selection to string or regexp PRESELECT if non--nil. +This function is called in `helm-process-delayed-sources-timer' +when emacs is idle for `helm-idle-delay'." + (with-helm-quittable + (helm-log "Delayed sources = %S" + (mapcar (lambda (s) + (assoc-default 'name s)) + delayed-sources)) + (with-current-buffer (helm-buffer-get) + (save-excursion + (goto-char (point-max)) + (helm--compute-sources delayed-sources) + (when (and (not (helm-empty-buffer-p)) + ;; No selection yet. + (= (overlay-start helm-selection-overlay) + (overlay-end helm-selection-overlay))) + (helm-update-move-first-line 'without-hook))) + (save-excursion + (goto-char (point-min)) + (helm-log-run-hook 'helm-update-hook)) + (setq helm-force-updating-p nil) + (unless (assoc 'candidates-process source) + (helm-display-mode-line (helm-get-current-source)) + (helm-log-run-hook 'helm-after-update-hook)) + (when preselect (helm-preselect preselect source))))) + + +;;; Core: helm-update +;; +(defun helm-update (&optional preselect source) + "Update candidates list in `helm-buffer' according to `helm-pattern'. +Argument PRESELECT is a string or regexp used to move selection to a particular +place once updating is done. It should be used on single source because search +is done on whole `helm-buffer' and not on current source." + (helm-log "Start updating") + (helm-kill-async-processes) + ;; When persistent action have been called + ;; we have two windows even with `helm-full-frame'. + ;; So go back to one window when updating if `helm-full-frame' + ;; is non--nil. + (with-helm-window + (when helm-onewindow-p (delete-other-windows))) + (with-current-buffer (helm-buffer-get) + (set (make-local-variable 'helm-input-local) helm-pattern) + (let (normal-sources + delayed-sources) + (unwind-protect + (progn + ;; Iterate over all the sources + (cl-loop for source in (cl-remove-if-not + 'helm-update-source-p (helm-get-sources)) + if (helm-delayed-source-p source) + ;; Delayed sources just get collected for later + ;; processing + collect source into ds + else + ;; Collect the normal sources + collect source into ns + ;; Export the variables from cl-loop + finally (setq delayed-sources ds + normal-sources ns)) + (erase-buffer) + ;; Render all the sources into the helm buffer after + ;; calculating all candidates. + ;; Candidates must be computed AFTER erasing buffer + ;; even if it cause flickering; Doing so avoid + ;; unexpected results when executing actions. + (helm--compute-sources normal-sources)) + (helm-log "Delayed sources = %S" + (mapcar (lambda (s) (assoc-default 'name s)) + delayed-sources)) + (cond ((and preselect delayed-sources normal-sources) + ;; Preselection run here when there is + ;; normal AND delayed sources. + (helm-log "Update preselect candidate %s" preselect) + (helm-preselect preselect source)) + (delayed-sources ; Preselection and hooks will run later. + (helm-update-move-first-line 'without-hook)) + (t ; No delayed sources, run the hooks now. + (helm-update-move-first-line) + (unless (assoc 'candidates-process source) + (helm-display-mode-line (helm-get-current-source)) + (helm-log-run-hook 'helm-after-update-hook)) + (when preselect + (helm-log "Update preselect candidate %s" preselect) + (helm-preselect preselect source)) + (setq helm-force-updating-p nil))) + (when delayed-sources + ;; Allow giving a value to `delayed' attr from inside source. + ;; Retain the biggest value (the slower) found in DELAYED-SOURCES. + (let ((helm-idle-delay (cl-loop with delay = helm-idle-delay + for s in delayed-sources + for d = (assoc-default 'delayed s) + when d do (setq delay (max delay d)) + finally return delay))) + (run-with-idle-timer + ;; Be sure helm-idle-delay is > + ;; to helm-input-idle-delay + ;; otherwise use value of helm-input-idle-delay + ;; or 0.01 if == to 0. + (max helm-idle-delay helm-input-idle-delay 0.001) nil + 'helm-process-delayed-sources delayed-sources preselect source))) + (helm-log "end update"))))) + +;; Update keymap after updating. +;; Putting this in a hook allow users to disable it. +(add-hook 'helm-after-update-hook 'helm--maybe-update-keymap) + +(defun helm-update-source-p (source) + "Whether SOURCE need updating or not." + (let ((len (string-width + (if (or (not (assoc 'no-matchplugin source)) + helm-match-plugin-mode) + ;; Don't count spaces entered when using + ;; match-plugin. + (replace-regexp-in-string " " "" helm-pattern) + helm-pattern)))) + (and (or (not helm-source-filter) + (member (assoc-default 'name source) helm-source-filter)) + (>= len + (helm-aif (assoc 'requires-pattern source) (or (cdr it) 1) 0)) + ;; These incomplete regexps hang helm forever + ;; so defer update. Maybe replace spaces quoted when using + ;; match-plugin-mode. + (not (member (replace-regexp-in-string "\\s\\ " " " helm-pattern) + helm-update-blacklist-regexps))))) + +(defun helm-delayed-source-p (source) + "Wheter SOURCE is a delayed source or not." + (or (assoc 'delayed source) + (and helm-quick-update + (< (window-height (get-buffer-window (current-buffer))) + (line-number-at-pos (point-max)))))) + +(defun helm-update-move-first-line (&optional without-hook) + "Goto first line of `helm-buffer'." + (goto-char (point-min)) + (unless without-hook + (save-excursion (helm-log-run-hook 'helm-update-hook))) + (helm-next-line)) + +(defun helm-force-update (&optional preselect) + "Force recalculation and update of candidates. +The difference with `helm-update' is this function is reevaling +the `init' and `update' attributes functions when present +before updating candidates according to pattern i.e calling `helm-update'. +Selection is preserved to current candidate or moved to PRESELECT +if specified." + (interactive) + (let ((source (helm-get-current-source)) + (selection (helm-get-selection nil t)) + ;; `helm-goto-source' need to have all sources displayed + ;; So disable `helm-quick-update'. + helm-quick-update) + (setq helm-force-updating-p t) + (when source + (mapc 'helm-force-update--reinit + (helm-get-sources))) + (helm-update (or preselect selection) source) + (with-helm-window (recenter)))) + +(defun helm-force-update--reinit (source) + "Reinit SOURCE by calling his update and/or init functions." + (helm-aif (helm-funcall-with-source + source 'helm-candidate-buffer) + (kill-buffer it)) + (cl-dolist (attr '(update init)) + (helm-aif (assoc-default attr source) + (helm-funcall-with-source source it))) + (helm-remove-candidate-cache source)) + +(defun helm-remove-candidate-cache (source) + "Remove SOURCE from `helm-candidate-cache'." + (remhash (assoc-default 'name source) helm-candidate-cache)) + +(defun helm-insert-match (match insert-function source &optional num) + "Insert MATCH into `helm-buffer' with INSERT-FUNCTION for SOURCE. +If MATCH is a list then insert the string intended to appear on the display +and store the real value in a text property." + (let ((start (point-at-bol (point))) + (dispvalue (or (car-safe match) match)) + (realvalue (cdr-safe match))) + (setq dispvalue + (cond ((symbolp dispvalue) (symbol-name dispvalue)) + ((numberp dispvalue) (number-to-string dispvalue)) + ((string= "" dispvalue)) + (t dispvalue))) + (when (stringp dispvalue) + (funcall insert-function dispvalue) + ;; Some sources with candidates-in-buffer have already added + ;; 'helm-realvalue property when creating candidate buffer. + (unless (get-text-property start 'helm-realvalue) + (and realvalue + (put-text-property start (point-at-eol) + 'helm-realvalue realvalue))) + (when num + (put-text-property start (point-at-eol) 'helm-cand-num num)) + (when helm-source-in-each-line-flag + (put-text-property start (point-at-eol) 'helm-source source)) + (funcall insert-function "\n")))) + +(defun helm-insert-header-from-source (source) + "Insert SOURCE name in `helm-buffer' header. +Maybe insert by overlay additional info after source name if SOURCE have +header-name attribute." + (let ((name (assoc-default 'name source))) + (helm-insert-header + name + (helm-aif (assoc-default 'header-name source) + (helm-funcall-with-source source it name))))) + +(defun helm-insert-header (name &optional display-string) + "Insert header of source NAME into the helm buffer. +If DISPLAY-STRING is non--nil and a string, display this additional info +after the source name by overlay." + (unless (bobp) + (let ((start (point))) + (insert "\n") + (put-text-property start (point) 'helm-header-separator t))) + (let ((start (point))) + (insert name) + (put-text-property (point-at-bol) + (point-at-eol) 'helm-header t) + (when display-string + (overlay-put (make-overlay (point-at-bol) (point-at-eol)) + 'display display-string)) + (insert "\n") + (put-text-property start (point) 'face 'helm-source-header))) + +(defun helm-insert-candidate-separator () + "Insert separator of candidates into the helm buffer." + (insert (propertize helm-candidate-separator 'face 'helm-separator)) + (put-text-property (point-at-bol) + (point-at-eol) 'helm-candidate-separator t) + (insert "\n")) + + +;;; Core: async process +;; +(defun helm-output-filter (process output-string) + "The `process-filter' function for helm async sources." + (helm-output-filter-1 (assoc process helm-async-processes) output-string)) + +(defun helm-output-filter-1 (process-assoc output-string) + (helm-log "output-string = %S" output-string) + (with-current-buffer helm-buffer + (let ((source (cdr process-assoc))) + (save-excursion + (helm-aif (assoc-default 'insertion-marker source) + (goto-char it) + (goto-char (point-max)) + (helm-insert-header-from-source source) + (setcdr process-assoc + (append source `((insertion-marker . ,(point-marker)))))) + (helm-output-filter--process-source + (car process-assoc) output-string source + (helm-candidate-number-limit source)))) + (helm-output-filter--post-process))) + +(defun helm-output-filter--process-source (process output-string source limit) + (cl-dolist (candidate (helm-transform-candidates + (helm-output-filter--collect-candidates + (split-string output-string "\n") + (assoc 'incomplete-line source) + source) + source t)) + (when candidate ; filter-one-by-one may return nil candidates. + (if (assq 'multiline source) + (let ((start (point))) + (helm-insert-candidate-separator) + (helm-insert-match candidate 'insert-before-markers source + (1+ (cdr (assoc 'item-count source)))) + (put-text-property start (point) 'helm-multiline t)) + (helm-insert-match candidate 'insert-before-markers source + (1+ (cdr (assoc 'item-count source))))) + (cl-incf (cdr (assoc 'item-count source))) + (when (>= (assoc-default 'item-count source) limit) + (helm-kill-async-process process) + (cl-return))))) + +(defun helm-output-filter--collect-candidates (lines incomplete-line-info source) + "Collect LINES maybe completing the truncated first and last lines." + ;; The output of process may come in chunks of any size, + ;; so the last line of LINES come truncated, this truncated line is + ;; stored in INCOMPLETE-LINE-INFO and will be concated with the first + ;; incomplete line of next chunk arriving. + ;; INCOMPLETE-LINE-INFO is an attribute of source which is created + ;; with an empty string when the source is computed => (incomplete-line . "") + (helm-log "incomplete-line-info = %S" (cdr incomplete-line-info)) + (butlast + (cl-loop for line in lines + ;; On start `incomplete-line-info' value is empty string. + for newline = (helm-aif (cdr incomplete-line-info) + (prog1 + (concat it line) + (setcdr incomplete-line-info nil)) + line) + do (helm--maybe-process-filter-one-by-one-candidate newline source) + collect newline + ;; Store last incomplete line (last chunk truncated) + ;; until new output arrives. + finally do (setcdr incomplete-line-info line)))) + +(defun helm-output-filter--post-process () + (let ((src (helm-get-current-source))) + (helm-log-run-hook 'helm-update-hook) + (helm-aif (get-buffer-window helm-buffer 'visible) + (with-selected-window it + (helm-skip-noncandidate-line 'next) + (helm-mark-current-line) + (helm-display-mode-line src) + (helm-log-run-hook 'helm-after-update-hook))))) + +(defun helm-process-deferred-sentinel-hook (process event file) + "Defer remote processes in sentinels. +Meant to be called at beginning of a sentinel process function." + (when (and (string= event "finished\n") + (or (file-remote-p file) + ;; `helm-suspend-update-flag' + ;; is non--nil here only during a + ;; running process, this will never be called + ;; when user set it explicitely with `C-!'. + helm-suspend-update-flag)) + (setq helm-suspend-update-flag t) + ;; Kill the process but don't delete entry in + ;; `helm-async-processes'. + (helm-kill-async-process process) + ;; When tramp tries to open the same connection twice in a + ;; short time frame (less than 5s) it throw 'suppress which + ;; call the real-handler on the main "Emacs", so we wait + ;; 5s before updating to avoid this [1], but allowing user to + ;; enter input during this delay. + ;; [1] On last Emacs versions, this is fixed and tramp return + ;; nil in this situation. + ;; Note: It is difficult to have a value < to 5 for + ;; `tramp-connection-min-time-diff', because the process die + ;; when calling too quickly same process. + (run-at-time (or (and (boundp 'tramp-connection-min-time-diff) + tramp-connection-min-time-diff) + 5) + nil #'(lambda () + (when helm-alive-p ; Don't run timer fn after quit. + (setq helm-suspend-update-flag nil) + (helm-check-minibuffer-input)))))) + +(defun helm-kill-async-processes () + "Kill all asynchronous processes registered in `helm-async-processes'." + (while helm-async-processes + (helm-kill-async-process (caar helm-async-processes)) + (setq helm-async-processes (cdr helm-async-processes)))) + +(defun helm-kill-async-process (process) + "Stop output from `helm-output-filter' and kill associated PROCESS." + (set-process-filter process nil) + (delete-process process)) + + +;;; Core: action +;; +(defun helm-execute-selection-action () + "Execute current action and kill the action buffer if present." + (helm-log-run-hook 'helm-before-action-hook) + ;; Position can be different when `helm-current-buffer' + ;; is splitted, so jump to this position before executing action. + (helm-current-position 'restore) + (unwind-protect + (helm-execute-selection-action-1) + (helm-aif (get-buffer helm-action-buffer) + (kill-buffer it)) + (helm-log-run-hook 'helm-after-action-hook))) + +(defun helm-execute-selection-action-1 (&optional + selection action + preserve-saved-action) + "Execute ACTION on current SELECTION. +If PRESERVE-SAVED-ACTION is non--nil save action." + (helm-log "executing action") + (setq action (helm-get-default-action + (or action + helm-saved-action + (if (get-buffer helm-action-buffer) + (helm-get-selection helm-action-buffer) + (helm-get-actions-from-current-source))))) + (let ((source (or helm-saved-current-source + (helm-get-current-source))) + non-essential) + (setq selection (or selection + (helm-get-selection) + (and (assoc 'accept-empty source) ""))) + (unless preserve-saved-action (setq helm-saved-action nil)) + (when (and selection action) + (helm-funcall-with-source + source action + (helm-coerce-selection selection source))))) + +(defun helm-coerce-selection (selection source) + "Apply coerce attribute function to SELECTION in SOURCE. +Coerce source with coerce function." + (helm-aif (assoc-default 'coerce source) + (helm-funcall-with-source source it selection) + selection)) + +(defun helm-get-default-action (action) + "Get the first ACTION value of action list in source." + (if (and (listp action) (not (functionp action))) + (cdar action) + action)) + +(defun helm-select-action () + "Select an action for the currently selected candidate. +If action buffer is selected, back to the helm buffer." + (interactive) + (helm-log-run-hook 'helm-select-action-hook) + (setq helm-saved-selection (helm-get-selection)) + (with-selected-frame (with-helm-window (selected-frame)) + (cond ((get-buffer-window helm-action-buffer 'visible) + (set-window-buffer (get-buffer-window helm-action-buffer) + helm-buffer) + (kill-buffer helm-action-buffer) + (helm-display-mode-line (helm-get-current-source)) + (helm-set-pattern helm-input 'noupdate)) + (helm-saved-selection + (setq helm-saved-current-source (helm-get-current-source)) + (let ((actions (helm-get-actions-from-current-source))) + (if (functionp actions) + (message "Sole action: %s" actions) + (helm-show-action-buffer actions) + (helm-delete-minibuffer-contents) + ;; Make `helm-pattern' differs from the previous value. + (setq helm-pattern 'dummy) + (helm-check-minibuffer-input)))) + (t (message "No Actions available"))))) + +(defun helm-show-action-buffer (actions) + (with-current-buffer (get-buffer-create helm-action-buffer) + (erase-buffer) + (buffer-disable-undo) + (set-window-buffer (get-buffer-window helm-buffer) helm-action-buffer) + (set (make-local-variable 'helm-sources) + `(((name . "Actions") + (volatile) + (nomark) + (candidates . ,actions) + (mode-line . ("Action(s)" "TAB:BackToCands RET/f1/f2/fn:NthAct")) + (candidate-transformer + . (lambda (candidates) + (cl-loop for (i . j) in candidates + for count from 1 + collect + (cons (concat (cond ((> count 12) + " ") + ((< count 10) + (format "[f%s] " count)) + (t (format "[f%s] " count))) + (propertize i 'face 'helm-action)) j)))) + (candidate-number-limit)))) + (set (make-local-variable 'helm-source-filter) nil) + (set (make-local-variable 'helm-selection-overlay) nil) + (helm-initialize-overlays helm-action-buffer))) + + +;; Core: selection + +(defun helm-display-source-at-screen-top-maybe (unit) + "Display source at top of screen when UNIT value is 'source. +With any other value of UNIT return nil." + (when (and helm-display-source-at-screen-top (eq unit 'source)) + (set-window-start (selected-window) + (save-excursion (forward-line -1) (point))))) + +(defun helm-skip-noncandidate-line (direction) + "Skip source header or candidates separator when going in DIRECTION. +Possible value of DIRECTION are 'next or 'previous. +Same as `helm-skip-header-and-separator-line' but ensure +point is moved to the right place when at bop or eob." + (helm-skip-header-and-separator-line direction) + (and (bobp) (forward-line 1)) ; Skip first header. + (and (eobp) (forward-line -1))) ; Avoid last empty line. + +(defun helm-skip-header-and-separator-line (direction) + "Skip source header or candidate separator when going to next/previous line. +Possible value of DIRECTION are 'next or 'previous." + (let ((fn (cl-ecase direction + (next 'eobp) + (previous 'bobp)))) + (while (and (not (funcall fn)) + (or (helm-pos-header-line-p) + (helm-pos-candidate-separator-p))) + (forward-line (if (and (eq direction 'previous) + (not (eq (point-at-bol) (point-min)))) + -1 1))))) + +(defun helm-display-mode-line (source &optional force) + "Setup mode-line and header-line for `helm-buffer'." + (set (make-local-variable 'helm-mode-line-string) + (helm-interpret-value (or (and (listp source) ; Check if source is empty. + (assoc-default 'mode-line source)) + (default-value 'helm-mode-line-string)) + source)) + (let ((follow (and (eq (cdr (assq 'follow source)) 1) "(HF) "))) + ;; Setup mode-line. + (if helm-mode-line-string + (setq mode-line-format + `(" " mode-line-buffer-identification " " + (:eval (format "L%d" (helm-candidate-number-at-point))) + " " ,follow + (: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 " -%-") + helm--mode-line-string-real + (substitute-command-keys (if (listp helm-mode-line-string) + (cadr helm-mode-line-string) + helm-mode-line-string))) + (setq mode-line-format (default-value 'mode-line-format))) + ;; Setup header-line. + (let* ((hlstr (helm-interpret-value + (and (listp source) + (assoc-default 'header-line source)) + source)) + (hlend (make-string (max 0 (- (window-width) (length hlstr))) ? ))) + (setq header-line-format + (propertize (concat " " hlstr hlend) 'face 'helm-header)))) + (when force (force-mode-line-update))) + +(defun helm-show-candidate-number (&optional name) + "Used to display candidate number in mode-line. +You can specify NAME of candidates e.g \"Buffers\" otherwise +it is \"Candidate\(s\)\" by default." + (when helm-alive-p + (unless (helm-empty-source-p) + (propertize + (format "[%s %s]" + (helm-get-candidate-number 'in-current-source) + (or name "Candidate(s)")) + 'face 'helm-candidate-number)))) + +(cl-defun helm-move-selection-common (&key where direction) + "Move the selection marker to a new position. +Position is determined by WHERE and DIRECTION. +Key arg WHERE can be one of: + - line + - page + - edge + - source +Key arg DIRECTION can be one of: + - previous + - next + - A source or a source name when used with :WHERE 'source." + (let ((move-func (cl-case where + (line (cl-ecase direction + (previous 'helm-move--previous-line-fn) + (next 'helm-move--next-line-fn))) + (page (cl-ecase direction + (previous 'helm-move--previous-page-fn) + (next 'helm-move--next-page-fn))) + (edge (cl-ecase direction + (previous 'helm-move--beginning-of-buffer-fn) + (next 'helm-move--end-of-buffer-fn))) + (source (cl-case direction + (previous 'helm-move--previous-source-fn) + (next 'helm-move--next-source-fn) + (t (lambda () ; A source is passed as DIRECTION arg. + (helm-move--goto-source-fn direction)))))))) + (unless (or (helm-empty-buffer-p (helm-buffer-get)) + (not (helm-window))) + (with-helm-window + (helm-log-run-hook 'helm-move-selection-before-hook) + (funcall move-func) + (and (memq direction '(next previous)) + (helm-skip-noncandidate-line direction)) + (when (helm-pos-multiline-p) + (helm-move--beginning-of-multiline-candidate)) + (helm-display-source-at-screen-top-maybe where) + (when (helm-get-previous-header-pos) + (helm-mark-current-line)) + (helm-display-mode-line (helm-get-current-source)) + (helm-log-run-hook 'helm-move-selection-after-hook))))) + +(defun helm-move--beginning-of-multiline-candidate () + (let ((header-pos (helm-get-previous-header-pos)) + (separator-pos (helm-get-previous-candidate-separator-pos))) + (when header-pos + (goto-char (if (or (null separator-pos) + (< separator-pos header-pos)) + header-pos + separator-pos)) + (forward-line 1)))) + +(defun helm-move--previous-multi-line-fn () + (forward-line -1) + (unless (helm-pos-header-line-p) + (helm-skip-header-and-separator-line 'previous) + (helm-move--beginning-of-multiline-candidate))) + +(defun helm-move--previous-line-fn () + (if (not (helm-pos-multiline-p)) + (forward-line -1) + (helm-move--previous-multi-line-fn)) + (when (and helm-move-to-line-cycle-in-source + (helm-pos-header-line-p)) + (forward-line 1) + (helm-move--end-of-source) + ;; We are at end of helm-buffer + ;; check if last candidate is a multiline candidate + ;; and jump to it + (when (and (eobp) + (save-excursion (forward-line -1) (helm-pos-multiline-p))) + (helm-move--previous-multi-line-fn)))) + +(defun helm-move--next-multi-line-fn () + (let ((header-pos (helm-get-next-header-pos)) + (separator-pos (helm-get-next-candidate-separator-pos))) + (cond ((and separator-pos + (or (null header-pos) (< separator-pos header-pos))) + (goto-char separator-pos)) + (header-pos + (goto-char header-pos))))) + +(defun helm-move--next-line-fn () + (if (not (helm-pos-multiline-p)) + (forward-line 1) + (helm-move--next-multi-line-fn)) + (when (and helm-move-to-line-cycle-in-source + (or (save-excursion (and (helm-pos-multiline-p) + (goto-char (overlay-end + helm-selection-overlay)) + (helm-end-of-source-p t))) + (helm-end-of-source-p t))) + (helm-move--beginning-of-source))) + +(defun helm-move--previous-page-fn () + (condition-case nil + (scroll-down) + (beginning-of-buffer (goto-char (point-min))))) + +(defun helm-move--next-page-fn () + (condition-case nil + (scroll-up) + (end-of-buffer (goto-char (point-max))))) + +(defun helm-move--beginning-of-buffer-fn () + (goto-char (point-min))) + +(defun helm-move--end-of-buffer-fn () + (goto-char (point-max))) + +(defun helm-move--end-of-source () + (goto-char (or (helm-get-next-header-pos) (point-max))) + (when (helm-pos-header-line-p) (forward-line -2))) + +(defun helm-move--beginning-of-source () + (goto-char (helm-get-previous-header-pos)) + (forward-line 1)) + +(defun helm-move--previous-source-fn () + (forward-line -1) + (if (bobp) + (goto-char (point-max)) + (helm-skip-header-and-separator-line 'previous)) + (goto-char (helm-get-previous-header-pos)) + (forward-line 1)) + +(defun helm-move--next-source-fn () + (goto-char (or (helm-get-next-header-pos) (point-min)))) + +(defun helm-move--goto-source-fn (source-or-name) + (goto-char (point-min)) + (let ((name (if (stringp source-or-name) source-or-name + (assoc-default 'name source-or-name)))) + (condition-case err + (while (not (string= name (helm-current-line-contents))) + (goto-char (helm-get-next-header-pos))) + (error (helm-log "%S" err))))) + +(defun helm-candidate-number-at-point () + (with-helm-buffer + (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. + (let ((helm-move-to-line-cycle-in-source + (and helm-move-to-line-cycle-in-source arg))) + (if (and arg (> arg 1)) + (cl-loop with pos = (helm-candidate-number-at-point) + with cand-num = (helm-get-candidate-number t) + with iter = (min arg (- cand-num pos)) + for count from 1 + while (<= count iter) + do + (helm-move-selection-common :where 'line :direction direction)) + (helm-move-selection-common :where 'line :direction direction)))) + +(defun helm-previous-line (&optional arg) + "Move selection to the ARG previous line(s). +Same behavior than `helm-next-line' when called with a numeric prefix arg." + (interactive "p") + (helm--next-or-previous-line 'previous arg)) + +(defun helm-next-line (&optional arg) + "Move selection to the next ARG line(s). +When a numeric prefix arg is given and this numeric arg +is > to the number of candidates, move to last candidate of +current source (i.e don't move to next source if some)." + (interactive "p") + (helm--next-or-previous-line 'next arg)) + +(defun helm-previous-page () + "Move selection back with a pageful." + (interactive) + (helm-move-selection-common :where 'page :direction 'previous)) + +(defun helm-next-page () + "Move selection forward with a pageful." + (interactive) + (helm-move-selection-common :where 'page :direction 'next)) + +(defun helm-beginning-of-buffer () + "Move selection at the top." + (interactive) + (helm-move-selection-common :where 'edge :direction 'previous)) + +(defun helm-end-of-buffer () + "Move selection at the bottom." + (interactive) + (helm-move-selection-common :where 'edge :direction 'next)) + +(defun helm-previous-source () + "Move selection to the previous source." + (interactive) + (helm-move-selection-common :where 'source :direction 'previous)) + +(defun helm-next-source () + "Move selection to the next source." + (interactive) + (helm-move-selection-common :where 'source :direction 'next)) + +(defun helm-goto-source (source-or-name) + "Move the selection to the source SOURCE-OR-NAME." + (helm-move-selection-common :where 'source :direction source-or-name)) + +(defun helm--follow-action (arg) + (let ((helm--temp-follow-flag t)) + (when (or (eq last-command 'helm-follow-action-forward) + (eq last-command 'helm-follow-action-backward) + (eq last-command 'helm-execute-persistent-action)) + (if (> arg 0) + (helm-next-line) + (helm-previous-line))) + (helm-execute-persistent-action))) + +(defun helm-follow-action-forward () + "Go to next line and execute persistent action." + (interactive) + (helm--follow-action 1)) + +(defun helm-follow-action-backward () + "Go to previous line and execute persistent action." + (interactive) + (helm--follow-action -1)) + +(defun helm-mark-current-line (&optional resumep) + "Move `helm-selection-overlay' to current line. +Note that this is not related with visibles marks, which are used +to mark candidates." + (with-helm-window + (when resumep + (goto-char helm-selection-point)) + (move-overlay + helm-selection-overlay (point-at-bol) + (if (helm-pos-multiline-p) + (let ((header-pos (helm-get-next-header-pos)) + (separator-pos (helm-get-next-candidate-separator-pos))) + (or (and (null header-pos) separator-pos) + (and header-pos separator-pos + (< separator-pos header-pos) + separator-pos) + header-pos + (point-max))) + (1+ (point-at-eol)))) + (setq helm-selection-point (overlay-start helm-selection-overlay))) + (helm-follow-execute-persistent-action-maybe)) + +(defun helm-confirm-and-exit-minibuffer () + "Maybe ask for confirmation when exiting helm. +It is similar to `minibuffer-complete-and-exit' adapted to helm. +If `minibuffer-completion-confirm' value is 'confirm, +send in minibuffer confirm message and exit on next hit. +If `minibuffer-completion-confirm' value is t, +don't exit and send message 'no match'." + (interactive) + (if (and (helm--updating-p) + (null helm--reading-passwd-or-string)) + (progn (message "[Display not ready]") + (sit-for 0.5) (message nil)) + (let* ((empty-buffer-p (with-current-buffer helm-buffer + (eq (point-min) (point-max)))) + (unknown (and (not empty-buffer-p) + (string= (get-text-property + 0 'display (helm-get-selection nil 'withprop)) + "[?]")))) + (cond ((and (or empty-buffer-p unknown) + (eq minibuffer-completion-confirm 'confirm)) + (setq helm-minibuffer-confirm-state + 'confirm) + (setq minibuffer-completion-confirm nil) + (minibuffer-message " [confirm]")) + ((and (or empty-buffer-p unknown) + (eq minibuffer-completion-confirm t)) + (minibuffer-message " [No match]")) + (t + (setq helm-minibuffer-confirm-state nil) + (helm-exit-minibuffer)))))) +(add-hook 'helm-after-update-hook 'helm-confirm-and-exit-hook) + +(defun helm-confirm-and-exit-hook () + "Restore `minibuffer-completion-confirm' when helm update." + (unless (or (eq minibuffer-completion-confirm t) + (not helm-minibuffer-confirm-state)) + (setq minibuffer-completion-confirm + helm-minibuffer-confirm-state))) + +(defun helm-read-string (prompt &optional initial-input history + default-value inherit-input-method) + "Same as `read-string' but for reading string from a helm session." + (let ((helm--reading-passwd-or-string t)) + (read-string + prompt initial-input history default-value inherit-input-method))) + +(defun helm--updating-p () + ;; helm timer is between two cycles. + ;; IOW `helm-check-minibuffer-input' haven't yet compared input + ;; and `helm-pattern'. + (or (not (equal (minibuffer-contents) helm-pattern)) + ;; `helm-check-minibuffer-input' have launched `helm-update'. + helm--in-update)) + +(defun helm-maybe-exit-minibuffer () + (interactive) + (if (and (helm--updating-p) + (null helm--reading-passwd-or-string)) + (progn (message "[Display not ready]") + (sit-for 0.5) (message nil)) + (helm-exit-minibuffer))) + +(defun helm-exit-minibuffer () + "Select the current candidate by exiting the minibuffer." + (unless helm-current-prefix-arg + (setq helm-current-prefix-arg current-prefix-arg)) + (setq helm-exit-status 0) + (helm-log-run-hook 'helm-exit-minibuffer-hook) + (exit-minibuffer)) + +(defun helm-keyboard-quit () + "Quit minibuffer in helm. +If action buffer is displayed, kill it." + (interactive) + (when (get-buffer-window helm-action-buffer 'visible) + (kill-buffer helm-action-buffer)) + (setq helm-exit-status 1) + (abort-recursive-edit)) + +(defun helm-get-next-header-pos () + "Return the position of the next header from point." + (next-single-property-change (point) 'helm-header)) + +(defun helm-get-previous-header-pos () + "Return the position of the previous header from point." + (previous-single-property-change (point) 'helm-header)) + +(defun helm-pos-multiline-p () + "Return non-nil if the current position is in the multiline source region." + (get-text-property (point) 'helm-multiline)) + +(defun helm-get-next-candidate-separator-pos () + "Return the position of the next candidate separator from point." + (let ((hp (helm-get-next-header-pos))) + (helm-aif (next-single-property-change (point) 'helm-candidate-separator) + (or + ;; Be sure we don't catch + ;; the separator of next source. + (and hp (< it hp) it) + ;; The separator found is in next source + ;; we are at last cand, so use the header pos. + (and hp (< hp it) hp) + ;; A single source, just try next separator. + it)))) + +(defun helm-get-previous-candidate-separator-pos () + "Return the position of the previous candidate separator from point." + (previous-single-property-change (point) 'helm-candidate-separator)) + +(defun helm-pos-header-line-p () + "Return t if the current line is a header line." + (or (get-text-property (point-at-bol) 'helm-header) + (get-text-property (point-at-bol) 'helm-header-separator))) + +(defun helm-pos-candidate-separator-p () + "Return t if the current line is a candidate separator." + (get-text-property (point-at-bol) 'helm-candidate-separator)) + + +;;; Debugging +;; +;; +(defun helm-debug-output () + "Show all helm-related variables at this time." + (interactive) + (helm-help-internal " *Helm Debug*" 'helm-debug-output-function)) + +(defun helm-debug-output-function (&optional vars) + (message "Calculating all helm-related values...") + (insert "If you debug some variables or forms, set `helm-debug-variables' +to a list of forms.\n\n") + (cl-dolist (v (or vars + helm-debug-variables + (apropos-internal "^helm-" 'boundp))) + (insert "** " + (pp-to-string v) "\n" + (pp-to-string (with-current-buffer helm-buffer (eval v))) "\n")) + (message "Calculating all helm-related values...Done")) + + +;; Core: misc +(defun helm-kill-buffer-hook () + "Remove tick entry from `helm-tick-hash' when killing a buffer." + (cl-loop for key being the hash-keys in helm-tick-hash + if (string-match (format "^%s/" (regexp-quote (buffer-name))) key) + do (remhash key helm-tick-hash))) +(add-hook 'kill-buffer-hook 'helm-kill-buffer-hook) + +(defun helm-preselect (candidate-or-regexp &optional source) + "Move `helm-selection-overlay' to CANDIDATE-OR-REGEXP on startup." + (with-helm-window + (when candidate-or-regexp + (if helm-force-updating-p + (and source (helm-goto-source source)) + (goto-char (point-min)) + (forward-line 1)) + (let ((start (point))) + (or (re-search-forward candidate-or-regexp nil t) + (goto-char start)))) + (forward-line 0) ; Avoid scrolling right on long lines. + (when (helm-pos-multiline-p) + (helm-move--beginning-of-multiline-candidate)) + (helm-mark-current-line))) + +(defun helm-delete-current-selection () + "Delete the currently selected item." + (interactive) + (with-helm-window + (cond ((helm-pos-multiline-p) + (helm-aif (helm-get-next-candidate-separator-pos) + (delete-region (point-at-bol) + (1+ (progn (goto-char it) (point-at-eol)))) + ;; last candidate + (goto-char (helm-get-previous-candidate-separator-pos)) + (delete-region (point-at-bol) (point-max))) + (when (helm-end-of-source-p) + (goto-char (or (helm-get-previous-candidate-separator-pos) + (point-min))) + (forward-line 1))) + (t + (delete-region (point-at-bol) (1+ (point-at-eol))) + (when (helm-end-of-source-p t) + (let ((headp (save-excursion + (forward-line -1) + (not (helm-pos-header-line-p))))) + (and headp (forward-line -1)))))) + (unless (helm-end-of-source-p t) + (helm-mark-current-line)))) + +(defun helm-end-of-source-p (&optional at-point) + "Return non--nil if we are at eob or end of source." + (save-excursion + (if (and (helm-pos-multiline-p) (null at-point)) + (null (helm-get-next-candidate-separator-pos)) + (forward-line (if at-point 0 1)) + (or (eq (point-at-bol) (point-at-eol)) + (helm-pos-header-line-p) + (eobp))))) + +(defun helm-edit-current-selection-internal (func) + (with-helm-window + (forward-line 0) + (let ((realvalue (get-text-property (point) 'helm-realvalue)) + (multiline (get-text-property (point) 'helm-multiline))) + (funcall func) + (forward-line 0) + (and realvalue + (put-text-property (point) (point-at-eol) + 'helm-realvalue realvalue)) + (and multiline + (put-text-property (point) (point-at-eol) + 'helm-multiline multiline)) + (helm-mark-current-line)))) + +(defmacro helm-edit-current-selection (&rest forms) + "Evaluate FORMS at current selection in the helm buffer. +Used generally to modify current selection." + (declare (indent 0) (debug t)) + `(helm-edit-current-selection-internal + (lambda () ,@forms))) + +(defun helm-set-pattern (pattern &optional noupdate) + "Set minibuffer contents to PATTERN. +if optional NOUPDATE is non-nil, helm buffer is not changed." + (with-selected-window (or (active-minibuffer-window) (minibuffer-window)) + (delete-minibuffer-contents) + (insert pattern)) + (when noupdate + (setq helm-pattern pattern))) + +(defun helm-minibuffer-completion-contents () + "Return the user input in a minibuffer before point as a string. +That is what completion commands operate on." + (buffer-substring (field-beginning) (point))) + +(defun helm-delete-minibuffer-contents (&optional arg) + "Delete minibuffer contents. +When called with a prefix arg or when +`helm-delete-minibuffer-contents-from-point' is non--nil, +delete minibuffer contents from point instead of deleting all." + (interactive "P") + (require 'helm-utils) + (let* ((input (minibuffer-contents)) + (str (if (or arg helm-delete-minibuffer-contents-from-point) + (helm-minibuffer-completion-contents) ""))) + (helm-reset-yank-point) + (if (> (length input) 0) + ;; minibuffer is not empty, delete contents and update. + (helm-set-pattern str) + ;; minibuffer is already empty, force update. + (helm-force-update)))) + + +;;; Plugins +;; +;; Built-in plug-in: type +(defun helm-compile-source--type (source) + (helm-aif (assoc-default 'type source) + (append source (assoc-default it helm-type-attributes) nil) + source)) + +;; `define-helm-type-attribute' is public API. + +(defun helm-add-type-attribute (type definition) + (helm-aif (assq type helm-type-attributes) + (setq helm-type-attributes (delete it helm-type-attributes))) + (push (cons type definition) helm-type-attributes)) + +(defun helm-document-type-attribute (type doc) + (add-to-list 'helm-types type t) + (put type 'helm-typeattrdoc + (concat "- " (symbol-name type) "\n\n" doc "\n"))) + +;; Built-in plug-in: dummy +(defun helm-dummy-candidate (_candidate _source) + "Use `helm-pattern' as CANDIDATE in SOURCE." + ;; `source' is defined in filtered-candidate-transformer + (list helm-pattern)) + +(defun helm-compile-source--dummy (source) + (if (assoc 'dummy source) + (progn + (unless (helm-attr-defined + 'filtered-candidate-transformer source) + (helm-attrset 'filtered-candidate-transformer + 'helm-dummy-candidate source)) + (append source + '((candidates "dummy") + (accept-empty) + (match identity) + (volatile)))) + source)) + +;; Built-in plug-in: candidates-in-buffer +(defun helm-candidates-in-buffer (source) + "Get candidates from the candidates buffer according to `helm-pattern'. + +BUFFER is `helm-candidate-buffer' by default. Each +candidate must be placed in one line. This function is meant to +be used in candidates-in-buffer or candidates attribute of an +helm source. Especially fast for many (1000+) candidates. + +eg. + '((name . \"many files\") + (init . (lambda () (with-current-buffer (helm-candidate-buffer 'local) + (insert-many-filenames)))) + (search re-search-forward) ; optional + (candidates-in-buffer) + (type . file)) + ++===============================================================+ +| The new way of making and narrowing candidates: Using buffers | ++===============================================================+ + +By default, `helm' makes candidates by evaluating the +candidates function, then narrows them by `string-match' for each +candidate. + +But this way is very slow for many candidates. The new way is +storing all candidates in a buffer and narrowing them by +`re-search-forward'. Search function is customizable by search +attribute. The important point is that buffer processing is MUCH +FASTER than string list processing and is the Emacs way. + +The init function writes all candidates to a newly-created +candidate buffer. The candidates buffer is created or specified +by `helm-candidate-buffer'. Candidates are stored in a line. + +The candidates function narrows all candidates, IOW creates a +subset of candidates dynamically. It is the task of +`helm-candidates-in-buffer'. As long as +`helm-candidate-buffer' is used,`(candidates-in-buffer)' is +sufficient in most cases. + +Note that `(candidates-in-buffer)' is shortcut of three attributes: + (candidates . helm-candidates-in-buffer) + (volatile) + (match identity) +And `(candidates-in-buffer . func)' is shortcut of three attributes: + (candidates . func) + (volatile) + (match identity) +The expansion is performed in `helm-get-sources'. + +The candidates-in-buffer attribute implies the volatile attribute. +The volatile attribute is needed because `helm-candidates-in-buffer' +creates candidates dynamically and need to be called everytime +`helm-pattern' changes. + +Because `helm-candidates-in-buffer' plays the role of `match' attribute +function, specifying `(match identity)' makes the source slightly faster. + +However if source contain match-part attribute, match is computed only +on part of candidate returned by the call of function provided by this attribute. +The function should have one arg, candidate, and return only +a specific part of candidate. + +To customize `helm-candidates-in-buffer' behavior, use `search', +`get-line', `match-part' and `search-from-end' attributes." + + (helm-candidates-in-buffer-1 + (helm-candidate-buffer) + helm-pattern + (or (assoc-default 'get-line source) + #'buffer-substring-no-properties) + ;; use external variable `source'. + (or (assoc-default 'search source) + (if (assoc 'search-from-end source) + '(helm-candidates-in-buffer-search-from-end) + '(helm-candidates-in-buffer-search-from-start))) + (helm-candidate-number-limit source) + (assoc 'search-from-end source) + (helm-attr 'match-part) + source)) + +(defun helm-candidates-in-buffer-search-from-start (pattern) + "Search PATTERN with `re-search-forward' with bound and noerror args." + (re-search-forward pattern nil t)) + +(defun helm-candidates-in-buffer-search-from-end (pattern) + "Search PATTERN with `re-search-backward' with bound and noerror args." + (re-search-backward pattern nil t)) + +(defun helm-candidates-in-buffer-1 (buffer pattern get-line-fn + search-fns limit search-from-end + match-part-fn source) + "Return the list of candidates inserted in BUFFER matching PATTERN." + ;; buffer == nil when candidates buffer does not exist. + (when buffer + (with-current-buffer buffer + (let ((start-point (if search-from-end + (1+ (point-max)) (1- (point-min)))) + (endp (if search-from-end #'bobp #'eobp)) + (inhibit-point-motion-hooks t)) + (goto-char start-point) + (if (string= pattern "") + (helm-initial-candidates-from-candidate-buffer + endp get-line-fn limit search-from-end) + (helm-search-from-candidate-buffer + pattern get-line-fn search-fns limit search-from-end + start-point match-part-fn source)))))) + +(defun helm-point-is-moved (proc) + "If point is moved after executing PROC, return t, otherwise nil." + (/= (point) (save-excursion (funcall proc) (point)))) + +(defun helm-search-from-candidate-buffer (pattern get-line-fn search-fns + limit search-from-end + start-point match-part-fn source) + (let (buffer-read-only + matches + newmatches + (case-fold-search (helm-set-case-fold-search))) + (helm-search-from-candidate-buffer-internal + (lambda () + (clrhash helm-cib-hash) + (cl-dolist (searcher search-fns) + (goto-char start-point) + (setq newmatches nil) + (cl-loop with item-count = 0 + while (funcall searcher pattern) + for cand = (funcall get-line-fn (point-at-bol) (point-at-eol)) + when (and (not (gethash cand helm-cib-hash)) + (or + ;; Always collect when cand is matched by searcher funcs + ;; and match-part attr is not present. + (not match-part-fn) + ;; If match-part attr is present, collect only if PATTERN + ;; match the part of CAND specified by the match-part func. + (helm-search-match-part cand pattern match-part-fn))) + do (helm--accumulate-candidates + cand newmatches helm-cib-hash item-count limit source) + unless (helm-point-is-moved + (lambda () + (if search-from-end + (goto-char (1- (point-at-bol))) + (forward-line 1)))) + return nil) + (setq matches (append matches (nreverse newmatches)))) + (delq nil matches))))) + +(defun helm-search-match-part (candidate pattern match-part-fn) + "Match PATTERN only on part of CANDIDATE returned by MATCH-PART-FN." + (let ((part (funcall match-part-fn candidate))) + (if (string-match " " pattern) + (cl-loop for i in (split-string pattern " " t) + always (string-match i part)) + (string-match pattern part)))) + +(defun helm-initial-candidates-from-candidate-buffer (endp + get-line-fn + limit search-from-end) + (delq nil (cl-loop with next-line-fn = + (if search-from-end + (lambda (_x) (goto-char (max (1- (point-at-bol)) 1))) + #'forward-line) + until (funcall endp) + for i from 1 to limit + collect (funcall get-line-fn (point-at-bol) (point-at-eol)) + do (funcall next-line-fn 1)))) + +(defun helm-search-from-candidate-buffer-internal (search-fn) + (goto-char (point-min)) + (insert "\n") + (goto-char (point-max)) + (insert "\n") + (unwind-protect + (funcall search-fn) + (goto-char (point-min)) + (delete-char 1) + (goto-char (1- (point-max))) + (delete-char 1) + (set-buffer-modified-p nil))) + +(defun helm-candidate-buffer (&optional create-or-buffer) + "Register and return a buffer containing candidates of current source. +`helm-candidate-buffer' searches buffer-local candidates buffer first, +then global candidates buffer. + +Acceptable values of CREATE-OR-BUFFER: + +- nil (omit) + Only return the candidates buffer. +- a buffer + Register a buffer as a candidates buffer. +- 'global + Create a new global candidates buffer, + named \" *helm candidates:SOURCE*\". +- other non-nil value + Create a new local candidates buffer, + named \" *helm candidates:SOURCE*HELM-CURRENT-BUFFER\"." + (let* ((global-bname (format " *helm candidates:%s*" + helm-source-name)) + (local-bname (format " *helm candidates:%s*%s" + helm-source-name + (buffer-name helm-current-buffer))) + (register-func #'(lambda () + (setq helm-candidate-buffer-alist + (cons (cons helm-source-name create-or-buffer) + (delete (assoc helm-source-name + helm-candidate-buffer-alist) + helm-candidate-buffer-alist))))) + (kill-buffers-func #'(lambda () + (cl-loop for b in (buffer-list) + if (string-match (format "^%s" (regexp-quote global-bname)) + (buffer-name b)) + do (kill-buffer b)))) + (create-func #'(lambda () + (with-current-buffer + (get-buffer-create (if (eq create-or-buffer 'global) + global-bname + local-bname)) + (buffer-disable-undo) + (erase-buffer) + (font-lock-mode -1)))) + (return-func #'(lambda () + (or (get-buffer local-bname) + (get-buffer global-bname) + (helm-aif (assoc-default helm-source-name + helm-candidate-buffer-alist) + (and (buffer-live-p it) it)))))) + (when create-or-buffer + (funcall register-func) + (unless (bufferp create-or-buffer) + (and (eq create-or-buffer 'global) (funcall kill-buffers-func)) + (funcall create-func))) + (funcall return-func))) + +(defun helm-init-candidates-in-buffer (buffer data) + "Register BUFFER with DATA for a helm candidates-in-buffer session. +Arg BUFFER can be a string, a buffer object (bufferp), or a symbol, +either 'local or 'global which is passed to `helm-candidate-buffer'. +Arg DATA can be either a list or a plain string." + (declare (indent 1)) + (let ((buf (helm-candidate-buffer + (if (or (stringp buffer) + (bufferp buffer)) + (get-buffer-create buffer) + buffer)))) ; a symbol. + (with-current-buffer buf + (erase-buffer) + (if (listp data) + (cl-loop for i in data do (insert (concat i "\n"))) + (and (stringp data) (insert data))))) + buffer) + +(defun helm-compile-source--candidates-in-buffer (source) + (helm-aif (assoc 'candidates-in-buffer source) + (append source + `((candidates . ,(or (cdr it) + (lambda () + (helm-candidates-in-buffer source)))) + (volatile) (match identity))) + source)) + + +;;; Resplit helm window +;; +;; +(defun helm-toggle-resplit-window () + "Toggle resplit helm window, vertically or horizontally." + (interactive) + (when helm-prevent-escaping-from-minibuffer + (helm-prevent-switching-other-window :enabled nil)) + (unwind-protect + (with-helm-window + (if (or helm-full-frame (one-window-p t)) + (message "Error: Attempt to resplit a single window") + (let ((before-height (window-height))) + (delete-window) + (set-window-buffer + (select-window + (if (= (window-height) before-height) ; initial split was horizontal. + ;; Split window vertically with `helm-buffer' placed + ;; on the good side according to actual value of + ;; `helm-split-window-default-side'. + (prog1 + (cond ((or (eq helm-split-window-default-side 'above) + (eq helm-split-window-default-side 'left)) + (split-window + (selected-window) nil 'above)) + (t (split-window-vertically))) + (setq helm-split-window-state 'vertical)) + ;; Split window vertically, same comment as above. + (setq helm-split-window-state 'horizontal) + (cond ((or (eq helm-split-window-default-side 'left) + (eq helm-split-window-default-side 'above)) + (split-window (selected-window) nil 'left)) + (t (split-window-horizontally))))) + helm-buffer))) + (setq helm--window-side-state (helm--get-window-side-state))) + (when helm-prevent-escaping-from-minibuffer + (helm-prevent-switching-other-window :enabled nil)))) + +;; Utility: Resize helm window. +(defun helm-enlarge-window-1 (n) + "Enlarge or narrow helm window. +If N is positive enlarge, if negative narrow." + (unless helm-full-frame + (let ((horizontal-p (eq helm-split-window-state 'horizontal))) + (with-helm-window + (enlarge-window n horizontal-p))))) + +(defun helm-narrow-window () + "Narrow helm window." + (interactive) + (helm-enlarge-window-1 -1)) + +(defun helm-enlarge-window () + "Enlarge helm window." + (interactive) + (helm-enlarge-window-1 1)) + +(defun helm-swap-windows () + "Swap window holding `helm-buffer' with other window." + (interactive) + (if (and helm-full-frame (one-window-p t)) + (error "Error: Can't swap windows in a single window") + (let* ((w1 (helm-window)) + (split-state (eq helm-split-window-state 'horizontal)) + (w1size (window-total-size w1 split-state)) + (b1 (window-buffer w1)) ; helm-buffer + (s1 (window-start w1)) + (cur-frame (window-frame w1)) + (w2 (with-selected-window (helm-window) + ;; Don't try to display helm-buffer + ;; in a dedicated window. + (get-window-with-predicate + (lambda (w) (not (window-dedicated-p w))) + 1 cur-frame))) + (w2size (window-total-size w2 split-state)) + (b2 (window-buffer w2)) ; probably helm-current-buffer + (s2 (window-start w2)) + resize) + (with-selected-frame (window-frame w1) + (helm-replace-buffer-in-window w1 b1 b2) + (helm-replace-buffer-in-window w2 b2 b1) + (setq resize + (cond ( ;; helm-window is smaller than other window. + (< w1size w2size) + (- (- (max w2size w1size) + (min w2size w1size)))) + ( ;; helm-window is larger than other window. + (> w1size w2size) + (- (max w2size w1size) + (min w2size w1size))) + ( ;; windows have probably same size. + t nil))) + ;; Maybe resize the window holding helm-buffer. + (and resize (window-resize w2 resize split-state)) + (set-window-start w1 s2 t) + (set-window-start w2 s1 t)) + (setq helm--window-side-state (helm--get-window-side-state))))) + +(defun helm--get-window-side-state () + "Return the position of `helm-window' from `helm-current-buffer'. +Possible values are 'left 'right 'below or 'above." + (let ((side-list '(left right below above))) + (cl-loop for side in side-list + thereis (and (equal (helm-window) + (window-in-direction + side (get-buffer-window helm-current-buffer t) + t)) + side)))) + +(defun helm-replace-buffer-in-window (window buffer1 buffer2) + "Replace BUFFER1 by BUFFER2 in WINDOW registering BUFFER1." + (when (get-buffer-window buffer1) + (unrecord-window-buffer window buffer1) + (set-window-buffer window buffer2))) + +;; Utility: select another action by key +(defun helm-select-nth-action (n) + "Select the N nth action for the currently selected candidate." + (setq helm-saved-selection (helm-get-selection)) + (unless helm-saved-selection + (error "Nothing is selected")) + (setq helm-saved-action + (helm-get-nth-action + n + (if (get-buffer-window helm-action-buffer 'visible) + (assoc-default 'candidates (helm-get-current-source)) + (helm-get-actions-from-current-source)))) + (helm-maybe-exit-minibuffer)) + +(defun helm-get-nth-action (n action) + (cond ((and (zerop n) (functionp action)) + action) + ((listp action) + (or (cdr (elt action n)) + (error "No such action"))) + ((and (functionp action) (< 0 n)) + (error "Sole action")) + (t + (error "Error in `helm-select-nth-action'")))) + +;; Utility: Persistent Action +(defmacro with-helm-display-same-window (&rest body) + "Execute BODY in the window used for persistent action. +Make `pop-to-buffer' and `display-buffer' display in the same window." + (declare (indent 0) (debug t)) + `(let ((display-buffer-function 'helm-persistent-action-display-buffer)) + ,@body)) + +(defun helm-initialize-persistent-action () + (set (make-local-variable 'helm-persistent-action-display-window) nil)) + +(cl-defun helm-execute-persistent-action + (&optional (attr 'persistent-action) split-onewindow) + "Perform the associated action ATTR without quitting helm. +ATTR default is 'persistent-action', but it can be anything else. +In this case you have to add this new attribute to your source. + +When `helm-full-frame' or SPLIT-ONEWINDOW are non--nil, +and `helm-buffer' is displayed in only one window, +the helm window is splitted to display +`helm-select-persistent-action-window' in other window +and keep its visibility." + (interactive) + (helm-log "executing persistent-action") + (let* ((attr-val (assoc-default attr (helm-get-current-source))) + ;; If attr value is a cons, use its car as persistent function + ;; and its car to decide if helm window should be splitted. + (fn (if (and (consp attr-val) + ;; maybe a lambda. + (not (functionp attr-val))) + (car attr-val) attr-val)) + (no-split (and (consp attr-val) + (not (functionp attr-val)) + (cdr attr-val)))) + (with-helm-window + (save-selected-window + (if no-split + (helm-select-persistent-action-window) + (helm-select-persistent-action-window + (or split-onewindow helm-onewindow-p))) + (helm-log "current-buffer = %S" (current-buffer)) + (let ((helm-in-persistent-action t)) + (with-helm-display-same-window + (helm-execute-selection-action-1 + nil (or fn (helm-get-actions-from-current-source)) t) + (helm-log-run-hook 'helm-after-persistent-action-hook)) + ;; A typical case is when a persistent action delete + ;; the buffer already displayed in + ;; `helm-persistent-action-display-window' and `helm-full-frame' + ;; is enabled, we end up with the `helm-buffer' + ;; displayed in two windows. + (when (and helm-onewindow-p + (> (length (window-list)) 1) + (equal (buffer-name + (window-buffer + helm-persistent-action-display-window)) + (helm-buffer-get))) + (delete-other-windows))))))) + +(defun helm-persistent-action-display-window (&optional split-onewindow) + "Return the window that will be used for persistent action. +If SPLIT-ONEWINDOW is non--nil window will be splitted in persistent action." + (with-helm-window + (setq helm-persistent-action-display-window + (cond ((and (window-live-p helm-persistent-action-display-window) + (not (member helm-persistent-action-display-window + (get-buffer-window-list helm-buffer)))) + helm-persistent-action-display-window) + (split-onewindow (split-window)) + ((get-buffer-window helm-current-buffer)) + (t (next-window (selected-window) 1)))))) + +(defun helm-select-persistent-action-window (&optional split-onewindow) + "Select the window that will be used for persistent action. +See `helm-persistent-action-display-window' for how to use SPLIT-ONEWINDOW." + (select-window (get-buffer-window (helm-buffer-get))) + (select-window + (setq minibuffer-scroll-window + (helm-persistent-action-display-window split-onewindow)))) + +(defun helm-persistent-action-display-buffer (buf &optional action) + "Make `pop-to-buffer' and `display-buffer' display in the same window. +If `helm-persistent-action-use-special-display' is non-nil and +BUF is to be displayed by `special-display-function', use it. +Otherwise ignores `special-display-buffer-names' and `special-display-regexps'. +Argument ACTION if present will be used as second argument of `display-buffer'." + (let* ((name (buffer-name buf)) + display-buffer-function pop-up-windows pop-up-frames + ;; Disable `special-display-regexps' and `special-display-buffer-names' + ;; unless `helm-persistent-action-use-special-display' is non--nil. + (special-display-buffer-names + (and helm-persistent-action-use-special-display + special-display-buffer-names)) + (special-display-regexps + (and helm-persistent-action-use-special-display + special-display-regexps)) + (same-window-regexps + (unless (and helm-persistent-action-use-special-display + (or (member name + (mapcar (lambda (x) (or (car-safe x) x)) + special-display-buffer-names)) + (cl-loop for x in special-display-regexps + thereis (string-match (or (car-safe x) x) + name)))) + '(".")))) + ;; Don't loose minibuffer when displaying persistent window in + ;; another frame. + ;; This happen when the displayed persistent buffer-name is one of + ;; `special-display-buffer-names' or match `special-display-regexps' + ;; and `helm-persistent-action-use-special-display' is enabled. + (with-selected-window (if (or special-display-regexps + special-display-buffer-names) + (minibuffer-window) + (selected-window)) + ;; Be sure window of BUF is not dedicated. + (set-window-dedicated-p (get-buffer-window buf) nil) + (display-buffer buf action)))) + +;; scroll-other-window(-down)? for persistent-action +(defun helm-other-window-base (command &optional scroll-amount) + (setq scroll-amount (unless (eq scroll-amount 'noscroll) + helm-scroll-amount)) + (with-selected-window (helm-persistent-action-display-window) + (funcall command scroll-amount))) + +(defun helm-scroll-other-window () + "Scroll other window (not *Helm* window) upward." + (interactive) + (helm-other-window-base 'scroll-up)) + +(defun helm-scroll-other-window-down () + "Scroll other window (not *Helm* window) downward." + (interactive) + (helm-other-window-base 'scroll-down)) + +(defun helm-recenter-top-bottom-other-window () + "`recenter-top-bottom' in other window (not *Helm* window)." + (interactive) + (helm-other-window-base 'recenter-top-bottom 'noscroll)) + +(defun helm-reposition-window-other-window () + "`helm-reposition-window' in other window (not *Helm* window)." + (interactive) + (helm-other-window-base 'reposition-window 'noscroll)) + + + +;; Utility: Visible Mark + +(defun helm-clear-visible-mark () + (with-current-buffer (helm-buffer-get) + (mapc 'delete-overlay helm-visible-mark-overlays) + (set (make-local-variable 'helm-visible-mark-overlays) nil))) + +(defun helm-this-visible-mark () + (cl-loop for o in helm-visible-mark-overlays + when (equal (point-at-bol) (overlay-start o)) + return o)) + +(defun helm-delete-visible-mark (overlay) + (setq helm-marked-candidates + (remove + (cons (helm-get-current-source) (helm-get-selection)) + helm-marked-candidates)) + (delete-overlay overlay) + (setq helm-visible-mark-overlays + (delq overlay helm-visible-mark-overlays))) + +(defun helm-make-visible-mark () + (let ((o (make-overlay (point-at-bol) + (if (helm-pos-multiline-p) + (or (helm-get-next-candidate-separator-pos) + (point-max)) + (1+ (point-at-eol)))))) + (overlay-put o 'face 'helm-visible-mark) + (overlay-put o 'source (assoc-default 'name (helm-get-current-source))) + (overlay-put o 'string (buffer-substring (overlay-start o) (overlay-end o))) + (overlay-put o 'real (helm-get-selection)) + (add-to-list 'helm-visible-mark-overlays o)) + (push (cons (helm-get-current-source) (helm-get-selection)) + helm-marked-candidates)) + +(defun helm-toggle-visible-mark () + "Toggle helm visible mark at point." + (interactive) + (with-helm-window + (let ((nomark (assq 'nomark (helm-get-current-source)))) + (if nomark + (message "Marking not allowed in this source") + (helm-aif (helm-this-visible-mark) + (helm-delete-visible-mark it) + (helm-make-visible-mark)) + (unless (helm-end-of-source-p) + (helm-next-line)))))) + +(defun helm-mark-all () + "Mark all visible unmarked candidates in current source." + (interactive) + (require 'helm-files) + (with-helm-window + (let ((nomark (assq 'nomark (helm-get-current-source))) + (follow (if helm-follow-mode 1 -1))) + (helm-follow-mode -1) + (unwind-protect + (if nomark + (message "Marking not allowed in this source") + (save-excursion + (goto-char (helm-get-previous-header-pos)) + (helm-next-line) + (let* ((next-head (helm-get-next-header-pos)) + (end (and next-head + (save-excursion + (goto-char next-head) + (forward-line -1) + (point)))) + (maxpoint (or end (point-max)))) + (while (< (point) maxpoint) + (helm-mark-current-line) + (let* ((prefix (get-text-property (point-at-bol) 'display)) + (cand (helm-get-selection)) + (bn (and (helm-file-completion-source-p) + (helm-basename cand))) + (src-name (assoc-default 'name + (helm-get-current-source)))) + (when (and (not (helm-this-visible-mark)) + (not (or (string= prefix "[?]") + (string= prefix "[@]")))) + ;; Don't mark possibles directories ending with . or .. + ;; autosave files/links and non--existent file. + (unless + (and (or (helm-file-completion-source-p) + (string= + src-name "Files from Current Directory")) + (or (string-match + "^[.]?#.*#?$\\|[^#]*[.]\\{1,2\\}$" bn) + ;; We need to test here when not using + ;; a transformer that tag prefix + ;; (i.e on tramp). + (not (file-exists-p cand)))) + (helm-make-visible-mark)))) + (if (helm-pos-multiline-p) + (progn + (goto-char + (or (helm-get-next-candidate-separator-pos) + (point-max))) + (forward-line 1)) + (forward-line 1)) + (end-of-line)))) + (helm-mark-current-line) + (message "%s candidates marked" (length helm-marked-candidates))) + (helm-follow-mode follow) (message nil))))) + +(defun helm-unmark-all () + "Unmark all candidates in all sources of current helm session." + (interactive) + (with-helm-window + (let ((len (length helm-marked-candidates))) + (save-excursion + (helm-clear-visible-mark)) + (setq helm-marked-candidates nil) + (helm-mark-current-line) + (message "%s candidates unmarked" len)))) + +(defun helm-toggle-all-marks () + "Toggle all marks. +Mark all visible candidates of current source or unmark all candidates +visible or invisible in all sources of current helm session" + (interactive) + (let ((marked (helm-marked-candidates))) + (if (and (>= (length marked) 1) + (with-helm-window helm-visible-mark-overlays)) + (helm-unmark-all) + (helm-mark-all)))) + +(defun helm-display-all-visible-marks () + "Show all `helm' visible marks strings. +Only useful for debugging." + (interactive) + (with-helm-window + (let ((overlays (reverse helm-visible-mark-overlays))) + (helm-run-after-quit + (lambda () + (with-output-to-temp-buffer "*helm visible marks*" + (cl-dolist (o overlays) (princ (overlay-get o 'string))))))))) + +(cl-defun helm-marked-candidates (&key with-wildcard) + "Return marked candidates of current source if any. +Otherwise one element list of current selection. +When key WITH-WILDCARD is specified try to expand a wilcard if some." + (with-current-buffer helm-buffer + (cl-loop with current-src = (helm-get-current-source) + for (source . real) in + (or (reverse helm-marked-candidates) + (list (cons current-src (helm-get-selection)))) + when (equal current-src source) + ;; When real is a normal filename without wildcard + ;; file-expand-wildcards returns a list of one file. + ;; When real is a non--existent file it return nil. + append (let* ((elm (helm-coerce-selection real source)) + (c (and with-wildcard + (condition-case nil + (file-expand-wildcards elm t) + (error nil))))) + (or c (list elm))) + into cands + finally do (prog1 (cl-return cands) + (helm-log "Marked candidates = %S" cands))))) + +(defun helm-current-source-name= (name) + (save-excursion + (goto-char (helm-get-previous-header-pos)) + (equal name (helm-current-line-contents)))) + +(defun helm-revive-visible-mark () + "Restore marked candidates when helm update display." + (with-current-buffer helm-buffer + (cl-dolist (o helm-visible-mark-overlays) + (goto-char (point-min)) + (while (and (search-forward (overlay-get o 'string) nil t) + (helm-current-source-name= (overlay-get o 'source))) + ;; Calculate real value of candidate. + ;; It can be nil if candidate have only a display value. + (let ((real (get-text-property (point-at-bol 0) 'helm-realvalue))) + (if real + ;; Check if real value of current candidate is the same + ;; that the one stored in overlay. + (and (string= (overlay-get o 'real) real) + (move-overlay o (point-at-bol 0) (1+ (point-at-eol 0)))) + (move-overlay o (point-at-bol 0) (1+ (point-at-eol 0))))))))) +(add-hook 'helm-update-hook 'helm-revive-visible-mark) + +(defun helm-next-point-in-list (curpos points &optional prev) + (cond + ;; rule out special cases. + ((null points) curpos) + ((and prev (<= curpos (car points))) + (nth (1- (length points)) points)) + ((< (car (last points)) curpos) + (if prev (car (last points)) (nth 0 points))) + ((and (not prev) (>= curpos (car (last points)))) + (nth 0 points)) + (t + (nth (if prev + (cl-loop for pt in points + for i from 0 + if (<= curpos pt) return (1- i)) + (cl-loop for pt in points + for i from 0 + if (< curpos pt) return i)) + points)))) + +(defun helm-next-visible-mark (&optional prev) + "Move next helm visible mark. +If PREV is non-nil move to precedent." + (interactive) + (with-helm-window + (ignore-errors + (goto-char (helm-next-point-in-list + (point) + (sort (mapcar 'overlay-start helm-visible-mark-overlays) '<) + prev))) + (helm-mark-current-line))) + +(defun helm-prev-visible-mark () + "Move previous helm visible mark." + (interactive) + (helm-next-visible-mark t)) + +;;; Utility: Selection Paste +;; +(defun helm-yank-selection (arg) + "Set minibuffer contents to current display selection. +With a prefix arg set to real value of current selection." + (interactive "P") + (let ((str (helm-get-selection nil (not arg)))) + (kill-new str) + (helm-set-pattern str))) + +(defun helm-kill-selection-and-quit (arg) + "Store display value of current selection to kill ring. +With a prefix arg set to real value of current selection. +Display value is what you see in `helm-buffer' and real value +is what is used to perform actions." + (interactive "P") + (helm-run-after-quit + (lambda (sel) + (kill-new sel) + (message "Killed: %s" sel)) + (helm-get-selection nil (not arg)))) + +(defun helm-copy-to-buffer () + "Copy selection or marked candidates to `helm-current-buffer'." + (interactive) + (with-helm-buffer + (cl-loop for cand in (helm-marked-candidates) + do (with-helm-current-buffer + (insert cand "\n"))))) + + +;;; Follow-mode: Automatical execution of persistent-action +;; +;; +(defun helm-follow-mode (&optional arg) + "Execute persistent action everytime the cursor is moved when enabled. +The mode is enabled for the current source only, you will have to turn it +on again when you go to next source if you want it there also. +This mode can be enabled or disabled interactively at anytime during +helm session or enabled specifically by source by adding the `follow' +attribute to this source. +Even when the attribute `follow' exists in source, it is still possible +to disable/enable this mode interactively. +Note that when you disable it interactively and `follow' attribute exists, +`helm-follow-mode' will be disabled on next helm session even if `follow' +attribute is specified in source. To avoid this set your `follow' attribute +in source in `helm-before-initialize-hook'. + +e.g: + +\(add-hook 'helm-before-initialize-hook + #'(lambda () (helm-attrset 'follow 1 helm-source-buffers-list))) + +This will enable `helm-follow-mode' automatically in `helm-source-buffers-list'." + (interactive "p") + (with-current-buffer helm-buffer + (let* ((src (helm-get-current-source)) + (name (assoc-default 'name src)) + (sym (cl-loop for s in helm-sources + for sname = (and (symbolp s) + (assoc-default + 'name (symbol-value s))) + thereis (and sname (string= sname name) s))) + (fol-attr (assq 'follow src)) + (enabled (or (< arg 0) ; Assume follow is enabled. + (eq (cdr fol-attr) 1)))) + (if (eq (cdr fol-attr) 'never) + (message "helm-follow-mode not allowed in this source") + (helm-attrset 'follow (if enabled -1 1) src) + (setq helm-follow-mode (eq (cdr (assq 'follow src)) 1)) + (message "helm-follow-mode is %s" + (if helm-follow-mode + "enabled" "disabled")) + (helm-display-mode-line src)) + ;; Make follow attr persistent for this session. + (when (and helm-follow-mode-persistent sym) + (set (car `(,sym)) src))))) + +(defvar helm-follow-input-idle-delay nil + "`helm-follow-mode' will execute its persistent action after this delay. +Note that if the `follow-delay' attr is present in source, +it will take precedence on this.") +(defun helm-follow-execute-persistent-action-maybe () + "Execute persistent action in mode `helm-follow-mode'. +This happen after `helm-input-idle-delay' secs." + (let ((src (helm-get-current-source))) + (and (not (get-buffer-window helm-action-buffer 'visible)) + (eq (assoc-default 'follow src) 1) + (sit-for (or (assoc-default 'follow-delay src) + helm-follow-input-idle-delay + (and helm-input-idle-delay + (max helm-input-idle-delay 0.01)))) + (helm-window) + (helm-get-selection) + (save-excursion + (helm-execute-persistent-action))))) + + +(provide 'helm) + +;; Local Variables: +;; byte-compile-warnings: (not cl-functions obsolete) +;; coding: utf-8 +;; indent-tabs-mode: nil +;; End: + +;;; helm.el ends here diff --git a/elpa/helm-20140808.2300/helm.elc b/elpa/helm-20140808.2300/helm.elc new file mode 100644 index 0000000000000000000000000000000000000000..12f102ab2f024d0af0539a3f6db083b3fa17ac18 GIT binary patch literal 167738 zcmd?SiGNhrwdX4Vma+1QZ>H;;bl*6KB3P0`$u*ZmCIkqZguy}BzHY>gN>WKwBUQ;N z2`s;U-T!)je{1c1rYZqW{64SW=Q#oD?6c1v*Ix5l`}gbjZ~xoO%*_1nfB*aB_UQ0v zaM0gPw$GBo-pNh=jH?fNJGVxo7t05uo!&t*8YUaPlVt65KS@@TdizFwxqsN(887dC(my!ree%42a9Gs`wUye+a-&(RS3Uh?^X{u-_2=5pQMy&9Z6PkILo^C-2diuaNJK8b`GisgYBjHt2aBHW^!+s{B`~72Wy{S zPj>rzgJC~;(LYPZRPGOV`g)h_jgFJO)8URbBsmzc%6Gqbc>Bq{M-Mla=hu5X&$GA3 zr^E2=$)I;|#)|Nk?d-EA-m)5GFOQD<<8gm?dH&vBa%cViniY~MY=h0(5viAmo!%@;Z z-sju?^8S31EV3xfX>T-27MFOYSH{;=2nQ}RtESyv}!0Z=VlNl2-!` ztTw&3uXChL_H!6lH3>&&G~_fa?nPiTxXL!;Bc1utkR3KySo+Ppma}&-=#7(w>FaRy zX}#9yCY4Qa%%w~GU4Q4D&C1oyMy*>(o`z-9g4ySXy%+tkh&!XhLk9IMsn?RltG`W_ zlXh!$>6y+$z1vLg_#t?>_Fz4s_g<1MefU!I9fETNOdNo-IShjUUZu@irTs#zlTK_|tsn4u7{UU0Q$VZdlLC=5TXZNh*einNQD_bufNDxjf4i zArjxaZ%#)i{quKVHEck=*=(`{OY@6Irzc^Un<%5jYST6|$h*aaW3P48*?= zTu%ZfTh*>Nlgcc6P~%ViiuTI(MH|#wzp~k=>qVPC9sYDTn|i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^Ry1w&D5V1{|wGc8Sq2${t9w$p)ZucQ`$f+6Yb=!|F5F|at2v$(t@ zeN%U2qRUDUB4(CA9v}l#NRUMR#;-^*Jb4%@ULfhZi^upeVi zaLOfK>Cw}ptSGDu@8KrH<)KRa7?=}6dCZh*?li_QNDS%@Fe+*nmBFOjgOdmKVYs)$ z8%StoVma<3SiCp1R;kg)OyKOZi${CRtqMjQFa2MBQ>IWUz!((+{H>@Uh)I=1OKAA` zZFTvLTaLyDH8gI>I0p&$S;%*!d7QEcaC?)~F%SetIW0Z~Cfhq0cA2V+2s}AkG`l(3 zb1c9%-95(M#))Mf_j$*S_!iKs`<>yZl8q1>;Q-J_4EckDDr-;;$(rqZp_t*op*&j{ zM=Kt-4m73er-#hf1iWvd%wBd(*cBdaEcJ`5J}lS+tPWI@A!MYZ#eJ(INiqihR)J{| zaa@@LlGWKfVq_ogOSptTD6koOxM~6=@`BjD_*i##;W*ma*@AOK3#jN+3zJF+9%Eswpa?h(TQ0AV6c7-6dtlw!pcR? zM(2E9E|#!pxfn}!5BPyck#;Vrr77Sd3#0hQ;fF|6iqrcc(-Pwuec}XuNv7W3pj(%J zl~0%1%b+oV_Oo_`Y@Y*LmV;q){`Xkz+3^k!47(e?54CUNEu&dS6Cef6(Onme*hBzRN6YK|=ByA(oq)Ngj_UmWLgf?wEVaZYw z+wa-WDOWGcyTM=(m1PM_+jdGz0s9lQ7@o*|vO)fA?SW~_QG+$G#Q=+A4KRajG9PF2 zB8PmGjeCg7*%m4Sf%Mf&=TpK+nQW1JCQ_+8OdC} - http://antonj.se +;; Created: Dec 15 23:42:04 2010 +;; Version: 20131207.835 +;; X-Original-Version: 0.6.0 +;; URL: https://github.com/antonj/Highlight-Indentation-for-Emacs +;; +;; 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 2 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. +;; +;;; Commentary: +;; Customize `highlight-indentation-face', and +;; `highlight-indentation-current-column-face' to suit your theme. + +;;; Code: + +(defgroup highlight-indentation nil + "Highlight Indentation" + :prefix "highlight-indentation-" + :group 'basic-faces) + +(defface highlight-indentation-face + ;; Fringe has non intrusive color in most color-themes + '((t :inherit fringe)) + "Basic face for highlighting indentation guides." + :group 'highlight-indentation) + +(defcustom highlight-indentation-offset 4 + "Default indentation offset, used if no other can be found from + major mode. This value is always used by + `highlight-indentation-mode' if set buffer local. Set buffer + local with `highlight-indentation-set-offset'" + :group 'highlight-indentation) + +(defvar highlight-indentation-current-regex nil) + +;;;###autoload +(define-minor-mode highlight-indentation-mode + "Highlight indentation minor mode highlights indentation based +on spaces" + :lighter " ||" + (when highlight-indentation-current-regex ;; OFF + (font-lock-remove-keywords nil `((,highlight-indentation-current-regex + (1 'highlight-indentation-face))))) + + (set (make-local-variable 'highlight-indentation-current-regex) nil) + + (when highlight-indentation-mode ;; ON + (when (not (local-variable-p 'highlight-indentation-offset)) + (set (make-local-variable 'highlight-indentation-offset) + ;; Set indentation offset from highlight-indentation-offset if set, otherwise + ;; according to major mode + (cond ((and (eq major-mode 'python-mode) (boundp 'python-indent)) + python-indent) + ((and (eq major-mode 'python-mode) (boundp 'py-indent-offset)) + py-indent-offset) + ((and (eq major-mode 'python-mode) (boundp 'python-indent-offset)) + python-indent-offset) + ((eq major-mode 'ruby-mode) + ruby-indent-level) + ((and (eq major-mode 'scala-mode) (boundp 'scala-indent:step)) + scala-indent:step) + ((and (eq major-mode 'scala-mode) (boundp 'scala-mode-indent:step)) + scala-mode-indent:step) + ((or (eq major-mode 'scss-mode) (eq major-mode 'css-mode)) + css-indent-offset) + ((eq major-mode 'nxml-mode) + nxml-child-indent) + ((eq major-mode 'coffee-mode) + coffee-tab-width) + ((eq major-mode 'js-mode) + js-indent-level) + ((eq major-mode 'js2-mode) + js2-basic-offset) + ((local-variable-p 'c-basic-offset) + c-basic-offset) + (t + (default-value 'highlight-indentation-offset))))) + (set (make-local-variable 'highlight-indentation-current-regex) + (format "\\( \\) \\{%s\\}" (- highlight-indentation-offset 1))) + (font-lock-add-keywords nil `((,highlight-indentation-current-regex + (1 'highlight-indentation-face))))) + (font-lock-fontify-buffer)) + +;;;###autoload +(defun highlight-indentation-set-offset (offset) + "Set indentation offset localy in buffer, will prevent +highlight-indentation from trying to guess indentation offset +from major mode" + (interactive + (if (and current-prefix-arg (not (consp current-prefix-arg))) + (list (prefix-numeric-value current-prefix-arg)) + (list (read-number "Indentation offset: ")))) + (set (make-local-variable 'highlight-indentation-offset) offset) + (when highlight-indentation-mode + (highlight-indentation-mode))) + + +;;; +;;; Copyright (C) Kresten Krab Thorup +;;; Available under Apache License, Version 2. +;;; +;;; This minor mode will highlight the indentation of the current line +;;; as a vertical bar (grey background color) aligned with the column of the +;;; first character of the current line. +;;; +(defface highlight-indentation-current-column-face + ;; Fringe has non intrusive color in most color-themes + '((t :inherit fringe)) + "Basic face for highlighting indentation guides." + :group 'highlight-indentation) + +;; used to hold the last regex we installed +(defvar highlight-indentation-current-column-regex nil) + +;;;###autoload +(define-minor-mode + highlight-indentation-current-column-mode + "Hilight Indentation minor mode displays +a vertical bar corresponding to the indentation of the current line" + :lighter " |" + + (when highlight-indentation-current-column-regex + (font-lock-remove-keywords nil highlight-indentation-current-column-regex)) + + (set (make-local-variable 'highlight-indentation-current-column-regex) nil) + (cond (highlight-indentation-current-column-mode + (add-hook 'post-command-hook 'highlight-indentation-current-column-post-command-hook nil t)) + (t + (remove-hook 'post-command-hook 'highlight-indentation-current-column-post-command-hook t) + + (font-lock-fontify-buffer)))) + +(defun highlight-indentation-current-column-post-command-hook () + "This hook runs after every keystroke" + (when highlight-indentation-current-column-regex + (font-lock-remove-keywords nil highlight-indentation-current-column-regex)) + (let ((indent (save-excursion (back-to-indentation) (current-column)))) + (when (and highlight-indentation-current-column-mode + (> indent 1)) + (let* ((re (format "^ \\{%d\\}\\( \\)" indent)) + (arg `((,re (1 'highlight-indentation-current-column-face prepend))))) + (set (make-local-variable 'highlight-indentation-current-column-regex) arg) + (font-lock-add-keywords nil arg)))) + (font-lock-fontify-buffer)) + +(provide 'highlight-indentation) + +;;; highlight-indentation.el ends here diff --git a/elpa/highlight-indentation-20131207.835/highlight-indentation.elc b/elpa/highlight-indentation-20131207.835/highlight-indentation.elc new file mode 100644 index 0000000000000000000000000000000000000000..a8641de56ef2e766032431c89fb9331cfe2e830d GIT binary patch literal 6370 zcmc&&ZExGi5mr9cQBYlbLGN1h5H%YdFL+|1QXn^*@M}

$;qr~%sR-PzgQ*_mga*{3i5a`t(v)oMR|`jpP{`65Y0M3WWG zgX$Z6rTNz&e3s`I{WK4Ql=6&T1r>d}oD!XqJsNxV*mcOUY)`6)i+oNol+f|(QWWJe zbR74^JP6BvbS%`kC+8kdPmwY)IKG#iRCPJ%}kbrr7ATM_Yr|$e=gjvaIsC8Hq3r z3Smx*e7T@T_n|CF$@p{aS@d$_Sq6<4g@}`PWHe4SA)qu*f-(usI0$jE*Ouna=9Q&9 zb-NXflWZo6q@tLeN%VSTJY$U{C&ziQQGju{*V_4Mx=bQb_KoYyUIs-HOb|@XJI~{| z6cu@7JQs1WOsgHGYV--g+2PDFJd^SYJFGo0&X@2=4p=`U#QR(9aE`0(lMIy0AYBSV z#02S8uqu_B$%Jw@^c|v+T?3n1JBPXD9P+??NRhFfqkbExh0qg- z>iL`_cFzXYSu2Dy!gR`0prpR8{udwEFVB`P+dce}`eZxasE0Gog9~BSN=#)zQyJ@M zzsdQmBX@JY9VeJ4nZDMI>B=1mc)f_)fYEZnp0BnZq)AZH4U5v@o9*tPiQy~TZnG!{v-UhzyI_Bj}doCM0kLP_w39!G$Js7xR3Nd z?n6Igao-)fJVU|+1{rERi+dP6MoK*PUB{9uKgWo}$TVPC_j&8*_=DBlVawl0z1C8W zBc)!qI-fR)#kCmk%5vjY=i#oHC)fN(t7G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!KUCR9DzleMV^LyBRlZgveoo*tosVX0;lWWB?ZRYZ_ z_W40pJrSxNT?H986_VFBAs;?Lnie99_SBb~z3o&|n{IAx>ZA?HAB;w)l2t8={1UIH JdurQW`#)L(7)<~G literal 0 HcmV?d00001 diff --git a/elpa/idle-highlight-mode-20120920.948/idle-highlight-mode-autoloads.el b/elpa/idle-highlight-mode-20120920.948/idle-highlight-mode-autoloads.el new file mode 100644 index 000000000..4889b4dbd --- /dev/null +++ b/elpa/idle-highlight-mode-20120920.948/idle-highlight-mode-autoloads.el @@ -0,0 +1,29 @@ +;;; idle-highlight-mode-autoloads.el --- automatically extracted autoloads +;; +;;; Code: + + +;;;### (autoloads (idle-highlight-mode) "idle-highlight-mode" "idle-highlight-mode.el" +;;;;;; (21478 16683 0 0)) +;;; Generated autoloads from idle-highlight-mode.el + +(autoload 'idle-highlight-mode "idle-highlight-mode" "\ +Idle-Highlight Minor Mode + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads nil nil ("idle-highlight-mode-pkg.el") (21478 16683 +;;;;;; 704053 0)) + +;;;*** + +(provide 'idle-highlight-mode-autoloads) +;; Local Variables: +;; version-control: never +;; no-byte-compile: t +;; no-update-autoloads: t +;; coding: utf-8 +;; End: +;;; idle-highlight-mode-autoloads.el ends here diff --git a/elpa/idle-highlight-mode-20120920.948/idle-highlight-mode-pkg.el b/elpa/idle-highlight-mode-20120920.948/idle-highlight-mode-pkg.el new file mode 100644 index 000000000..e30f738ed --- /dev/null +++ b/elpa/idle-highlight-mode-20120920.948/idle-highlight-mode-pkg.el @@ -0,0 +1 @@ +(define-package "idle-highlight-mode" "20120920.948" "highlight the word the point is on" (quote nil)) diff --git a/elpa/idle-highlight-mode-20120920.948/idle-highlight-mode-pkg.elc b/elpa/idle-highlight-mode-20120920.948/idle-highlight-mode-pkg.elc new file mode 100644 index 0000000000000000000000000000000000000000..5a78bb4a854048de8b01fee86907a22fa893ce94 GIT binary patch literal 653 zcmbtRL2kk@5agT>^t#Ham54(EQVF?~A`VFHiS_}D?IaeCH;PRWeSMcuRjtYmODoyl z@yx8JT)(XDMx#+wmL;sH?Tpn5b|+{tJaPHt73DM0URaW7fgEfx!17Q76p%eGX4ztz zK|aZ514Y$S3l)<<`tEh_Q|3s8Zc%!nQf)g-jj}pvOx;+nkhG+9!te7*kxxW1n_mTV z`&wu_NEip}Gaq~~zhOi9OiV>K^o}MpfR=rB!L;TR0|UH>hUQyi{KebBYY*z=ur(4C zNgsOSYCq;~?*pJx{0TogSt0V`ABQ65a1=n23&`L@sFFF~xMaCqZ8jhq>`?|bIUeNE zDewdm9qcq%!apM4!+6lxTcdjj4FmJ(MVHgLX`Kz+x}qq$SGqDzCmqT?)*9j~S;i3m cPLq#6S@TR9j?}AR(~)rjI1+L(IAb58FEuU0;s5{u literal 0 HcmV?d00001 diff --git a/elpa/idle-highlight-mode-20120920.948/idle-highlight-mode.el b/elpa/idle-highlight-mode-20120920.948/idle-highlight-mode.el new file mode 100644 index 000000000..1ab240af5 --- /dev/null +++ b/elpa/idle-highlight-mode-20120920.948/idle-highlight-mode.el @@ -0,0 +1,115 @@ +;;; idle-highlight-mode.el --- highlight the word the point is on + +;; Copyright (C) 2008-2011 Phil Hagelberg, Cornelius Mika + +;; Author: Phil Hagelberg, Cornelius Mika +;; URL: http://www.emacswiki.org/cgi-bin/wiki/IdleHighlight +;; Version: 20120920.948 +;; X-Original-Version: 1.1.3 +;; Created: 2008-05-13 +;; Keywords: convenience +;; EmacsWiki: IdleHighlight + +;; This file is NOT part of GNU Emacs. + +;;; License: + +;; 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, 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 GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;; Based on some snippets by fledermaus from the #emacs channel. + +;; M-x idle-highlight-mode sets an idle timer that highlights all +;; occurences in the buffer of the word under the point. + +;; Enabling it in a hook is recommended. But you don't want it enabled +;; for all buffers, just programming ones. +;; +;; Example: +;; +;; (defun my-coding-hook () +;; (make-local-variable 'column-number-mode) +;; (column-number-mode t) +;; (if window-system (hl-line-mode t)) +;; (idle-highlight-mode t)) +;; +;; (add-hook 'emacs-lisp-mode-hook 'my-coding-hook) +;; (add-hook 'ruby-mode-hook 'my-coding-hook) +;; (add-hook 'js2-mode-hook 'my-coding-hook) + +;;; Code: + +(require 'thingatpt) + + +(defgroup idle-highlight nil + "Highlight other occurrences of the word at point." + :group 'faces) + +(defface idle-highlight + '((t (:inherit region))) + "Face used to highlight other occurrences of the word at point." + :group 'idle-highlight) + +(defcustom idle-highlight-exceptions '("end") + "List of words to be excepted from highlighting." + :group 'idle-highlight + :type '(repeat string)) + +(defcustom idle-highlight-idle-time 0.5 + "Time after which to highlight the word at point." + :group 'idle-highlight + :type 'float) + +(defvar idle-highlight-regexp nil + "Buffer-local regexp to be idle-highlighted.") + +(defvar idle-highlight-global-timer nil + "Timer to trigger highlighting.") + +(defun idle-highlight-word-at-point () + "Highlight the word under the point." + (if idle-highlight-mode + (let* ((target-symbol (symbol-at-point)) + (target (symbol-name target-symbol))) + (idle-highlight-unhighlight) + (when (and target-symbol + (not (in-string-p)) + (looking-at-p "\\s_\\|\\sw") ;; Symbol characters + (not (member target idle-highlight-exceptions))) + (setq idle-highlight-regexp (concat "\\<" (regexp-quote target) "\\>")) + (highlight-regexp idle-highlight-regexp 'idle-highlight))))) + +(defsubst idle-highlight-unhighlight () + (when idle-highlight-regexp + (unhighlight-regexp idle-highlight-regexp) + (setq idle-highlight-regexp nil))) + +;;;###autoload +(define-minor-mode idle-highlight-mode + "Idle-Highlight Minor Mode" + :group 'idle-highlight + (if idle-highlight-mode + (progn (unless idle-highlight-global-timer + (setq idle-highlight-global-timer + (run-with-idle-timer idle-highlight-idle-time + :repeat 'idle-highlight-word-at-point))) + (set (make-local-variable 'idle-highlight-regexp) nil)) + (idle-highlight-unhighlight))) + +(provide 'idle-highlight-mode) +;;; idle-highlight-mode.el ends here diff --git a/elpa/idle-highlight-mode-20120920.948/idle-highlight-mode.elc b/elpa/idle-highlight-mode-20120920.948/idle-highlight-mode.elc new file mode 100644 index 0000000000000000000000000000000000000000..1ae219411e6de54bdae1f9e2e5f87bd46e1633c6 GIT binary patch literal 3270 zcmbtWZExE)5can<4q6N=hP`0JF3Q^2Tjl7*j+>-i-_T(J+5tneeW|jJmMEL3EUFTn zG{b)Uo}*+tcAa5B4N#_Z$2%VHdG2`p{Kc~`TCG<5`1qKf>1m-dnb7ExroueNsN9z# zeya7`UZ!J_kvk-^wnO znUKh^$HJ(o`db(%RK2zpo=#L%?`u}cijvD*OjS&Yjw@5Dd|cgww5$w?B*6hJ{P>5x z;P3+*iH40_8;W&q1e9kcb?@U#?ml_-?Bs;vi6}*Eu*rMYy~q=)G{qvPk)%wE6(>zF z6-iNMN|t0MPz=J_FEaB{Ki^t|)J>0N0UV&cjwAELf$tXz7)L}LO~w8J$668FvE*HB2#3gFn#%&Ql(LWr zz9vg|-IetW(n<1q19DDzCQ`tkE+#6Ttj4+NFjG*%oYDPmd-rjFKu>3BDoeL6IXF4_ zzG(Kk8ly~l-?cl5OmPP5duo<(dON${Q;&Rq*zdA~Fd*I`Xr>9|ACECziTYZb<4li4 z=5nN^1x{l*82Yv4AuW-#h;x=F>JTb|Lso1%3+f32S-djZ1$9P3QQ zTj|bMyQ8axVx3EDf#V5=>oL4kxi0A?+q?fJY6rJp6KtiTDsn z3vaceoT(JlblhSV`G25w`CyqB{@7x!_9KV68AK_bw(ISJXWaL^L4yPT;B&SzXx-#x z16Cj2ydncDEh%#rKY|$j5c-dK7Di6pD+6@XfGv8VfB+SPr>CtO%{=5aRurI%2E)i& z`xC06$JXBP%&)C=F%7UDEu6Ku4($35caJhr;oc^zN{mtG%ker{?7^*}V5M}f$?U6b zA8UdJ{Bc(156%px zvjCVa@>i%d=N|i*pvqL6LbsBQ0+5PVZI-2JEyOh&yaFxJKXHdt=Q6uQkrO#C<;|Hp zCmT3KnyAX literal 0 HcmV?d00001 diff --git a/elpa/ido-ubiquitous-20140526.1306/ido-ubiquitous-autoloads.el b/elpa/ido-ubiquitous-20140526.1306/ido-ubiquitous-autoloads.el new file mode 100644 index 000000000..56510c0d5 --- /dev/null +++ b/elpa/ido-ubiquitous-20140526.1306/ido-ubiquitous-autoloads.el @@ -0,0 +1,49 @@ +;;; ido-ubiquitous-autoloads.el --- automatically extracted autoloads +;; +;;; Code: + + +;;;### (autoloads (ido-ubiquitous-mode) "ido-ubiquitous" "ido-ubiquitous.el" +;;;;;; (21478 16682 0 0)) +;;; Generated autoloads from ido-ubiquitous.el + +(define-obsolete-variable-alias 'ido-ubiquitous 'ido-ubiquitous-mode "0.8") + +(define-obsolete-function-alias 'ido-ubiquitous 'ido-ubiquitous-mode "0.8") + +(defvar ido-ubiquitous-mode nil "\ +Non-nil if Ido-Ubiquitous mode is enabled. +See the command `ido-ubiquitous-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 `ido-ubiquitous-mode'.") + +(custom-autoload 'ido-ubiquitous-mode "ido-ubiquitous" nil) + +(autoload 'ido-ubiquitous-mode "ido-ubiquitous" "\ +Use `ido-completing-read' instead of `completing-read' almost everywhere. + + This mode has no effect unles `ido-mode' is also enabled. + + If this mode causes problems for a function, you can customize + when ido completion is or is not used by customizing + `ido-ubiquitous-command-overrides' or + `ido-ubiquitous-function-overrides'. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads nil nil ("ido-ubiquitous-pkg.el") (21478 16682 +;;;;;; 691774 0)) + +;;;*** + +(provide 'ido-ubiquitous-autoloads) +;; Local Variables: +;; version-control: never +;; no-byte-compile: t +;; no-update-autoloads: t +;; coding: utf-8 +;; End: +;;; ido-ubiquitous-autoloads.el ends here diff --git a/elpa/ido-ubiquitous-20140526.1306/ido-ubiquitous-pkg.el b/elpa/ido-ubiquitous-20140526.1306/ido-ubiquitous-pkg.el new file mode 100644 index 000000000..3dd090429 --- /dev/null +++ b/elpa/ido-ubiquitous-20140526.1306/ido-ubiquitous-pkg.el @@ -0,0 +1 @@ +(define-package "ido-ubiquitous" "20140526.1306" "Use ido (nearly) everywhere." (quote ((emacs "24.1")))) diff --git a/elpa/ido-ubiquitous-20140526.1306/ido-ubiquitous-pkg.elc b/elpa/ido-ubiquitous-20140526.1306/ido-ubiquitous-pkg.elc new file mode 100644 index 0000000000000000000000000000000000000000..e68990d6865796cc1ad79c3ba36cc585e4307673 GIT binary patch literal 648 zcmbtS%TB{E5bQZWz;%@iiPShx3T-Zwss|)E6+U2VyN%Vv4zWWOzMgH0kP64HzCEdWHRx}vV@gsT2)H{+W{JMk92JGiu}o#1FH?k8jOYwI#~95fH|c1iy~d* z31mrHj1;@hG_WHQh~KU3Y)l+6lMQmqL@etTV=VlHOXt8YSb4xYOu^3!M94;v!vci3u4gNC=SAK z>pG?Pc1mbx9iR~8{dZ3~XW9H8hcLvUjRS79Lu&5bE_$FB9W6Jj=V#y*cE}xxoQ~^J z3$O+_YS>Ds4PGqyF=IhuS1Z|ptEe%{&wDA9tLh}++VVUv5OSxqj9TOe+)MB;BlN+) m2$AlTJx~(_`s8Z}L6XtoSjkQ@A8vzS{1G%)u+$I3(EA3K?!UDF literal 0 HcmV?d00001 diff --git a/elpa/ido-ubiquitous-20140526.1306/ido-ubiquitous.el b/elpa/ido-ubiquitous-20140526.1306/ido-ubiquitous.el new file mode 100644 index 000000000..0a9b74577 --- /dev/null +++ b/elpa/ido-ubiquitous-20140526.1306/ido-ubiquitous.el @@ -0,0 +1,868 @@ +;; -*- lexical-binding: t -*- + +;;; ido-ubiquitous.el --- Use ido (nearly) everywhere. + +;; Author: Ryan C. Thompson +;; URL: https://github.com/DarwinAwardWinner/ido-ubiquitous +;; Version: 20140526.1306 +;; X-Original-Version: 2.13 +;; Created: 2011-09-01 +;; Keywords: convenience +;; EmacsWiki: InteractivelyDoThings +;; Package-Requires: ((emacs "24.1")) + +;; This file is NOT part of GNU Emacs. + +;;; Commentary: + +;; If you use the excellent `ido-mode' for efficient completion of +;; file names and buffers, you might wonder if you can get ido-style +;; completion everywhere else too. Well, that's what this package +;; does! ido-ubiquitous is here to enable ido-style completion for +;; (almost) every function that uses the standard completion function +;; `completing-read'. + +;;; License: + +;; 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, 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 GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Code: + +(defconst ido-ubiquitous-version "2.13" + "Currently running version of ido-ubiquitous. + +Note that when you update ido-ubiquitous, this variable may not +be updated until you restart Emacs.") + +(eval-when-compile + (when (or (not (boundp 'completing-read-function)) + (< emacs-major-version 24)) + (error "Could not find required variable `completing-read-function'. Are you using Emacs version 24 or higher? If you have Emacs 23 or lower, please downgrade to ido-ubiquitous version 1.7."))) + +(require 'ido) +(require 'advice) +(require 'cl) +;; Only exists in emacs 24.4 and up; we use a workaround for earlier +;; versions. +(require 'nadvice nil 'noerror) + +;; Declare this ahead of time to quiet the compiler +(defvar ido-ubiquitous-fallback-completing-read-function) + +;;; Internal utility functions + +(defun ido-ubiquitous--as-string (sym-or-str) + "Return name of symbol, return string as is." + (if (symbolp sym-or-str) + (symbol-name sym-or-str) + sym-or-str)) + +(defun ido-ubiquitous--as-symbol (sym-or-str) + "Return name of symbol, return string as is." + (if (symbolp sym-or-str) + sym-or-str + (intern sym-or-str))) + +;;; Custom widget definitions + +;; We need to define some custom widget types for use in the override +;; variables. + +(define-widget 'lazy-notag 'lazy + "Like lazy widget, but does not display its tag, only its value." + :format "%v") + +;; Define matcher functions and widgets for match specifications +(defvar ido-ubiquitous-match-spec-widget-types nil + "List of widget names for match specs.") +(defvar ido-ubiquitous-spec-matchers nil + "Alist of functions for matching function specs against function names.") +(loop for (widget-name widget-tag key field-type matcher) in + '((exact-match "Exact match" exact string string=) + (prefix-match "Prefix match" prefix string string-prefix-p) + (regexp-match "Regexp match" regexp regexp string-match-p)) + do (define-widget (ido-ubiquitous--as-symbol widget-name) 'lazy-notag widget-tag + :menu-tag widget-tag + :type `(list :tag ,widget-tag :format "%v" + (const :format "" + :tag ,widget-tag + ,key) + (,field-type :tag ,widget-tag))) + do (add-to-list 'ido-ubiquitous-match-spec-widget-types + widget-name 'append) + do (add-to-list 'ido-ubiquitous-spec-matchers + (cons key matcher) 'append)) + +(define-widget 'ido-ubiquitous-match-spec 'lazy-notag + "Choice of exact, prefix, or regexp match." + :type `(choice :tag "Match type" + ,@ido-ubiquitous-match-spec-widget-types)) + +(define-widget 'ido-ubiquitous-command-override-spec 'lazy-notag + "Choice of override action plus match specification." + :type '(cons :tag "Override rule" + (choice :tag "For matching commands" + (const :menu-tag "Disable" + :tag "Disable ido-ubiquitous" + disable) + (const :menu-tag "Enable" + :tag "Enable ido-ubiquitous in normal default mode" + enable) + (const :menu-tag "Enable old-style default" + :tag "Enable ido-ubiquitous in old-style default mode" + enable-old)) + ido-ubiquitous-match-spec)) + +(define-widget 'ido-ubiquitous-function-override-spec 'lazy-notag + "Choice of override action and function name. (Exact match only.)" + :type '(list :tag "Override rule" + (choice :tag "Do the following" + (const :menu-tag "Disable" + :tag "Disable ido-ubiquitous" + disable) + (const :menu-tag "Enable" + :tag "Enable ido-ubiquitous in normal default mode" + enable) + (const :menu-tag "Enable old-style default" + :tag "Enable ido-ubiquitous in old-style default mode" + enable-old)) + (const :format "" exact) + (string :tag "For function"))) + +;;; Custom Declarations + +(defgroup ido-ubiquitous nil + "Use ido for (almost) all completion." + :group 'ido) + +;;;###autoload +(define-obsolete-variable-alias 'ido-ubiquitous + 'ido-ubiquitous-mode "0.8") +;;;###autoload +(define-obsolete-function-alias 'ido-ubiquitous + 'ido-ubiquitous-mode "0.8") + +;;;###autoload +(define-minor-mode ido-ubiquitous-mode + "Use `ido-completing-read' instead of `completing-read' almost everywhere. + + This mode has no effect unles `ido-mode' is also enabled. + + If this mode causes problems for a function, you can customize + when ido completion is or is not used by customizing + `ido-ubiquitous-command-overrides' or + `ido-ubiquitous-function-overrides'." + + nil + :global t + :group 'ido-ubiquitous + ;; Handle warning about ido disabled + (when ido-ubiquitous-mode + (ido-ubiquitous-warn-about-ido-disabled)) + ;; Ensure emacs 23 code disabled (in case user upgraded in this session) + (ignore-errors + (ad-disable-advice 'completing-read 'around 'ido-ubiquitous-legacy) + (ad-activate 'completing-read)) + ;; Actually enable/disable the mode + (setq completing-read-function + (if ido-ubiquitous-mode + 'completing-read-ido + (or ido-ubiquitous-fallback-completing-read-function + 'completing-read-default)))) + +(defcustom ido-ubiquitous-max-items 30000 + "Max collection size to use ido-ubiquitous on. + +If `ido-ubiquitous-mode' is active and `completing-read' is +called on a COLLECTION with greater than this number of items in +it, the fallback completion method will be used instead. To +disable fallback based on collection size, set this to nil." + :type '(choice (const :tag "No limit" nil) + (integer + :tag "Limit" :value 5000 + :validate + (lambda (widget) + (let ((v (widget-value widget))) + (if (and (integerp v) + (> v 0)) + nil + (widget-put widget :error "This field should contain a positive integer") + widget))))) + :group 'ido-ubiquitous) + +(defcustom ido-ubiquitous-fallback-completing-read-function + ;; Initialize to the current value of `completing-read-function', + ;; unless that is already set to the ido completer, in which case + ;; use `completing-read-default'. + (if (eq completing-read-function 'completing-read-ido) + 'completing-read-default + completing-read-function) + "Alternate completing-read function to use when ido is not wanted. + +This will be used for functions that are incompatibile with ido +or if ido cannot handle the completion arguments. + +If you turn off ido-ubiquitous mode, `completing-read-function' +will be set back to this." + :type '(choice (const :tag "Standard emacs completion" + completing-read-default) + (function :tag "Other function")) + :group 'ido-ubiquitous) + +(define-obsolete-variable-alias + 'ido-ubiquitous-enable-compatibility-globally + 'ido-ubiquitous-enable-old-style-default + "2.0") + +(defcustom ido-ubiquitous-enable-old-style-default t + "Allow ido to emulate a quirk of `completing-read'. + +From the `completing-read' docstring: + +> If the input is null, `completing-read' returns DEF, or the +> first element of the list of default values, or an empty string +> if DEF is nil, regardless of the value of REQUIRE-MATCH. + +If this variable is non-nil, then ido-ubiquitous will attempt to +emulate this behavior. Specifically, if RET is pressed +immediately upon entering completion, an empty string will be +returned instead of the first element in the list. This behavior +is only enabled when ido is being used as a substitute for +`completing-read', and not when it is used directly. + +This odd behavior is required for compatibility with an old-style +usage pattern whereby the default was requested by returning an +empty string. In this mode, the caller receives the empty string +and handles the default case manually, while `completing-read' +never has any knowledge of the default. This is a problem for +ido, which always returns the first element in the list when the +input is empty. Without knowledge of the default, it cannot +ensure that the default is first on the list, so returning the +first item is not the correct behavior. Instead, it must return +an empty string like `completing-read'. + +You can termporarily invert this behavior by prefixing \"RET\" +with \"C-u\". + +If you want to enable old-style default selection selectively for +specific commands or functions, set appropriate overrides in +`ido-ubiquitous-command-overrides' or +`ido-ubiquitous-function-overrides'." + :type 'boolean + :group 'ido-ubiquitous) + +(defconst ido-ubiquitous-default-command-overrides + '(;; If you want ido for M-x, install smex + (disable exact "execute-extended-command") + ;; https://github.com/technomancy/ido-ubiquitous/issues/13#issuecomment-8033522 + (enable prefix "wl-") + ;; https://github.com/technomancy/ido-ubiquitous/issues/7 + (enable-old prefix "Info-") + ;; https://github.com/DarwinAwardWinner/ido-ubiquitous/issues/4 + (enable exact "webjump") + ;; https://github.com/DarwinAwardWinner/ido-ubiquitous/issues/28 + (enable regexp "\\`\\(find\\|load\\|locate\\)-library\\'") + ;; https://github.com/DarwinAwardWinner/ido-ubiquitous/issues/37 + ;; Org and Magit already support ido natively + (disable prefix "org-") + (disable prefix "magit-") + ;; https://github.com/bbatsov/prelude/issues/488 + ;; https://github.com/DarwinAwardWinner/ido-ubiquitous/issues/44 + ;; tmm implements its own non-standard completion mechanics + (disable prefix "tmm-") + ;; https://github.com/DarwinAwardWinner/ido-ubiquitous/issues/47 + ;; theme functions don't need old-style compatibility + (enable regexp "\\`\\(load\\|enable\\|disable\\|describe\\|custom-theme-visit-theme\\)-theme\\'") +) + "Default value of `ido-ubiquitous-command-overrides'. + +You can restore these using the command `ido-ubiquitous-restore-default-overrides'.") + +(defconst ido-ubiquitous-default-function-overrides + '((disable exact "read-file-name") + (disable exact "read-file-name-internal") + (disable exact "read-buffer") + (disable exact "gnus-emacs-completing-read") + (disable exact "gnus-iswitchb-completing-read") + (disable exact "grep-read-files") + ;; https://github.com/DarwinAwardWinner/ido-ubiquitous/issues/36 + (enable exact "bookmark-completing-read") + ;; https://github.com/DarwinAwardWinner/ido-ubiquitous/issues/4 + (enable-old exact "webjump-read-choice") + (enable-old exact "webjump-read-url-choice") + ;; https://github.com/DarwinAwardWinner/ido-ubiquitous/issues/9 + (disable exact "isearchp-read-unicode-char") + ;; https://github.com/DarwinAwardWinner/ido-ubiquitous/issues/37 + (disable exact "org-completing-read") + (disable exact "org-completing-read-no-i") + (disable exact "org-iswitchb-completing-read") + (disable exact "org-icompleting-read") + ;; https://github.com/DarwinAwardWinner/ido-ubiquitous/issues/38 + (enable exact "read-char-by-name") + ;; https://github.com/DarwinAwardWinner/ido-ubiquitous/issues/39 + (disable exact "Info-read-node-name") + ;; https://github.com/purcell/emacs.d/issues/182#issuecomment-44212927 + (disable exact "tmm-menubar")) + "Default value of `ido-ubiquitous-function-overrides'. + +You can restore these using the command `ido-ubiquitous-restore-default-overrides'.") + +(defcustom ido-ubiquitous-command-overrides ido-ubiquitous-default-command-overrides + "List of command override specifications for ido-ubiquitous + +Each override specification describes how ido-ubiquitous should +behave one or many commands. A specification has the +form `(BEHAVIOR MATCH-TYPE MATCH-TEXT)'. BEHAVIOR is one of the +following: + + * `disable': ido-ubiquitous should not be used at all for the + specified commands; + * `enable': ido-ubiquitous may be used with the specified + commands, without emulating the old-style default selection + of `completing-read'; + * `enable-old': ido-ubiquitous may be used with the specified + commands, and should emulate the old-style default selection + of `completing-read'. + +MATCH-TYPE affects how MATCH-TEXT is interpreted, as follows: + + * `exact': the specification only affects the one command + whose name is MATCH-TEXT; + * `prefix': the specification affects any command whose name + starts with MATCH-TEXT (This is useful for specifying a + certain behavior for an entire package); + * `regexp': the specification affects any command whose name + matches MATCH-TEXT (with MATCH-TEXT being interpreted as a + regular expression) + +MATCH-TEXT should be a string. + +Since this variable's has a somewhat complex structure, it is +recommended that you set this variable through Customize. + +Note that this variable only affects *commands*, which are +functions marked as interactive. See +`ido-ubiquitous-function-overrides' for how to modify the +behavior of ido-ubiquitous for arbitrary functions. + +If you need to add a new specification to this list, please also +file a bug report at https://github.com/DarwinAwardWinner/ido-ubiquitous/issues" + :type '(repeat ido-ubiquitous-command-override-spec) + :group 'ido-ubiquitous) + +(defmacro ido-ubiquitous-with-override (override &rest body) + "Eval BODY with specicified OVERRIDE in place. + +The OVERRIDE argument is evaluated normally, so if it is a +literal symbol, it must be quoted. + +See `ido-ubiquitous-command-overrides' for valid override types." + ;; Eval override + `(let ((ido-ubiquitous-next-override ,override)) + ,@body)) +(put 'ido-ubiquitous-with-override 'lisp-indent-function + (get 'prog1 'lisp-indent-function)) + +(defun ido-ubiquitous-apply-function-override (func override) + "Set the override property on FUNC to OVERRIDE and set up advice to apply the override." + (setq func (ido-ubiquitous--as-symbol func) + override (ido-ubiquitous--as-symbol override)) + (put func 'ido-ubiquitous-override override) + (when override + (let ((docstring + (format "Override ido-ubiquitous behavior in %s if its `ido-ubiquitous-override' property is non-nil." func))) + (eval + `(defadvice ,func (around ido-ubiquitous-override activate) + ,docstring + (ido-ubiquitous-with-override + (get ',func 'ido-ubiquitous-override) + ad-do-it)))))) + +(defun ido-ubiquitous-set-function-overrides (sym newval) + "Custom setter function for `ido-ubiquitous-function-overrides'. + +In addition to setting the variable, this also sets up advice on +each function to apply the appropriate override." + ;; Unset all previous overrides + (when (boundp sym) + (let ((oldval (eval sym))) + (loop for (_action _match-type func) in oldval + do (ido-ubiquitous-apply-function-override func nil)))) + ;; Ensure that function names are strings, not symbols + (setq newval + (loop for (action match-type func) in newval + collect (list action match-type + (ido-ubiquitous--as-string func)))) + (set-default sym newval) + ;; set new overrides + (loop for (action _match-type func) in (eval sym) + do (ido-ubiquitous-apply-function-override func action))) + +(defcustom ido-ubiquitous-function-overrides ido-ubiquitous-default-function-overrides + "List of function override specifications for ido-ubiquitous + +Function override specifications have a similar structure to +command override specifications (see +`ido-ubiquitous-command-overrides'). A function override +specification has the form `(BEHAVIOR MATCH-TYPE MATCH-TEXT)'. +However, `MATCH-TYPE' may ONLY be `exact'; No other match type is +supported. + +If you need to add a new specification to this list, please also file a +bug report at https://github.com/DarwinAwardWinner/ido-ubiquitous/issues + +Setting this variable directly has no effect. You must set it +through Customize." + :type '(repeat ido-ubiquitous-function-override-spec) + :set 'ido-ubiquitous-set-function-overrides + :group 'ido-ubiquitous) + +(defcustom ido-ubiquitous-allow-on-functional-collection nil + "Allow ido completion when COLLECTION is a function. + +The `completing-read' function allows its COLLECTION argument to +be a function instead of a list of choices. Some such functions +simply return a list of completions and are suitable for use with +ido, but others implement more complex behavior and will result +in incorrect behavior if used with ido. Since there is no way to +tell the difference, this preference defaults to nil, which means +that ido-ubiquitous will not work when COLLECTION is a function +unless there is a specific override in effect. To disable this +safeguard and guarantee breakage on some functions, you may set +this to non-nil, but this is not recommended." + :type 'boolean + :group 'ido-ubiquitous) + +;;; ido-ubiquitous core + +(defvar ido-ubiquitous-next-call-replaces-completing-read nil + "If t, then the next call to `ido-completing-read' is by ido-ubiquitous.") +(defvar ido-ubiquitous-this-call-replaces-completing-read nil + "If t, then the current call to `ido-completing-read' is by ido-ubiquitous.") +(defvar ido-ubiquitous-next-override nil + "This holds the override to be applied on the next call to `completing-read'.") +(defvar ido-ubiquitous-active-override nil + "This holds the override being applied to the current call to `completing-read'.") + +(defun ido-ubiquitous-completing-read (&rest args) + "Wrapper for `ido-completing-read' that enables ido-ubiquitous features." + (let ((ido-ubiquitous-next-call-replaces-completing-read t)) + (apply 'ido-completing-read args))) + +(defadvice ido-completing-read (around detect-replacing-cr activate) + "Enable workarounds if this call was done through ido-ubiquitous. + +This advice implements the logic required for +`ido-completing-read' to handle a number of special cases that +`completing-read' can handle. It only has an effect if +`ido-completing-read' is called through +`ido-ubiquitous-completing-read', so other packages that use +`ido-completing-read', such as `smex', will not be affected." + (let* ((ido-ubiquitous-this-call-replaces-completing-read ido-ubiquitous-next-call-replaces-completing-read) + (ido-ubiquitous-next-call-replaces-completing-read nil) + (error-during-setup nil)) + (when ido-ubiquitous-this-call-replaces-completing-read + (condition-case nil + (progn + ;; ido doesn't natively handle DEF being a list. If DEF is + ;; a list, prepend it to CHOICES and set DEF to just the + ;; car of the default list. + (when (and def (listp def)) + (setq choices + (append def + (nreverse (cl-set-difference choices def))) + def (car def))) + ;; Work around a bug in ido when both INITIAL-INPUT and + ;; DEF are provided More info: + ;; https://github.com/technomancy/ido-ubiquitous/issues/18 + (let ((initial (cond ((null initial-input) "") + ((stringp initial-input) initial-input) + ((consp initial-input) (car initial-input)) + (t initial-input)))) + (when (and def initial + (stringp initial) + (not (string= initial ""))) + ;; Both default and initial input were provided. So + ;; keep the initial input and preprocess the choices + ;; list to put the default at the head, then proceed + ;; with default = nil. + (setq choices (cons def (remove def choices)) + def nil)))) + (error + (progn + (warn "ido-ubiquitous: failed during setup. Falling back to standard completion") + (setq error-during-setup t))))) + ;; For ido-ubiquitous, only attempt ido completion if setup + ;; completed without error + (if (not error-during-setup) + ad-do-it + (setq ad-return-value + (funcall + ido-ubiquitous-fallback-completing-read-function + prompt choices predicate require-match initial-input + hist def inherit-input-method))))) + +(defun completing-read-ido (prompt collection &optional predicate + require-match initial-input + hist def inherit-input-method) + "ido-based method for reading from the minibuffer with completion. + +See `completing-read' for the meaning of the arguments. + +This function is a wrapper for `ido-completing-read' designed to +be used as the value of `completing-read-function'. Importantly, +it detects edge cases that ido cannot handle and uses normal +completion for them." + (let* (;; Set the active override and clear the "next" one so it + ;; doesn't apply to nested calls. + (ido-ubiquitous-active-override ido-ubiquitous-next-override) + (ido-ubiquitous-next-override nil) + ;; Check for conditions that ido can't or shouldn't handle + (ido-allowed + (and ido-mode + ido-ubiquitous-mode + ;; Check for disable override + (not (eq ido-ubiquitous-active-override 'disable)) + ;; Can't handle this arg + (not inherit-input-method) + ;; Can't handle this being set + (not (bound-and-true-p completion-extra-properties)))) + ;; Check if ido can handle this collection. If collection is + ;; a function, require an override to be ok. Also, + ;; collection-ok should never be true when ido-allowed is + ;; false. + (collection-ok + (and ido-allowed + (or ido-ubiquitous-allow-on-functional-collection + (not (functionp collection)) + (memq ido-ubiquitous-active-override '(enable enable-old))))) + ;; Pre-expand list of possible completions, but only if we + ;; have a chance of using ido. This is executed after the + ;; ido-allowed check to avoid unnecessary work if ido isn't + ;; going to used. + (_ignore ;; (Return value doesn't matter). + (when (and ido-allowed collection-ok) + (setq collection (all-completions "" collection predicate) + ;; Don't need this any more + predicate nil))) + (collection-ok + ;; Don't use ido if the collection is empty or too large. + (and collection-ok + collection + (or (null ido-ubiquitous-max-items) + (<= (length collection) ido-ubiquitous-max-items)))) + ;; Final check for everything + (ido-allowed (and ido-allowed collection-ok)) + (comp-read-fun + (if ido-allowed + 'ido-ubiquitous-completing-read + ido-ubiquitous-fallback-completing-read-function))) + (funcall comp-read-fun + prompt collection predicate + require-match initial-input + hist def inherit-input-method))) + +;;; Old-style default support + +(defvar ido-ubiquitous-initial-item nil + "The first item selected when ido starts. + +This is initialized to the first item in the list of completions +when ido starts, and is cleared when any character is entered +into the prompt or the list is cycled. If it is non-nil and still +equal to the first item in the completion list when ido exits, +then if `ido-ubiquitous-enable-old-style-default' is +non-nil, ido returns an empty string instead of the first item on +the list.") + +(defadvice ido-read-internal (before clear-initial-item activate) + (setq ido-ubiquitous-initial-item nil)) + +(defadvice ido-make-choice-list (after set-initial-item activate) + (when (and ad-return-value (listp ad-return-value)) + (setq ido-ubiquitous-initial-item (car ad-return-value)))) + +(defadvice ido-next-match (after clear-initial-item activate) + (setq ido-ubiquitous-initial-item nil)) + +(defadvice ido-prev-match (after clear-initial-item activate) + (setq ido-ubiquitous-initial-item nil)) + +(defadvice ido-exit-minibuffer (around compatibility activate) + "Emulate a quirk of `completing-read'. + +> If the input is null, `completing-read' returns DEF, or the +> first element of the list of default values, or an empty string +> if DEF is nil, regardless of the value of REQUIRE-MATCH. + +See `ido-ubiquitous-enable-old-style-default', which +controls whether this advice has any effect." + (condition-case nil + (let* ((enable-oldstyle + (and + ;; Completing a list, not a buffer or file + (eq ido-cur-item 'list) + ;; Only enable if we are replacing `completing-read' + ido-ubiquitous-this-call-replaces-completing-read + ;; Default is nil + (null ido-default-item) + ;; Input is empty + (string= ido-text "") + ;; Old-style default enabled + (if ido-ubiquitous-active-override + (eq ido-ubiquitous-active-override 'enable-old) + ido-ubiquitous-enable-old-style-default) + ;; First item on the list hasn't changed + (string= (car ido-cur-list) + ido-ubiquitous-initial-item))) + ;; Prefix inverts oldstyle behavior + (should-invert current-prefix-arg) + (actually-enable-oldstyle + (if should-invert (not enable-oldstyle) enable-oldstyle))) + (if actually-enable-oldstyle + (ido-select-text) + ad-do-it)) + (error ad-do-it)) + (setq ido-ubiquitous-initial-item nil)) + +;;; Overrides + +(defun ido-ubiquitous-restore-default-overrides (&optional save) + "Re-add the default overrides for ido-ubiquitous. + +This will ensure that the default overrides are all present and +at the head of the list in `ido-ubiquitous-command-overrides' and +`ido-ubiquitous-function-overrides'. User-added overrides will +not be removed, but they may be masked if one of the default +overrides affects the same functions. + +With a prefix arg, also save the above variables' new values for +future sessions." + (interactive "P") + (let ((setter (if save + 'customize-save-variable + 'customize-set-variable))) + (loop for (var def) in '((ido-ubiquitous-command-overrides + ido-ubiquitous-default-command-overrides) + (ido-ubiquitous-function-overrides + ido-ubiquitous-default-function-overrides)) + do (let* ((curval (eval var)) + (defval (eval def)) + (newval (delete-dups (append defval curval)))) + (funcall setter var newval))) + (message (if save + "ido-ubiquitous: Restored default command and function overrides and saved for future sessions." + "ido-ubiquitous: Restored default command and function overrides for current session only.")))) + +(defun ido-ubiquitous-spec-match (spec symbol) + "Returns t if SPEC matches SYMBOL (which should be a function name). + +See `ido-ubiquitous-command-overrides'." + (when (and symbol (symbolp symbol)) + (destructuring-bind (type text) spec + (let ((matcher (cdr (assoc type ido-ubiquitous-spec-matchers))) + (text (ido-ubiquitous--as-string text)) + (symname (ido-ubiquitous--as-string symbol))) + (when (null matcher) + (error "ido-ubiquitous: Unknown match spec type \"%s\". See `ido-ubiquitous-spec-matchers' for valid types." type)) + (funcall matcher text symname))))) + +(defun ido-ubiquitous-get-command-override (cmd) + "Return the override associated with the command CMD. + +If there is no override set for CMD in +`ido-ubiquitous-command-overrides', return nil." + (when (and cmd (symbolp cmd)) + (loop for (action . spec) in ido-ubiquitous-command-overrides + when (memq action '(disable enable enable-old nil)) + when (ido-ubiquitous-spec-match spec cmd) + return action + finally return nil))) + +;;; Workaround for https://github.com/DarwinAwardWinner/ido-ubiquitous/issues/24 + +;; When `call-interactively' is advised, `called-interactively-p' +;; always returns nil. So we redefine it (and `interactive-p') to test +;; the correct condition. + +(defsubst ido-ubiquitous--looks-like-advised-orig (func) + "Returns t if FUNC is a symbol starting with \"ad-Orig-\". + +Such symbols are used to store the original definitions of +functions that have been advised by `defadvice' or similar." + (and (symbolp func) + (string-prefix-p "ad-Orig-" (symbol-name func)))) + +(defsubst ido-ubiquitous--looks-like-call-interactively (func) + "Returns t if FUNC looks like the function `call-interactively'. + +FUNC \"looks like\" `call-interactively' if it is the literal +symbol `call-interactively', or the value of `(symbol-function +'call-interactively)', or a symbol whose `symbol-function' is the +same as that of `call-interactively'. + +This function is used to determine whether a given function was +\"called by\" `call-interactively' and therefore was called +interactively." + (when func + (eq (symbol-function 'call-interactively) + (if (symbolp func) + (symbol-function func) + func)))) + +(defun ido-ubiquitous--backtrace-from (fun) + "Return all backtrace frames, starting with the one for FUN. + +FUN may be a list of functions, in which case the first one found +on the stack will be used." + (let ((stack + (loop for i upfrom 0 + for frame = (backtrace-frame i) + while frame + collect frame)) + (funcs (if (functionp fun) + (list fun) + fun))) + (while (and stack + (not (memq (cadar stack) funcs))) + (setq stack (cdr stack))) + stack)) + +(defun ido-ubiquitous--clean-advice-from-backtrace (stack) + "Takes a stack trace and cleans all evidence of advice. + +Specifically, for each call to a function starting with +\"ad-Orig-\", that call and all prior calls up to but not +including the advised function's original name are deleted from +the stack." + (let ((skipping-until nil)) + (loop for frame in stack + for func = (cadr frame) + ;; Check if we found the frame we we're skipping to + if (and skipping-until + (eq func skipping-until)) + do (setq skipping-until nil) + ;; If we're looking at an the original form of an advised + ;; function, skip until the real name of that function. + if (and (not skipping-until) + (ido-ubiquitous--looks-like-advised-orig func)) + do (setq skipping-until + (intern + (substring (symbol-name func) + (eval-when-compile (length "ad-Orig-"))))) + unless skipping-until collect frame))) + +(defsubst ido-ubiquitous--interactive-internal () + "Eqivalent of the INTERACTIVE macro in the Emacs C source. + +This is an internal function that should never be called +directly. + +See the C source for the logic behind this function." + (and (not executing-kbd-macro) + (not noninteractive))) + +(defun ido-ubiquitous--interactive-p-internal () + "Equivalent of C function \"interactive_p\". + +This is an internal function that should never be called +directly. + +See the C source for the logic behind this function." + (let ((stack + ;; We clean advice from the backtrace. This ensures that we + ;; get the right answer even if `call-interactively' has been + ;; advised. + (ido-ubiquitous--clean-advice-from-backtrace + (cdr + (ido-ubiquitous--backtrace-from + '(called-interactively-p interactive-p)))))) + ;; See comments in the C function for the logic here. + (while (and stack + (or (eq (cadar stack) 'bytecode) + (null (caar stack)))) + (setq stack (cdr stack))) + ;; Top of stack is now the function that we want to know + ;; about. Pop it, then check if the next function is + ;; `call-interactively', using a more permissive test than the default. + (ido-ubiquitous--looks-like-call-interactively (cadadr stack)))) + +(defadvice call-interactively (around ido-ubiquitous activate) + "Implements the behavior specified in `ido-ubiquitous-command-overrides'." + (ido-ubiquitous-with-override + (ido-ubiquitous-get-command-override (ad-get-arg 0)) + ad-do-it)) + +;; Work around `called-interactively-p' in Emacs 24.3 and earlier, +;; which always returns nil when `call-interactively' is advised. +(when (not (and (featurep 'nadvice) + (boundp 'called-interactively-p-functions))) + + (defadvice interactive-p (around ido-ubiquitous activate) + "Return the correct result when `call-interactively' is advised. + +This advice completely overrides the original definition." + (condition-case nil + (setq ad-return-value + (and (ido-ubiquitous--interactive-internal) + (ido-ubiquitous--interactive-p-internal))) + ;; In case of error in the advice, fall back to the default + ;; implementation + (error ad-do-it))) + + (defadvice called-interactively-p (around ido-ubiquitous activate) + "Return the correct result when `call-interactively' is advised. + +This advice completely overrides the original definition." + (condition-case nil + (setq ad-return-value + (and (or (ido-ubiquitous--interactive-internal) + (not (eq kind 'interactive))) + (ido-ubiquitous--interactive-p-internal))) + ;; In case of error in the advice, fall back to the default + ;; implementation + (error ad-do-it)))) + +;;; Other + +(defun ido-ubiquitous-warn-about-ido-disabled () + "Warn if ido-ubiquitous is enabled without ido. + +Don't warn if emacs is still initializing, since ido-ubiquitous +could be enabled first during init." + (when (and ido-ubiquitous-mode + after-init-time + (not (bound-and-true-p ido-mode))) + (warn "ido-ubiquitous-mode enabled without ido mode. ido-ubiquitous requires ido mode to be enabled."))) + +(defun ido-ubiquitous-initialize () + "Do initial setup for ido-ubiquitous. + +This only needs to be called once when the file is first loaded." + ;; Clean up old versions of ido-ubiquitous that defined advice on + ;; `completing-read' instead of modifying + ;; `completing-read-function'. + (when (ad-find-advice 'completing-read 'around 'ido-ubiquitous) + (ad-remove-advice 'completing-read 'around 'ido-ubiquitous) + (ad-activate 'completing-read)) + ;; Make sure the mode is turned on/off as specified by the value of + ;; the mode variable + (ido-ubiquitous-mode (if ido-ubiquitous-mode 1 0))) +(ido-ubiquitous-initialize) + +(provide 'ido-ubiquitous) + +;;; ido-ubiquitous.el ends here diff --git a/elpa/ido-ubiquitous-20140526.1306/ido-ubiquitous.elc b/elpa/ido-ubiquitous-20140526.1306/ido-ubiquitous.elc new file mode 100644 index 0000000000000000000000000000000000000000..17ebfa85dda50dc7ef5ad978d69117f328e1b5a3 GIT binary patch literal 29123 zcmeHw3v(Msb}p$0tz~MJWK;KE-&?7q4aFwt(on$QK}wD{qA1#CRu6}w?R70wR|8;3 zP6W)r7(f)aQg#3O{l0U$=LLYG*LhS@@h(MRrXQ!fPoMLhM>oGXe0K1^*4EZGzxd({ zbC8TD(I_06{-qfQv&Z;Jz30K;Ns_$X86|^YWRlpt3T9@1erC)=)7*X3Za!)?jNfRs zrHRvNGB&4Z#60*e4X5b?wDDjk90!ARXZRo-O@ar}F!AR7=%;x!OXjJ^s*R4{-D$QO z-O9_Ia3rlpu{mTD<{g@hK!e}jY3(%S-9X%*@4k7@Nyv zZswC=fQRLx_fZJz^DdZ1K_4tL4lX&po0uytKQ!}r7LBBZX_(G}=}Z}6=WjRb!|)XA zfVC?(>Ny^%`CzGq~|yJfj@rnORM;$ zjkg{Abno^2#%|60VH$#gr!pci&%0<4n!(7#_G1j9<0PC;lj&>I-o`9;eRCYn=F=Eu z#-YKqrI+J=GP-Z3`dAs#1gVM0z4cS%^)FOR)fC&$}5-e45r{Z?hbUXXgW_Psy& zon4I0Z#Ex-(AKZkII?w&q_JxW*KR#h@!GWP^z7|+w_pEzkSSv}RWdi$guskc%x@H9 z8^t+=%|^RL61nVA9C{bg@GP8}tx@pDOAkyFoatv%dltRLUc+OfW$v5)e1GUK1a7W!q!jX4$dc{NE+-@hT%zpRY&9Q(Kkq%>_09gsc6K_C2O`Y!p1AYe zW9`)hXOKjoE_*D*ttLju5Q-qCiX^oC-Nh}^YPxLtj4tNP$(^}&tXQga=Bw(!&5*!Tp$IvX4Kx4Ur%|L*o$+^o&!M(-5AeEgtf z6T4GBV~66^Uv2zV58Gg49v=^GWt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7oUt6 zF_S_I%qG{wD8Jj-mAP9E5DInjUVpB<-ECq`=7mK$$VLw9GgnOicR~dBpJWYq-pg`` zOGwTfC7 zJ*!$DifYvz$z^|E#o69f!lP{Ud%0LqjRLRf(z`wj%Y|G00f~|EhRX7Eh9SuO^Zkmd0xxs$rwOo{b&hg zUZ{n)OYKpfF5?S$1ms4=+}e8jfn9Aay=oG=U(zSAFC=sx z{Sn$4hKHP|C^w8`D&AfSsG-gkKuP(#Z8pV^4O|00u=}MqWb;n|@Gx5Ef65Ky_+@3N zPifov^R-?q@IszbK6dz=>ZVMlCI?B(8#BvWpdwyAfjN>4AuA_j7AoFEE#L-6IcDch z{}MoTo^3+2Bo;{tBK>@J=yY}`W&J&Povlx)iTkFA`((N`F;ak8c@z$QNE$P*8h~_= z)^*dt4ul0Fl1HsNTqr;oCkvu~SSkpK;3% literal 0 HcmV?d00001 diff --git a/elpa/inf-ruby-20140809.416/inf-ruby-autoloads.el b/elpa/inf-ruby-20140809.416/inf-ruby-autoloads.el new file mode 100644 index 000000000..4ed47ec2b --- /dev/null +++ b/elpa/inf-ruby-20140809.416/inf-ruby-autoloads.el @@ -0,0 +1,103 @@ +;;; inf-ruby-autoloads.el --- automatically extracted autoloads +;; +;;; Code: + + +;;;### (autoloads (inf-ruby-file-contents-match inf-ruby-console-default +;;;;;; inf-ruby-console-gem inf-ruby-console-rails inf-ruby-console-auto +;;;;;; inf-ruby-switch-setup run-ruby inf-ruby inf-ruby-minor-mode +;;;;;; inf-ruby-setup-keybindings) "inf-ruby" "inf-ruby.el" (21478 +;;;;;; 16680 0 0)) +;;; Generated autoloads from inf-ruby.el + +(defvar ruby-source-modes '(ruby-mode enh-ruby-mode) "\ +Used to determine if a buffer contains Ruby source code. +If it's loaded into a buffer that is in one of these major modes, it's +considered a ruby source file by `ruby-load-file'. +Used by these commands to determine defaults.") + +(autoload 'inf-ruby-setup-keybindings "inf-ruby" "\ +Hook up `inf-ruby-minor-mode' to each of `ruby-source-modes'. + +\(fn)" nil nil) + +(autoload 'inf-ruby-minor-mode "inf-ruby" "\ +Minor mode for interacting with the inferior process buffer. + +The following commands are available: + +\\{inf-ruby-minor-mode-map} + +\(fn &optional ARG)" t nil) + +(autoload 'inf-ruby "inf-ruby" "\ +Run an inferior Ruby process in a buffer. +With prefix argument, prompts for which Ruby implementation +\(from the list `inf-ruby-implementations') to use. Runs the +hooks `inf-ruby-mode-hook' (after the `comint-mode-hook' is +run). + +\(fn &optional IMPL)" t nil) + +(autoload 'run-ruby "inf-ruby" "\ +Run an inferior Ruby process, input and output via buffer `*NAME*'. +If there is a process already running in `*NAME*', switch to that buffer. + +NAME defaults to \"ruby\". COMMAND defaults to the default entry +in `inf-ruby-implementations'. + +\(Type \\[describe-mode] in the process buffer for the list of commands.) + +\(fn &optional COMMAND NAME)" t nil) + +(autoload 'inf-ruby-switch-setup "inf-ruby" "\ +Modify `rspec-compilation-mode' and `ruby-compilation-mode' +keymaps to bind `inf-ruby-switch-from-compilation' to `С-x C-q'. + +\(fn)" nil nil) + +(autoload 'inf-ruby-console-auto "inf-ruby" "\ +Run the appropriate Ruby console command. +The command and and the directory to run it from are detected +automatically. + +\(fn)" t nil) + +(autoload 'inf-ruby-console-rails "inf-ruby" "\ +Run Rails console in DIR. + +\(fn DIR)" t nil) + +(autoload 'inf-ruby-console-gem "inf-ruby" "\ +Run IRB console for the gem in DIR. +The main module should be loaded automatically. If DIR contains a +Gemfile, it should use the `gemspec' instruction. + +\(fn DIR)" t nil) + +(autoload 'inf-ruby-console-default "inf-ruby" "\ +Run racksh, custom console.rb, or just IRB, in DIR. + +\(fn DIR)" t nil) + +(autoload 'inf-ruby-file-contents-match "inf-ruby" "\ + + +\(fn FILE REGEXP &optional MATCH-GROUP)" nil nil) + (dolist (mode ruby-source-modes) (add-hook (intern (format "%s-hook" mode)) 'inf-ruby-minor-mode)) + +;;;*** + +;;;### (autoloads nil nil ("inf-ruby-pkg.el") (21478 16680 797816 +;;;;;; 0)) + +;;;*** + +(provide 'inf-ruby-autoloads) +;; Local Variables: +;; version-control: never +;; no-byte-compile: t +;; no-update-autoloads: t +;; coding: utf-8 +;; End: +;;; inf-ruby-autoloads.el ends here diff --git a/elpa/inf-ruby-20140809.416/inf-ruby-pkg.el b/elpa/inf-ruby-20140809.416/inf-ruby-pkg.el new file mode 100644 index 000000000..6cbc66d0c --- /dev/null +++ b/elpa/inf-ruby-20140809.416/inf-ruby-pkg.el @@ -0,0 +1 @@ +(define-package "inf-ruby" "20140809.416" "Run a Ruby process in a buffer" (quote nil)) diff --git a/elpa/inf-ruby-20140809.416/inf-ruby-pkg.elc b/elpa/inf-ruby-20140809.416/inf-ruby-pkg.elc new file mode 100644 index 0000000000000000000000000000000000000000..2bfef29748130f2f9b454a3389a7c432623ad8db GIT binary patch literal 616 zcmbtR%TB{E5bQZWz;)CUNW^JE1xL zq?`^AP4F!m20`&0b%+IH6hgNoqfmvm9TmnkdFWTWe7`iAO=>YM&wr}jb}h6Wz>LGq zeiJW@WSF{|iZf9Ty;qYqAj^unWLon^i3g&{hUU}8#19pH)Dddus5KJG%b0?3>v+oD z5EDo#KKGlatVLD-!%&_voKKM6CF0>eHTjGyF28zQ-rhoPD3DAn@^qjlrw~0PIjl6S zr#~d0$3$of*64t=;lb+cgO`0cDE0yljV#NKm2QmFc}H?fYmM=jYh#Rm`^L|Q-huGI Xj-m@*>KOMQN?7$xqr(`^*puuXAo#U< literal 0 HcmV?d00001 diff --git a/elpa/inf-ruby-20140809.416/inf-ruby.el b/elpa/inf-ruby-20140809.416/inf-ruby.el new file mode 100644 index 000000000..6de18a7af --- /dev/null +++ b/elpa/inf-ruby-20140809.416/inf-ruby.el @@ -0,0 +1,721 @@ +;;; inf-ruby.el --- Run a Ruby process in a buffer + +;; Copyright (C) 1999-2008 Yukihiro Matsumoto, Nobuyoshi Nakada + +;; Author: Yukihiro Matsumoto +;; Nobuyoshi Nakada +;; Cornelius Mika +;; Dmitry Gutov +;; Kyle Hargraves +;; URL: http://github.com/nonsequitur/inf-ruby +;; Created: 8 April 1998 +;; Keywords: languages ruby +;; Version: 20140809.416 +;; X-Original-Version: 2.3.2 + +;; 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 . + +;; This file is not part of GNU Emacs. + +;;; Commentary: +;; +;; inf-ruby provides a REPL buffer connected to a Ruby subprocess. +;; +;; If you're installing manually, you'll need to: +;; * drop the file somewhere on your load path (perhaps ~/.emacs.d) +;; * Add the following lines to your .emacs file: +;; +;; (autoload 'inf-ruby "inf-ruby" "Run an inferior Ruby process" t) +;; (add-hook 'ruby-mode-hook 'inf-ruby-minor-mode) +;; +;; Or, for enh-ruby-mode: +;; +;; (add-hook 'enh-ruby-mode-hook 'inf-ruby-minor-mode) +;; +;; Installation via ELPA interface does the above for you +;; automatically. +;; +;; Additionally, consider adding +;; +;; (add-hook 'after-init-hook 'inf-ruby-switch-setup) +;; +;; to your init file to easily switch from common Ruby compilation +;; modes to interact with a debugger. +;; +;; To call `inf-ruby-console-auto' more easily, you can, for example, +;; replace the original `inf-ruby' binding: +;; +;; (eval-after-load 'inf-ruby +;; '(define-key inf-ruby-minor-mode-map +;; (kbd "C-c C-s") 'inf-ruby-console-auto)) + +;;; Code: + +(require 'comint) +(require 'compile) +(require 'ruby-mode) +(require 'thingatpt) + +(eval-when-compile + (defvar rspec-compilation-mode-map) + (defvar ruby-compilation-mode-map)) + +(defgroup inf-ruby nil + "Run Ruby process in a buffer" + :group 'languages) + +(defcustom inf-ruby-prompt-read-only t + "If non-nil, the prompt will be read-only. + +Also see the description of `ielm-prompt-read-only'.") + +(defvar inf-ruby-default-implementation "ruby" + "Which Ruby implementation to use if none is specified.") + +(defconst inf-ruby-prompt-format + (concat + (mapconcat + #'identity + '("\\(^%s> *\\)" ; Simple + "\\(^(rdb:1) *\\)" ; Debugger + "\\(^(byebug) *\\)" ; byebug + "\\(^\\(irb([^)]+)" ; IRB default + "\\([[0-9]+] \\)?[Pp]ry ?([^)]+)" ; Pry + "\\(jruby-\\|JRUBY-\\)?[1-9]\\.[0-9]\\.[0-9]+\\(-?p?[0-9]+\\)?" ; RVM + "^rbx-head\\)") ; RVM continued + "\\|") + ;; Statement and nesting counters, common to the last four. + " ?[0-9:]* ?%s *\\)") + "Format string for the prompt regexp pattern. +Two placeholders: first char in the Simple prompt, and the last +graphical char in all other prompts.") + +(defvar inf-ruby-first-prompt-pattern (format inf-ruby-prompt-format ">" ">") + "First prompt regex pattern of Ruby interpreter.") + +(defvar inf-ruby-prompt-pattern (format inf-ruby-prompt-format "[?>]" "[\]>*\"'/`]") + "Prompt regex pattern of Ruby interpreter.") + +(defvar inf-ruby-mode-hook nil + "Hook for customizing `inf-ruby-mode'.") + +(defvar inf-ruby-mode-map + (let ((map (copy-keymap comint-mode-map))) + (define-key map (kbd "C-c C-l") 'ruby-load-file) + (define-key map (kbd "C-x C-e") 'ruby-send-last-sexp) + (define-key map (kbd "TAB") 'inf-ruby-complete) + (define-key map (kbd "C-x C-q") 'inf-ruby-maybe-switch-to-compilation) + (define-key map (kbd "C-c C-z") 'ruby-switch-to-last-ruby-buffer) + map) + "Mode map for `inf-ruby-mode'.") + +(defvar inf-ruby-implementations + '(("ruby" . "irb --prompt default --noreadline -r irb/completion") + ("jruby" . "jruby -S irb --prompt default --noreadline -r irb/completion") + ("rubinius" . "rbx -r irb/completion") + ("yarv" . "irb1.9 -r irb/completion") + ("macruby" . "macirb -r irb/completion") + ("pry" . "pry")) + "An alist of ruby implementations to irb executable names.") + +;;;###autoload +(defvar ruby-source-modes '(ruby-mode enh-ruby-mode) + "Used to determine if a buffer contains Ruby source code. +If it's loaded into a buffer that is in one of these major modes, it's +considered a ruby source file by `ruby-load-file'. +Used by these commands to determine defaults.") + +(defvar ruby-prev-l/c-dir/file nil + "Caches the last (directory . file) pair. +Caches the last pair used in the last `ruby-load-file' command. +Used for determining the default in the +next one.") + +(defvar inf-ruby-at-top-level-prompt-p t) +(make-variable-buffer-local 'inf-ruby-at-top-level-prompt-p) + +(defvar inf-ruby-last-prompt nil) +(make-variable-buffer-local 'inf-ruby-last-prompt) + +(defconst inf-ruby-error-regexp-alist + '(("SyntaxError: \\(?:compile error\n\\)?\\([^\(].*\\):\\([1-9][0-9]*\\):" 1 2) + ("^\tfrom \\([^\(].*\\):\\([1-9][0-9]*\\)\\(:in `.*'\\)?$" 1 2))) + +;;;###autoload +(defun inf-ruby-setup-keybindings () + "Hook up `inf-ruby-minor-mode' to each of `ruby-source-modes'." + (warn "`inf-ruby-setup-keybindings' is deprecated, please don't use it anymore.") + (warn "If you're using `inf-ruby' from Git, please look up the new usage instructions.")) + +(make-obsolete 'inf-ruby-setup-keybindings 'add-hook "2.3.1") + +(defvar inf-ruby-minor-mode-map + (let ((map (make-sparse-keymap))) + (define-key map (kbd "C-M-x") 'ruby-send-definition) + (define-key map (kbd "C-x C-e") 'ruby-send-last-sexp) + (define-key map (kbd "C-c C-b") 'ruby-send-block) + (define-key map (kbd "C-c M-b") 'ruby-send-block-and-go) + (define-key map (kbd "C-c C-x") 'ruby-send-definition) + (define-key map (kbd "C-c M-x") 'ruby-send-definition-and-go) + (define-key map (kbd "C-c C-r") 'ruby-send-region) + (define-key map (kbd "C-c M-r") 'ruby-send-region-and-go) + (define-key map (kbd "C-c C-z") 'ruby-switch-to-inf) + (define-key map (kbd "C-c C-l") 'ruby-load-file) + (define-key map (kbd "C-c C-s") 'inf-ruby) + map)) + +;;;###autoload +(define-minor-mode inf-ruby-minor-mode + "Minor mode for interacting with the inferior process buffer. + +The following commands are available: + +\\{inf-ruby-minor-mode-map}" + :lighter "" :keymap inf-ruby-minor-mode-map) + +(defvar inf-ruby-buffer nil "Current Ruby process buffer.") + +(defun inf-ruby-mode () + "Major mode for interacting with an inferior Ruby REPL process. + +A simple IRB process can be fired up with \\[inf-ruby]. + +To launch a REPL with project-specific console instead, type +\\[inf-ruby-console-auto]. It recognizes several +project types, including Rails, gems and anything with `racksh' +in their Gemfile. + +Customization: When entered, this mode runs `comint-mode-hook' and +`inf-ruby-mode-hook' (in that order). + +You can send text to the inferior Ruby process from other buffers containing +Ruby source. + + `ruby-switch-to-inf' switches the current buffer to the ruby process buffer. + `ruby-send-definition' sends the current definition to the ruby process. + `ruby-send-region' sends the current region to the ruby process. + `ruby-send-definition-and-go' and `ruby-send-region-and-go' + switch to the ruby process buffer after sending their text. + +Commands: +`RET' after the end of the process' output sends the text from the + end of process to point. +`RET' before the end of the process' output copies the sexp ending at point + to the end of the process' output, and sends it. +`DEL' converts tabs to spaces as it moves back. +`TAB' completes the input at point. IRB, Pry and Bond completion is supported. +`C-M-q' does `TAB' on each line starting within following expression. +Paragraphs are separated only by blank lines. # start comments. +If you accidentally suspend your process, use \\[comint-continue-subjob] +to continue it. + +The following commands are available: + +\\{inf-ruby-mode-map}" + (interactive) + (let ((orig-mode-line-process mode-line-process)) + (comint-mode) + (when orig-mode-line-process + (setq mode-line-process orig-mode-line-process))) + (setq comint-prompt-regexp inf-ruby-prompt-pattern) + (ruby-mode-variables) + (setq major-mode 'inf-ruby-mode) + (setq mode-name "Inf-Ruby") + (use-local-map inf-ruby-mode-map) + (add-hook 'comint-output-filter-functions 'inf-ruby-output-filter nil t) + (setq comint-get-old-input 'inf-ruby-get-old-input) + (set (make-local-variable 'compilation-error-regexp-alist) + inf-ruby-error-regexp-alist) + (set (make-local-variable 'comint-prompt-read-only) inf-ruby-prompt-read-only) + (when (eq system-type 'windows-nt) + (setq comint-process-echoes t)) + (compilation-shell-minor-mode t) + (run-hooks 'inf-ruby-mode-hook)) + +(defun inf-ruby-output-filter (output) + "Check if the current prompt is a top-level prompt." + (unless (zerop (length output)) + (setq inf-ruby-last-prompt (car (last (split-string output "\n"))) + inf-ruby-at-top-level-prompt-p + (string-match inf-ruby-first-prompt-pattern + inf-ruby-last-prompt)))) + +;; adapted from replace-in-string in XEmacs (subr.el) +(defun inf-ruby-remove-in-string (str regexp) + "Remove all matches in STR for REGEXP and returns the new string." + (let ((rtn-str "") (start 0) match prev-start) + (while (setq match (string-match regexp str start)) + (setq prev-start start + start (match-end 0) + rtn-str (concat rtn-str (substring str prev-start match)))) + (concat rtn-str (substring str start)))) + +(defun inf-ruby-get-old-input () + "Snarf the sexp ending at point." + (save-excursion + (let ((end (point))) + (re-search-backward inf-ruby-first-prompt-pattern) + (inf-ruby-remove-in-string (buffer-substring (point) end) + inf-ruby-prompt-pattern)))) + +;;;###autoload +(defun inf-ruby (&optional impl) + "Run an inferior Ruby process in a buffer. +With prefix argument, prompts for which Ruby implementation +\(from the list `inf-ruby-implementations') to use. Runs the +hooks `inf-ruby-mode-hook' \(after the `comint-mode-hook' is +run)." + + (interactive (list (if current-prefix-arg + (completing-read "Ruby Implementation: " + (mapc #'car inf-ruby-implementations)) + inf-ruby-default-implementation))) + (setq impl (or impl "ruby")) + + (let ((command (cdr (assoc impl inf-ruby-implementations)))) + (run-ruby command impl))) + +;;;###autoload +(defun run-ruby (&optional command name) + "Run an inferior Ruby process, input and output via buffer `*NAME*'. +If there is a process already running in `*NAME*', switch to that buffer. + +NAME defaults to \"ruby\". COMMAND defaults to the default entry +in `inf-ruby-implementations'. + +\(Type \\[describe-mode] in the process buffer for the list of commands.)" + + (interactive) + (setq command (or command (cdr (assoc inf-ruby-default-implementation + inf-ruby-implementations)))) + (setq name (or name "ruby")) + + (if (not (comint-check-proc inf-ruby-buffer)) + (let ((commandlist (split-string-and-unquote command)) + (buffer (current-buffer)) + (process-environment process-environment)) + ;; http://debbugs.gnu.org/15775 + (setenv "PAGER" (executable-find "cat")) + (set-buffer (apply 'make-comint name (car commandlist) + nil (cdr commandlist))) + (inf-ruby-mode) + (ruby-remember-ruby-buffer buffer))) + (pop-to-buffer (setq inf-ruby-buffer (format "*%s*" name)))) + +(defun inf-ruby-proc () + "Return the current inferior Ruby process. + +See variable `inf-ruby-buffer'." + (or (get-buffer-process (if (eq major-mode 'inf-ruby-mode) + (current-buffer) + inf-ruby-buffer)) + (error "No current process. See variable inf-ruby-buffer"))) + +;; These commands are added to the ruby-mode keymap: + +(defconst ruby-send-terminator "--inf-ruby-%x-%d-%d-%d--" + "Template for irb here document terminator. +Must not contain ruby meta characters.") + +(defconst inf-ruby-eval-binding + (concat "(IRB.conf[:MAIN_CONTEXT] && IRB.conf[:MAIN_CONTEXT].workspace.binding) || " + "(defined?(Pry) && Pry.toplevel_binding)")) + +(defconst ruby-eval-separator "") + +(defun ruby-send-region (start end) + "Send the current region to the inferior Ruby process." + (interactive "r") + (let (term (file (or buffer-file-name (buffer-name))) line) + (save-excursion + (save-restriction + (widen) + (goto-char start) + (setq line (+ start (forward-line (- start)) 1)) + (goto-char start) + (while (progn + (setq term (apply 'format ruby-send-terminator (random) (current-time))) + (re-search-forward (concat "^" (regexp-quote term) "$") end t))))) + ;; compilation-parse-errors parses from second line. + (save-excursion + (let ((m (process-mark (inf-ruby-proc)))) + (set-buffer (marker-buffer m)) + (goto-char m) + (insert ruby-eval-separator "\n") + (set-marker m (point)))) + (comint-send-string (inf-ruby-proc) (format "eval <<'%s', %s, %S, %d\n" + term inf-ruby-eval-binding + file line)) + (comint-send-region (inf-ruby-proc) start end) + (comint-send-string (inf-ruby-proc) (concat "\n" term "\n")))) + +(defun ruby-send-definition () + "Send the current definition to the inferior Ruby process." + (interactive) + (save-excursion + (ruby-end-of-defun) + (let ((end (point))) + (ruby-beginning-of-defun) + (ruby-send-region (point) end)))) + +(defun ruby-send-last-sexp () + "Send the previous sexp to the inferior Ruby process." + (interactive) + (ruby-send-region (save-excursion (ruby-backward-sexp) (point)) (point))) + +(defun ruby-send-block () + "Send the current block to the inferior Ruby process." + (interactive) + (save-excursion + (ruby-end-of-block) + (end-of-line) + (let ((end (point))) + (ruby-beginning-of-block) + (ruby-send-region (point) end)))) + +(defvar ruby-last-ruby-buffer nil + "The last buffer we switched to `inf-ruby' from.") + +(defun ruby-remember-ruby-buffer (buffer) + (setq ruby-last-ruby-buffer buffer)) + +(defun ruby-switch-to-inf (eob-p) + "Switch to the ruby process buffer. +With argument, positions cursor at end of buffer." + (interactive "P") + (let ((buffer (current-buffer))) + (if (and inf-ruby-buffer (get-buffer inf-ruby-buffer)) + (progn + (pop-to-buffer inf-ruby-buffer) + (ruby-remember-ruby-buffer buffer)) + (error "No current process buffer, see variable inf-ruby-buffer"))) + (cond (eob-p + (push-mark) + (goto-char (point-max))))) + +(defun ruby-switch-to-last-ruby-buffer () + "Switch back to the last Ruby buffer." + (interactive) + (if (and ruby-last-ruby-buffer + (buffer-live-p ruby-last-ruby-buffer)) + (pop-to-buffer ruby-last-ruby-buffer) + (message "Don't know the original Ruby buffer"))) + +(defun ruby-send-region-and-go (start end) + "Send the current region to the inferior Ruby process. +Then switch to the process buffer." + (interactive "r") + (ruby-send-region start end) + (ruby-switch-to-inf t)) + +(defun ruby-send-definition-and-go () + "Send the current definition to the inferior Ruby. +Then switch to the process buffer." + (interactive) + (ruby-send-definition) + (ruby-switch-to-inf t)) + +(defun ruby-send-block-and-go () + "Send the current block to the inferior Ruby. +Then switch to the process buffer." + (interactive) + (ruby-send-block) + (ruby-switch-to-inf t)) + +(defun ruby-load-file (file-name) + "Load a Ruby file into the inferior Ruby process." + (interactive (comint-get-source "Load Ruby file: " ruby-prev-l/c-dir/file + ruby-source-modes t)) ;; T because LOAD needs an exact name + (comint-check-source file-name) ; Check to see if buffer needs saved. + (setq ruby-prev-l/c-dir/file (cons (file-name-directory file-name) + (file-name-nondirectory file-name))) + (comint-send-string (inf-ruby-proc) (concat "(load \"" + file-name + "\"\)\n"))) + +(defun ruby-escape-single-quoted (str) + "Escape single quotes, double quotes and newlines in STR." + (replace-regexp-in-string "'" "\\\\'" + (replace-regexp-in-string "\n" "\\\\n" + (replace-regexp-in-string "\\\\" "\\\\\\\\" str)))) + +(defun inf-ruby-completions (expr) + "Return a list of completions for the Ruby expression starting with EXPR." + (let* ((proc (inf-ruby-proc)) + (line (buffer-substring (save-excursion (move-beginning-of-line 1) + (point)) + (point))) + (comint-filt (process-filter proc)) + (kept "") completions + ;; Guard against running completions in parallel: + inf-ruby-at-top-level-prompt-p) + (unless (equal "(rdb:1) " inf-ruby-last-prompt) + (set-process-filter proc (lambda (proc string) (setq kept (concat kept string)))) + (unwind-protect + (let ((completion-snippet + (format + (concat + "proc { |expr, line|" + " require 'ostruct';" + " old_wp = defined?(Bond) && Bond.started? && Bond.agent.weapon;" + " begin" + " Bond.agent.instance_variable_set('@weapon'," + " OpenStruct.new(line_buffer: line)) if old_wp;" + " if defined?(_pry_.complete) then" + " puts _pry_.complete(expr)" + " else" + " completer = if defined?(_pry_) then" + " Pry.config.completer.build_completion_proc(binding, _pry_)" + " elsif old_wp then" + " Bond.agent" + " elsif defined?(IRB::InputCompletor::CompletionProc) then" + " IRB::InputCompletor::CompletionProc" + " end and puts completer.call(expr).compact" + " end" + " ensure" + " Bond.agent.instance_variable_set('@weapon', old_wp) if old_wp " + " end " + "}.call('%s', '%s')\n") + (ruby-escape-single-quoted expr) + (ruby-escape-single-quoted line)))) + (process-send-string proc completion-snippet) + (while (and (not (string-match inf-ruby-prompt-pattern kept)) + (accept-process-output proc 2))) + (setq completions (butlast (split-string kept "\r?\n") 2)) + ;; Subprocess echoes output on Windows and OS X. + (when (and completions (string= (concat (car completions) "\n") completion-snippet)) + (setq completions (cdr completions)))) + (set-process-filter proc comint-filt))) + completions)) + +(defconst inf-ruby-ruby-expr-break-chars " \t\n\"\'`><,;|&{(") + +(defun inf-ruby-completion-bounds-of-expr-at-point () + "Return bounds of expression at point to complete." + (save-excursion + (let ((end (point))) + (skip-chars-backward (concat "^" inf-ruby-ruby-expr-break-chars)) + (cons (point) end)))) + +(defun inf-ruby-completion-expr-at-point () + "Return expression at point to complete." + (let ((bounds (inf-ruby-completion-bounds-of-expr-at-point))) + (buffer-substring (car bounds) (cdr bounds)))) + +(defun inf-ruby-completion-at-point () + "Retrieve the list of completions and prompt the user. +Returns the selected completion or nil." + (if inf-ruby-at-top-level-prompt-p + (let* ((expr (inf-ruby-completion-expr-at-point)) + (completions (inf-ruby-completions expr))) + (if completions + (if (= (length completions) 1) + (car completions) + (completing-read "possible completions: " + completions nil t expr)))) + (message "Completion aborted: Not at a top-level prompt") + nil)) + +(defun inf-ruby-complete () + "Complete the Ruby code at point. +Uses the first one available of Pry, Bond and the default IRB +completion." + (interactive) + (let ((replacement (inf-ruby-completion-at-point))) + (when replacement + (inf-ruby-complete-replace-expr replacement)))) + +(defun inf-ruby-complete-replace-expr (str) + "Replace expression at point with STR." + (let ((bounds (inf-ruby-completion-bounds-of-expr-at-point))) + (delete-region (car bounds) (cdr bounds))) + (insert str)) + +(defun inf-ruby-complete-or-tab () + "Complete the Ruby code at point or call `indent-for-tab-command'." + (interactive) + (let ((replacement (inf-ruby-completion-at-point))) + (if (not replacement) + (call-interactively 'indent-for-tab-command) + (inf-ruby-complete-replace-expr replacement)))) + +(defvar inf-ruby-orig-compilation-mode nil + "Original compilation mode before switching to `inf-ruby-mode'.") + +(defvar inf-ruby-orig-process-filter nil + "Original process filter before switching to `inf-ruby-mode'.") + +(defun inf-ruby-switch-from-compilation () + "Make the buffer writable and switch to `inf-ruby-mode'. +Recommended for use when the program being executed enters +interactive mode, i.e. hits a debugger breakpoint." + (interactive) + (setq buffer-read-only nil) + (buffer-enable-undo) + (let ((mode major-mode)) + (inf-ruby-mode) + (make-local-variable 'inf-ruby-orig-compilation-mode) + (setq inf-ruby-orig-compilation-mode mode)) + (let ((proc (get-buffer-process (current-buffer)))) + (when proc + (make-local-variable 'inf-ruby-orig-process-filter) + (setq inf-ruby-orig-process-filter (process-filter proc)) + (set-process-filter proc 'comint-output-filter)) + (when (looking-back inf-ruby-prompt-pattern (line-beginning-position)) + (let ((line (match-string 0))) + (delete-region (match-beginning 0) (point)) + (comint-output-filter proc line))))) + +(defun inf-ruby-maybe-switch-to-compilation () + "Switch to compilation mode this buffer was in before +`inf-ruby-switch-from-compilation' was called, if it was. +Otherwise, just toggle read-only status." + (interactive) + (if inf-ruby-orig-compilation-mode + (let ((orig-mode-line-process mode-line-process) + (proc (get-buffer-process (current-buffer))) + (filter inf-ruby-orig-process-filter)) + (funcall inf-ruby-orig-compilation-mode) + (setq mode-line-process orig-mode-line-process) + (when proc + (set-process-filter proc filter))) + (toggle-read-only))) + +;;;###autoload +(defun inf-ruby-switch-setup () + "Modify `rspec-compilation-mode' and `ruby-compilation-mode' +keymaps to bind `inf-ruby-switch-from-compilation' to `С-x C-q'." + (eval-after-load 'rspec-mode + '(define-key rspec-compilation-mode-map (kbd "C-x C-q") + 'inf-ruby-switch-from-compilation)) + (eval-after-load 'ruby-compilation + '(define-key ruby-compilation-mode-map (kbd "C-x C-q") + 'inf-ruby-switch-from-compilation))) + +(defvar inf-ruby-console-patterns-alist + '(("config/application.rb" . rails) + ("*.gemspec" . gem) + ("Gemfile" . default)) + "Mapping from file name patterns to name symbols. +`inf-ruby-console-auto' walks up from the current directory until +one of the patterns matches, then calls `inf-ruby-console-NAME', +passing it the found directory.") + +(defun inf-ruby-console-match (dir) + "Find matching console command for DIR, if any." + (catch 'type + (dolist (pair inf-ruby-console-patterns-alist) + (let ((default-directory dir)) + (when (file-expand-wildcards (car pair)) + (throw 'type (cdr pair))))))) + +;;;###autoload +(defun inf-ruby-console-auto () + "Run the appropriate Ruby console command. +The command and and the directory to run it from are detected +automatically." + (interactive) + (let* ((dir (locate-dominating-file default-directory + #'inf-ruby-console-match)) + (type (inf-ruby-console-match dir)) + (fun (intern (format "inf-ruby-console-%s" type)))) + (unless type (error "No matching directory found")) + (funcall fun dir))) + +;;;###autoload +(defun inf-ruby-console-rails (dir) + "Run Rails console in DIR." + (interactive "D") + (let* ((default-directory (file-name-as-directory dir)) + (envs (inf-ruby-console-rails-envs)) + (env (completing-read "Rails environment: " envs nil t + nil nil (car (member "development" envs)))) + (with-bundler (file-exists-p "Gemfile"))) + (run-ruby (concat (when with-bundler "bundle exec ") + "rails console " + env) + "rails"))) + +(defun inf-ruby-console-rails-envs () + (let ((files (file-expand-wildcards "config/environments/*.rb"))) + (if (null files) + (error "No files in %s" (expand-file-name "config/environments/")) + (mapcar #'file-name-base files)))) + +;;;###autoload +(defun inf-ruby-console-gem (dir) + "Run IRB console for the gem in DIR. +The main module should be loaded automatically. If DIR contains a +Gemfile, it should use the `gemspec' instruction." + (interactive "D") + (let* ((default-directory (file-name-as-directory dir)) + (gemspec (car (file-expand-wildcards "*.gemspec"))) + (base-command + (if (file-exists-p "Gemfile") + (if (inf-ruby-file-contents-match gemspec "\\$LOAD_PATH") + "bundle exec irb" + "bundle exec irb -I lib") + "irb -I lib")) + (name (inf-ruby-file-contents-match + gemspec "\\.name[ \t]*=[ \t]*\"\\([^\"]+\\)\"" 1)) + args files) + (unless (file-exists-p "lib") + (error "The directory must contain a 'lib' subdirectory")) + (let ((feature (and name (replace-regexp-in-string "-" "/" name)))) + (if (and feature (file-exists-p (concat "lib/" feature ".rb"))) + ;; There exists the main file corresponding to the gem name, + ;; let's require it. + (setq args (concat " -r " feature)) + ;; Let's require all non-directory files under lib, instead. + (dolist (item (directory-files "lib")) + (unless (file-directory-p (format "lib/%s" item)) + (push item files))) + (setq args + (mapconcat + (lambda (file) + (concat " -r " (file-name-sans-extension file))) + files + "")))) + (run-ruby (concat base-command args) "gem"))) + +;;;###autoload +(defun inf-ruby-console-default (dir) + "Run racksh, custom console.rb, or just IRB, in DIR." + (interactive "D") + (let ((default-directory (file-name-as-directory dir))) + (unless (file-exists-p "Gemfile") + (error "The directory must contain a Gemfile")) + (cond + ((inf-ruby-file-contents-match "Gemfile" "[\"']racksh[\"']") + (run-ruby "bundle exec racksh" "racksh")) + ((inf-ruby-file-contents-match "Gemfile" "[\"']pry[\"']") + (run-ruby "bundle exec pry" "pry")) + ((file-exists-p "console.rb") + (run-ruby "bundle exec ruby console.rb" "console.rb")) + (t + (run-ruby "bundle console"))))) + +;;;###autoload +(defun inf-ruby-file-contents-match (file regexp &optional match-group) + (with-temp-buffer + (insert-file-contents file) + (when (re-search-forward regexp nil t) + (if match-group + (match-string match-group) + t)))) + +;;;###autoload (dolist (mode ruby-source-modes) (add-hook (intern (format "%s-hook" mode)) 'inf-ruby-minor-mode)) + +(provide 'inf-ruby) +;;; inf-ruby.el ends here diff --git a/elpa/inf-ruby-20140809.416/inf-ruby.elc b/elpa/inf-ruby-20140809.416/inf-ruby.elc new file mode 100644 index 0000000000000000000000000000000000000000..7057f917023178a4720cecee1afd70475fadbc61 GIT binary patch literal 23267 zcmbtc3wPVbmG)^*w-SA#&8vZe$8vh5Q8K> zQv(d5?tYVoNqQG!+^vRZK`*WL?}npsaCaCD++^ClaM`K0UE8TPyjFI#8jfV3VWb|g zmwJIwhIp*ssMf2V+&dpmPE|0%Y{rw}+3=si1P#(^Np3zp9j1B)y*Qc#!zfkL$-v!K zQ5?DZPwqc_sCuVC67(h*cuTqjQD3F8>IG30PgFNlqd4e;48v#=n_2k2iW3zE$!HiR z)l!9BD&2S*^~b6#%X7^{H%f~CDt}OwAPEO*=BBE6uBwc}=maa6xwEmcq3-S5&gmo> zMknqlOw;jfJLULw$2JR-1haCE*VD2(4^q{$8#usaO+LTQiH`!T)=_I8ZfppZu-jMs zE0s!>?!_c@dvQNhPN!b0;m2F;_#Qv-$1i@V7r!*@mnNFE@YC+p+0FCt~d0d@R%AWaSueqZ562QbTA+pc6FCg5S>helMr;99q~nw41+Fs*beGq zn6vT3O~Rn>#?k0PO_cL+AS{LFZDDdDAB8sRdFz?FbwGE*!77#*$`_>QI2?d z6r_{VNfL~)P^cN(Lxddn6Vo9zYl3KF-1+Un^f=i?{7bgQPkjx)8jlUnodshI)I*nH z9|RpvE>y+obSmGjr=P0LPG`e`0N`sS>34U%jhRc`i?BOAnYo6h!=zg|{C4B$Bh&Tp zu;%U@eRQNS*uBHYVl?$M^Yx1Q=rAF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nOIoi=EJ~1wi?sc|ky1C(+PUJ4b6gGsmh) z?}OXxdQe{?1dS%PSXXOn$4f*^UJJmqnqcp+a%WEs;mG#eV ztglq|+35y5HM%IutT$j98{P^Q(D2uO2N$wYzy8`|`~f+#9Nc0hV73OQNO986T57>S zs7o^3d|4X^w_UPjMeJZ&T$1cek4OXZ4-`QPoQLu*rfWa^^6UN2pFQ4x`X>l?QTXvL ztjkxF`w+P)-jG*i*)MqUALo3imX9_+k>6koz77b9U%U)(g9&v{LYI#8HX`_R#!Q~k zk1`C7P(T?iacFwl%`5~fKd(weqoUcliyw629}#qiFa2_ILoDXYkT@F@YS5Z2_N6AE zgzHx=LLf*s4TnTmEv+I=DLxi&V03we&{lRW4Wbm<2t?+IT;Sp(=0kJ!itX2081o3> zA@ckPP6px~YBR7VFFOF^HCbFG`W5xgbSfd3Zi*7$l+t7@?7Ee7?(BZUfrZulwo z(MD>E;%{HZ2OTU0RSl`SGAdaYbwDIpIRLOBD&T!1kLKtGulc*UCWTpSXH>K-j{>3wK{X)R5w%^NUUc=$u%#FAublMd@p9~say_UUXqWW!irz$w79{}#eFYImTm$r%|1wTWOPlp89BsdG}XWHMEXRUyJv=E1<#_p<{AvP zE#2~c9}dJT4ECb689^|m*D8ONjOY>lT3an8QcJRWGg&exbAU;uFrwDBb&!HijX7bJ zNptlYj|J5gcfF1>crXr5Ndm80oGNdBfs~AG6*s47=TevfOl*WWF)%9<>b9+;HrW-2 zS}H}~1&nEG2s<{rfQcHHM+AJ$TQjway4L+UUY2VHh1($K&5+|l)Etw6CfAA;vzjki aHyIl$TodO4#wA#SXYm5Z>~l|kqxAok&nevi literal 0 HcmV?d00001 diff --git a/elpa/magit-20140807.909/AUTHORS.md b/elpa/magit-20140807.909/AUTHORS.md new file mode 100644 index 000000000..da76724a1 --- /dev/null +++ b/elpa/magit-20140807.909/AUTHORS.md @@ -0,0 +1,174 @@ +Authors +======= + +Also see https://github.com/magit/magit/graphs/contributors. +Names below are sorted alphabetically. + +Author +------ + +- Marius Vollmer + +Maintainer +---------- + +- Jonas Bernoulli + +Retired Maintainers +------------------- + +- Nicolas Dudebout +- Peter J. Weisberg +- Phil Jackson +- Rémi Vanicat +- Yann Hodique + +Contributors +------------ + +- aaa707 +- Aaron Culich +- Abdo Roig-Maranges +- acple +- Ævar Arnfjörð Bjarmason +- Alan Falloon +- Alexey Voinov +- Alex Ott +- Andreas Fuchs +- Andreas Liljeqvist +- Andreas Rottmann +- Andrei Chițu +- Andrew Kirkpatrick +- Andrey Smirnov +- Bastian Beischer +- Ben Walton +- Bradley Wright +- Brandon W Maister +- Brian Warner +- Bryan Shell +- Chris Bernard +- Chris Done +- Chris Moore +- Chris Ring +- Christian Dietrich +- Christian Kluge +- Christopher Monsanto +- Cornelius Mika +- Craig Andera +- Dale Hagglund +- Damien Cassou +- Daniel Brockman +- Daniel Farina +- Daniel Hackney +- Dan LaManna +- David Abrahams +- David Hull +- David Wallin +- Divye Kapoor +- Dominique Quatravaux +- Eli Barzilay +- Eric Davis +- Eric Schulte +- Evgkeni Sampelnikof +- Felix Geller +- Feng Li +- George Kadianakis +- Graham Clark +- Greg A. Woods +- Greg Sexton +- Hannu Koivisto +- Hans-Peter Deifel +- Ian Eure +- Jan Tatarik +- Jasper St. Pierre +- Jeff Bellegarde +- Jesse Alama +- John Wiegley +- Jonas Bernoulli +- Jonathan Roes +- Julien Danjou +- Justin Caratzas +- Kimberly Wolk +- Kyle Meyer +- Laurent Laffont +- Lele Gaifax +- Leo Liu +- Leonardo Etcheverry +- Lluís Vilanova +- Loic Dachary +- Luís Borges de Oliveira +- Luke Amdor +- Manuel Vázquez Acosta +- Marcel Wolf +- Marc Herbert +- Marcin Bachry +- Marco Craveiro +- Marian Schubert +- Marius Vollmer +- Mark Hepburn +- Matus Goljer +- Miles Bader +- Mitchel Humpherys +- Moritz Bunkus +- Nathan Weizenbaum +- Nguyễn Tuấn Anh +- Nic Ferier +- Nick Alcock +- Nick Alexander +- Nick Dimiduk +- Nicolas Dudebout +- Nicolas Richard +- Noam Postavsky +- Ole Arndt +- Óscar Fuentes +- Paul Stadig +- Pavel Holejsovsky +- Pekka Pessi +- Peter J. Weisberg +- Philippe Vaucher +- Philipp Haselwarter +- Philip Weaver +- Phil Jackson +- Pieter Praet +- Prathamesh Sonpatki +- rabio +- Raimon Grau +- Ramkumar Ramachandra +- Remco van 't Veer +- Rémi Vanicat +- René Stadler +- Robert Boone +- Robin Green +- Roger Crew +- Romain Francoise +- Ron Parker +- Roy Crihfield +- Rüdiger Sonderfeld +- Ryan C. Thompson +- Samuel Bronson +- Sanjoy Das +- Sean Bryant +- Sebastian Wiesner +- Sébastien Gross +- Seong-Kook Shin +- Sergey Pashinin +- Sergey Vinokurov +- Servilio Afre Puentes +- Štěpán Němec +- Steven Chow +- Steven Thomas +- Steve Purcell +- Suhail Shergill +- Takafumi Arakaki +- Teruki Shigitani +- Thierry Volpiatto +- Thomas Frössman +- Thomas Jost +- Thomas Riccardi +- Tibor Simko +- Timo Juhani Lindfors +- Ting-Yu Lin +- Tom Feist +- Wilfred Hughes +- Win Treese +- Yann Hodique diff --git a/elpa/magit-20140807.909/README.md b/elpa/magit-20140807.909/README.md new file mode 100644 index 000000000..330b5d824 --- /dev/null +++ b/elpa/magit-20140807.909/README.md @@ -0,0 +1,325 @@ +[![Build Status](https://travis-ci.org/magit/magit.svg?branch=master)](https://travis-ci.org/magit/magit) +[![Gittip](http://img.shields.io/gittip/magit.png)](https://www.gittip.com/magit) + +It's Magit! An Emacs mode for Git +================================== + +Magit is an interface to the version control system [Git][git], +implemented as an [Emacs][emacs] extension. + +Unlike Emacs' native [Version Control][vc] package which strives to +provide a unified interface to various version control systems, Magit +only supports Git and can therefore better take advantage of its native +features. + +Magit supports GNU Emacs 23.2 or later; 24.1 or later is recommended. +Magit supports Git 1.7.2.5 or later; 1.8.2 or later is recommended. +The minimal versions are those available in Debian oldstable. + +### Table of Contents + +* [Getting Started](#getting-started) +* [Getting Help](#getting-help) +* [Contributions](#contributions) +* [Installation](#installation) + * [Installing from Melpa](#installing-from-melpa) + * [Installing from Marmalade](#installing-from-marmalade) + * [Installing from Git](#installing-from-git) + * [Installing from Tarball](#installing-from-tarball) +* [Dependencies](#dependencies) + +Getting Started +=============== + +To get started with Magit, run M-x magit-status. If you +are inside a Git repository this opens a buffer that summarizes its +status. Otherwise you are first prompted for a repository. Read the +short help for `magit-status-mode` (C-h m in the status +buffer). + +Then edit and save some files, refresh the status buffer +(g), stage changes (s) and commit (c) +them. + +For more details consult the Magit user manual. You can read it with +C-u C-h i magit.info or [on the web][manual]. + +We can also strongly recommend [this][mastering-intro] introduction +from the Mastering Emacs blog. It even describes some new features +that are not yet documented in the manual. + +Magit also has a [website][website]. + +Getting Help +============ + +When something breaks *please* see the +[curated list of known issues][knownissues] and the [FAQ][faq]. +If that doesn't help check the list of [all open issues][issues]. + +If everything else fails please open a [new issue][issues] or ask for +help on the [mailing list][group]. + +Contributions +============= + +Magit is [hosted on Github][development]. Please contribute by +suggesting features on the [issue tracker][issues] or by making code +contributions using [pull requests][pulls]. Before opening a pull +request make sure to read the brief [guidelines][contributing]. + +Please also consider supporting development using [gittip][gittip]. +Thank you! + +Magit was started by [Marius Vollmer][marius] and is now maintained +by [Jonas Bernoulli][jonas]. Other Magitians (former maintainers) +are [Nicolas Dudebout][nicolas], [Peter J. Weisberg][peter], +[Phil Jackson][phil], [Rémi Vanicat][remi], and [Yann Hodique][yann]. + +Many more people have [contributed code][contributors] and suggested +features. + +Thanks to all of you, may (the history of) the source be with you! + +Installation +============ + +Beginning with version 24.1 Emacs includes a package management +facility known as Elpa or `package.el`. Using an Elpa package +repository is the easiest and recommended way to install and update +Magit and its dependencies. Among other things using `package.el` +is recommended because that automatically takes care of installing +dependencies. + +Magit is available from both of the two popular Elpa repositories, +[Marmalade][marmalade] (stable releases) and [Melpa][melpa] +(snapshots). + +### Installing from Melpa + +If you have already used Melpa to install some other package then +all you have to do is: + +M-x package-install RET magit RET + +This installs Magit as well as all of its dependencies and makes +them available in the current and future Emacs sessions. + +If this is the first time you are using Melpa, then you have to +configure `package.el` once. + +```lisp +(require 'package) +(add-to-list 'package-archives + '("melpa" . "http://melpa.milkbox.net/packages/") t) +``` + +Then evaluate these forms, update the package cache, and install +Magit as above. To update the cache use: + +M-x package-refresh-contents RET + +You might also want to have a look at the more detailed +[instructions][melpa-intro] provided by the Melpa project. Among +other things it explains how to install only some packages from Melpa +and others from Marmalade, and how to use `package.el` with older +versions of Emacs. + +### Installing from Marmalade + +For the time being we recommend that you install the development +version available from Melpa, because the latest Magit release (which +is what you get from Marmalade) is very outdated. If you are using +the development version of Emacs, then you have to do so, because it +contains an incompatible change that breaks the last Magit release. + +### Installing from Git + +If you want to contribute to Magit you should run it directly from the +Git repository. + +First get the repository: + +```sh +$ git clone git://github.com/magit/magit.git +``` + +Then you should byte compile the libraries and generate the +documentation, though that is not required: + +```sh +$ make lisp docs +``` + +Unless all dependencies are installed at `../DEPENDENCY` you have to +tell `make` where to find them, e.g.: + +```sh +$ EFLAGS="-L /path/to/git-modes" make lisp docs +``` + +Then add this to you init file: + +```lisp +(add-to-list 'load-path "/path/to/git-modes") +(add-to-list 'load-path "/path/to/magit") +(eval-after-load 'info + '(progn (info-initialize) + (add-to-list 'Info-directory-list "/path/to/magit/"))) +(require 'magit) +``` + +If you are using an Emacs version before 24.3, then you also have to +install `cl-lib` and tell `make` as well as Emacs where to find it. + +To view available make targets use: + +```sh +$ make help +``` + +To update use: + +```sh +$ git pull +$ make lisp docs +``` + +Before creating a pull request always run: + +```sh +$ make lisp test +``` + +You may also build Magit manually: + +```sh +$ emacs -Q --batch -L . -L /path/to/DEPENCENCY -f batch-byte-compile *.el +$ makeinfo -o magit.info magit.texi +$ install-info --dir=dir magit.info +``` + +### Installing from Tarball + +This is only intended for users who have been doing this sort of thing +for years. Installing from a tarball isn't particularly difficult but +because we are only providing this as an alternative method we are a +bit light on documentation, so it helps to have done this before. + +Also most steps have to be repeated every time you want to update. + +Because the latest Magit release is very outdated, please consider +installing the development version even if tarballs are your thing. + +Download and unpack [magit-1.2.0.tar.gz][download]. Then build and +install as usual: + +```sh +$ wget https://github.com/downloads/magit/magit/magit-1.2.0.tar.gz +$ tar -xf magit-1.2.0.tar.gz +$ cd magit-1.2.0 +$ make +$ sudo make install +``` + +This installs the Emacs lisp libraries, as well as the prebuilt +documentation from the tarball. You may alternatively build the +documentation yourself: + +```sh +$ make docs +$ sudo make install-docs +``` + +By default the Emacs lisp libraries are installed in +`/usr/local/share/emacs/site-lisp/magit/`. Unless Emacs itself is +also installed in `/usr/local/` you have to add that directory to the +`load-path`. + +```lisp +(add-to-list 'load-path "/usr/local/share/emacs/site-lisp/magit") +``` + +Then `magit` can be loaded: + +```lisp +(require 'magit) +``` + +Add the above lines to your init file and restart Emacs. + +Dependencies +============ + +If you install Magit using `package.el` then dependencies are +automatically being taken care of. Otherwise you have to track down +dependencies and install them manually. + +* `cl-lib` is a new library in Emacs 24.3. Like the old `cl` it + provides various Common Lisp forms, but differs in that symbols are + prefixed with `cl-`. A forward compatibility `cl-lib` for older + versions of Emacs is available from the GNU Elpa repository. You + can install it using `package.el` or get it [here][cl-lib]. + +* `git-commit-mode` which is part of the [git-modes][git-modes] + repository and available as a separate package from Melpa. + +* `git-rebase-mode` which is part of the [git-modes][git-modes] + repository and available as a separate package from Melpa. + +### Optional Dependencies + +The following libraries build on third-party tools or git subcommands +that are not installed by the Git base-package on some distributions: + +* `magit-stgit.el` requires [`stgit`][stgit]. +* `magit-svn.el` requires the official Git subcommand `svn`. +* `magit-topgit.el` requires [`topgit`][topgit]. +* `magit-wip.el` requires [`git-wip`][git-wip]. + +### Dependencies of Tests + +To run tests the following libraries are also required: + +* `ert` is a tool for automated testing. It is part of Emacs + starting with version 24.1. You can also obtain an old version from + the former development [repository][ert]. + + +[contributing]: https://github.com/magit/magit/blob/master/CONTRIBUTING.md +[contributors]: https://github.com/magit/magit/contributors +[development]: http://github.com/magit/magit +[download]: https://github.com/downloads/magit/magit/magit-1.2.0.tar.gz +[faq]: https://github.com/magit/magit/wiki/FAQ +[group]: https://groups.google.com/forum/?fromgroups#!forum/magit +[issues]: https://github.com/magit/magit/issues +[knownissues]: https://github.com/magit/magit/wiki/Known-issues +[manual]: http://magit.github.io/documentation.html +[owners]: https://github.com/magit?tab=members +[pulls]: https://github.com/magit/magit/pulls +[screencast]: http://vimeo.com/2871241 +[website]: http://magit.github.io + +[jonas]: https://github.com/tarsius +[marius]: https://github.com/mvollmer +[nicolas]: https://github.com/dudebout +[peter]: https://github.com/pjweisberg +[phil]: https://github.com/philjackson +[remi]: https://github.com/vanicat +[yann]: https://github.com/sigma + +[cl-lib]: http://elpa.gnu.org/packages/cl-lib.html +[emacs]: http://www.gnu.org/software/emacs +[ert]: https://github.com/ohler/ert +[git-wip]: https://github.com/bartman/git-wip +[git]: http://git-scm.com +[gitflow]: https://github.com/nvie/gitflow +[gittip]: https://www.gittip.com/magit +[git-modes]: https://github.com/magit/git-modes +[marmalade]: http://marmalade-repo.org +[mastering-intro]: http://www.masteringemacs.org/articles/2013/12/06/introduction-magit-emacs-mode-git +[melpa]: http://melpa.milkbox.net +[melpa-intro]: http://melpa.milkbox.net/#/getting-started +[stgit]: http://www.procode.org/stgit +[topgit]: https://github.com/greenrd/topgit +[vc]: http://www.gnu.org/software/emacs/manual/html_node/emacs/Version-Control.html diff --git a/elpa/magit-20140807.909/dir b/elpa/magit-20140807.909/dir new file mode 100644 index 000000000..5fec54397 --- /dev/null +++ b/elpa/magit-20140807.909/dir @@ -0,0 +1,18 @@ +This is the file .../info/dir, which contains the +topmost node of the Info hierarchy, called (dir)Top. +The first time you invoke Info you start off looking at this node. + +File: dir, Node: Top This is the top of the INFO tree + + This (the Directory node) gives a menu of major topics. + Typing "q" exits, "?" lists all Info commands, "d" returns here, + "h" gives a primer for first-timers, + "mEmacs" visits the Emacs manual, etc. + + In Emacs, you can click mouse button 2 on a menu item or cross reference + to select it. + +* Menu: + +Emacs +* Magit: (magit). Using Git from Emacs with Magit. diff --git a/elpa/magit-20140807.909/magit-autoloads.el b/elpa/magit-20140807.909/magit-autoloads.el new file mode 100644 index 000000000..756877a44 --- /dev/null +++ b/elpa/magit-20140807.909/magit-autoloads.el @@ -0,0 +1,601 @@ +;;; magit-autoloads.el --- automatically extracted autoloads +;; +;;; Code: + + +;;;### (autoloads (magit-run-gitk magit-run-git-gui-blame magit-run-git-gui +;;;;;; magit-add-change-log-entry-other-window magit-add-change-log-entry +;;;;;; magit-init magit-branch-manager magit-wazzup magit-diff-stash +;;;;;; magit-diff-unstaged magit-diff-staged magit-diff-working-tree +;;;;;; magit-diff magit-interactive-resolve magit-save-index magit-cherry +;;;;;; magit-reflog-head magit-reflog magit-file-log magit-log-long-ranged +;;;;;; magit-log-long magit-log-ranged magit-log magit-bisect-run +;;;;;; magit-bisect-skip magit-bisect-bad magit-bisect-good magit-bisect-reset +;;;;;; magit-bisect-start magit-submodule-sync magit-submodule-init +;;;;;; magit-submodule-update-init magit-submodule-update magit-stash-snapshot +;;;;;; magit-stash magit-delete-tag magit-tag magit-commit-squash +;;;;;; magit-commit-fixup magit-commit-reword magit-commit-extend +;;;;;; magit-commit-amend magit-commit magit-push magit-push-tags +;;;;;; magit-pull magit-remote-update magit-fetch-current magit-fetch +;;;;;; magit-reset-working-tree magit-reset-head-hard magit-reset-head +;;;;;; magit-interactive-rebase magit-rename-remote magit-remove-remote +;;;;;; magit-add-remote magit-rename-branch magit-delete-branch +;;;;;; magit-create-branch magit-checkout magit-merge-abort magit-merge +;;;;;; magit-show magit-dired-jump magit-unstage-all magit-stage-all +;;;;;; magit-status magit-show-commit magit-git-command) "magit" +;;;;;; "magit.el" (21478 16669 0 0)) +;;; Generated autoloads from magit.el + +(autoload 'magit-git-command "magit" "\ +Execute a Git subcommand asynchronously, displaying the output. +With a prefix argument run Git in the root of the current +repository. Non-interactively run Git in DIRECTORY with ARGS. + +\(fn ARGS DIRECTORY)" t nil) + +(autoload 'magit-show-commit "magit" "\ +Show information about COMMIT. + +\(fn COMMIT &optional NOSELECT)" t nil) + +(autoload 'magit-status "magit" "\ +Open a Magit status buffer for the Git repository containing DIR. +If DIR is not within a Git repository, offer to create a Git +repository in DIR. + +Interactively, a prefix argument means to ask the user which Git +repository to use even if `default-directory' is under Git +control. Two prefix arguments means to ignore `magit-repo-dirs' +when asking for user input. + +Depending on option `magit-status-buffer-switch-function' the +status buffer is shown in another window (the default) or the +current window. Non-interactively optional SWITCH-FUNCTION +can be used to override this. + +\(fn DIR &optional SWITCH-FUNCTION)" t nil) + +(autoload 'magit-stage-all "magit" "\ +Add all remaining changes in tracked files to staging area. +With a prefix argument, add remaining untracked files as well. +\('git add [-u] .'). + +\(fn &optional INCLUDING-UNTRACKED)" t nil) + +(autoload 'magit-unstage-all "magit" "\ +Remove all changes from staging area. +\('git reset --mixed HEAD'). + +\(fn)" t nil) + +(autoload 'magit-dired-jump "magit" "\ +Visit current item in dired. +With a prefix argument, visit in other window. + +\(fn &optional OTHER-WINDOW)" t nil) + +(autoload 'magit-show "magit" "\ +Display and select a buffer containing FILE as stored in REV. + +Insert the contents of FILE as stored in the revision REV into a +buffer. Then select the buffer using `pop-to-buffer' or with a +prefix argument using `switch-to-buffer'. Non-interactivity use +SWITCH-FUNCTION to switch to the buffer, if that is nil simply +return the buffer, without displaying it. + +\(fn REV FILE &optional SWITCH-FUNCTION)" t nil) + +(autoload 'magit-merge "magit" "\ +Merge REVISION into the current 'HEAD', leaving changes uncommitted. +With a prefix argument, skip editing the log message and commit. +\('git merge [--no-commit] REVISION'). + +\(fn REVISION &optional DO-COMMIT)" t nil) + +(autoload 'magit-merge-abort "magit" "\ +Abort the current merge operation. + +\(fn)" t nil) + +(autoload 'magit-checkout "magit" "\ +Switch 'HEAD' to REVISION and update working tree. +Fails if working tree or staging area contain uncommitted changes. +If REVISION is a remote branch, offer to create a local tracking branch. +\('git checkout [-b] REVISION'). + +\(fn REVISION)" t nil) + +(autoload 'magit-create-branch "magit" "\ +Switch 'HEAD' to new BRANCH at revision PARENT and update working tree. +Fails if working tree or staging area contain uncommitted changes. +\('git checkout -b BRANCH REVISION'). + +\(fn BRANCH PARENT)" t nil) + +(autoload 'magit-delete-branch "magit" "\ +Delete the BRANCH. +If the branch is the current one, offers to switch to `master' first. +With prefix, forces the removal even if it hasn't been merged. +Works with local or remote branches. +\('git branch [-d|-D] BRANCH' or 'git push :refs/heads/BRANCH'). + +\(fn BRANCH &optional FORCE)" t nil) + +(autoload 'magit-rename-branch "magit" "\ +Rename branch OLD to NEW. +With prefix, forces the rename even if NEW already exists. +\('git branch [-m|-M] OLD NEW'). + +\(fn OLD NEW &optional FORCE)" t nil) + +(autoload 'magit-add-remote "magit" "\ +Add the REMOTE and fetch it. +\('git remote add REMOTE URL'). + +\(fn REMOTE URL)" t nil) + +(autoload 'magit-remove-remote "magit" "\ +Delete the REMOTE. +\('git remote rm REMOTE'). + +\(fn REMOTE)" t nil) + +(autoload 'magit-rename-remote "magit" "\ +Rename remote OLD to NEW. +\('git remote rename OLD NEW'). + +\(fn OLD NEW)" t nil) + +(autoload 'magit-interactive-rebase "magit" "\ +Start a git rebase -i session, old school-style. + +\(fn COMMIT)" t nil) + +(autoload 'magit-reset-head "magit" "\ +Switch 'HEAD' to REVISION, keeping prior working tree and staging area. +Any differences from REVISION become new changes to be committed. +With prefix argument, all uncommitted changes in working tree +and staging area are lost. +\('git reset [--soft|--hard] REVISION'). + +\(fn REVISION &optional HARD)" t nil) + +(autoload 'magit-reset-head-hard "magit" "\ +Switch 'HEAD' to REVISION, losing all changes. +Uncomitted changes in both working tree and staging area are lost. +\('git reset --hard REVISION'). + +\(fn REVISION)" t nil) + +(autoload 'magit-reset-working-tree "magit" "\ +Revert working tree and clear changes from staging area. +\('git reset --hard HEAD'). + +With a prefix arg, also remove untracked files. +With two prefix args, remove ignored files as well. + +\(fn &optional ARG)" t nil) + +(autoload 'magit-fetch "magit" "\ +Fetch from REMOTE. + +\(fn REMOTE)" t nil) + +(autoload 'magit-fetch-current "magit" "\ +Run fetch for default remote. + +If there is no default remote, ask for one. + +\(fn)" t nil) + +(autoload 'magit-remote-update "magit" "\ +Update all remotes. + +\(fn)" t nil) + +(autoload 'magit-pull "magit" "\ +Run git pull. + +If there is no default remote, the user is prompted for one and +its values is saved with git config. If there is no default +merge branch, the user is prompted for one and its values is +saved with git config. With a prefix argument, the default +remote is not used and the user is prompted for a remote. With +two prefix arguments, the default merge branch is not used and +the user is prompted for a merge branch. Values entered by the +user because of prefix arguments are not saved with git config. + +\(fn)" t nil) + +(autoload 'magit-push-tags "magit" "\ +Push tags to a remote repository. + +Push tags to the current branch's remote. If that isn't set push +to \"origin\" or if that remote doesn't exit but only a single +remote is defined use that. Otherwise or with a prefix argument +ask the user what remote to use. + +\(fn)" t nil) + +(autoload 'magit-push "magit" "\ +Push the current branch to a remote repository. + +This command runs the `magit-push-remote' hook. By default that +means running `magit-push-dwim'. So unless you have customized +the hook this command behaves like this: + +With a single prefix argument ask the user what branch to push +to. With two or more prefix arguments also ask the user what +remote to push to. Otherwise use the remote and branch as +configured using the Git variables `branch..remote' and +`branch..merge'. If the former is undefined ask the user. +If the latter is undefined push without specifing the remote +branch explicitly. + +Also see option `magit-set-upstream-on-push'. + +\(fn)" t nil) + +(autoload 'magit-commit "magit" "\ +Create a new commit on HEAD. +With a prefix argument amend to the commit at HEAD instead. +\('git commit [--amend]'). + +\(fn &optional AMENDP)" t nil) + +(autoload 'magit-commit-amend "magit" "\ +Amend the last commit. +\('git commit --amend'). + +\(fn)" t nil) + +(autoload 'magit-commit-extend "magit" "\ +Amend the last commit, without editing the message. +With a prefix argument do change the committer date, otherwise +don't. The option `magit-commit-extend-override-date' can be +used to inverse the meaning of the prefix argument. +\('git commit --no-edit --amend [--keep-date]'). + +\(fn &optional OVERRIDE-DATE)" t nil) + +(autoload 'magit-commit-reword "magit" "\ +Reword the last commit, ignoring staged changes. + +With a prefix argument do change the committer date, otherwise +don't. The option `magit-commit-rewrite-override-date' can be +used to inverse the meaning of the prefix argument. + +Non-interactively respect the optional OVERRIDE-DATE argument +and ignore the option. + +\('git commit --only --amend'). + +\(fn &optional OVERRIDE-DATE)" t nil) + +(autoload 'magit-commit-fixup "magit" "\ +Create a fixup commit. +With a prefix argument the user is always queried for the commit +to be fixed. Otherwise the current or marked commit may be used +depending on the value of option `magit-commit-squash-commit'. +\('git commit [--no-edit] --fixup=COMMIT'). + +\(fn &optional COMMIT)" t nil) + +(autoload 'magit-commit-squash "magit" "\ +Create a squash commit. +With a prefix argument the user is always queried for the commit +to be fixed. Otherwise the current or marked commit may be used +depending on the value of option `magit-commit-squash-commit'. +\('git commit [--no-edit] --fixup=COMMIT'). + +\(fn &optional COMMIT FIXUP)" t nil) + +(autoload 'magit-tag "magit" "\ +Create a new tag with the given NAME at REV. +With a prefix argument annotate the tag. +\('git tag [--annotate] NAME REV'). + +\(fn NAME REV &optional ANNOTATE)" t nil) + +(autoload 'magit-delete-tag "magit" "\ +Delete the tag with the given NAME. +\('git tag -d NAME'). + +\(fn NAME)" t nil) + +(autoload 'magit-stash "magit" "\ +Create new stash of working tree and staging area named DESCRIPTION. +Working tree and staging area revert to the current 'HEAD'. +With prefix argument, changes in staging area are kept. +\('git stash save [--keep-index] DESCRIPTION') + +\(fn DESCRIPTION)" t nil) + +(autoload 'magit-stash-snapshot "magit" "\ +Create new stash of working tree and staging area; keep changes in place. +\('git stash save \"Snapshot...\"; git stash apply stash@{0}') + +\(fn)" t nil) + +(autoload 'magit-submodule-update "magit" "\ +Update the submodule of the current git repository. +With a prefix arg, do a submodule update --init. + +\(fn &optional INIT)" t nil) + +(autoload 'magit-submodule-update-init "magit" "\ +Update and init the submodule of the current git repository. + +\(fn)" t nil) + +(autoload 'magit-submodule-init "magit" "\ +Initialize the submodules. + +\(fn)" t nil) + +(autoload 'magit-submodule-sync "magit" "\ +Synchronizes submodule's remote URL configuration. + +\(fn)" t nil) + +(autoload 'magit-bisect-start "magit" "\ +Start a bisect session. + +Bisecting a bug means to find the commit that introduced it. +This command starts such a bisect session by asking for a know +good and a bad commit. To move the session forward use the +other actions from the bisect popup (\\\\[magit-key-mode-popup-bisecting]). + +\(fn BAD GOOD)" t nil) + +(autoload 'magit-bisect-reset "magit" "\ +After bisecting cleanup bisection state and return to original HEAD. + +\(fn)" t nil) + +(autoload 'magit-bisect-good "magit" "\ +While bisecting, mark the current commit as good. +Use this after you have asserted that the commit does not contain +the bug in question. + +\(fn)" t nil) + +(autoload 'magit-bisect-bad "magit" "\ +While bisecting, mark the current commit as bad. +Use this after you have asserted that the commit does contain the +bug in question. + +\(fn)" t nil) + +(autoload 'magit-bisect-skip "magit" "\ +While bisecting, skip the current commit. +Use this if for some reason the current commit is not a good one +to test. This command lets Git choose a different one. + +\(fn)" t nil) + +(autoload 'magit-bisect-run "magit" "\ +Bisect automatically by running commands after each step. + +\(fn CMDLINE)" t nil) + +(autoload 'magit-log "magit" "\ + + +\(fn &optional RANGE)" t nil) + +(autoload 'magit-log-ranged "magit" "\ + + +\(fn RANGE)" t nil) + +(autoload 'magit-log-long "magit" "\ + + +\(fn &optional RANGE)" t nil) + +(autoload 'magit-log-long-ranged "magit" "\ + + +\(fn RANGE)" t nil) + +(autoload 'magit-file-log "magit" "\ +Display the log for the currently visited file or another one. +With a prefix argument show the log graph. + +\(fn FILE &optional USE-GRAPH)" t nil) + +(autoload 'magit-reflog "magit" "\ +Display the reflog of the current branch. +With a prefix argument another branch can be chosen. + +\(fn REF)" t nil) + +(autoload 'magit-reflog-head "magit" "\ +Display the HEAD reflog. + +\(fn)" t nil) + +(autoload 'magit-cherry "magit" "\ +Show commits in a branch that are not merged in the upstream branch. + +\(fn HEAD UPSTREAM)" t nil) + +(autoload 'magit-save-index "magit" "\ +Add the content of current file as if it was the index. + +\(fn)" t nil) + +(autoload 'magit-interactive-resolve "magit" "\ +Resolve a merge conflict using Ediff. + +\(fn FILE)" t nil) + +(autoload 'magit-diff "magit" "\ +Show differences between two commits. +RANGE should be a range (A..B or A...B) but can also be a single +commit. If one side of the range is omitted, then it defaults +to HEAD. If just a commit is given, then changes in the working +tree relative to that commit are shown. + +\(fn RANGE &optional WORKING ARGS)" t nil) + +(autoload 'magit-diff-working-tree "magit" "\ +Show differences between a commit and the current working tree. + +\(fn REV)" t nil) + +(autoload 'magit-diff-staged "magit" "\ +Show differences between the index and the HEAD commit. + +\(fn)" t nil) + +(autoload 'magit-diff-unstaged "magit" "\ +Show differences between the current working tree and index. + +\(fn)" t nil) + +(autoload 'magit-diff-stash "magit" "\ +Show changes in a stash. +A Stash consist of more than just one commit. This command uses +a special diff range so that the stashed changes actually were a +single commit. + +\(fn STASH &optional NOSELECT)" t nil) + +(autoload 'magit-wazzup "magit" "\ +Show a list of branches in a dedicated buffer. +Unlike in the buffer created by `magit-branch-manager' each +branch can be expanded to show a list of commits not merged +into the selected branch. + +\(fn BRANCH)" t nil) + +(autoload 'magit-branch-manager "magit" "\ +Show a list of branches in a dedicated buffer. + +\(fn)" t nil) + +(autoload 'magit-init "magit" "\ +Create or reinitialize a Git repository. +Read directory name and initialize it as new Git repository. + +If the directory is below an existing repository, then the user +has to confirm that a new one should be created inside; or when +the directory is the root of the existing repository, whether +it should be reinitialized. + +Non-interactively DIRECTORY is always (re-)initialized. + +\(fn DIRECTORY)" t nil) + +(autoload 'magit-add-change-log-entry "magit" "\ +Find change log file and add date entry and item for current change. +This differs from `add-change-log-entry' (which see) in that +it acts on the current hunk in a Magit buffer instead of on +a position in a file-visiting buffer. + +\(fn &optional WHOAMI FILE-NAME OTHER-WINDOW)" t nil) + +(autoload 'magit-add-change-log-entry-other-window "magit" "\ +Find change log file in other window and add entry and item. +This differs from `add-change-log-entry-other-window' (which see) +in that it acts on the current hunk in a Magit buffer instead of +on a position in a file-visiting buffer. + +\(fn &optional WHOAMI FILE-NAME)" t nil) + +(autoload 'magit-run-git-gui "magit" "\ +Run `git gui' for the current git repository. + +\(fn)" t nil) + +(autoload 'magit-run-git-gui-blame "magit" "\ +Run `git gui blame' on the given FILENAME and COMMIT. +Interactively run it for the current file and the HEAD, with a +prefix or when the current file cannot be determined let the user +choose. When the current buffer is visiting FILENAME instruct +blame to center around the line point is on. + +\(fn COMMIT FILENAME &optional LINENUM)" t nil) + +(autoload 'magit-run-gitk "magit" "\ +Run Gitk for the current git repository. +Without a prefix argument run `gitk --all', with +a prefix argument run gitk without any arguments. + +\(fn ARG)" t nil) + +;;;*** + +;;;### (autoloads (magit-blame-mode) "magit-blame" "magit-blame.el" +;;;;;; (21478 16669 0 0)) +;;; Generated autoloads from magit-blame.el + +(autoload 'magit-blame-mode "magit-blame" "\ +Display blame information inline. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads nil "magit-key-mode" "magit-key-mode.el" (21478 +;;;;;; 16669 0 0)) +;;; Generated autoloads from magit-key-mode.el + +(defvar magit-key-mode-groups '((dispatch (actions ("b" "Branching" magit-key-mode-popup-branching) ("B" "Bisecting" magit-key-mode-popup-bisecting) ("c" "Committing" magit-key-mode-popup-committing) ("d" "Diff worktree" magit-diff-working-tree) ("D" "Diff" magit-diff) ("f" "Fetching" magit-key-mode-popup-fetching) ("F" "Pulling" magit-key-mode-popup-pulling) ("g" "Refresh Buffers" magit-refresh-all) ("l" "Logging" magit-key-mode-popup-logging) ("m" "Merging" magit-key-mode-popup-merging) ("M" "Remoting" magit-key-mode-popup-remoting) ("P" "Pushing" magit-key-mode-popup-pushing) ("o" "Submoduling" magit-key-mode-popup-submodule) ("r" "Rewriting" magit-key-mode-popup-rewriting) ("R" "Rebasing" magit-rebase-step) ("s" "Show Status" magit-status) ("S" "Stage all" magit-stage-all) ("t" "Tagging" magit-key-mode-popup-tagging) ("U" "Unstage all" magit-unstage-all) ("v" "Show Commit" magit-show-commit) ("V" "Show File" magit-show) ("w" "Wazzup" magit-wazzup) ("X" "Reset worktree" magit-reset-working-tree) ("y" "Cherry" magit-cherry) ("z" "Stashing" magit-key-mode-popup-stashing) ("!" "Running" magit-key-mode-popup-running) ("$" "Show Process" magit-display-process))) (logging (man-page "git-log") (actions ("l" "Short" magit-log) ("L" "Long" magit-log-long) ("h" "Head Reflog" magit-reflog-head) ("f" "File log" magit-file-log) ("rl" "Ranged short" magit-log-ranged) ("rL" "Ranged long" magit-log-long-ranged) ("rh" "Reflog" magit-reflog)) (switches ("-m" "Only merge commits" "--merges") ("-s" "No merge commits" "--no-merges") ("-do" "Date Order" "--date-order") ("-f" "First parent" "--first-parent") ("-i" "Case insensitive patterns" "-i") ("-pr" "Pickaxe regex" "--pickaxe-regex") ("-g" "Show Graph" "--graph") ("-n" "Name only" "--name-only") ("-am" "All match" "--all-match") ("-al" "All" "--all")) (arguments ("=r" "Relative" "--relative=" read-directory-name) ("=c" "Committer" "--committer=" read-from-minibuffer) ("=>" "Since" "--since=" read-from-minibuffer) ("=<" "Before" "--before=" read-from-minibuffer) ("=a" "Author" "--author=" read-from-minibuffer) ("=g" "Grep messages" "--grep=" read-from-minibuffer) ("=G" "Grep patches" "-G" read-from-minibuffer) ("=L" "Trace evolution of line range [long log only]" "-L" magit-read-file-trace) ("=s" "Pickaxe search" "-S" read-from-minibuffer) ("=b" "Branches" "--branches=" read-from-minibuffer) ("=R" "Remotes" "--remotes=" read-from-minibuffer))) (running (actions ("!" "Git Subcommand (from root)" magit-git-command-topdir) (":" "Git Subcommand (from pwd)" magit-git-command) ("g" "Git Gui" magit-run-git-gui) ("k" "Gitk" magit-run-gitk))) (fetching (man-page "git-fetch") (actions ("f" "Current" magit-fetch-current) ("a" "All" magit-remote-update) ("o" "Other" magit-fetch)) (switches ("-p" "Prune" "--prune"))) (pushing (man-page "git-push") (actions ("P" "Push" magit-push) ("t" "Push tags" magit-push-tags)) (switches ("-f" "Force" "--force") ("-d" "Dry run" "-n") ("-u" "Set upstream" "-u"))) (pulling (man-page "git-pull") (actions ("F" "Pull" magit-pull)) (switches ("-f" "Force" "--force") ("-r" "Rebase" "--rebase"))) (branching (man-page "git-branch") (actions ("v" "Branch manager" magit-branch-manager) ("b" "Checkout" magit-checkout) ("c" "Create" magit-create-branch) ("r" "Rename" magit-rename-branch) ("k" "Delete" magit-delete-branch)) (switches ("-t" "Set upstream configuration" "--track") ("-m" "Merged to HEAD" "--merged") ("-M" "Merged to master" "--merged=master") ("-n" "Not merged to HEAD" "--no-merged") ("-N" "Not merged to master" "--no-merged=master")) (arguments ("=c" "Contains" "--contains=" magit-read-rev-with-default) ("=m" "Merged" "--merged=" magit-read-rev-with-default) ("=n" "Not merged" "--no-merged=" magit-read-rev-with-default))) (remoting (man-page "git-remote") (actions ("v" "Remote manager" magit-branch-manager) ("a" "Add" magit-add-remote) ("r" "Rename" magit-rename-remote) ("k" "Remove" magit-remove-remote))) (tagging (man-page "git-tag") (actions ("t" "Create" magit-tag) ("k" "Delete" magit-delete-tag)) (switches ("-a" "Annotate" "--annotate") ("-f" "Force" "--force") ("-s" "Sign" "--sign"))) (stashing (man-page "git-stash") (actions ("v" "View" magit-diff-stash) ("z" "Save" magit-stash) ("s" "Snapshot" magit-stash-snapshot) ("a" "Apply" magit-stash-apply) ("p" "Pop" magit-stash-pop) ("k" "Drop" magit-stash-drop)) (switches ("-k" "Keep index" "--keep-index") ("-u" "Include untracked files" "--include-untracked") ("-a" "Include all files" "--all"))) (committing (man-page "git-commit") (actions ("c" "Commit" magit-commit) ("a" "Amend" magit-commit-amend) ("e" "Extend" magit-commit-extend) ("r" "Reword" magit-commit-reword) ("f" "Fixup" magit-commit-fixup) ("s" "Squash" magit-commit-squash)) (switches ("-a" "Stage all modified and deleted files" "--all") ("-e" "Allow empty commit" "--allow-empty") ("-v" "Show diff of changes to be committed" "--verbose") ("-n" "Bypass git hooks" "--no-verify") ("-s" "Add Signed-off-by line" "--signoff") ("-R" "Claim authorship and reset author date" "--reset-author")) (arguments ("=A" "Override the author" "--author=" read-from-minibuffer) ("=S" "Sign using gpg" "--gpg-sign=" magit-read-gpg-secret-key))) (merging (man-page "git-merge") (actions ("m" "Merge" magit-merge) ("A" "Abort" magit-merge-abort)) (switches ("-ff" "Fast-forward only" "--ff-only") ("-nf" "No fast-forward" "--no-ff") ("-sq" "Squash" "--squash")) (arguments ("-st" "Strategy" "--strategy=" read-from-minibuffer))) (rewriting (actions ("b" "Begin" magit-rewrite-start) ("s" "Stop" magit-rewrite-stop) ("a" "Abort" magit-rewrite-abort) ("f" "Finish" magit-rewrite-finish) ("d" "Diff pending" magit-rewrite-diff-pending) ("*" "Set unused" magit-rewrite-set-unused) ("." "Set used" magit-rewrite-set-used))) (apply-mailbox (man-page "git-am") (actions ("J" "Apply Mailbox" magit-apply-mailbox)) (switches ("-s" "add a Signed-off-by line to the commit message" "--signoff") ("-3" "allow fall back on 3way merging if needed" "--3way") ("-k" "pass -k flag to git-mailinfo" "--keep") ("-c" "strip everything before a scissors line" "--scissors") ("-p" "pass it through git-apply" "-p") ("-r" "override error message when patch failure occurs" "--resolvemsg") ("-d" "lie about committer date" "--committer-date-is-author-date") ("-D" "use current timestamp for author date" "--ignore-date") ("-b" "pass -b flag to git-mailinfo" "--keep-non-patch")) (arguments ("=p" "format the patch(es) are in" "--patch-format=" read-from-minibuffer))) (submodule (man-page "git-submodule") (actions ("u" "Update" magit-submodule-update) ("b" "Both update and init" magit-submodule-update-init) ("i" "Init" magit-submodule-init) ("s" "Sync" magit-submodule-sync))) (bisecting (man-page "git-bisect") (actions ("b" "Bad" magit-bisect-bad) ("g" "Good" magit-bisect-good) ("k" "Skip" magit-bisect-skip) ("r" "Reset" magit-bisect-reset) ("s" "Start" magit-bisect-start) ("u" "Run" magit-bisect-run))) (diff-options (actions ("s" "Set" magit-set-diff-options) ("d" "Set default" magit-set-default-diff-options) ("c" "Save default" magit-save-default-diff-options) ("r" "Reset to default" magit-reset-diff-options) ("h" "Toggle Hunk Refinement" magit-diff-toggle-refine-hunk)) (switches ("-m" "Show smallest possible diff" "--minimal") ("-p" "Use patience diff algorithm" "--patience") ("-h" "Use histogram diff algorithm" "--histogram") ("-b" "Ignore whitespace changes" "--ignore-space-change") ("-w" "Ignore all whitespace" "--ignore-all-space") ("-W" "Show surrounding functions" "--function-context")))) "\ +Holds the key, help, function mapping for the log-mode. +If you modify this make sure you reset `magit-key-mode-keymaps' +to nil.") + (mapc (lambda (g) (eval `(autoload ',(intern (concat "magit-key-mode-popup-" (symbol-name (car g)))) "magit-key-mode" ,(concat "Key menu for " (symbol-name (car g))) t))) magit-key-mode-groups) + +;;;*** + +;;;### (autoloads (global-magit-wip-save-mode magit-wip-save-mode) +;;;;;; "magit-wip" "magit-wip.el" (21478 16669 0 0)) +;;; Generated autoloads from magit-wip.el + +(autoload 'magit-wip-save-mode "magit-wip" "\ +Magit support for committing to a work-in-progress ref. + +When this minor mode is turned on and a file is saved inside a +writable git repository then it is also committed to a special +work-in-progress ref. + +\(fn &optional ARG)" t nil) + +(defvar global-magit-wip-save-mode nil "\ +Non-nil if Global-Magit-Wip-Save mode is enabled. +See the command `global-magit-wip-save-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 `global-magit-wip-save-mode'.") + +(custom-autoload 'global-magit-wip-save-mode "magit-wip" nil) + +(autoload 'global-magit-wip-save-mode "magit-wip" "\ +Toggle Magit-Wip-Save mode in all buffers. +With prefix ARG, enable Global-Magit-Wip-Save mode if ARG is positive; +otherwise, disable it. If called from Lisp, enable the mode if +ARG is omitted or nil. + +Magit-Wip-Save mode is enabled in all buffers where +`turn-on-magit-wip-save' would do it. +See `magit-wip-save-mode' for more information on Magit-Wip-Save mode. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads nil nil ("magit-pkg.el") (21478 16669 624918 0)) + +;;;*** + +(provide 'magit-autoloads) +;; Local Variables: +;; version-control: never +;; no-byte-compile: t +;; no-update-autoloads: t +;; coding: utf-8 +;; End: +;;; magit-autoloads.el ends here diff --git a/elpa/magit-20140807.909/magit-blame.el b/elpa/magit-20140807.909/magit-blame.el new file mode 100644 index 000000000..839b9069a --- /dev/null +++ b/elpa/magit-20140807.909/magit-blame.el @@ -0,0 +1,307 @@ +;;; magit-blame.el --- blame support for Magit + +;; Copyright (C) 2012-2014 The Magit Project Developers +;; +;; For a full list of contributors, see the AUTHORS.md file +;; at the top-level directory of this distribution and at +;; https://raw.github.com/magit/magit/master/AUTHORS.md + +;; Author: Yann Hodique +;; Package: magit + +;; Contains code from Egg (Emacs Got Git) , +;; released under the GNU General Public License version 3 or later. + +;; 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 . + +;;; Commentary: + +;; Control git-blame from Magit. +;; This code has been backported from Egg (Magit fork) to Magit. + +;;; Code: + +(eval-when-compile (require 'cl-lib)) +(require 'magit) +(require 'easymenu) + +;;; Options + +(defgroup magit-blame nil + "Git-blame support for Magit." + :group 'magit-extensions) + +(defcustom magit-blame-ignore-whitespace t + "Ignore whitespace when determining blame information." + :group 'magit-blame + :type 'boolean) + +(defcustom magit-time-format-string "%Y-%m-%dT%T%z" + "How to format time in magit-blame header." + :group 'magit-blame + :type 'string) + +(defface magit-blame-header + '((t :inherit magit-section-title)) + "Face for blame header." + :group 'magit-faces) + +(defface magit-blame-sha1 + '((t :inherit (magit-log-sha1 magit-blame-header))) + "Face for blame sha1." + :group 'magit-faces) + +(defface magit-blame-culprit + '((t :inherit magit-blame-header)) + "Face for blame culprit." + :group 'magit-faces) + +(defface magit-blame-time + '((t :inherit magit-blame-header)) + "Face for blame time." + :group 'magit-faces) + +(defface magit-blame-subject + '((t :inherit (magit-log-message magit-blame-header))) + "Face for blame tag line." + :group 'magit-faces) + +;;; Keymaps + +(defvar magit-blame-map + (let ((map (make-sparse-keymap))) + (define-key map (kbd "l") 'magit-blame-locate-commit) + (define-key map (kbd "RET") 'magit-blame-locate-commit) + (define-key map (kbd "q") 'magit-blame-mode) + (define-key map (kbd "n") 'magit-blame-next-chunk) + (define-key map (kbd "p") 'magit-blame-previous-chunk) + map) + "Keymap for an annotated section.\\{magit-blame-map}") + +(easy-menu-define magit-blame-mode-menu magit-blame-map + "Magit blame menu" + '("Blame" + ["Locate Commit" magit-blame-locate-commit t] + ["Next" magit-blame-next-chunk t] + ["Previous" magit-blame-previous-chunk t] + "---" + ["Quit" magit-blame-mode t])) + +;;; Mode + +(defvar-local magit-blame-buffer-read-only nil) + +;;;###autoload +(define-minor-mode magit-blame-mode + "Display blame information inline." + :keymap magit-blame-map + :lighter " blame" + (unless (buffer-file-name) + (user-error "Current buffer has no associated file!")) + (when (and (buffer-modified-p) + (y-or-n-p (format "save %s first? " (buffer-file-name)))) + (save-buffer)) + + (cond (magit-blame-mode + (setq magit-blame-buffer-read-only buffer-read-only) + (magit-blame-file-on (current-buffer)) + (set-buffer-modified-p nil) + (setq buffer-read-only t)) + (t + (magit-blame-file-off (current-buffer)) + (set-buffer-modified-p nil) + (setq buffer-read-only magit-blame-buffer-read-only)))) + +(defun magit-blame-file-off (buffer) + (save-excursion + (save-restriction + (with-current-buffer buffer + (widen) + (mapc (lambda (ov) + (when (overlay-get ov :blame) + (delete-overlay ov))) + (overlays-in (point-min) (point-max))))))) + +(defun magit-blame-file-on (buffer) + (magit-blame-file-off buffer) + (save-excursion + (with-current-buffer buffer + (save-restriction + (with-temp-buffer + (apply 'magit-git-insert "blame" "--porcelain" + `(,@(and magit-blame-ignore-whitespace (list "-w")) "--" + ,(file-name-nondirectory (buffer-file-name buffer)))) + (magit-blame-parse buffer (current-buffer))))))) + +;;; Commands + +(defun magit-blame-locate-commit (pos) + "Jump to a commit in the branch history from an annotated blame section." + (interactive "d") + (let ((overlays (overlays-at pos)) + sha1) + (dolist (ov overlays) + (when (overlay-get ov :blame) + (setq sha1 (plist-get (nth 3 (overlay-get ov :blame)) :sha1)))) + (when sha1 + (magit-show-commit sha1)))) + +(defun magit-blame-next-chunk () + "Go to the next blame chunk." + (interactive) + (let ((next (next-single-property-change (point) :blame))) + (when next + (goto-char next)))) + +(defun magit-blame-previous-chunk () + "Go to the previous blame chunk." + (interactive) + (let ((prev (previous-single-property-change (point) :blame))) + (when prev + (goto-char prev)))) + +;;; Parse + +(defun magit-blame-decode-time (unixtime &optional tz) + "Decode UNIXTIME into (HIGH LOW) format. + +The second argument TZ can be used to add the timezone in (-)HHMM +format to UNIXTIME. UNIXTIME should be either a number +containing seconds since epoch or Emacs's (HIGH LOW . IGNORED) +format." + (when (numberp tz) + (unless (numberp unixtime) + (setq unixtime (float-time unixtime))) + (let* ((ptz (abs tz)) + (min (+ (* (/ ptz 100) 60) + (mod ptz 100)))) + (setq unixtime (+ (* (if (< tz 0) (- min) min) 60) unixtime)))) + + (when (numberp unixtime) + (setq unixtime (seconds-to-time unixtime))) + unixtime) + +(defun magit-blame-format-time-string (format &optional unixtime tz) + "Use FORMAT to format the time UNIXTIME, or now if omitted. + +UNIXTIME is specified as a number containing seconds since epoch +or Emacs's (HIGH LOW . IGNORED) format. The optional argument TZ +can be used to set the time zone. If TZ is a number it is +treated as a (-)HHMM offset to Universal Time. If TZ is not +a number and non-nil the time is printed in UTC. If TZ is nil +the local zime zone is used. The format of the function is +similar to `format-time-string' except for %Z which is not +officially supported at the moment." + (unless unixtime + (setq unixtime (current-time))) + (when (numberp tz) ;; TODO add support for %Z + (setq format (replace-regexp-in-string "%z" (format "%+05d" tz) format))) + (format-time-string format (magit-blame-decode-time unixtime tz) tz)) + +(defun magit-blame-parse (target-buf blame-buf) + "Parse blame-info in buffer BLAME-BUF and decorate TARGET-BUF buffer." + (save-match-data + (let ((blank (propertize " " 'face 'magit-blame-header)) + (nl (propertize "\n" 'face 'magit-blame-header)) + (commit-hash (make-hash-table :test 'equal :size 577)) + commit commit-info old-line new-line num old-file subject author + author-time author-timezone info ov beg end blame) + (with-current-buffer blame-buf + (goto-char (point-min)) + ;; search for a ful commit info + (while (re-search-forward + "^\\([0-9a-f]\\{40\\}\\) \\([0-9]+\\) \\([0-9]+\\) \\([0-9]+\\)$" + nil t) + (setq commit (match-string-no-properties 1) + old-line (string-to-number + (match-string-no-properties 2)) + new-line (string-to-number + (match-string-no-properties 3)) + num (string-to-number + (match-string-no-properties 4))) + ;; was this commit already seen (and stored in the hash)? + (setq commit-info (gethash commit commit-hash)) + ;; Nope, this is the 1st time, the full commit-info follow. + (unless commit-info + (re-search-forward "^author \\(.+\\)$") + (setq author (match-string-no-properties 1)) + (re-search-forward "^author-time \\(.+\\)$") + (setq author-time (string-to-number + (match-string-no-properties 1))) + (re-search-forward "^author-tz \\(.+\\)$") + (setq author-timezone (string-to-number + (match-string-no-properties 1))) + (re-search-forward "^summary \\(.+\\)$") + (setq subject (match-string-no-properties 1)) + (re-search-forward "^filename \\(.+\\)$") + (setq old-file (match-string-no-properties 1)) + (setq commit-info (list :sha1 commit :author author + :author-time author-time + :author-timezone author-timezone + :subject subject :file old-file)) + ;; save it in the hash + (puthash commit commit-info commit-hash)) + ;; add the current blame-block into the list INFO. + (setq info (cons (list old-line new-line num commit-info) + info)))) + ;; now do from beginning + (setq info (nreverse info)) + (with-current-buffer target-buf + ;; for every blame chunk + (dolist (chunk info) + (setq commit-info (nth 3 chunk) + old-line (nth 0 chunk) + new-line (nth 1 chunk) + num (nth 2 chunk) + commit (plist-get commit-info :sha1) + author (plist-get commit-info :author) + author-time (plist-get commit-info :author-time) + author-timezone (plist-get commit-info :author-timezone) + subject (plist-get commit-info :subject)) + + (goto-char (point-min)) + (forward-line (1- new-line)) + + (setq beg (line-beginning-position) + end (save-excursion + (forward-line num) + (line-beginning-position))) + ;; mark the blame chunk + (put-text-property beg end :blame chunk) + + ;; make an overlay with blame info as 'before-string + ;; on the current chunk. + (setq ov (make-overlay beg end)) + (overlay-put ov :blame chunk) + (setq blame (concat + (propertize (substring-no-properties commit 0 8) + 'face 'magit-blame-sha1) + blank + (propertize (format "%-20s" author) + 'face 'magit-blame-culprit) + blank + (propertize (magit-blame-format-time-string + magit-time-format-string + author-time author-timezone) + 'face 'magit-blame-time) + blank + (propertize subject 'face 'magit-blame-subject) + blank nl)) + (overlay-put ov 'before-string blame)))))) + +(provide 'magit-blame) +;; Local Variables: +;; indent-tabs-mode: nil +;; End: +;;; magit-blame.el ends here diff --git a/elpa/magit-20140807.909/magit-blame.elc b/elpa/magit-20140807.909/magit-blame.elc new file mode 100644 index 0000000000000000000000000000000000000000..56c4e84b29575b9b2ef338aba890c698f5f3bd03 GIT binary patch literal 8408 zcmbtZ`FGpK5mtX`B>EYzxs;n(K~_vU0gaQC>S?=?(99;eQ#l5p?2ra9kv@!k|5**);nbrKi|S9 zGYl~xSsbzN{hV!2M~rPStF!4^o7OtBP0JN5hG{%uLoi{tpJhDFZiC0| z7N7Y2tTnjJ!^FqPD98<3VXm8<)`q#EhI*kt;Vm8tMnS~(XcapKmjK(^Zp&#|V(ui! z$IK5QO_B$b;LOiKkhN-J@^BnvQi5s5Gd4Jl{7KMfgSemNX%LOFFEE>CIr9et9Cfyj zwb8OSF7X(|;1R_+>&H>*u?gNKc^ zHrCo|BfFzEqDcqK9V~aSA+e}V5&>2_B<7__uyZiz(!nlHx?t&or3((TNwcG~=P7?V z4N?v-fi2@Qv(pKWrmR2B@_1qlct7-0Zj91+nn)T$7&nW8km(O${_-)KCP|#;Y#68P zfLOJ3wpm`qU*$X^^Up5wKK9eV@4?TcI|+V9Fp6UAdom7ko+W;tvz+PsVvv;vPsTiA z0}i8|1QA?4)9m$cOCY<%+IOH%)pU~w0&Wx5_;FL{!|AykKl9kRq;aTR7=H0=(qv!sJg+YW(j@Wv$wz}on z>}!5H@e^?oupK`_0QGYOTXkQp?yqG{f%LaeYmEUP!l)}cBqkT4k;UGJGun&zLtg2w zs=y>h$iu56B3hJbD2iEDWkf_NF|yd~+QPqSUC3k z6j5_B!KLfh;R!FR6cZ6pqv~J;4>$VbY4n2WNp&ho`Ed|WGdX?4+$L+R-e4_ewQaje znnvP15CKS9JB6St^oXqu5uqp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-lQ9h~6tFPgu zIJ!RN%Di}qR34j?zRS}hkCq3DQ};Ml!d}E%a3(b-G$oW%dRB9E2=SgM4hM$N7%m)D z+lgpKF&ZU>smfXAQCa>KLqffga5=o+5ROL;09Hzj^3})1DpZP3C#k+|MCrbvuy5Ph T5ZJeYJ2?)}l`8k)o3;M}zefxk literal 0 HcmV?d00001 diff --git a/elpa/magit-20140807.909/magit-key-mode.el b/elpa/magit-20140807.909/magit-key-mode.el new file mode 100644 index 000000000..e486fc3b5 --- /dev/null +++ b/elpa/magit-20140807.909/magit-key-mode.el @@ -0,0 +1,735 @@ +;;; magit-key-mode.el --- interactively tune git invocation + +;; Copyright (C) 2010-2014 The Magit Project Developers +;; +;; For a full list of contributors, see the AUTHORS.md file +;; at the top-level directory of this distribution and at +;; https://raw.github.com/magit/magit/master/AUTHORS.md + +;; Author: Phil Jackson +;; Package: magit + +;; 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 . + +;;; Commentary: + +;; This library implements `magit-key-mode' which is used throughout +;; Magit to let the user interactively select the command, switches +;; and options to call Git with. It can be though of as a way to +;; provide "postfix" arguments. + +;;; Code: + +(require 'magit) + +(eval-when-compile (require 'cl-lib)) + +(defvar magit-key-mode-keymaps) +(defvar magit-key-mode-last-buffer) +(defvar magit-pre-key-mode-window-conf) + +;;; Options + +(defcustom magit-key-mode-show-usage t + "Whether to show usage information when entering a popup." + :group 'magit + :type 'boolean) + +;;; Faces + +(defface magit-key-mode-header-face + '((t :inherit font-lock-keyword-face)) + "Face for key mode header lines." + :group 'magit-faces) + +(defface magit-key-mode-button-face + '((t :inherit font-lock-builtin-face)) + "Face for key mode buttons." + :group 'magit-faces) + +(defface magit-key-mode-switch-face + '((t :inherit font-lock-warning-face)) + "Face for key mode switches." + :group 'magit-faces) + +(defface magit-key-mode-args-face + '((t :inherit widget-field)) + "Face for key mode switch arguments." + :group 'magit-faces) + +;;; Keygroups +;;;###autoload +(defvar magit-key-mode-groups + '((dispatch + (actions + ("b" "Branching" magit-key-mode-popup-branching) + ("B" "Bisecting" magit-key-mode-popup-bisecting) + ("c" "Committing" magit-key-mode-popup-committing) + ("d" "Diff worktree" magit-diff-working-tree) + ("D" "Diff" magit-diff) + ("f" "Fetching" magit-key-mode-popup-fetching) + ("F" "Pulling" magit-key-mode-popup-pulling) + ("g" "Refresh Buffers" magit-refresh-all) + ("l" "Logging" magit-key-mode-popup-logging) + ("m" "Merging" magit-key-mode-popup-merging) + ("M" "Remoting" magit-key-mode-popup-remoting) + ("P" "Pushing" magit-key-mode-popup-pushing) + ("o" "Submoduling" magit-key-mode-popup-submodule) + ("r" "Rewriting" magit-key-mode-popup-rewriting) + ("R" "Rebasing" magit-rebase-step) + ("s" "Show Status" magit-status) + ("S" "Stage all" magit-stage-all) + ("t" "Tagging" magit-key-mode-popup-tagging) + ("U" "Unstage all" magit-unstage-all) + ("v" "Show Commit" magit-show-commit) + ("V" "Show File" magit-show) + ("w" "Wazzup" magit-wazzup) + ("X" "Reset worktree" magit-reset-working-tree) + ("y" "Cherry" magit-cherry) + ("z" "Stashing" magit-key-mode-popup-stashing) + ("!" "Running" magit-key-mode-popup-running) + ("$" "Show Process" magit-display-process))) + + (logging + (man-page "git-log") + (actions + ("l" "Short" magit-log) + ("L" "Long" magit-log-long) + ("h" "Head Reflog" magit-reflog-head) + ("f" "File log" magit-file-log) + ("rl" "Ranged short" magit-log-ranged) + ("rL" "Ranged long" magit-log-long-ranged) + ("rh" "Reflog" magit-reflog)) + (switches + ("-m" "Only merge commits" "--merges") + ("-s" "No merge commits" "--no-merges") + ("-do" "Date Order" "--date-order") + ("-f" "First parent" "--first-parent") + ("-i" "Case insensitive patterns" "-i") + ("-pr" "Pickaxe regex" "--pickaxe-regex") + ("-g" "Show Graph" "--graph") + ("-n" "Name only" "--name-only") + ("-am" "All match" "--all-match") + ("-al" "All" "--all")) + (arguments + ("=r" "Relative" "--relative=" read-directory-name) + ("=c" "Committer" "--committer=" read-from-minibuffer) + ("=>" "Since" "--since=" read-from-minibuffer) + ("=<" "Before" "--before=" read-from-minibuffer) + ("=a" "Author" "--author=" read-from-minibuffer) + ("=g" "Grep messages" "--grep=" read-from-minibuffer) + ("=G" "Grep patches" "-G" read-from-minibuffer) + ("=L" "Trace evolution of line range [long log only]" + "-L" magit-read-file-trace) + ("=s" "Pickaxe search" "-S" read-from-minibuffer) + ("=b" "Branches" "--branches=" read-from-minibuffer) + ("=R" "Remotes" "--remotes=" read-from-minibuffer))) + + (running + (actions + ("!" "Git Subcommand (from root)" magit-git-command-topdir) + (":" "Git Subcommand (from pwd)" magit-git-command) + ("g" "Git Gui" magit-run-git-gui) + ("k" "Gitk" magit-run-gitk))) + + (fetching + (man-page "git-fetch") + (actions + ("f" "Current" magit-fetch-current) + ("a" "All" magit-remote-update) + ("o" "Other" magit-fetch)) + (switches + ("-p" "Prune" "--prune"))) + + (pushing + (man-page "git-push") + (actions + ("P" "Push" magit-push) + ("t" "Push tags" magit-push-tags)) + (switches + ("-f" "Force" "--force") + ("-d" "Dry run" "-n") + ("-u" "Set upstream" "-u"))) + + (pulling + (man-page "git-pull") + (actions + ("F" "Pull" magit-pull)) + (switches + ("-f" "Force" "--force") + ("-r" "Rebase" "--rebase"))) + + (branching + (man-page "git-branch") + (actions + ("v" "Branch manager" magit-branch-manager) + ("b" "Checkout" magit-checkout) + ("c" "Create" magit-create-branch) + ("r" "Rename" magit-rename-branch) + ("k" "Delete" magit-delete-branch)) + (switches + ("-t" "Set upstream configuration" "--track") + ("-m" "Merged to HEAD" "--merged") + ("-M" "Merged to master" "--merged=master") + ("-n" "Not merged to HEAD" "--no-merged") + ("-N" "Not merged to master" "--no-merged=master")) + (arguments + ("=c" "Contains" "--contains=" magit-read-rev-with-default) + ("=m" "Merged" "--merged=" magit-read-rev-with-default) + ("=n" "Not merged" "--no-merged=" magit-read-rev-with-default))) + + (remoting + (man-page "git-remote") + (actions + ("v" "Remote manager" magit-branch-manager) + ("a" "Add" magit-add-remote) + ("r" "Rename" magit-rename-remote) + ("k" "Remove" magit-remove-remote))) + + (tagging + (man-page "git-tag") + (actions + ("t" "Create" magit-tag) + ("k" "Delete" magit-delete-tag)) + (switches + ("-a" "Annotate" "--annotate") + ("-f" "Force" "--force") + ("-s" "Sign" "--sign"))) + + (stashing + (man-page "git-stash") + (actions + ("v" "View" magit-diff-stash) + ("z" "Save" magit-stash) + ("s" "Snapshot" magit-stash-snapshot) + ("a" "Apply" magit-stash-apply) + ("p" "Pop" magit-stash-pop) + ("k" "Drop" magit-stash-drop)) + (switches + ("-k" "Keep index" "--keep-index") + ("-u" "Include untracked files" "--include-untracked") + ("-a" "Include all files" "--all"))) + + (committing + (man-page "git-commit") + (actions + ("c" "Commit" magit-commit) + ("a" "Amend" magit-commit-amend) + ("e" "Extend" magit-commit-extend) + ("r" "Reword" magit-commit-reword) + ("f" "Fixup" magit-commit-fixup) + ("s" "Squash" magit-commit-squash)) + (switches + ("-a" "Stage all modified and deleted files" "--all") + ("-e" "Allow empty commit" "--allow-empty") + ("-v" "Show diff of changes to be committed" "--verbose") + ("-n" "Bypass git hooks" "--no-verify") + ("-s" "Add Signed-off-by line" "--signoff") + ("-R" "Claim authorship and reset author date" "--reset-author")) + (arguments + ("=A" "Override the author" "--author=" read-from-minibuffer) + ("=S" "Sign using gpg" "--gpg-sign=" magit-read-gpg-secret-key))) + + (merging + (man-page "git-merge") + (actions + ("m" "Merge" magit-merge) + ("A" "Abort" magit-merge-abort)) + (switches + ("-ff" "Fast-forward only" "--ff-only") + ("-nf" "No fast-forward" "--no-ff") + ("-sq" "Squash" "--squash")) + (arguments + ("-st" "Strategy" "--strategy=" read-from-minibuffer))) + + (rewriting + (actions + ("b" "Begin" magit-rewrite-start) + ("s" "Stop" magit-rewrite-stop) + ("a" "Abort" magit-rewrite-abort) + ("f" "Finish" magit-rewrite-finish) + ("d" "Diff pending" magit-rewrite-diff-pending) + ("*" "Set unused" magit-rewrite-set-unused) + ("." "Set used" magit-rewrite-set-used))) + + (apply-mailbox + (man-page "git-am") + (actions + ("J" "Apply Mailbox" magit-apply-mailbox)) + (switches + ("-s" "add a Signed-off-by line to the commit message" "--signoff") + ("-3" "allow fall back on 3way merging if needed" "--3way") + ("-k" "pass -k flag to git-mailinfo" "--keep") + ("-c" "strip everything before a scissors line" "--scissors") + ("-p" "pass it through git-apply" "-p") + ("-r" "override error message when patch failure occurs" "--resolvemsg") + ("-d" "lie about committer date" "--committer-date-is-author-date") + ("-D" "use current timestamp for author date" "--ignore-date") + ("-b" "pass -b flag to git-mailinfo" "--keep-non-patch")) + (arguments + ("=p" "format the patch(es) are in" "--patch-format=" read-from-minibuffer))) + + (submodule + (man-page "git-submodule") + (actions + ("u" "Update" magit-submodule-update) + ("b" "Both update and init" magit-submodule-update-init) + ("i" "Init" magit-submodule-init) + ("s" "Sync" magit-submodule-sync))) + + (bisecting + (man-page "git-bisect") + (actions + ("b" "Bad" magit-bisect-bad) + ("g" "Good" magit-bisect-good) + ("k" "Skip" magit-bisect-skip) + ("r" "Reset" magit-bisect-reset) + ("s" "Start" magit-bisect-start) + ("u" "Run" magit-bisect-run))) + + (diff-options + (actions + ("s" "Set" magit-set-diff-options) + ("d" "Set default" magit-set-default-diff-options) + ("c" "Save default" magit-save-default-diff-options) + ("r" "Reset to default" magit-reset-diff-options) + ("h" "Toggle Hunk Refinement" magit-diff-toggle-refine-hunk)) + (switches + ("-m" "Show smallest possible diff" "--minimal") + ("-p" "Use patience diff algorithm" "--patience") + ("-h" "Use histogram diff algorithm" "--histogram") + ("-b" "Ignore whitespace changes" "--ignore-space-change") + ("-w" "Ignore all whitespace" "--ignore-all-space") + ("-W" "Show surrounding functions" "--function-context")) + )) + "Holds the key, help, function mapping for the log-mode. +If you modify this make sure you reset `magit-key-mode-keymaps' +to nil.") + +(defun magit-key-mode-delete-group (group) + "Delete a group from `magit-key-mode-keymaps'." + (let ((items (assoc group magit-key-mode-groups))) + (when items + ;; reset the cache + (setq magit-key-mode-keymaps nil) + ;; delete the whole group + (setq magit-key-mode-groups + (delq items magit-key-mode-groups)) + ;; unbind the defun + (magit-key-mode-de-generate group)) + magit-key-mode-groups)) + +(defun magit-key-mode-add-group (group) + "Add a new group to `magit-key-mode-keymaps'. +If there already is a group of that name then this will +completely remove it and put in its place an empty one of the +same name." + (when (assoc group magit-key-mode-groups) + (magit-key-mode-delete-group group)) + (setq magit-key-mode-groups + (cons (list group (list 'actions) (list 'switches) (list 'arguments)) + magit-key-mode-groups))) + +(defun magit-key-mode-key-defined-p (for-group key) + "Return t if KEY is defined as any option within FOR-GROUP. +The option may be a switch, argument or action." + (catch 'result + (let ((options (magit-key-mode-options-for-group for-group))) + (dolist (type '(actions switches arguments)) + (when (assoc key (assoc type options)) + (throw 'result t)))))) + +(defun magit-key-mode-update-group (for-group thing &rest args) + "Abstraction for setting values in `magit-key-mode-keymaps'." + (let* ((options (magit-key-mode-options-for-group for-group)) + (things (assoc thing options)) + (key (car args))) + (if (cdr things) + (if (magit-key-mode-key-defined-p for-group key) + (error "%s is already defined in the %s group." key for-group) + (setcdr (cdr things) (cons args (cddr things)))) + (setcdr things (list args))) + (setq magit-key-mode-keymaps nil) + things)) + +(defun magit-key-mode-insert-argument (for-group key desc arg read-func) + "Add a new binding KEY in FOR-GROUP which will use READ-FUNC +to receive input to apply to argument ARG git is run. DESC should +be a brief description of the binding." + (magit-key-mode-update-group for-group 'arguments key desc arg read-func)) + +(defun magit-key-mode-insert-switch (for-group key desc switch) + "Add a new binding KEY in FOR-GROUP which will add SWITCH to git's +command line when it runs. DESC should be a brief description of +the binding." + (magit-key-mode-update-group for-group 'switches key desc switch)) + +(defun magit-key-mode-insert-action (for-group key desc func) + "Add a new binding KEY in FOR-GROUP which will run command FUNC. +DESC should be a brief description of the binding." + (magit-key-mode-update-group for-group 'actions key desc func)) + +(defun magit-key-mode-options-for-group (for-group) + "Retrieve the options for the group FOR-GROUP. +This includes switches, commands and arguments." + (or (cdr (assoc for-group magit-key-mode-groups)) + (error "Unknown group '%s'" for-group))) + +;;; Commands + +(defun magit-key-mode-help (for-group) + "Provide help for a key within FOR-GROUP. +The user is prompted for the key." + (let* ((opts (magit-key-mode-options-for-group for-group)) + (man-page (cadr (assoc 'man-page opts))) + (seq (read-key-sequence + (format "Enter command prefix%s: " + (if man-page + (format ", `?' for man `%s'" man-page) + "")))) + (actions (cdr (assoc 'actions opts)))) + (cond + ;; if it is an action popup the help for the to-be-run function + ((assoc seq actions) (describe-function (nth 2 (assoc seq actions)))) + ;; if there is "?" show a man page if there is one + ((equal seq "?") + (if man-page + (man man-page) + (error "No man page associated with `%s'" for-group))) + (t (error "No help associated with `%s'" seq))))) + +(defun magit-key-mode-exec-at-point () + "Run action/args/option at point." + (interactive) + (let ((key (or (get-text-property (point) 'key-group-executor) + (error "Nothing at point to do.")))) + (call-interactively (lookup-key (current-local-map) key)))) + +(defun magit-key-mode-jump-to-next-exec () + "Jump to the next action/args/option point." + (interactive) + (let* ((oldp (point)) + (old (get-text-property oldp 'key-group-executor)) + (p (if (= oldp (point-max)) (point-min) (1+ oldp)))) + (while (let ((new (get-text-property p 'key-group-executor))) + (and (not (= p oldp)) (or (not new) (eq new old)))) + (setq p (if (= p (point-max)) (point-min) (1+ p)))) + (goto-char p) + (skip-chars-forward " "))) + +;;; Keymaps + +(defvar magit-key-mode-keymaps nil + "This will be filled lazily with proper keymaps. +These keymaps are created using `define-key' as they're requested.") + +(defun magit-key-mode-build-keymap (for-group) + "Construct a normal looking keymap for the key mode to use. +Put it in `magit-key-mode-keymaps' for fast lookup." + (let* ((options (magit-key-mode-options-for-group for-group)) + (actions (cdr (assoc 'actions options))) + (switches (cdr (assoc 'switches options))) + (arguments (cdr (assoc 'arguments options))) + (map (make-sparse-keymap))) + (suppress-keymap map 'nodigits) + ;; ret dwim + (define-key map (kbd "RET") 'magit-key-mode-exec-at-point) + ;; tab jumps to the next "button" + (define-key map (kbd "TAB") 'magit-key-mode-jump-to-next-exec) + + ;; all maps should `quit' with `C-g' or `q' + (define-key map (kbd "C-g") `(lambda () + (interactive) + (magit-key-mode-command nil))) + (define-key map (kbd "q") `(lambda () + (interactive) + (magit-key-mode-command nil))) + ;; run help + (define-key map (kbd "?") `(lambda () + (interactive) + (magit-key-mode-help ',for-group))) + + (let ((defkey (lambda (k action) + (when (and (lookup-key map (car k)) + (not (numberp (lookup-key map (car k))))) + (message "Warning: overriding binding for `%s' in %S" + (car k) for-group) + (ding) + (sit-for 2)) + (define-key map (car k) + `(lambda () (interactive) ,action))))) + (dolist (k actions) + (funcall defkey k `(magit-key-mode-command ',(nth 2 k)))) + (dolist (k switches) + (funcall defkey k `(magit-key-mode-toggle-option ',for-group ,(nth 2 k)))) + (dolist (k arguments) + (funcall defkey k `(magit-key-mode-add-argument + ',for-group ,(nth 2 k) ',(nth 3 k))))) + + (push (cons for-group map) magit-key-mode-keymaps) + map)) + +;;; Toggling and Running + +(defvar magit-key-mode-prefix nil + "Prefix argument to the command that brought up the key-mode window. +For internal use. Used by the command that's eventually invoked.") + +(defvar magit-key-mode-current-args nil + "A hash-table of current argument set. +These will eventually make it to the git command-line.") + +(defvar magit-key-mode-current-options nil + "Current option set. +These will eventually make it to the git command-line.") + +(defvar magit-custom-options nil + "List of custom options to pass to Git. +Do not customize this (used in the `magit-key-mode' implementation).") + +(defun magit-key-mode-command (func) + (let ((current-prefix-arg (or current-prefix-arg magit-key-mode-prefix)) + (magit-custom-options magit-key-mode-current-options)) + (maphash (lambda (k v) + (push (concat k v) magit-custom-options)) + magit-key-mode-current-args) + (set-window-configuration magit-pre-key-mode-window-conf) + (kill-buffer magit-key-mode-last-buffer) + (when func + (setq this-command func) + (call-interactively this-command)))) + +(defun magit-key-mode-add-argument (for-group arg-name input-func) + (let ((input (funcall input-func (concat arg-name ": ")))) + (puthash arg-name input magit-key-mode-current-args) + (magit-key-mode-redraw for-group))) + +(defun magit-key-mode-toggle-option (for-group option-name) + "Toggles the appearance of OPTION-NAME in `magit-key-mode-current-options'." + (if (member option-name magit-key-mode-current-options) + (setq magit-key-mode-current-options + (delete option-name magit-key-mode-current-options)) + (add-to-list 'magit-key-mode-current-options option-name)) + (magit-key-mode-redraw for-group)) + +;;; Mode + +(defvar magit-key-mode-buf-name "*magit-key: %s*" + "Format string to create the name of the magit-key buffer.") + +(defvar magit-key-mode-last-buffer nil + "Store the last magit-key buffer used.") + +(defvar magit-pre-key-mode-window-conf nil + "Will hold the pre-menu configuration of magit.") + +(defun magit-key-mode (for-group &optional original-opts) + "Mode for magit key selection. +All commands, switches and options can be toggled/actioned with +the key combination highlighted before the description." + (interactive) + ;; save the window config to restore it as was (no need to make this + ;; buffer local) + (setq magit-pre-key-mode-window-conf + (current-window-configuration)) + ;; setup the mode, draw the buffer + (let ((buf (get-buffer-create (format magit-key-mode-buf-name + (symbol-name for-group))))) + (setq magit-key-mode-last-buffer buf) + (split-window-vertically) + (other-window 1) + (switch-to-buffer buf) + (kill-all-local-variables) + (set (make-local-variable 'scroll-margin) 0) + (set (make-local-variable + 'magit-key-mode-current-options) + original-opts) + (set (make-local-variable + 'magit-key-mode-current-args) + (make-hash-table)) + (set (make-local-variable 'magit-key-mode-prefix) current-prefix-arg) + (magit-key-mode-redraw for-group)) + (when magit-key-mode-show-usage + (message (concat "Type a prefix key to toggle it. " + "Run 'actions' with their prefixes. " + "'?' for more help.")))) + +(defun magit-key-mode-get-key-map (for-group) + "Get or build the keymap for FOR-GROUP." + (or (cdr (assoc for-group magit-key-mode-keymaps)) + (magit-key-mode-build-keymap for-group))) + +(defun magit-key-mode-redraw (for-group) + "(re)draw the magit key buffer." + (let ((buffer-read-only nil) + (current-exec (get-text-property (point) 'key-group-executor)) + (new-exec-pos) + (old-point (point)) + (is-first (zerop (buffer-size))) + (actions-p nil)) + (erase-buffer) + (make-local-variable 'font-lock-defaults) + (use-local-map (magit-key-mode-get-key-map for-group)) + (setq actions-p (magit-key-mode-draw for-group)) + (delete-trailing-whitespace) + (setq mode-name "magit-key-mode" major-mode 'magit-key-mode) + (when current-exec + (setq new-exec-pos + (cdr (assoc current-exec + (magit-key-mode-build-exec-point-alist))))) + (cond ((and is-first actions-p) + (goto-char actions-p) + (magit-key-mode-jump-to-next-exec)) + (new-exec-pos + (goto-char new-exec-pos) + (skip-chars-forward " ")) + (t + (goto-char old-point)))) + (setq buffer-read-only t) + (fit-window-to-buffer)) + +(defun magit-key-mode-build-exec-point-alist () + (save-excursion + (goto-char (point-min)) + (let* ((exec (get-text-property (point) 'key-group-executor)) + (exec-alist (and exec `((,exec . ,(point)))))) + (cl-do nil ((eobp) (nreverse exec-alist)) + (when (not (eq exec (get-text-property (point) 'key-group-executor))) + (setq exec (get-text-property (point) 'key-group-executor)) + (when exec (push (cons exec (point)) exec-alist))) + (forward-char))))) + +;;; Draw Buffer + +(defun magit-key-mode-draw-header (header) + "Draw a header with the correct face." + (insert (propertize header 'face 'magit-key-mode-header-face) "\n")) + +(defvar magit-key-mode-args-in-cols nil + "When true, draw arguments in columns as with switches and options.") + +(defun magit-key-mode-draw-args (args) + "Draw the args part of the menu." + (magit-key-mode-draw-buttons + "Args" + args + (lambda (x) + (format "(%s) %s" + (nth 2 x) + (propertize (gethash (nth 2 x) magit-key-mode-current-args "") + 'face 'magit-key-mode-args-face))) + (not magit-key-mode-args-in-cols))) + +(defun magit-key-mode-draw-switches (switches) + "Draw the switches part of the menu." + (magit-key-mode-draw-buttons + "Switches" + switches + (lambda (x) + (format "(%s)" (let ((s (nth 2 x))) + (if (member s magit-key-mode-current-options) + (propertize s 'face 'magit-key-mode-switch-face) + s)))))) + +(defun magit-key-mode-draw-actions (actions) + "Draw the actions part of the menu." + (magit-key-mode-draw-buttons "Actions" actions nil)) + +(defun magit-key-mode-draw-buttons (section xs maker + &optional one-col-each) + (when xs + (magit-key-mode-draw-header section) + (magit-key-mode-draw-in-cols + (mapcar (lambda (x) + (let* ((head (propertize (car x) 'face 'magit-key-mode-button-face)) + (desc (nth 1 x)) + (more (and maker (funcall maker x))) + (text (format " %s: %s%s%s" + head desc (if more " " "") (or more "")))) + (propertize text 'key-group-executor (car x)))) + xs) + one-col-each))) + +(defun magit-key-mode-draw-in-cols (strings one-col-each) + "Given a list of strings, print in columns (using `insert'). +If ONE-COL-EACH is true then don't columify, but rather, draw +each item on one line." + (let ((longest-act (apply 'max (mapcar 'length strings)))) + (while strings + (let ((str (car strings))) + (let ((padding (make-string (- (+ longest-act 3) (length str)) ? ))) + (insert str) + (if (or one-col-each + (and (> (+ (length padding) ; + (current-column) + longest-act) + (window-width)) + (cdr strings))) + (insert "\n") + (insert padding)))) + (setq strings (cdr strings)))) + (insert "\n")) + +(defun magit-key-mode-draw (for-group) + "Draw actions, switches and parameters. +Return the point before the actions part, if any, nil otherwise." + (let* ((options (magit-key-mode-options-for-group for-group)) + (switches (cdr (assoc 'switches options))) + (arguments (cdr (assoc 'arguments options))) + (actions (cdr (assoc 'actions options))) + (p nil)) + (magit-key-mode-draw-switches switches) + (magit-key-mode-draw-args arguments) + (when actions (setq p (point-marker))) + (magit-key-mode-draw-actions actions) + (insert "\n") + p)) + +;;; Generate Groups + +(defun magit-key-mode-de-generate (group) + "Unbind the function for GROUP." + (fmakunbound + (intern (concat "magit-key-mode-popup-" (symbol-name group))))) + +(defun magit-key-mode-generate (group) + "Generate the key-group menu for GROUP." + (let ((opts (magit-key-mode-options-for-group group))) + (eval + `(defun ,(intern (concat "magit-key-mode-popup-" (symbol-name group))) nil + ,(concat "Key menu for " (symbol-name group)) + (interactive) + (magit-key-mode + (quote ,group) + ;; As a tempory kludge it is okay to do this here. + ,(cl-case group + (logging + '(list "--graph")) + (diff-options + '(when (local-variable-p 'magit-diff-options) + magit-diff-options)))))))) + +;; create the interactive functions for the key mode popups (which are +;; applied in the top-level key maps) +(mapc (lambda (g) + (magit-key-mode-generate (car g))) + magit-key-mode-groups) + +;;;###autoload (mapc (lambda (g) (eval `(autoload ',(intern (concat "magit-key-mode-popup-" (symbol-name (car g)))) "magit-key-mode" ,(concat "Key menu for " (symbol-name (car g))) t))) magit-key-mode-groups) + +(provide 'magit-key-mode) +;; Local Variables: +;; indent-tabs-mode: nil +;; End: +;;; magit-key-mode.el ends here diff --git a/elpa/magit-20140807.909/magit-key-mode.elc b/elpa/magit-20140807.909/magit-key-mode.elc new file mode 100644 index 0000000000000000000000000000000000000000..f1bb37e3c0f7052b181cd39084cb379653f593cf GIT binary patch literal 22159 zcmcIs3v=5>l2%>S?aETww@G$=d2Mb?uOlfj6asun&gNoSe#E;;?6d66-bJo5M1m4l zB)|ZqWaZc2_jS*JAV|^nZCz57iJ6{PPrtjtuOEEB|L-d+D{EhW{k7Rohog89^~}+Q z8HVG#_~hOXVfS8|o^B7)Za6S$Vh+Nw*_#|2vupg$ou+@s-!(zqZ^{(?EFGFYCNW>V z$fGR(3Uhq59Sy^7zTNvO8jM1;9LHmiBkDW#&h~D7*EXF-7v3=KMcdIp=86;ZfCJ4L zCW^6g(A;ip`_gwFk55cEz=lTSco_d0jscKwuSw_glQ`E+O!6oY|dk6cEADiw;n1$Uj zHhEi?50jqBQ_~F-a}=3D8qO?Y50jfH%m#6knehn#gNCk)Yxt-B;|BiO|JK&lHjggG zk=Mm#nA%~ZUdPA3aTxgg65!Lor-@GspEf=|KAppcU;q5K3gx542c!>3pOAp^TenJ` zY`~C!Q&u|zj1Dk5;5u`im@dG=0XmA#dZ%W7&Z1u?aTbAgL1Csl$;au?>qXr`m_^=M zn8o1{2vh0L5u2Bvr03ow504`=HnpElqVWkYB{l3Y+7T!HGy^4*2+vQV#6$_M81 zGfGF3(RR(;InL6_$lMuUj3RTCrh^FATG>NC?9Q!!5`jK4Pr5cY$L3C)U<25HALQnN z>rOrF^*qgb0<*PcY7aRLc4W|D$T3DIF@rdXa_mKq$SL#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F=pE#t?{QV`lfM{w8cbf@Fl;o3$+Ba8Cq-z{0E0YtMi*8tgc96NUlm3^CT3Z zB%66hR4TnaCWZ6x(mG#4M3j_BLfBTulVZ;BLk6=nXEbXZ{lYR3`3*B9tSR>K8jkx> zrSi)|W>bE35Z!`$lNnV~mH} z?hL#z!?5XOCZ?k5wO5mNfR<-zlX2z^6E{SW_2Sdc#1H>N)DhItqcai|$(VxiO}t<= z#001mU-a9js>P)K$56x!PYERXgxq{c+v1WdzPMhm?(aeFFrZ94-o^hDvXZ*F}qRkBx@B&nt)gXJY)@JxL%7 zcP2rfdLLL0=fk12g*6+ITn91b; literal 0 HcmV?d00001 diff --git a/elpa/magit-20140807.909/magit-wip.el b/elpa/magit-20140807.909/magit-wip.el new file mode 100644 index 000000000..e2e355098 --- /dev/null +++ b/elpa/magit-20140807.909/magit-wip.el @@ -0,0 +1,142 @@ +;;; magit-wip.el --- git-wip plug-in for Magit + +;; Copyright (C) 2012-2014 The Magit Project Developers +;; +;; For a full list of contributors, see the AUTHORS.md file +;; at the top-level directory of this distribution and at +;; https://raw.github.com/magit/magit/master/AUTHORS.md + +;; Author: Jonas Bernoulli +;; Keywords: vc tools +;; Package: magit + +;; 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 . + +;;; Commentary: + +;; This plug-in provides support for special work-in-progress refs. + +;; This requires the third-party git command "git wip" which is available +;; from https://github.com/bartman/git-wip. + +;; To enable `magit-wip-save-mode' enable `global-magit-wip-save-mode' +;; and use the Magit extension mechanism to select the repositories in +;; which you want to use a work-in-progress ref. +;; +;; (global-magit-wip-save-mode 1) +;; +;; $ git config --add magit.extension wip-save # or +;; $ git config --global --add magit.extension wip-save + +;; Note that `global-magit-wip-save-mode' is the only mode that uses the +;; extension mechanism for file-visiting buffers all other global modes +;; making use of it to turn on local modes in Magit buffers. + +;;; Code: + +(require 'magit) +(require 'format-spec) + +(defun magit-wip-mode (&rest ignore) + (message "magit-wip-mode is obsolete and doesn't do anything")) +(make-obsolete 'magit-wip-mode "This mode is a noop now" "2.0.0") + +;;; Options + +(defgroup magit-wip nil + "Git-Wip support for Magit." + :group 'magit-extensions) + +(defcustom magit-wip-commit-message "WIP %r" + "Commit message for git-wip commits. + +The following `format'-like specs are supported: +%f the full name of the file being saved +%g the root of the git repository +%r the name of the file being saved, + relative to the repository root." + :group 'magit-wip + :type 'string) + +(defcustom magit-wip-echo-area-message "Wrote %f (wip)" + "Message shown in the echo area after creating a git-wip commit. + +The following `format'-like specs are supported: +%f the full name of the file being saved +%g the root of the git repository +%r the name of the file being saved, + relative to the repository root." + :group 'magit-wip + :type '(choice (const :tag "No message" nil) string)) + +(defvar magit-wip-save-mode-lighter " Wip") + +;;; Mode + +;;;###autoload +(define-minor-mode magit-wip-save-mode + "Magit support for committing to a work-in-progress ref. + +When this minor mode is turned on and a file is saved inside a +writable git repository then it is also committed to a special +work-in-progress ref." + :lighter magit-wip-save-mode-lighter + (if magit-wip-save-mode + (add-hook 'after-save-hook 'magit-wip-save t t) + (remove-hook 'after-save-hook 'magit-wip-save t))) + +;;;###autoload +(define-globalized-minor-mode global-magit-wip-save-mode + magit-wip-save-mode turn-on-magit-wip-save + :group 'magit-wip) + +(defun turn-on-magit-wip-save () + "Conditionally turn on magit-wip-save-mode. + +Turn on magit-wip-save-mode if the buffer is a file in a git +repository where wip-save is enabled in git config. + +You can activate it with git config magit.extension wip-save." + (when (and (buffer-file-name) + (magit-get-top-dir) + (member "wip-save" (magit-get-all "magit.extension"))) + (if (magit-git-success "wip" "-h") + (magit-wip-save-mode 1) + (message "Git command 'git wip' cannot be found")))) + +(defun magit-wip-save () + (let* ((filename (expand-file-name (file-truename (buffer-file-name)))) + (filedir (file-name-directory filename)) + (toplevel (magit-get-top-dir filedir)) + (blobname (file-relative-name filename toplevel)) + (spec `((?f . ,filename) + (?r . ,blobname) + (?g . ,toplevel)))) + (when (and toplevel (file-writable-p toplevel) + (not (member blobname + (let ((default-directory filedir)) + (magit-git-lines + "ls-files" "--other" "--ignored" + "--exclude-standard" "--full-name"))))) + (magit-run-git "wip" "save" + (format-spec magit-wip-commit-message spec) + "--editor" "--" filename) + (when magit-wip-echo-area-message + (message (format-spec magit-wip-echo-area-message spec)))))) + +(provide 'magit-wip) +;; Local Variables: +;; indent-tabs-mode: nil +;; End: +;;; magit-wip.el ends here diff --git a/elpa/magit-20140807.909/magit-wip.elc b/elpa/magit-20140807.909/magit-wip.elc new file mode 100644 index 0000000000000000000000000000000000000000..43de48baa89d757406ebafbfd0a4312c1295ceba GIT binary patch literal 7709 zcmds6Yj4}g74@gqQP7}m3UpuDj^#}(Z9_#QWhu6?XdVcH0LfyzP8$@FfsDwZ#D?N% zNh*%_*Y}(ml9DW0NwCP52BA!H-goXj=iK4Rljo2By0f#>I5{~HkM(pGCn^-93o(_& z16;ZDLI#hte%ncOAQPceaViV(a6T5|NVtRJo_p*b39sw+Oczn6ry@cp;@-bXAr@MX z;~sUqqqROljXqLch(M=>MCExAIrs4H9V*cr`rR%rcW>yqyy4~H zp*v`b*O~fd9%l-kg8dYc&al-^K2yP&@Y;=5s3MufG8YGS!?C;0l)di1Zr#Zgwjds- zI#cbHVNB0cmFIGd@h`Q+*6LBN6ICcdOLKeDg93l?cu`ESzfBB&hS4`Hf^)~^@0W|| z;o%ThAJ<^$bAhgV+ZMX0>H4@($weizdj3UacW~$Ti&`FWN=kQ`2~?F$|U`;ahr!pYx_@dYx{k+Z4e(FZ9$2RglO`Ipa*vXV&NrY%05Cw#hrgbeO)JDELK^=yU9hcw=4Uz)9k_O3+cTUieQrXB8d~)7ueZ z0*&SfZ$z#Vx_m)I87X#?%Xcb7&9SMOX+&pPiEf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>nQ$TQ_aFHEo_J|7XXAE&TQG6UamdYHF=w;!CLaF$^lrIXV%v^JtVxzJiVg^I z($KW#d7P`eu)IM67_=kAv&a|<6lC(x=W#x(hoIcD#2+=v4mHFp`3m+$n1CraE}`}) zingWIh;vLrHQta$9e~}c=N^EK=LvHYPOU*#+^i}{fu zZ?LaDj2^O+zo4x5eCK-HkCHSF&kK7ayaZYN~-%krl|?At6*d z+Xp(8G|>A@(h9M(kXBoavO!^8UE6G=6;vx?>gpD?M_EC&IMv$HWZlvC zU(t$& z2oc>Rf^<>5cmv(=kRvb|>g}>+|9jjrz1TA4Dk47;I+j8f$Wn{WRVu87XsH8`uOqdX zF=95y(wXq7zi0D89Bi5Ex_J+P_2;qCmgZJLe~?R^RXiy-5Y{YB59t3Rp1=ww zD=<0T#~S&Q)<(x!&dQ*M3LMW)d0_Erp!kvIU0wKRF)g8XVNp1A*PT^FyOeB!`He}L zKouJ910>#JyUK^_Z1?k4A3ZmpFic{ORGL|f`RcN$ zW#`(dkCW?uSGDTqIA7j-%BDj>m||d+w{>m`yo1cDUQ=*EM&WRWp5fmj?in;Bdh*1_ zNKNwqw6jLB;=zD|HSZWnQK4rJQa918tkEoO&q7Ll`{iM=yt*8x-1$5Rc*w@aID&8{ zRbkbc#XWb4bd7OM!~&U&F=q#~Fh4EfJ5j_8A73u~l2!YM?vXi(Sg_5iYb+Vi+5>hF zdwXAy2X^F@j1lB|J<-Zf-JD?ijLa9PJDBen#{&y0GrSDYCik zZ*Ax6ic5X0dxNP}eG9NW;&wgZx;^3Iq|X#rhoYddvIBTT5~ui1*i3RWBb-Pz9mk}q z=FWcR3eCNGA0%@ep5+DRFEjg+Upvfjl_OD4(oISa<8hri<*Gigv40p0rZAnNS^14& f;U)G^w*D-!C|LVsaV7?abTj>q=e~=R=yv0OU~<2` literal 0 HcmV?d00001 diff --git a/elpa/magit-20140807.909/magit.el b/elpa/magit-20140807.909/magit.el new file mode 100644 index 000000000..60215007a --- /dev/null +++ b/elpa/magit-20140807.909/magit.el @@ -0,0 +1,7854 @@ +;;; magit.el --- control Git from Emacs + +;; Copyright (C) 2008-2014 The Magit Project Developers +;; +;; For a full list of contributors, see the AUTHORS.md file +;; at the top-level directory of this distribution and at +;; https://raw.github.com/magit/magit/master/AUTHORS.md + +;; Author: Marius Vollmer +;; Maintainer: Jonas Bernoulli +;; Former-Maintainers: +;; Nicolas Dudebout +;; Peter J. Weisberg +;; Phil Jackson +;; Rémi Vanicat +;; Yann Hodique + +;; Keywords: vc tools +;; Package: magit +;; Package-Requires: ((cl-lib "0.3") (git-commit-mode "0.14.0") (git-rebase-mode "0.14.0")) + +;; Magit requires at least GNU Emacs 23.2 and Git 1.7.2.5. +;; These are the versions shipped by Debian oldstable (6.0, Squeeze). + +;; Contains code from GNU Emacs , +;; released under the GNU General Public License version 3 or later. + +;; 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 . + +;;; Commentary: + +;; Invoking the magit-status function will show a buffer with the +;; status of the current git repository and its working tree. That +;; buffer offers key bindings for manipulating the status in simple +;; ways. +;; +;; The status buffer mainly shows the difference between the working +;; tree and the index, and the difference between the index and the +;; current HEAD. You can add individual hunks from the working tree +;; to the index, and you can commit the index. +;; +;; See the Magit User Manual for more information. + +;;; Code: + +(defvar magit-version 'undefined + "The version of Magit that you're using. +Use the function by the same name instead of this variable.") +;; The value is set at the end of this file, using the +;; function `magit-version' which is also defined there. + +;;;; Dependencies + +(when (version< emacs-version "23.2") + (error "Magit requires at least GNU Emacs 23.2")) + +;; Users may choose to use `magit-log-edit' instead of the preferred +;; `git-commit-mode', by simply putting it on the `load-path'. If +;; it can be found there then it is loaded at the end of this file. +(unless (locate-library "magit-log-edit") + (require 'git-commit-mode)) + +(require 'git-rebase-mode) + +(require 'ansi-color) +(require 'autorevert) +(require 'cl-lib) +(require 'diff-mode) +(require 'easymenu) +(require 'epa) +(require 'format-spec) +(require 'grep) +(require 'help-mode) +(require 'ring) +(require 'server) +(require 'tramp) +(require 'view) + +(eval-when-compile + (require 'dired) + (require 'dired-x) + (require 'ediff) + (require 'eshell) + (require 'ido) + (require 'iswitchb) + (require 'package nil t) + (require 'view)) + +;;;; Declarations + +(if (featurep 'vc-git) + (defalias 'magit-grep 'vc-git-grep) + (defalias 'magit-grep 'lgrep)) + +(declare-function dired-jump 'dired-x) +(declare-function dired-uncache 'dired) +(declare-function ediff-cleanup-mess 'ediff) +(declare-function eshell-parse-arguments 'eshell) +(declare-function ido-completing-read 'ido) +(declare-function iswitchb-read-buffer 'iswitchb) +(declare-function package-desc-vers 'package) +(declare-function package-desc-version 'package) +(declare-function package-version-join 'package) +(declare-function view-mode 'view) + +(defvar git-commit-previous-winconf) +(defvar magit-commit-buffer-name) +(defvar magit-custom-options) +(defvar magit-log-buffer-name) +(defvar magit-marked-commit) +(defvar magit-process-buffer-name) +(defvar magit-reflog-buffer-name) +(defvar magit-refresh-args) +(defvar magit-stash-buffer-name) +(defvar magit-status-buffer-name) +(defvar magit-this-process) +(defvar package-alist) + +;;;; Compatibility + +(eval-and-compile + + ;; Added in Emacs 24.3 + (unless (fboundp 'user-error) + (defalias 'user-error 'error)) + + ;; Added in Emacs 24.3 (mirrors/emacs@b335efc3). + (unless (fboundp 'setq-local) + (defmacro setq-local (var val) + "Set variable VAR to value VAL in current buffer." + (list 'set (list 'make-local-variable (list 'quote var)) val))) + + ;; Added in Emacs 24.3 (mirrors/emacs@b335efc3). + (unless (fboundp 'defvar-local) + (defmacro defvar-local (var val &optional docstring) + "Define VAR as a buffer-local variable with default value VAL. +Like `defvar' but additionally marks the variable as being automatically +buffer-local wherever it is set." + (declare (debug defvar) (doc-string 3)) + (list 'progn (list 'defvar var val docstring) + (list 'make-variable-buffer-local (list 'quote var))))) + + ;; Added in Emacs 24.1 + (unless (fboundp 'run-hook-wrapped) + (defun run-hook-wrapped-1 (hook fns wrap-function &rest args) + (cl-loop for fn in fns + if (and (eq fn t) + (local-variable-p hook) + (default-boundp hook) + (apply 'run-hook-wrapped-1 nil + (default-value hook) wrap-function args)) + return it + else if (and (functionp fn) (apply wrap-function fn args)) + return it)) + + (defun run-hook-wrapped (hook wrap-function &rest args) + "Run HOOK, passing each function through WRAP-FUNCTION. +I.e. instead of calling each function FUN directly with arguments ARGS, +it calls WRAP-FUNCTION with arguments FUN and ARGS. +As soon as a call to WRAP-FUNCTION returns non-nil, `run-hook-wrapped' +aborts and returns that value." + (when (boundp hook) + (let ((fns (symbol-value hook))) + (apply 'run-hook-wrapped-1 hook + (if (functionp fns) (list fns) fns) + wrap-function args))))) + ) + + +;;; Settings +;;;; Custom Groups + +(defgroup magit nil + "Controlling Git from Emacs." + :group 'tools) + +(defgroup magit-process nil + "Git and other external processes used by Magit." + :group 'magit) + +(defgroup magit-modes nil + "Modes provided by Magit." + :group 'magit) + +(defgroup magit-status nil + "Inspect and manipulate Git repositories." + :group 'magit-modes) + +(defgroup magit-diff nil + "Inspect and manipulate Git diffs." + :group 'magit-modes) + +(defgroup magit-commit nil + "Inspect and manipulate Git commits." + :group 'magit-modes) + +(defgroup magit-log nil + "Inspect and manipulate Git history." + :group 'magit-modes) + +(defgroup magit-extensions nil + "Extensions to Magit." + :group 'magit) + +(defgroup magit-faces nil + "Faces used by Magit." + :group 'magit + :group 'faces) + +(when (featurep 'gitattributes-mode) + (custom-add-to-group 'magit-modes 'gitattributes-mode 'custom-group)) + +(when (featurep 'git-commit-mode) + (custom-add-to-group 'magit-modes 'git-commit 'custom-group) + (custom-add-to-group 'magit-faces 'git-commit-faces 'custom-group)) + +(when (featurep 'git-rebase-mode) + (custom-add-to-group 'magit-modes 'git-rebase 'custom-group) + (custom-add-to-group 'magit-faces 'git-rebase-faces 'custom-group)) + +(custom-add-to-group 'magit 'vc-follow-symlinks 'custom-variable) + +;;;; Custom Options +;;;;; Processes + +(defcustom magit-git-executable + (or (and (eq system-type 'windows-nt) + ;; On Windows asking for "git" from $PATH might also return + ;; a "git.exe" or "git.cmd". Using "bin/git.exe" directly + ;; is faster than using one of the wrappers "cmd/git.exe" + ;; or "cmd/git.cmd". The wrappers are likely to come + ;; earlier on $PATH, and so we have to exlicitly use + ;; the former. + (let ((exe (executable-find "git.exe"))) + (when exe + (let ((alt (directory-file-name (file-name-directory exe)))) + (if (and (equal (file-name-nondirectory alt) "cmd") + (setq alt (expand-file-name + (convert-standard-filename "bin/git.exe") + (file-name-directory alt))) + (file-executable-p alt)) + alt + exe))))) + ;; When the only cost is finding the executable, then it it + ;; better not to cache the full path. It might not be installed + ;; in the same location on machines whose repositories are + ;; accessed using Tramp. + "git") + "The Git executable used by Magit." + :group 'magit-process + :type 'string) + +(defcustom magit-git-standard-options + '("--no-pager" "-c" "core.preloadindex=true") + "Standard options when running Git. +Be careful what you add here, especially if you are using +tramp to connect to servers with ancient Git versions." + :group 'magit-process + :type '(repeat string)) + +(defcustom magit-gitk-executable + (or (and (eq system-type 'windows-nt) + (let ((exe (expand-file-name + "gitk" (file-name-nondirectory magit-git-executable)))) + (and (file-executable-p exe) exe))) + (executable-find "gitk") "gitk") + "The Gitk executable." + :group 'magit-process + :set-after '(magit-git-executable) + :type 'string) + +(defun magit-locate-emacsclient () + "Search for a suitable Emacsclient executable." + (let ((path (cl-copy-list exec-path)) fixup client) + (when invocation-directory + (setq path (cons (directory-file-name invocation-directory) path)) + (when (eq system-type 'darwin) + (setq fixup (expand-file-name "bin" invocation-directory)) + (when (file-directory-p fixup) + (push fixup path)) + (when (string-match "^Emacs-\\(powerpc\\|i386\\|x86_64\\)-\\(.+\\)" + invocation-name) + (setq fixup (expand-file-name + (format "bin-%s-%s" + (match-string 1 invocation-name) + (match-string 2 invocation-name)) + invocation-directory)) + (when (file-directory-p fixup) + (push fixup path))) + (when (string-match-p "Cellar" invocation-directory) + (setq fixup (expand-file-name "../../../bin" invocation-directory)) + (when (file-directory-p fixup) + (push fixup path)))) + (setq path (delete-dups path))) + (setq client (magit-locate-emacsclient-1 path 3)) + (if client + (shell-quote-argument client) + (display-warning 'magit (format "\ +Cannot determine a suitable Emacsclient + +Determining an Emacsclient executable suitable for the +current Emacs instance failed. For more information +please see https://github.com/magit/magit/wiki/Emacsclient.")) + nil))) + +(defun magit-take (n l) ; until we get to use `-take' from dash + (let (r) (dotimes (_ n) (and l (push (pop l) r))) (nreverse r))) + +(defun magit-locate-emacsclient-1 (path depth) + (let* ((version-lst (magit-take depth (split-string emacs-version "\\."))) + (version-reg (concat "^" (mapconcat #'identity version-lst "\\.")))) + (or (locate-file-internal + "emacsclient" path + (cl-mapcan + (lambda (v) (cl-mapcar (lambda (e) (concat v e)) exec-suffixes)) + (nconc (cl-mapcon (lambda (v) + (setq v (mapconcat #'identity (reverse v) ".")) + (list v (concat "-" v))) + (reverse version-lst)) + (list ""))) + (lambda (exec) + (ignore-errors + (string-match-p version-reg (magit-emacsclient-version exec))))) + (and (> depth 1) + (magit-locate-emacsclient-1 path (1- depth)))))) + +(defun magit-emacsclient-version (exec) + (cadr (split-string (car (process-lines exec "--version"))))) + +(defcustom magit-emacsclient-executable (magit-locate-emacsclient) + "The Emacsclient executable. +If the default is nil, or commiting or rebasing is somehow broken, +please see https://github.com/magit/magit/wiki/Emacsclient." + :package-version '(magit . "2.0.0") + :group 'magit-process + :type '(choice (string :tag "Executable") + (const :tag "Don't use Emacsclient" nil))) + +(defcustom magit-process-connection-type (not (eq system-type 'cygwin)) + "Connection type used for the git process. + +If nil, use pipes: this is usually more efficient, and works on Cygwin. +If t, use ptys: this enables magit to prompt for passphrases when needed." + :group 'magit-process + :type '(choice (const :tag "pipe" nil) + (const :tag "pty" t))) + +(defcustom magit-process-popup-time -1 + "Popup the process buffer if a command takes longer than this many seconds." + :group 'magit-process + :type '(choice (const :tag "Never" -1) + (const :tag "Immediately" 0) + (integer :tag "After this many seconds"))) + +(defcustom magit-process-log-max 32 + "Maximum number of sections to keep in a process log buffer. +When adding a new section would go beyond the limit set here, +then the older half of the sections are remove. Sections that +belong to processes that are still running are never removed." + :package-version '(magit . "2.0.0") + :group 'magit-process + :type 'integer) + +(defcustom magit-process-quote-curly-braces + (and (eq system-type 'windows-nt) + (let ((case-fold-search t)) + (string-match-p "cygwin" magit-git-executable)) + t) + "Whether curly braces should be quoted when calling git. +This may be necessary when using Windows. On all other system +types this must always be nil. + +We are not certain when quoting is needed, but it appears it is +needed when using Cygwin Git but not when using stand-alone Git. +The default value is set based on that assumptions. If this +turns out to be wrong you can customize this option but please +also comment on issue #816." + :package-version '(magit . "2.0.0") + :group 'magit-process + :set-after '(magit-git-executable) + :type 'boolean) + +(defcustom magit-process-yes-or-no-prompt-regexp + " [\[(]\\([Yy]\\(?:es\\)?\\)[/|]\\([Nn]o?\\)[\])] ?[?:] ?$" + "Regexp matching Yes-or-No prompts of git and its subprocesses." + :package-version '(magit . "2.0.0") + :group 'magit-process + :type 'regexp) + +(defcustom magit-process-password-prompt-regexps + '("^\\(Enter \\)?[Pp]assphrase\\( for \\(RSA \\)?key '.*'\\)?: ?$" + "^\\(Enter \\)?[Pp]assword\\( for '.*'\\)?: ?$" + "^.*'s password: ?$" + "^Yubikey for .*: ?$") + "List of regexps matching password prompts of git and its subprocesses." + :package-version '(magit . "2.0.0") + :group 'magit-process + :type '(repeat (regexp))) + +(defcustom magit-process-username-prompt-regexps + '("^Username for '.*': ?$") + "List of regexps matching username prompts of git and its subprocesses." + :package-version '(magit . "2.0.0") + :group 'magit-process + :type '(repeat (regexp))) + +(defconst magit-server-window-type + '(choice + (const :tag "Use selected window" + :match (lambda (widget value) + (not (functionp value))) + nil) + (function-item :tag "Display in new frame" switch-to-buffer-other-frame) + (function-item :tag "Use pop-to-buffer" pop-to-buffer) + (function :tag "Other function"))) + +(defcustom magit-server-window-for-commit 'pop-to-buffer + "Function used to select a window for displaying commit message buffers. +It should take one argument (a buffer) and display and select it. +A common value is `pop-to-buffer'. It can also be nil in which +case the selected window is used." + :package-version '(magit . "2.0.0") + :group 'magit-process + :type magit-server-window-type) + +(defcustom magit-server-window-for-rebase server-window + "Function used to select a window for displaying interactive rebase buffers. +It should take one argument (a buffer) and display and select it. +A common value is `pop-to-buffer'. It can also be nil in which +case the selected window is used." + :package-version '(magit . "2.0.0") + :group 'magit-process + :set-after '(server-window) + :type magit-server-window-type) + +;;;;; Staging + +(defcustom magit-stage-all-confirm t + "Whether to require confirmation before staging all changes. +This reduces the risk of accidentally losing the index. If +nothing at all is staged yet, then always stage without requiring +confirmation, because it can be undone without the risk of losing +a carefully crafted index." + :package-version '(magit . "2.0.0") + :group 'magit + :type 'boolean) + +(defcustom magit-unstage-all-confirm t + "Whether to require confirmation before unstaging all changes. +This reduces the risk of accidentally losing of the index. If +there are no staged changes at all, then always unstage without +confirmation, because it can be undone without the risk of losing +a carefully crafted index." + :package-version '(magit . "2.0.0") + :group 'magit + :type 'boolean) + +(defcustom magit-revert-item-confirm t + "Whether to require confirmation before reverting hunks. +If you disable this, consider enabling `magit-revert-backup' +instead." + :group 'magit + :type 'boolean) + +(defcustom magit-revert-backup nil + "Whether to backup a hunk before reverting it. +The hunk is stored in \".git/magit/reverted.diff\" and can be +applied using `magit-revert-undo'. Older hunks are available +in the same directory as numbered backup files and have to be +applied manually. Only individual hunks are backed up; when +a complete file is reverted (which requires confirmation) no +backup is created." + :package-version '(magit . "2.1.0") + :group 'magit + :type 'boolean) + +(defcustom magit-save-some-buffers t + "Whether certain commands save modified buffers before running. + +nil don't save buffers. +t ask which buffers to save. +`dontask' save all buffers without asking." + :group 'magit + :type '(choice (const :tag "Never" nil) + (const :tag "Ask" t) + (const :tag "Save without asking" dontask))) + +(defcustom magit-save-some-buffers-predicate + 'magit-save-buffers-predicate-tree-only + "A predicate function to decide whether to save a buffer. + +Used by function `magit-save-some-buffers' when the variable of +the same name is non-nil." + :group 'magit + :type '(radio (function-item magit-save-buffers-predicate-tree-only) + (function-item magit-save-buffers-predicate-all) + (function :tag "Other"))) + +(defcustom magit-rewrite-inclusive t + "Whether magit includes the selected base commit in a rewrite operation. + +t means both the selected commit as well as any subsequent +commits will be rewritten. This is magit's default behaviour, +equivalent to 'git rebase -i ${REV}~1' + + A'---B'---C'---D' + ^ + +nil means the selected commit will be literally used as 'base', +so only subsequent commits will be rewritten. This is consistent +with git-rebase, equivalent to 'git rebase -i ${REV}', yet more +cumbersome to use from the status buffer. + + A---B'---C'---D' + ^" + :group 'magit + :type '(choice (const :tag "Always" t) + (const :tag "Never" nil) + (const :tag "Ask" ask))) + +;;;;; Highlighting + +(defun magit-set-variable-and-refresh (symbol value) + "Set SYMBOL to VALUE and call `magit-refresh-all'." + (set-default symbol value) + ;; If magit isn't fully loaded yet no buffer that might + ;; need refreshing can exist and we can take a shortcut. + ;; We also don't want everything to repeatedly refresh + ;; when evaluating this file. + (when (and (featurep 'magit) (not buffer-file-name)) + (magit-refresh-all))) + +(defcustom magit-highlight-whitespace t + "Specify where to highlight whitespace errors. +See `magit-highlight-trailing-whitespace', +`magit-highlight-indentation'. The symbol t means in all diffs, +`status' means only in the status buffer, and nil means nowhere." + :group 'magit + :set 'magit-set-variable-and-refresh + :type '(choice (const :tag "Always" t) + (const :tag "Never" nil) + (const :tag "In status buffer" status))) + +(defcustom magit-highlight-trailing-whitespace t + "Whether to highlight whitespace at the end of a line in diffs. +Used only when `magit-highlight-whitespace' is non-nil." + :group 'magit + :set 'magit-set-variable-and-refresh + :type 'boolean) + +(defcustom magit-highlight-indentation nil + "Highlight the \"wrong\" indentation style. +Used only when `magit-highlight-whitespace' is non-nil. + +The value is a list of cons cells. The car is a regular +expression, and the cdr is the value that applies to repositories +whose directory matches the regular expression. If more than one +item matches, then the *last* item in the list applies. So, the +default value should come first in the list. + +If the value is `tabs', highlight indentation with tabs. If the +value is an integer, highlight indentation with at least that +many spaces. Otherwise, highlight neither." + :group 'magit + :set 'magit-set-variable-and-refresh + :type `(repeat (cons (string :tag "Directory regexp") + (choice (const :tag "Tabs" tabs) + (integer :tag "Spaces" :value ,tab-width) + (const :tag "Neither" nil))))) ;^FIXME + +(defcustom magit-item-highlight-face 'magit-item-highlight + "The face used to highlight the current section. + +By default the highlighting of the current section is done using +the background color specified by face `magit-item-highlight'. + +If you don't want to use the background to do the highlighting, +this *might* by as easy as customizing that face. However if you +are using a theme, which in turn sets the background color of +that face then, due to limitations in face inheritance when using +themes, you might be forced to use another face. + +Unfortunately it is only possible to override a face attribute, +set by a theme, but not to drop it entirely. This means that one +has to explicitly use the `default' background color, to make it +appear *as if* the background wasn't used. + +One reason you might want to *not* use the background, is that +doing so forces the use of overlays for parts of diffs and for +refnames. Using overlays potentially degrades performance when +generating large diffs. Also see option `magit-use-overlays'." + :package-version '(magit . "2.0.0") + :group 'magit + :group 'magit-faces + :type '(choice (const magit-item-highlight) + (const bold) + (face :tag "Other face") + (const :tag "Don't highlight" nil))) + +(defcustom magit-use-overlays + (not (eq magit-item-highlight-face 'bold)) + "Whether to use overlays to highlight various diff components. + +This has to be non-nil if the current section is highlighted by +changing the background color. Otherwise background colors that +hold semantic meaning, like that of the added and removed lines +in diffs, as well as section headings, would be shadowed by the +highlighting. + +To select the face used for highlighting customize the option +`magit-item-highlight-face'. If you set that to `bold' or some +other face that does not use the background then you can set this +option to nil. Doing so could potentially improve performance +when generating large diffs." + :package-version '(magit . "2.1.0") + :group 'magit + :group 'magit-faces + :set-after '(magit-item-highlight-face) + :type 'boolean) + +(define-obsolete-variable-alias 'magit-diff-use-overlays + 'magit-use-overlays "2.1.0") + +;;;;; Completion + +(defcustom magit-completing-read-function 'magit-builtin-completing-read + "Function to be called when requesting input from the user." + :group 'magit + :type '(radio (function-item magit-iswitchb-completing-read) + (function-item magit-ido-completing-read) + (function-item magit-builtin-completing-read) + (function :tag "Other"))) + +(defcustom magit-remote-ref-format 'remote-slash-branch + "How to format refs when autocompleting, in particular for remotes. + +Autocompletion is used by functions like `magit-checkout', +`magit-interactive-rebase' and others which offer branch name +completion. + +`remote-slash-branch' Format refs as \"remote/branch\". +`branch-then-remote' Format refs as \"branch (remote)\"." + :package-version '(magit . "2.0.0") + :group 'magit + :type '(choice (const :tag "branch (remote)" branch-then-remote) + (const :tag "remote/branch" remote-slash-branch))) + +(defcustom magit-repo-dirs nil + "Directories containing Git repositories. +Magit will look into these directories for Git repositories and +offer them as choices for `magit-status'." + :group 'magit + :type '(repeat string)) + +(defcustom magit-repo-dirs-depth 3 + "The maximum depth to look for Git repos. +When looking for a Git repository below the directories in +`magit-repo-dirs', Magit will only descend this many levels +deep." + :group 'magit + :type 'integer) + +(defcustom magit-default-tracking-name-function + 'magit-default-tracking-name-remote-plus-branch + "Function used to generate default tracking branch names +when doing a \\[magit-checkout]. + +The default is `magit-default-tracking-name-remote-plus-branch', +which generates a tracking name of the form \"REMOTE-BRANCHNAME\"." + :group 'magit + :type '(radio (function-item magit-default-tracking-name-remote-plus-branch) + (function-item magit-default-tracking-name-branch-only) + (function :tag "Other"))) + +;;;;; Modes +;;;;;; Common + +(defcustom magit-mode-hook nil + "Hook run when entering a Magit mode derived mode." + :options '(magit-load-config-extensions) + :group 'magit-modes + :type 'hook) + +(defcustom magit-show-xref-buttons '(magit-diff-mode magit-commit-mode) + "List of modes whose buffers should contain history buttons. +Currently only `magit-diff-mode' and `magit-commit-mode' are +supported." + :package-version '(magit . "2.0.0") + :group 'magit-modes + :type '(repeat (choice (const magit-diff-mode) + (const magit-commit-mode)))) + +(defcustom magit-show-child-count nil + "Whether to append the number of childen to section headings." + :package-version '(magit . "2.0.0") + :group 'magit-modes + :type 'boolean) + +(defvar magit-status-line-align-to 9) + +(defcustom magit-restore-window-configuration nil + "Whether quitting a Magit buffer restores previous window configuration. + +Function `magit-mode-display-buffer' is used to display and +select Magit buffers. Unless the buffer was already displayed in +a window of the selected frame it also stores the previous window +configuration. If this option is non-nil that configuration will +later be restored by `magit-mode-quit-window', provided the +buffer has not since been displayed in another frame. + +This works best when only two windows are usually displayed in a +frame. If this isn't the case setting this to t might often lead +to undesirable behaviour. Also quitting a Magit buffer while +another Magit buffer that was created earlier is still displayed +will cause that buffer to be hidden, which might or might not be +what you want." + :package-version '(magit . "2.0.0") + :group 'magit-modes + :type 'boolean) + +(defcustom magit-refs-namespaces + '(("^\\(HEAD\\)$" magit-log-head-label-head nil) + ("^refs/tags/\\(.+\\)" magit-log-head-label-tags nil) + ("^refs/heads/\\(.+\\)" magit-log-head-label-local nil) + ("^refs/remotes/\\(.+\\)" magit-log-head-label-remote nil) + ("^refs/bisect/\\(bad\\)" magit-log-head-label-bisect-bad nil) + ("^refs/bisect/\\(skip.*\\)" magit-log-head-label-bisect-skip nil) + ("^refs/bisect/\\(good.*\\)" magit-log-head-label-bisect-good nil) + ("^refs/wip/\\(.+\\)" magit-log-head-label-wip nil) + ("^refs/patches/\\(.+\\)" magit-log-head-label-patches nil) + ("^\\(bad\\):" magit-log-head-label-bisect-bad nil) + ("^\\(skip\\):" magit-log-head-label-bisect-skip nil) + ("^\\(good\\):" magit-log-head-label-bisect-good nil) + ("\\(.+\\)" magit-log-head-label-default nil)) + "How different refs should be formatted for display. + +Each entry controls how a certain type of ref is displayed, and +has the form (REGEXP FACE FORMATTER). REGEXP is a regular +expression used to match full refs. The first entry whose REGEXP +matches the reference is used. The first regexp submatch becomes +the \"label\" that represents the ref and is propertized with +font FONT. If FORMATTER is non-nil it should be a function that +takes two arguments, the full ref and the face. It is supposed +to return a propertized label that represents the ref. + +Currently this variable is only used in logs and the branch +manager but it will be used in more places in the future." + :package-version '(magit . "2.0.0") + :group 'magit-modes + :type '(repeat + (list regexp + face + (choice (const :tag "first submatch is label" nil) + (function :tag "format using function"))))) + +;;;;;; Status + +(defcustom magit-status-mode-hook nil + "Hook run when the `magit-status' buffer is created." + :group 'magit-status + :type 'hook) + +(defcustom magit-status-sections-hook + '(magit-insert-status-local-line + magit-insert-status-remote-line + magit-insert-status-head-line + magit-insert-status-tags-line + magit-insert-status-merge-line + magit-insert-status-rebase-lines + magit-insert-empty-line + magit-insert-rebase-sequence + magit-insert-bisect-output + magit-insert-bisect-rest + magit-insert-bisect-log + magit-insert-stashes + magit-insert-untracked-files + magit-insert-pending-commits + magit-insert-unstaged-changes + magit-insert-staged-changes + magit-insert-unpulled-commits + magit-insert-unpushed-commits) + "Hook run to insert sections into the status buffer. + +This option allows reordering the sections and adding sections +that are by default displayed in other Magit buffers. Doing the +latter is currently not recommended because not all functions +that insert sections have been adapted yet. Only inserters that +take no argument can be used and some functions exist that begin +with the `magit-insert-' prefix but do not insert a section. + +Note that there are already plans to improve this and to add +similar hooks for other Magit modes." + :package-version '(magit . "2.0.0") + :group 'magit-status + :type 'hook) + +(defcustom magit-status-buffer-switch-function 'pop-to-buffer + "Function for `magit-status' to use for switching to the status buffer. + +The function is given one argument, the status buffer." + :group 'magit-status + :type '(radio (function-item switch-to-buffer) + (function-item pop-to-buffer) + (function :tag "Other"))) + +(defcustom magit-status-show-sequence-help t + "Whether to show instructions on how to proceed a stopped action. +When this is non-nil and a commit failed to apply during a merge +or rebase, then show instructions on how to continue." + :package-version '(magit . "2.0.0") + :group 'magit-status + :type 'boolean) + +(defcustom magit-status-tags-line-subject 'head + "Whether tag or head is the subject on tags line in status buffer. + +This controls how the words \"ahead\" and \"behind\" are used on +the tags line in the status buffer. The tags line does not +actually display complete sentences, but when thinking about when +to use which term, it helps imagining it did. This option +controls whether the tag names should be considered the subjects +or objects in these sentences. + +`tag' The previous tag is *behind* HEAD by N commits. + The next tag is *ahead* of HEAD by N commits. +`head' HEAD is *ahead* of the previous tag by N commits. + HEAD is *behind* the next tag by N commits. + +If the value is `tag' the commit counts are fontified; otherwise +they are not (due to semantic considerations)." + :package-version '(magit . "2.0.0") + :group 'magit-status + :type '(choice (const :tag "tags are the subjects" tag) + (const :tag "head is the subject" head))) + +;;;;;; Diff + +(defun magit-set-default-diff-options (symbol value) + "Set the default for `magit-diff-options' based on popup value. +Also set the local value in all Magit buffers and refresh them. +\n(fn)" ; The arguments are an internal implementation detail. + (interactive (list 'magit-diff-options magit-custom-options)) + (set-default symbol value) + (when (and (featurep 'magit) (not buffer-file-name)) + (dolist (buffer (buffer-list)) + (when (derived-mode-p 'magit-mode) + (with-current-buffer buffer + (with-no-warnings + (setq-local magit-diff-options value)) + (magit-mode-refresh-buffer)))))) + +(defcustom magit-diff-options nil + "Git options used to display diffs. + +For more information about the options see man:git-diff. +This variable can be conveniently set in Magit buffers +using `magit-key-mode-popup-diff-options' (bound to \ +\\\\[magit-key-mode-popup-diff-options]). + +Please note that not all of these options are supported by older +versions of Git, which could become a problem if you use tramp to +access repositories on a system with such a version. If you see +whitespace where you would have expected a diff, this likely is +the cause, and the only (currently) workaround is to not make the +problematic option a member of the default value." + :package-version '(magit . "2.0.0") + :group 'magit-diff + :set 'magit-set-default-diff-options + :type '(set :greedy t + (const :tag + "--minimal Show smallest possible diff" + "--minimal") + (const :tag + "--patience Use patience diff algorithm" + "--patience") + (const :tag + "--histogram Use histogram diff algorithm" + "--histogram") + (const :tag + "--ignore-space-change Ignore whitespace changes" + "--ignore-space-change") + (const :tag + "--ignore-all-space Ignore all whitespace" + "--ignore-all-space") + (const :tag + "--function-context Show surrounding functions" + "--function-context"))) + +(put 'magit-diff-options 'permanent-local t) + +(defcustom magit-show-diffstat t + "Whether to show diffstat in diff and commit buffers." + :package-version '(magit . "2.0.0") + :group 'magit-diff + :group 'magit-commit + :type 'boolean) + +(defcustom magit-diff-refine-hunk nil + "Show fine (word-granularity) differences within diff hunks. + +There are three possible settings: + +nil never show fine differences +t show fine differences for the selected diff hunk only +`all' show fine differences for all displayed diff hunks" + :group 'magit-diff + :type '(choice (const :tag "Never" nil) + (const :tag "Selected only" t) + (const :tag "All" all)) + :set 'magit-set-variable-and-refresh) + +;;;;;; Commit + +(defcustom magit-commit-ask-to-stage t + "Whether to ask to stage everything when committing and nothing is staged." + :package-version '(magit . "2.0.0") + :group 'magit-commit + :type 'boolean) + +(defcustom magit-commit-extend-override-date nil + "Whether using `magit-commit-extend' changes the committer date." + :package-version '(magit . "2.0.0") + :group 'magit-commit + :type 'boolean) + +(defcustom magit-commit-reword-override-date nil + "Whether using `magit-commit-reword' changes the committer date." + :package-version '(magit . "2.0.0") + :group 'magit-commit + :type 'boolean) + +(defcustom magit-commit-squash-commit nil + "Whether to target the marked or current commit when squashing. + +When this is nil then the command `magit-commit-fixup' and +`magit-commit-squash' always require that the user explicitly +selects a commit. This is also the case when these commands are +used with a prefix argument, in which case this option is ignored. + +Otherwise this controls which commit to target, either the +current or marked commit. Or if both can be used, which should +be preferred." + :package-version '(magit . "2.0.0") + :group 'magit-commit + :type + '(choice + (const :tag "Always prompt" nil) + (const :tag "Prefer current commit, else use marked" current-or-marked) + (const :tag "Prefer marked commit, else use current" marked-or-current) + (const :tag "Use current commit, if any" current) + (const :tag "Use marked commit, if any" marked))) + +(defcustom magit-expand-staged-on-commit nil + "Whether to expand staged changes when creating a commit. +When this is non-nil and the current buffer is the status buffer +expand the section containing staged changes. If this is `full' +always expand all subsections; if it is t subsections that were +previously hidden remain hidden. + +In the event that expanding very large patches takes a long time +\\\\[keyboard-quit] can be used to abort that step. +This is especially useful when you would normally not look at the +changes, e.g. because you are committing some binary files." + :package-version '(magit . "2.0.0") + :group 'magit-commit + :type '(choice (const :tag "Expand all subsections" full) + (const :tag "Expand top section" t) + (const :tag "Don't expand" nil))) + +;;;;;; Log + +(defcustom magit-log-auto-more nil + "Insert more log entries automatically when moving past the last entry. + +Only considered when moving past the last entry with +`magit-goto-*-section' commands." + :group 'magit-log + :type 'boolean) + +(defcustom magit-log-cutoff-length 100 + "The maximum number of commits to show in the log and whazzup buffers." + :group 'magit-log + :type 'integer) + +(defcustom magit-log-infinite-length 99999 + "Number of log used to show as maximum for `magit-log-cutoff-length'." + :group 'magit-log + :type 'integer) + +(defcustom magit-log-format-graph-function nil + "Function used to format graphs in log buffers. +The function is called with one argument, the propertized graph +of a single line in as a string. It has to return the formatted +string. This option can also be nil, in which case the graph is +inserted as is." + :package-version '(magit . "2.1.0") + :group 'magit-log + :type '(choice (const :tag "insert as is" nil) + (function-item magit-log-format-unicode-graph) + function)) + +(defcustom magit-log-format-unicode-graph-alist + '((?/ . ?╱) (?| . ?│) (?\\ . ?╲) (?* . ?◆) (?o . ?◇)) + "Alist used by `magit-log-format-unicode-graph' to translate chars." + :package-version '(magit . "2.1.0") + :group 'magit-log + :type '(repeat (cons :format "%v\n" + (character :format "replace %v ") + (character :format "with %v")))) + +(defcustom magit-log-show-gpg-status nil + "Display signature verification information as part of the log." + :package-version '(magit . "2.0.0") + :group 'magit-log + :type 'boolean) + +(defcustom magit-log-show-margin t + "Whether to use a margin when showing `oneline' logs. +When non-nil the author name and date are displayed in the margin +of the log buffer if that contains a `oneline' log. This can be +toggled temporarily using the command `magit-log-toggle-margin'." + :package-version '(magit . "2.0.0") + :group 'magit-log + :type 'boolean) + +(put 'magit-log-show-margin 'permanent-local t) + +(defcustom magit-log-margin-spec '(25 nil magit-duration-spec) + "How to format the margin for `oneline' logs. + +When the log buffer contains a `oneline' log, then it optionally +uses the right margin to display the author name and author date. +This is also supported in the reflog buffer. + +Logs that are shown together with other non-log information (e.g. +in the status buffer) are never accompanied by a margin. The +same applies to `long' logs, in this case because that would be +redundant. + +This option controls how that margin is formatted, the other +option affecting this is `magit-log-show-margin'; if that is nil +then no margin is displayed at all. To toggle this temporarily +use the command `magit-log-show-margin'. + +The value has the form (WIDTH CHARACTERP DURATION-SPEC). The +width of the margin is controlled using WIDTH, an integer. When +CHARACTERP is non-nil time units are shown as single characters, +otherwise the full name of the unit is displayed. DURATION-SPEC +has to be a variable, its value controls which time units are +used, how many seconds they contain, and what their names are." + :package-version '(magit . "2.0.0") + :group 'magit-log + :type '(list (integer :tag "Margin width") + (choice :tag "Time unit style" + (const :tag "Character" t) + (const :tag "Word" nil)) + (variable :tag "Duration spec variable"))) + +(defcustom magit-duration-spec + `((?Y "year" "years" ,(round (* 60 60 24 365.2425))) + (?M "month" "months" ,(round (* 60 60 24 30.436875))) + (?w "week" "weeks" ,(* 60 60 24 7)) + (?d "day" "days" ,(* 60 60 24)) + (?h "hour" "hours" ,(* 60 60)) + (?m "minute" "minutes" 60) + (?s "second" "seconds" 1)) + "Units used to display durations in a human format. +The value is a list of time units, beginning with the longest. +Each element has the form ((CHAR UNIT UNITS SECONDS)..). UNIT +is the time unit, UNITS is the plural of that unit. CHAR is a +character that can be used as abbreviation and must be unique +amoung all elements. SECONDS is the number of seconds in one +UNIT. Also see option `magit-log-margin-spec'." + :package-version '(magit . "2.0.0") + :group 'magit-log + :type '(repeat (list (character :tag "Unit character") + (string :tag "Unit singular string") + (string :tag "Unit plural string") + (integer :tag "Seconds in unit")))) + +(defcustom magit-ellipsis #x2026 ; "horizontal ellipsis" + "Character appended to abreviated text. +Currently this is used only in the log margin, but might later +be used elsewhere too. Filenames that were abbreviated by Git +are left as-is." + :package-version '(magit . "2.0.0") + :group 'magit-log + :type 'character) + +;;;;;; Others + +(defcustom magit-auto-revert-mode-lighter " MRev" + "String to display when Magit-Auto-Revert mode is active." + :group 'magit-modes) + +(define-minor-mode magit-auto-revert-mode + "Toggle global Magit-Auto-Revert mode. +With prefix ARG, enable Magit-Auto-Revert mode if ARG is positive; +otherwise, disable it. If called from Lisp, enable the mode if +ARG is omitted or nil. + +Magit-Auto-Revert mode is a global minor mode that, after Magit +has run a Git command, reverts buffers associated with files that +have changed on disk and are tracked in the current Git repository." + :group 'magit-modes + :lighter magit-auto-revert-mode-lighter + :global t + :init-value t) + +(defcustom magit-merge-warn-dirty-worktree t + "Whether to issue a warning when attempting to start a merge in a dirty worktree." + :package-version '(magit . "2.0.0") + :group 'magit-modes + :type 'boolean) + +(defcustom magit-push-hook '(magit-push-dwim) + "Hook run by `magit-push' to actually do the work. +See `magit-push' and `magit-push-dwim' for more information." + :package-version '(magit . "2.0.0") + :group 'magit-modes + :type 'hook) + +(defcustom magit-set-upstream-on-push nil + "Whether `magit-push' may set upstream when pushing a branch. +This only applies if the branch does not have an upstream set yet. + +nil don't use --set-upstream. +t ask if --set-upstream should be used. +`dontask' always use --set-upstream. +`refuse' refuse to push unless a remote branch has already been set." + :group 'magit-modes + :type '(choice (const :tag "Never" nil) + (const :tag "Ask" t) + (const :tag "Ask if not set" askifnotset) + (const :tag "Refuse" refuse) + (const :tag "Always" dontask))) + +(defcustom magit-wazzup-sections-hook + '(magit-insert-wazzup-head-line + magit-insert-empty-line + magit-insert-wazzup-branches) + "Hook run to insert sections into the wazzup buffer." + :package-version '(magit . "2.0.0") + :group 'magit-modes + :type 'hook) + +(defcustom magit-cherry-sections-hook + '(magit-insert-cherry-head-line + magit-insert-cherry-upstream-line + magit-insert-cherry-help-lines + magit-insert-empty-line + magit-insert-cherry-commits) + "Hook run to insert sections into the cherry buffer." + :package-version '(magit . "2.0.0") + :group 'magit-modes + :type 'hook) + +;;;; Custom Faces + +(defface magit-section-title + '((t :inherit header-line)) + "Face for section titles." + :group 'magit-faces) + +(defface magit-branch + '((((class color) (background light)) + :background "Grey85" + :foreground "LightSkyBlue4") + (((class color) (background dark)) + :background "Grey13" + :foreground "LightSkyBlue1")) + "Face for branches." + :group 'magit-faces) + +(defface magit-tag + '((((class color) (background light)) + :background "LemonChiffon1" + :foreground "goldenrod4") + (((class color) (background dark)) + :background "LemonChiffon1" + :foreground "goldenrod4")) + "Face for tags." + :group 'magit-faces) + +(defface magit-diff-file-header + '((t :inherit diff-file-header)) + "Face for diff file header lines." + :group 'magit-faces) + +(defface magit-diff-hunk-header + '((t :inherit diff-hunk-header)) + "Face for diff hunk header lines." + :group 'magit-faces) + +(defface magit-diff-add + '((t :inherit diff-added)) + "Face for lines in a diff that have been added." + :group 'magit-faces) + +(defface magit-diff-del + '((t :inherit diff-removed)) + "Face for lines in a diff that have been deleted." + :group 'magit-faces) + +(defface magit-diff-none + '((t :inherit diff-context)) + "Face for lines in a diff that are unchanged." + :group 'magit-faces) + +(defface magit-diff-merge-current + '((t :inherit font-lock-preprocessor-face)) + "Face for merge conflict marker 'current' line." + :group 'magit-faces) + +(defface magit-diff-merge-separator + '((t :inherit font-lock-preprocessor-face)) + "Face for merge conflict marker seperator." + :group 'magit-faces) + +(defface magit-diff-merge-diff3-separator + '((t :inherit font-lock-preprocessor-face)) + "Face for merge conflict marker seperator." + :group 'magit-faces) + +(defface magit-diff-merge-proposed + '((t :inherit font-lock-preprocessor-face)) + "Face for merge conflict marker 'proposed' line." + :group 'magit-faces) + +(defface magit-log-graph + '((((class color) (background light)) + :foreground "grey11") + (((class color) (background dark)) + :foreground "grey80")) + "Face for the graph element of the log output." + :group 'magit-faces) + +(defface magit-log-sha1 + '((((class color) (background light)) + :foreground "firebrick") + (((class color) (background dark)) + :foreground "tomato")) + "Face for the sha1 element of the log output." + :group 'magit-faces) + +(defface magit-log-author + '((((class color) (background light)) + :foreground "firebrick") + (((class color) (background dark)) + :foreground "tomato")) + "Face for the author element of the log output." + :group 'magit-faces) + +(defface magit-log-date + '((t)) + "Face for the date element of the log output." + :group 'magit-faces) + +(defface magit-log-message + '((t)) + "Face for the message element of the log output." + :group 'magit-faces) + +(defface magit-cherry-unmatched + '((t :foreground "cyan")) + "Face for unmatched cherry commits.") + +(defface magit-cherry-equivalent + '((t :foreground "magenta")) + "Face for equivalent cherry commits.") + +(defface magit-item-highlight + '((t :inherit secondary-selection)) + "Face for highlighting the current item." + :group 'magit-faces) + +(defface magit-item-mark + '((t :inherit highlight)) + "Face for highlighting marked item." + :group 'magit-faces) + +(defface magit-log-head-label-bisect-good + '((((class color) (background light)) + :box t + :background "light green" + :foreground "dark olive green") + (((class color) (background dark)) + :box t + :background "light green" + :foreground "dark olive green")) + "Face for good bisect refs." + :group 'magit-faces) + +(defface magit-log-head-label-bisect-skip + '((((class color) (background light)) + :box t + :background "light goldenrod" + :foreground "dark goldenrod") + (((class color) (background dark)) + :box t + :background "light goldenrod" + :foreground "dark goldenrod")) + "Face for skipped bisect refs." + :group 'magit-faces) + +(defface magit-log-head-label-bisect-bad + '((((class color) (background light)) + :box t + :background "IndianRed1" + :foreground "IndianRed4") + (((class color) (background dark)) + :box t + :background "IndianRed1" + :foreground "IndianRed4")) + "Face for bad bisect refs." + :group 'magit-faces) + +(defface magit-log-head-label-remote + '((((class color) (background light)) + :box t + :background "Grey85" + :foreground "OliveDrab4") + (((class color) (background dark)) + :box t + :background "Grey11" + :foreground "DarkSeaGreen2")) + "Face for remote branch head labels shown in log buffer." + :group 'magit-faces) + +(defface magit-log-head-label-tags + '((((class color) (background light)) + :box t + :background "LemonChiffon1" + :foreground "goldenrod4") + (((class color) (background dark)) + :box t + :background "LemonChiffon1" + :foreground "goldenrod4")) + "Face for tag labels shown in log buffer." + :group 'magit-faces) + +(defface magit-log-head-label-patches + '((((class color) (background light)) + :box t + :background "IndianRed1" + :foreground "IndianRed4") + (((class color) (background dark)) + :box t + :background "IndianRed1" + :foreground "IndianRed4")) + "Face for Stacked Git patches." + :group 'magit-faces) + +(defface magit-whitespace-warning-face + '((t :inherit trailing-whitespace)) + "Face for highlighting whitespace errors in Magit diffs." + :group 'magit-faces) + +(defface magit-log-head-label-local + '((((class color) (background light)) + :box t + :background "Grey85" + :foreground "LightSkyBlue4") + (((class color) (background dark)) + :box t + :background "Grey13" + :foreground "LightSkyBlue1")) + "Face for local branch head labels shown in log buffer." + :group 'magit-faces) + +(defface magit-log-head-label-head + '((((class color) (background light)) + :box t + :background "Grey70" + :foreground "Black") + (((class color) (background dark)) + :box t + :background "Grey20" + :foreground "White")) + "Face for working branch head labels shown in log buffer." + :group 'magit-faces) + +(defface magit-log-head-label-default + '((((class color) (background light)) + :box t + :background "Grey50") + (((class color) (background dark)) + :box t + :background "Grey50")) + "Face for unknown ref labels shown in log buffer." + :group 'magit-faces) + +(defface magit-log-head-label-wip + '((((class color) (background light)) + :box t + :background "Grey95" + :foreground "LightSkyBlue3") + (((class color) (background dark)) + :box t + :background "Grey07" + :foreground "LightSkyBlue4")) + "Face for git-wip labels shown in log buffer." + :group 'magit-faces) + +(defface magit-signature-good + '((t :foreground "green")) + "Face for good signatures." + :group 'magit-faces) + +(defface magit-signature-bad + '((t :foreground "red")) + "Face for bad signatures." + :group 'magit-faces) + +(defface magit-signature-untrusted + '((t :foreground "cyan")) + "Face for good untrusted signatures." + :group 'magit-faces) + +(defface magit-signature-none + '((t :inherit magit-log-message)) + "Face for unsigned commits." + :group 'magit-faces) + + +(defface magit-log-reflog-label-commit + '((((class color) (background light)) + :box t + :background "LemonChiffon1" + :foreground "goldenrod4") + (((class color) (background dark)) + :box t + :background "LemonChiffon1" + :foreground "goldenrod4")) + "Face for reflog subject labels shown in reflog buffer." + :group 'magit-faces) + +(defface magit-log-reflog-label-amend + '((t :inherit magit-log-reflog-label-commit)) + "Face for reflog subject labels shown in reflog buffer." + :group 'magit-faces) + +(defface magit-log-reflog-label-merge + '((t :inherit magit-log-reflog-label-commit)) + "Face for reflog subject labels shown in reflog buffer." + :group 'magit-faces) + +(defface magit-log-reflog-label-checkout + '((((class color) (background light)) + :box t + :background "Grey85" + :foreground "LightSkyBlue4") + (((class color) (background dark)) + :box t + :background "Grey13" + :foreground "LightSkyBlue1")) + "Face for reflog subject labels shown in reflog buffer." + :group 'magit-faces) + +(defface magit-log-reflog-label-reset + '((((class color) (background light)) + :box t + :background "IndianRed1" + :foreground "IndianRed4") + (((class color) (background dark)) + :box t + :background "IndianRed1" + :foreground "IndianRed4")) + "Face for reflog subject labels shown in reflog buffer." + :group 'magit-faces) + +(defface magit-log-reflog-label-rebase + '((((class color) (background light)) + :box t + :background "Grey85" + :foreground "OliveDrab4") + (((class color) (background dark)) + :box t + :background "Grey11" + :foreground "DarkSeaGreen2")) + "Face for reflog subject labels shown in reflog buffer." + :group 'magit-faces) + +(defface magit-log-reflog-label-cherry-pick +'((((class color) (background light)) + :box t + :background "light green" + :foreground "dark olive green") + (((class color) (background dark)) + :box t + :background "light green" + :foreground "dark olive green")) + "Face for reflog subject labels shown in reflog buffer." + :group 'magit-faces) + +(defface magit-log-reflog-label-remote + '((((class color) (background light)) + :box t + :background "Grey50") + (((class color) (background dark)) + :box t + :background "Grey50")) + "Face for reflog subject labels shown in reflog buffer." + :group 'magit-faces) + +(defface magit-log-reflog-label-other + '((((class color) (background light)) + :box t + :background "Grey50") + (((class color) (background dark)) + :box t + :background "Grey50")) + "Face for reflog subject labels shown in reflog buffer." + :group 'magit-faces) + +(defface magit-process-ok + '((t :inherit magit-section-title + :foreground "green")) + "Face for zero exit-status." + :group 'magit-faces) + +(defface magit-process-ng + '((t :inherit magit-section-title + :foreground "red")) + "Face for non-zero exit-status." + :group 'magit-faces) + +;;;; Keymaps + +;; Not an option to avoid advertising it. +(defvar magit-rigid-key-bindings nil + "Use rigid key bindings instead of thematic key popups. +If you enable this a lot of functionality is lost. You most +likely don't want that. This variable only has an effect if +set before loading libary `magit'.") + +(when (boundp 'git-commit-mode-map) + (define-key git-commit-mode-map (kbd "C-c C-d") 'magit-diff-staged)) + +(defvar magit-mode-map + (let ((map (make-keymap))) + (suppress-keymap map t) + (define-key map (kbd "n") 'magit-goto-next-section) + (define-key map (kbd "p") 'magit-goto-previous-section) + (define-key map (kbd "^") 'magit-goto-parent-section) + (define-key map (kbd "M-n") 'magit-goto-next-sibling-section) + (define-key map (kbd "M-p") 'magit-goto-previous-sibling-section) + (define-key map (kbd "TAB") 'magit-toggle-section) + (define-key map (kbd "") 'magit-expand-collapse-section) + (define-key map (kbd "1") 'magit-show-level-1) + (define-key map (kbd "2") 'magit-show-level-2) + (define-key map (kbd "3") 'magit-show-level-3) + (define-key map (kbd "4") 'magit-show-level-4) + (define-key map (kbd "M-1") 'magit-show-level-1-all) + (define-key map (kbd "M-2") 'magit-show-level-2-all) + (define-key map (kbd "M-3") 'magit-show-level-3-all) + (define-key map (kbd "M-4") 'magit-show-level-4-all) + (define-key map (kbd "M-h") 'magit-show-only-files) + (define-key map (kbd "M-H") 'magit-show-only-files-all) + (define-key map (kbd "M-s") 'magit-show-level-4) + (define-key map (kbd "M-S") 'magit-show-level-4-all) + (define-key map (kbd "g") 'magit-refresh) + (define-key map (kbd "G") 'magit-refresh-all) + (define-key map (kbd "?") 'magit-key-mode-popup-dispatch) + (define-key map (kbd ":") 'magit-git-command) + (define-key map (kbd "C-x 4 a") 'magit-add-change-log-entry-other-window) + (define-key map (kbd "L") 'magit-add-change-log-entry) + (define-key map (kbd "RET") 'magit-visit-item) + (define-key map (kbd "C-") 'magit-dired-jump) + (define-key map (kbd "SPC") 'magit-show-item-or-scroll-up) + (define-key map (kbd "DEL") 'magit-show-item-or-scroll-down) + (define-key map (kbd "C-w") 'magit-copy-item-as-kill) + (cond (magit-rigid-key-bindings + (define-key map (kbd "c") 'magit-commit) + (define-key map (kbd "m") 'magit-merge) + (define-key map (kbd "b") 'magit-checkout) + (define-key map (kbd "M") 'magit-branch-manager) + (define-key map (kbd "r") 'undefined) + (define-key map (kbd "f") 'magit-fetch-current) + (define-key map (kbd "F") 'magit-pull) + (define-key map (kbd "J") 'magit-apply-mailbox) + (define-key map (kbd "!") 'magit-git-command-topdir) + (define-key map (kbd "P") 'magit-push) + (define-key map (kbd "t") 'magit-tag) + (define-key map (kbd "l") 'magit-log) + (define-key map (kbd "o") 'magit-submodule-update) + (define-key map (kbd "B") 'undefined) + (define-key map (kbd "z") 'magit-stash)) + (t + (define-key map (kbd "c") 'magit-key-mode-popup-committing) + (define-key map (kbd "m") 'magit-key-mode-popup-merging) + (define-key map (kbd "b") 'magit-key-mode-popup-branching) + (define-key map (kbd "M") 'magit-key-mode-popup-remoting) + (define-key map (kbd "r") 'magit-key-mode-popup-rewriting) + (define-key map (kbd "f") 'magit-key-mode-popup-fetching) + (define-key map (kbd "F") 'magit-key-mode-popup-pulling) + (define-key map (kbd "J") 'magit-key-mode-popup-apply-mailbox) + (define-key map (kbd "!") 'magit-key-mode-popup-running) + (define-key map (kbd "P") 'magit-key-mode-popup-pushing) + (define-key map (kbd "t") 'magit-key-mode-popup-tagging) + (define-key map (kbd "l") 'magit-key-mode-popup-logging) + (define-key map (kbd "o") 'magit-key-mode-popup-submodule) + (define-key map (kbd "B") 'magit-key-mode-popup-bisecting) + (define-key map (kbd "z") 'magit-key-mode-popup-stashing))) + (define-key map (kbd "$") 'magit-process) + (define-key map (kbd "E") 'magit-interactive-rebase) + (define-key map (kbd "R") 'magit-rebase-step) + (define-key map (kbd "e") 'magit-ediff) + (define-key map (kbd "w") 'magit-wazzup) + (define-key map (kbd "y") 'magit-cherry) + (define-key map (kbd "q") 'magit-mode-quit-window) + (define-key map (kbd "x") 'magit-reset-head) + (define-key map (kbd "v") 'magit-revert-item) + (define-key map (kbd "a") 'magit-apply-item) + (define-key map (kbd "A") 'magit-cherry-pick-item) + (define-key map (kbd "d") 'magit-diff-working-tree) + (define-key map (kbd "D") 'magit-diff) + (define-key map (kbd "-") 'magit-diff-smaller-hunks) + (define-key map (kbd "+") 'magit-diff-larger-hunks) + (define-key map (kbd "0") 'magit-diff-default-hunks) + (define-key map (kbd "h") 'magit-key-mode-popup-diff-options) + (define-key map (kbd "H") 'magit-diff-toggle-refine-hunk) + (define-key map (kbd "S") 'magit-stage-all) + (define-key map (kbd "U") 'magit-unstage-all) + (define-key map (kbd "X") 'magit-reset-working-tree) + (define-key map (kbd "C-c C-c") 'magit-key-mode-popup-dispatch) + (define-key map (kbd "C-c C-e") 'magit-key-mode-popup-dispatch) + map) + "Parent keymap for all keymaps of modes derived from `magit-mode'.") + +(defvar magit-commit-mode-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map magit-mode-map) + (define-key map (kbd "C-c C-b") 'magit-go-backward) + (define-key map (kbd "C-c C-f") 'magit-go-forward) + (define-key map (kbd "SPC") 'scroll-up) + (define-key map (kbd "DEL") 'scroll-down) + (define-key map (kbd "j") 'magit-jump-to-diffstats) + map) + "Keymap for `magit-commit-mode'.") + +(defvar magit-status-mode-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map magit-mode-map) + (define-key map (kbd "s") 'magit-stage-item) + (define-key map (kbd "u") 'magit-unstage-item) + (define-key map (kbd "i") 'magit-ignore-item) + (define-key map (kbd "I") 'magit-ignore-item-locally) + (define-key map (kbd "j") 'magit-section-jump-map) + (define-key map (kbd ".") 'magit-mark-item) + (define-key map (kbd "=") 'magit-diff-with-mark) + (define-key map (kbd "k") 'magit-discard-item) + (define-key map (kbd "C") 'magit-commit-add-log) + map) + "Keymap for `magit-status-mode'.") + +(eval-after-load 'dired-x + '(define-key magit-status-mode-map [remap dired-jump] 'magit-dired-jump)) + +(defvar magit-log-mode-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map magit-mode-map) + (define-key map (kbd ".") 'magit-mark-item) + (define-key map (kbd "=") 'magit-diff-with-mark) + (define-key map (kbd "e") 'magit-log-show-more-entries) + (define-key map (kbd "h") 'magit-log-toggle-margin) + map) + "Keymap for `magit-log-mode'.") + +(defvar magit-cherry-mode-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map magit-mode-map) + map) + "Keymap for `magit-cherry-mode'.") + +(defvar magit-reflog-mode-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map magit-log-mode-map) + map) + "Keymap for `magit-reflog-mode'.") + +(defvar magit-diff-mode-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map magit-mode-map) + (define-key map (kbd "C-c C-b") 'magit-go-backward) + (define-key map (kbd "C-c C-f") 'magit-go-forward) + (define-key map (kbd "SPC") 'scroll-up) + (define-key map (kbd "DEL") 'scroll-down) + (define-key map (kbd "j") 'magit-jump-to-diffstats) + map) + "Keymap for `magit-diff-mode'.") + +(defvar magit-wazzup-mode-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map magit-mode-map) + (define-key map (kbd ".") 'magit-mark-item) + (define-key map (kbd "=") 'magit-diff-with-mark) + (define-key map (kbd "i") 'magit-ignore-item) + map) + "Keymap for `magit-wazzup-mode'.") + +(defvar magit-branch-manager-mode-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map magit-mode-map) + (define-key map (kbd "c") 'magit-create-branch) + (define-key map (kbd "a") 'magit-add-remote) + (define-key map (kbd "r") 'magit-rename-item) + (define-key map (kbd "k") 'magit-discard-item) + (define-key map (kbd "T") 'magit-change-what-branch-tracks) + map) + "Keymap for `magit-branch-manager-mode'.") + +(defvar magit-process-mode-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map magit-mode-map) + map) + "Keymap for `magit-process-mode'.") + +(defvar magit-section-jump-map + (let ((map (make-sparse-keymap))) + (define-key map (kbd "z") 'magit-jump-to-stashes) + (define-key map (kbd "n") 'magit-jump-to-untracked) + (define-key map (kbd "u") 'magit-jump-to-unstaged) + (define-key map (kbd "s") 'magit-jump-to-staged) + (define-key map (kbd "f") 'magit-jump-to-unpulled) + (define-key map (kbd "p") 'magit-jump-to-unpushed) + (define-key map (kbd "r") 'magit-jump-to-pending) + map) + "Submap for jumping to sections in `magit-status-mode'.") +(fset 'magit-section-jump-map magit-section-jump-map) + +(easy-menu-define magit-mode-menu magit-mode-map + "Magit menu" + '("Magit" + ["Refresh" magit-refresh t] + ["Refresh all" magit-refresh-all t] + "---" + ["Stage" magit-stage-item t] + ["Stage all" magit-stage-all t] + ["Unstage" magit-unstage-item t] + ["Unstage all" magit-unstage-all t] + ["Commit" magit-key-mode-popup-committing t] + ["Add log entry" magit-commit-add-log t] + ["Tag" magit-tag t] + "---" + ["Diff working tree" magit-diff-working-tree t] + ["Diff" magit-diff t] + ("Log" + ["Short Log" magit-log t] + ["Long Log" magit-log-long t] + ["Reflog" magit-reflog t] + ["Extended..." magit-key-mode-popup-logging t]) + "---" + ["Cherry pick" magit-cherry-pick-item t] + ["Apply" magit-apply-item t] + ["Revert" magit-revert-item t] + "---" + ["Ignore" magit-ignore-item t] + ["Ignore locally" magit-ignore-item-locally t] + ["Discard" magit-discard-item t] + ["Reset head" magit-reset-head t] + ["Reset working tree" magit-reset-working-tree t] + ["Stash" magit-stash t] + ["Snapshot" magit-stash-snapshot t] + "---" + ["Branch..." magit-checkout t] + ["Merge" magit-merge t] + ["Interactive resolve" magit-interactive-resolve t] + ["Rebase" magit-rebase-step t] + ("Rewrite" + ["Start" magit-rewrite-start t] + ["Stop" magit-rewrite-stop t] + ["Finish" magit-rewrite-finish t] + ["Abort" magit-rewrite-abort t] + ["Set used" magit-rewrite-set-used t] + ["Set unused" magit-rewrite-set-unused t]) + "---" + ["Push" magit-push t] + ["Pull" magit-pull t] + ["Remote update" magit-remote-update t] + ("Submodule" + ["Submodule update" magit-submodule-update t] + ["Submodule update and init" magit-submodule-update-init t] + ["Submodule init" magit-submodule-init t] + ["Submodule sync" magit-submodule-sync t]) + "---" + ("Extensions") + "---" + ["Display Git output" magit-process t] + ["Quit Magit" magit-mode-quit-window t])) + + +;;; Utilities (1) +;;;; Minibuffer Input + +(defun magit-iswitchb-completing-read + (prompt choices &optional predicate require-match initial-input hist def) + "iswitchb-based completing-read almost-replacement." + (require 'iswitchb) + (let ((iswitchb-make-buflist-hook + (lambda () + (setq iswitchb-temp-buflist (if (consp (car choices)) + (mapcar #'car choices) + choices))))) + (iswitchb-read-buffer prompt (or initial-input def) require-match))) + +(defun magit-ido-completing-read + (prompt choices &optional predicate require-match initial-input hist def) + "ido-based completing-read almost-replacement." + (require 'ido) + (let ((reply (ido-completing-read + prompt + (if (consp (car choices)) + (mapcar #'car choices) + choices) + predicate require-match initial-input hist def))) + (or (and (consp (car choices)) + (cdr (assoc reply choices))) + reply))) + +(defun magit-builtin-completing-read + (prompt choices &optional predicate require-match initial-input hist def) + "Magit wrapper for standard `completing-read' function." + (let ((reply (completing-read + (if (and def (> (length prompt) 2) + (string-equal ": " (substring prompt -2))) + (format "%s (default %s): " (substring prompt 0 -2) def) + prompt) + choices predicate require-match initial-input hist def))) + (if (string= reply "") + (if require-match + (user-error "Nothing selected") + nil) + reply))) + +(defun magit-completing-read + (prompt collection &optional predicate require-match initial-input hist def) + "Call function in `magit-completing-read-function' to read user input. + +Read `completing-read' documentation for the meaning of the argument." + (funcall magit-completing-read-function + (concat prompt ": ") collection predicate + require-match initial-input hist def)) + +(defvar magit-gpg-secret-key-hist nil) + +(defun magit-read-gpg-secret-key (prompt) + (let ((keys (mapcar + (lambda (key) + (list (epg-sub-key-id (car (epg-key-sub-key-list key))) + (let ((id-obj (car (epg-key-user-id-list key))) + (id-str nil)) + (when id-obj + (setq id-str (epg-user-id-string id-obj)) + (if (stringp id-str) + id-str + (epg-decode-dn id-obj)))))) + (epg-list-keys (epg-make-context epa-protocol) nil t)))) + (magit-completing-read prompt keys nil nil nil 'magit-gpg-secret-key-hist + (car (or magit-gpg-secret-key-hist keys))))) + +;;;; Various Utilities + +(defmacro magit-bind-match-strings (varlist &rest body) + (declare (indent 1)) + (let ((i 0)) + `(let ,(mapcar (lambda (var) + (list var (list 'match-string (cl-incf i)))) + varlist) + ,@body))) + +(defun magit-file-line (file) + "Return the first line of FILE as a string." + (when (file-regular-p file) + (with-temp-buffer + (insert-file-contents file) + (buffer-substring-no-properties (point-min) + (line-end-position))))) + +(defun magit-file-lines (file &optional keep-empty-lines) + "Return a list of strings containing one element per line in FILE. +Unless optional argument KEEP-EMPTY-LINES is t, trim all empty lines." + (when (file-regular-p file) + (with-temp-buffer + (insert-file-contents file) + (split-string (buffer-string) "\n" (not keep-empty-lines))))) + +(defvar-local magit-file-name () + "Name of file the buffer shows a different version of.") + +(defun magit-buffer-file-name (&optional relative) + (let* ((topdir (magit-get-top-dir)) + (filename (or buffer-file-name + (when (buffer-base-buffer) + (with-current-buffer (buffer-base-buffer) + buffer-file-name)) + (when magit-file-name + (expand-file-name magit-file-name topdir))))) + (when filename + (setq filename (file-truename filename)) + (if relative + (file-relative-name filename topdir) + filename)))) + +(defun magit-format-duration (duration spec width) + (cl-destructuring-bind (char unit units weight) + (car spec) + (let ((cnt (round (/ duration weight 1.0)))) + (if (or (not (cdr spec)) + (>= (/ duration weight) 1)) + (if (= width 1) + (format "%3i%c" cnt char) + (format (format "%%3i %%-%is" width) cnt + (if (= cnt 1) unit units))) + (magit-format-duration duration (cdr spec) width))))) + +(defun magit-flatten-onelevel (list) + (cl-mapcan (lambda (elt) + (cond ((consp elt) (copy-sequence elt)) + (elt (list elt)))) + list)) + +(defun magit-insert (string face &rest args) + (if magit-use-overlays + (let ((start (point))) + (insert string) + (let ((ov (make-overlay start (point) nil t))) + (overlay-put ov 'face face) + ;; (overlay-put ov 'priority 10) + (overlay-put ov 'evaporate t))) + (insert (propertize string 'face face))) + (apply #'insert args)) + +(defun magit-put-face-property (start end face) + (if magit-use-overlays + (let ((ov (make-overlay start end nil t))) + (overlay-put ov 'face face) + ;; (overlay-put ov 'priority 10) + (overlay-put ov 'evaporate t)) + (put-text-property start end 'face face))) + +;;;; Buffer Margins + +(defun magit-set-buffer-margin (width enable) + (let ((window (get-buffer-window))) + (when window + (with-selected-window window + (set-window-margins nil (car (window-margins)) (if enable width 0)) + (let ((fn (apply-partially + (lambda (width) + (let ((window (get-buffer-window))) + (when window + (with-selected-window window + (set-window-margins nil (car (window-margins)) + width))))) + width))) + (if enable + (add-hook 'window-configuration-change-hook fn nil t) + (remove-hook 'window-configuration-change-hook fn t))))))) + +(defun magit-make-margin-overlay (&rest strings) + (let ((o (make-overlay (point) (line-end-position) nil t))) + (overlay-put o 'evaporate t) + (overlay-put o 'before-string + (propertize "o" 'display + (list '(margin right-margin) + (apply #'concat strings)))))) + +(defvar-local magit-log-margin-timeunit-width nil) + +(defun magit-log-margin-set-timeunit-width () + (cl-destructuring-bind (width characterp duration-spec) + magit-log-margin-spec + (setq magit-log-margin-timeunit-width + (if characterp + 1 + (apply 'max (mapcar (lambda (e) + (max (length (nth 1 e)) + (length (nth 2 e)))) + (symbol-value duration-spec))))))) + +;;;; Emacsclient Support + +(defmacro magit-with-emacsclient (server-window &rest body) + "Arrange for Git to use Emacsclient as \"the git editor\". + +Git processes that use \"the editor\" have to be asynchronous. +The use of this macro ensures that such processes inside BODY use +Emacsclient as \"the editor\" by setting the environment variable +$GIT_EDITOR accordingly around calls to Git and starting the +server if necessary." + (declare (indent 1)) + `(let* ((process-environment process-environment) + (magit-process-popup-time -1)) + ;; Make sure the client is usable. + (magit-assert-emacsclient "use `magit-with-emacsclient'") + ;; Make sure server-use-tcp's value is valid. + (unless (featurep 'make-network-process '(:family local)) + (setq server-use-tcp t)) + ;; Make sure the server is running. + (unless server-process + (when (server-running-p server-name) + (setq server-name (format "server%s" (emacs-pid))) + (when (server-running-p server-name) + (server-force-delete server-name))) + (server-start)) + ;; Tell Git to use the client. + (setenv "GIT_EDITOR" + (concat magit-emacsclient-executable + ;; Tell the client where the server file is. + (and (not server-use-tcp) + (concat " --socket-name=" + (expand-file-name server-name + server-socket-dir))))) + (when server-use-tcp + (setenv "EMACS_SERVER_FILE" + (expand-file-name server-name server-auth-dir))) + ;; As last resort fallback to a new Emacs instance. + (setenv "ALTERNATE_EDITOR" + (expand-file-name invocation-name invocation-directory)) + ;; Git has to be called asynchronously in BODY or we create a + ;; dead lock. By the time Emacsclient is called the dynamic + ;; binding is no longer in effect and our primitives don't + ;; support callbacks. Temporarily set the default value and + ;; restore the old value using a timer. + (let ((window ,server-window)) + (unless (equal window server-window) + (run-at-time "1 sec" nil + (apply-partially (lambda (value) + (setq server-window value)) + server-window)) + (setq-default server-window window))) + ,@body)) + +(defun magit-use-emacsclient-p () + (and magit-emacsclient-executable + (not (tramp-tramp-file-p default-directory)))) + +(defun magit-assert-emacsclient (action) + (unless magit-emacsclient-executable + (user-error "Cannot %s when `magit-emacsclient-executable' is nil" action)) + (when (tramp-tramp-file-p default-directory) + (user-error "Cannot %s when accessing repository using tramp" action))) + +;;;; Git Config + +(defun magit-get (&rest keys) + "Return the value of Git config entry specified by KEYS." + (magit-git-string "config" (mapconcat 'identity keys "."))) + +(defun magit-get-all (&rest keys) + "Return all values of the Git config entry specified by KEYS." + (magit-git-lines "config" "--get-all" (mapconcat 'identity keys "."))) + +(defun magit-get-boolean (&rest keys) + "Return the boolean value of Git config entry specified by KEYS." + (magit-git-true "config" "--bool" (mapconcat 'identity keys "."))) + +(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 ".")))) + +;;;; Git Low-Level + +(defun magit-git-repo-p (dir) + (file-exists-p (expand-file-name ".git" dir))) + +(defun magit-git-dir (&optional path) + "Return absolute path to the GIT_DIR for the current repository. +If optional PATH is non-nil it has to be a path relative to the +GIT_DIR and its absolute path is returned" + (let ((gitdir (magit-git-string "rev-parse" "--git-dir"))) + (when gitdir + (setq gitdir (file-name-as-directory + (magit-expand-git-file-name gitdir))) + (if path + (expand-file-name (convert-standard-filename path) gitdir) + gitdir)))) + +(defun magit-no-commit-p () + "Return non-nil if there is no commit in the current git repository." + (not (magit-git-string "rev-list" "-1" "HEAD"))) + +(defun magit-get-top-dir (&optional directory) + "Return the top directory for the current repository. + +Determine the repository which contains `default-directory' in +either its work tree or git control directory and return its top +directory. If there is no top directory, because the repository +is bare, return the control directory instead. + +If optional DIRECTORY is non-nil then return the top directory of +the repository that contains that instead. DIRECTORY has to be +an existing directory." + (setq directory (if directory + (file-name-as-directory + (expand-file-name directory)) + default-directory)) + (unless (file-directory-p directory) + (error "%s isn't an existing directory" directory)) + (let* ((default-directory directory) + (top (magit-git-string "rev-parse" "--show-toplevel"))) + (if top + (file-name-as-directory (magit-expand-git-file-name top)) + (let ((gitdir (magit-git-dir))) + (when gitdir + (if (magit-bare-repo-p) + gitdir + (file-name-directory (directory-file-name gitdir)))))))) + +(defun magit-expand-git-file-name (filename) + (when (tramp-tramp-file-p default-directory) + (setq filename (file-relative-name filename + (with-parsed-tramp-file-name + default-directory nil + localname)))) + (expand-file-name filename)) + +(defun magit-file-relative-name (file) + "Return the path of FILE relative to the repository root. +If FILE isn't inside a Git repository then return nil." + (setq file (file-truename file)) + (let ((topdir (magit-get-top-dir (file-name-directory file)))) + (and topdir (substring file (length topdir))))) + +(defun magit-bare-repo-p () + "Return t if the current repository is bare." + (magit-git-true "rev-parse" "--is-bare-repository")) + +(defun magit-get-ref (ref) + (magit-git-string "symbolic-ref" "-q" ref)) + +(defun magit-get-current-branch () + (let ((head (magit-get-ref "HEAD"))) + (when (and head (string-match "^refs/heads/" head)) + (substring head 11)))) + +(defun magit-get-remote/branch (&optional branch verify) + "Return the remote-tracking branch of BRANCH used for pulling. +Return a string of the form \"REMOTE/BRANCH\". + +If optional BRANCH is nil return the remote-tracking branch of +the current branch. If optional VERIFY is non-nil verify that +the remote branch exists; else return nil." + (save-match-data + (let (remote remote-branch remote/branch) + (and (or branch (setq branch (magit-get-current-branch))) + (setq remote (magit-get "branch" branch "remote")) + (setq remote-branch (magit-get "branch" branch "merge")) + (string-match "^refs/heads/\\(.+\\)" remote-branch) + (setq remote/branch + (concat remote "/" (match-string 1 remote-branch))) + (or (not verify) + (magit-git-success "rev-parse" "--verify" remote/branch)) + remote/branch)))) + +(defun magit-get-tracked-branch (&optional branch qualified pretty) + "Return the name of the tracking branch the local branch name BRANCH. + +If optional QUALIFIED is non-nil return the full branch path, +otherwise try to shorten it to a name (which may fail). If +optional PRETTY is non-nil additionally format the branch name +according to option `magit-remote-ref-format'." + (unless branch + (setq branch (magit-get-current-branch))) + (when branch + (let ((remote (magit-get "branch" branch "remote")) + (merge (magit-get "branch" branch "merge"))) + (when (and (not merge) + (not (equal remote "."))) + (setq merge branch)) + (when (and remote merge) + (if (string= remote ".") + (cond (qualified merge) + ((string-match "^refs/heads/" merge) + (substring merge 11)) + ((string-match "^refs/" merge) + merge)) + (let* ((fetch (mapcar (lambda (f) (split-string f "[+:]" t)) + (magit-get-all "remote" remote "fetch"))) + (match (cadr (assoc merge fetch)))) + (unless match + (let* ((prefix (nreverse (split-string merge "/"))) + (unique (list (car prefix)))) + (setq prefix (cdr prefix)) + (setq fetch + (cl-mapcan + (lambda (f) + (cl-destructuring-bind (from to) f + (setq from (nreverse (split-string from "/"))) + (when (equal (car from) "*") + (list (list (cdr from) to))))) + fetch)) + (while (and prefix (not match)) + (if (setq match (cadr (assoc prefix fetch))) + (setq match (concat (substring match 0 -1) + (mapconcat 'identity unique "/"))) + (push (car prefix) unique) + (setq prefix (cdr prefix)))))) + (cond ((not match) nil) + (qualified match) + ((string-match "^refs/remotes/" match) + (if pretty + (magit-format-ref match) + (substring match 13))) + (t match)))))))) + +(defun magit-get-previous-branch () + "Return the refname of the previously checked out branch. +Return nil if the previously checked out branch no longer exists." + (magit-name-rev (magit-git-string "rev-parse" "--verify" "@{-1}"))) + +(defun magit-get-current-tag (&optional with-distance-p) + "Return the closest tag reachable from \"HEAD\". + +If optional WITH-DISTANCE-P is non-nil then return (TAG COMMITS), +if it is `dirty' return (TAG COMMIT DIRTY). COMMITS is the number +of commits in \"HEAD\" but not in TAG and DIRTY is t if there are +uncommitted changes, nil otherwise." + (let ((tag (magit-git-string "describe" "--long" "--tags" + (and (eq with-distance-p 'dirty) "--dirty")))) + (save-match-data + (when tag + (string-match + "\\(.+\\)-\\(?:0[0-9]*\\|\\([0-9]+\\)\\)-g[0-9a-z]+\\(-dirty\\)?$" tag) + (if with-distance-p + (list (match-string 1 tag) + (string-to-number (or (match-string 2 tag) "0")) + (and (match-string 3 tag) t)) + (match-string 1 tag)))))) + +(defun magit-get-next-tag (&optional with-distance-p) + "Return the closest tag from which \"HEAD\" is reachable. + +If no such tag can be found or if the distance is 0 (in which +case it is the current tag, not the next) return nil instead. + +If optional WITH-DISTANCE-P is non-nil then return (TAG COMMITS) +where COMMITS is the number of commits in TAG but not in \"HEAD\"." + (let ((rev (magit-git-string "describe" "--contains" "HEAD"))) + (save-match-data + (when (and rev (string-match "^[^^~]+" rev)) + (let ((tag (match-string 0 rev))) + (unless (equal tag (magit-get-current-tag)) + (if with-distance-p + (list tag (car (magit-rev-diff-count tag "HEAD"))) + tag))))))) + +(defun magit-get-remote (branch) + "Return the name of the remote for BRANCH. +If branch is nil or it has no remote, but a remote named +\"origin\" exists, return that. Otherwise, return nil." + (let ((remote (or (and branch (magit-get "branch" branch "remote")) + (and (magit-get "remote" "origin" "url") "origin")))) + (unless (string= remote "") + remote))) + +(defun magit-get-current-remote () + "Return the name of the remote for the current branch. +If there is no current branch, or no remote for that branch, +but a remote named \"origin\" is configured, return that. +Otherwise, return nil." + (magit-get-remote (magit-get-current-branch))) + +(defun magit-ref-exists-p (ref) + (magit-git-success "show-ref" "--verify" ref)) + +(defun magit-rev-parse (&rest args) + "Execute `git rev-parse ARGS', returning first line of output. +If there is no output return nil." + (apply #'magit-git-string "rev-parse" args)) + +(defun magit-ref-ambiguous-p (ref) + "Return whether or not REF is ambiguous." + ;; An ambiguous ref does not cause `git rev-parse --abbrev-ref' + ;; to exits with a non-zero status. But there is nothing on + ;; stdout in that case. + (not (magit-git-string "rev-parse" "--abbrev-ref" ref))) + +(defun magit-rev-diff-count (a b) + "Return the commits in A but not B and vice versa. +Return a list of two integers: (A>B B>A)." + (mapcar 'string-to-number + (split-string (magit-git-string "rev-list" + "--count" "--left-right" + (concat a "..." b)) + "\t"))) + +(defun magit-name-rev (rev &optional no-trim) + "Return a human-readable name for REV. +Unlike `git name-rev', this will remove \"tags/\" and \"remotes/\" +prefixes if that can be done unambiguously (unless optional arg +NO-TRIM is non-nil). In addition, it will filter out revs +involving HEAD." + (when rev + (let ((name (magit-git-string "name-rev" "--no-undefined" "--name-only" rev))) + ;; There doesn't seem to be a way of filtering HEAD out from name-rev, + ;; so we have to do it manually. + ;; HEAD-based names are too transient to allow. + (when (and (stringp name) + (string-match "^\\(.*\\" name)) + (setq name (magit-rev-parse rev))))) + (setq rev (or name rev)) + (when (string-match "^\\(?:tags\\|remotes\\)/\\(.*\\)" rev) + (let ((plain-name (match-string 1 rev))) + (unless (or no-trim (magit-ref-ambiguous-p plain-name)) + (setq rev plain-name)))) + rev))) + +(defun magit-file-uptodate-p (file) + (magit-git-success "diff" "--quiet" "--" file)) + +(defun magit-anything-staged-p () + (magit-git-failure "diff" "--quiet" "--cached")) + +(defun magit-anything-unstaged-p () + (magit-git-failure "diff" "--quiet")) + +(defun magit-anything-modified-p () + (or (magit-anything-staged-p) + (magit-anything-unstaged-p))) + +(defun magit-commit-parents (commit) + (cdr (split-string (magit-git-string "rev-list" "-1" "--parents" commit)))) + +(defun magit-assert-one-parent (commit command) + (when (> (length (magit-commit-parents commit)) 1) + (user-error "Cannot %s a merge commit" command))) + +(defun magit-decode-git-path (path) + (if (eq (aref path 0) ?\") + (string-as-multibyte (read path)) + path)) + +(defun magit-abbrev-length () + (string-to-number (or (magit-get "core.abbrev") "7"))) + +(defun magit-abbrev-arg () + (format "--abbrev=%d" (magit-abbrev-length))) + +;;;; Git Revisions + +(defvar magit-uninteresting-refs + '("^refs/stash$" + "^refs/remotes/[^/]+/HEAD$" + "^refs/remotes/[^/]+/top-bases$" + "^refs/top-bases$")) + +(cl-defun magit-list-interesting-refs (&optional uninteresting + (refs nil srefs)) + (cl-loop for ref in (if srefs + refs + (mapcar (lambda (l) + (cadr (split-string l " "))) + (magit-git-lines "show-ref"))) + with label + unless (or (cl-loop for i in + (cl-typecase uninteresting + (null magit-uninteresting-refs) + (list uninteresting) + (string (cons (format "^refs/heads/%s$" + uninteresting) + magit-uninteresting-refs))) + thereis (string-match i ref)) + (not (setq label (magit-format-ref ref)))) + collect (cons label ref))) + +(defun magit-format-ref (ref) + (cond ((string-match "refs/heads/\\(.*\\)" ref) + (match-string 1 ref)) + ((string-match "refs/tags/\\(.*\\)" ref) + (format (if (eq magit-remote-ref-format 'branch-then-remote) + "%s (tag)" + "%s") + (match-string 1 ref))) + ((string-match "refs/remotes/\\([^/]+\\)/\\(.+\\)" ref) + (if (eq magit-remote-ref-format 'branch-then-remote) + (format "%s (%s)" + (match-string 2 ref) + (match-string 1 ref)) + (substring ref 13))) + (t ref))) + +(defvar magit-read-file-hist nil) + +(defun magit-read-file-from-rev (revision &optional default) + (unless revision + (setq revision "HEAD")) + (let ((default-directory (magit-get-top-dir))) + (magit-completing-read + (format "Retrieve file from %s" revision) + (magit-git-lines "ls-tree" "-r" "-t" "--name-only" revision) + nil 'require-match + nil 'magit-read-file-hist + (or default (magit-buffer-file-name t))))) + +(defun magit-read-file-trace (ignored) + (let ((file (magit-read-file-from-rev "HEAD")) + (trace (read-string "Trace: "))) + (if (string-match + "^\\(/.+/\\|:[^:]+\\|[0-9]+,[-+]?[0-9]+\\)\\(:\\)?$" trace) + (concat trace (or (match-string 2 trace) ":") file) + (user-error "Trace is invalid, see man git-log")))) + +(defvar magit-read-rev-history nil + "The history of inputs to `magit-read-rev' and `magit-read-tag'.") + +(defun magit-read-tag (prompt &optional require-match) + (magit-completing-read prompt (magit-git-lines "tag") nil + require-match nil 'magit-read-rev-history)) + +(defun magit-read-rev (prompt &optional default uninteresting noselection) + (let* ((interesting-refs + (mapcar (lambda (elt) + (setcdr elt (replace-regexp-in-string + "^refs/heads/" "" (cdr elt))) + elt) + (magit-list-interesting-refs uninteresting))) + (reply (magit-completing-read prompt interesting-refs nil nil nil + 'magit-read-rev-history default)) + (rev (or (cdr (assoc reply interesting-refs)) reply))) + (when (equal rev ".") + (setq rev magit-marked-commit)) + (unless (or rev noselection) + (user-error "No rev selected")) + rev)) + +(defun magit-read-rev-with-default (prompt) + (magit-read-rev prompt + (let ((branch (or (magit-guess-branch) "HEAD"))) + (when branch + (if (string-match "^refs/\\(.*\\)" branch) + (match-string 1 branch) + branch))))) + +(defun magit-read-rev-range (op &optional def-beg def-end) + (let ((beg (magit-read-rev (format "%s range or start" op) def-beg))) + (save-match-data + (if (string-match "^\\(.+\\)\\.\\.\\(.+\\)$" beg) + (cons (match-string 1 beg) (match-string 2 beg)) + (let ((end (magit-read-rev (format "%s end" op) def-end nil t))) + (if end (cons beg end) beg)))))) + +(defun magit-read-stash (prompt) + (let ((n (read-number prompt 0)) + (l (1- (length (magit-git-lines "stash" "list"))))) + (if (> n l) + (user-error "No stash older than stash@{%i}" l) + (format "stash@{%i}" n)))) + +(defun magit-read-remote (prompt &optional default require-match) + (magit-completing-read prompt (magit-git-lines "remote") + nil require-match nil nil + (or default (magit-guess-remote)))) + +(defun magit-read-remote-branch (prompt remote &optional default) + (let ((branch (magit-completing-read + prompt + (cl-mapcan + (lambda (b) + (and (not (string-match " -> " b)) + (string-match (format "^ *%s/\\(.*\\)$" + (regexp-quote remote)) b) + (list (match-string 1 b)))) + (magit-git-lines "branch" "-r")) + nil nil nil nil default))) + (unless (string= branch "") + branch))) + +(defun magit-format-ref-label (ref) + (cl-destructuring-bind (re face fn) + (cl-find-if (lambda (ns) + (string-match (car ns) ref)) + magit-refs-namespaces) + (if fn + (funcall fn ref face) + (propertize (or (match-string 1 ref) ref) 'face face)))) + +(defun magit-format-ref-labels (string) + (save-match-data + (mapconcat 'magit-format-ref-label + (mapcar 'cdr + (magit-list-interesting-refs + nil (split-string string "\\(tag: \\|[(), ]\\)" t))) + " "))) + +(defun magit-insert-ref-labels (string) + (save-match-data + (dolist (ref (split-string string "\\(tag: \\|[(), ]\\)" t) " ") + (cl-destructuring-bind (re face fn) + (cl-find-if (lambda (elt) (string-match (car elt) ref)) + magit-refs-namespaces) + (if fn + (let ((text (funcall fn ref face))) + (magit-insert text (get-text-property 1 'face text) ?\s)) + (magit-insert (or (match-string 1 ref) ref) face ?\s)))))) + +(defun magit-format-rev-summary (rev) + (let ((s (magit-git-string "log" "-1" + (concat "--pretty=format:%h %s") rev))) + (when s + (string-match " " s) + (put-text-property 0 (match-beginning 0) 'face 'magit-log-sha1 s) + s))) + +;;; Magit Api +;;;; Section Api +;;;;; Section Core + +(cl-defstruct magit-section + type info + beginning content-beginning end + hidden needs-refresh-on-show highlight + diff-status diff-file2 diff-range + process + parent children) + +(defvar-local magit-root-section nil + "The root section in the current buffer. +All other sections are descendants of this section. The value +of this variable is set by `magit-with-section' and you should +never modify it.") +(put 'magit-root-section 'permanent-local t) + +;;;;; Section Creation + +(defvar magit-with-section--parent nil + "For use by `magit-with-section' only.") + +(defvar magit-with-section--oldroot nil + "For use by `magit-with-section' only.") + +(defmacro magit-with-section (arglist &rest body) + "\n\n(fn (NAME TYPE &optional INFO HEADING NOHIGHLIGHT COLLAPSE) &rest ARGS)" + (declare (indent 1) (debug ((form form &optional form form form) body))) + (let ((s (car arglist))) + `(let ((,s (make-magit-section + :type ',(nth 1 arglist) + :info ,(nth 2 arglist) + :highlight (not ,(nth 4 arglist)) + :beginning (point-marker) + :content-beginning (point-marker) + :parent magit-with-section--parent))) + (setf (magit-section-hidden ,s) + (let ((old (and magit-with-section--oldroot + (magit-find-section (magit-section-path ,s) + magit-with-section--oldroot)))) + (if old + (magit-section-hidden old) + ,(nth 5 arglist)))) + (let ((magit-with-section--parent ,s) + (magit-with-section--oldroot + (or magit-with-section--oldroot + (unless magit-with-section--parent + (prog1 magit-root-section + (setq magit-root-section ,s)))))) + ,@body) + (when ,s + (set-marker-insertion-type (magit-section-content-beginning ,s) t) + (let ((heading ,(nth 3 arglist))) + (when heading + (save-excursion + (goto-char (magit-section-beginning ,s)) + (insert + (if (string-match-p "\n$" heading) + (substring heading 0 -1) + (propertize + (let (c) + (if (and magit-show-child-count + (string-match-p ":$" heading) + (> (setq c (length (magit-section-children ,s))) 0)) + (format "%s (%s):" (substring heading 0 -1) c) + heading)) + 'face 'magit-section-title))) + (insert "\n")))) + (set-marker-insertion-type (magit-section-beginning ,s) t) + (goto-char (max (point) ; smaller if there is no content + (magit-section-content-beginning ,s))) + (setf (magit-section-end ,s) (point-marker)) + (save-excursion + (goto-char (magit-section-beginning ,s)) + (let ((end (magit-section-end ,s))) + (while (< (point) end) + (let ((next (or (next-single-property-change + (point) 'magit-section) + end))) + (unless (get-text-property (point) 'magit-section) + (put-text-property (point) next 'magit-section ,s)) + (goto-char next))))) + (if (eq ,s magit-root-section) + (magit-section-set-hidden magit-root-section nil) + (setf (magit-section-children (magit-section-parent ,s)) + (nconc (magit-section-children (magit-section-parent ,s)) + (list ,s))))) + ,s))) + +(defmacro magit-cmd-insert-section (arglist washer program &rest args) + "\n\n(fn (TYPE &optional HEADING) WASHER PROGRAM &rest ARGS)" + (declare (indent 2)) + `(magit-with-section (section ,(car arglist) + ',(car arglist) + ,(cadr arglist) t) + (apply #'process-file ,program nil (list t nil) nil + (magit-flatten-onelevel (list ,@args))) + (unless (eq (char-before) ?\n) + (insert "\n")) + (save-restriction + (narrow-to-region (magit-section-content-beginning section) (point)) + (goto-char (point-min)) + (funcall ,washer) + (goto-char (point-max))) + (let ((parent (magit-section-parent section)) + (head-beg (magit-section-beginning section)) + (body-beg (magit-section-content-beginning section))) + (if (= (point) body-beg) + (if (not parent) + (insert "(empty)\n") + (delete-region head-beg body-beg) + (setq section nil)) + (insert "\n"))))) + +(defmacro magit-git-insert-section (arglist washer &rest args) + "\n\n(fn (TYPE &optional HEADING) WASHER &rest ARGS)" + (declare (indent 2)) + `(magit-cmd-insert-section ,arglist + ,washer + magit-git-executable + magit-git-standard-options ,@args)) + +(defmacro magit-insert-line-section (arglist line) + "\n\n(fn (TYPE &optional INFO) line)" + (declare (indent 1)) + (let ((l (cl-gensym "line"))) + `(let ((,l (concat ,line "\n"))) + (when (string-match "^\\([^:]+\\):\\( \\)" ,l) + (setq ,l (replace-match + (make-string (max 1 (- magit-status-line-align-to + (length (match-string 1 ,l)))) + ?\s) + t t ,l 2))) + (magit-with-section (section ,(car arglist) ',(car arglist) ,l t) + (setf (magit-section-info section) ,(cadr arglist)))))) + +;;;;; Section Searching + +(defun magit-find-section (path top) + "Find the section at the path PATH in subsection of section TOP." + (if (null path) + top + (let ((secs (magit-section-children top))) + (while (and secs (not (equal (car path) + (magit-section-info (car secs))))) + (setq secs (cdr secs))) + (when (car secs) + (magit-find-section (cdr path) (car secs)))))) + +(defun magit-section-path (section) + "Return the path of SECTION." + (let ((parent (magit-section-parent section))) + (when parent + (append (magit-section-path parent) + (list (magit-section-info section)))))) + +(defun magit-find-section-after (pos) + "Find the first section that begins after POS." + (magit-find-section-after* pos (list magit-root-section))) + +(defun magit-find-section-after* (pos secs) + "Find the first section that begins after POS in the list SECS +\(including children of sections in SECS)." + (while (and secs + (<= (magit-section-beginning (car secs)) pos)) + (setq secs (if (magit-section-hidden (car secs)) + (cdr secs) + (append (magit-section-children (car secs)) + (cdr secs))))) + (car secs)) + +(defun magit-find-section-before (pos) + "Return the last section that begins before POS." + (let ((section (magit-find-section-at pos))) + (cl-do* ((current (or (magit-section-parent section) + section) + next) + (next (unless (magit-section-hidden current) + (magit-find-section-before* + pos (magit-section-children current))) + (unless (magit-section-hidden current) + (magit-find-section-before* + pos (magit-section-children current))))) + ((null next) current)))) + +(defun magit-find-section-before* (pos secs) + "Find the last section that begins before POS in the list SECS." + (let ((prev nil)) + (while (and secs + (< (magit-section-beginning (car secs)) pos)) + (setq prev (car secs)) + (setq secs (cdr secs))) + prev)) + +(defun magit-current-section () + "Return the Magit section at point." + (magit-find-section-at (point))) + +(defun magit-find-section-at (pos) + "Return the Magit section at POS." + (or (get-text-property pos 'magit-section) + magit-root-section)) + +;;;;; Section Jumping + +(defun magit-goto-next-section () + "Go to the next section." + (interactive) + (let ((next (magit-find-section-after (point)))) + (if next + (magit-goto-section next) + (message "No next section")))) + +(defun magit-goto-previous-section () + "Go to the previous section." + (interactive) + (if (eq (point) 1) + (message "No previous section") + (magit-goto-section (magit-find-section-before (point))))) + +(defun magit-goto-parent-section () + "Go to the parent section." + (interactive) + (let ((parent (magit-section-parent (magit-current-section)))) + (when parent + (goto-char (magit-section-beginning parent))))) + +(defun magit-goto-next-sibling-section () + "Go to the next sibling section." + (interactive) + (let* ((section (magit-current-section)) + (parent (magit-section-parent section)) + (next (and parent (magit-find-section-after* + (1- (magit-section-end section)) + (magit-section-children parent))))) + (if next + (magit-goto-section next) + (magit-goto-next-section)))) + +(defun magit-goto-previous-sibling-section () + "Go to the previous sibling section." + (interactive) + (let* ((section (magit-current-section)) + (parent (magit-section-parent section)) + (prev (and parent (magit-find-section-before* + (magit-section-beginning section) + (magit-section-children parent))))) + (if prev + (magit-goto-section prev) + (magit-goto-previous-section)))) + +(defun magit-goto-section (section) + (goto-char (magit-section-beginning section)) + (cond + ((and magit-log-auto-more + (eq (magit-section-type section) 'longer)) + (magit-log-show-more-entries) + (forward-line -1) + (magit-goto-next-section)) + ((and (eq (magit-section-type section) 'commit) + (derived-mode-p 'magit-log-mode) + (or (eq (car magit-refresh-args) 'oneline) + (get-buffer-window magit-commit-buffer-name))) + (magit-show-commit (magit-section-info section) t)))) + +(defun magit-goto-section-at-path (path) + "Go to the section described by PATH." + (let ((sec (magit-find-section path magit-root-section))) + (if sec + (goto-char (magit-section-beginning sec)) + (message "No such section")))) + +(defmacro magit-define-section-jumper (sym title) + "Define an interactive function to go to section SYM. +TITLE is the displayed title of the section." + (let ((fun (intern (format "magit-jump-to-%s" sym)))) + `(progn + (defun ,fun (&optional expand) ,(format "\ +Jump to section '%s'. +With a prefix argument also expand it." title) + (interactive "P") + (if (magit-goto-section-at-path '(,sym)) + (when expand + (with-local-quit + (if (eq magit-expand-staged-on-commit 'full) + (magit-show-level 4 nil) + (magit-expand-section))) + (recenter 0)) + (message ,(format "Section '%s' wasn't found" title)))) + (put ',fun 'definition-name ',sym)))) + +(magit-define-section-jumper stashes "Stashes") +(magit-define-section-jumper untracked "Untracked files") +(magit-define-section-jumper unstaged "Unstaged changes") +(magit-define-section-jumper staged "Staged changes") +(magit-define-section-jumper unpulled "Unpulled commits") +(magit-define-section-jumper unpushed "Unpushed commits") +(magit-define-section-jumper diffstats "Diffstats") + +;;;;; Section Hooks + +(defun magit-add-section-hook (hook function &optional at append local) + "Add to the value of section hook HOOK the function FUNCTION. + +Add FUNCTION at the beginning of the hook list unless optional +APPEND is non-nil, in which case FUNCTION is added at the end. +If FUNCTION already is a member then move it to the new location. + +If optional AT is non-nil and a member of the hook list, then add +FUNCTION next to that instead. Add before or after AT depending +on APPEND. If only FUNCTION is a member of the list, then leave +it where ever it already is. + +If optional LOCAL is non-nil, then modify the hook's buffer-local +value rather than its global value. This makes the hook local by +copying the default value. That copy is then modified. + +HOOK should be a symbol. If HOOK is void, it is first set to nil. +HOOK's value must not be a single hook function. FUNCTION should +be a function that takes no arguments and inserts one or multiple +sections at point, moving point forward. FUNCTION may choose not +to insert its section(s), when doing so would not make sense. It +should not be abused for other side-effects. To remove FUNCTION +again use `remove-hook'." + (or (boundp hook) (set hook nil)) + (or (default-boundp hook) (set-default hook nil)) + (let ((value (if local + (if (local-variable-p hook) + (symbol-value hook) + (unless (local-variable-if-set-p hook) + (make-local-variable hook)) + (copy-sequence (default-value hook))) + (default-value hook)))) + (if at + (when (setq at (member at value)) + (setq value (delq function value)) + (if append + (push function (cdr at)) + (push (car at) (cdr at)) + (setcar at function))) + (setq value (delq function value))) + (unless (member function value) + (setq value (if append + (append value (list function)) + (cons function value)))) + (if local + (set hook value) + (set-default hook value)))) + +;;;;; Section Utilities + +(defun magit-map-sections (function section) + "Apply FUNCTION to SECTION and recursively its subsections." + (funcall function section) + (mapc (apply-partially 'magit-map-sections function) + (magit-section-children section))) + +(defun magit-wash-sequence (function) + "Repeatedly call FUNCTION until it returns nil or eob is reached. +FUNCTION has to move point forward or return nil." + (while (and (not (eobp)) (funcall function)))) + +(defun magit-section-parent-info (section) + (setq section (magit-section-parent section)) + (when section (magit-section-info section))) + +(defun magit-section-siblings (section &optional direction) + (let ((parent (magit-section-parent section))) + (when parent + (let ((siblings (magit-section-children parent))) + (cl-ecase direction + (prev (member section (reverse siblings))) + (next (member section siblings)) + (nil siblings)))))) + +(defun magit-section-region-siblings (&optional key) + (let ((beg (magit-find-section-at (region-beginning))) + (end (magit-find-section-at (region-end)))) + (if (eq beg end) + (list (if key (funcall key beg) beg)) + (goto-char (region-end)) + (when (bolp) + (setq end (magit-find-section-at (1- (point))))) + (while (> (length (magit-section-path beg)) + (length (magit-section-path end))) + (setq beg (magit-section-parent beg))) + (while (> (length (magit-section-path end)) + (length (magit-section-path beg))) + (setq end (magit-section-parent end))) + (let* ((parent (magit-section-parent beg)) + (siblings (magit-section-children parent))) + (if (eq parent (magit-section-parent end)) + (mapcar (or key #'identity) + (cl-intersection (memq beg siblings) + (memq end (reverse siblings)))) + (user-error "Ambitious cross-section region")))))) + +(defun magit-diff-section-for-diffstat (section) + (let ((file (magit-section-info section))) + (cl-find-if (lambda (s) + (and (eq (magit-section-type s) 'diff) + (string-equal (magit-section-info s) file))) + (magit-section-children magit-root-section)))) + +;;;;; Section Visibility + +(defun magit-section-set-hidden (section hidden) + "Hide SECTION if HIDDEN is not nil, show it otherwise." + (setf (magit-section-hidden section) hidden) + (if (and (not hidden) + (magit-section-needs-refresh-on-show section)) + (magit-refresh) + (let ((inhibit-read-only t) + (beg (save-excursion + (goto-char (magit-section-beginning section)) + (forward-line) + (point))) + (end (magit-section-end section))) + (when (< beg end) + (put-text-property beg end 'invisible hidden))) + (unless hidden + (dolist (c (magit-section-children section)) + (magit-section-set-hidden c (magit-section-hidden c)))))) + +(defun magit-section-any-hidden (section) + "Return true if SECTION or any of its children is hidden." + (or (magit-section-hidden section) + (let ((kids (magit-section-children section))) + (while (and kids (not (magit-section-any-hidden (car kids)))) + (setq kids (cdr kids))) + kids))) + +(defun magit-section-collapse (section) + "Show SECTION and hide all its children." + (dolist (c (magit-section-children section)) + (setf (magit-section-hidden c) t)) + (magit-section-set-hidden section nil)) + +(defun magit-section-expand (section) + "Show SECTION and all its children." + (dolist (c (magit-section-children section)) + (setf (magit-section-hidden c) nil)) + (magit-section-set-hidden section nil)) + +(defun magit-section-expand-all-aux (section) + "Show recursively all SECTION's children." + (dolist (c (magit-section-children section)) + (setf (magit-section-hidden c) nil) + (magit-section-expand-all-aux c))) + +(defun magit-section-expand-all (section) + "Show SECTION and all its children." + (magit-section-expand-all-aux section) + (magit-section-set-hidden section nil)) + +(defun magit-section-hideshow (flag-or-func) + "Show or hide current section depending on FLAG-OR-FUNC. + +If FLAG-OR-FUNC is a function, it will be ran on current section. +IF FLAG-OR-FUNC is a boolean, the section will be hidden if it is +true, shown otherwise." + (let ((section (magit-current-section))) + (when (magit-section-parent section) + (goto-char (magit-section-beginning section)) + (if (functionp flag-or-func) + (funcall flag-or-func section) + (magit-section-set-hidden section flag-or-func))))) + +(defun magit-show-section () + "Show current section." + (interactive) + (magit-section-hideshow nil)) + +(defun magit-hide-section () + "Hide current section." + (interactive) + (magit-section-hideshow t)) + +(defun magit-collapse-section () + "Hide all subsection of current section." + (interactive) + (magit-section-hideshow #'magit-section-collapse)) + +(defun magit-expand-section () + "Show all subsection of current section." + (interactive) + (magit-section-hideshow #'magit-section-expand)) + +(defun magit-toggle-file-section () + "Like `magit-toggle-section' but toggle at file granularity." + (interactive) + (when (eq (magit-section-type (magit-current-section)) 'hunk) + (magit-goto-parent-section)) + (magit-toggle-section)) + +(defun magit-toggle-section () + "Toggle hidden status of current section." + (interactive) + (magit-section-hideshow + (lambda (s) + (magit-section-set-hidden s (not (magit-section-hidden s)))))) + +(defun magit-expand-collapse-section () + "Toggle hidden status of subsections of current section." + (interactive) + (magit-section-hideshow + (lambda (s) + (cond ((magit-section-any-hidden s) + (magit-section-expand-all s)) + (t + (magit-section-collapse s)))))) + +(defun magit-cycle-section () + "Cycle between expanded, hidden and collapsed state for current section. + +Hidden: only the first line of the section is shown +Collapsed: only the first line of the subsection is shown +Expanded: everything is shown." + (interactive) + (magit-section-hideshow + (lambda (s) + (cond ((magit-section-hidden s) + (magit-section-collapse s)) + ((with-no-warnings + (cl-notany #'magit-section-hidden (magit-section-children s))) + (magit-section-set-hidden s t)) + (t + (magit-section-expand s)))))) + +(defun magit-section-lineage (section) + "Return list of parent, grand-parents... for SECTION." + (when section + (cons section (magit-section-lineage (magit-section-parent section))))) + +(defun magit-section-show-level (section level threshold path) + (magit-section-set-hidden section (>= level threshold)) + (when (and (< level threshold) + (not (magit-no-commit-p))) + (if path + (magit-section-show-level (car path) (1+ level) threshold (cdr path)) + (dolist (c (magit-section-children section)) + (magit-section-show-level c (1+ level) threshold nil))))) + +(defun magit-show-level (level all) + "Show section whose level is less than LEVEL, hide the others. +If ALL is non nil, do this in all sections, otherwise do it only +on ancestors and descendants of current section." + (if all + (magit-section-show-level magit-root-section 0 level nil) + (let ((path (reverse (magit-section-lineage (magit-current-section))))) + (magit-section-show-level (car path) 0 level (cdr path))))) + +(defun magit-show-only-files () + "Show section that are files, but not their subsection. + +Do this in on ancestors and descendants of current section." + (interactive) + (if (derived-mode-p 'magit-status-mode) + (call-interactively 'magit-show-level-2) + (call-interactively 'magit-show-level-1))) + +(defun magit-show-only-files-all () + "Show section that are files, but not their subsection. +Do this for all sections" + (interactive) + (if (derived-mode-p 'magit-status-mode) + (call-interactively 'magit-show-level-2-all) + (call-interactively 'magit-show-level-1-all))) + +(defmacro magit-define-level-shower-1 (level all) + "Define an interactive function to show function of level LEVEL. + +If ALL is non nil, this function will affect all section, +otherwise it will affect only ancestors and descendants of +current section." + (let ((fun (intern (format "magit-show-level-%s%s" + level (if all "-all" "")))) + (doc (format "Show sections on level %s." level))) + `(defun ,fun () + ,doc + (interactive) + (magit-show-level ,level ,all)))) + +(defmacro magit-define-level-shower (level) + "Define two interactive function to show function of level LEVEL. +One for all, one for current lineage." + `(progn + (magit-define-level-shower-1 ,level nil) + (magit-define-level-shower-1 ,level t))) + +(magit-define-level-shower 1) +(magit-define-level-shower 2) +(magit-define-level-shower 3) +(magit-define-level-shower 4) + +;;;;; Section Highlighting + +(defvar-local magit-highlighted-section nil) +(defvar-local magit-highlight-overlay nil) + +(defun magit-highlight-section () + "Highlight current section. +If its HIGHLIGHT slot is nil, then don't highlight it." + (let ((section (magit-current-section)) + (refinep (lambda () + (and magit-highlighted-section + (eq magit-diff-refine-hunk t) + (eq (magit-section-type magit-highlighted-section) + 'hunk))))) + (unless (eq section magit-highlighted-section) + (when (funcall refinep) + (magit-diff-unrefine-hunk magit-highlighted-section)) + (setq magit-highlighted-section section) + (unless magit-highlight-overlay + (overlay-put (setq magit-highlight-overlay (make-overlay 1 1)) + 'face magit-item-highlight-face)) + (cond ((and section (magit-section-highlight section)) + (when (funcall refinep) + (magit-diff-refine-hunk section)) + (move-overlay magit-highlight-overlay + (magit-section-beginning section) + (magit-section-end section) + (current-buffer))) + (t + (delete-overlay magit-highlight-overlay)))))) + +;;;;; Section Actions + +(defun magit-section-context-type (section) + (cons (magit-section-type section) + (let ((parent (magit-section-parent section))) + (when parent + (magit-section-context-type parent))))) + +(defun magit-section-match-1 (l1 l2) + (or (null l1) + (if (eq (car l1) '*) + (or (magit-section-match-1 (cdr l1) l2) + (and l2 + (magit-section-match-1 l1 (cdr l2)))) + (and l2 + (equal (car l1) (car l2)) + (magit-section-match-1 (cdr l1) (cdr l2)))))) + +(defun magit-section-match (condition &optional section) + (unless section + (setq section (magit-current-section))) + (cond ((eq condition t) t) + ((not section) nil) + ((listp condition) + (cl-find t condition :test + (lambda (_ condition) + (magit-section-match condition section)))) + (t + (magit-section-match-1 (if (symbolp condition) + (list condition) + (append condition nil)) + (magit-section-context-type section))))) + +(defmacro magit-section-case (slots &rest clauses) + (declare (indent 1)) + `(let* ((it (magit-current-section)) + ,@(mapcar + (lambda (slot) + `(,slot + (and it (,(intern (format "magit-section-%s" slot)) it)))) + slots)) + (cond ,@(mapcar (lambda (clause) + `((magit-section-match ',(car clause) it) + ,@(cdr clause))) + clauses)))) + +(defconst magit-section-action-success + (make-symbol "magit-section-action-success")) + +(defmacro magit-section-action (opname slots &rest clauses) + (declare (indent 2) (debug (sexp &rest (sexp body)))) + (let ((value (cl-gensym "value"))) + `(let ((,value + (or (run-hook-wrapped + ',(intern (format "magit-%s-hook" opname)) + (lambda (fn section) + (when (magit-section-match + (or (get fn 'magit-section-action-context) + (error "%s undefined for %s" + 'magit-section-action-context fn)) + section) + (funcall fn (magit-section-info section)))) + (magit-current-section)) + (magit-section-case ,slots + ,@clauses + (t (user-error + (if (magit-current-section) + ,(format "Cannot %s this section" opname) + ,(format "Nothing to %s here" opname)))))))) + (unless (eq ,value magit-section-action-success) + ,value)))) + +;;;; Process Api +;;;;; Process Commands + +(defun magit-process () + "Display Magit process buffer." + (interactive) + (let ((buf (magit-process-buffer))) + (if (buffer-live-p buf) + (pop-to-buffer buf) + (user-error "Process buffer doesn't exist")))) + +(defun magit-process-kill () + "Kill the process at point." + (interactive) + (magit-section-case (info) + (process (if (eq (process-status info) 'run) + (when (yes-or-no-p "Kill this process? ") + (kill-process info)) + (user-error "Process isn't running"))))) + +(defvar magit-git-command-history nil) + +;;;###autoload +(defun magit-git-command (args directory) + "Execute a Git subcommand asynchronously, displaying the output. +With a prefix argument run Git in the root of the current +repository. Non-interactively run Git in DIRECTORY with ARGS." + (interactive (magit-git-command-read-args)) + (require 'eshell) + (magit-mode-display-buffer (magit-process-buffer nil t) + 'magit-process-mode 'pop-to-buffer) + (goto-char (point-max)) + (let ((default-directory directory)) + (magit-run-git-async + (with-temp-buffer + (insert args) + (mapcar 'eval (eshell-parse-arguments (point-min) + (point-max))))))) + +(defun magit-git-command-topdir (args directory) + "Execute a Git subcommand asynchronously, displaying the output. +Run Git in the root of the current repository. +\n(fn)" ; arguments are for internal use + (interactive (magit-git-command-read-args t)) + (magit-git-command args directory)) + +(defun magit-git-command-read-args (&optional root) + (let ((dir (if (or root current-prefix-arg) + (or (magit-get-top-dir) + (user-error "Not inside a Git repository")) + default-directory))) + (list (read-string (format "Git subcommand (in %s): " + (abbreviate-file-name dir)) + nil 'magit-git-command-history) + dir))) + +;;;;; Process Mode + +(define-derived-mode magit-process-mode magit-mode "Magit Process" + "Mode for looking at git process output.") + +(defvar magit-process-buffer-name "*magit-process*" + "Name of buffer where output of processes is put.") + +(defun magit-process-buffer (&optional topdir create) + (or (magit-mode-get-buffer magit-process-buffer-name + 'magit-process-mode topdir) + (with-current-buffer (magit-mode-get-buffer-create + magit-process-buffer-name + 'magit-process-mode topdir) + (magit-process-mode) + (let* ((inhibit-read-only t) + (s (magit-with-section (section processbuf nil nil t) + (insert "\n")))) + (set-marker-insertion-type (magit-section-beginning s) nil) + (set-marker-insertion-type (magit-section-content-beginning s) nil) + (current-buffer))))) + +;;;;; Synchronous Processes + +(defun magit-git-exit-code (&rest args) + "Execute Git with ARGS, returning its exit code." + (apply #'process-file magit-git-executable nil nil nil + (append magit-git-standard-options + (magit-flatten-onelevel args)))) + +(defun magit-git-success (&rest args) + "Execute Git with ARGS, returning t if its exit code is 0." + (= (apply #'magit-git-exit-code args) 0)) + +(defun magit-git-failure (&rest args) + "Execute Git with ARGS, returning t if its exit code is 1." + (= (apply #'magit-git-exit-code args) 1)) + +(defun magit-git-string (&rest args) + "Execute Git with ARGS, returning the first line of its output. +If there is no output return nil. If the output begins with a +newline return an empty string." + (with-temp-buffer + (apply #'process-file magit-git-executable nil (list t nil) nil + (append magit-git-standard-options + (magit-flatten-onelevel args))) + (unless (= (point-min) (point-max)) + (goto-char (point-min)) + (buffer-substring-no-properties + (line-beginning-position) + (line-end-position))))) + +(defun magit-git-true (&rest args) + "Execute Git with ARGS, returning t if it prints \"true\". +Return t if the first (and usually only) output line is the +string \"true\", otherwise return nil." + (equal (apply #'magit-git-string args) "true")) + +(defun magit-git-false (&rest args) + "Execute Git with ARGS, returning t if it prints \"false\". +Return t if the first (and usually only) output line is the +string \"false\", otherwise return nil." + (equal (apply #'magit-git-string args) "false")) + +(defun magit-git-insert (&rest args) + "Execute Git with ARGS, inserting its output at point." + (apply #'process-file magit-git-executable nil (list t nil) nil + (append magit-git-standard-options + (magit-flatten-onelevel args)))) + +(defun magit-git-lines (&rest args) + "Execute Git with ARGS, returning its output as a list of lines. +Empty lines anywhere in the output are omitted." + (with-temp-buffer + (apply #'process-file magit-git-executable nil (list t nil) nil + (append magit-git-standard-options + (magit-flatten-onelevel args))) + (split-string (buffer-string) "\n" 'omit-nulls))) + +(defun magit-run-git (&rest args) + "Call Git synchronously in a separate process, and refresh. + +The arguments ARGS specify command line arguments. The first +level of ARGS is flattened, so each member of ARGS has to be a +string or a list of strings. + +Option `magit-git-executable' specifies which Git executable is +used. The arguments in option `magit-git-standard-options' are +prepended to ARGS. + +After Git returns, the current buffer (if it is a Magit buffer) +as well as the current repository's status buffer are refreshed. +Unmodified buffers visiting files that are tracked in the current +repository are reverted if `magit-auto-revert-mode' is active. + +Process output goes into a new section in a buffer specified by +variable `magit-process-buffer-name'." + (apply #'magit-call-git (magit-process-quote-arguments args)) + (magit-refresh)) + +(defun magit-call-git (&rest args) + "Call Git synchronously in a separate process. + +The arguments ARGS specify command line arguments. The first +level of ARGS is flattened, so each member of ARGS has to be a +string or a list of strings. + +Option `magit-git-executable' specifies which Git executable is +used. The arguments in option `magit-git-standard-options' are +prepended to ARGS. + +Process output goes into a new section in a buffer specified by +variable `magit-process-buffer-name'." + (apply #'magit-call-process magit-git-executable + (append magit-git-standard-options args))) + +(defun magit-call-process (program &rest args) + "Call PROGRAM synchronously in a separate process. + +The arguments ARGS specify command line arguments. The first +level of ARGS is flattened, so each member of ARGS has to be a +string or a list of strings. + +Process output goes into a new section in a buffer specified by +variable `magit-process-buffer-name'." + (setq args (magit-flatten-onelevel args)) + (cl-destructuring-bind (process-buf . section) + (magit-process-setup program args) + (magit-process-finish + (let ((inhibit-read-only t)) + (apply #'process-file program nil process-buf nil args)) + process-buf (current-buffer) default-directory section))) + +(defun magit-run-git-with-input (input &rest args) + "Call Git in a separate process. + +The first argument, INPUT, has to be a buffer or the name of an +existing buffer. The content of that buffer is used as the +process' standard input. + +The remaining arguments, ARGS, specify command line arguments. +The first level of ARGS is flattened, so each member of ARGS has +to be a string or a list of strings. + +Option `magit-git-executable' specifies which Git executable is +used. The arguments in option `magit-git-standard-options' are +prepended to ARGS. + +After Git returns, the current buffer (if it is a Magit buffer) +as well as the current repository's status buffer are refreshed. +Unmodified buffers visiting files that are tracked in the current +repository are reverted if `magit-auto-revert-mode' is active. + +This function actually starts a asynchronous process, but it then +waits for that process to return." + (apply #'magit-start-git input args) + (magit-process-wait) + (magit-refresh)) + +(defun magit-run-git-with-logfile (file &rest args) + "Call Git in a separate process and log its output. +And log the output to FILE. This function might have a +short halflive. See `magit-run-git' for more information." + (apply #'magit-start-git nil args) + (process-put magit-this-process 'logfile file) + (set-process-filter magit-this-process 'magit-process-logfile-filter) + (magit-process-wait) + (magit-refresh)) + +;;;;; Asynchronous Processes + +(defvar magit-this-process nil) + +(defun magit-run-git-async (&rest args) + "Start Git, prepare for refresh, and return the process object. + +If optional argument INPUT is non-nil, it has to be a buffer or +the name of an existing buffer. The content of that buffer is +used as the process' standard input. + +The remaining arguments, ARGS, specify command line arguments. +The first level of ARGS is flattened, so each member of ARGS has +to be a string or a list of strings. + +Display the command line arguments in the echo area. + +After Git returns some buffers are refreshed: the buffer that was +current when `magit-start-process' was called (if it is a Magit +buffer and still alive), as well as the respective Magit status +buffer. Unmodified buffers visiting files that are tracked in +the current repository are reverted if `magit-auto-revert-mode' +is active. + +See `magit-start-process' for more information." + (message "Running %s %s" magit-git-executable + (mapconcat 'identity (magit-flatten-onelevel args) " ")) + (apply #'magit-start-git nil args)) + +(defun magit-start-git (&optional input &rest args) + "Start Git, prepare for refresh, and return the process object. + +If optional argument INPUT is non-nil, it has to be a buffer or +the name of an existing buffer. The buffer content becomes the +processes standard input. + +The remaining arguments, ARGS, specify command line arguments. +The first level of ARGS is flattened, so each member of ARGS has +to be a string or a list of strings. + +After Git returns some buffers are refreshed: the buffer that was +current when `magit-start-process' was called (if it is a Magit +buffer and still alive), as well as the respective Magit status +buffer. Unmodified buffers visiting files that are tracked in +the current repository are reverted if `magit-auto-revert-mode' +is active. + +See `magit-start-process' for more information." + (apply #'magit-start-process magit-git-executable input + (append magit-git-standard-options + (magit-process-quote-arguments args)))) + +(defun magit-start-process (program &optional input &rest args) + "Start PROGRAM, prepare for refresh, and return the process object. + +If optional argument INPUT is non-nil, it has to be a buffer or +the name of an existing buffer. The buffer content becomes the +processes standard input. + +The remaining arguments, ARGS, specify command line arguments. +The first level of ARGS is flattened, so each member of ARGS has +to be a string or a list of strings. + +The process is started using `start-file-process' and then setup +to use the sentinel `magit-process-sentinel' and the filter +`magit-process-filter'. Information required by these functions +is stored in the process object. When this function returns the +process has not started to run yet so it is possible to override +the sentinel and filter. + +After the process returns, `magit-process-sentinel' refreshes the +buffer that was current when `magit-start-process' was called (if +it is a Magit buffer and still alive), as well as the respective +Magit status buffer. Unmodified buffers visiting files that are +tracked in the current repository are reverted if +`magit-auto-revert-mode' is active." + (setq args (magit-flatten-onelevel args)) + (cl-destructuring-bind (process-buf . section) + (magit-process-setup program args) + (let* ((process-connection-type + ;; Don't use a pty, because it would set icrnl + ;; which would modify the input (issue #20). + (and (not input) magit-process-connection-type)) + (process (apply 'start-file-process + (file-name-nondirectory program) + process-buf program args))) + (set-process-sentinel process #'magit-process-sentinel) + (set-process-filter process #'magit-process-filter) + (set-process-buffer process process-buf) + (process-put process 'section section) + (process-put process 'command-buf (current-buffer)) + (process-put process 'default-dir default-directory) + (setf (magit-section-process section) process) + (with-current-buffer process-buf + (set-marker (process-mark process) (point))) + (when input + (with-current-buffer input + (process-send-region process (point-min) (point-max)) + (process-send-eof process))) + (setq magit-this-process process) + (setf (magit-section-info section) process) + (magit-process-display-buffer process) + process))) + +;;;;; Process Internals + +(defun magit-process-setup (program args) + (magit-process-set-mode-line program args) + (let ((buf (magit-process-buffer))) + (if buf + (magit-process-truncate-log buf) + (setq buf (magit-process-buffer nil t))) + (with-current-buffer buf + (goto-char (1- (point-max))) + (let* ((inhibit-read-only t) + (magit-with-section--parent magit-root-section) + ;; Kids, don't do this ^^^^ at home. + (s (magit-with-section + (section process nil + (mapconcat 'identity (cons program args) " ")) + (insert "\n")))) + (set-marker-insertion-type (magit-section-content-beginning s) nil) + (insert "\n") + (backward-char 2) + (cons (current-buffer) s))))) + +(defun magit-process-truncate-log (buffer) + (with-current-buffer buffer + (let* ((head nil) + (tail (magit-section-children magit-root-section)) + (count (length tail))) + (when (> (1+ count) magit-process-log-max) + (while (and (cdr tail) + (> count (/ magit-process-log-max 2))) + (let* ((inhibit-read-only t) + (section (car tail)) + (process (magit-section-process section))) + (cond ((not process)) + ((memq (process-status process) '(exit signal)) + (delete-region (magit-section-beginning section) + (1+ (magit-section-end section))) + (cl-decf count)) + (t + (push section head)))) + (pop tail)) + (setf (magit-section-children magit-root-section) + (nconc (reverse head) tail)))))) + +(defun magit-process-sentinel (process event) + "Default sentinel used by `magit-start-process'." + (when (memq (process-status process) '(exit signal)) + (setq event (substring event 0 -1)) + (magit-process-unset-mode-line) + (when (string-match "^finished" event) + (message (concat (capitalize (process-name process)) " finished"))) + (magit-process-finish process) + (when (eq process magit-this-process) + (setq magit-this-process nil)) + (magit-refresh (and (buffer-live-p (process-get process 'command-buf)) + (process-get process 'command-buf))))) + +(defun magit-process-filter (proc string) + "Default filter used by `magit-start-process'." + (with-current-buffer (process-buffer proc) + (let ((inhibit-read-only t)) + (magit-process-yes-or-no-prompt proc string) + (magit-process-username-prompt proc string) + (magit-process-password-prompt proc string) + (goto-char (process-mark proc)) + (setq string (propertize string 'invisible + (magit-section-hidden + (process-get proc 'section)))) + ;; Find last ^M in string. If one was found, ignore everything + ;; before it and delete the current line. + (let ((ret-pos (length string))) + (while (and (>= (setq ret-pos (1- ret-pos)) 0) + (/= ?\r (aref string ret-pos)))) + (cond ((>= ret-pos 0) + (goto-char (line-beginning-position)) + (delete-region (point) (line-end-position)) + (insert-and-inherit (substring string (+ ret-pos 1)))) + (t + (insert-and-inherit string)))) + (set-marker (process-mark proc) (point))))) + +(defun magit-process-logfile-filter (process string) + "Special filter used by `magit-run-git-with-logfile'." + (magit-process-filter process string) + (let ((file (process-get process 'logfile))) + (with-temp-file file + (when (file-exists-p file) + (insert-file-contents file) + (goto-char (point-max))) + (insert string) + (write-region (point-min) (point-max) file)))) + +(defun magit-process-yes-or-no-prompt (proc string) + "Forward yes-or-no prompts to the user." + (let ((beg (string-match magit-process-yes-or-no-prompt-regexp string)) + (max-mini-window-height 30)) + (when beg + (process-send-string + proc + (downcase + (concat (match-string (if (yes-or-no-p (substring string 0 beg)) 1 2) + string) + "\n")))))) + +(defun magit-process-password-prompt (proc string) + "Forward password prompts to the user." + (let ((prompt (magit-process-match-prompt + magit-process-password-prompt-regexps string))) + (when prompt + (process-send-string proc (concat (read-passwd prompt) "\n"))))) + +(defun magit-process-username-prompt (proc string) + "Forward username prompts to the user." + (let ((prompt (magit-process-match-prompt + magit-process-username-prompt-regexps string))) + (when prompt + (process-send-string proc + (concat (read-string prompt nil nil + (user-login-name)) + "\n"))))) + +(defun magit-process-match-prompt (prompts string) + (when (cl-find-if (lambda (regex) + (string-match regex string)) + prompts) + (let ((prompt (match-string 0 string))) + (cond ((string-match ": $" prompt) prompt) + ((string-match ":$" prompt) (concat prompt " ")) + (t (concat prompt ": ")))))) + +(defun magit-process-wait () + (while (and magit-this-process + (eq (process-status magit-this-process) 'run)) + (sit-for 0.1 t))) + +(defun magit-process-set-mode-line (program args) + (when (equal program magit-git-executable) + (setq args (nthcdr (1+ (length magit-git-standard-options)) args))) + (magit-map-magit-buffers + (apply-partially (lambda (s) + (setq mode-line-process s)) + (concat " " program + (and args (concat " " (car args))))))) + +(defun magit-process-unset-mode-line () + (magit-map-magit-buffers (lambda () (setq mode-line-process nil)))) + +(defvar magit-process-error-message-re + (concat "^\\(?:error\\|fatal\\|git\\): \\(.*\\)" paragraph-separate)) + +(defun magit-process-finish (arg &optional process-buf command-buf + default-dir section) + (unless (integerp arg) + (setq process-buf (process-buffer arg) + command-buf (process-get arg 'command-buf) + default-dir (process-get arg 'default-dir) + section (process-get arg 'section) + arg (process-exit-status arg))) + (when (featurep 'dired) + (dired-uncache default-dir)) + (when (buffer-live-p process-buf) + (with-current-buffer process-buf + (let ((inhibit-read-only t) + (mark (magit-section-beginning section))) + (set-marker-insertion-type mark nil) + (goto-char mark) + (insert (propertize (format "%3s " arg) + 'magit-section section + 'face (if (= arg 0) + 'magit-process-ok + 'magit-process-ng)))))) + (unless (= arg 0) + (message ; `error' would prevent refresh + "%s ... [%s buffer %s for details]" + (or (and (buffer-live-p process-buf) + (with-current-buffer process-buf + (save-excursion + (goto-char (magit-section-end section)) + (when (re-search-backward + magit-process-error-message-re nil + (magit-section-content-beginning section)) + (match-string 1))))) + "Git failed") + (let ((key (and (buffer-live-p command-buf) + (with-current-buffer command-buf + (car (where-is-internal + 'magit-process-display-buffer)))))) + (if key (format "Hit %s to see" (key-description key)) "See")) + (buffer-name process-buf))) + arg) + +(defun magit-process-display-buffer (process) + (when (process-live-p process) + (let ((buf (process-buffer process))) + (cond ((not (buffer-live-p buf))) + ((= magit-process-popup-time 0) + (pop-to-buffer buf)) + ((> magit-process-popup-time 0) + (run-with-timer magit-process-popup-time nil + (lambda (p) + (when (eq (process-status p) 'run) + (let ((buf (process-buffer p))) + (when (buffer-live-p buf) + (pop-to-buffer buf))))) + process)))))) + +(defun magit-process-quote-arguments (args) + "Quote each argument in list ARGS as an argument to Git. +Except when `magit-process-quote-curly-braces' is non-nil ARGS is +returned unchanged. This is required to works around strangeness +of the Windows \"Powershell\"." + (if magit-process-quote-curly-braces + (mapcar (apply-partially 'replace-regexp-in-string + "{\\([0-9]+\\)}" "\\\\{\\1\\\\}") + (magit-flatten-onelevel args)) + args)) + +;;;; Mode Api +;;;;; Mode Foundation + +(define-derived-mode magit-mode special-mode "Magit" + "Parent major mode from which Magit major modes inherit. + +Please see the manual for a complete description of Magit. + +\\{magit-mode-map}" + (buffer-disable-undo) + (setq truncate-lines t) + (add-hook 'pre-command-hook #'magit-remember-point nil t) + (add-hook 'post-command-hook #'magit-correct-point-after-command t t) + (add-hook 'post-command-hook #'magit-highlight-section t t) + ;; Emacs' normal method of showing trailing whitespace gives weird + ;; results when `magit-whitespace-warning-face' is different from + ;; `trailing-whitespace'. + (when (and magit-highlight-whitespace + magit-highlight-trailing-whitespace) + (setq show-trailing-whitespace nil))) + +(defvar-local magit-refresh-function nil) +(put 'magit-refresh-function 'permanent-local t) + +(defvar-local magit-refresh-args nil) +(put 'magit-refresh-args 'permanent-local t) + +(defmacro magit-mode-setup + (buffer switch-func mode refresh-func &rest refresh-args) + "Display and select BUFFER, turn on MODE, and refresh a first time. +Display BUFFER using `magit-mode-display-buffer', then turn on +MODE in BUFFER, set the local value of `magit-refresh-function' +to REFRESH-FUNC and that of `magit-refresh-args' to REFRESH-ARGS +and finally \"refresh\" a first time. All arguments are +evaluated before switching to BUFFER." + (let ((mode-symb (cl-gensym "mode-symb")) + (toplevel (cl-gensym "toplevel")) + (init-args (cl-gensym "init-args")) + (buf-symb (cl-gensym "buf-symb"))) + `(let* ((,mode-symb ,mode) + (,toplevel (magit-get-top-dir)) + (,init-args (list ,mode-symb ,refresh-func ,@refresh-args)) + (,buf-symb (magit-mode-display-buffer + ,buffer ,mode-symb ,switch-func))) + (if ,toplevel + (with-current-buffer ,buf-symb + (apply #'magit-mode-init ,toplevel ,init-args)) + (user-error "Not inside a Git repository"))))) + +(defun magit-mode-init (dir mode refresh-func &rest refresh-args) + "Turn on MODE and refresh in the current buffer. +Turn on MODE, set the local value of `magit-refresh-function' to +REFRESH-FUNC and that of `magit-refresh-args' to REFRESH-ARGS and +finally \"refresh\" a first time. + +Also see `magit-mode-setup', a more convenient variant." + (cl-case mode + (magit-commit-mode + (magit-setup-xref (cons #'magit-show-commit refresh-args)) + (goto-char (point-min))) + (magit-diff-mode + (magit-setup-xref (cons #'magit-diff refresh-args)) + (goto-char (point-min)))) + (setq default-directory dir + magit-refresh-function refresh-func + magit-refresh-args refresh-args) + (funcall mode) + (magit-mode-refresh-buffer)) + +(defvar-local magit-previous-window-configuration nil) +(put 'magit-previous-window-configuration 'permanent-local t) + +(defun magit-mode-display-buffer (buffer mode &optional switch-function) + "Display BUFFER in some window and select it. +BUFFER may be a buffer or a string, the name of a buffer. Return +the buffer. + +Unless BUFFER is already displayed in the selected frame store the +previous window configuration as a buffer local value, so that it +can later be restored by `magit-mode-quit-window'. + +Then display and select BUFFER using SWITCH-FUNCTION. If that is +nil either use `pop-to-buffer' if the current buffer's major mode +derives from Magit mode; or else use `switch-to-buffer'. + +This is only intended for buffers whose major modes derive from +Magit mode." + (cond ((stringp buffer) + (setq buffer (magit-mode-get-buffer-create buffer mode))) + ((not (bufferp buffer)) + (signal 'wrong-type-argument (list 'bufferp nil)))) + (unless (get-buffer-window buffer (selected-frame)) + (with-current-buffer (get-buffer-create buffer) + (setq magit-previous-window-configuration + (current-window-configuration)))) + (funcall (or switch-function + (if (derived-mode-p 'magit-mode) + 'switch-to-buffer + 'pop-to-buffer)) + buffer) + buffer) + +(defun magit-mode-get-buffer (format mode &optional topdir create) + (if (not (string-match-p "%[Tt]" format)) + (funcall (if create #'get-buffer-create #'get-buffer) format) + (unless topdir + (setq topdir (magit-get-top-dir))) + (let ((name (format-spec + format `((?T . ,topdir) + (?t . ,(file-name-nondirectory + (directory-file-name topdir))))))) + (or (cl-find-if + (lambda (buf) + (with-current-buffer buf + (and (or (not mode) (eq major-mode mode)) + (equal (expand-file-name default-directory) topdir) + (string-match-p (format "^%s\\(?:<[0-9]+>\\)?$" + (regexp-quote name)) + (buffer-name))))) + (buffer-list)) + (and create (generate-new-buffer name)))))) + +(defun magit-mode-get-buffer-create (format mode &optional topdir) + (magit-mode-get-buffer format mode topdir t)) + +(cl-defun magit-mode-refresh-buffer (&optional (buffer (current-buffer))) + (with-current-buffer buffer + (when magit-refresh-function + (let* ((old-line (line-number-at-pos)) + (old-point (point)) + (old-section (magit-current-section)) + (old-path (and old-section + (magit-section-path (magit-current-section))))) + (beginning-of-line) + (let ((inhibit-read-only t) + (section-line (and old-section + (count-lines + (magit-section-beginning old-section) + (point)))) + (line-char (- old-point (point)))) + (erase-buffer) + (apply magit-refresh-function + magit-refresh-args) + (let ((s (and old-path (magit-find-section old-path magit-root-section)))) + (cond (s + (goto-char (magit-section-beginning s)) + (forward-line section-line) + (forward-char line-char)) + (t + (save-restriction + (widen) + (goto-char (point-min)) + (forward-line (1- old-line))))))) + (magit-highlight-section) + (magit-refresh-marked-commits-in-buffer))))) + +(defun magit-mode-quit-window (&optional kill-buffer) + "Bury the current buffer and delete its window. +With a prefix argument, kill the buffer instead. + +If `magit-restore-window-configuration' is non-nil and the last +configuration stored by `magit-mode-display-buffer' originates +from the selected frame then restore it after burrying/killing +the buffer. Finally reset the window configuration to nil." + (interactive "P") + (let ((winconf magit-previous-window-configuration) + (buffer (current-buffer)) + (frame (selected-frame))) + (quit-window kill-buffer (selected-window)) + (when winconf + (when (and magit-restore-window-configuration + (equal frame (window-configuration-frame winconf))) + (set-window-configuration winconf) + (when (buffer-live-p buffer) + (with-current-buffer buffer + (setq magit-previous-window-configuration nil))))) + (run-hook-with-args 'magit-mode-quit-window-hook buffer))) + +;;;;; Mode Utilities + +(defun magit-map-magit-buffers (func &optional dir) + (dolist (buf (buffer-list)) + (with-current-buffer buf + (when (and (derived-mode-p 'magit-mode) + (or (null dir) + (equal default-directory dir))) + (funcall func))))) + +;;;;; (section kludges) + +(defvar-local magit-last-point nil) +(put 'magit-last-point 'permanent-local t) + +(defun magit-remember-point () + (setq magit-last-point (point))) + +(defun magit-invisible-region-end (pos) + (while (and (not (= pos (point-max))) (invisible-p pos)) + (setq pos (next-char-property-change pos))) + pos) + +(defun magit-invisible-region-start (pos) + (while (and (not (= pos (point-min))) (invisible-p pos)) + (setq pos (1- (previous-char-property-change pos)))) + pos) + +(defun magit-correct-point-after-command () + "Move point outside of invisible regions. + +Emacs often leaves point in invisible regions, it seems. To fix +this, we move point ourselves and never let Emacs do its own +adjustments. + +When point has to be moved out of an invisible region, it can be +moved to its end or its beginning. We usually move it to its +end, except when that would move point back to where it was +before the last command." + (when (invisible-p (point)) + (let ((end (magit-invisible-region-end (point)))) + (goto-char (if (= end magit-last-point) + (magit-invisible-region-start (point)) + end)))) + (setq disable-point-adjustment t)) + +;;;;; Buffer History + +(defun magit-go-backward () + "Move backward in current buffer's history." + (interactive) + (if help-xref-stack + (help-xref-go-back (current-buffer)) + (user-error "No previous entry in buffer's history"))) + +(defun magit-go-forward () + "Move forward in current buffer's history." + (interactive) + (if help-xref-forward-stack + (help-xref-go-forward (current-buffer)) + (user-error "No next entry in buffer's history"))) + +(defun magit-xref-insert-buttons () + (when (and (or (eq magit-show-xref-buttons t) + (apply 'derived-mode-p magit-show-xref-buttons)) + (or help-xref-stack help-xref-forward-stack)) + (insert "\n") + (when help-xref-stack + (magit-xref-insert-button help-back-label + 'magit-xref-backward)) + (when help-xref-forward-stack + (when help-xref-stack + (insert " ")) + (magit-xref-insert-button help-forward-label + 'magit-xref-forward)))) + +(defun magit-xref-insert-button (label type) + (magit-with-section (section button label) + (insert-text-button label 'type type + 'help-args (list (current-buffer))))) + +(define-button-type 'magit-xref-backward + :supertype 'help-back + 'mouse-face magit-item-highlight-face + 'help-echo (purecopy "mouse-2, RET: go back to previous history entry")) + +(define-button-type 'magit-xref-forward + :supertype 'help-forward + 'mouse-face magit-item-highlight-face + 'help-echo (purecopy "mouse-2, RET: go back to next history entry")) + +(defun magit-setup-xref (item) + (when help-xref-stack-item + (push (cons (point) help-xref-stack-item) help-xref-stack) + (setq help-xref-forward-stack nil)) + (when (called-interactively-p 'interactive) + (let ((tail (nthcdr 10 help-xref-stack))) + (if tail (setcdr tail nil)))) + (setq help-xref-stack-item item)) + +;;;;; Refresh Machinery + +(defun magit-refresh (&optional buffer) + "Refresh some buffers belonging to the current repository. + +Refresh the current buffer if its major mode derives from +`magit-mode', and refresh the corresponding status buffer. +If the global `magit-auto-revert-mode' is turned on, then +also revert all unmodified buffers that visit files being +tracked in the current repository." + (interactive (list (current-buffer))) + (unless buffer + (setq buffer (current-buffer))) + (with-current-buffer buffer + (when (derived-mode-p 'magit-mode) + (magit-mode-refresh-buffer buffer)) + (let (status) + (when (and (not (eq major-mode 'magit-status-mode)) + (setq status (magit-mode-get-buffer + magit-status-buffer-name + 'magit-status-mode))) + (magit-mode-refresh-buffer status)))) + (when magit-auto-revert-mode + (magit-revert-buffers))) + +(defun magit-refresh-all () + "Refresh all buffers belonging to the current repository. + +Refresh all Magit buffers belonging to the current repository. +If the global `magit-auto-revert-mode' is turned on, then also +revert all unmodified buffers that visit files being tracked in +the current repository." + (interactive) + (magit-map-magit-buffers #'magit-mode-refresh-buffer default-directory) + (magit-revert-buffers)) + +(defun magit-revert-buffers () + (let ((topdir (magit-get-top-dir))) + (when topdir + (let ((gitdir (magit-git-dir)) + (tracked (magit-git-lines "ls-tree" "-r" "--name-only" "HEAD"))) + (dolist (buf (buffer-list)) + (with-current-buffer buf + (let ((file (buffer-file-name))) + (and file (string-prefix-p topdir file) + (not (string-prefix-p gitdir file)) + (member (file-relative-name file topdir) tracked) + (let ((auto-revert-mode t)) + (auto-revert-handler) + (run-hooks 'magit-revert-buffer-hook)))))))))) + +;;; (misplaced) +;;;; Diff Options + +(defvar magit-diff-context-lines 3) + +(defun magit-diff-U-arg () + (format "-U%d" magit-diff-context-lines)) + +(defun magit-diff-smaller-hunks (&optional count) + "Decrease the context for diff hunks by COUNT." + (interactive "p") + (setq magit-diff-context-lines (max 0 (- magit-diff-context-lines count))) + (magit-refresh)) + +(defun magit-diff-larger-hunks (&optional count) + "Increase the context for diff hunks by COUNT." + (interactive "p") + (setq magit-diff-context-lines (+ magit-diff-context-lines count)) + (magit-refresh)) + +(defun magit-diff-default-hunks () + "Reset context for diff hunks to the default size." + (interactive) + (setq magit-diff-context-lines 3) + (magit-refresh)) + +(defun magit-set-diff-options () + "Set local `magit-diff-options' based on popup state. +And refresh the current Magit buffer." + (interactive) + (setq-local magit-diff-options magit-custom-options) + (magit-refresh)) + +;; `magit-set-default-diff-options' is defined in "Options"/"Setters". + +(defun magit-save-default-diff-options () + "Set and save the default for `magit-diff-options' based on popup value. +Also set the local value in all Magit buffers and refresh them." + (interactive) + (customize-save-variable 'magit-diff-options magit-custom-options)) + +(defun magit-reset-diff-options () + "Reset local `magit-diff-options' to default value. +And refresh the current Magit buffer." + (interactive) + (setq-local magit-diff-options (default-value 'magit-diff-options)) + (magit-refresh)) + +;;;; Raw Diff Washing + +(defun magit-insert-diff (section file status) + (let ((beg (point))) + (apply 'magit-git-insert "-c" "diff.submodule=short" "diff" + `(,(magit-diff-U-arg) ,@magit-diff-options "--" ,file)) + (unless (eq (char-before) ?\n) + (insert "\n")) + (save-restriction + (narrow-to-region beg (point)) + (goto-char beg) + (magit-wash-diff-section section) + (goto-char (point-max))))) + +(defun magit-wash-raw-diffs (&optional staged) + (let (previous) + (magit-wash-sequence + (lambda () + (setq previous (magit-wash-raw-diff previous staged)))))) + +(defun magit-wash-raw-diff (previous staged) + (when (looking-at + ":\\([0-7]+\\) \\([0-7]+\\) [0-9a-f]+ [0-9a-f]+ \\(.\\)[0-9]*\t\\([^\t\n]+\\)$") + (let ((file (magit-decode-git-path (match-string-no-properties 4))) + (status (cl-ecase (string-to-char (match-string-no-properties 3)) + (?A 'new) + (?C 'copy) + (?D 'deleted) + (?M 'modified) + (?T 'typechange) + (?U 'unmerged) + (?X 'unknown)))) + (delete-region (point) (1+ (line-end-position))) + (unless (or ;; Unmerged files get two entries; we ignore the second. + (equal file previous) + ;; Ignore staged, unmerged files. + (and staged (eq status 'unmerged))) + (magit-with-section (section diff file nil nil + (not (derived-mode-p + 'magit-diff-mode + 'magit-commit-mode))) + (if (not (magit-section-hidden section)) + (magit-insert-diff section file status) + (setf (magit-section-diff-status section) status) + (setf (magit-section-needs-refresh-on-show section) t) + (magit-insert-diff-title status file nil)))) + file))) + +;;; Modes (1) +;;;; Commit Mode +;;;;; Commit Core + +(define-derived-mode magit-commit-mode magit-mode "Magit" + "Mode for looking at a git commit. + +\\Type `\\[magit-visit-item]` to visit the changed file, \ +`\\[magit-toggle-section]` to hide or show a hunk, +`\\[magit-diff-larger-hunks]` and `\\[magit-diff-smaller-hunks]` to change the \ +size of the hunks. +Type `\\[magit-apply-item]` to apply a change to your worktree and \ +`\\[magit-revert-item]` to reverse it. + +\\{magit-commit-mode-map} +Unless shadowed by the mode specific bindings above, bindings +from the parent keymap `magit-mode-map' are also available." + :group 'magit) + +(defvar magit-commit-buffer-name "*magit-commit*" + "Name of buffer used to display a commit.") + +;;;###autoload +(defun magit-show-commit (commit &optional noselect) + "Show information about COMMIT." + (interactive (list (magit-read-rev-with-default + "Show commit (hash or ref)"))) + (when (magit-git-failure "cat-file" "commit" commit) + (user-error "%s is not a commit" commit)) + (magit-mode-setup magit-commit-buffer-name + (if noselect 'display-buffer 'pop-to-buffer) + #'magit-commit-mode + #'magit-refresh-commit-buffer + commit)) + +(defun magit-show-item-or-scroll-up () + "Update commit or status buffer for item at point. + +Either show the commit or stash at point in another buffer, +or if that buffer is already displayed in the current frame +and contains information about that commit or stash, then +instead scroll the buffer up. If there is no commit or +stash at point, then prompt for a commit." + (interactive) + (magit-show-item-or-scroll 'scroll-up)) + +(defun magit-show-item-or-scroll-down () + "Update commit or status buffer for item at point. + +Either show the commit or stash at point in another buffer, +or if that buffer is already displayed in the current frame +and contains information about that commit or stash, then +instead scroll the buffer down. If there is no commit or +stash at point, then prompt for a commit." + (interactive) + (magit-show-item-or-scroll 'scroll-down)) + +(defun magit-show-item-or-scroll (fn) + (let (rev cmd buf win) + (magit-section-case (info) + (commit (setq rev info + cmd 'magit-show-commit + buf magit-commit-buffer-name)) + (stash (setq rev info + cmd 'magit-diff-stash + buf magit-stash-buffer-name))) + (if rev + (if (and (setq buf (get-buffer buf)) + (setq win (get-buffer-window buf)) + (with-current-buffer buf + (equal rev (car magit-refresh-args)))) + (with-selected-window win + (condition-case err + (funcall fn) + (error + (goto-char (cl-case fn + (scroll-up (point-min)) + (scroll-down (point-max))))))) + (funcall cmd rev t)) + (call-interactively 'magit-show-commit)))) + +(defun magit-refresh-commit-buffer (commit) + (magit-git-insert-section (commitbuf nil) + #'magit-wash-commit + "log" "-1" "--decorate=full" + "--pretty=medium" (magit-diff-U-arg) + "--cc" "-p" (and magit-show-diffstat "--stat") + magit-diff-options commit)) + +;;;;; Commit Washing + +(defun magit-wash-commit () + (looking-at "^commit \\([a-z0-9]+\\)\\(?: \\(.+\\)\\)?$") + (let ((rev (match-string 1)) + (refs (match-string 2))) + (delete-region (point) (1+ (line-end-position))) + (magit-with-section + (section headers 'headers + (concat (propertize rev 'face 'magit-log-sha1) + (and refs (concat " "(magit-format-ref-labels refs))) + "\n")) + (while (re-search-forward "^\\([a-z]+\\): +\\(.+\\)$" nil t) + (when (string-match-p (match-string 1) "Merge") + (let ((revs (match-string 2))) + (delete-region (match-beginning 2) (match-end 2)) + (dolist (rev (split-string revs)) + (magit-insert-commit-button rev) + (insert ?\s))))) + (forward-line))) + (forward-line) + (let ((bound (save-excursion + (when (re-search-forward "^diff" nil t) + (copy-marker (match-beginning 0))))) + (summary (buffer-substring-no-properties + (point) (line-end-position)))) + (delete-region (point) (1+ (line-end-position))) + (magit-with-section (section message 'message (concat summary "\n")) + (cond ((re-search-forward "^---" bound t) + (goto-char (match-beginning 0)) + (delete-region (match-beginning 0) (match-end 0))) + ((re-search-forward "^.[^ ]" bound t) + (goto-char (1- (match-beginning 0))))))) + (forward-line) + (when magit-show-diffstat + (magit-wash-diffstats)) + (forward-line) + (magit-wash-diffs)) + +(defun magit-insert-commit-button (hash) + (magit-with-section (section commit hash) + (insert-text-button hash + 'help-echo "Visit commit" + 'action (lambda (button) + (save-excursion + (goto-char button) + (magit-visit-item))) + 'follow-link t + 'mouse-face magit-item-highlight-face + 'face 'magit-log-sha1))) + +;;;; Status Mode + +(define-derived-mode magit-status-mode magit-mode "Magit" + "Mode for looking at git status. + +\\Type `\\[magit-stage-item]` to stage (add) an item, \ +`\\[magit-unstage-item]` to unstage it. +Type `\\[magit-key-mode-popup-committing]` to have a popup to commit, type \ +`\\[magit-key-mode-popup-dispatch]` to see others +available popup. +Type `\\[magit-visit-item]` to visit something, and \ +`\\[magit-toggle-section]` to show or hide section. + +More information can be found in Info node `(magit)Status' + +Other key binding: +\\{magit-status-mode-map}" + :group 'magit) + +(defvar magit-status-buffer-name "*magit: %t*" + "Name of buffer used to display a repository's status.") + +;;;###autoload +(defun magit-status (dir &optional switch-function) + "Open a Magit status buffer for the Git repository containing DIR. +If DIR is not within a Git repository, offer to create a Git +repository in DIR. + +Interactively, a prefix argument means to ask the user which Git +repository to use even if `default-directory' is under Git +control. Two prefix arguments means to ignore `magit-repo-dirs' +when asking for user input. + +Depending on option `magit-status-buffer-switch-function' the +status buffer is shown in another window (the default) or the +current window. Non-interactively optional SWITCH-FUNCTION +can be used to override this." + (interactive (list (if current-prefix-arg + (magit-read-top-dir + (> (prefix-numeric-value current-prefix-arg) + 4)) + (or (magit-get-top-dir) + (magit-read-top-dir nil))))) + (magit-save-some-buffers) + (let ((topdir (magit-get-top-dir dir))) + (when (or topdir + (and (yes-or-no-p + (format "There is no Git repository in %s. Create one? " + dir)) + (magit-init dir) + (setq topdir (magit-get-top-dir dir)))) + (let ((default-directory topdir)) + (magit-mode-setup magit-status-buffer-name + (or switch-function + magit-status-buffer-switch-function) + #'magit-status-mode + #'magit-refresh-status))))) + +(defun magit-refresh-status () + (magit-git-exit-code "update-index" "--refresh") + (magit-with-section (section status 'status nil t) + (run-hooks 'magit-status-sections-hook)) + (run-hooks 'magit-refresh-status-hook)) + +;;; Sections +;;;; Real Sections + +(defun magit-insert-stashes () + ;; #1427 Set log.date to work around an issue in Git <1.7.10.3. + (let ((stashes (magit-git-lines "-c" "log.date=default" "stash" "list"))) + (when stashes + (magit-with-section (section stashes 'stashes "Stashes:" t) + (dolist (stash stashes) + (string-match "^\\(stash@{\\([0-9]+\\)}\\): \\(.+\\)$" stash) + (let ((stash (match-string 1 stash)) + (number (match-string 2 stash)) + (message (match-string 3 stash))) + (magit-with-section (section stash stash) + (insert number ": " message "\n")))) + (insert "\n"))))) + +(defun magit-insert-untracked-files () + (magit-with-section (section untracked 'untracked "Untracked files:" t) + (let ((files (cl-mapcan + (lambda (f) + (when (eq (aref f 0) ??) (list f))) + (magit-git-lines + "status" "--porcelain")))) + (if (not files) + (setq section nil) + (dolist (file files) + (setq file (magit-decode-git-path (substring file 3))) + (magit-with-section (section file file) + (insert "\t" file "\n"))) + (insert "\n"))))) + +(defun magit-insert-pending-commits () + (let* ((info (magit-read-rewrite-info)) + (pending (cdr (assq 'pending info)))) + (when pending + (magit-with-section (section pending 'pending "Pending commits:" t) + (dolist (p pending) + (let* ((commit (car p)) + (properties (cdr p)) + (used (plist-get properties 'used))) + (magit-with-section (section commit commit) + (insert (magit-git-string + "log" "-1" + (if used + "--pretty=format:. %s" + "--pretty=format:* %s") + commit "--") + "\n"))))) + (insert "\n")))) + +(defun magit-insert-unstaged-changes () + (let ((magit-current-diff-range (cons 'index 'working)) + (magit-diff-options (copy-sequence magit-diff-options))) + (magit-git-insert-section (unstaged "Unstaged changes:") + #'magit-wash-raw-diffs + "diff-files"))) + +(defun magit-insert-staged-changes () + (let ((no-commit (not (magit-git-success "log" "-1" "HEAD")))) + (when (or no-commit (magit-anything-staged-p)) + (let ((magit-current-diff-range (cons "HEAD" 'index)) + (base (if no-commit + (magit-git-string "mktree") + "HEAD")) + (magit-diff-options (append '("--cached") magit-diff-options))) + (magit-git-insert-section (staged "Staged changes:") + (apply-partially #'magit-wash-raw-diffs t) + "diff-index" "--cached" base))))) + +(defun magit-insert-unpulled-or-recent-commits () + (let ((tracked (magit-get-tracked-branch nil t))) + (if (and tracked + (not (equal (magit-git-string "rev-parse" "HEAD") + (magit-git-string "rev-parse" tracked)))) + (magit-insert-unpulled-commits) + (magit-git-insert-section (recent "Recent commits:") + (apply-partially 'magit-wash-log 'unique) + "log" "--format=format:%h %s" "-n" "10")))) + +(defun magit-insert-unpulled-commits () + (let ((tracked (magit-get-tracked-branch nil t))) + (when tracked + (magit-git-insert-section (unpulled "Unpulled commits:") + (apply-partially 'magit-wash-log 'unique) + "log" "--format=format:%h %s" (concat "HEAD.." tracked))))) + +(defun magit-insert-unpushed-commits () + (let ((tracked (magit-get-tracked-branch nil t))) + (when tracked + (magit-git-insert-section (unpushed "Unpushed commits:") + (apply-partially 'magit-wash-log 'unique) + "log" "--format=format:%h %s" (concat tracked "..HEAD"))))) + +(defun magit-insert-unpulled-cherries () + (let ((tracked (magit-get-tracked-branch nil t))) + (when tracked + (magit-git-insert-section (unpulled "Unpulled commits:") + (apply-partially 'magit-wash-log 'cherry) + "cherry" "-v" (magit-abbrev-arg) (magit-get-current-branch) tracked)))) + +(defun magit-insert-unpushed-cherries () + (let ((tracked (magit-get-tracked-branch nil t))) + (when tracked + (magit-git-insert-section (unpushed "Unpushed commits:") + (apply-partially 'magit-wash-log 'cherry) + "cherry" "-v" (magit-abbrev-arg) tracked)))) + +;;;; Line Sections + +(defun magit-insert-empty-line () + (insert "\n")) + +(defun magit-insert-status-local-line () + (let ((branch (or (magit-get-current-branch) "(detached)"))) + (magit-insert-line-section (branch branch) + (concat "Local: " + (propertize branch 'face 'magit-branch) + " " (abbreviate-file-name default-directory))))) + +(defun magit-insert-status-remote-line () + (let* ((branch (magit-get-current-branch)) + (tracked (magit-get-tracked-branch branch))) + (when tracked + (magit-insert-line-section (branch tracked) + (concat "Remote: " + (and (magit-get-boolean "branch" branch "rebase") "onto ") + (magit-format-tracked-line tracked branch)))))) + +(defun magit-format-tracked-line (tracked branch) + (when tracked + (setq tracked (propertize tracked 'face 'magit-branch)) + (let ((remote (magit-get "branch" branch "remote"))) + (concat (if (string= "." remote) + (concat "branch " tracked) + (when (string-match (concat "^" remote) tracked) + (setq tracked (substring tracked (1+ (length remote))))) + (concat tracked " @ " remote + " (" (magit-get "remote" remote "url") ")")))))) + +(defun magit-insert-status-head-line () + (let ((hash (magit-git-string "rev-parse" "--verify" "HEAD"))) + (if hash + (magit-insert-line-section (commit hash) + (concat "Head: " (magit-format-rev-summary "HEAD"))) + (magit-insert-line-section (no-commit) + "Head: nothing committed yet")))) + +(defun magit-insert-status-tags-line () + (let* ((current-tag (magit-get-current-tag t)) + (next-tag (magit-get-next-tag t)) + (both-tags (and current-tag next-tag t)) + (tag-subject (eq magit-status-tags-line-subject 'tag))) + (when (or current-tag next-tag) + (magit-insert-line-section (line) + (concat + (if both-tags "Tags: " "Tag: ") + (and current-tag (apply 'magit-format-status-tag-sentence + tag-subject current-tag)) + (and both-tags ", ") + (and next-tag (apply 'magit-format-status-tag-sentence + (not tag-subject) next-tag))))))) + +(defun magit-format-status-tag-sentence (behindp tag cnt &rest ignored) + (concat (propertize tag 'face 'magit-tag) + (and (> cnt 0) + (concat (if (eq magit-status-tags-line-subject 'tag) + (concat " (" (propertize (format "%s" cnt) + 'face 'magit-branch)) + (format " (%i" cnt)) + " " (if behindp "behind" "ahead") ")")))) + +;;;; Progress Sections + +(defun magit-insert-status-merge-line () + (let ((heads (magit-file-lines (magit-git-dir "MERGE_HEAD")))) + (when heads + (magit-insert-line-section (line) + (concat + "Merging: " + (mapconcat 'identity (mapcar 'magit-name-rev heads) ", ") + (and magit-status-show-sequence-help + "; Resolve conflicts, or press \"m A\" to Abort")))))) + +(defun magit-insert-status-rebase-lines () + (let ((rebase (magit-rebase-info))) + (when rebase + (magit-insert-line-section (line) + (concat (if (nth 4 rebase) "Applying" "Rebasing") + (apply 'format ": onto %s (%s of %s)" rebase) + (and magit-status-show-sequence-help + "; Press \"R\" to Abort, Skip, or Continue"))) + (when (and (null (nth 4 rebase)) (nth 3 rebase)) + (magit-insert-line-section (line) + (concat "Stopped: " + (magit-format-rev-summary (nth 3 rebase)))))))) + +(defun magit-insert-rebase-sequence () + (let ((f (magit-git-dir "rebase-merge/git-rebase-todo"))) + (when (file-exists-p f) + (magit-with-section (section rebase-todo 'rebase-todo "Rebasing:" t) + (cl-loop + for line in (magit-file-lines f) + when (string-match + "^\\(pick\\|reword\\|edit\\|squash\\|fixup\\) \\([^ ]+\\) \\(.*\\)$" + line) + do (let ((cmd (match-string 1 line)) + (hash (match-string 2 line)) + (msg (match-string 3 line))) + (magit-with-section (section commit hash) + (insert cmd " ") + (insert (propertize + (magit-git-string "rev-parse" "--short" hash) + 'face 'magit-log-sha1)) + (insert " " msg "\n")))) + (insert "\n"))))) + +(defun magit-insert-bisect-output () + (when (magit-bisecting-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-with-section + (section bisect-output 'bisect-output + (propertize + (or (and (string-match done-re (car lines)) (pop lines)) + (cl-find-if (apply-partially 'string-match done-re) + lines) + (pop lines)) + 'face 'magit-section-title) + t t) + (dolist (line lines) + (insert line "\n")))) + (insert "\n"))) + +(defun magit-insert-bisect-rest () + (when (magit-bisecting-p) + (magit-git-insert-section (bisect-view "Bisect Rest:") + (apply-partially 'magit-wash-log 'bisect-vis) + "bisect" "visualize" "git" "log" + "--pretty=format:%h%d %s" "--decorate=full"))) + +(defun magit-insert-bisect-log () + (when (magit-bisecting-p) + (magit-git-insert-section (bisect-log "Bisect Log:") + #'magit-wash-bisect-log + "bisect" "log"))) + +(defun magit-wash-bisect-log () + (let (beg) + (while (progn (setq beg (point-marker)) + (re-search-forward "^\\(git bisect [^\n]+\n\\)" nil t)) + (let ((heading (match-string-no-properties 1))) + (delete-region (match-beginning 0) (match-end 0)) + (save-restriction + (narrow-to-region beg (point)) + (goto-char (point-min)) + (magit-with-section (section bisect-log 'bisect-log heading nil t) + (magit-wash-sequence + (apply-partially 'magit-wash-log-line 'bisect-log + (magit-abbrev-length))))))) + (when (re-search-forward + "# first bad commit: \\[\\([a-z0-9]\\{40\\}\\)\\] [^\n]+\n" nil t) + (let ((hash (match-string-no-properties 1))) + (delete-region (match-beginning 0) (match-end 0)) + (magit-with-section + (section 'bisect-log 'bisect-log + (concat hash " is the first bad commit\n"))))))) + +(defun magit-bisecting-p () + (file-exists-p (magit-git-dir "BISECT_LOG"))) + +;;; Utilities (2) +;;;; Save Buffers + +(defvar magit-default-directory nil) + +(defun magit-save-some-buffers (&optional msg pred topdir) + "Save some buffers if variable `magit-save-some-buffers' is non-nil. +If variable `magit-save-some-buffers' is set to `dontask' then +don't ask the user before saving the buffers, just go ahead and +do it. + +Optional argument MSG is displayed in the minibuffer if variable +`magit-save-some-buffers' is nil. + +Optional second argument PRED determines which buffers are considered: +If PRED is nil, all the file-visiting buffers are considered. +If PRED is t, then certain non-file buffers will also be considered. +If PRED is a zero-argument function, it indicates for each buffer whether +to consider it or not when called with that buffer current." + (interactive) + (let ((predicate-function (or pred magit-save-some-buffers-predicate)) + (magit-default-directory (or topdir default-directory))) + (if magit-save-some-buffers + (save-some-buffers + (eq magit-save-some-buffers 'dontask) + predicate-function) + (when msg + (message msg))))) + +(defun magit-save-buffers-predicate-all () + "Prompt to save all buffers with unsaved changes." + t) + +(defun magit-save-buffers-predicate-tree-only () + "Only prompt to save buffers which are within the current git project. +As determined by the directory passed to `magit-status'." + (and buffer-file-name + (string= (magit-get-top-dir magit-default-directory) + (magit-get-top-dir (file-name-directory buffer-file-name))))) + +;;; Porcelain +;;;; Apply +;;;;; Apply Commands +;;;;;; Apply + +(defun magit-apply-item () + "Apply the item at point to the current working tree." + (interactive) + (magit-section-action apply (info) + (([* unstaged] [* staged]) + (user-error "Change is already in your working tree")) + (hunk (magit-apply-hunk-item it)) + (diff (magit-apply-diff-item it)) + (stash (magit-stash-apply info)) + (commit (magit-apply-commit info)))) + +;;;;;; Stage + +(defun magit-stage-item (&optional file) + "Add the item at point to the staging area. +With a prefix argument, prompt for a file to be staged instead." + (interactive + (when current-prefix-arg + (list (file-relative-name (read-file-name "File to stage: " nil nil t) + (magit-get-top-dir))))) + (if file + (magit-run-git "add" file) + (magit-section-action stage (info) + ([file untracked] + (magit-run-git + (cond + ((use-region-p) + (cons "add" (magit-section-region-siblings #'magit-section-info))) + ((and (string-match-p "/$" info) + (file-exists-p (expand-file-name ".git" info))) + (let ((repo (read-string + "Add submodule tracking remote repo (empty to abort): " + (let ((default-directory + (file-name-as-directory + (expand-file-name info default-directory)))) + (magit-get "remote.origin.url"))))) + (if (equal repo "") + (user-error "Abort") + (list "submodule" "add" repo (substring info 0 -1))))) + (t + (list "add" info))))) + (untracked + (magit-run-git "add" "--" (magit-git-lines "ls-files" "--other" + "--exclude-standard"))) + ([hunk diff unstaged] + (magit-apply-hunk-item it "--cached")) + ([diff unstaged] + (magit-run-git "add" "-u" + (if (use-region-p) + (magit-section-region-siblings #'magit-section-info) + info))) + (unstaged + (magit-stage-all)) + ([* staged] + (user-error "Already staged")) + (hunk (user-error "Can't stage this hunk")) + (diff (user-error "Can't stage this diff"))))) + +;;;###autoload +(defun magit-stage-all (&optional including-untracked) + "Add all remaining changes in tracked files to staging area. +With a prefix argument, add remaining untracked files as well. +\('git add [-u] .')." + (interactive "P") + (when (or (not magit-stage-all-confirm) + (not (magit-anything-staged-p)) + (yes-or-no-p "Stage all changes? ")) + (if including-untracked + (magit-run-git "add" ".") + (magit-run-git "add" "-u" ".")))) + +;;;;;; Unstage + +(defun magit-unstage-item () + "Remove the item at point from the staging area." + (interactive) + (magit-section-action unstage (info) + ([hunk diff staged] + (magit-apply-hunk-item it "--reverse" "--cached")) + ([diff staged] + (when (eq info 'unmerged) + (user-error "Can't unstage an unmerged file. Resolve it first")) + (let ((files (if (use-region-p) + (magit-section-region-siblings #'magit-section-info) + (list info)))) + (if (magit-no-commit-p) + (magit-run-git "rm" "--cached" "--" files) + (magit-run-git "reset" "-q" "HEAD" "--" files)))) + (staged + (magit-unstage-all)) + ([* unstaged] + (user-error "Already unstaged")) + (hunk (user-error "Can't unstage this hunk")) + (diff (user-error "Can't unstage this diff")))) + +;;;###autoload +(defun magit-unstage-all () + "Remove all changes from staging area. +\('git reset --mixed HEAD')." + (interactive) + (when (or (not magit-unstage-all-confirm) + (and (not (magit-anything-unstaged-p)) + (not (magit-git-lines "ls-files" "--others" "-t" + "--exclude-standard"))) + (yes-or-no-p "Unstage all changes? ")) + (magit-run-git "reset" "HEAD" "--"))) + +;;;;;; Discard + +(defun magit-discard-item () + "Remove the change introduced by the item at point." + (interactive) + (magit-section-action discard (info parent-info) + ([file untracked] + (when (yes-or-no-p (format "Delete %s? " info)) + (if (and (file-directory-p info) + (not (file-symlink-p info))) + (delete-directory info 'recursive) + (delete-file info)) + (magit-refresh))) + (untracked + (when (yes-or-no-p "Delete all untracked files and directories? ") + (magit-run-git "clean" "-df"))) + ([hunk diff unstaged] + (when (yes-or-no-p (if (use-region-p) + "Discard changes in region? " + "Discard hunk? ")) + (magit-apply-hunk-item it "--reverse"))) + ([hunk diff staged] + (if (magit-file-uptodate-p parent-info) + (when (yes-or-no-p (if (use-region-p) + "Discard changes in region? " + "Discard hunk? ")) + (magit-apply-hunk-item it "--reverse" "--index")) + (user-error "Can't discard this hunk. Please unstage it first"))) + ([diff unstaged] + (magit-discard-diff it nil)) + ([diff staged] + (if (magit-file-uptodate-p (magit-section-info it)) + (magit-discard-diff it t) + (user-error "Can't discard staged changes to this file. \ +Please unstage it first"))) + (hunk (user-error "Can't discard this hunk")) + (diff (user-error "Can't discard this diff")) + (stash (when (yes-or-no-p "Discard stash? ") + (magit-stash-drop info))) + (branch (when (yes-or-no-p + (if current-prefix-arg + (concat "Force delete branch [" info "]? ") + (concat "Delete branch [" info "]? "))) + (magit-delete-branch info current-prefix-arg))) + (remote (when (yes-or-no-p "Remove remote? ") + (magit-remove-remote info))))) + +;;;;;; Revert + +(defun magit-revert-item () + "Revert the item at point. +The change introduced by the item is reversed in the current +working tree." + (interactive) + (magit-section-action revert (info) + ([* unstaged] (magit-discard-item)) + (commit (when (or (not magit-revert-item-confirm) + (yes-or-no-p "Revert this commit? ")) + (magit-revert-commit info))) + (diff (when (or (not magit-revert-item-confirm) + (yes-or-no-p "Revert this diff? ")) + (magit-apply-diff-item it "--reverse"))) + (hunk (when (or (not magit-revert-item-confirm) + (yes-or-no-p "Revert this hunk? ")) + (magit-apply-hunk-item it "--reverse"))))) + +(defun magit-revert-commit (commit) + (magit-assert-one-parent commit "revert") + (magit-run-git "revert" "--no-commit" commit)) + +(defconst magit-revert-backup-file "magit/reverted.diff") + +(defun magit-revert-undo () + "Re-apply the previously reverted hunk. +Also see option `magit-revert-backup'." + (interactive) + (let ((file (magit-git-dir magit-revert-backup-file))) + (if (file-readable-p file) + (magit-run-git "apply" file) + (user-error "No backups exist")) + (magit-refresh))) + +;;;;; Apply Core + +(defun magit-discard-diff (diff stagedp) + (let ((file (magit-section-info diff))) + (cl-case (magit-section-diff-status diff) + (deleted + (when (yes-or-no-p (format "Resurrect %s? " file)) + (when stagedp + (magit-run-git "reset" "-q" "--" file)) + (magit-run-git "checkout" "--" file))) + (new + (when (yes-or-no-p (format "Delete %s? " file)) + (magit-run-git "rm" "-f" "--" file))) + (t + (when (yes-or-no-p (format "Discard changes to %s? " file)) + (if stagedp + (magit-run-git "checkout" "HEAD" "--" file) + (magit-run-git "checkout" "--" file))))))) + +(defun magit-apply-commit (commit) + (magit-assert-one-parent commit "cherry-pick") + (magit-run-git "cherry-pick" "--no-commit" commit)) + +(defun magit-apply-diff-item (diff &rest args) + (when (zerop magit-diff-context-lines) + (setq args (cons "--unidiff-zero" args))) + (let ((buf (generate-new-buffer " *magit-input*"))) + (unwind-protect + (progn (magit-insert-diff-item-patch diff buf) + (magit-run-git-with-input + buf "apply" args "--ignore-space-change" "-")) + (kill-buffer buf)))) + +(defun magit-apply-hunk-item (hunk &rest args) + "Apply single hunk or part of a hunk to the index or working file. + +This function is the core of magit's stage, unstage, apply, and +revert operations. HUNK (or the portion of it selected by the +region) will be applied to either the index, if \"--cached\" is a +member of ARGS, or to the working file otherwise." + (when (string-match "^diff --cc" (magit-section-parent-info hunk)) + (user-error (concat "Cannot un-/stage individual resolution hunks. " + "Please stage the whole file."))) + (let ((use-region (use-region-p))) + (when (zerop magit-diff-context-lines) + (setq args (cons "--unidiff-zero" args)) + (when use-region + (user-error (concat "Not enough context to partially apply hunk. " + "Use `+' to increase context.")))) + (let ((buf (generate-new-buffer " *magit-input*"))) + (unwind-protect + (progn (if use-region + (magit-insert-hunk-item-region-patch + hunk (member "--reverse" args) + (region-beginning) (region-end) buf) + (magit-insert-hunk-item-patch hunk buf)) + (magit-revert-backup buf args) + (magit-run-git-with-input + buf "apply" args "--ignore-space-change" "-")) + (kill-buffer buf))))) + +(defun magit-insert-diff-item-patch (diff buf) + (magit-insert-region (magit-section-content-beginning diff) + (magit-section-end diff) + buf)) + +(defun magit-insert-hunk-item-patch (hunk buf) + (magit-diff-item-insert-header (magit-section-parent hunk) buf) + (magit-insert-region (magit-section-beginning hunk) + (magit-section-end hunk) + buf)) + +(defun magit-insert-hunk-item-region-patch (hunk reverse beg end buf) + (magit-diff-item-insert-header (magit-section-parent hunk) buf) + (save-excursion + (goto-char (magit-section-beginning hunk)) + (magit-insert-current-line buf) + (forward-line) + (let ((copy-op (if reverse "+" "-"))) + (while (< (point) (magit-section-end hunk)) + (cond ((and (<= beg (point)) (< (point) end)) + (magit-insert-current-line buf)) + ((looking-at " ") + (magit-insert-current-line buf)) + ((looking-at copy-op) + (let ((text (buffer-substring-no-properties + (+ (point) 1) (line-beginning-position 2)))) + (with-current-buffer buf + (insert " " text))))) + (forward-line)))) + (with-current-buffer buf + (diff-fixup-modifs (point-min) (point-max)))) + +(defun magit-diff-item-insert-header (diff buf) + (magit-insert-region (magit-section-content-beginning diff) + (if (magit-section-children diff) + (magit-section-beginning + (car (magit-section-children diff))) + (magit-section-end diff)) + buf)) + +(defun magit-insert-region (beg end buf) + (let ((text (buffer-substring-no-properties beg end))) + (with-current-buffer buf + (insert text)))) + +(defun magit-insert-current-line (buf) + (let ((text (buffer-substring-no-properties + (line-beginning-position) (line-beginning-position 2)))) + (with-current-buffer buf + (insert text)))) + +(defun magit-revert-backup (buffer args) + (when (and magit-revert-backup (member "--reverse" args)) + (with-current-buffer buffer + (let ((buffer-file-name (magit-git-dir magit-revert-backup-file)) + (make-backup-files t) + (backup-directory-alist nil) + (version-control t) + (kept-old-versions 0) + (kept-new-versions 10)) + (make-directory (file-name-directory buffer-file-name) t) + (save-buffer 16))))) + +;;;; Visit + +(defun magit-visit-item (&optional other-window) + "Visit current item. +With a prefix argument, visit in other window." + (interactive "P") + (magit-section-action visit (info parent-info) + ((diff diffstat [file untracked]) + (magit-visit-file-item info other-window)) + (hunk (magit-visit-file-item parent-info other-window + (magit-hunk-item-target-line it) + (current-column))) + (commit (magit-show-commit info)) + (stash (magit-diff-stash info)) + (branch (magit-checkout info)))) + +(defun magit-visit-file-item (file &optional other-window line column) + (unless file + (user-error "Can't get pathname for this file")) + (unless (file-exists-p file) + (user-error "Can't visit deleted file: %s" file)) + (if (file-directory-p file) + (progn + (setq file (file-name-as-directory (expand-file-name file))) + (if (equal (magit-get-top-dir (file-name-directory file)) + (magit-get-top-dir)) + (magit-dired-jump other-window) + (magit-status file (if other-window + 'pop-to-buffer + 'switch-to-buffer)))) + (if other-window + (find-file-other-window file) + (find-file file)) + (when line + (goto-char (point-min)) + (forward-line (1- line)) + (when (> column 0) + (move-to-column (1- column)))))) + +(defun magit-hunk-item-target-line (hunk) + (save-excursion + (beginning-of-line) + (let ((line (line-number-at-pos))) + (goto-char (magit-section-beginning hunk)) + (unless (looking-at "@@+ .* \\+\\([0-9]+\\)\\(,[0-9]+\\)? @@+") + (user-error "Hunk header not found")) + (let ((target (string-to-number (match-string 1)))) + (forward-line) + (while (< (line-number-at-pos) line) + ;; XXX - deal with combined diffs + (unless (looking-at "-") + (setq target (+ target 1))) + (forward-line)) + target)))) + +;;;###autoload +(defun magit-dired-jump (&optional other-window) + "Visit current item in dired. +With a prefix argument, visit in other window." + (interactive "P") + (require 'dired-x) + (dired-jump other-window + (file-truename + (magit-section-action dired-jump (info parent-info) + ([file untracked] info) + ((diff diffstat) info) + (hunk parent-info) + (t default-directory))))) + +(defvar-local magit-file-log-file nil) +(defvar-local magit-show-current-version nil) + +;;;###autoload +(defun magit-show (rev file &optional switch-function) + "Display and select a buffer containing FILE as stored in REV. + +Insert the contents of FILE as stored in the revision REV into a +buffer. Then select the buffer using `pop-to-buffer' or with a +prefix argument using `switch-to-buffer'. Non-interactivity use +SWITCH-FUNCTION to switch to the buffer, if that is nil simply +return the buffer, without displaying it." + ;; REV may also be one of the symbols `index' or `working' but + ;; that is only intended for use by `magit-ediff'. + (interactive + (let (rev file section) + (magit-section-case (info parent) + (commit (setq file magit-file-log-file rev info)) + (hunk (setq section parent)) + (diff (setq section it))) + (if section + (setq rev (car (magit-diff-range section)) + file (magit-section-info section)) + (unless rev + (setq rev (magit-get-current-branch)))) + (setq rev (magit-read-rev "Retrieve file from revision" rev) + file (cl-case rev + (working (read-file-name "Find file: ")) + (index (magit-read-file-from-rev "HEAD" file)) + (t (magit-read-file-from-rev rev file)))) + (list rev file (if current-prefix-arg + 'switch-to-buffer + 'pop-to-buffer)))) + (let (buffer) + (if (eq rev 'working) + (setq buffer (find-file-noselect file)) + (let ((name (format "%s.%s" file + (if (symbolp rev) + (format "@{%s}" rev) + (replace-regexp-in-string "/" ":" rev))))) + (setq buffer (get-buffer name)) + (when buffer + (with-current-buffer buffer + (if (and (equal file magit-file-name) + (equal rev magit-show-current-version)) + (let ((inhibit-read-only t)) + (erase-buffer)) + (setq buffer nil)))) + (with-current-buffer + (or buffer (setq buffer (create-file-buffer name))) + (setq buffer-read-only t) + (with-silent-modifications + (if (eq rev 'index) + (let ((temp (car (split-string + (magit-git-string "checkout-index" + "--temp" file) + "\t"))) + (inhibit-read-only t)) + (insert-file-contents temp nil nil nil t) + (delete-file temp)) + (magit-git-insert "cat-file" "-p" (concat rev ":" file)))) + (let ((buffer-file-name (expand-file-name file (magit-get-top-dir)))) + (normal-mode t)) + (setq magit-file-name file) + (setq magit-show-current-version rev) + (goto-char (point-min))))) + (when switch-function + (with-current-buffer buffer + (funcall switch-function (current-buffer)))) + buffer)) + +;;;; Act +;;;;; Merging + +;;;###autoload +(defun magit-merge (revision &optional do-commit) + "Merge REVISION into the current 'HEAD', leaving changes uncommitted. +With a prefix argument, skip editing the log message and commit. +\('git merge [--no-commit] REVISION')." + (interactive (list (magit-read-rev "Merge" + (or (magit-guess-branch) + (magit-get-previous-branch))) + current-prefix-arg)) + (when (or (not (magit-anything-modified-p)) + (not magit-merge-warn-dirty-worktree) + (yes-or-no-p + "Running merge in a dirty worktree could cause data loss. Continue?")) + (magit-run-git "merge" revision magit-custom-options + (unless do-commit "--no-commit")) + (when (file-exists-p ".git/MERGE_MSG") + (let ((magit-custom-options nil)) + (magit-commit))))) + +;;;###autoload +(defun magit-merge-abort () + "Abort the current merge operation." + (interactive) + (if (file-exists-p (magit-git-dir "MERGE_HEAD")) + (when (yes-or-no-p "Abort merge? ") + (magit-run-git-async "merge" "--abort")) + (user-error "No merge in progress"))) + +;;;;; Branching + +(defun magit-escape-branch-name (branch) + "Escape branch name BRANCH to remove problematic characters." + (replace-regexp-in-string "[/]" "-" branch)) + +(defun magit-default-tracking-name-remote-plus-branch (remote branch) + "Use the remote name plus a hyphen plus the escaped branch name for tracking branches." + (concat remote "-" (magit-escape-branch-name branch))) + +(defun magit-default-tracking-name-branch-only (remote branch) + "Use just the escaped branch name for tracking branches." + (magit-escape-branch-name branch)) + +(defun magit-get-tracking-name (remote branch) + "Given a REMOTE and a BRANCH name, ask the user for a local +tracking brach name suggesting a sensible default." + (when (yes-or-no-p + (format "Create local tracking branch for %s? " branch)) + (let* ((default-name + (funcall magit-default-tracking-name-function remote branch)) + (chosen-name + (read-string (format "Call local branch (%s): " default-name) + nil nil default-name))) + (when (magit-ref-exists-p (concat "refs/heads/" chosen-name)) + (user-error "'%s' already exists" chosen-name)) + chosen-name))) + +(defun magit-maybe-create-local-tracking-branch (rev) + "Depending on the users wishes, create a tracking branch for +REV... maybe." + (when (string-match "^\\(?:refs/\\)?remotes/\\([^/]+\\)/\\(.+\\)" rev) + (let* ((remote (match-string 1 rev)) + (branch (match-string 2 rev)) + (tracker-name (magit-get-tracking-name remote branch))) + (when tracker-name + (magit-run-git "checkout" "-b" tracker-name rev) + t)))) + +;;;###autoload +(defun magit-checkout (revision) + "Switch 'HEAD' to REVISION and update working tree. +Fails if working tree or staging area contain uncommitted changes. +If REVISION is a remote branch, offer to create a local tracking branch. +\('git checkout [-b] REVISION')." + (interactive + (list (let ((current-branch (magit-get-current-branch)) + (default (or (magit-guess-branch) + (magit-get-previous-branch)))) + (magit-read-rev (format "Switch from '%s' to" current-branch) + (unless (string= current-branch default) + default) + current-branch)))) + (or (magit-maybe-create-local-tracking-branch revision) + (progn + (magit-save-some-buffers) + (magit-run-git "checkout" revision)))) + +;;;###autoload +(defun magit-create-branch (branch parent) + "Switch 'HEAD' to new BRANCH at revision PARENT and update working tree. +Fails if working tree or staging area contain uncommitted changes. +\('git checkout -b BRANCH REVISION')." + (interactive + (list (read-string "Create branch: ") + (magit-read-rev "Parent" (or (magit-guess-branch) + (magit-get-current-branch))))) + (cond ((run-hook-with-args-until-success + 'magit-create-branch-hook branch parent)) + ((and branch (not (string= branch ""))) + (magit-save-some-buffers) + (magit-run-git "checkout" magit-custom-options + "-b" branch parent)))) + +;;;###autoload +(defun magit-delete-branch (branch &optional force) + "Delete the BRANCH. +If the branch is the current one, offers to switch to `master' first. +With prefix, forces the removal even if it hasn't been merged. +Works with local or remote branches. +\('git branch [-d|-D] BRANCH' or 'git push :refs/heads/BRANCH')." + (interactive (list (magit-read-rev "Branch to delete" + (or (magit-guess-branch) + (magit-get-previous-branch))) + current-prefix-arg)) + (if (string-match "^\\(?:refs/\\)?remotes/\\([^/]+\\)/\\(.+\\)" branch) + (magit-run-git-async "push" + (match-string 1 branch) + (concat ":" (match-string 2 branch))) + (let* ((current (magit-get-current-branch)) + (is-current (string= branch current)) + (is-master (string= branch "master")) + (args (list "branch" + (if force "-D" "-d") + branch))) + (cond + ((and is-current is-master) + (message "Cannot delete master branch while it's checked out.")) + (is-current + (if (y-or-n-p "Cannot delete current branch. Switch to master first? ") + (progn + (magit-checkout "master") + (magit-run-git args)) + (message "The current branch was not deleted."))) + (t + (magit-run-git args)))))) + +;;;###autoload +(defun magit-rename-branch (old new &optional force) + "Rename branch OLD to NEW. +With prefix, forces the rename even if NEW already exists. +\('git branch [-m|-M] OLD NEW')." + (interactive + (let* ((old (magit-read-rev-with-default "Old name")) + (new (read-string "New name: " old))) + (list old new current-prefix-arg))) + (if (or (null new) (string= new "") + (string= old new)) + (message "Cannot rename branch \"%s\" to \"%s\"." old new) + (magit-run-git "branch" (if force "-M" "-m") old new))) + +(defun magit-guess-branch () + "Return a branch name depending on the context of cursor. +If no branch is found near the cursor return nil." + (magit-section-case (info parent-info) + (branch info) + ([commit wazzup] parent-info) + ([commit ] (magit-name-rev info)) + ([ wazzup] info))) + +;;;;; Remoting + +;;;###autoload +(defun magit-add-remote (remote url) + "Add the REMOTE and fetch it. +\('git remote add REMOTE URL')." + (interactive (list (read-string "Remote name: ") + (read-string "Remote url: "))) + (magit-run-git-async "remote" "add" "-f" remote url)) + +;;;###autoload +(defun magit-remove-remote (remote) + "Delete the REMOTE. +\('git remote rm REMOTE')." + (interactive (list (magit-read-remote "Delete remote"))) + (magit-run-git "remote" "rm" remote)) + +;;;###autoload +(defun magit-rename-remote (old new) + "Rename remote OLD to NEW. +\('git remote rename OLD NEW')." + (interactive + (let* ((old (magit-read-remote "Old name")) + (new (read-string "New name: " old))) + (list old new))) + (if (or (null old) (string= old "") + (null new) (string= new "") + (string= old new)) + (message "Cannot rename remote \"%s\" to \"%s\"." old new) + (magit-run-git "remote" "rename" old new))) + +(defun magit-guess-remote () + (magit-section-case (info parent-info) + (remote info) + (branch parent-info) + (t (if (string= info ".") info (magit-get-current-remote))))) + +;;;;; Rebase + +(defun magit-rebase-info () + "Return a list indicating the state of an in-progress rebase. + +The returned list has the form (ONTO DONE TOTAL STOPPED AM). +ONTO is the commit being rebased onto. +DONE and TOTAL are integers with obvious meanings. +STOPPED is the SHA-1 of the commit at which rebase stopped. +AM is non-nil if the current rebase is actually a git-am. + +Return nil if there is no rebase in progress." + (let ((m (magit-git-dir "rebase-merge")) + (a (magit-git-dir "rebase-apply"))) + (cond + ((file-directory-p m) ; interactive + (list + (magit-name-rev (magit-file-line (expand-file-name "onto" m))) + (length (magit-file-lines (expand-file-name "done" m))) + (cl-loop for line in (magit-file-lines + (expand-file-name "git-rebase-todo.backup" m)) + count (string-match "^[^#\n]" line)) + (magit-file-line (expand-file-name "stopped-sha" m)) + nil)) + + ((file-regular-p (expand-file-name "onto" a)) ; non-interactive + (list + (magit-name-rev (magit-file-line (expand-file-name "onto" a))) + (1- (string-to-number (magit-file-line (expand-file-name "next" a)))) + (string-to-number (magit-file-line (expand-file-name "last" a))) + (let ((patch-header (magit-file-line + (car (directory-files a t "^[0-9]\\{4\\}$"))))) + (when (string-match "^From \\([a-z0-9]\\{40\\}\\) " patch-header) + (match-string 1 patch-header))) + nil)) + + ((file-regular-p (expand-file-name "applying" a)) ; am + (list + (magit-name-rev "HEAD") + (1- (string-to-number (magit-file-line (expand-file-name "next" a)))) + (string-to-number (magit-file-line (expand-file-name "last" a))) + (let ((patch-header (magit-file-line + (car (directory-files a t "^[0-9]\\{4\\}$"))))) + (when (string-match "^From \\([a-z0-9]\\{40\\}\\) " patch-header) + (match-string 1 patch-header))) + t))))) + +(defun magit-rebase-step () + "Initiate or continue a rebase." + (interactive) + (let ((rebase (magit-rebase-info))) + (if rebase + (let ((cursor-in-echo-area t) + (message-log-max nil) + (am (nth 4 rebase))) + (message "%s in progress. [A]bort, [S]kip, or [C]ontinue? " + (if am "Apply mailbox" "Rebase")) + (cl-case (read-event) + ((?A ?a) (magit-run-git-async (if am "am" "rebase") "--abort")) + ((?S ?s) (magit-run-git-async (if am "am" "rebase") "--skip")) + ((?C ?c) (magit-with-emacsclient magit-server-window-for-commit + (magit-run-git-async (if am "am" "rebase") "--continue"))))) + (let* ((branch (magit-get-current-branch)) + (rev (magit-read-rev + "Rebase to" + (magit-get-tracked-branch branch) + branch))) + (magit-run-git "rebase" rev))))) + +;;;###autoload +(defun magit-interactive-rebase (commit) + "Start a git rebase -i session, old school-style." + (interactive (let ((commit (magit-section-case (info) (commit info)))) + (list (if commit + (concat commit "^") + (magit-read-rev "Interactively rebase to" + (magit-guess-branch)))))) + (magit-assert-emacsclient "rebase interactively") + (magit-with-emacsclient magit-server-window-for-rebase + (magit-run-git-async "rebase" "-i" commit))) + +;;;;; AM + +(defun magit-apply-mailbox (&optional file-or-dir) + "Apply a series of patches from a mailbox." + (interactive "fmbox or Maildir file or directory: ") + (magit-with-emacsclient magit-server-window-for-rebase + (magit-run-git-async "am" file-or-dir))) + +;;;;; Reset + +;;;###autoload +(defun magit-reset-head (revision &optional hard) + "Switch 'HEAD' to REVISION, keeping prior working tree and staging area. +Any differences from REVISION become new changes to be committed. +With prefix argument, all uncommitted changes in working tree +and staging area are lost. +\('git reset [--soft|--hard] REVISION')." + (interactive (list (magit-read-rev (format "%s head to" + (if current-prefix-arg + "Hard reset" + "Reset")) + (or (magit-guess-branch) "HEAD")) + current-prefix-arg)) + (magit-run-git "reset" (if hard "--hard" "--soft") revision "--")) + +;;;###autoload +(defun magit-reset-head-hard (revision) + "Switch 'HEAD' to REVISION, losing all changes. +Uncomitted changes in both working tree and staging area are lost. +\('git reset --hard REVISION')." + (interactive (list (magit-read-rev (format "Hard reset head to") + (or (magit-guess-branch) "HEAD")))) + (magit-reset-head revision t)) + +;;;###autoload +(defun magit-reset-working-tree (&optional arg) + "Revert working tree and clear changes from staging area. +\('git reset --hard HEAD'). + +With a prefix arg, also remove untracked files. +With two prefix args, remove ignored files as well." + (interactive "p") + (let ((include-untracked (>= arg 4)) + (include-ignored (>= arg 16))) + (when (yes-or-no-p (format "Discard all uncommitted changes%s%s? " + (if include-untracked + ", untracked files" + "") + (if include-ignored + ", ignored files" + ""))) + (magit-reset-head-hard "HEAD") + (when include-untracked + (magit-run-git "clean" "-fd" (if include-ignored "-x" "")))))) + +;;;;; Rewriting + +(defun magit-read-rewrite-info () + (when (file-exists-p (magit-git-dir "magit-rewrite-info")) + (with-temp-buffer + (insert-file-contents (magit-git-dir "magit-rewrite-info")) + (goto-char (point-min)) + (read (current-buffer))))) + +(defun magit-write-rewrite-info (info) + (with-temp-file (magit-git-dir "magit-rewrite-info") + (prin1 info (current-buffer)) + (princ "\n" (current-buffer)))) + +(defun magit-rewrite-set-commit-property (commit prop value) + (let* ((info (magit-read-rewrite-info)) + (pending (cdr (assq 'pending info))) + (p (assoc commit pending))) + (when p + (setf (cdr p) (plist-put (cdr p) prop value)) + (magit-write-rewrite-info info) + (magit-refresh)) + t)) + +(add-hook 'magit-apply-hook 'magit-rewrite-apply) +(put 'magit-rewrite-apply 'magit-section-action-context [commit pending]) +(defun magit-rewrite-apply (commit) + (magit-apply-commit commit) + (magit-rewrite-set-commit-property commit 'used t)) + +(add-hook 'magit-cherry-pick-hook 'magit-rewrite-pick) +(put 'magit-rewrite-pick 'magit-section-action-context [commit pending]) +(defun magit-rewrite-pick (commit) + (magit-cherry-pick-commit commit) + (magit-rewrite-set-commit-property commit 'used t)) + +(add-hook 'magit-revert-hook 'magit-rewrite-revert) +(put 'magit-rewrite-revert 'magit-section-action-context [commit pending]) +(defun magit-rewrite-revert (commit) + (when (or (not magit-revert-item-confirm) + (yes-or-no-p "Revert this commit? ")) + (magit-revert-commit commit) + (magit-rewrite-set-commit-property commit 'used nil))) + +(defun magit-rewrite-set-used () + (interactive) + (magit-section-case (info) + ([commit pending] + (magit-rewrite-set-commit-property info 'used t) + (magit-refresh)))) + +(defun magit-rewrite-set-unused () + (interactive) + (magit-section-case (info) + ([commit pending] + (magit-rewrite-set-commit-property info 'used nil) + (magit-refresh)))) + +(defun magit-rewrite-start (from &optional onto) + (interactive (list (magit-read-rev-with-default "Rewrite from"))) + (when (magit-anything-modified-p) + (user-error "You have uncommitted changes")) + (or (not (magit-read-rewrite-info)) + (user-error "Rewrite in progress")) + (let* ((orig (magit-rev-parse "HEAD")) + (base (if (or (eq magit-rewrite-inclusive t) + (and (eq magit-rewrite-inclusive 'ask) + (y-or-n-p "Include selected revision in rewrite? "))) + (or (car (magit-commit-parents from)) + (user-error "Can't rewrite a parentless commit")) + from)) + (pending (magit-git-lines "rev-list" (concat base "..")))) + (magit-write-rewrite-info `((orig ,orig) + (pending ,@(mapcar #'list pending)))) + (magit-run-git "reset" "--hard" base "--"))) + +(defun magit-rewrite-stop (&optional noconfirm) + (interactive) + (let* ((info (magit-read-rewrite-info))) + (or info + (user-error "No rewrite in progress")) + (when (or noconfirm + (yes-or-no-p "Stop rewrite? ")) + (magit-write-rewrite-info nil) + (magit-refresh)))) + +(defun magit-rewrite-abort () + (interactive) + (let* ((info (magit-read-rewrite-info)) + (orig (cadr (assq 'orig info)))) + (or info + (user-error "No rewrite in progress")) + (when (magit-anything-modified-p) + (user-error "You have uncommitted changes")) + (when (yes-or-no-p "Abort rewrite? ") + (magit-write-rewrite-info nil) + (magit-run-git "reset" "--hard" orig "--")))) + +(defun magit-rewrite-finish () + (interactive) + (magit-rewrite-finish-step) + (magit-refresh)) + +(defun magit-rewrite-finish-step () + (let ((info (magit-read-rewrite-info))) + (or info + (user-error "No rewrite in progress")) + (let* ((pending (cdr (assq 'pending info))) + (first-unused + (let ((rpend (reverse pending))) + (while (and rpend (plist-get (cdr (car rpend)) 'used)) + (setq rpend (cdr rpend))) + (car rpend))) + (commit (car first-unused))) + (cond ((not first-unused) + (magit-rewrite-stop t)) + ((magit-git-success "cherry-pick" commit) + (magit-rewrite-set-commit-property commit 'used t) + (magit-rewrite-finish-step)) + (t + (magit-refresh) + (error "Could not apply %s" commit)))))) + +(defun magit-rewrite-diff-pending () + (interactive) + (let* ((info (magit-read-rewrite-info)) + (orig (cadr (assq 'orig info)))) + (if orig + (magit-diff orig nil "-R") + (user-error "No rewrite in progress")))) + +(defun magit-rewrite-diff-pending-transition () + (interactive) + (message "Please remove magit-insert-pending-changes from your magit-status-sections-hook, or move to magit-rewrite-diff-pending")) + +(define-obsolete-function-alias + 'magit-insert-pending-changes 'magit-rewrite-diff-pending-transition + "382351845e" + "https://github.com/magit/magit/commit/382351845eca2425713f640f9bb55756c9ddf723") + +;;;;; Fetching + +;;;###autoload +(defun magit-fetch (remote) + "Fetch from REMOTE." + (interactive (list (magit-read-remote "Fetch remote"))) + (magit-run-git-async "fetch" remote magit-custom-options)) + +;;;###autoload +(defun magit-fetch-current () + "Run fetch for default remote. + +If there is no default remote, ask for one." + (interactive) + (magit-fetch (or (magit-get-current-remote) + (magit-read-remote "Fetch remote")))) + +;;;###autoload +(defun magit-remote-update () + "Update all remotes." + (interactive) + (or (run-hook-with-args-until-success 'magit-remote-update-hook) + (magit-run-git-async "remote" "update" magit-custom-options))) + +;;;;; Pulling + +;;;###autoload +(defun magit-pull () + "Run git pull. + +If there is no default remote, the user is prompted for one and +its values is saved with git config. If there is no default +merge branch, the user is prompted for one and its values is +saved with git config. With a prefix argument, the default +remote is not used and the user is prompted for a remote. With +two prefix arguments, the default merge branch is not used and +the user is prompted for a merge branch. Values entered by the +user because of prefix arguments are not saved with git config." + (interactive) + (or (run-hook-with-args-until-success 'magit-pull-hook) + (let* ((branch (magit-get-current-branch)) + (branch-remote (magit-get-remote branch)) + (branch-merge (magit-get "branch" branch "merge")) + (branch-merge-name (and branch-merge + (save-match-data + (string-match "^refs/heads/\\(.+\\)" branch-merge) + (match-string 1 branch-merge)))) + (choose-remote (>= (prefix-numeric-value current-prefix-arg) 4)) + (choose-branch (>= (prefix-numeric-value current-prefix-arg) 16)) + (remote-needed (or choose-remote + (not branch-remote))) + (branch-needed (or choose-branch + (not branch-merge-name))) + (chosen-branch-remote + (if remote-needed + (magit-read-remote "Pull from remote" branch-remote) + branch-remote)) + (chosen-branch-merge-name + (if branch-needed + (magit-read-remote-branch (format "Pull branch from remote %s" + chosen-branch-remote) + chosen-branch-remote) + branch-merge-name))) + (when (and (not branch-remote) + (not choose-remote)) + (magit-set chosen-branch-remote "branch" branch "remote")) + (when (and (not branch-merge-name) + (not choose-branch)) + (magit-set (format "%s" chosen-branch-merge-name) + "branch" branch "merge")) + (magit-run-git-async + "pull" magit-custom-options + (and choose-remote chosen-branch-remote) + (and (or choose-remote choose-branch) + (list (format "refs/heads/%s:refs/remotes/%s/%s" + chosen-branch-merge-name + chosen-branch-remote + chosen-branch-merge-name))))))) + +;;;;; Pushing + +;;;###autoload +(defun magit-push-tags () + "Push tags to a remote repository. + +Push tags to the current branch's remote. If that isn't set push +to \"origin\" or if that remote doesn't exit but only a single +remote is defined use that. Otherwise or with a prefix argument +ask the user what remote to use." + (interactive) + (let* ((branch (magit-get-current-branch)) + (remotes (magit-git-lines "remote")) + (remote (or (and branch (magit-get-remote branch)) + (car (member "origin" remotes)) + (and (= (length remotes) 1) + (car remotes))))) + (when (or current-prefix-arg (not remote)) + (setq remote (magit-read-remote "Push to remote"))) + (magit-run-git-async "push" remote "--tags" magit-custom-options))) + +;;;###autoload +(defun magit-push () + "Push the current branch to a remote repository. + +This command runs the `magit-push-remote' hook. By default that +means running `magit-push-dwim'. So unless you have customized +the hook this command behaves like this: + +With a single prefix argument ask the user what branch to push +to. With two or more prefix arguments also ask the user what +remote to push to. Otherwise use the remote and branch as +configured using the Git variables `branch..remote' and +`branch..merge'. If the former is undefined ask the user. +If the latter is undefined push without specifing the remote +branch explicitly. + +Also see option `magit-set-upstream-on-push'." + (interactive) + (run-hook-with-args-until-success 'magit-push-hook current-prefix-arg)) + +(defun magit-push-dwim (arg) + "Push the current branch to a remote repository. + +With a single prefix argument ask the user what remote to push +to. With two or more prefix arguments also ask the user the +name of the remote branch to push to. + +Otherwise use the remote and branch as configured using the +Git variables `branch..remote' and `branch..merge'. +If the former is undefined ask the user. If the latter is +undefined push without specifing the remote branch explicitly. + +Also see option `magit-set-upstream-on-push'." + (interactive "P") + (let* ((branch (or (magit-get-current-branch) + (user-error "Don't push a detached head. That's gross"))) + (auto-remote (magit-get-remote branch)) + (used-remote (if (or arg (not auto-remote)) + (magit-read-remote + (format "Push %s to remote" branch) auto-remote) + auto-remote)) + (auto-branch (and (equal used-remote auto-remote) + (magit-get "branch" branch "merge"))) + (used-branch (if (>= (prefix-numeric-value arg) 16) + (magit-read-remote-branch + (format "Push %s as branch" branch) + used-remote auto-branch) + auto-branch))) + (cond ;; Pushing to what's already configured. + ((and auto-branch + (equal auto-branch used-branch) + (equal auto-remote used-remote))) + ;; Setting upstream because of magit-custom-options. + ((member "-u" magit-custom-options)) + ;; Two prefix arguments; ignore magit-set-upstream-on-push. + ((>= (prefix-numeric-value arg) 16) + (and (yes-or-no-p "Set upstream while pushing? ") + (setq magit-custom-options + (cons "-u" magit-custom-options)))) + ;; Else honor magit-set-upstream-on-push. + ((eq magit-set-upstream-on-push 'refuse) + (user-error "Not pushing since no upstream has been set.")) + ((or (eq magit-set-upstream-on-push 'dontask) + (and (eq magit-set-upstream-on-push t) + (yes-or-no-p "Set upstream while pushing? "))) + (setq magit-custom-options (cons "-u" magit-custom-options)))) + (magit-run-git-async + "push" "-v" used-remote + (if used-branch (format "%s:%s" branch used-branch) branch) + magit-custom-options))) + +;;;;; Committing + +;;;###autoload +(defun magit-commit (&optional amendp) + "Create a new commit on HEAD. +With a prefix argument amend to the commit at HEAD instead. +\('git commit [--amend]')." + (interactive "P") + (let ((args magit-custom-options)) + (when amendp + (setq args (cons "--amend" args))) + (when (setq args (magit-commit-assert args)) + (magit-commit-maybe-expand) + (magit-commit-internal "commit" args)))) + +;;;###autoload +(defun magit-commit-amend () + "Amend the last commit. +\('git commit --amend')." + (interactive) + (magit-commit-maybe-expand) + (magit-commit-internal "commit" (cons "--amend" magit-custom-options))) + +;;;###autoload +(defun magit-commit-extend (&optional override-date) + "Amend the last commit, without editing the message. +With a prefix argument do change the committer date, otherwise +don't. The option `magit-commit-extend-override-date' can be +used to inverse the meaning of the prefix argument. +\('git commit --no-edit --amend [--keep-date]')." + (interactive (list (if current-prefix-arg + (not magit-commit-reword-override-date) + magit-commit-reword-override-date))) + (magit-commit-maybe-expand) + (let ((process-environment process-environment)) + (unless override-date + (setenv "GIT_COMMITTER_DATE" + (magit-git-string "log" "-1" "--format:format=%cd"))) + (magit-commit-internal "commit" (nconc (list "--no-edit" "--amend") + magit-custom-options)))) + +;;;###autoload +(defun magit-commit-reword (&optional override-date) + "Reword the last commit, ignoring staged changes. + +With a prefix argument do change the committer date, otherwise +don't. The option `magit-commit-rewrite-override-date' can be +used to inverse the meaning of the prefix argument. + +Non-interactively respect the optional OVERRIDE-DATE argument +and ignore the option. + +\('git commit --only --amend')." + (interactive (list (if current-prefix-arg + (not magit-commit-reword-override-date) + magit-commit-reword-override-date))) + (let ((process-environment process-environment)) + (unless override-date + (setenv "GIT_COMMITTER_DATE" + (magit-git-string "log" "-1" "--format:format=%cd"))) + (magit-commit-internal "commit" (nconc (list "--only" "--amend") + magit-custom-options)))) + +(defvar-local magit-commit-squash-args nil) +(defvar-local magit-commit-squash-fixup nil) + +(defvar magit-commit-unmark-after-squash t) + +;;;###autoload +(defun magit-commit-fixup (&optional commit) + "Create a fixup commit. +With a prefix argument the user is always queried for the commit +to be fixed. Otherwise the current or marked commit may be used +depending on the value of option `magit-commit-squash-commit'. +\('git commit [--no-edit] --fixup=COMMIT')." + (interactive (list (magit-commit-squash-commit))) + (magit-commit-squash commit t)) + +;;;###autoload +(defun magit-commit-squash (&optional commit fixup) + "Create a squash commit. +With a prefix argument the user is always queried for the commit +to be fixed. Otherwise the current or marked commit may be used +depending on the value of option `magit-commit-squash-commit'. +\('git commit [--no-edit] --fixup=COMMIT')." + (interactive (list (magit-commit-squash-commit))) + (let ((args magit-custom-options)) + (cond + ((not commit) + (magit-commit-assert args) + (magit-log) + (setq magit-commit-squash-args args + magit-commit-squash-fixup fixup) + (add-hook 'magit-mark-commit-hook 'magit-commit-squash-marked t t) + (add-hook 'magit-mode-quit-window-hook 'magit-commit-squash-abort t t) + (message "Select commit using \".\", or abort using \"q\"")) + ((setq args (magit-commit-assert args)) + (when (eq args t) (setq args nil)) + (magit-commit-internal + "commit" + (nconc (list "--no-edit" + (concat (if fixup "--fixup=" "--squash=") commit)) + args)))))) + +(defun magit-commit-squash-commit () + (unless (or current-prefix-arg + (eq magit-commit-squash-commit nil)) + (let ((current (magit-section-case (info) (commit info)))) + (cl-ecase magit-commit-squash-commit + (current-or-marked (or current magit-marked-commit)) + (marked-or-current (or magit-marked-commit current)) + (current current) + (marked magit-marked-commit))))) + +(defun magit-commit-squash-marked () + (when magit-marked-commit + (magit-commit-squash magit-marked-commit magit-commit-squash-fixup)) + (when magit-commit-unmark-after-squash + (setq magit-marked-commit nil)) + (kill-local-variable 'magit-commit-squash-fixup) + (remove-hook 'magit-mark-commit-hook 'magit-commit-squash-marked t) + (remove-hook 'magit-mode-quit-window-hook 'magit-commit-squash-abort t) + (magit-mode-quit-window)) + +(defun magit-commit-squash-abort (buffer) + (when (buffer-live-p buffer) + (with-current-buffer buffer + (remove-hook 'magit-mark-commit-hook 'magit-commit-squash-marked t) + (remove-hook 'magit-mode-quit-window-hook 'magit-commit-squash-abort t)))) + +(defun magit-commit-assert (args) + (cond + ((or (magit-anything-staged-p) + (member "--allow-empty" args) + (member "--all" args) + (member "--amend" args)) + (or args (list "--"))) + ((and (magit-rebase-info) + (y-or-n-p "Nothing staged. Continue in-progress rebase? ")) + (magit-run-git-async "rebase" "--continue") + nil) + (magit-commit-ask-to-stage + (magit-commit-maybe-expand t) + (when (y-or-n-p "Nothing staged. Stage and commit everything? ") + (magit-run-git "add" "-u" ".") + (or args (list "--")))) + (t + (user-error "Nothing staged. Set --allow-empty, --all, or --amend in popup")))) + +(defun magit-commit-maybe-expand (&optional unstaged) + (when (and magit-expand-staged-on-commit + (derived-mode-p 'magit-status-mode)) + (if unstaged + (magit-jump-to-unstaged t) + (magit-jump-to-staged t)))) + +(defun magit-commit-internal (subcmd args) + (setq git-commit-previous-winconf (current-window-configuration)) + (if (magit-use-emacsclient-p) + (magit-with-emacsclient magit-server-window-for-commit + (magit-run-git-async subcmd args)) + (let ((topdir (magit-get-top-dir)) + (editmsg (magit-git-dir (if (equal subcmd "tag") + "TAG_EDITMSG" + "COMMIT_EDITMSG")))) + (when (and (member "--amend" args) + (not (file-exists-p editmsg))) + (with-temp-file editmsg + (magit-git-insert "log" "-1" "--format=format:%B" "HEAD"))) + (with-current-buffer (find-file-noselect editmsg) + (funcall (if (functionp magit-server-window-for-commit) + magit-server-window-for-commit + 'switch-to-buffer) + (current-buffer)) + (add-hook 'git-commit-commit-hook + (apply-partially + (lambda (default-directory editmsg args) + (magit-run-git args) + (ignore-errors (delete-file editmsg))) + topdir editmsg + `(,subcmd + ,"--cleanup=strip" + ,(concat "--file=" (file-relative-name + (buffer-file-name) + topdir)) + ,@args)) + nil t))))) + +(defun magit-commit-add-log () + "Add a template for the current hunk to the commit message buffer." + (interactive) + (let* ((section (magit-current-section)) + (fun (if (eq (magit-section-type section) 'hunk) + (save-window-excursion + (save-excursion + (magit-visit-item) + (add-log-current-defun))) + nil)) + (file (magit-section-info + (cl-case (magit-section-type section) + (hunk (magit-section-parent section)) + (diff section) + (t (user-error "No change at point"))))) + (locate-buffer (lambda () + (cl-find-if + (lambda (buf) + (with-current-buffer buf + (derived-mode-p 'git-commit-mode))) + (append (buffer-list (selected-frame)) + (buffer-list))))) + (buffer (funcall locate-buffer))) + (unless buffer + (unless (magit-commit-assert nil) + (user-error "Abort")) + (magit-commit) + (while (not (setq buffer (funcall locate-buffer))) + (sit-for 0.01))) + (pop-to-buffer buffer) + (goto-char (point-min)) + (cond ((not (re-search-forward (format "^\\* %s" (regexp-quote file)) + nil t)) + ;; No entry for file, create it. + (goto-char (point-max)) + (forward-comment -1000) + (unless (or (bobp) (looking-back "\\(\\*[^\n]+\\|\n\\)")) + (insert "\n")) + (insert (format "\n* %s" file)) + (when fun + (insert (format " (%s)" fun))) + (insert ": ")) + (fun + ;; found entry for file, look for fun + (let ((limit (save-excursion + (or (and (re-search-forward "^\\* " nil t) + (match-beginning 0)) + (progn (goto-char (point-max)) + (forward-comment -1000) + (point)))))) + (cond ((re-search-forward + (format "(.*\\_<%s\\_>.*):" (regexp-quote fun)) + limit t) + ;; found it, goto end of current entry + (if (re-search-forward "^(" limit t) + (backward-char 2) + (goto-char limit))) + (t + ;; not found, insert new entry + (goto-char limit) + (if (bolp) + (open-line 1) + (newline)) + (insert (format "(%s): " fun)))))) + (t + ;; found entry for file, look for beginning it + (when (looking-at ":") + (forward-char 2)))))) + +;;;;; Tagging + +;;;###autoload +(defun magit-tag (name rev &optional annotate) + "Create a new tag with the given NAME at REV. +With a prefix argument annotate the tag. +\('git tag [--annotate] NAME REV')." + (interactive (list (magit-read-tag "Tag name") + (magit-read-rev "Place tag on" + (or (magit-guess-branch) "HEAD")) + current-prefix-arg)) + (let ((args (append magit-custom-options (list name rev)))) + (if (or (member "--sign" args) + (member "--annotate" args) + (and annotate (setq args (cons "--annotate" args)))) + (magit-commit-internal "tag" args) + (magit-run-git "tag" args)))) + +;;;###autoload +(defun magit-delete-tag (name) + "Delete the tag with the given NAME. +\('git tag -d NAME')." + (interactive (list (magit-read-tag "Delete Tag" t))) + (magit-run-git "tag" "-d" magit-custom-options name)) + +;;;;; Stashing + +(defvar magit-read-stash-history nil + "The history of inputs to `magit-stash'.") + +;;;###autoload +(defun magit-stash (description) + "Create new stash of working tree and staging area named DESCRIPTION. +Working tree and staging area revert to the current 'HEAD'. +With prefix argument, changes in staging area are kept. +\('git stash save [--keep-index] DESCRIPTION')" + (interactive (list (read-string "Stash description: " nil + 'magit-read-stash-history))) + (magit-run-git "stash" "save" magit-custom-options "--" description)) + +;;;###autoload +(defun magit-stash-snapshot () + "Create new stash of working tree and staging area; keep changes in place. +\('git stash save \"Snapshot...\"; git stash apply stash@{0}')" + (interactive) + (magit-call-git "stash" "save" magit-custom-options + (format-time-string + "Snapshot taken at %Y-%m-%d %H:%M:%S" + (current-time))) + (magit-run-git "stash" "apply" "stash@{0}")) + +(defun magit-stash-apply (stash) + "Apply a stash on top of the current working tree state. +\('git stash apply stash@{N}')" + (interactive (list (magit-read-stash "Apply stash (number): "))) + (magit-run-git "stash" "apply" stash)) + +(defun magit-stash-pop (stash) + "Apply a stash on top of working tree state and remove from stash list. +\('git stash pop stash@{N}')" + (interactive (list (magit-read-stash "Pop stash (number): "))) + (magit-run-git "stash" "pop" stash)) + +(defun magit-stash-drop (stash) + "Remove a stash from the stash list. +\('git stash drop stash@{N}')" + (interactive (list (magit-read-stash "Drop stash (number): "))) + (magit-run-git "stash" "drop" stash)) + +;;;;; Cherry-Pick + +(defun magit-cherry-pick-item () + "Cherry-pick them item at point." + (interactive) + (magit-section-action cherry-pick (info) + (commit (magit-cherry-pick-commit info)) + (stash (magit-stash-pop info)))) + +(defun magit-cherry-pick-commit (commit) + (magit-assert-one-parent commit "cherry-pick") + (magit-run-git "cherry-pick" commit)) + +;;;;; Submoduling + +;;;###autoload +(defun magit-submodule-update (&optional init) + "Update the submodule of the current git repository. +With a prefix arg, do a submodule update --init." + (interactive "P") + (let ((default-directory (magit-get-top-dir))) + (magit-run-git-async "submodule" "update" (and init "--init")))) + +;;;###autoload +(defun magit-submodule-update-init () + "Update and init the submodule of the current git repository." + (interactive) + (magit-submodule-update t)) + +;;;###autoload +(defun magit-submodule-init () + "Initialize the submodules." + (interactive) + (let ((default-directory (magit-get-top-dir))) + (magit-run-git-async "submodule" "init"))) + +;;;###autoload +(defun magit-submodule-sync () + "Synchronizes submodule's remote URL configuration." + (interactive) + (let ((default-directory (magit-get-top-dir))) + (magit-run-git-async "submodule" "sync"))) + +;;;;; Bisecting + +;;;###autoload +(defun magit-bisect-start (bad good) + "Start a bisect session. + +Bisecting a bug means to find the commit that introduced it. +This command starts such a bisect session by asking for a know +good and a bad commit. To move the session forward use the +other actions from the bisect popup (\ +\\\\[magit-key-mode-popup-bisecting])." + (interactive + (if (magit-bisecting-p) + (user-error "Already bisecting") + (list (magit-read-rev "Start bisect with known bad revision" "HEAD") + (magit-read-rev "Good revision" (magit-guess-branch))))) + (magit-run-git-bisect "start" (list bad good) t)) + +;;;###autoload +(defun magit-bisect-reset () + "After bisecting cleanup bisection state and return to original HEAD." + (interactive) + (when (yes-or-no-p "Reset bisect?") + (magit-run-git "bisect" "reset") + (ignore-errors (delete-file (magit-git-dir "BISECT_CMD_OUTPUT"))))) + +;;;###autoload +(defun magit-bisect-good () + "While bisecting, mark the current commit as good. +Use this after you have asserted that the commit does not contain +the bug in question." + (interactive) + (magit-run-git-bisect "good")) + +;;;###autoload +(defun magit-bisect-bad () + "While bisecting, mark the current commit as bad. +Use this after you have asserted that the commit does contain the +bug in question." + (interactive) + (magit-run-git-bisect "bad")) + +;;;###autoload +(defun magit-bisect-skip () + "While bisecting, skip the current commit. +Use this if for some reason the current commit is not a good one +to test. This command lets Git choose a different one." + (interactive) + (magit-run-git-bisect "skip")) + +;;;###autoload +(defun magit-bisect-run (cmdline) + "Bisect automatically by running commands after each step." + (interactive (list (read-shell-command "Bisect shell command: "))) + (magit-run-git-bisect "run" (list cmdline))) + +(defun magit-run-git-bisect (subcommand &optional args no-assert) + (unless (or no-assert (magit-bisecting-p)) + (user-error "Not bisecting")) + (let ((file (magit-git-dir "BISECT_CMD_OUTPUT")) + (default-directory (magit-get-top-dir))) + (ignore-errors (delete-file file)) + (magit-run-git-with-logfile file "bisect" subcommand args) + (magit-process-wait) + (magit-refresh))) + +;;;;; Logging + +;;;###autoload +(defun magit-log (&optional range) + (interactive) + (unless range (setq range "HEAD")) + (magit-mode-setup magit-log-buffer-name nil + #'magit-log-mode + #'magit-refresh-log-buffer + 'oneline range magit-custom-options)) + +;;;###autoload +(defun magit-log-ranged (range) + (interactive (list (magit-read-rev-range "Log" "HEAD"))) + (magit-log range)) + +;;;###autoload +(defun magit-log-long (&optional range) + (interactive) + (unless range (setq range "HEAD")) + (magit-mode-setup magit-log-buffer-name nil + #'magit-log-mode + #'magit-refresh-log-buffer + 'long range magit-custom-options)) + +;;;###autoload +(defun magit-log-long-ranged (range) + (interactive (list (magit-read-rev-range "Long Log" "HEAD"))) + (magit-log-long range)) + +;;;###autoload +(defun magit-file-log (file &optional use-graph) + "Display the log for the currently visited file or another one. +With a prefix argument show the log graph." + (interactive + (list (magit-read-file-from-rev (magit-get-current-branch) + (magit-buffer-file-name t)) + current-prefix-arg)) + (magit-mode-setup magit-log-buffer-name nil + #'magit-log-mode + #'magit-refresh-log-buffer + 'oneline "HEAD" + `(,@(and use-graph (list "--graph")) + ,@magit-custom-options + "--follow") + file)) + +;;;###autoload +(defun magit-reflog (ref) + "Display the reflog of the current branch. +With a prefix argument another branch can be chosen." + (interactive (let ((branch (magit-get-current-branch))) + (if (and branch (not current-prefix-arg)) + (list branch) + (list (magit-read-rev "Reflog of" branch))))) + (magit-mode-setup magit-reflog-buffer-name nil + #'magit-reflog-mode + #'magit-refresh-reflog-buffer ref)) + +;;;###autoload +(defun magit-reflog-head () + "Display the HEAD reflog." + (interactive) + (magit-reflog "HEAD")) + +;;; Modes (2) +;;;; Log Mode +;;;;; Log Core + +(define-derived-mode magit-log-mode magit-mode "Magit Log" + "Mode for looking at git log. + +\\Type `\\[magit-visit-item]` to visit a commit, and \ +`\\[magit-show-item-or-scroll-up]` to just show it. +Type `\\[magit-log-show-more-entries]` to show more commits, \ +and `\\[magit-refresh]` to refresh the log. +Type `\\[magit-diff-working-tree]` to see the diff between current commit and your working tree, +Type `\\[magit-diff]` to see diff between any two version +Type `\\[magit-apply-item]` to apply the change of the current commit to your wortree, +and `\\[magit-cherry-pick-item]` to apply and commit the result. +Type `\\[magit-revert-item]` to revert a commit, and `\\[magit-reset-head]` reset your current head to a commit, + +More information can be found in Info node `(magit)History' + +Other key binding: +\\{magit-log-mode-map}" + :group 'magit) + +(defvar magit-log-buffer-name "*magit-log*" + "Name of buffer used to display log entries.") + +(defun magit-refresh-log-buffer (style range args &optional file) + (magit-set-buffer-margin (car magit-log-margin-spec) + (and magit-log-show-margin + (eq (car magit-refresh-args) 'oneline))) + (magit-log-margin-set-timeunit-width) + (setq magit-file-log-file file) + (when (consp range) + (setq range (concat (car range) ".." (cdr range)))) + (magit-git-insert-section + (logbuf (concat "Commits" + (and file (concat " for file " file)) + (and range (concat " in " range)))) + (apply-partially 'magit-wash-log style 'color t) + "log" + (format "--max-count=%d" magit-log-cutoff-length) + "--decorate=full" "--color" + (cl-case style + (long (if magit-log-show-gpg-status + (list "--stat" "--show-signature") + "--stat")) + (oneline (concat "--pretty=format:%h%d " + (and magit-log-show-gpg-status "%G?") + "[%an][%at]%s"))) + args range "--" file) + (save-excursion + (goto-char (point-min)) + (magit-format-log-margin))) + +;;;;; Log Washing + +(defconst magit-log-oneline-re + (concat "^" + "\\(?4:\\(?:[-_/|\\*o.] *\\)+ *\\)?" ; graph + "\\(?:" + "\\(?1:[0-9a-fA-F]+\\) " ; sha1 + "\\(?:\\(?3:([^()]+)\\) \\)?" ; refs + "\\(?7:[BGUN]\\)?" ; gpg + "\\[\\(?5:[^]]*\\)\\]" ; author + "\\[\\(?6:[^]]*\\)\\]" ; date + "\\(?2:.*\\)" ; msg + "\\)?$")) + +(defconst magit-log-long-re + (concat "^" + "\\(?4:\\(?:[-_/|\\*o.] *\\)+ *\\)?" ; graph + "\\(?:" + "\\(?:commit \\(?1:[0-9a-fA-F]+\\)" ; sha1 + "\\(?: \\(?3:([^()]+)\\)\\)?\\)" ; refs + "\\|" + "\\(?2:.+\\)\\)$")) ; "msg" + +(defconst magit-log-unique-re + (concat "^" + "\\(?1:[0-9a-fA-F]+\\) " ; sha1 + "\\(?2:.*\\)$")) ; msg + +(defconst magit-log-cherry-re + (concat "^" + "\\(?8:[-+]\\) " ; cherry + "\\(?1:[0-9a-fA-F]+\\) " ; sha1 + "\\(?2:.*\\)$")) ; msg + +(defconst magit-log-bisect-vis-re + (concat "^" + "\\(?1:[0-9a-fA-F]+\\) " ; sha1 + "\\(?:\\(?3:([^()]+)\\) \\)?" ; refs + "\\(?2:.+\\)$")) ; msg + +(defconst magit-log-bisect-log-re + (concat "^# " + "\\(?3:bad:\\|skip:\\|good:\\) " ; "refs" + "\\[\\(?1:[^]]+\\)\\] " ; sha1 + "\\(?2:.+\\)$")) ; msg + +(defconst magit-log-reflog-re + (concat "^" + "\\(?1:[^ ]+\\) " ; sha1 + "\\[\\(?5:[^]]*\\)\\] " ; author + "\\(?6:[^ ]*\\) " ; date + "[^@]+@{\\(?9:[^}]+\\)} " ; refsel + "\\(?10:merge\\|[^:]+\\)?:? ?" ; refsub + "\\(?2:.+\\)?$")) ; msg + +(defconst magit-reflog-subject-re + (concat "\\([^ ]+\\) ?" ; command (1) + "\\(\\(?: ?-[^ ]+\\)+\\)?" ; option (2) + "\\(?: ?(\\([^)]+\\))\\)?")) ; type (3) + +(defvar magit-log-count nil) + +(defun magit-wash-log (style &optional color longer) + (when color + (let ((ansi-color-apply-face-function + (lambda (beg end face) + (when face + (put-text-property beg end 'font-lock-face face))))) + (ansi-color-apply-on-region (point-min) (point-max)))) + (when (eq style 'cherry) + (reverse-region (point-min) (point-max))) + (let ((magit-log-count 0)) + (magit-wash-sequence (apply-partially 'magit-wash-log-line style + (magit-abbrev-length))) + (when (and longer + (= magit-log-count magit-log-cutoff-length)) + (magit-with-section (section longer 'longer) + (insert-text-button "type \"e\" to show more history" + 'action (lambda (button) + (magit-log-show-more-entries)) + 'follow-link t + 'mouse-face magit-item-highlight-face))))) + +(defun magit-wash-log-line (style abbrev) + (looking-at (cl-ecase style + (oneline magit-log-oneline-re) + (long magit-log-long-re) + (unique magit-log-unique-re) + (cherry magit-log-cherry-re) + (reflog magit-log-reflog-re) + (bisect-vis magit-log-bisect-vis-re) + (bisect-log magit-log-bisect-log-re))) + (magit-bind-match-strings + (hash msg refs graph author date gpg cherry refsel refsub) + (delete-region (point) (point-at-eol)) + (when cherry + (magit-insert cherry (if (string= cherry "-") + 'magit-cherry-equivalent + 'magit-cherry-unmatched) ?\s)) + (unless (eq style 'long) + (when (eq style 'bisect-log) + (setq hash (magit-git-string "rev-parse" "--short" hash))) + (if hash + (insert (propertize hash 'face 'magit-log-sha1) ?\s) + (insert (make-string (1+ abbrev) ? )))) + (when graph + (if magit-log-format-graph-function + (insert (funcall magit-log-format-graph-function graph)) + (insert graph))) + (when (and hash (eq style 'long)) + (magit-insert (if refs hash (magit-rev-parse hash)) 'magit-log-sha1 ?\s)) + (when refs + (magit-insert-ref-labels refs)) + (when refsub + (insert (format "%-2s " refsel)) + (insert (magit-log-format-reflog refsub))) + (when msg + (magit-insert msg (cl-case (and gpg (aref gpg 0)) + (?G 'magit-signature-good) + (?B 'magit-signature-bad) + (?U 'magit-signature-untrusted) + (?N 'magit-signature-none) + (t 'magit-log-message)))) + (goto-char (line-beginning-position)) + (magit-format-log-margin author date) + (if hash + (magit-with-section (section commit hash) + (when (derived-mode-p 'magit-log-mode) + (cl-incf magit-log-count)) + (forward-line) + (when (eq style 'long) + (magit-wash-sequence + (lambda () + (looking-at magit-log-long-re) + (when (match-string 2) + (magit-wash-log-line 'long abbrev)))))) + (forward-line))) + t) + +(defun magit-log-format-unicode-graph (string) + "Translate ascii characters to unicode characters. +Whether that actually is an improvment depends on the unicode +support of the font in use. The translation is done using the +alist in `magit-log-format-unicode-graph-alist'." + (replace-regexp-in-string + "[/|\\*o ]" + (lambda (str) + (propertize + (string (or (cdr (assq (aref str 0) + magit-log-format-unicode-graph-alist)) + (aref str 0))) + 'face (get-text-property 0 'face str))) + string)) + +(defun magit-format-log-margin (&optional author date) + (when magit-log-show-margin + (cl-destructuring-bind (width characterp duration-spec) + magit-log-margin-spec + (if author + (magit-make-margin-overlay + (propertize (truncate-string-to-width + author (- width 1 3 (if characterp 0 1) + magit-log-margin-timeunit-width 1) + nil ?\s (make-string 1 magit-ellipsis)) + 'face 'magit-log-author) + " " + (propertize (magit-format-duration + (abs (truncate (- (float-time) + (string-to-number date)))) + (symbol-value duration-spec) + magit-log-margin-timeunit-width) + 'face 'magit-log-date) + (propertize " " 'face 'fringe)) + (magit-make-margin-overlay + (propertize (make-string (1- width) ?\s) 'face 'default) + (propertize " " 'face 'fringe)))))) + +;;;;; Log Commands + +(defun magit-log-toggle-margin () + "Show or hide the log margin. +This command can only be used inside log buffers (usually +*magit-log*) and only if that displays a `oneline' log. +Also see option `magit-log-show-margin'." + (interactive) + (unless (derived-mode-p 'magit-log-mode) + (user-error "The log margin cannot be used outside of log buffers")) + (when (eq (car magit-refresh-args) 'long) + (user-error "The log margin cannot be used with verbose logs")) + (if magit-log-show-margin + (magit-set-buffer-margin (car magit-log-margin-spec) + (not (cdr (window-margins)))) + (setq-local magit-log-show-margin t) + (magit-refresh))) + +(defun magit-log-show-more-entries (&optional arg) + "Grow the number of log entries shown. + +With no prefix optional ARG, show twice as many log entries. +With a numerical prefix ARG, add this number to the number of shown log entries. +With a non numeric prefix ARG, show all entries" + (interactive "P") + (setq-local magit-log-cutoff-length + (cond ((numberp arg) (+ magit-log-cutoff-length arg)) + (arg magit-log-infinite-length) + (t (* magit-log-cutoff-length 2)))) + (let ((old-point (point))) + (magit-refresh) + (goto-char old-point))) + +;;;; Cherry Mode + +(define-derived-mode magit-cherry-mode magit-mode "Magit Cherry" + "Mode for looking at commits not merged upstream. + +\\Type `\\[magit-toggle-section]` to show or hide \ +section, `\\[magit-visit-item]` to visit an item and \ +`\\[magit-show-item-or-scroll-up]` to show it. +Type `\\[magit-diff-working-tree]` to display change with your working tree, \ +when `\\[magit-diff]` to display change +between any two commit. +Type `\\[magit-cherry-pick-item]` to cherry-pick a commit, and \ +`\\[magit-apply-item]` to apply its change to your +working tree, without committing, and `\\[magit-key-mode-popup-merging]` to \ +merge. +`\\[magit-refresh]` will refresh current buffer. + + +Other key binding: +\\{magit-cherry-mode-map}") + +(defvar magit-cherry-buffer-name "*magit-cherry*" + "Name of buffer used to display commits not merged upstream.") + +;;;###autoload +(defun magit-cherry (head upstream) + "Show commits in a branch that are not merged in the upstream branch." + (interactive + (let ((head (magit-read-rev "Cherry head" (magit-get-current-branch)))) + (list head (magit-read-rev "Cherry upstream" + (magit-get-tracked-branch head nil t))))) + (magit-mode-setup magit-cherry-buffer-name nil + #'magit-cherry-mode + #'magit-refresh-cherry-buffer upstream head)) + +(defun magit-refresh-cherry-buffer (upstream head) + (magit-with-section (section cherry 'cherry nil t) + (run-hooks 'magit-cherry-sections-hook))) + +(defun magit-insert-cherry-head-line () + (magit-insert-line-section (line) + (concat "Head: " + (propertize (cadr magit-refresh-args) 'face 'magit-branch) " " + (abbreviate-file-name default-directory)))) + +(defun magit-insert-cherry-upstream-line () + (magit-insert-line-section (line) + (concat "Upstream: " + (propertize (car magit-refresh-args) 'face 'magit-branch)))) + +(defun magit-insert-cherry-help-lines () + (when (derived-mode-p 'magit-cherry-mode) + (insert "\n") + (magit-insert-line-section (line) + (concat (propertize "-" 'face 'magit-cherry-equivalent) + " equivalent exists in both refs")) + (magit-insert-line-section (line) + (concat (propertize "+" 'face 'magit-cherry-unmatched) + " unmatched commit tree")))) + +(defun magit-insert-cherry-commits () + (magit-git-insert-section (cherries "Cherry commits:") + (apply-partially 'magit-wash-log 'cherry) + "cherry" "-v" (magit-abbrev-arg) magit-refresh-args)) + +;;;; Reflog Mode + +(defvar magit-reflog-buffer-name "*magit-reflog*" + "Name of buffer used to display reflog entries.") + +(define-derived-mode magit-reflog-mode magit-log-mode "Magit Reflog" + "Mode for looking at git reflog. + +\\Type `\\[magit-visit-item]` to visit a commit, and \ +`\\[magit-show-item-or-scroll-up]` to just show it. +Type `\\[magit-diff-working-tree]` to see the diff between current commit and \ +your working tree, +Type `\\[magit-diff]` to see the between any two version. +Type `\\[magit-reset-head]` to reset your head to the current commit, and \ +`\\[magit-apply-item]` to apply its change +to your working tree and `\\[magit-cherry-pick-item]` to cherry pick it. + +More information can be found in Info node `(magit)Reflogs' + +Other key binding: +\\{magit-reflog-mode-map}" + :group 'magit) + +(defun magit-refresh-reflog-buffer (ref) + (magit-log-margin-set-timeunit-width) + (magit-git-insert-section + (reflogbuf (format "Local history of branch %s" ref)) + (apply-partially 'magit-wash-log 'reflog t) + "reflog" "show" "--format=format:%h [%an] %ct %gd %gs" + (format "--max-count=%d" magit-log-cutoff-length) ref)) + +(defvar magit-reflog-labels + '(("commit" . magit-log-reflog-label-commit) + ("amend" . magit-log-reflog-label-amend) + ("merge" . magit-log-reflog-label-merge) + ("checkout" . magit-log-reflog-label-checkout) + ("branch" . magit-log-reflog-label-checkout) + ("reset" . magit-log-reflog-label-reset) + ("rebase" . magit-log-reflog-label-rebase) + ("cherry-pick" . magit-log-reflog-label-cherry-pick) + ("initial" . magit-log-reflog-label-commit) + ("pull" . magit-log-reflog-label-remote) + ("clone" . magit-log-reflog-label-remote))) + +(defun magit-log-format-reflog (subject) + (let* ((match (string-match magit-reflog-subject-re subject)) + (command (and match (match-string 1 subject))) + (option (and match (match-string 2 subject))) + (type (and match (match-string 3 subject))) + (label (if (string= command "commit") + (or type command) + command)) + (text (if (string= command "commit") + label + (mapconcat #'identity + (delq nil (list command option type)) + " ")))) + (format "%-16s " + (propertize text 'face + (or (cdr (assoc label magit-reflog-labels)) + 'magit-log-reflog-label-other))))) + +;;;; Ediff Support + +(defvar magit-ediff-buffers nil + "List of buffers that may be killed by `magit-ediff-restore'.") + +(defvar magit-ediff-windows nil + "The window configuration that will be restored when Ediff is finished.") + +(defun magit-ediff () + "View the current DIFF section in ediff." + (interactive) + (let ((diff (magit-current-section))) + (when (eq (magit-section-type (magit-current-section)) 'diffstat) + (setq diff (magit-diff-section-for-diffstat diff))) + (when (magit-section-hidden diff) + ;; Range is not set until the first time the diff is visible. + ;; This somewhat hackish code makes sure it's been visible at + ;; least once. + (magit-toggle-section) + (magit-toggle-section) + (setq diff (magit-current-section))) + (when (eq 'hunk (magit-section-type diff)) + (setq diff (magit-section-parent diff))) + (unless (eq 'diff (magit-section-type diff)) + (user-error "No diff at this location")) + (let* ((status (magit-section-diff-status diff)) + (file1 (magit-section-info diff)) + (file2 (magit-section-diff-file2 diff)) + (range (magit-diff-range diff))) + (cond + ((memq status '(new deleted typechange)) + (message "Why ediff a %s file?" status)) + ((and (eq status 'unmerged) + (eq (cdr range) 'working)) + (magit-interactive-resolve file1)) + ((consp (car range)) + (magit-ediff-buffers3 (magit-show (caar range) file2) + (magit-show (cdar range) file2) + (magit-show (cdr range) file1))) + (t + (magit-ediff-buffers (magit-show (car range) file2) + (magit-show (cdr range) file1))))))) + +(defun magit-ediff-buffers (a b) + (setq magit-ediff-buffers (list a b)) + (setq magit-ediff-windows (current-window-configuration)) + (ediff-buffers a b '(magit-ediff-add-cleanup))) + +(defun magit-ediff-buffers3 (a b c) + (setq magit-ediff-buffers (list a b c)) + (setq magit-ediff-windows (current-window-configuration)) + (ediff-buffers3 a b c '(magit-ediff-add-cleanup))) + +(defun magit-diff-range (diff) + (if (eq major-mode 'magit-commit-mode) + (let ((revs (split-string + (magit-git-string "rev-list" "-1" "--parents" + (car (last magit-refresh-args)))))) + (when (= (length revs) 2) + (cons (cadr revs) (car revs)))) + (magit-section-diff-range diff))) + +(defun magit-ediff-add-cleanup () + (make-local-variable 'magit-ediff-buffers) + (setq-default magit-ediff-buffers ()) + + (make-local-variable 'magit-ediff-windows) + (setq-default magit-ediff-windows ()) + + (add-hook 'ediff-cleanup-hook 'magit-ediff-restore 'append 'local)) + +(defun magit-ediff-restore () + "Kill any buffers in `magit-ediff-buffers' that are not visiting files and +restore the window state that was saved before ediff was called." + (dolist (buffer magit-ediff-buffers) + (when (and (null (buffer-file-name buffer)) + (buffer-live-p buffer)) + (with-current-buffer buffer + (when (and (eq magit-show-current-version 'index) + (buffer-modified-p)) + (magit-save-index))) + (kill-buffer buffer))) + (let ((buf (current-buffer))) + (set-window-configuration magit-ediff-windows) + (set-buffer buf))) + +;;;###autoload +(defun magit-save-index () + "Add the content of current file as if it was the index." + (interactive) + (unless (eq magit-show-current-version 'index) + (user-error "Current buffer doesn't visit the index version of a file")) + (when (y-or-n-p (format "Stage current version of %s? " magit-file-name)) + (let ((buf (current-buffer)) + (name (magit-git-dir "magit-add-index"))) + (with-temp-file name + (insert-buffer-substring buf)) + (let ((hash (magit-git-string "hash-object" "-t" "blob" "-w" + (concat "--path=" magit-file-name) + "--" name)) + (perm (substring (magit-git-string "ls-files" "-s" + magit-file-name) + 0 6))) + (magit-run-git "update-index" "--cacheinfo" + perm hash magit-file-name))))) + +;;;###autoload +(defun magit-interactive-resolve (file) + "Resolve a merge conflict using Ediff." + (interactive (list (magit-section-case (info) (diff (cadr info))))) + (require 'ediff) + (let ((merge-status (magit-git-lines "ls-files" "-u" "--" file)) + (base-buffer) + (our-buffer (generate-new-buffer (concat file ".current"))) + (their-buffer (generate-new-buffer (concat file ".merged"))) + (merger-buffer) + (windows (current-window-configuration))) + (unless merge-status + (user-error "Cannot resolve %s" file)) + (when (string-match "^[0-9]+ [0-9a-f]+ 1" (car merge-status)) + (pop merge-status) + (setq base-buffer (generate-new-buffer (concat file ".base"))) + (with-current-buffer base-buffer + (magit-git-insert "cat-file" "blob" (concat ":1:" file)))) + ;; If the second or third version do not exit, we use an empty buffer for the deleted file + (with-current-buffer our-buffer + (when (string-match "^[0-9]+ [0-9a-f]+ 2" (car merge-status)) + (pop merge-status) + (magit-git-insert "cat-file" "blob" (concat ":2:" file))) + (let ((buffer-file-name file)) + (normal-mode t))) + (with-current-buffer their-buffer + (when (string-match "^[0-9]+ [0-9a-f]+ 3" (car merge-status)) + (magit-git-insert "cat-file" "blob" (concat ":3:" file))) + (let ((buffer-file-name file)) + (normal-mode t))) + ;; We have now created the 3 buffer with ours, theirs and the ancestor files + (if base-buffer + (setq merger-buffer (ediff-merge-buffers-with-ancestor + our-buffer their-buffer base-buffer nil nil file)) + (setq merger-buffer (ediff-merge-buffers our-buffer their-buffer nil nil file))) + (with-current-buffer merger-buffer + (setq ediff-show-clashes-only t) + (setq-local magit-ediff-windows windows) + (make-local-variable 'ediff-quit-hook) + (add-hook 'ediff-quit-hook + (lambda () + (let ((buffer-A ediff-buffer-A) + (buffer-B ediff-buffer-B) + (buffer-C ediff-buffer-C) + (buffer-Ancestor ediff-ancestor-buffer) + (windows magit-ediff-windows)) + (ediff-cleanup-mess) + (kill-buffer buffer-A) + (kill-buffer buffer-B) + (when (bufferp buffer-Ancestor) + (kill-buffer buffer-Ancestor)) + (set-window-configuration windows))))))) + +;;;; Diff Mode +;;;;; Diff Core + +(define-derived-mode magit-diff-mode magit-mode "Magit Diff" + "Mode for looking at a git diff. + +\\Type `\\[magit-visit-item]` to visit the changed file, \ +`\\[magit-toggle-section]` to hide or show a hunk, +`\\[magit-diff-larger-hunks]` and `\\[magit-diff-smaller-hunks]` to change \ +the size of the hunks. +Type `\\[magit-apply-item]` to apply a change to your worktree and \ +`\\[magit-revert-item]` to reverse it. +You can also use `\\[magit-ediff]` to see the current change with ediff. + +More information can be found in Info node `(magit)Diffing' + +\\{magit-diff-mode-map}" + :group 'magit) + +(defvar magit-diff-buffer-name "*magit-diff*" + "Name of buffer used to display a diff.") + +(defvar magit-stash-buffer-name "*magit-stash*" + "Name of buffer used to display a stash.") + +;;;;; Diff Entry Commands + +;;;###autoload +(defun magit-diff (range &optional working args) + "Show differences between two commits. +RANGE should be a range (A..B or A...B) but can also be a single +commit. If one side of the range is omitted, then it defaults +to HEAD. If just a commit is given, then changes in the working +tree relative to that commit are shown." + (interactive (list (magit-read-rev-range "Diff"))) + (magit-mode-setup magit-diff-buffer-name + #'pop-to-buffer + #'magit-diff-mode + #'magit-refresh-diff-buffer range working args)) + +;;;###autoload +(defun magit-diff-working-tree (rev) + "Show differences between a commit and the current working tree." + (interactive (list (magit-read-rev-with-default "Diff working tree with"))) + (magit-diff (or rev "HEAD") t)) + +;;;###autoload +(defun magit-diff-staged () + "Show differences between the index and the HEAD commit." + (interactive) + (magit-diff nil nil (list "--cached"))) + +;;;###autoload +(defun magit-diff-unstaged () + "Show differences between the current working tree and index." + (interactive) + (magit-diff nil)) + +;;;###autoload +(defun magit-diff-stash (stash &optional noselect) + "Show changes in a stash. +A Stash consist of more than just one commit. This command uses +a special diff range so that the stashed changes actually were a +single commit." + (interactive (list (magit-read-stash "Show stash (number): "))) + (magit-mode-setup magit-commit-buffer-name + (if noselect 'display-buffer 'pop-to-buffer) + #'magit-diff-mode + #'magit-refresh-diff-buffer + (concat stash "^2^.." stash))) + +(defun magit-diff-with-mark (range) + "Show difference between the marked commit and the one at point. +If there is no commit at point, then prompt for one." + (interactive + (let* ((marked (or magit-marked-commit (user-error "No commit marked"))) + (current (magit-get-current-branch)) + (is-current (string= (magit-name-rev marked) current)) + (commit (or (magit-guess-branch) + (magit-read-rev + (format "Diff marked commit %s with" marked) + (unless is-current current) + current)))) + (list (concat marked ".." commit)))) + (magit-diff range)) + +(defun magit-refresh-diff-buffer (range &optional working args) + (let ((magit-current-diff-range + (cond (working (cons range 'working)) + ((null range) nil) + ((consp range) + (prog1 range + (setq range (concat (car range) ".." (cdr range))))) + ((string-match "^\\([^.]+\\)\\.\\.\\([^.]\\)$" range) + (cons (match-string 1 range) + (match-string 2 range)))))) + (magit-git-insert-section + (diffbuf (cond (working + (format "Changes from %s to working tree" range)) + ((not range) + (if (member "--cached" args) + "Staged changes" + "Unstaged changes")) + (t + (format "Changes in %s" range)))) + #'magit-wash-diffs + "diff" (magit-diff-U-arg) + (and magit-show-diffstat "--patch-with-stat") + range args "--"))) + +;;;;; Diff Washing + +(defconst magit-diff-statline-re + (concat "^ ?" + "\\(.*\\)" ; file + "\\( +| +\\)" ; separator + "\\([0-9]+\\|Bin\\(?: +[0-9]+ -> [0-9]+ bytes\\)?$\\) ?" + "\\(\\+*\\)" ; add + "\\(-*\\)$")) ; del + +(defvar magit-current-diff-range nil + "Used internally when setting up magit diff sections.") + +(defvar-local magit-diffstat-cached-sections nil) +(put 'magit-diffstat-cached-sections 'permanent-local t) + +(defun magit-wash-diffs () + (magit-wash-diffstats) + (when (re-search-forward "^diff" nil t) + (goto-char (line-beginning-position)) + (magit-wash-sequence #'magit-wash-diff)) + (goto-char (point-max)) + (magit-xref-insert-buttons)) + +(defun magit-wash-diffstats () + (let ((beg (point))) + (when (re-search-forward "^ ?\\([0-9]+ +files? change[^\n]*\n\\)" nil t) + (let ((heading (match-string-no-properties 1))) + (delete-region (match-beginning 0) (match-end 0)) + (goto-char beg) + (magit-with-section (section diffstats 'diffstats heading) + (magit-wash-sequence #'magit-wash-diffstat))) + (setq magit-diffstat-cached-sections + (nreverse magit-diffstat-cached-sections))))) + +(defun magit-wash-diffstat () + (when (looking-at magit-diff-statline-re) + (magit-bind-match-strings (file sep cnt add del) + (delete-region (point) (1+ (line-end-position))) + (magit-with-section (section diffstat 'diffstat) + (insert " " file sep cnt " ") + (when add (insert (propertize add 'face 'magit-diff-add))) + (when del (insert (propertize del 'face 'magit-diff-del))) + (insert "\n") + (push section magit-diffstat-cached-sections))))) + +(defun magit-wash-diff () + (magit-with-section (section diff (buffer-substring-no-properties + (line-beginning-position) + (line-end-position))) + (setq section (magit-wash-diff-section section)))) + +(defun magit-wash-diff-section (section) + (cond ((re-search-forward "^\\* Unmerged path \\(.*\\)" nil t) + (forward-line 0) + (let ((file (magit-decode-git-path (match-string-no-properties 1)))) + (delete-region (point) (line-end-position)) + (insert "\tUnmerged " file "\n") + (setf (magit-section-diff-status section) 'unmerged) + (setf (magit-section-info section) file) + section)) + ((re-search-forward "^diff" nil t) + (forward-line 0) + (let ((file (cond + ((looking-at "^diff --git \\(\".*\"\\) \\(\".*\"\\)$") + (substring (magit-decode-git-path + (match-string-no-properties 2)) 2)) + ((looking-at "^diff --git ./\\(.*\\) ./\\(.*\\)$") + (match-string-no-properties 2)) + ((looking-at "^diff --cc +\\(.*\\)$") + (match-string-no-properties 1)))) + (end (save-excursion + (forward-line) ;; skip over "diff" line + (if (re-search-forward "^diff\\|^@@" nil t) + (goto-char (match-beginning 0)) + (goto-char (point-max))) + (point-marker)))) + (when magit-diffstat-cached-sections + (setf (magit-section-info (pop magit-diffstat-cached-sections)) + file)) + (let ((status (cond + ((looking-at "^diff --cc") + 'unmerged) + ((save-excursion + (re-search-forward "^new file" end t)) + 'new) + ((save-excursion + (re-search-forward "^deleted" end t)) + (setf (magit-section-hidden section) t) + 'deleted) + ((save-excursion + (re-search-forward "^rename" end t)) + 'renamed) + (t + 'modified))) + (file2 (cond + ((save-excursion + (re-search-forward "^rename from \\(.*\\)" + end t)) + (match-string-no-properties 1))))) + (setf (magit-section-diff-status section) status) + (setf (magit-section-info section) file) + (setf (magit-section-diff-file2 section) (or file2 file)) + (setf (magit-section-diff-range section) magit-current-diff-range) + (magit-insert-diff-title status file file2) + (when (re-search-forward + "\\(--- \\(.*\\)\n\\+\\+\\+ \\(.*\\)\n\\)" nil t) + (magit-put-face-property (match-beginning 1) (match-end 1) + 'magit-diff-hunk-header) + (magit-put-face-property (match-beginning 2) (match-end 2) + 'magit-diff-file-header) + (magit-put-face-property (match-beginning 3) (match-end 3) + 'magit-diff-file-header)) + (goto-char end) + (magit-wash-sequence #'magit-wash-hunk))) + section))) + +(defun magit-insert-diff-title (status file file2) + (insert (format "\t%-10s " (capitalize (symbol-name status))) + file + (if (eq status 'renamed) (format " (from %s)" file2) "") + "\n")) + +(defun magit-wash-hunk () + (when (looking-at "^@@\\(@\\)?.+") + (let ((merging (match-beginning 1))) + (magit-with-section (section hunk (match-string 0)) + (magit-put-face-property (point) (line-end-position) + 'magit-diff-hunk-header) + (forward-line) + (while (not (or (eobp) (looking-at "^diff\\|^@@"))) + (magit-put-face-property + (point) (line-end-position) + (cond + ((looking-at "^\\+\\+<<<<<<<") 'magit-diff-merge-current) + ((looking-at "^\\+\\+=======") 'magit-diff-merge-separator) + ((looking-at "^\\+\\+|||||||") 'magit-diff-merge-diff3-separator) + ((looking-at "^\\+\\+>>>>>>>") 'magit-diff-merge-proposed) + ((looking-at (if merging "^\\(\\+\\| \\+\\)" "^\\+")) + (magit-diff-highlight-whitespace merging) + 'magit-diff-add) + ((looking-at (if merging "^\\(-\\| \\-\\)" "^-")) + (magit-diff-highlight-whitespace merging) + 'magit-diff-del) + (t + 'magit-diff-none))) + (forward-line)) + (when (eq magit-diff-refine-hunk 'all) + (magit-diff-refine-hunk section)))) + t)) + +(defun magit-diff-highlight-whitespace (merging) + (when (and magit-highlight-whitespace + (or (derived-mode-p 'magit-status-mode) + (not (eq magit-highlight-whitespace 'status)))) + (let ((prefix (if merging "^[-\\+\s]\\{2\\}" "^[-\\+]")) + (indent + (if (local-variable-p 'magit-highlight-indentation) + magit-highlight-indentation + (setq-local + magit-highlight-indentation + (cdr (cl-find-if (lambda (pair) + (string-match-p (car pair) default-directory)) + (default-value 'magit-highlight-indentation) + :from-end t)))))) + (when (and magit-highlight-trailing-whitespace + (looking-at (concat prefix ".*?\\([ \t]+\\)$"))) + (magit-put-face-property (match-beginning 1) (match-end 1) + 'magit-whitespace-warning-face)) + (when (or (and (eq indent 'tabs) + (looking-at (concat prefix "\\( *\t[ \t]*\\)"))) + (and (integerp indent) + (looking-at (format "%s\\([ \t]* \\{%s,\\}[ \t]*\\)" + prefix indent)))) + (magit-put-face-property (match-beginning 1) (match-end 1) + 'magit-whitespace-warning-face))))) + +;;;;; Diff Mode Commands + +(defun magit-diff-toggle-refine-hunk (&optional other) + "Turn diff-hunk refining on or off. + +If hunk refining is currently on, then hunk refining is turned off. +If hunk refining is off, then hunk refining is turned on, in +`selected' mode (only the currently selected hunk is refined). + +With a prefix argument, the \"third choice\" is used instead: +If hunk refining is currently on, then refining is kept on, but +the refining mode (`selected' or `all') is switched. +If hunk refining is off, then hunk refining is turned on, in +`all' mode (all hunks refined). + +Customize variable `magit-diff-refine-hunk' to change the default mode." + (interactive "P") + (let ((hunk (and magit-highlighted-section + (eq (magit-section-type magit-highlighted-section) 'hunk) + magit-highlighted-section)) + (old magit-diff-refine-hunk)) + (setq-local magit-diff-refine-hunk + (if other + (if (eq old 'all) t 'all) + (not old))) + (cond ((or (eq old 'all) + (eq magit-diff-refine-hunk 'all)) + (magit-refresh)) + ((not hunk)) + (magit-diff-refine-hunk + (magit-diff-refine-hunk hunk)) + (t + (magit-diff-unrefine-hunk hunk))) + (message "magit-diff-refine-hunk: %s" magit-diff-refine-hunk))) + +(defun magit-diff-refine-hunk (hunk) + (save-excursion + (goto-char (magit-section-beginning hunk)) + ;; `diff-refine-hunk' does not handle combined diffs. + (unless (looking-at "@@@") + (diff-refine-hunk)))) + +(defun magit-diff-unrefine-hunk (hunk) + (remove-overlays (magit-section-beginning hunk) + (magit-section-end hunk) + 'diff-mode 'fine)) + +;;;; Wazzup Mode + +(define-derived-mode magit-wazzup-mode magit-mode "Magit Wazzup" + "Mode for looking at git commits not merged into current HEAD. + +\\Type `\\[magit-toggle-section]` to show or hide \ +section, `\\[magit-visit-item]` to visit an item \ +`\\[magit-show-item-or-scroll-up]` to show it. +Type `\\[magit-diff-working-tree]` to display change with your working tree, \ +and `\\[magit-diff]` to display change +between any two commit. +Type `\\[magit-cherry-pick-item]` to cherry-pick a commit, and \ +`\\[magit-apply-item]` to apply its change to your +working tree, without committing, and `\\[magit-key-mode-popup-merging]` \ +to merge those change. +Type `\\[magit-refresh]` to refresh current buffer. + +More information can be found in Info node `(magit)Wazzup' + +\\{magit-wazzup-mode-map}" + :group 'magit) + +(defvar magit-wazzup-buffer-name "*magit-wazzup*" + "Name of buffer used to display commits not merged into current HEAD.") + +;;;###autoload +(defun magit-wazzup (branch) + "Show a list of branches in a dedicated buffer. +Unlike in the buffer created by `magit-branch-manager' each +branch can be expanded to show a list of commits not merged +into the selected branch." + (interactive + (let ((branch (magit-get-current-branch))) + (list (if current-prefix-arg + (magit-read-rev "Wazzup branch" branch) + branch)))) + (magit-mode-setup magit-wazzup-buffer-name nil + #'magit-wazzup-mode + #'magit-refresh-wazzup-buffer branch)) + +(defun magit-refresh-wazzup-buffer (head) + (magit-with-section (section wazzupbuf 'wazzupbuf nil t) + (run-hooks 'magit-wazzup-sections-hook))) + +(defun magit-insert-wazzup-head-line () + (magit-insert-line-section (line) + (concat "Head: " + (propertize (car magit-refresh-args) 'face 'magit-branch) " " + (abbreviate-file-name default-directory)))) + +(defun magit-insert-wazzup-branches () + (dolist (upstream (magit-git-lines "show-ref")) + (setq upstream (cadr (split-string upstream " "))) + (when (and (not (string-match-p "HEAD$" upstream)) + (string-match-p "^refs/\\(heads\\|remotes\\)/" upstream)) + (magit-insert-wazzup-commits upstream (car magit-refresh-args))))) + +(defun magit-insert-wazzup-commits (upstream head) + (let ((count (string-to-number + (magit-git-string "rev-list" "--count" "--right-only" + (concat head "..." upstream))))) + (when (> count 0) + (magit-with-section + (section wazzup upstream + (format "%3s %s\n" count (magit-format-ref-label upstream)) + nil t) + (cond + ((magit-section-hidden section) + (setf (magit-section-hidden section) t) + (setf (magit-section-needs-refresh-on-show section) t)) + (t + (let ((beg (point))) + (magit-git-insert "cherry" "-v" "--abbrev" head upstream) + (save-restriction + (narrow-to-region beg (point)) + (goto-char (point-min)) + (magit-wash-log 'cherry))))))))) + +;;;; Branch Manager Mode +;;;;; (core) + +(define-derived-mode magit-branch-manager-mode magit-mode "Magit Branch" + "Mode for looking at git branches. + +\\Type `\\[magit-visit-item]` to checkout a branch, `\\[magit-reset-head]' to reset current branch, +you can also merge the branch with `\\[magit-key-mode-popup-merging]` + +Type `\\[magit-discard-item]' to delete a branch, or `\\[universal-argument] \\[magit-discard-item]' to force the deletion. +Type `\\[magit-rename-item]' to Rename a branch. + +More information can be found in Info node `(magit)The branch list' + +\\{magit-branch-manager-mode-map} +Unless shadowed by the mode specific bindings above, bindings +from the parent keymap `magit-mode-map' are also available.") + +(defvar magit-branches-buffer-name "*magit-branches*" + "Name of buffer used to display and manage branches.") + +;;;###autoload +(defun magit-branch-manager () + "Show a list of branches in a dedicated buffer." + (interactive) + (if (magit-get-top-dir) ; Kludge for #1215 + (magit-mode-setup magit-branches-buffer-name nil + #'magit-branch-manager-mode + #'magit-refresh-branch-manager) + (user-error "There is no Git repository here"))) + +(defun magit-refresh-branch-manager () + (magit-git-insert-section (branchbuf nil) + #'magit-wash-branches + "branch" "-vva" magit-custom-options)) + +;;;;; Branch List Washing + +(defconst magit-wash-branch-line-re + (concat "^\\([ *] \\)" ; 1: current branch marker + "\\(.+?\\) +" ; 2: branch name + "\\(?:" + "\\([0-9a-fA-F]+\\)" ; 3: sha1 + " " + "\\(?:\\[" + "\\([^:\n]+?\\)" ; 4: tracking + "\\(?:: \\)?" + "\\(?:ahead \\([0-9]+\\)\\)?" ; 5: ahead + "\\(?:, \\)?" + "\\(?:behind \\([0-9]+\\)\\)?" ; 6: behind + "\\] \\)?" + "\\(?:.*\\)" ; message + "\\|" ; or + "-> " ; the pointer to + "\\(.+\\)" ; 7: a ref + "\\)\n")) + +(defun magit-wash-branch-line (&optional remote-name) + (when (looking-at magit-wash-branch-line-re) + ;; ^ Kludge for #1162. v Don't reindent for now. + (let* ((marker (match-string 1)) + (branch (match-string 2)) + (sha1 (match-string 3)) + (tracking (match-string 4)) + (ahead (match-string 5)) + (behind (match-string 6)) + (other-ref (match-string 7)) + (branch-face (and (equal marker "* ") 'magit-branch))) + (delete-region (point) (line-beginning-position 2)) + (magit-with-section (section branch branch) + (insert (propertize (or sha1 (make-string 7 ? )) + 'face 'magit-log-sha1) + " " marker + (propertize (if (string-match-p "^remotes/" branch) + (substring branch 8) + branch) + 'face branch-face)) + (when other-ref + (insert " -> " (substring other-ref (+ 1 (length remote-name))))) + (when (and tracking + (equal (magit-get-tracked-branch branch t) + (concat "refs/remotes/" tracking))) + (insert " [") + ;; getting rid of the tracking branch name if it is + ;; the same as the branch name + (let* ((remote (magit-get "branch" branch "remote")) + (merge (substring tracking (+ 1 (length remote))))) + (insert (propertize (if (string= branch merge) + (concat "@ " remote) + (concat merge " @ " remote)) + 'face 'magit-log-head-label-remote))) + (when (or ahead behind) + (insert ":") + (and ahead (insert "ahead " (propertize ahead 'face branch-face))) + (and ahead behind (insert ", ")) + (and behind (insert "behind " + (propertize behind 'face + 'magit-log-head-label-remote)))) + (insert "]")) + (insert "\n"))))) + +(defun magit-wash-remote-branches-group (group) + (let* ((remote (car group)) + (url (magit-get "remote" remote "url")) + (push-url (magit-get "remote" remote "pushurl")) + (urls (concat url (and push-url (concat ", " push-url)))) + (marker (cadr group))) + (magit-with-section + (section remote remote (format "%s (%s):" remote urls) t) + (magit-wash-branches-between-point-and-marker marker remote) + (insert "\n")))) + +(defun magit-wash-branches-between-point-and-marker (marker &optional remote-name) + (save-restriction + (narrow-to-region (point) marker) + (magit-wash-sequence + (apply-partially 'magit-wash-branch-line remote-name)))) + +(defun magit-wash-branches () + ;; get the names of the remotes + (let* ((remotes (magit-git-lines "remote")) + ;; get the location of remotes in the buffer + (markers + (append (mapcar (lambda (remote) + (save-excursion + (when (re-search-forward + (format "^ remotes/%s/" remote) nil t) + (beginning-of-line) + (point-marker)))) + remotes) + (list (save-excursion + (goto-char (point-max)) + (point-marker))))) + ;; list of remote elements to display in the buffer + (remote-groups + (cl-loop for remote in remotes + for end-markers on (cdr markers) + for marker = (cl-loop for x in end-markers thereis x) + collect (list remote marker)))) + ;; actual displaying of information + (magit-with-section (section local "." "Local:" t) + (magit-wash-branches-between-point-and-marker + (cl-loop for x in markers thereis x)) + (insert "\n")) + (mapc 'magit-wash-remote-branches-group remote-groups) + ;; make sure markers point to nil so that they can be garbage collected + (mapc (lambda (marker) + (when marker + (set-marker marker nil))) + markers))) + +;;;;; (commands) + +(defun magit-rename-item () + "Rename the item at point." + (interactive) + (magit-section-action rename () + (branch (call-interactively 'magit-rename-branch)) + (remote (call-interactively 'magit-rename-remote)))) + +(defun magit-change-what-branch-tracks () + "Change which remote branch the current branch tracks." + (interactive) + (let* ((branch (magit-guess-branch)) + (track (magit-read-rev "Track branch")) + (track- + (cond ((string-match "^\\([^ ]+\\) +(\\(.+\\))$" track) + (cons (match-string 2 track) + (concat "refs/heads/" (match-string 1 track)))) + ((string-match "^\\(?:refs/remotes/\\)?\\([^/]+\\)/\\(.+\\)" + track) + (cons (match-string 1 track) + (concat "refs/heads/" (match-string 2 track)))) + (t + (user-error "Cannot parse the remote and branch name"))))) + (magit-set (car track-) "branch" branch "remote") + (magit-set (cdr track-) "branch" branch "merge") + (magit-refresh))) + +;;; Miscellaneous +;;;; Miscellaneous Commands + +;;;###autoload +(defun magit-init (directory) + "Create or reinitialize a Git repository. +Read directory name and initialize it as new Git repository. + +If the directory is below an existing repository, then the user +has to confirm that a new one should be created inside; or when +the directory is the root of the existing repository, whether +it should be reinitialized. + +Non-interactively DIRECTORY is always (re-)initialized." + (interactive + (let* ((dir (file-name-as-directory + (expand-file-name + (read-directory-name "Create repository in: ")))) + (top (magit-get-top-dir dir))) + (if (and top + (not (yes-or-no-p + (if (string-equal top dir) + (format "Reinitialize existing repository %s? " dir) + (format "%s is a repository. Create another in %s? " + top dir))))) + (user-error "Abort") + (list dir)))) + (magit-run-git "init" (expand-file-name directory))) + +(defun magit-copy-item-as-kill () + "Copy sha1 of commit at point into kill ring." + (interactive) + (magit-section-action copy (info) + ((branch commit file diff) + (kill-new info) + (message "%s" info)))) + +(defun magit-ignore-item (edit &optional local) + "Ignore the item at point. +With a prefix argument edit the ignore string." + (interactive "P") + (magit-section-action ignore (info) + ([file untracked] + (magit-ignore-file (concat "/" info) edit local) + (magit-refresh)) + (diff + (when (yes-or-no-p (format "%s is tracked. Untrack and ignore? " info)) + (magit-ignore-file (concat "/" info) edit local) + (magit-run-git "rm" "--cached" info))))) + +(defun magit-ignore-item-locally (edit) + "Ignore the item at point locally only. +With a prefix argument edit the ignore string." + (interactive "P") + (magit-ignore-item edit t)) + +(defun magit-ignore-file (file &optional edit local) + "Add FILE to the list of files to ignore. +If EDIT is non-nil, prompt the user for the string to be ignored +instead of using FILE. The changes are written to .gitignore +except if LOCAL is non-nil in which case they are written to +.git/info/exclude." + (let* ((local-ignore-dir (magit-git-dir "info/")) + (ignore-file (if local + (concat local-ignore-dir "exclude") + ".gitignore"))) + (when edit + (setq file (magit-ignore-edit-string file))) + (when (and local (not (file-exists-p local-ignore-dir))) + (make-directory local-ignore-dir t)) + (with-temp-buffer + (when (file-exists-p ignore-file) + (insert-file-contents ignore-file)) + (goto-char (point-max)) + (unless (bolp) + (insert "\n")) + (insert file "\n") + (write-region nil nil ignore-file)))) + +(defun magit-ignore-edit-string (file) + "Prompt the user for the string to be ignored. +A list of predefined values with wildcards is derived from the +filename FILE." + (let* ((extension (concat "*." (file-name-extension file))) + (extension-in-dir (concat (file-name-directory file) extension)) + (filename (file-name-nondirectory file)) + (completions (list extension extension-in-dir filename file))) + (magit-completing-read "File/pattern to ignore" + completions nil nil nil nil file))) + +;;;; Commit Mark + +(defvar magit-marked-commit nil) + +(defvar-local magit-mark-overlay nil) +(put 'magit-mark-overlay 'permanent-local t) + +(defun magit-mark-item (&optional unmark) + "Mark the commit at point. +Some commands act on the marked commit by default or use it as +default when prompting for a commit." + (interactive "P") + (if unmark + (setq magit-marked-commit nil) + (magit-section-action mark (info) + (commit (setq magit-marked-commit + (if (equal magit-marked-commit info) nil info))))) + (magit-refresh-marked-commits) + (run-hooks 'magit-mark-commit-hook)) + +(defun magit-refresh-marked-commits () + (magit-map-magit-buffers #'magit-refresh-marked-commits-in-buffer)) + +(defun magit-refresh-marked-commits-in-buffer () + (unless magit-mark-overlay + (setq magit-mark-overlay (make-overlay 1 1)) + (overlay-put magit-mark-overlay 'face 'magit-item-mark)) + (delete-overlay magit-mark-overlay) + (magit-map-sections + (lambda (section) + (when (and (eq (magit-section-type section) 'commit) + (equal (magit-section-info section) + magit-marked-commit)) + (move-overlay magit-mark-overlay + (magit-section-beginning section) + (magit-section-end section) + (current-buffer)))) + magit-root-section)) + +;;;; ChangeLog + +;;;###autoload +(defun magit-add-change-log-entry (&optional whoami file-name other-window) + "Find change log file and add date entry and item for current change. +This differs from `add-change-log-entry' (which see) in that +it acts on the current hunk in a Magit buffer instead of on +a position in a file-visiting buffer." + (interactive (list current-prefix-arg + (prompt-for-change-log-name))) + (let (buf pos) + (save-window-excursion + (magit-visit-item) + (setq buf (current-buffer) + pos (point))) + (save-excursion + (with-current-buffer buf + (goto-char pos) + (add-change-log-entry whoami file-name other-window))))) + +;;;###autoload +(defun magit-add-change-log-entry-other-window (&optional whoami file-name) + "Find change log file in other window and add entry and item. +This differs from `add-change-log-entry-other-window' (which see) +in that it acts on the current hunk in a Magit buffer instead of +on a position in a file-visiting buffer." + (interactive (and current-prefix-arg + (list current-prefix-arg + (prompt-for-change-log-name)))) + (magit-add-change-log-entry whoami file-name t)) + +;;;; Read Repository + +(defun magit-read-top-dir (dir) + "Ask the user for a Git repository. +The choices offered by auto-completion will be the repositories +under `magit-repo-dirs'. If `magit-repo-dirs' is nil or DIR is +non-nil, then autocompletion will offer directory names." + (if (and (not dir) magit-repo-dirs) + (let* ((repos (magit-list-repos magit-repo-dirs)) + (reply (magit-completing-read "Git repository" repos))) + (file-name-as-directory + (or (cdr (assoc reply repos)) + (if (file-directory-p reply) + (expand-file-name reply) + (user-error "Not a repository or a directory: %s" reply))))) + (file-name-as-directory + (read-directory-name "Git repository: " + (or (magit-get-top-dir) default-directory))))) + +(defun magit-list-repos (dirs) + (magit-list-repos-remove-conflicts + (cl-loop for dir in dirs + append (cl-loop for repo in + (magit-list-repos* dir magit-repo-dirs-depth) + collect (cons (file-name-nondirectory repo) repo))))) + +(defun magit-list-repos* (dir depth) + "Return a list of repos found in DIR, recursing up to DEPTH levels deep." + (if (magit-git-repo-p dir) + (list (expand-file-name dir)) + (and (> depth 0) + (file-directory-p dir) + (not (member (file-name-nondirectory dir) + '(".." "."))) + (cl-loop for entry in (directory-files dir t nil t) + append (magit-list-repos* entry (1- depth)))))) + +(defun magit-list-repos-remove-conflicts (alist) + (let ((dict (make-hash-table :test 'equal)) + (alist (delete-dups alist)) + (result nil)) + (dolist (a alist) + (puthash (car a) (cons (cdr a) (gethash (car a) dict)) + dict)) + (maphash + (lambda (key value) + (if (= (length value) 1) + (push (cons key (car value)) result) + (let ((sub (magit-list-repos-remove-conflicts + (mapcar + (lambda (entry) + (let ((dir (directory-file-name + (substring entry 0 (- (length key)))))) + (cons (concat (file-name-nondirectory dir) "/" key) + entry))) + value)))) + (setq result (append result sub))))) + dict) + result)) + +;;;; External Tools + +;;;###autoload +(defun magit-run-git-gui () + "Run `git gui' for the current git repository." + (interactive) + (let* ((default-directory (magit-get-top-dir))) + (call-process magit-git-executable nil 0 nil "gui"))) + +;;;###autoload +(defun magit-run-git-gui-blame (commit filename &optional linenum) + "Run `git gui blame' on the given FILENAME and COMMIT. +Interactively run it for the current file and the HEAD, with a +prefix or when the current file cannot be determined let the user +choose. When the current buffer is visiting FILENAME instruct +blame to center around the line point is on." + (interactive + (let (revision filename) + (when (or current-prefix-arg + (not (setq revision "HEAD" + filename (magit-buffer-file-name t)))) + (setq revision (magit-read-rev "Retrieve from revision" "HEAD") + filename (magit-read-file-from-rev revision))) + (list revision filename + (and (equal filename + (ignore-errors + (magit-file-relative-name + (file-name-directory (buffer-file-name))))) + (line-number-at-pos))))) + (let ((default-directory (magit-get-top-dir))) + (apply #'call-process magit-git-executable nil 0 nil "gui" "blame" + `(,@(and linenum (list (format "--line=%d" linenum))) + ,commit + ,filename)))) + +;;;###autoload +(defun magit-run-gitk (arg) + "Run Gitk for the current git repository. +Without a prefix argument run `gitk --all', with +a prefix argument run gitk without any arguments." + (interactive "P") + (apply #'call-process magit-gitk-executable nil 0 nil + (if arg nil (list "--all")))) + +;;;; Maintenance Tools + +(defun magit-describe-item () + "Show information about the section at point. +This command is intended for debugging purposes." + (interactive) + (let* ((section (magit-current-section)) + (head-beg (magit-section-beginning section)) + (body-beg (magit-section-content-beginning section))) + (message "Section: %s %s%s-%s %S %S" + (magit-section-type section) + (marker-position (magit-section-beginning section)) + (if (and body-beg (not (= body-beg head-beg)) + (< body-beg (magit-section-end section))) + (format "-%s" (marker-position body-beg)) + "") + (marker-position (magit-section-end section)) + (magit-section-info section) + (magit-section-context-type section)))) + +;;;; Magit Extensions + +(defun magit-load-config-extensions () + "Try to load magit extensions that are defined at git config layer. +This can be added to `magit-mode-hook' for example" + (dolist (ext (magit-get-all "magit.extension")) + (let ((sym (intern (format "magit-%s-mode" ext)))) + (when (and (fboundp sym) + (not (eq sym 'magit-wip-save-mode))) + (funcall sym 1))))) + +;;; magit.el ends soon + +(defconst magit-font-lock-keywords + (eval-when-compile + `((,(concat "(\\(" (regexp-opt + '("magit-define-level-shower" + "magit-define-section-jumper")) + "\\)\\>[ \t'\(]*\\(\\sw+\\)?") + (1 font-lock-keyword-face) + (2 font-lock-function-name-face nil t)) + (,(concat "(" (regexp-opt + '("magit-with-section" + "magit-cmd-insert-section" + "magit-git-insert-section" + "magit-insert-line-section" + "magit-section-action" + "magit-section-case" + "magit-add-action-clauses" + "magit-bind-match-strings" + "magit-visiting-file-item" + "magit-tests--with-temp-dir" + "magit-tests--with-temp-repo" + "magit-tests--with-temp-clone") t) + "\\>") + . 1))) + "Magit expressions to highlight in Emacs-Lisp mode. +To highlight Magit expressions add something like this to your +init file: + + (require 'magit) + (font-lock-add-keywords 'emacs-lisp-mode + magit-font-lock-keywords)") + +(defun magit-version (&optional noerror) + "The version of Magit that you're using.\n\n\(fn)" + (interactive) + (let ((toplib (or load-file-name buffer-file-name))) + (unless (and toplib + (equal (file-name-nondirectory toplib) "magit.el")) + (setq toplib (locate-library "magit.el"))) + (when toplib + (let* ((dir (file-name-directory toplib)) + (static (expand-file-name "magit-version.el" dir)) + (gitdir (expand-file-name ".git" dir))) + (cond ((file-exists-p gitdir) + (setq magit-version + (let ((default-directory dir)) + (magit-git-string "describe" "--tags" "--dirty"))) + (ignore-errors (delete-file static))) + ((file-exists-p static) + (load-file static)) + ((featurep 'package) + (setq magit-version + (or (ignore-errors ; < 24.3.50 + (package-version-join + (package-desc-vers + (cdr (assq 'magit package-alist))))) + (ignore-errors ; >= 24.3.50 + (package-version-join + (package-desc-version + (cadr (assq 'magit package-alist))))))))))) + (if (stringp magit-version) + (when (called-interactively-p 'any) + (message "magit-%s" magit-version)) + (if noerror + (progn (setq magit-version 'error) + (message "Cannot determine Magit's version")) + (user-error "Cannot determine Magit's version"))) + magit-version)) + +(cl-eval-when (load eval) (magit-version t)) + +(define-obsolete-variable-alias 'magit-cherry-insert-sections-hook + 'magit-cherry-sections-hook "2.0.0") +(define-obsolete-variable-alias 'magit-status-insert-sections-hook + 'magit-status-sections-hook "2.0.0") +(define-obsolete-variable-alias 'magit-wazzup-insert-sections-hook + 'magit-wazzup-sections-hook "2.0.0") + +(define-obsolete-variable-alias 'magit-quote-curly-braces + 'magit-process-quote-curly-braces "2.0.0") + +(provide 'magit) + +;; rest of magit core +(require 'magit-key-mode) + +;; If `magit-log-edit' is available and `git-commit-mode' is not +;; loaded, then we have no choice but to assume the user actually +;; wants to use the former. +(unless (featurep 'git-commit-mode) + (require 'magit-log-edit nil t)) + +;; Local Variables: +;; coding: utf-8 +;; indent-tabs-mode: nil +;; End: +;;; magit.el ends here diff --git a/elpa/magit-20140807.909/magit.elc b/elpa/magit-20140807.909/magit.elc new file mode 100644 index 0000000000000000000000000000000000000000..f9993639a1cfc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?2(KMOBqM}q_vqB(p(kIEKYUNt! zBAf`EM#JEAVa}}ff=%o={Y^*<Aeg~Cp;Zg6Z(GfGkv6^cj`)!C*-6$KT%u-zsSGV=E$&DPA^>q~;^k(sqxBypWpGRh7`7F;%a5 z)$OiVedmtq^LBLohj5VCTu{_#<=0~6v7Tz>fp(3p93P7PP``KAXpUMi@ZPhq%$Qwm zKz|7}9Bsq5MH@nOl{UDA34<|i04TKWZNRA4hM&YDZJb7I2EtEGf*nwlY$%!i!&9k98 zot^ov@L<+M{Cqz}N`(}Gm4{D8pd>f0lCc(9d{=w53Tm_Ypj4Y@BAN(V7W&i*H literal 0 HcmV?d00001 diff --git a/elpa/magit-20140807.909/magit.info b/elpa/magit-20140807.909/magit.info new file mode 100644 index 000000000..02bf47ed9 --- /dev/null +++ b/elpa/magit-20140807.909/magit.info @@ -0,0 +1,1565 @@ +This is /tmp/magit30835t5i/magit-20140807.909/magit.info, produced by +makeinfo version 4.13 from /home/melpa/melpa/working/magit/magit.texi. + +INFO-DIR-SECTION Emacs +START-INFO-DIR-ENTRY +* Magit: (magit). Using Git from Emacs with Magit. +END-INFO-DIR-ENTRY + + Copyright (C) 2008-2013 Magit contributors. (See the header of +magit.el for the lengthy list of Magit contributors.) + + Permission is granted to copy, distribute and/or modify this + document under the terms of the GNU Free Documentation License, + Version 1.2 or any later version published by the Free Software + Foundation; with no Invariant Sections, with no Front-Cover Texts, + and with no Back-Cover Texts. A copy of the license is included + in the section entitled "GNU Free Documentation License". + + +File: magit.info, Node: Top, Next: Introduction, Up: (dir) + +Magit User Manual +***************** + +Magit is an interface to the version control system Git, implemented as +an Emacs extension. + + Unlike Emacs's native Version Control package which strives to +provide a unified interface to various version control systems, Magit +only supports Git and can therefor better take advantage of its native +features. + + Magit supports GNU Emacs 23.2 or later; 24.1 or later is recommended. +Magit supports Git 1.7.2.5 or later; 1.8.2 or later is recommended. +The minimal versions are those available in Debian oldstable. + + When something breaks please see the curated list of known issues +(https://github.com/magit/magit/wiki/Known-Issues) and the FAQ +(https://github.com/magit/magit/wiki/FAQ). If that doesn't help check +the list of all open issues issues +(https://github.com/magit/magit/issues). + + If everything else fails please open a new issue or ask for help on +the mailing list +(https://groups.google.com/forum/?fromgroups#!forum/magit). + +* Menu: + +* Introduction:: +* Acknowledgments:: +* Sections:: +* Status:: +* Untracked files:: +* Staging and Committing:: +* History:: +* Reflogs:: +* Commit Buffer:: +* Diffing:: +* Tagging:: +* Resetting:: +* Stashing:: +* Branches and Remotes:: +* Wazzup:: +* Merging:: +* Rebasing:: +* Interactive Rebasing:: +* Rewriting:: +* Pushing and Pulling:: +* Submodules:: +* Bisecting:: +* Finding commits not merged upstream:: +* Using Magit Extensions:: +* Using Git Directly:: +* GNU Free Documentation License:: + + +File: magit.info, Node: Introduction, Next: Acknowledgments, Prev: Top, Up: Top + +1 Introduction +************** + +With Magit, you can inspect and modify your Git repositories with +Emacs. You can review and commit the changes you have made to the +tracked files, for example, and you can browse the history of past +changes. There is support for cherry picking, reverting, merging, +rebasing, and other common Git operations. + + Magit is not a complete interface to Git; it just aims to make the +most common Git operations convenient. Thus, Magit will likely not +save you from learning Git itself. + + This manual provides a tour of many Magit features. It isn't an +introduction to version control in general, or to Git in particular. + + The main entry point to Magit is `M-x magit-status', which puts you +in Magit's status buffer. You will be using it frequently, so it is +probably a good idea to globally bind `magit-status' to a key of your +choice. + + In addition to the status buffer, Magit will also create buffers that +show lists of commits, buffers with diffs, and other kinds of buffers. +All these buffers are in a mode derived from `magit-mode' and have the +similar key bindings. Not all commands make sense in all contexts, but +a given key will do the same thing in different Magit buffers. + + Naturally, Magit runs the `git' command to do most of the work. The +`*magit-process*' buffer contains the transcript of the most recent +command. You can switch to it with `$'. + + +File: magit.info, Node: Acknowledgments, Next: Sections, Prev: Introduction, Up: Top + +2 Acknowledgments +***************** + +Our thank goes to all current and past contributors, Marius Vollmer who +started the project, and all retired and current maintainers, Phil +Jackson, Peter J. Weisberg, Rémi Vanicat, Nicolas Dudebout, Yann +Hodique, and Jonas Bernoulli. + + For a full list of contributors, see the AUTHORS.md file at the +top-level directory of this distribution or at +`https://github.com/magit/magit/tree/master/AUTHORS.md'. + + +File: magit.info, Node: Sections, Next: Status, Prev: Acknowledgments, Up: Top + +3 Sections +********** + +All Magit buffers are structured into nested 'sections'. These +sections can be hidden and shown individually. When a section is +hidden, only its first line is shown and all its children are +completely invisible. + + The most fine-grained way to control the visibility of sections is +the `TAB' key. It will to toggle the current section (the section that +contains point) between being hidden and being shown. + + Typing `S-TAB' toggles the visibility of the children of the current +section. When all of them are shown, they will all be hidden. +Otherwise, when some or all are hidden, they will all be shown. + + The digit keys `1', `2', `3', and `4' control the visibility of +sections based on levels. Hitting `2', for example, will show sections +on levels one and two, and will hide sections on level 3. However, +only sections that are a parent or child of the current section are +affected. + + For example, when the current section is on level 3 and you hit `1', +the grand-parent of the current section (which is on level one) will be +shown, and the parent of the current section (level 2) will be hidden. +The visibility of no other section will be changed. + + This sounds a bit complicated, but you'll figure it out. + + Using `M-1', `M-2', `M-3', and `M-4' is similar to the unmodified +digits, but now all sections on the respective level are affected, +regardless of whether or not they are related to the current section. + + For example, `M-1' will only show the first lines of the top-level +sections and will hide everything else. Typing `M-4' on the other hand +will show everything. + + Because of the way the status buffer is set up, some changes to +section visibility are more common than others. Files are on level 2 +and diff hunks are on level 4. Thus, you can type `2' to collapse the +diff of the current file, and `M-2' to collapse all files. This +returns the status buffer to its default setup and is a quick way to +unclutter it after drilling down into the modified files. + + Because `2' and `M-2' are so common in the status buffer, they are +bound to additional, more mnemonic keys: `M-h' (hide) and `M-H' (hide +all). Likewise `4' and `M-4' are also available as `M-s' (show) and +`M-S' (show all). + + In other buffers than the status buffer, `M-h', `M-H', `M-s', and +`M-S' might work on different levels than on 2 and 4, but they keep +their general meaning: `M-H' hides all detail, and `M-S' shows +everything. + + +File: magit.info, Node: Status, Next: Untracked files, Prev: Sections, Up: Top + +4 Status +******** + +Running `M-x magit-status' displays the main interface of Magit, the +status buffer. You can have multiple status buffers active at the same +time, each associated with its own Git repository. + + When invoking `M-x magit-status' from within a Git repository, it +will switch to the status buffer of that repository. Otherwise, it +will prompt for a directory. With a prefix argument, it will always +prompt. + + You can set `magit-repo-dirs' to customize how `magit-status' asks +for the repository to work on. When `magit-repo-dirs' is nil, +`magit-status' will simply ask for a directory. + + If you specify a directory that is not a Git repository, `M-x +magit-status' will offer to initialize it as one. + + When `magit-repo-dirs' is not nil, it is treated as a list of +directory names, and `magit-status' will find all Git repositories in +those directories and offer them for completion. (Magit will only look +`magit-repo-dirs-depth' levels deep, however.) + + With two prefix arguments, `magit-status' will always prompt for a +raw directory. + + Thus, you would normally set `magit-repo-dirs' to the places where +you keep most of your Git repositories and switch between them with +`C-u M-x magit-status'. If you want to go to a repository outside of +your normal working areas, or if you want to create a new repository, +you would use `C-u C-u M-x magit-status'. + + You need to explicitly refresh the status buffer when you have made +changes to the repository from outside of Emacs. You can type `g' in +the status buffer itself, or just use `M-x magit-status' instead of +`C-x b' when switching to it. You also need to refresh the status +buffer in this way after saving a file in Emacs. + + The header at the top of the status buffer shows a short summary of +the repository state: where it is located, which branch is checked out, +etc. Below the header are a number of sections that show details about +the working tree and the staging area. You can hide and show them as +described in the previous section. + + The first section shows _Untracked files_, if there are any. See +*note Untracked files:: for more details. + + The next two sections show your local changes. They are explained +fully in the next chapter, *note Staging and Committing::. + + If the current branch is associated with a remote tracking branch, +the status buffer shows the differences between the current branch and +the tracking branch. See *note Pushing and Pulling:: for more +information. + + During a history rewriting session, the status buffer shows the +_Pending changes_ and _Pending commits_ sections. See *note +Rewriting:: for more details. + + +File: magit.info, Node: Untracked files, Next: Staging and Committing, Prev: Status, Up: Top + +5 Untracked files +***************** + +Untracked files are shown in the _Untracked files_ section. + + You can add an untracked file to the staging area with `s'. If +point is on the _Untracked files_ section title when you hit `s', all +untracked files are staged. + + Typing `C-u S' anywhere will also stage all untracked files, +together with all changes to the tracked files. + + You can instruct Git to ignore them by typing `i'. This will add +the filename to the `.gitignore' file. Typing `C-u i' will ask you for +the name of the file to ignore. This is useful to ignore whole +directories, for example. In this case, the minibuffer's future history +(accessible with `M-n') contains predefined values (such as wildcards) +that might be of interest. If prefix argument is negative (for example +after typing `C-- i'), the prompt proposes wildcard by default. The +`I' command is similar to `i' but will add the file to +`.git/info/exclude' instead. + + To delete an untracked file forever, use `k'. If point is on the +_Untracked files_ section title when you hit `k', all untracked files +are deleted. + + +File: magit.info, Node: Staging and Committing, Next: History, Prev: Untracked files, Up: Top + +6 Staging and Committing +************************ + +Committing with Git is a two step process: first you add the changes +you want to commit to a 'staging area' or 'index', and then you commit +them to the repository. This allows you to only commit a subset of the +changes in the working tree. If you are not familiar with this concept +yet, then you should change that as soon as possible using one of the +fine Git tutorials. If you don't, then Git and by extension Magit will +seem rather strange. + + Magit shows uncommitted changes in two sections, depending on whether +the changes have been staged yet. The _Staged changes_ section shows +the changes that will be included in the next commit, while the +_Unstaged changes_ section shows the changes that will be left out. + + To move an unstaged hunk into the staging area, move point into the +hunk and type `s'. Likewise, to unstage a hunk, move point into it and +type `u'. If point is in a diff header when you type `s' or `u', all +hunks belonging to that diff are moved at the same time. + + Currently it is only possible to stage from the status buffer. +Staging and unstaging from diff buffers that show unstaged and staged +changes is not possible yet. + + If the region is active when you type `s' or `u', only the changes +in the region are staged or unstaged. (This works line by line: if the +beginning of a line is in the region it is included in the changes, +otherwise it is not.) + + To change the size of the hunks, you can type `+' or `-' to increase +and decrease, respectively. Typing `0' will reset the hunk size to the +default. + + Typing `C-u s' will ask you for a name of a file to be staged, for +example to stage files that are hidden. + + To move all hunks of all diffs into the staging area in one go, type +`S'. To unstage everything, type `U'. + + Typing `C-u S' will stage all untracked files in addition to the +changes to tracked files. + + You can discard uncommitted changes by moving point into a hunk and +typing `k'. The changes to discard are selected as with `s' and `u'. + + Before committing, you should write a short description of the +changes. + + Type `c c' to pop up a buffer where you can write your change +description. Once you are happy with the description, type `C-c C-c' +in that buffer to perform the commit. + + If you want to write changes in a `ChangeLog' file, you can use `C-x +4 a' on a diff hunk. + + Typing `c c' when the staging area is unused is a special situation. +Normally, the next commit would be empty, but you can configure Magit +to do something more useful by customizing the +`magit-commit-all-when-nothing-staged' variable. One choice is to +instruct the subsequent `C-c C-c' to commit all changes. Another +choice is stage everything at the time of hitting `c c'. + + Typing `M-n' or `M-p' will cycle through the +`log-edit-comment-ring', which will have your previous log messages. +This is particularly useful if you have a hook that occasionally causes +git to refuse your commit. + + To abort a commit use `C-c C-k'. The commit message is saved and +can later be retrieved in the commit message buffer using `M-p' and +`M-a'. + + Typing `C' will also pop up the change description buffer, but in +addition, it will try to insert a ChangeLog-style entry for the change +that point is in. + + +File: magit.info, Node: History, Next: Reflogs, Prev: Staging and Committing, Up: Top + +7 History +********* + +To show the repository history of your current head, type `l l'. A new +buffer will be shown that displays the history in a terse form. The +first paragraph of each commit message is displayed, next to a +representation of the relationships between commits. + + To show the repository history between two branches or between any +two points of the history, type `l r l'. You will be prompted to enter +references for starting point and ending point of the history range; you +can use auto-completion to specify them. A typical use case for ranged +history log display would be `l r l master RET new-feature RET' that +will display commits on the new-feature branch that are not in master; +these commits can then be inspected and cherry-picked, for example. + + More thorough filtering can be done by supplying `l' with one or +more suffix arguments, as displayed in its popup. `=g' ('Grep') for +example, limits the output to commits of which the log message matches +a specific string/regex. + + Typing `l L' (or `l C-u L') will show the log in a more verbose form. + + Magit will show only `magit-log-cutoff-length' entries. `e' will +show twice as many entries. `C-u e' will show all entries, and given a +numeric prefix argument, `e' will add this number of entries. + + You can move point to a commit and then cause various things to +happen with it. (The following commands work in any list of commits, +such as the one shown in the _Unpushed commits_ section.) + + Typing `RET' will pop up more information about the current commit +and move point into the new buffer. *Note Commit Buffer::. Typing +`SPC' and `DEL' will also show the information, but will scroll the new +buffer up or down (respectively) when typed again. + + Typing `a' will apply the current commit to your current branch. +This is useful when you are browsing the history of some other branch +and you want to `cherry-pick' some changes from it. A typical +situation is applying selected bug fixes from the development version +of a program to a release branch. The cherry-picked changes will not +be committed automatically; you need to do that explicitly. + + Typing `A' will cherry-pick the current commit and will also commit +the changes automatically when there have not been any conflicts. + + Typing `v' will revert the current commit. Thus, it will apply the +changes made by that commit in reverse. This is obviously useful to +cleanly undo changes that turned out to be wrong. As with `a', you +need to commit the changes explicitly. + + Typing `C-w' will copy the sha1 of the current commit into the kill +ring. + + Typing `=' will show the differences from the current commit to the +"marked" commit. + + You can mark the current commit by typing `.'. When the current +commit is already marked, typing `.' will unmark it. To unmark the +marked commit no matter where point is, use `C-u .'. + + Some commands, such as `=', will use the current commit and the +marked commit as implicit arguments. Other commands will offer the +marked commit as a default when prompting for their arguments. + + +File: magit.info, Node: Reflogs, Next: Commit Buffer, Prev: History, Up: Top + +8 Reflogs +********* + +You can use `l h' and `l H' to browse your _reflog_, the local history +of changes made to your repository heads. Typing `H' will ask for a +head, while `l h' will show the reflog of `HEAD'. + + The resulting buffer is just like the buffer produced by `l l' and +`l L' that shows the commit history. + + +File: magit.info, Node: Commit Buffer, Next: Diffing, Prev: Reflogs, Up: Top + +9 Commit Buffer +*************** + +When you view a commit (perhaps by selecting it in the log buffer, +*note History::), the "commit buffer" is displayed, showing you +information about the commit and letting you interact with it. + + By placing your cursor within the diff or hunk and typing `a', you +can apply the same patch to your working copy. This is useful when you +want to copy a change from another branch, but don't necessarily want +to cherry-pick the whole commit. + + By typing `v' you can apply the patch in reverse, removing all the +lines that were added and adding all the lines that were removed. This +is a convenient way to remove a change after determining that it +introduced a bug. + + If the commit message refers to any other commits in the repository +by their unique hash, the hash will be highlighted and you will be able +to visit the referenced commit either by clicking on it or by moving +your cursor onto it and pressing `RET'. + + The commit buffer maintains a history of the commits it has shown. +After visiting a referenced commit you can type `C-c C-b' to get back +to where you came from. To go forward in the history, type `C-c C-f'. +There are also `[back]' and `[forward]' buttons at the bottom of the +buffer. + + +File: magit.info, Node: Diffing, Next: Tagging, Prev: Commit Buffer, Up: Top + +10 Diffing +********** + +Magit typically shows diffs in the "unified" format. + + In any buffer that shows a diff, you can type `e' anywhere within +the diff to show the two versions of the file in Ediff. If the diff is +of a file in the status buffer that needs to be merged, you will be +able to use Ediff as an interactive merge tool. Otherwise, Ediff will +simply show the two versions of the file. + + To show the changes from your working tree to another revision, type +`d'. To show the changes between two arbitrary revisions, type `D'. + + You can use `a' within the diff output to apply the changes to your +working tree. As usual when point is in a diff header for a file, all +changes for that file are applied, and when it is in a hunk, only that +hunk is. When the region is active, the applied changes are restricted +to that region. + + Typing `v' will apply the selected changes in reverse. + + +File: magit.info, Node: Tagging, Next: Resetting, Prev: Diffing, Up: Top + +11 Tagging +********** + +Typing `t t' will make a lightweight tag. Typing `t a' will make an +annotated tag. It will put you in the normal `*magit-log-edit' buffer +for writing commit messages, but typing `C-c C-c' in it will make the +tag instead. This is controlled by the `Tag' field that will be added +to the `*magit-log-edit*' buffer. You can edit it, if you like. + + +File: magit.info, Node: Resetting, Next: Stashing, Prev: Tagging, Up: Top + +12 Resetting +************ + +Once you have added a commit to your local repository, you can not +change that commit anymore in any way. But you can reset your current +head to an earlier commit and start over. + + If you have published your history already, rewriting it in this way +can be confusing and should be avoided. However, rewriting your local +history is fine and it is often cleaner to fix mistakes this way than +by reverting commits (with `v', for example). + + Typing `x' will ask for a revision and reset your current head to +it. No changes will be made to your working tree and staging area. +Thus, the _Staged changes_ section in the status buffer will show the +changes that you have removed from your commit history. You can commit +the changes again as if you had just made them, thus rewriting history. + + Typing `x' while point is in a line that describes a commit will +offer this commit as the default revision to reset to. Thus, you can +move point to one of the commits in the _Unpushed commits_ section and +hit `x RET' to reset your current head to it. + + Type `X' to reset your working tree and staging area to the most +recently committed state. This will discard your local modifications, +so be careful. + + You can give a prefix to `x' if you want to reset both the current +head and your working tree to a given commit. This is the same as +first using an unprefixed `x' to reset only the head, and then using +`X'. + + +File: magit.info, Node: Stashing, Next: Branches and Remotes, Prev: Resetting, Up: Top + +13 Stashing +*********** + +You can create a new stash with `z z'. Your stashes will be listed in +the status buffer, and you can apply them with `a' and pop them with +`A'. To drop a stash, use `k'. + + With a prefix argument, both `a' and `A' will attempt to reinstate +the index as well as the working tree from the stash. + + Typing `z -k z' will create a stash just like `z z', but will leave +the changes in your working tree and index. This makes it easier to, +for example, test multiple variations of the same change. + + If you just want to make quick snapshots in between edits, you can +use `z s', which automatically enters a timestamp as description, and +keeps your working tree and index intact by default. + + You can visit and show stashes in the usual way: Typing `SPC' and +`DEL' will pop up a buffer with the description of the stash and scroll +it, typing `RET' will move point into that buffer. Using `C-u RET' +will move point into that buffer in other window. + + +File: magit.info, Node: Branches and Remotes, Next: Wazzup, Prev: Stashing, Up: Top + +14 Branches and Remotes +*********************** + +The current branch is indicated in the header of the status buffer. If +this branch is tracking a remote branch, the latter is also indicated. + + Branches and remotes can be manipulated directly with a popup menu or +through the branch manager. Using the popup menu allows you to quickly +make changes from any magit buffer. The branch manager is a separate +buffer called `*magit-branches*'. It displays information about +branches and remotes and offers a local key map for shorter key +bindings. The two interaction methods are described in more details +below. + +* Menu: + +* Branches Popup:: +* Remotes Popup:: +* Branches in the Branch Manager:: +* Remotes in the Branch Manager:: + + +File: magit.info, Node: Branches Popup, Next: Remotes Popup, Up: Branches and Remotes + +14.1 Branches Popup +=================== + +Typing `b' will display a popup menu to manipulate branches. + + You can switch to a different branch by typing `b b'. This will +immediately checkout the branch into your working copy, so you +shouldn't have any local modifications when switching branches. + + If you try to switch to a remote branch, Magit will offer to create a +local tracking branch for it instead. This way, you can easily start +working on new branches that have appeared in a remote repository. + + Typing `b b' while point is at a commit description will offer that +commit as the default to switch to. This will result in a detached +head. + + To create a new branch and switch to it immediately, type `b c'. + + To delete a branch, type `b k'. If you're currently on that branch, +Magit will offer to switch to the 'master' branch. + + Typing `b r' will let you rename a branch. Unless a branch with +the same name already exists, obviously... + + Deleting a branch is only possible if it's already fully merged into +HEAD or its upstream branch. Unless you type `b C-u k', that is. Here +be dragons... + + Typing `b v' will launch the branch manager. + + +File: magit.info, Node: Remotes Popup, Next: Branches in the Branch Manager, Prev: Branches Popup, Up: Branches and Remotes + +14.2 Remotes Popup +================== + +Typing `M' will display a popup menu to manipulate remotes. + + To add a new remote, type `M a'. + + To delete a remote type `M k'. + + Typing `M r' will let you rename a remote. + + +File: magit.info, Node: Branches in the Branch Manager, Next: Remotes in the Branch Manager, Prev: Remotes Popup, Up: Branches and Remotes + +14.3 Branches in the Branch Manager +=================================== + +In the branch manager, each branch is displayed on a separate line. The +current local branch is marked by a "#" in front of the name. Remote +branches are grouped by the remote they come from. + + If a local branch tracks a remote branch some extra information is +printed on the branch line. The format is the following: " +[ : ahead , behind ]". "" +is omitted if it is identical to "". "ahead" and "behind" +information are only displayed if necessary. + + To check out a branch, move your cursor to the desired branch and +press `RET'. + + Typing `c' will create a new branch. + + Typing `k' will delete the branch in the current line, and `C-u k' +deletes it even if it hasn't been merged into the current local branch. +Deleting works for both local and remote branches. + + Typing `r' on a branch will rename it. + + Typing `T' on a local branch, changes which remote branch it tracks. + + +File: magit.info, Node: Remotes in the Branch Manager, Prev: Branches in the Branch Manager, Up: Branches and Remotes + +14.4 Remotes in the Branch Manager +================================== + +In the branch manager, each remote is displayed on a separate line. The +format is the following " (, )". "" +is omitted if it is not set. The associated branches are listed under +this line. + + Typing `a' will add a new remote. + + Typing `k' will delete the remote in the current line. + + Typing `r' on a remote will rename it. + + +File: magit.info, Node: Wazzup, Next: Merging, Prev: Branches and Remotes, Up: Top + +15 Wazzup +********* + +Typing `w' will show a summary of how your other branches relate to the +current branch. + + For each branch, you will get a section that lists the commits in +that branch that are not in the current branch. The sections are +initially collapsed; you need to explicitly open them with `TAB' (or +similar) to show the lists of commits. + + When point is on a _N unmerged commits in ..._ title, the +corresponding branch will be offered as the default for a merge. + + Hitting `i' on a branch title will ignore this branch in the wazzup +view. You can use `C-u w' to show all branches, including the ignored +ones. Hitting `i' on an already ignored branch in that view will +unignore it. + + +File: magit.info, Node: Merging, Next: Rebasing, Prev: Wazzup, Up: Top + +16 Merging +********** + +Magit offers two ways to merge branches: manual and automatic. A +manual merge will apply all changes to your working tree and staging +area, but will not commit them, while an automatic merge will go ahead +and commit them immediately. + + Type `m m' to initiate merge. + + After initiating a merge, the header of the status buffer might +remind you that the next commit will be a merge commit (with more than +one parent). If you want to abort a manual merge, just do a hard reset +to HEAD with `X'. + + Merges can fail if the two branches you want to merge introduce +conflicting changes. In that case, the automatic merge stops before the +commit, essentially falling back to a manual merge. You need to resolve +the conflicts for example with `e' and stage the resolved files, for +example with `S'. + + You can not stage individual hunks one by one as you resolve them, +you can only stage whole files once all conflicts in them have been +resolved. + + +File: magit.info, Node: Rebasing, Next: Interactive Rebasing, Prev: Merging, Up: Top + +17 Rebasing +*********** + +Typing `R' in the status buffer will initiate a rebase or, if one is +already in progress, ask you how to continue. + + When a rebase is stopped in the middle because of a conflict, the +header of the status buffer will indicate how far along you are in the +series of commits that are being replayed. When that happens, you +should resolve the conflicts and stage everything and hit `R c' to +continue the rebase. Alternatively, hitting `c' or `C' while in the +middle of a rebase will also ask you whether to continue the rebase. + + Of course, you can initiate a rebase in any number of ways, by +configuring `git pull' to rebase instead of merge, for example. Such a +rebase can be finished with `R' as well. + + +File: magit.info, Node: Interactive Rebasing, Next: Rewriting, Prev: Rebasing, Up: Top + +18 Interactive Rebasing +*********************** + +Typing `E' in the status buffer will initiate an interactive rebase. +This is equivalent to running `git rebase --interactive' at the command +line. The `git-rebase-todo' file will be opened in an Emacs buffer for +you to edit. This file is opened using `emacsclient', so just edit +this file as you normally would, then call the `server-edit' function +(typically bound to `C-x #') to tell Emacs you are finished editing, +and the rebase will proceed as usual. + + If you have loaded `rebase-mode.el' (which is included in the Magit +distribution), the `git-rebase-todo' buffer will be in `rebase-mode'. +This mode disables normal text editing but instead provides single-key +commands (shown in the buffer) to perform all the edits that you would +normally do manually, including changing the operation to be performed +each commit ("pick", "squash", etc.), deleting (commenting out) commits +from the list, and reordering commits. You can finish editing the +buffer and proceed with the rebase by pressing `C-c C-c', which is +bound to `server-edit' in this mode, and you can abort the rebase with +`C-c C-k', just like when editing a commit message in Magit. + + +File: magit.info, Node: Rewriting, Next: Pushing and Pulling, Prev: Interactive Rebasing, Up: Top + +19 Rewriting +************ + +As hinted at earlier, you can rewrite your commit history. For +example, you can reset the current head to an earlier commit with `x'. +This leaves the working tree unchanged, and the status buffer will show +all the changes that have been made since that new value of the current +head. You can commit these changes again, possibly splitting them into +multiple commits as you go along. + + Amending your last commit is a common special case of rewriting +history like this. + + Another common way to rewrite history is to reset the head to an +earlier commit, and then to cherry pick the previous commits in a +different order. You could pick them from the reflog, for example. + + Magit has several commands that can simplify the book keeping +associated with rewriting. These commands all start with the `r' +prefix key. + + (Unless you already do so, we recommend that you don't use the +functionality described here. It is semi-deprecated and will be +removed once its unique features have been ported to the `git rebase +--interactive' workflow. Even now the latter is almost always the +better option.) + + Typing `r b' will start a rewrite operation. You will be prompted +for a _base_ commit. This commit and all subsequent commits up until +the current head are then put in a list of _Pending commits_, after +which the current head will be reset to the _parent_ of the base +commit. This can be configured to behave like `git rebase', i.e. +exclude the selected base commit from the rewrite operation, with the +`magit-rewrite-inclusive' variable. + + You would then typically use `a' and `A' to cherry pick commits from +the list of pending commits in the desired order, until all have been +applied. Magit shows which commits have been applied by changing their +marker from `*' to `.'. + + Using `A' will immediately commit the commit (as usual). If you +want to combine multiple previous commits into a single new one, use +`a' to apply them all to your working tree, and then commit them +together. + + Magit has no explicit support for rewriting merge commits. It will +happily include merge commits in the list of pending commits, but there +is no way of replaying them automatically. You have to redo the merge +explicitly. + + You can also use `v' to revert a commit when you have changed your +mind. This will change the `.' mark back to `*'. + + Once you are done with the rewrite, type `r s' to remove the book +keeping information from the status buffer. + + If you rather wish to start over, type `r a'. This will abort the +rewriting, resetting the current head back to the value it had before +the rewrite was started with `r b'. + + Typing `r f' will _finish_ the rewrite: it will apply all unused +commits one after the other, as if you would us `A' with all of them. + + You can change the `*' and `.' marks of a pending commit explicitly +with `r *' and `r .'. + + In addition to a list of pending commits, the status buffer will show +the _Pending changes_. This section shows the diff between the +original head and the current head. You can use it to review the +changes that you still need to rewrite, and you can apply hunks from +it, like from any other diff. + + +File: magit.info, Node: Pushing and Pulling, Next: Submodules, Prev: Rewriting, Up: Top + +20 Pushing and Pulling +********************** + +Magit will run `git push' when you type `P P'. If you give a prefix +argument to `P P', you will be prompted for the repository to push to. +When no default remote repository has been configured yet for the +current branch, you will be prompted as well. Typing `P P' will only +push the current branch to the remote. In other words, it will run +`git push '. The branch will be created in the remote +if it doesn't exist already. The local branch will be configured so +that it pulls from the new remote branch. If you give a double prefix +argument to `P P', you will be prompted in addition for the target +branch to push to. In other words, it will run `git push +:'. + + Typing `f f' will run `git fetch'. It will prompt for the name of +the remote to update if there is no default one. Typing `f o' will +always prompt for the remote. Typing `F F' will run `git pull'. When +you don't have a default branch configured to be pulled into the +current one, you will be asked for it. + + If there is a default remote repository for the current branch, Magit +will show that repository in the status buffer header. + + In this case, the status buffer will also have a _Unpushed commits_ +section that shows the commits on your current head that are not in the +branch named `/'. This section works just like the +history buffer: you can see details about a commit with `RET', compare +two of them with `.' and `=', and you can reset your current head to +one of them with `x', for example. If you want to push the changes +then type `P P'. + + When the remote branch has changes that are not in the current +branch, Magit shows them in a section called _Unpulled changes_. Typing +`F F' will fetch and merge them into the current branch. + + +File: magit.info, Node: Submodules, Next: Bisecting, Prev: Pushing and Pulling, Up: Top + +21 Submodules +************* + +`o u' + Update the submodules, with a prefix argument it will also + initialize them. + +`o i' + Initialize the submodules. + +`o b' + Update and initialize the submodules in one go (same as C-u o u). + +`o s' + Synchronizes submodules' remote URL configuration setting to the + value specified in .gitmodules. + + +File: magit.info, Node: Bisecting, Next: Finding commits not merged upstream, Prev: Submodules, Up: Top + +22 Bisecting +************ + +Magit supports bisecting by showing how many revisions and steps are +left to be tested in the status buffer. You can control the bisect +session from both the status and from log buffers with the `B' key menu. + + Typing `B s' will start a bisect session. You will be prompted for +a revision that is known to be bad (defaults to _HEAD_) and for a +revision that is known to be good (defaults to the revision at point if +there is one). git will select a revision for you to test, and Magit +will update its status buffer accordingly. + + You can tell git that the current revision is good with `B g', that +it is bad with `B b' or that git should skip it with `B k'. You can +also tell git to go into full automatic mode by giving it the name of a +script to run for each revision to test with `B u'. + + The current status can be shown as a log with `B l'. It contains +the revisions that have already been tested and your decisions about +their state. + + The revisions left to test can be visualized in gitk with `B v'. + + When you're finished bisecting you have to reset the session with `B +r'. + + +File: magit.info, Node: Finding commits not merged upstream, Next: Using Magit Extensions, Prev: Bisecting, Up: Top + +23 Finding commits not merged upstream +************************************** + +One of the comforts of git is that it can tell you which commits have +been merged upstream but not locally and vice versa. Git's sub-command +for this is `cherry' (not to be confused with `cherry-pick'). Magit +has support for this by invoking `magit-cherry' which is bound to `y' +by default. + + Magit will then ask you first for the upstream revision (which +defaults to the currently tracked remote branch if any) and the head +revision (which defaults to the current branch) to use in the +comparison. You will then see a new buffer in which all commits are +listed with a directional marker, their revision and the commit +message's first line. The directional marker is either `+' indicating +a commit that's present in upstream but not in head or `-' which +indicates a commit present in head but not in upstream. + + From this list you can use the usual key bindings for cherry-picking +individual commits (`a' for cherry-picking without committing and `A' +for the same plus the automatic commit). The buffer is refreshed +automatically after each cherry-pick. + + +File: magit.info, Node: Using Magit Extensions, Next: Using Git Directly, Prev: Finding commits not merged upstream, Up: Top + +24 Magit Extensions +******************* + +* Menu: + +* Activating extensions:: +* Interfacing with Subversion:: +* Interfacing with Topgit:: +* Interfacing with StGit:: + + +File: magit.info, Node: Activating extensions, Next: Interfacing with Subversion, Up: Using Magit Extensions + +24.1 Activating extensions +========================== + +Magit comes with a couple of shipped extensions that allow interaction +with `git-svn', `topgit' and `stgit'. See following sections for +specific details on how to use them. + + Extensions can be activated globally or on a per-repository basis. +Since those extensions are implemented as minor modes, one can use for +example `M-x magit-topgit-mode' to toggle the `topgit' extension, +making the corresponding section and commands (un)available. + + In order to do that automatically (and for every repository), one can +use for example: + + (add-hook 'magit-mode-hook 'turn-on-magit-topgit) + + Magit also allows configuring different extensions, based on the git +repository configuration. + + (add-hook 'magit-mode-hook 'magit-load-config-extensions) + + This will read git configuration variables and activate the relevant +extensions. + + For example, after running the following commands, the `topgit' +extension will be loaded for every repository, while the `svn' one will +be loaded only for the current one. + + $ git config --global --add magit.extension topgit + $ git config --add magit.extension svn + + Note the `--add' flag, which means that each extension gets its own +line in the `config' file. + + +File: magit.info, Node: Interfacing with Subversion, Next: Interfacing with Topgit, Prev: Activating extensions, Up: Using Magit Extensions + +24.2 Interfacing with Subversion +================================ + +Typing `N r' runs `git svn rebase', typing `N c' runs `git svn dcommit' +and typing `N f' runs `git svn fetch'. + + `N s' will prompt you for a (numeric, Subversion) revision and then +search for a corresponding Git sha1 for the commit. This is limited to +the path of the remote Subversion repository. With a prefix (`C-u N s' +the user will also be prompted for a branch to search in. + + +File: magit.info, Node: Interfacing with Topgit, Next: Interfacing with StGit, Prev: Interfacing with Subversion, Up: Using Magit Extensions + +24.3 Interfacing with Topgit +============================ + +Topgit (http://repo.or.cz/r/topgit.git) is a patch queue manager that +aims at being close as possible to raw Git, which makes it easy to use +with Magit. In particular, it does not require to use a different set +of commands for "commit", "update", and other operations. + + `magit-topgit.el' provides basic integration with Magit, mostly by +providing a "Topics" section. + + Topgit branches can be created the regular way, by using a "t/" +prefix by convention. So, creating a "t/foo" branch will actually +populate the "Topics" section with one more branch after committing +`.topdeps' and `.topmsg'. + + Also, the way we pull (see *note Pushing and Pulling::) such a +branch is slightly different, since it requires updating the various +dependencies of that branch. This should be mostly transparent, except +in case of conflicts. + + +File: magit.info, Node: Interfacing with StGit, Prev: Interfacing with Topgit, Up: Using Magit Extensions + +24.4 Interfacing with StGit +=========================== + +StGit (http://www.procode.org/stgit) is a Python application providing +similar functionality to Quilt (i.e. pushing/popping patches to/from a +stack) on top of Git. These operations are performed using Git +commands and the patches are stored as Git commit objects, allowing +easy merging of the StGit patches into other repositories using +standard Git functionality. + + `magit-stgit.el' provides basic integration with Magit, mostly by +providing a "Series" section, whose patches can be seen as regular +commits through the "visit" action. + + You can change the current patch in a series with the "apply" action, +as well as you can delete them using the "discard" action. + + Additionally, the `magit-stgit-refresh' and `magit-stgit-rebase' +commands let you perform the respective StGit operations. + + +File: magit.info, Node: Using Git Directly, Next: GNU Free Documentation License, Prev: Using Magit Extensions, Up: Top + +25 Using Git Directly +********************* + +For situations when Magit doesn't do everything you need, you can run +raw Git commands using `:'. This will prompt for a Git command, run +it, and refresh the status buffer. The output can be viewed by typing +`$'. + + +File: magit.info, Node: GNU Free Documentation License, Prev: Using Git Directly, Up: Top + +Appendix A GNU Free Documentation License +***************************************** + + Version 1.2, November 2002 + + Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + 0. PREAMBLE + + The purpose of this License is to make a manual, textbook, or other + functional and useful document "free" in the sense of freedom: to + assure everyone the effective freedom to copy and redistribute it, + with or without modifying it, either commercially or + noncommercially. Secondarily, this License preserves for the + author and publisher a way to get credit for their work, while not + being considered responsible for modifications made by others. + + This License is a kind of "copyleft", which means that derivative + works of the document must themselves be free in the same sense. + It complements the GNU General Public License, which is a copyleft + license designed for free software. + + We have designed this License in order to use it for manuals for + free software, because free software needs free documentation: a + free program should come with manuals providing the same freedoms + that the software does. But this License is not limited to + software manuals; it can be used for any textual work, regardless + of subject matter or whether it is published as a printed book. + We recommend this License principally for works whose purpose is + instruction or reference. + + 1. APPLICABILITY AND DEFINITIONS + + This License applies to any manual or other work, in any medium, + that contains a notice placed by the copyright holder saying it + can be distributed under the terms of this License. Such a notice + grants a world-wide, royalty-free license, unlimited in duration, + to use that work under the conditions stated herein. The + "Document", below, refers to any such manual or work. Any member + of the public is a licensee, and is addressed as "you". You + accept the license if you copy, modify or distribute the work in a + way requiring permission under copyright law. + + A "Modified Version" of the Document means any work containing the + Document or a portion of it, either copied verbatim, or with + modifications and/or translated into another language. + + A "Secondary Section" is a named appendix or a front-matter section + of the Document that deals exclusively with the relationship of the + publishers or authors of the Document to the Document's overall + subject (or to related matters) and contains nothing that could + fall directly within that overall subject. (Thus, if the Document + is in part a textbook of mathematics, a Secondary Section may not + explain any mathematics.) The relationship could be a matter of + historical connection with the subject or with related matters, or + of legal, commercial, philosophical, ethical or political position + regarding them. + + The "Invariant Sections" are certain Secondary Sections whose + titles are designated, as being those of Invariant Sections, in + the notice that says that the Document is released under this + License. If a section does not fit the above definition of + Secondary then it is not allowed to be designated as Invariant. + The Document may contain zero Invariant Sections. If the Document + does not identify any Invariant Sections then there are none. + + The "Cover Texts" are certain short passages of text that are + listed, as Front-Cover Texts or Back-Cover Texts, in the notice + that says that the Document is released under this License. A + Front-Cover Text may be at most 5 words, and a Back-Cover Text may + be at most 25 words. + + A "Transparent" copy of the Document means a machine-readable copy, + represented in a format whose specification is available to the + general public, that is suitable for revising the document + straightforwardly with generic text editors or (for images + composed of pixels) generic paint programs or (for drawings) some + widely available drawing editor, and that is suitable for input to + text formatters or for automatic translation to a variety of + formats suitable for input to text formatters. A copy made in an + otherwise Transparent file format whose markup, or absence of + markup, has been arranged to thwart or discourage subsequent + modification by readers is not Transparent. An image format is + not Transparent if used for any substantial amount of text. A + copy that is not "Transparent" is called "Opaque". + + Examples of suitable formats for Transparent copies include plain + ASCII without markup, Texinfo input format, LaTeX input format, + SGML or XML using a publicly available DTD, and + standard-conforming simple HTML, PostScript or PDF designed for + human modification. Examples of transparent image formats include + PNG, XCF and JPG. Opaque formats include proprietary formats that + can be read and edited only by proprietary word processors, SGML or + XML for which the DTD and/or processing tools are not generally + available, and the machine-generated HTML, PostScript or PDF + produced by some word processors for output purposes only. + + The "Title Page" means, for a printed book, the title page itself, + plus such following pages as are needed to hold, legibly, the + material this License requires to appear in the title page. For + works in formats which do not have any title page as such, "Title + Page" means the text near the most prominent appearance of the + work's title, preceding the beginning of the body of the text. + + A section "Entitled XYZ" means a named subunit of the Document + whose title either is precisely XYZ or contains XYZ in parentheses + following text that translates XYZ in another language. (Here XYZ + stands for a specific section name mentioned below, such as + "Acknowledgements", "Dedications", "Endorsements", or "History".) + To "Preserve the Title" of such a section when you modify the + Document means that it remains a section "Entitled XYZ" according + to this definition. + + The Document may include Warranty Disclaimers next to the notice + which states that this License applies to the Document. These + Warranty Disclaimers are considered to be included by reference in + this License, but only as regards disclaiming warranties: any other + implication that these Warranty Disclaimers may have is void and + has no effect on the meaning of this License. + + 2. VERBATIM COPYING + + You may copy and distribute the Document in any medium, either + commercially or noncommercially, provided that this License, the + copyright notices, and the license notice saying this License + applies to the Document are reproduced in all copies, and that you + add no other conditions whatsoever to those of this License. You + may not use technical measures to obstruct or control the reading + or further copying of the copies you make or distribute. However, + you may accept compensation in exchange for copies. If you + distribute a large enough number of copies you must also follow + the conditions in section 3. + + You may also lend copies, under the same conditions stated above, + and you may publicly display copies. + + 3. COPYING IN QUANTITY + + If you publish printed copies (or copies in media that commonly + have printed covers) of the Document, numbering more than 100, and + the Document's license notice requires Cover Texts, you must + enclose the copies in covers that carry, clearly and legibly, all + these Cover Texts: Front-Cover Texts on the front cover, and + Back-Cover Texts on the back cover. Both covers must also clearly + and legibly identify you as the publisher of these copies. The + front cover must present the full title with all words of the + title equally prominent and visible. You may add other material + on the covers in addition. Copying with changes limited to the + covers, as long as they preserve the title of the Document and + satisfy these conditions, can be treated as verbatim copying in + other respects. + + If the required texts for either cover are too voluminous to fit + legibly, you should put the first ones listed (as many as fit + reasonably) on the actual cover, and continue the rest onto + adjacent pages. + + If you publish or distribute Opaque copies of the Document + numbering more than 100, you must either include a + machine-readable Transparent copy along with each Opaque copy, or + state in or with each Opaque copy a computer-network location from + which the general network-using public has access to download + using public-standard network protocols a complete Transparent + copy of the Document, free of added material. If you use the + latter option, you must take reasonably prudent steps, when you + begin distribution of Opaque copies in quantity, to ensure that + this Transparent copy will remain thus accessible at the stated + location until at least one year after the last time you + distribute an Opaque copy (directly or through your agents or + retailers) of that edition to the public. + + It is requested, but not required, that you contact the authors of + the Document well before redistributing any large number of + copies, to give them a chance to provide you with an updated + version of the Document. + + 4. MODIFICATIONS + + You may copy and distribute a Modified Version of the Document + under the conditions of sections 2 and 3 above, provided that you + release the Modified Version under precisely this License, with + the Modified Version filling the role of the Document, thus + licensing distribution and modification of the Modified Version to + whoever possesses a copy of it. In addition, you must do these + things in the Modified Version: + + A. Use in the Title Page (and on the covers, if any) a title + distinct from that of the Document, and from those of + previous versions (which should, if there were any, be listed + in the History section of the Document). You may use the + same title as a previous version if the original publisher of + that version gives permission. + + B. List on the Title Page, as authors, one or more persons or + entities responsible for authorship of the modifications in + the Modified Version, together with at least five of the + principal authors of the Document (all of its principal + authors, if it has fewer than five), unless they release you + from this requirement. + + C. State on the Title page the name of the publisher of the + Modified Version, as the publisher. + + D. Preserve all the copyright notices of the Document. + + E. Add an appropriate copyright notice for your modifications + adjacent to the other copyright notices. + + F. Include, immediately after the copyright notices, a license + notice giving the public permission to use the Modified + Version under the terms of this License, in the form shown in + the Addendum below. + + G. Preserve in that license notice the full lists of Invariant + Sections and required Cover Texts given in the Document's + license notice. + + H. Include an unaltered copy of this License. + + I. Preserve the section Entitled "History", Preserve its Title, + and add to it an item stating at least the title, year, new + authors, and publisher of the Modified Version as given on + the Title Page. If there is no section Entitled "History" in + the Document, create one stating the title, year, authors, + and publisher of the Document as given on its Title Page, + then add an item describing the Modified Version as stated in + the previous sentence. + + J. Preserve the network location, if any, given in the Document + for public access to a Transparent copy of the Document, and + likewise the network locations given in the Document for + previous versions it was based on. These may be placed in + the "History" section. You may omit a network location for a + work that was published at least four years before the + Document itself, or if the original publisher of the version + it refers to gives permission. + + K. For any section Entitled "Acknowledgements" or "Dedications", + Preserve the Title of the section, and preserve in the + section all the substance and tone of each of the contributor + acknowledgements and/or dedications given therein. + + L. Preserve all the Invariant Sections of the Document, + unaltered in their text and in their titles. Section numbers + or the equivalent are not considered part of the section + titles. + + M. Delete any section Entitled "Endorsements". Such a section + may not be included in the Modified Version. + + N. Do not retitle any existing section to be Entitled + "Endorsements" or to conflict in title with any Invariant + Section. + + O. Preserve any Warranty Disclaimers. + + If the Modified Version includes new front-matter sections or + appendices that qualify as Secondary Sections and contain no + material copied from the Document, you may at your option + designate some or all of these sections as invariant. To do this, + add their titles to the list of Invariant Sections in the Modified + Version's license notice. These titles must be distinct from any + other section titles. + + You may add a section Entitled "Endorsements", provided it contains + nothing but endorsements of your Modified Version by various + parties--for example, statements of peer review or that the text + has been approved by an organization as the authoritative + definition of a standard. + + You may add a passage of up to five words as a Front-Cover Text, + and a passage of up to 25 words as a Back-Cover Text, to the end + of the list of Cover Texts in the Modified Version. Only one + passage of Front-Cover Text and one of Back-Cover Text may be + added by (or through arrangements made by) any one entity. If the + Document already includes a cover text for the same cover, + previously added by you or by arrangement made by the same entity + you are acting on behalf of, you may not add another; but you may + replace the old one, on explicit permission from the previous + publisher that added the old one. + + The author(s) and publisher(s) of the Document do not by this + License give permission to use their names for publicity for or to + assert or imply endorsement of any Modified Version. + + 5. COMBINING DOCUMENTS + + You may combine the Document with other documents released under + this License, under the terms defined in section 4 above for + modified versions, provided that you include in the combination + all of the Invariant Sections of all of the original documents, + unmodified, and list them all as Invariant Sections of your + combined work in its license notice, and that you preserve all + their Warranty Disclaimers. + + The combined work need only contain one copy of this License, and + multiple identical Invariant Sections may be replaced with a single + copy. If there are multiple Invariant Sections with the same name + but different contents, make the title of each such section unique + by adding at the end of it, in parentheses, the name of the + original author or publisher of that section if known, or else a + unique number. Make the same adjustment to the section titles in + the list of Invariant Sections in the license notice of the + combined work. + + In the combination, you must combine any sections Entitled + "History" in the various original documents, forming one section + Entitled "History"; likewise combine any sections Entitled + "Acknowledgements", and any sections Entitled "Dedications". You + must delete all sections Entitled "Endorsements." + + 6. COLLECTIONS OF DOCUMENTS + + You may make a collection consisting of the Document and other + documents released under this License, and replace the individual + copies of this License in the various documents with a single copy + that is included in the collection, provided that you follow the + rules of this License for verbatim copying of each of the + documents in all other respects. + + You may extract a single document from such a collection, and + distribute it individually under this License, provided you insert + a copy of this License into the extracted document, and follow + this License in all other respects regarding verbatim copying of + that document. + + 7. AGGREGATION WITH INDEPENDENT WORKS + + A compilation of the Document or its derivatives with other + separate and independent documents or works, in or on a volume of + a storage or distribution medium, is called an "aggregate" if the + copyright resulting from the compilation is not used to limit the + legal rights of the compilation's users beyond what the individual + works permit. When the Document is included in an aggregate, this + License does not apply to the other works in the aggregate which + are not themselves derivative works of the Document. + + If the Cover Text requirement of section 3 is applicable to these + copies of the Document, then if the Document is less than one half + of the entire aggregate, the Document's Cover Texts may be placed + on covers that bracket the Document within the aggregate, or the + electronic equivalent of covers if the Document is in electronic + form. Otherwise they must appear on printed covers that bracket + the whole aggregate. + + 8. TRANSLATION + + Translation is considered a kind of modification, so you may + distribute translations of the Document under the terms of section + 4. Replacing Invariant Sections with translations requires special + permission from their copyright holders, but you may include + translations of some or all Invariant Sections in addition to the + original versions of these Invariant Sections. You may include a + translation of this License, and all the license notices in the + Document, and any Warranty Disclaimers, provided that you also + include the original English version of this License and the + original versions of those notices and disclaimers. In case of a + disagreement between the translation and the original version of + this License or a notice or disclaimer, the original version will + prevail. + + If a section in the Document is Entitled "Acknowledgements", + "Dedications", or "History", the requirement (section 4) to + Preserve its Title (section 1) will typically require changing the + actual title. + + 9. TERMINATION + + You may not copy, modify, sublicense, or distribute the Document + except as expressly provided for under this License. Any other + attempt to copy, modify, sublicense or distribute the Document is + void, and will automatically terminate your rights under this + License. However, parties who have received copies, or rights, + from you under this License will not have their licenses + terminated so long as such parties remain in full compliance. + + 10. FUTURE REVISIONS OF THIS LICENSE + + The Free Software Foundation may publish new, revised versions of + the GNU Free Documentation License from time to time. Such new + versions will be similar in spirit to the present version, but may + differ in detail to address new problems or concerns. See + `http://www.gnu.org/copyleft/'. + + Each version of the License is given a distinguishing version + number. If the Document specifies that a particular numbered + version of this License "or any later version" applies to it, you + have the option of following the terms and conditions either of + that specified version or of any later version that has been + published (not as a draft) by the Free Software Foundation. If + the Document does not specify a version number of this License, + you may choose any version ever published (not as a draft) by the + Free Software Foundation. + +ADDENDUM: How to use this License for your documents +==================================================== + +To use this License in a document you have written, include a copy of +the License in the document and put the following copyright and license +notices just after the title page: + + Copyright (C) YEAR YOUR NAME. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.2 + or any later version published by the Free Software Foundation; + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover + Texts. A copy of the license is included in the section entitled ``GNU + Free Documentation License''. + + If you have Invariant Sections, Front-Cover Texts and Back-Cover +Texts, replace the "with...Texts." line with this: + + with the Invariant Sections being LIST THEIR TITLES, with + the Front-Cover Texts being LIST, and with the Back-Cover Texts + being LIST. + + If you have Invariant Sections without Cover Texts, or some other +combination of the three, merge those two alternatives to suit the +situation. + + If your document contains nontrivial examples of program code, we +recommend releasing these examples in parallel under your choice of +free software license, such as the GNU General Public License, to +permit their use in free software. + + + +Tag Table: +Node: Top795 +Node: Introduction2330 +Node: Acknowledgments3823 +Node: Sections4360 +Node: Status6910 +Node: Untracked files9649 +Node: Staging and Committing10854 +Node: History14259 +Node: Reflogs17441 +Node: Commit Buffer17845 +Node: Diffing19171 +Node: Tagging20158 +Node: Resetting20608 +Node: Stashing22132 +Node: Branches and Remotes23203 +Node: Branches Popup24024 +Node: Remotes Popup25286 +Node: Branches in the Branch Manager25637 +Node: Remotes in the Branch Manager26809 +Node: Wazzup27370 +Node: Merging28163 +Node: Rebasing29213 +Node: Interactive Rebasing30039 +Node: Rewriting31334 +Node: Pushing and Pulling34643 +Node: Submodules36573 +Node: Bisecting37021 +Node: Finding commits not merged upstream38256 +Node: Using Magit Extensions39522 +Node: Activating extensions39818 +Node: Interfacing with Subversion41203 +Node: Interfacing with Topgit41803 +Node: Interfacing with StGit42841 +Node: Using Git Directly43810 +Node: GNU Free Documentation License44198 + +End Tag Table + + +Local Variables: +coding: utf-8 +End: diff --git a/elpa/paredit-20140128.1248/paredit-autoloads.el b/elpa/paredit-20140128.1248/paredit-autoloads.el new file mode 100644 index 000000000..b1d9a3b9f --- /dev/null +++ b/elpa/paredit-20140128.1248/paredit-autoloads.el @@ -0,0 +1,40 @@ +;;; paredit-autoloads.el --- automatically extracted autoloads +;; +;;; Code: + + +;;;### (autoloads (enable-paredit-mode paredit-mode) "paredit" "paredit.el" +;;;;;; (21478 16660 0 0)) +;;; Generated autoloads from paredit.el + +(autoload 'paredit-mode "paredit" "\ +Minor mode for pseudo-structurally editing Lisp code. +With a prefix argument, enable Paredit Mode even if there are + unbalanced parentheses in the buffer. +Paredit behaves badly if parentheses are unbalanced, so exercise + caution when forcing Paredit Mode to be enabled, and consider + fixing unbalanced parentheses instead. +\\ + +\(fn &optional ARG)" t nil) + +(autoload 'enable-paredit-mode "paredit" "\ +Turn on pseudo-structural editing of Lisp code. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads nil nil ("paredit-pkg.el") (21478 16660 607181 +;;;;;; 0)) + +;;;*** + +(provide 'paredit-autoloads) +;; Local Variables: +;; version-control: never +;; no-byte-compile: t +;; no-update-autoloads: t +;; coding: utf-8 +;; End: +;;; paredit-autoloads.el ends here diff --git a/elpa/paredit-20140128.1248/paredit-pkg.el b/elpa/paredit-20140128.1248/paredit-pkg.el new file mode 100644 index 000000000..5d1f5d55f --- /dev/null +++ b/elpa/paredit-20140128.1248/paredit-pkg.el @@ -0,0 +1 @@ +(define-package "paredit" "20140128.1248" "minor mode for editing parentheses" (quote nil)) diff --git a/elpa/paredit-20140128.1248/paredit-pkg.elc b/elpa/paredit-20140128.1248/paredit-pkg.elc new file mode 100644 index 0000000000000000000000000000000000000000..5f771b1cfc40259ecb7088a04fcd1fbef17ffe4a GIT binary patch literal 619 zcmbtR%WlFj5agU6=yjD-D-nmJNDbstiZ~#(C)y8KY$vhsBeG2^`t{uegoJuzB}?`` zW@bJ0=6(GznM{(pu3_y=ue21fKY_vcN+)C=$lshhFzq;Ma29qLVRdW)7Ert_=f!eX zK{+etBShn!frdaJ{|eHFoG@}G4f4Q5E_IK2k6sEDvteddlocz=d3DY9hn7h_Vkrxo zVGzCvND*^6XV0t{Yd

fSLsLQ5p4%ks1O^#^PtE!db*I$N=JG(I^hW@esYTZJ1Kk zhX^PHZF}V@7OY(S!w`-ztc$>%jY!SM*kl!DY_{61w_D&HdgPHrPDgsQ0)hjM7WNXf z!yA&zG65udt)z$8QDgah<|P~Mib24=ktE5Zkd3l3>yaO@m5^RcOCi0njowCC=fOB3 Xp`puQEqyTz12%S&3`oH${gnIxJBPP; literal 0 HcmV?d00001 diff --git a/elpa/paredit-20140128.1248/paredit.el b/elpa/paredit-20140128.1248/paredit.el new file mode 100644 index 000000000..7b151145e --- /dev/null +++ b/elpa/paredit-20140128.1248/paredit.el @@ -0,0 +1,2919 @@ +;;; paredit.el --- minor mode for editing parentheses -*- Mode: Emacs-Lisp -*- + +;; Copyright (C) 2005--2014 Taylor R. Campbell + +;; Author: Taylor R. Campbell +;; Version: 20140128.1248 +;; X-Original-Version: 24 (beta) +;; Created: 2005-07-31 +;; Keywords: lisp + +;; NOTE: THIS IS A BETA VERSION OF PAREDIT. USE AT YOUR OWN RISK. +;; THIS FILE IS SUBJECT TO CHANGE, AND NOT SUITABLE FOR DISTRIBUTION +;; BY PACKAGE MANAGERS SUCH AS APT, PKGSRC, MACPORTS, &C. + +;; Paredit 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. +;; +;; Paredit 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 paredit. If not, see . + +;;; The currently released version of paredit is available at +;;; . +;;; +;;; The latest beta version of paredit is available at +;;; . +;;; +;;; The Git repository for paredit is available at +;;; +;;; +;;; Release notes are available at +;;; . + +;;; Install paredit by placing `paredit.el' in `/path/to/elisp', a +;;; directory of your choice, and adding to your .emacs file: +;;; +;;; (add-to-list 'load-path "/path/to/elisp") +;;; (autoload 'enable-paredit-mode "paredit" +;;; "Turn on pseudo-structural editing of Lisp code." +;;; t) +;;; +;;; Start Paredit Mode on the fly with `M-x enable-paredit-mode RET', +;;; or always enable it in a major mode `M' (e.g., `lisp') with: +;;; +;;; (add-hook M-mode-hook 'enable-paredit-mode) +;;; +;;; Customize paredit using `eval-after-load': +;;; +;;; (eval-after-load 'paredit +;;; '(progn +;;; (define-key paredit-mode-map (kbd "ESC M-A-C-s-)") +;;; 'paredit-dwim))) +;;; +;;; Send questions, bug reports, comments, feature suggestions, &c., +;;; via email to the author's surname at mumble.net. +;;; +;;; Paredit should run in GNU Emacs 21 or later and XEmacs 21.5.28 or +;;; later. + +;;; The paredit minor mode, Paredit Mode, binds common character keys, +;;; such as `(', `)', `"', and `\', to commands that carefully insert +;;; S-expression structures in the buffer: +;;; +;;; ( inserts `()', leaving the point in the middle; +;;; ) moves the point over the next closing delimiter; +;;; " inserts `""' if outside a string, or inserts an escaped +;;; double-quote if in the middle of a string, or moves over the +;;; closing double-quote if at the end of a string; and +;;; \ prompts for the character to escape, to avoid inserting lone +;;; backslashes that may break structure. +;;; +;;; In comments, these keys insert themselves. If necessary, you can +;;; insert these characters literally outside comments by pressing +;;; `C-q' before these keys, in case a mistake has broken the +;;; structure. +;;; +;;; These key bindings are designed so that when typing new code in +;;; Paredit Mode, you can generally type exactly the same sequence of +;;; keys you would have typed without Paredit Mode. +;;; +;;; Paredit Mode also binds common editing keys, such as `DEL', `C-d', +;;; and `C-k', to commands that respect S-expression structures in the +;;; buffer: +;;; +;;; DEL deletes the previous character, unless it is a delimiter: DEL +;;; will move the point backward over a closing delimiter, and +;;; will delete a delimiter pair together if between an open and +;;; closing delimiter; +;;; +;;; C-d deletes the next character in much the same manner; and +;;; +;;; C-k kills all S-expressions that begin anywhere between the point +;;; and the end of the line or the closing delimiter of the +;;; enclosing list, whichever is first. +;;; +;;; If necessary, you can delete a character, kill a line, &c., +;;; irrespective of S-expression structure, by pressing `C-u' before +;;; these keys, in case a mistake has broken the structure. +;;; +;;; Finally, Paredit Mode binds some keys to complex S-expression +;;; editing operations. For example, `C-' makes the enclosing +;;; list slurp up an S-expression to its right (here `|' denotes the +;;; point): +;;; +;;; (foo (bar | baz) quux) C- (foo (bar | baz quux)) +;;; +;;; Some paredit commands automatically reindent code. When they do, +;;; they try to indent as locally as possible, to avoid interfering +;;; with any indentation you might have manually written. Only the +;;; advanced S-expression manipulation commands automatically reindent, +;;; and only the forms that they immediately operated upon (and their +;;; subforms). +;;; +;;; This code is written for clarity, not efficiency. It frequently +;;; walks over S-expressions redundantly. If you have problems with +;;; the time it takes to execute some of the commands, let me know. + +;;; This assumes Unix-style LF line endings. + +(defconst paredit-version 24) +(defconst paredit-beta-p t) + +(eval-and-compile + + (defun paredit-xemacs-p () + ;; No idea where I got this definition from. Edward O'Connor + ;; (hober in #emacs) suggested the current definition. + ;; (and (boundp 'running-xemacs) + ;; running-xemacs) + (featurep 'xemacs)) + + (defun paredit-gnu-emacs-p () + ;++ This could probably be improved. + (not (paredit-xemacs-p))) + + (defmacro xcond (&rest clauses) + "Exhaustive COND. +Signal an error if no clause matches." + `(cond ,@clauses + (t (error "XCOND lost.")))) + + (defalias 'paredit-warn (if (fboundp 'warn) 'warn 'message)) + + (defvar paredit-sexp-error-type + (with-temp-buffer + (insert "(") + (condition-case condition + (backward-sexp) + (error (if (eq (car condition) 'error) + (paredit-warn "%s%s%s%s%s" + "Paredit is unable to discriminate" + " S-expression parse errors from" + " other errors. " + " This may cause obscure problems. " + " Please upgrade Emacs.")) + (car condition))))) + + (defmacro paredit-handle-sexp-errors (body &rest handler) + `(condition-case () + ,body + (,paredit-sexp-error-type ,@handler))) + + (put 'paredit-handle-sexp-errors 'lisp-indent-function 1) + + (defmacro paredit-ignore-sexp-errors (&rest body) + `(paredit-handle-sexp-errors (progn ,@body) + nil)) + + (put 'paredit-ignore-sexp-errors 'lisp-indent-function 0) + + (defmacro paredit-preserving-column (&rest body) + "Evaluate BODY and restore point to former column, relative to code. +Assumes BODY will change only indentation. +If point was on code, it moves with the code. +If point was on indentation, it stays in indentation." + (let ((column (make-symbol "column")) + (indentation (make-symbol "indentation"))) + `(let ((,column (current-column)) + (,indentation (paredit-current-indentation))) + (let ((value (progn ,@body))) + (paredit-restore-column ,column ,indentation) + value)))) + + (put 'paredit-preserving-column 'lisp-indent-function 0) + + nil) + +;;;; Minor Mode Definition + +(defvar paredit-mode-map (make-sparse-keymap) + "Keymap for the paredit minor mode.") + +(defvar paredit-override-check-parens-function + (lambda (condition) condition nil) + "Function to tell whether unbalanced text should inhibit Paredit Mode.") + +;;;###autoload +(define-minor-mode paredit-mode + "Minor mode for pseudo-structurally editing Lisp code. +With a prefix argument, enable Paredit Mode even if there are + unbalanced parentheses in the buffer. +Paredit behaves badly if parentheses are unbalanced, so exercise + caution when forcing Paredit Mode to be enabled, and consider + fixing unbalanced parentheses instead. +\\" + :lighter " Paredit" + ;; Setting `paredit-mode' to false here aborts enabling Paredit Mode. + (if (and paredit-mode + (not current-prefix-arg)) + (condition-case condition + (check-parens) + (error + (if (not (funcall paredit-override-check-parens-function condition)) + (progn (setq paredit-mode nil) + (signal (car condition) (cdr condition)))))))) + +(defun paredit-override-check-parens-interactively (condition) + (y-or-n-p (format "Enable Paredit Mode despite condition %S? " condition))) + +;;;###autoload +(defun enable-paredit-mode () + "Turn on pseudo-structural editing of Lisp code." + (interactive) + (paredit-mode +1)) + +(defun disable-paredit-mode () + "Turn off pseudo-structural editing of Lisp code." + (interactive) + (paredit-mode -1)) + +(defvar paredit-backward-delete-key + (xcond ((paredit-xemacs-p) "BS") + ((paredit-gnu-emacs-p) "DEL"))) + +(defvar paredit-forward-delete-keys + (xcond ((paredit-xemacs-p) '("DEL")) + ((paredit-gnu-emacs-p) '("" "")))) + +;;;; Paredit Keys + +;;; Separating the definition and initialization of this variable +;;; simplifies the development of paredit, since re-evaluating DEFVAR +;;; forms doesn't actually do anything. + +(defvar paredit-commands nil + "List of paredit commands with their keys and examples.") + +;;; Each specifier is of the form: +;;; (key[s] function (example-input example-output) ...) +;;; where key[s] is either a single string suitable for passing to KBD +;;; or a list of such strings. Entries in this list may also just be +;;; strings, in which case they are headings for the next entries. + +(progn (setq paredit-commands + `( + "Basic Insertion Commands" + ("(" paredit-open-round + ("(a b |c d)" + "(a b (|) c d)") + ("(foo \"bar |baz\" quux)" + "(foo \"bar (|baz\" quux)")) + (")" paredit-close-round + ("(a b |c )" "(a b c)|") + ("; Hello,| world!" + "; Hello,)| world!")) + ("M-)" paredit-close-round-and-newline + ("(defun f (x| ))" + "(defun f (x)\n |)") + ("; (Foo.|" + "; (Foo.)|")) + ("[" paredit-open-square + ("(a b |c d)" + "(a b [|] c d)") + ("(foo \"bar |baz\" quux)" + "(foo \"bar [|baz\" quux)")) + ("]" paredit-close-square + ("(define-key keymap [frob| ] 'frobnicate)" + "(define-key keymap [frob]| 'frobnicate)") + ("; [Bar.|" + "; [Bar.]|")) + + ("\"" paredit-doublequote + ("(frob grovel |full lexical)" + "(frob grovel \"|\" full lexical)" + "(frob grovel \"\"| full lexical)") + ("(foo \"bar |baz\" quux)" + "(foo \"bar \\\"|baz\" quux)") + ("(frob grovel) ; full |lexical" + "(frob grovel) ; full \"|lexical")) + ("M-\"" paredit-meta-doublequote + ("(foo \"bar |baz\" quux)" + "(foo \"bar baz\"| quux)") + ("(foo |(bar #\\x \"baz \\\\ quux\") zot)" + ,(concat "(foo \"|(bar #\\\\x \\\"baz \\\\" + "\\\\ quux\\\")\" zot)"))) + ("\\" paredit-backslash + ("(string #|)\n ; Character to escape: x" + "(string #\\x|)") + ("\"foo|bar\"\n ; Character to escape: \"" + "\"foo\\\"|bar\"")) + (";" paredit-semicolon + ("|(frob grovel)" + ";|(frob grovel)") + ("(frob |grovel)" + "(frob ;|grovel\n )") + ("(frob |grovel (bloit\n zargh))" + "(frob ;|grovel\n (bloit\n zargh))") + ("(frob grovel) |" + "(frob grovel) ;|")) + ("M-;" paredit-comment-dwim + ("(foo |bar) ; baz" + "(foo bar) ; |baz") + ("(frob grovel)|" + "(frob grovel) ;|") + ("(zot (foo bar)\n|\n (baz quux))" + "(zot (foo bar)\n ;; |\n (baz quux))") + ("(zot (foo bar) |(baz quux))" + "(zot (foo bar)\n ;; |\n (baz quux))") + ("|(defun hello-world ...)" + ";;; |\n(defun hello-world ...)")) + + ("C-j" paredit-newline + ("(let ((n (frobbotz))) |(display (+ n 1)\nport))" + ,(concat "(let ((n (frobbotz)))" + "\n |(display (+ n 1)" + "\n port))"))) + + "Deleting & Killing" + (("C-d" ,@paredit-forward-delete-keys) + paredit-forward-delete + ("(quu|x \"zot\")" "(quu| \"zot\")") + ("(quux |\"zot\")" + "(quux \"|zot\")" + "(quux \"|ot\")") + ("(foo (|) bar)" "(foo | bar)") + ("|(foo bar)" "(|foo bar)")) + (,paredit-backward-delete-key + paredit-backward-delete + ("(\"zot\" q|uux)" "(\"zot\" |uux)") + ("(\"zot\"| quux)" + "(\"zot|\" quux)" + "(\"zo|\" quux)") + ("(foo (|) bar)" "(foo | bar)") + ("(foo bar)|" "(foo bar|)")) + ("C-k" paredit-kill + ("(foo bar)| ; Useless comment!" + "(foo bar)|") + ("(|foo bar) ; Useful comment!" + "(|) ; Useful comment!") + ("|(foo bar) ; Useless line!" + "|") + ("(foo \"|bar baz\"\n quux)" + "(foo \"|\"\n quux)")) + ("M-d" paredit-forward-kill-word + ("|(foo bar) ; baz" + "(| bar) ; baz" + "(|) ; baz" + "() ;|") + (";;;| Frobnicate\n(defun frobnicate ...)" + ";;;|\n(defun frobnicate ...)" + ";;;\n(| frobnicate ...)")) + (,(concat "M-" paredit-backward-delete-key) + paredit-backward-kill-word + ("(foo bar) ; baz\n(quux)|" + "(foo bar) ; baz\n(|)" + "(foo bar) ; |\n()" + "(foo |) ; \n()" + "(|) ; \n()")) + + "Movement & Navigation" + ("C-M-f" paredit-forward + ("(foo |(bar baz) quux)" + "(foo (bar baz)| quux)") + ("(foo (bar)|)" + "(foo (bar))|")) + ("C-M-b" paredit-backward + ("(foo (bar baz)| quux)" + "(foo |(bar baz) quux)") + ("(|(foo) bar)" + "|((foo) bar)")) + ("C-M-u" paredit-backward-up) + ("C-M-d" paredit-forward-down) + ("C-M-p" paredit-backward-down) ; Built-in, these are FORWARD- + ("C-M-n" paredit-forward-up) ; & BACKWARD-LIST, which have + ; no need given C-M-f & C-M-b. + + "Depth-Changing Commands" + ("M-(" paredit-wrap-round + ("(foo |bar baz)" + "(foo (|bar) baz)")) + ("M-s" paredit-splice-sexp + ("(foo (bar| baz) quux)" + "(foo bar| baz quux)")) + (("M-" "ESC ") + paredit-splice-sexp-killing-backward + ("(foo (let ((x 5)) |(sqrt n)) bar)" + "(foo |(sqrt n) bar)")) + (("M-" "ESC ") + paredit-splice-sexp-killing-forward + ("(a (b c| d e) f)" + "(a b c| f)")) + ("M-r" paredit-raise-sexp + ("(dynamic-wind in (lambda () |body) out)" + "(dynamic-wind in |body out)" + "|body")) + ("M-?" paredit-convolute-sexp + ("(let ((x 5) (y 3)) (frob |(zwonk)) (wibblethwop))" + "(frob |(let ((x 5) (y 3)) (zwonk) (wibblethwop)))")) + + "Barfage & Slurpage" + (("C-)" "C-") + paredit-forward-slurp-sexp + ("(foo (bar |baz) quux zot)" + "(foo (bar |baz quux) zot)") + ("(a b ((c| d)) e f)" + "(a b ((c| d) e) f)")) + (("C-}" "C-") + paredit-forward-barf-sexp + ("(foo (bar |baz quux) zot)" + "(foo (bar |baz) quux zot)")) + (("C-(" "C-M-" "ESC C-") + paredit-backward-slurp-sexp + ("(foo bar (baz| quux) zot)" + "(foo (bar baz| quux) zot)") + ("(a b ((c| d)) e f)" + "(a (b (c| d)) e f)")) + (("C-{" "C-M-" "ESC C-") + paredit-backward-barf-sexp + ("(foo (bar baz |quux) zot)" + "(foo bar (baz |quux) zot)")) + + "Miscellaneous Commands" + ("M-S" paredit-split-sexp + ("(hello| world)" + "(hello)| (world)") + ("\"Hello, |world!\"" + "\"Hello, \"| \"world!\"")) + ("M-J" paredit-join-sexps + ("(hello)| (world)" + "(hello| world)") + ("\"Hello, \"| \"world!\"" + "\"Hello, |world!\"") + ("hello-\n| world" + "hello-|world")) + ("C-c C-M-l" paredit-recenter-on-sexp) + ("M-q" paredit-reindent-defun) + )) + nil) ; end of PROGN + +;;;;; Command Examples + +(eval-and-compile + (defmacro paredit-do-commands (vars string-case &rest body) + (let ((spec (nth 0 vars)) + (keys (nth 1 vars)) + (fn (nth 2 vars)) + (examples (nth 3 vars))) + `(dolist (,spec paredit-commands) + (if (stringp ,spec) + ,string-case + (let ((,keys (let ((k (car ,spec))) + (cond ((stringp k) (list k)) + ((listp k) k) + (t (error "Invalid paredit command %s." + ,spec))))) + (,fn (cadr ,spec)) + (,examples (cddr ,spec))) + ,@body))))) + + (put 'paredit-do-commands 'lisp-indent-function 2)) + +(defun paredit-define-keys () + (paredit-do-commands (spec keys fn examples) + nil ; string case + (dolist (key keys) + (define-key paredit-mode-map (read-kbd-macro key) fn)))) + +(defun paredit-function-documentation (fn) + (let ((original-doc (get fn 'paredit-original-documentation)) + (doc (documentation fn 'function-documentation))) + (or original-doc + (progn (put fn 'paredit-original-documentation doc) + doc)))) + +(defun paredit-annotate-mode-with-examples () + (let ((contents + (list (paredit-function-documentation 'paredit-mode)))) + (paredit-do-commands (spec keys fn examples) + (push (concat "\n \n" spec "\n") + contents) + (let ((name (symbol-name fn))) + (if (string-match (symbol-name 'paredit-) name) + (push (concat "\n\n\\[" name "]\t" name + (if examples + (mapconcat (lambda (example) + (concat + "\n" + (mapconcat 'identity + example + "\n --->\n") + "\n")) + examples + "") + "\n (no examples)\n")) + contents)))) + (put 'paredit-mode 'function-documentation + (apply 'concat (reverse contents)))) + ;; PUT returns the huge string we just constructed, which we don't + ;; want it to return. + nil) + +(defun paredit-annotate-functions-with-examples () + (paredit-do-commands (spec keys fn examples) + nil ; string case + (put fn 'function-documentation + (concat (paredit-function-documentation fn) + "\n\n\\\\[" (symbol-name fn) "]\n" + (mapconcat (lambda (example) + (concat "\n" + (mapconcat 'identity + example + "\n ->\n") + "\n")) + examples + ""))))) + +;;;;; HTML Examples + +(defun paredit-insert-html-examples () + "Insert HTML for a paredit quick reference table." + (interactive) + (let ((insert-lines + (lambda (&rest lines) (dolist (line lines) (insert line) (newline)))) + (initp nil)) + (paredit-do-commands (spec keys fn examples) + (progn (if initp + (funcall insert-lines "") + (setq initp t)) + (funcall insert-lines (concat "

" spec "

")) + (funcall insert-lines "")) + (let ((name (symbol-name fn)) + (keys + (mapconcat (lambda (key) + (concat "" (paredit-html-quote key) "")) + keys + ", "))) + (funcall insert-lines "") + (funcall insert-lines (concat " ")) + (funcall insert-lines (concat " ")) + (funcall insert-lines "") + (funcall insert-lines + ""))) + (funcall insert-lines "
" keys "" name "
") + (dolist (example examples) + (let ((prefix "")) + (funcall insert-lines (concat prefix examples suffix)))) + (funcall insert-lines "
" + "" + "
")
+                (examples
+                 (mapconcat 'paredit-html-quote
+                            example
+                            (concat "
")))
+                (suffix "
"))) + +(defun paredit-html-quote (string) + (with-temp-buffer + (dotimes (i (length string)) + (insert (let ((c (elt string i))) + (cond ((eq c ?\<) "<") + ((eq c ?\>) ">") + ((eq c ?\&) "&") + ((eq c ?\') "'") + ((eq c ?\") """) + (t c))))) + (buffer-string))) + +;;;; Delimiter Insertion + +(eval-and-compile + (defun paredit-conc-name (&rest strings) + (intern (apply 'concat strings))) + + (defmacro define-paredit-pair (open close name) + `(progn + (defun ,(paredit-conc-name "paredit-open-" name) (&optional n) + ,(concat "Insert a balanced " name " pair. +With a prefix argument N, put the closing " name " after N + S-expressions forward. +If the region is active, `transient-mark-mode' is enabled, and the + region's start and end fall in the same parenthesis depth, insert a + " name " pair around the region. +If in a string or a comment, insert a single " name ". +If in a character literal, do nothing. This prevents changing what was + in the character literal to a meaningful delimiter unintentionally.") + (interactive "P") + (cond ((or (paredit-in-string-p) + (paredit-in-comment-p)) + (insert ,open)) + ((not (paredit-in-char-p)) + (paredit-insert-pair n ,open ,close 'goto-char) + (save-excursion (backward-up-list) (indent-sexp))))) + (defun ,(paredit-conc-name "paredit-close-" name) () + ,(concat "Move past one closing delimiter and reindent. +\(Agnostic to the specific closing delimiter.) +If in a string or comment, insert a single closing " name ". +If in a character literal, do nothing. This prevents changing what was + in the character literal to a meaningful delimiter unintentionally.") + (interactive) + (paredit-move-past-close ,close)) + (defun ,(paredit-conc-name "paredit-close-" name "-and-newline") () + ,(concat "Move past one closing delimiter, add a newline," + " and reindent. +If there was a margin comment after the closing delimiter, preserve it + on the same line.") + (interactive) + (paredit-move-past-close-and-newline ,close)) + (defun ,(paredit-conc-name "paredit-wrap-" name) + (&optional argument) + ,(concat "Wrap the following S-expression. +See `paredit-wrap-sexp' for more details.") + (interactive "P") + (paredit-wrap-sexp argument ,open ,close)) + (add-to-list 'paredit-wrap-commands + ',(paredit-conc-name "paredit-wrap-" name))))) + +(defvar paredit-wrap-commands '(paredit-wrap-sexp) + "List of paredit commands that wrap S-expressions. +Used by `paredit-yank-pop'; for internal paredit use only.") + +(define-paredit-pair ?\( ?\) "round") +(define-paredit-pair ?\[ ?\] "square") +(define-paredit-pair ?\{ ?\} "curly") +(define-paredit-pair ?\< ?\> "angled") + +;;; Aliases for the old names. + +(defalias 'paredit-open-parenthesis 'paredit-open-round) +(defalias 'paredit-close-parenthesis 'paredit-close-round) +(defalias 'paredit-close-parenthesis-and-newline + 'paredit-close-round-and-newline) + +(defalias 'paredit-open-bracket 'paredit-open-square) +(defalias 'paredit-close-bracket 'paredit-close-square) +(defalias 'paredit-close-bracket-and-newline + 'paredit-close-square-and-newline) + +(defun paredit-move-past-close (close) + (paredit-move-past-close-and close + (lambda () + (paredit-blink-paren-match nil)))) + +(defun paredit-move-past-close-and-newline (close) + (paredit-move-past-close-and close + (lambda () + (let ((comment.point (paredit-find-comment-on-line))) + (newline) + (if comment.point + (save-excursion + (forward-line -1) + (end-of-line) + (indent-to (cdr comment.point)) + (insert (car comment.point))))) + (lisp-indent-line) + (paredit-ignore-sexp-errors (indent-sexp)) + (paredit-blink-paren-match t)))) + +(defun paredit-move-past-close-and (close if-moved) + (if (or (paredit-in-string-p) + (paredit-in-comment-p)) + (insert close) + (if (paredit-in-char-p) (forward-char)) + (paredit-move-past-close-and-reindent close) + (funcall if-moved))) + +(defun paredit-find-comment-on-line () + "Find a margin comment on the current line. +Return nil if there is no such comment or if there is anything but + whitespace until such a comment. +If such a comment exists, delete the comment (including all leading + whitespace) and return a cons whose car is the comment as a string + and whose cdr is the point of the comment's initial semicolon, + relative to the start of the line." + (save-excursion + (paredit-skip-whitespace t (point-at-eol)) + (and (eq ?\; (char-after)) + (not (eq ?\; (char-after (1+ (point))))) + (not (or (paredit-in-string-p) + (paredit-in-char-p))) + (let* ((start ;Move to before the semicolon. + (progn (backward-char) (point))) + (comment + (buffer-substring start (point-at-eol)))) + (paredit-skip-whitespace nil (point-at-bol)) + (delete-region (point) (point-at-eol)) + (cons comment (- start (point-at-bol))))))) + +(defun paredit-insert-pair (n open close forward) + (let* ((regionp + (and (paredit-region-active-p) + (paredit-region-safe-for-insert-p))) + (end + (and regionp + (not n) + (prog1 (region-end) (goto-char (region-beginning)))))) + (let ((spacep (paredit-space-for-delimiter-p nil open))) + (if spacep (insert " ")) + (insert open) + (save-excursion + ;; Move past the desired region. + (cond (n + (funcall forward + (paredit-scan-sexps-hack (point) + (prefix-numeric-value n)))) + (regionp + (funcall forward (+ end (if spacep 2 1))))) + ;; The string case can happen if we are inserting string + ;; delimiters. The comment case may happen by moving to the + ;; end of a buffer that has a comment with no trailing newline. + (if (and (not (paredit-in-string-p)) + (paredit-in-comment-p)) + (newline)) + (insert close) + (if (paredit-space-for-delimiter-p t close) + (insert " ")))))) + +;++ This needs a better name... + +(defun paredit-scan-sexps-hack (point n) + (save-excursion + (goto-char point) + (let ((direction (if (< 0 n) +1 -1)) + (magnitude (abs n)) + (count 0)) + (catch 'exit + (while (< count magnitude) + (let ((p + (paredit-handle-sexp-errors (scan-sexps (point) direction) + nil))) + (if (not p) (throw 'exit nil)) + (goto-char p)) + (setq count (+ count 1))))) + (point))) + +(defun paredit-region-safe-for-insert-p () + (save-excursion + (let ((beginning (region-beginning)) + (end (region-end))) + (goto-char beginning) + (let* ((beginning-state (paredit-current-parse-state)) + (end-state + (parse-partial-sexp beginning end nil nil beginning-state))) + (and (= (nth 0 beginning-state) ; 0. depth in parens + (nth 0 end-state)) + (eq (nth 3 beginning-state) ; 3. non-nil if inside a + (nth 3 end-state)) ; string + (eq (nth 4 beginning-state) ; 4. comment status, yada + (nth 4 end-state)) + (eq (nth 5 beginning-state) ; 5. t if following char + (nth 5 end-state))))))) ; quote + +(defvar paredit-space-for-delimiter-predicates nil + "List of predicates for whether to put space by delimiter at point. +Each predicate is a function that is is applied to two arguments, ENDP + and DELIMITER, and that returns a boolean saying whether to put a + space next to the delimiter -- before the delimiter if ENDP is false, + after the delimiter if ENDP is true. +If any predicate returns false, no space is inserted: every predicate + has veto power. +Each predicate may assume that the point is not at the beginning of the + buffer, if ENDP is false, or at the end of the buffer, if ENDP is + true; and that the point is not preceded, if ENDP is false, or + followed, if ENDP is true, by a word or symbol constituent, a quote, + or the delimiter matching DELIMITER. +Each predicate should examine only text before the point, if ENDP is + false, or only text after the point, if ENDP is true.") + +(defun paredit-space-for-delimiter-p (endp delimiter) + ;; If at the buffer limit, don't insert a space. If there is a word, + ;; symbol, other quote, or non-matching parenthesis delimiter (i.e. a + ;; close when want an open the string or an open when we want to + ;; close the string), do insert a space. + (and (not (if endp (eobp) (bobp))) + (memq (char-syntax (if endp (char-after) (char-before))) + (list ?w ?_ ?\" + (let ((matching (matching-paren delimiter))) + (and matching (char-syntax matching))) + (and (not endp) + (eq ?\" (char-syntax delimiter)) + ?\) ))) + (catch 'exit + (dolist (predicate paredit-space-for-delimiter-predicates) + (if (not (funcall predicate endp delimiter)) + (throw 'exit nil))) + t))) + +(defun paredit-move-past-close-and-reindent (close) + (let ((open (paredit-missing-close))) + (if open + (if (eq close (matching-paren open)) + (save-excursion + (message "Missing closing delimiter: %c" close) + (insert close)) + (error "Mismatched missing closing delimiter: %c ... %c" + open close)))) + (up-list) + (if (catch 'return ; This CATCH returns T if it + (while t ; should delete leading spaces + (save-excursion ; and NIL if not. + (let ((before-paren (1- (point)))) + (back-to-indentation) + (cond ((not (eq (point) before-paren)) + ;; Can't call PAREDIT-DELETE-LEADING-WHITESPACE + ;; here -- we must return from SAVE-EXCURSION + ;; first. + (throw 'return t)) + ((save-excursion (forward-line -1) + (end-of-line) + (paredit-in-comment-p)) + ;; Moving the closing delimiter any further + ;; would put it into a comment, so we just + ;; indent the closing delimiter where it is and + ;; abort the loop, telling its continuation that + ;; no leading whitespace should be deleted. + (lisp-indent-line) + (throw 'return nil)) + (t (delete-indentation))))))) + (paredit-delete-leading-whitespace))) + +(defun paredit-missing-close () + (save-excursion + (paredit-handle-sexp-errors (backward-up-list) + (error "Not inside a list.")) + (let ((open (char-after))) + (paredit-handle-sexp-errors (progn (forward-sexp) nil) + open)))) + +(defun paredit-delete-leading-whitespace () + ;; This assumes that we're on the closing delimiter already. + (save-excursion + (backward-char) + (while (let ((syn (char-syntax (char-before)))) + (and (or (eq syn ?\ ) (eq syn ?-)) ; whitespace syntax + ;; The above line is a perfect example of why the + ;; following test is necessary. + (not (paredit-in-char-p (1- (point)))))) + (delete-char -1)))) + +(defun paredit-blink-paren-match (another-line-p) + (if (and blink-matching-paren + (or (not show-paren-mode) another-line-p)) + (paredit-ignore-sexp-errors + (save-excursion + (backward-sexp) + (forward-sexp) + ;; SHOW-PAREN-MODE inhibits any blinking, so we disable it + ;; locally here. + (let ((show-paren-mode nil)) + (blink-matching-open)))))) + +(defun paredit-doublequote (&optional n) + "Insert a pair of double-quotes. +With a prefix argument N, wrap the following N S-expressions in + double-quotes, escaping intermediate characters if necessary. +If the region is active, `transient-mark-mode' is enabled, and the + region's start and end fall in the same parenthesis depth, insert a + pair of double-quotes around the region, again escaping intermediate + characters if necessary. +Inside a comment, insert a literal double-quote. +At the end of a string, move past the closing double-quote. +In the middle of a string, insert a backslash-escaped double-quote. +If in a character literal, do nothing. This prevents accidentally + changing a what was in the character literal to become a meaningful + delimiter unintentionally." + (interactive "P") + (cond ((paredit-in-string-p) + (if (eq (point) (- (paredit-enclosing-string-end) 1)) + (forward-char) ; Just move past the closing quote. + ;; Don't split a \x into an escaped backslash and a string end. + (if (paredit-in-string-escape-p) (forward-char)) + (insert ?\\ ?\" ))) + ((paredit-in-comment-p) + (insert ?\" )) + ((not (paredit-in-char-p)) + (paredit-insert-pair n ?\" ?\" 'paredit-forward-for-quote)))) + +(defun paredit-meta-doublequote (&optional n) + "Move to the end of the string. +If not in a string, act as `paredit-doublequote'; if not prefix argument + is specified and the region is not active or `transient-mark-mode' is + disabled, the default is to wrap one S-expression, however, not zero." + (interactive "P") + (if (not (paredit-in-string-p)) + (paredit-doublequote (or n (and (not (paredit-region-active-p)) 1))) + (goto-char (paredit-enclosing-string-end)))) + +(defun paredit-meta-doublequote-and-newline (&optional n) + "Move to the end of the string, insert a newline, and indent. +If not in a string, act as `paredit-doublequote'; if not prefix argument + is specified and the region is not active or `transient-mark-mode' is + disabled, the default is to wrap one S-expression, however, not zero." + (interactive "P") + (if (not (paredit-in-string-p)) + (paredit-doublequote (or n (and (not (paredit-region-active-p)) 1))) + (progn (goto-char (paredit-enclosing-string-end)) + (newline) + (lisp-indent-line) + (paredit-ignore-sexp-errors (indent-sexp))))) + +(defun paredit-forward-for-quote (end) + (let ((state (paredit-current-parse-state))) + (while (< (point) end) + (let ((new-state (parse-partial-sexp (point) (1+ (point)) + nil nil state))) + (if (paredit-in-string-p new-state) + (if (not (paredit-in-string-escape-p)) + (setq state new-state) + ;; Escape character: turn it into an escaped escape + ;; character by appending another backslash. + (insert ?\\ ) + ;; Now the point is after both escapes, and we want to + ;; rescan from before the first one to after the second + ;; one. + (setq state + (parse-partial-sexp (- (point) 2) (point) + nil nil state)) + ;; Advance the end point, since we just inserted a new + ;; character. + (setq end (1+ end))) + ;; String: escape by inserting a backslash before the quote. + (backward-char) + (insert ?\\ ) + ;; The point is now between the escape and the quote, and we + ;; want to rescan from before the escape to after the quote. + (setq state + (parse-partial-sexp (1- (point)) (1+ (point)) + nil nil state)) + ;; Advance the end point for the same reason as above. + (setq end (1+ end))))))) + +;;;; Escape Insertion + +(defun paredit-backslash () + "Insert a backslash followed by a character to escape." + (interactive) + (cond ((paredit-in-string-p) (paredit-backslash-interactive)) + ((paredit-in-comment-p) (insert ?\\)) + ((paredit-in-char-p) (forward-char) (paredit-backslash-interactive)) + (t (paredit-backslash-interactive)))) + +(defun paredit-backslash-interactive () + (insert ?\\ ) + ;; Read a character to insert after the backslash. If anything + ;; goes wrong -- the user hits delete (entering the rubout + ;; `character'), aborts with C-g, or enters non-character input + ;; -- then delete the backslash to avoid a dangling escape. + (let ((delete-p t)) + (unwind-protect + (let ((char (read-char "Character to escape: "))) + (if (not (eq char ?\^?)) + (progn (message "Character to escape: %c" char) + (insert char) + (setq delete-p nil)))) + (if delete-p + (progn (message "Deleting escape.") + (delete-char -1)))))) + +(defun paredit-newline () + "Insert a newline and indent it. +This is like `newline-and-indent', but it not only indents the line + that the point is on but also the S-expression following the point, + if there is one. +Move forward one character first if on an escaped character. +If in a string, just insert a literal newline. +If in a comment and if followed by invalid structure, call + `indent-new-comment-line' to keep the invalid structure in a + comment." + (interactive) + (cond ((paredit-in-string-p) + (newline)) + ((paredit-in-comment-p) + (if (paredit-region-ok-p (point) (point-at-eol)) + (progn (newline-and-indent) + (paredit-ignore-sexp-errors (indent-sexp))) + (indent-new-comment-line))) + (t + (if (paredit-in-char-p) + (forward-char)) + (newline-and-indent) + ;; Indent the following S-expression, but don't signal an + ;; error if there's only a closing delimiter after the point. + (paredit-ignore-sexp-errors (indent-sexp))))) + +(defun paredit-reindent-defun (&optional argument) + "Reindent the definition that the point is on. +If the point is in a string or a comment, fill the paragraph instead, + and with a prefix argument, justify as well." + (interactive "P") + (if (or (paredit-in-string-p) + (paredit-in-comment-p)) + (lisp-fill-paragraph argument) + (paredit-preserving-column + (save-excursion + (end-of-defun) + (beginning-of-defun) + (indent-sexp))))) + +;;;; Comment Insertion + +(defun paredit-semicolon (&optional n) + "Insert a semicolon. +With a prefix argument N, insert N semicolons. +If in a string, do just that and nothing else. +If in a character literal, move to the beginning of the character + literal before inserting the semicolon. +If the enclosing list ends on the line after the point, break the line + after the last S-expression following the point. +If a list begins on the line after the point but ends on a different + line, break the line after the last S-expression following the point + before the list." + (interactive "p") + (if (or (paredit-in-string-p) (paredit-in-comment-p)) + (insert (make-string (or n 1) ?\; )) + (if (paredit-in-char-p) + (backward-char 2)) + (let ((line-break-point (paredit-semicolon-find-line-break-point))) + (if line-break-point + (paredit-semicolon-with-line-break line-break-point (or n 1)) + (insert (make-string (or n 1) ?\; )))))) + +(defun paredit-semicolon-find-line-break-point () + (and (not (eolp)) ;Implies (not (eobp)). + (let ((eol (point-at-eol))) + (save-excursion + (catch 'exit + (while t + (let ((line-break-point (point))) + (cond ((paredit-handle-sexp-errors (progn (forward-sexp) t) + nil) + ;; Successfully advanced by an S-expression. + ;; If that S-expression started on this line + ;; and ended on another one, break here. + (cond ((not (eq eol (point-at-eol))) + (throw 'exit + (and (save-excursion + (backward-sexp) + (eq eol (point-at-eol))) + line-break-point))) + ((eobp) + (throw 'exit nil)))) + ((save-excursion + (paredit-skip-whitespace t (point-at-eol)) + (or (eolp) (eobp) (eq (char-after) ?\;))) + ;; Can't move further, but there's no closing + ;; delimiter we're about to clobber -- either + ;; it's on the next line or we're at the end of + ;; the buffer. Don't break the line. + (throw 'exit nil)) + (t + ;; Can't move because we hit a delimiter at the + ;; end of this line. Break here. + (throw 'exit line-break-point)))))))))) + +(defun paredit-semicolon-with-line-break (line-break-point n) + (let ((line-break-marker (make-marker))) + (set-marker line-break-marker line-break-point) + (set-marker-insertion-type line-break-marker t) + (insert (make-string (or n 1) ?\; )) + (save-excursion + (goto-char line-break-marker) + (set-marker line-break-marker nil) + (newline) + (lisp-indent-line) + ;; This step is redundant if we are inside a list, but even if we + ;; are at the top level, we want at least to indent whatever we + ;; bumped off the line. + (paredit-ignore-sexp-errors (indent-sexp)) + (paredit-indent-sexps)))) + +;;; This is all a horrible, horrible hack, primarily for GNU Emacs 21, +;;; in which there is no `comment-or-uncomment-region'. + +(autoload 'comment-forward "newcomment") +(autoload 'comment-normalize-vars "newcomment") +(autoload 'comment-region "newcomment") +(autoload 'comment-search-forward "newcomment") +(autoload 'uncomment-region "newcomment") + +(defun paredit-initialize-comment-dwim () + (require 'newcomment) + (if (not (fboundp 'comment-or-uncomment-region)) + (defalias 'comment-or-uncomment-region + (lambda (beginning end &optional argument) + (interactive "*r\nP") + (if (save-excursion (goto-char beginning) + (comment-forward (point-max)) + (<= end (point))) + (uncomment-region beginning end argument) + (comment-region beginning end argument))))) + (defalias 'paredit-initialize-comment-dwim 'comment-normalize-vars) + (comment-normalize-vars)) + +(defun paredit-comment-dwim (&optional argument) + "Call the Lisp comment command you want (Do What I Mean). +This is like `comment-dwim', but it is specialized for Lisp editing. +If transient mark mode is enabled and the mark is active, comment or + uncomment the selected region, depending on whether it was entirely + commented not not already. +If there is already a comment on the current line, with no prefix + argument, indent to that comment; with a prefix argument, kill that + comment. +Otherwise, insert a comment appropriate for the context and ensure that + any code following the comment is moved to the next line. +At the top level, where indentation is calculated to be at column 0, + insert a triple-semicolon comment; within code, where the indentation + is calculated to be non-zero, and on the line there is either no code + at all or code after the point, insert a double-semicolon comment; + and if the point is after all code on the line, insert a single- + semicolon margin comment at `comment-column'." + (interactive "*P") + (paredit-initialize-comment-dwim) + (cond ((paredit-region-active-p) + (comment-or-uncomment-region (region-beginning) + (region-end) + argument)) + ((paredit-comment-on-line-p) + (if argument + (comment-kill (if (integerp argument) argument nil)) + (comment-indent))) + (t (paredit-insert-comment)))) + +(defun paredit-comment-on-line-p () + "True if there is a comment on the line following point. +This is expected to be called only in `paredit-comment-dwim'; do not + call it elsewhere." + (save-excursion + (beginning-of-line) + (let ((comment-p nil)) + ;; Search forward for a comment beginning. If there is one, set + ;; COMMENT-P to true; if not, it will be nil. + (while (progn + (setq comment-p ;t -> no error + (comment-search-forward (point-at-eol) t)) + (and comment-p + (or (paredit-in-string-p) + (paredit-in-char-p (1- (point)))))) + (forward-char)) + comment-p))) + +(defun paredit-insert-comment () + (let ((code-after-p + (save-excursion (paredit-skip-whitespace t (point-at-eol)) + (not (eolp)))) + (code-before-p + (save-excursion (paredit-skip-whitespace nil (point-at-bol)) + (not (bolp))))) + (cond ((and (bolp) + (let ((indent + (let ((indent (calculate-lisp-indent))) + (if (consp indent) (car indent) indent)))) + (and indent (zerop indent)))) + ;; Top-level comment + (if code-after-p (save-excursion (newline))) + (insert ";;; ")) + ((or code-after-p (not code-before-p)) + ;; Code comment + (if code-before-p + (newline-and-indent) + (lisp-indent-line)) + (insert ";; ") + (if code-after-p + (save-excursion + (newline) + (lisp-indent-line) + (paredit-indent-sexps)))) + (t + ;; Margin comment + (indent-to comment-column 1) ; 1 -> force one leading space + (insert ?\; ))))) + +;;;; Character Deletion + +(defun paredit-forward-delete (&optional argument) + "Delete a character forward or move forward over a delimiter. +If on an opening S-expression delimiter, move forward into the + S-expression. +If on a closing S-expression delimiter, refuse to delete unless the + S-expression is empty, in which case delete the whole S-expression. +With a numeric prefix argument N, delete N characters forward. +With a `C-u' prefix argument, simply delete a character forward, + without regard for delimiter balancing." + (interactive "P") + (cond ((or (consp argument) (eobp)) + (delete-char +1)) + ((integerp argument) + (if (< argument 0) + (paredit-backward-delete argument) + (while (> argument 0) + (paredit-forward-delete) + (setq argument (- argument 1))))) + ((paredit-in-string-p) + (paredit-forward-delete-in-string)) + ((paredit-in-comment-p) + (paredit-forward-delete-in-comment)) + ((paredit-in-char-p) ; Escape -- delete both chars. + (delete-char -1) + (delete-char +1)) + ((eq (char-after) ?\\ ) ; ditto + (delete-char +2)) + ((let ((syn (char-syntax (char-after)))) + (or (eq syn ?\( ) + (eq syn ?\" ))) + (if (save-excursion + (paredit-handle-sexp-errors (progn (forward-sexp) t) + nil)) + (forward-char) + (message "Deleting spurious opening delimiter.") + (delete-char +1))) + ((and (not (paredit-in-char-p (1- (point)))) + (eq (char-syntax (char-after)) ?\) ) + (eq (char-before) (matching-paren (char-after)))) + (delete-char -1) ; Empty list -- delete both + (delete-char +1)) ; delimiters. + ((eq ?\; (char-after)) + (paredit-forward-delete-comment-start)) + ((eq (char-syntax (char-after)) ?\) ) + (if (paredit-handle-sexp-errors + (save-excursion (forward-char) (backward-sexp) t) + nil) + (message "End of list!") + (progn + (message "Deleting spurious closing delimiter.") + (delete-char +1)))) + ;; Just delete a single character, if it's not a closing + ;; delimiter. (The character literal case is already handled + ;; by now.) + (t (delete-char +1)))) + +(defun paredit-forward-delete-in-string () + (let ((start+end (paredit-string-start+end-points))) + (cond ((not (eq (point) (cdr start+end))) + ;; If it's not the close-quote, it's safe to delete. But + ;; first handle the case that we're in a string escape. + (cond ((paredit-in-string-escape-p) + ;; We're right after the backslash, so backward + ;; delete it before deleting the escaped character. + (delete-char -1)) + ((eq (char-after) ?\\ ) + ;; If we're not in a string escape, but we are on a + ;; backslash, it must start the escape for the next + ;; character, so delete the backslash before deleting + ;; the next character. + (delete-char +1))) + (delete-char +1)) + ((eq (1- (point)) (car start+end)) + ;; If it is the close-quote, delete only if we're also right + ;; past the open-quote (i.e. it's empty), and then delete + ;; both quotes. Otherwise we refuse to delete it. + (delete-char -1) + (delete-char +1))))) + +(defun paredit-check-forward-delete-in-comment () + ;; Point is in a comment, possibly at eol. We are about to delete + ;; some characters forward; if we are at eol, we are about to delete + ;; the line break. Refuse to do so if if moving the next line into + ;; the comment would break structure. + (if (eolp) + (let ((next-line-start (point-at-bol 2)) + (next-line-end (point-at-eol 2))) + (paredit-check-region next-line-start next-line-end)))) + +(defun paredit-forward-delete-in-comment () + (paredit-check-forward-delete-in-comment) + (delete-char +1)) + +(defun paredit-forward-delete-comment-start () + ;; Point precedes a comment start (not at eol). Refuse to delete a + ;; comment start if the comment contains unbalanced junk. + (paredit-check-region (+ (point) 1) (point-at-eol)) + (delete-char +1)) + +(defun paredit-backward-delete (&optional argument) + "Delete a character backward or move backward over a delimiter. +If on a closing S-expression delimiter, move backward into the + S-expression. +If on an opening S-expression delimiter, refuse to delete unless the + S-expression is empty, in which case delete the whole S-expression. +With a numeric prefix argument N, delete N characters backward. +With a `C-u' prefix argument, simply delete a character backward, + without regard for delimiter balancing." + (interactive "P") + (cond ((or (consp argument) (bobp)) + ;++ Should this untabify? + (delete-char -1)) + ((integerp argument) + (if (< argument 0) + (paredit-forward-delete (- 0 argument)) + (while (> argument 0) + (paredit-backward-delete) + (setq argument (- argument 1))))) + ((paredit-in-string-p) + (paredit-backward-delete-in-string)) + ((paredit-in-comment-p) + (paredit-backward-delete-in-comment)) + ((paredit-in-char-p) ; Escape -- delete both chars. + (delete-char -1) + (delete-char +1)) + ((paredit-in-char-p (1- (point))) + (delete-char -2)) ; ditto + ((let ((syn (char-syntax (char-before)))) + (or (eq syn ?\) ) + (eq syn ?\" ))) + (if (save-excursion + (paredit-handle-sexp-errors (progn (backward-sexp) t) + nil)) + (backward-char) + (message "Deleting spurious closing delimiter.") + (delete-char -1))) + ((and (eq (char-syntax (char-before)) ?\( ) + (eq (char-after) (matching-paren (char-before)))) + (delete-char -1) ; Empty list -- delete both + (delete-char +1)) ; delimiters. + ((bolp) + (paredit-backward-delete-maybe-comment-end)) + ((eq (char-syntax (char-before)) ?\( ) + (if (paredit-handle-sexp-errors + (save-excursion (backward-char) (forward-sexp) t) + nil) + (message "Beginning of list!") + (progn + (message "Deleting spurious closing delimiter.") + (delete-char -1)))) + ;; Delete it, unless it's an opening delimiter. The case of + ;; character literals is already handled by now. + (t + ;; Turn off the @#&*&!^&(%^ botch in GNU Emacs 24 that changed + ;; `backward-delete-char' and `backward-delete-char-untabify' + ;; semantically so that they delete the region in transient + ;; mark mode. + (let ((delete-active-region nil)) + (backward-delete-char-untabify +1))))) + +(defun paredit-backward-delete-in-string () + (let ((start+end (paredit-string-start+end-points))) + (cond ((not (eq (1- (point)) (car start+end))) + ;; If it's not the open-quote, it's safe to delete. + (if (paredit-in-string-escape-p) + ;; If we're on a string escape, since we're about to + ;; delete the backslash, we must first delete the + ;; escaped char. + (delete-char +1)) + (delete-char -1) + (if (paredit-in-string-escape-p) + ;; If, after deleting a character, we find ourselves in + ;; a string escape, we must have deleted the escaped + ;; character, and the backslash is behind the point, so + ;; backward delete it. + (delete-char -1))) + ((eq (point) (cdr start+end)) + ;; If it is the open-quote, delete only if we're also right + ;; past the close-quote (i.e. it's empty), and then delete + ;; both quotes. Otherwise we refuse to delete it. + (delete-char -1) + (delete-char +1))))) + +(defun paredit-backward-delete-in-comment () + ;; Point is in a comment, possibly just after the comment start. + ;; Refuse to delete a comment start if the comment contains + ;; unbalanced junk. + (if (save-excursion + (backward-char) + ;; Must call `paredit-in-string-p' before + ;; `paredit-in-comment-p'. + (not (or (paredit-in-string-p) (paredit-in-comment-p)))) + (paredit-check-region (point) (point-at-eol))) + (backward-delete-char-untabify +1)) + +(defun paredit-backward-delete-maybe-comment-end () + ;; Point is at bol, possibly just after a comment end (i.e., the + ;; previous line may have had a line comment). Refuse to delete a + ;; comment end if moving the current line into the previous line's + ;; comment would break structure. + (if (save-excursion + (backward-char) + (and (not (paredit-in-string-p)) (paredit-in-comment-p))) + (paredit-check-region (point-at-eol) (point-at-bol))) + (delete-char -1)) + +;;;; Killing + +(defun paredit-kill (&optional argument) + "Kill a line as if with `kill-line', but respecting delimiters. +In a string, act exactly as `kill-line' but do not kill past the + closing string delimiter. +On a line with no S-expressions on it starting after the point or + within a comment, act exactly as `kill-line'. +Otherwise, kill all S-expressions that start after the point. +With a `C-u' prefix argument, just do the standard `kill-line'. +With a numeric prefix argument N, do `kill-line' that many times." + (interactive "P") + (cond (argument + (kill-line (if (integerp argument) argument 1))) + ((paredit-in-string-p) + (paredit-kill-line-in-string)) + ((paredit-in-comment-p) + (paredit-kill-line-in-comment)) + ((save-excursion (paredit-skip-whitespace t (point-at-eol)) + (or (eolp) (eq (char-after) ?\; ))) + ;** Be careful about trailing backslashes. + (if (paredit-in-char-p) + (backward-char)) + (kill-line)) + (t (paredit-kill-sexps-on-line)))) + +(defun paredit-kill-line-in-string () + (if (save-excursion (paredit-skip-whitespace t (point-at-eol)) + (eolp)) + (kill-line) + (save-excursion + ;; Be careful not to split an escape sequence. + (if (paredit-in-string-escape-p) + (backward-char)) + (kill-region (point) + (min (point-at-eol) + (cdr (paredit-string-start+end-points))))))) + +(defun paredit-kill-line-in-comment () + ;; The variable `kill-whole-line' is not relevant: the point is in a + ;; comment, and hence not at the beginning of the line. + (paredit-check-forward-delete-in-comment) + (kill-line)) + +(defun paredit-kill-sexps-on-line () + (if (paredit-in-char-p) ; Move past the \ and prefix. + (backward-char 2)) ; (# in Scheme/CL, ? in elisp) + (let ((beginning (point)) + (eol (point-at-eol))) + (let ((end-of-list-p (paredit-forward-sexps-to-kill beginning eol))) + ;; If we got to the end of the list and it's on the same line, + ;; move backward past the closing delimiter before killing. (This + ;; allows something like killing the whitespace in ( ).) + (if end-of-list-p (progn (up-list) (backward-char))) + (if kill-whole-line + (paredit-kill-sexps-on-whole-line beginning) + (kill-region beginning + ;; If all of the S-expressions were on one line, + ;; i.e. we're still on that line after moving past + ;; the last one, kill the whole line, including + ;; any comments; otherwise just kill to the end of + ;; the last S-expression we found. Be sure, + ;; though, not to kill any closing parentheses. + (if (and (not end-of-list-p) + (eq (point-at-eol) eol)) + eol + (point))))))) + +;;; Please do not try to understand this code unless you have a VERY +;;; good reason to do so. I gave up trying to figure it out well +;;; enough to explain it, long ago. + +(defun paredit-forward-sexps-to-kill (beginning eol) + (let ((end-of-list-p nil) + (firstp t)) + ;; Move to the end of the last S-expression that started on this + ;; line, or to the closing delimiter if the last S-expression in + ;; this list is on the line. + (catch 'return + (while t + ;; This and the `kill-whole-line' business below fix a bug that + ;; inhibited any S-expression at the very end of the buffer + ;; (with no trailing newline) from being deleted. It's a + ;; bizarre fix that I ought to document at some point, but I am + ;; too busy at the moment to do so. + (if (and kill-whole-line (eobp)) (throw 'return nil)) + (save-excursion + (paredit-handle-sexp-errors (forward-sexp) + (up-list) + (setq end-of-list-p (eq (point-at-eol) eol)) + (throw 'return nil)) + (if (or (and (not firstp) + (not kill-whole-line) + (eobp)) + (paredit-handle-sexp-errors + (progn (backward-sexp) nil) + t) + (not (eq (point-at-eol) eol))) + (throw 'return nil))) + (forward-sexp) + (if (and firstp + (not kill-whole-line) + (eobp)) + (throw 'return nil)) + (setq firstp nil))) + end-of-list-p)) + +(defun paredit-kill-sexps-on-whole-line (beginning) + (kill-region beginning + (or (save-excursion ; Delete trailing indentation... + (paredit-skip-whitespace t) + (and (not (eq (char-after) ?\; )) + (point))) + ;; ...or just use the point past the newline, if + ;; we encounter a comment. + (point-at-eol))) + (cond ((save-excursion (paredit-skip-whitespace nil (point-at-bol)) + (bolp)) + ;; Nothing but indentation before the point, so indent it. + (lisp-indent-line)) + ((eobp) nil) ; Protect the CHAR-SYNTAX below against NIL. + ;; Insert a space to avoid invalid joining if necessary. + ((let ((syn-before (char-syntax (char-before))) + (syn-after (char-syntax (char-after)))) + (or (and (eq syn-before ?\) ) ; Separate opposing + (eq syn-after ?\( )) ; parentheses, + (and (eq syn-before ?\" ) ; string delimiter + (eq syn-after ?\" )) ; pairs, + (and (memq syn-before '(?_ ?w)) ; or word or symbol + (memq syn-after '(?_ ?w))))) ; constituents. + (insert " ")))) + +;;;;; Killing Words + +;;; This is tricky and asymmetrical because backward parsing is +;;; extraordinarily difficult or impossible, so we have to implement +;;; killing in both directions by parsing forward. + +(defun paredit-forward-kill-word () + "Kill a word forward, skipping over intervening delimiters." + (interactive) + (let ((beginning (point))) + (skip-syntax-forward " -") + (let* ((parse-state (paredit-current-parse-state)) + (state (paredit-kill-word-state parse-state 'char-after))) + (while (not (or (eobp) + (eq ?w (char-syntax (char-after))))) + (setq parse-state + (progn (forward-char 1) (paredit-current-parse-state)) +;; (parse-partial-sexp (point) (1+ (point)) +;; nil nil parse-state) + ) + (let* ((old-state state) + (new-state + (paredit-kill-word-state parse-state 'char-after))) + (cond ((not (eq old-state new-state)) + (setq parse-state + (paredit-kill-word-hack old-state + new-state + parse-state)) + (setq state + (paredit-kill-word-state parse-state + 'char-after)) + (setq beginning (point))))))) + (goto-char beginning) + (kill-word 1))) + +(defun paredit-backward-kill-word () + "Kill a word backward, skipping over any intervening delimiters." + (interactive) + (if (not (or (bobp) + (eq (char-syntax (char-before)) ?w))) + (let ((end (point))) + (backward-word 1) + (forward-word 1) + (goto-char (min end (point))) + (let* ((parse-state (paredit-current-parse-state)) + (state + (paredit-kill-word-state parse-state 'char-before))) + (while (and (< (point) end) + (progn + (setq parse-state + (parse-partial-sexp (point) (1+ (point)) + nil nil parse-state)) + (or (eq state + (paredit-kill-word-state parse-state + 'char-before)) + (progn (backward-char 1) nil))))) + (if (and (eq state 'comment) + (eq ?\# (char-after (point))) + (eq ?\| (char-before (point)))) + (backward-char 1))))) + (backward-kill-word 1)) + +;;;;;; Word-Killing Auxiliaries + +(defun paredit-kill-word-state (parse-state adjacent-char-fn) + (cond ((paredit-in-comment-p parse-state) 'comment) + ((paredit-in-string-p parse-state) 'string) + ((memq (char-syntax (funcall adjacent-char-fn)) + '(?\( ?\) )) + 'delimiter) + (t 'other))) + +;;; This optionally advances the point past any comment delimiters that +;;; should probably not be touched, based on the last state change and +;;; the characters around the point. It returns a new parse state, +;;; starting from the PARSE-STATE parameter. + +(defun paredit-kill-word-hack (old-state new-state parse-state) + (cond ((and (not (eq old-state 'comment)) + (not (eq new-state 'comment)) + (not (paredit-in-string-escape-p)) + (eq ?\# (char-before)) + (eq ?\| (char-after))) + (forward-char 1) + (paredit-current-parse-state) +;; (parse-partial-sexp (point) (1+ (point)) +;; nil nil parse-state) + ) + ((and (not (eq old-state 'comment)) + (eq new-state 'comment) + (eq ?\; (char-before))) + (skip-chars-forward ";") + (paredit-current-parse-state) +;; (parse-partial-sexp (point) (save-excursion +;; (skip-chars-forward ";")) +;; nil nil parse-state) + ) + (t parse-state))) + +(defun paredit-copy-as-kill () + "Save in the kill ring the region that `paredit-kill' would kill." + (interactive) + (cond ((paredit-in-string-p) + (paredit-copy-as-kill-in-string)) + ((paredit-in-comment-p) + (copy-region-as-kill (point) (point-at-eol))) + ((save-excursion (paredit-skip-whitespace t (point-at-eol)) + (or (eolp) (eq (char-after) ?\; ))) + ;** Be careful about trailing backslashes. + (save-excursion + (if (paredit-in-char-p) + (backward-char)) + (copy-region-as-kill (point) (point-at-eol)))) + (t (paredit-copy-sexps-as-kill)))) + +(defun paredit-copy-as-kill-in-string () + (save-excursion + (if (paredit-in-string-escape-p) + (backward-char)) + (copy-region-as-kill (point) + (min (point-at-eol) + (cdr (paredit-string-start+end-points)))))) + +(defun paredit-copy-sexps-as-kill () + (save-excursion + (if (paredit-in-char-p) + (backward-char 2)) + (let ((beginning (point)) + (eol (point-at-eol))) + (let ((end-of-list-p (paredit-forward-sexps-to-kill beginning eol))) + (if end-of-list-p (progn (up-list) (backward-char))) + (copy-region-as-kill beginning + (cond (kill-whole-line + (or (save-excursion + (paredit-skip-whitespace t) + (and (not (eq (char-after) ?\; )) + (point))) + (point-at-eol))) + ((and (not end-of-list-p) + (eq (point-at-eol) eol)) + eol) + (t + (point)))))))) + +;;;; Deleting Regions + +(defun paredit-delete-region (start end) + "Delete the text between point and mark, like `delete-region'. +If that text is unbalanced, signal an error instead. +With a prefix argument, skip the balance check." + (interactive "r") + (if (and start end (not current-prefix-arg)) + (paredit-check-region-for-delete start end)) + (setq this-command 'delete-region) + (delete-region start end)) + +(defun paredit-kill-region (start end) + "Kill the text between point and mark, like `kill-region'. +If that text is unbalanced, signal an error instead. +With a prefix argument, skip the balance check." + (interactive "r") + (if (and start end (not current-prefix-arg)) + (paredit-check-region-for-delete start end)) + (setq this-command 'kill-region) + (kill-region start end)) + +(defun paredit-check-region-for-delete (start end) + "Signal an error deleting text between START and END is unsafe." + (save-excursion + (goto-char start) + (let* ((start-state (paredit-current-parse-state)) + (end-state (parse-partial-sexp start end nil nil start-state))) + (paredit-check-region-for-delete:depth start start-state end end-state) + (paredit-check-region-for-delete:string start start-state end end-state) + (paredit-check-region-for-delete:comment start start-state end end-state) + (paredit-check-region-for-delete:char-quote start start-state + end end-state)))) + +(defun paredit-check-region-for-delete:depth (start start-state end end-state) + (let ((start-depth (nth 0 start-state)) + (end-depth (nth 0 end-state))) + (if (not (= start-depth end-depth)) + (error "Mismatched parenthesis depth: %S at start, %S at end." + start-depth + end-depth)))) + +(defun paredit-check-region-for-delete:string (start start-state end end-state) + (let ((start-string-p (nth 3 start-state)) + (end-string-p (nth 3 end-state))) + (if (not (eq start-string-p end-string-p)) + (error "Mismatched string state: start %sin string, end %sin string." + (if start-string-p "" "not ") + (if end-string-p "" "not "))))) + +(defun paredit-check-region-for-delete:comment + (start start-state end end-state) + (let ((start-comment-state (nth 4 start-state)) + (end-comment-state (nth 4 end-state))) + (if (not (or (eq start-comment-state end-comment-state) + ;; If we are moving text into or out of a line + ;; comment, make sure that the text is balanced. (The + ;; comment state may be a number, not t or nil at all, + ;; for nestable comments, which are not handled by + ;; this heuristic (or any of paredit, really).) + (and (or (and (eq start-comment-state nil) + (eq end-comment-state t)) + (and (eq start-comment-state t) + (eq end-comment-state nil))) + (save-excursion + (goto-char end) + (paredit-region-ok-p (point) (point-at-eol)))))) + (error "Mismatched comment state: %s" + (cond ((and (integerp start-comment-state) + (integerp end-comment-state)) + (format "depth %S at start, depth %S at end." + start-comment-state + end-comment-state)) + ((integerp start-comment-state) + "start in nested comment, end otherwise.") + ((integerp end-comment-state) + "end in nested comment, start otherwise.") + (start-comment-state + "start in comment, end not in comment.") + (end-comment-state + "end in comment, start not in comment.") + (t + (format "start %S, end %S." + start-comment-state + end-comment-state))))))) + +(defun paredit-check-region-for-delete:char-quote + (start start-state end end-state) + (let ((start-char-quote (nth 5 start-state)) + (end-char-quote (nth 5 end-state))) + (if (not (eq start-char-quote end-char-quote)) + (let ((phrase "character quotation")) + (error "Mismatched %s: start %sin %s, end %sin %s." + phrase + (if start-char-quote "" "not ") + phrase + (if end-char-quote "" "not ") + phrase))))) + +;;;; Point Motion + +(eval-and-compile + (defmacro defun-motion (name bvl doc &rest body) + `(defun ,name ,bvl + ,doc + ,(xcond ((paredit-xemacs-p) + '(interactive "_")) + ((paredit-gnu-emacs-p) + ;++ Not sure this is sufficient for the `^'. + (if (fboundp 'handle-shift-selection) + '(interactive "^p") + '(interactive "p")))) + ,@body))) + +(defun-motion paredit-forward (&optional arg) + "Move forward an S-expression, or up an S-expression forward. +If there are no more S-expressions in this one before the closing + delimiter, move past that closing delimiter; otherwise, move forward + past the S-expression following the point." + (let ((n (or arg 1))) + (cond ((< 0 n) (dotimes (i n) (paredit-move-forward))) + ((< n 0) (dotimes (i (- n)) (paredit-move-backward)))))) + +(defun-motion paredit-backward (&optional arg) + "Move backward an S-expression, or up an S-expression backward. +If there are no more S-expressions in this one before the opening + delimiter, move past that opening delimiter backward; otherwise, move + move backward past the S-expression preceding the point." + (let ((n (or arg 1))) + (cond ((< 0 n) (dotimes (i n) (paredit-move-backward))) + ((< n 0) (dotimes (i (- n)) (paredit-move-forward)))))) + +(defun paredit-move-forward () + (cond ((paredit-in-string-p) + (let ((end (paredit-enclosing-string-end))) + ;; `forward-sexp' and `up-list' may move into the next string + ;; in the buffer. Don't do that; move out of the current one. + (if (paredit-handle-sexp-errors + (progn (paredit-handle-sexp-errors (forward-sexp) + (up-list)) + (<= end (point))) + t) + (goto-char end)))) + ((paredit-in-char-p) + (forward-char)) + (t + (paredit-handle-sexp-errors (forward-sexp) + (up-list))))) + +(defun paredit-move-backward () + (cond ((paredit-in-string-p) + (let ((start (paredit-enclosing-string-start))) + (if (paredit-handle-sexp-errors + (progn (paredit-handle-sexp-errors (backward-sexp) + (backward-up-list)) + (<= (point) start)) + t) + (goto-char start)))) + ((paredit-in-char-p) + ;++ Corner case: a buffer of `\|x'. What to do? + (backward-char 2)) + (t + (paredit-handle-sexp-errors (backward-sexp) + (backward-up-list))))) + +;;;; Window Positioning + +(defalias 'paredit-recentre-on-sexp 'paredit-recenter-on-sexp) + +(defun paredit-recenter-on-sexp (&optional n) + "Recenter the screen on the S-expression following the point. +With a prefix argument N, encompass all N S-expressions forward." + (interactive "P") + (let* ((p (point)) + (end-point (progn (forward-sexp n) (point))) + (start-point (progn (goto-char end-point) (backward-sexp n) (point)))) + ;; Point is at beginning of first S-expression. + (let ((p-visible nil) (start-visible nil)) + (save-excursion + (forward-line (/ (count-lines start-point end-point) 2)) + (recenter) + (setq p-visible (pos-visible-in-window-p p)) + (setq start-visible (pos-visible-in-window-p start-point))) + (cond ((not start-visible) + ;; Implies (not p-visible). Put the start at the top of + ;; the screen. + (recenter 0)) + (p-visible + ;; Go back to p if we can. + (goto-char p)))))) + +(defun paredit-recenter-on-defun () + "Recenter the screen on the definition at point." + (interactive) + (save-excursion + (beginning-of-defun) + (paredit-recenter-on-sexp))) + +(defun paredit-focus-on-defun () + "Moves display to the top of the definition at point." + (interactive) + (beginning-of-defun) + (recenter 0)) + +;;;; Generalized Upward/Downward Motion + +(defun paredit-up/down (n vertical-direction) + (let ((horizontal-direction (if (< 0 n) +1 -1))) + (while (/= n 0) + (goto-char + (paredit-next-up/down-point horizontal-direction vertical-direction)) + (setq n (- n horizontal-direction))))) + +(defun paredit-next-up/down-point (horizontal-direction vertical-direction) + (let ((state (paredit-current-parse-state)) + (scan-lists + (lambda () + (scan-lists (point) horizontal-direction vertical-direction)))) + (cond ((paredit-in-string-p state) + (let ((start+end (paredit-string-start+end-points state))) + (if (< 0 vertical-direction) + (if (< 0 horizontal-direction) + (+ 1 (cdr start+end)) + (car start+end)) + ;; We could let the user try to descend into lists + ;; within the string, but that would be asymmetric + ;; with the up case, which rises out of the whole + ;; string and not just out of a list within the + ;; string, so this case will just be an error. + (error "Can't descend further into string.")))) + ((< 0 vertical-direction) + ;; When moving up, just try to rise up out of the list. + (or (funcall scan-lists) + (buffer-end horizontal-direction))) + ((< vertical-direction 0) + ;; When moving down, look for a string closer than a list, + ;; and use that if we find it. + (let* ((list-start + (paredit-handle-sexp-errors (funcall scan-lists) nil)) + (string-start + (paredit-find-next-string-start horizontal-direction + list-start))) + (if (and string-start list-start) + (if (< 0 horizontal-direction) + (min string-start list-start) + (max string-start list-start)) + (or string-start + ;; Scan again: this is a kludgey way to report the + ;; error if there really was one. + (funcall scan-lists) + (buffer-end horizontal-direction))))) + (t + (error "Vertical direction must be nonzero in `%s'." + 'paredit-up/down))))) + +(defun paredit-find-next-string-start (horizontal-direction limit) + (let ((buffer-limit-p (if (< 0 horizontal-direction) 'eobp 'bobp)) + (next-char (if (< 0 horizontal-direction) 'char-after 'char-before)) + (pastp (if (< 0 horizontal-direction) '> '<))) + (paredit-handle-sexp-errors + (save-excursion + (catch 'exit + (while t + (if (or (funcall buffer-limit-p) + (and limit (funcall pastp (point) limit))) + (throw 'exit nil)) + (forward-sexp horizontal-direction) + (save-excursion + (backward-sexp horizontal-direction) + (if (eq ?\" (char-syntax (funcall next-char))) + (throw 'exit (+ (point) horizontal-direction))))))) + nil))) + +(defun-motion paredit-forward-down (&optional argument) + "Move forward down into a list. +With a positive argument, move forward down that many levels. +With a negative argument, move backward down that many levels." + (paredit-up/down (or argument +1) -1)) + +(defun-motion paredit-backward-up (&optional argument) + "Move backward up out of the enclosing list. +With a positive argument, move backward up that many levels. +With a negative argument, move forward up that many levels. +If in a string initially, that counts as one level." + (paredit-up/down (- 0 (or argument +1)) +1)) + +(defun-motion paredit-forward-up (&optional argument) + "Move forward up out of the enclosing list. +With a positive argument, move forward up that many levels. +With a negative argument, move backward up that many levels. +If in a string initially, that counts as one level." + (paredit-up/down (or argument +1) +1)) + +(defun-motion paredit-backward-down (&optional argument) + "Move backward down into a list. +With a positive argument, move backward down that many levels. +With a negative argument, move forward down that many levels." + (paredit-up/down (- 0 (or argument +1)) -1)) + +;;;; Depth-Changing Commands: Wrapping, Splicing, & Raising + +(defun paredit-wrap-sexp (&optional argument open close) + "Wrap the following S-expression. +If a `C-u' prefix argument is given, wrap all S-expressions following + the point until the end of the buffer or of the enclosing list. +If a numeric prefix argument N is given, wrap N S-expressions. +Automatically indent the newly wrapped S-expression. +As a special case, if the point is at the end of a list, simply insert + a parenthesis pair, rather than inserting a lone opening delimiter + and then signalling an error, in the interest of preserving + structure. +By default OPEN and CLOSE are round delimiters." + (interactive "P") + (paredit-lose-if-not-in-sexp 'paredit-wrap-sexp) + (let ((open (or open ?\( )) + (close (or close ?\) ))) + (paredit-handle-sexp-errors + ((lambda (n) (paredit-insert-pair n open close 'goto-char)) + (cond ((integerp argument) argument) + ((consp argument) (paredit-count-sexps-forward)) + ((paredit-region-active-p) nil) + (t 1))) + (insert close) + (backward-char))) + (save-excursion (backward-up-list) (indent-sexp))) + +(defun paredit-yank-pop (&optional argument) + "Replace just-yanked text with the next item in the kill ring. +If this command follows a `yank', just run `yank-pop'. +If this command follows a `paredit-wrap-sexp', or any other paredit + wrapping command (see `paredit-wrap-commands'), run `yank' and + reindent the enclosing S-expression. +If this command is repeated, run `yank-pop' and reindent the enclosing + S-expression. + +The argument is passed on to `yank' or `yank-pop'; see their + documentation for details." + (interactive "*p") + (cond ((eq last-command 'yank) + (yank-pop argument)) + ((memq last-command paredit-wrap-commands) + (yank argument) + ;; `yank' futzes with `this-command'. + (setq this-command 'paredit-yank-pop) + (save-excursion (backward-up-list) (indent-sexp))) + ((eq last-command 'paredit-yank-pop) + ;; Pretend we just did a `yank', so that we can use + ;; `yank-pop' without duplicating its definition. + (setq last-command 'yank) + (yank-pop argument) + ;; Return to our original state. + (setq last-command 'paredit-yank-pop) + (setq this-command 'paredit-yank-pop) + (save-excursion (backward-up-list) (indent-sexp))) + (t (error "Last command was not a yank or a wrap: %s" last-command)))) + +(defun paredit-splice-sexp (&optional argument) + "Splice the list that the point is on by removing its delimiters. +With a prefix argument as in `C-u', kill all S-expressions backward in + the current list before splicing all S-expressions forward into the + enclosing list. +With two prefix arguments as in `C-u C-u', kill all S-expressions + forward in the current list before splicing all S-expressions + backward into the enclosing list. +With a numerical prefix argument N, kill N S-expressions backward in + the current list before splicing the remaining S-expressions into the + enclosing list. If N is negative, kill forward. +Inside a string, unescape all backslashes, or signal an error if doing + so would invalidate the buffer's structure." + (interactive "P") + (if (paredit-in-string-p) + (paredit-splice-string argument) + (if (paredit-in-comment-p) + (error "Can't splice comment.")) + (paredit-handle-sexp-errors (paredit-enclosing-list-start) + (error "Can't splice top level.")) + (paredit-kill-surrounding-sexps-for-splice argument) + (let ((delete-start (paredit-enclosing-list-start)) + (delete-end + (let ((limit + (save-excursion + (paredit-ignore-sexp-errors (forward-sexp) (backward-sexp)) + (point)))) + (save-excursion + (backward-up-list) + (forward-char +1) + (paredit-skip-whitespace t limit) + (point))))) + (let ((end-marker (make-marker))) + (save-excursion + (up-list) + (delete-char -1) + (set-marker end-marker (point))) + (delete-region delete-start delete-end) + (paredit-splice-reindent delete-start (marker-position end-marker)))))) + +(defun paredit-splice-reindent (start end) + (paredit-preserving-column + ;; If we changed the first subform of the enclosing list, we must + ;; reindent the whole enclosing list. + (if (paredit-handle-sexp-errors + (save-excursion + (backward-up-list) + (down-list) + (paredit-ignore-sexp-errors (forward-sexp)) + (< start (point))) + nil) + (save-excursion (backward-up-list) (indent-sexp)) + (paredit-indent-region start end)))) + +(defun paredit-kill-surrounding-sexps-for-splice (argument) + (cond ((or (paredit-in-string-p) + (paredit-in-comment-p)) + (error "Invalid context for splicing S-expressions.")) + ((or (not argument) (eq argument 0)) nil) + ((or (numberp argument) (eq argument '-)) + ;; Kill S-expressions before/after the point by saving the + ;; point, moving across them, and killing the region. + (let* ((argument (if (eq argument '-) -1 argument)) + (saved (paredit-point-at-sexp-boundary (- argument)))) + (goto-char saved) + (paredit-ignore-sexp-errors (backward-sexp argument)) + (paredit-hack-kill-region saved (point)))) + ((consp argument) + (let ((v (car argument))) + (if (= v 4) ;One `C-u'. + ;; Move backward until we hit the open paren; then + ;; kill that selected region. + (let ((end (point))) + (paredit-ignore-sexp-errors + (while (not (bobp)) + (backward-sexp))) + (paredit-hack-kill-region (point) end)) + ;; Move forward until we hit the close paren; then + ;; kill that selected region. + (let ((beginning (point))) + (paredit-ignore-sexp-errors + (while (not (eobp)) + (forward-sexp))) + (paredit-hack-kill-region beginning (point)))))) + (t (error "Bizarre prefix argument `%s'." argument)))) + +(defun paredit-splice-sexp-killing-backward (&optional n) + "Splice the list the point is on by removing its delimiters, and + also kill all S-expressions before the point in the current list. +With a prefix argument N, kill only the preceding N S-expressions." + (interactive "P") + (paredit-splice-sexp (if n + (prefix-numeric-value n) + '(4)))) + +(defun paredit-splice-sexp-killing-forward (&optional n) + "Splice the list the point is on by removing its delimiters, and + also kill all S-expressions after the point in the current list. +With a prefix argument N, kill only the following N S-expressions." + (interactive "P") + (paredit-splice-sexp (if n + (- (prefix-numeric-value n)) + '(16)))) + +(defun paredit-raise-sexp (&optional argument) + "Raise the following S-expression in a tree, deleting its siblings. +With a prefix argument N, raise the following N S-expressions. If N + is negative, raise the preceding N S-expressions. +If the point is on an S-expression, such as a string or a symbol, not + between them, that S-expression is considered to follow the point." + (interactive "P") + (save-excursion + (cond ((paredit-in-string-p) + (goto-char (car (paredit-string-start+end-points)))) + ((paredit-in-char-p) + (backward-sexp)) + ((paredit-in-comment-p) + (error "No S-expression to raise in comment."))) + ;; Select the S-expressions we want to raise in a buffer substring. + (let* ((n (prefix-numeric-value argument)) + (bound (scan-sexps (point) n)) + (sexps + (if (< n 0) + (buffer-substring bound (paredit-point-at-sexp-end)) + (buffer-substring (paredit-point-at-sexp-start) bound)))) + ;; Move up to the list we're raising those S-expressions out of and + ;; delete it. + (backward-up-list) + (delete-region (point) (scan-sexps (point) 1)) + (let* ((indent-start (point)) + (indent-end (save-excursion (insert sexps) (point)))) + (indent-region indent-start indent-end nil))))) + +;;; The effects of convolution on the surrounding whitespace are pretty +;;; random. If you have better suggestions, please let me know. + +(defun paredit-convolute-sexp (&optional n) + "Convolute S-expressions. +Save the S-expressions preceding point and delete them. +Splice the S-expressions following point. +Wrap the enclosing list in a new list prefixed by the saved text. +With a prefix argument N, move up N lists before wrapping." + (interactive "p") + (paredit-lose-if-not-in-sexp 'paredit-convolute-sexp) + ;; Make sure we can move up before destroying anything. + (save-excursion (backward-up-list n) (backward-up-list)) + (let (open close) ;++ Is this a good idea? + (let ((prefix + (let ((end (point))) + (paredit-ignore-sexp-errors + (while (not (bobp)) (backward-sexp))) + (prog1 (buffer-substring (point) end) + (backward-up-list) + (save-excursion (forward-sexp) + (setq close (char-before)) + (delete-char -1)) + (setq open (char-after)) + (delete-region (point) end) + ;; I'm not sure this makes sense... + (if (not (eolp)) (just-one-space)))))) + (backward-up-list n) + (paredit-insert-pair 1 open close 'goto-char) + (insert prefix) + ;; I'm not sure this makes sense either... + (if (not (eolp)) (just-one-space)) + (save-excursion + (backward-up-list) + (paredit-ignore-sexp-errors (indent-sexp)))))) + +(defun paredit-splice-string (argument) + (let ((original-point (point)) + (start+end (paredit-string-start+end-points))) + (let ((start (car start+end)) + (end (cdr start+end))) + ;; START and END both lie before the respective quote + ;; characters, which we want to delete; thus we increment START + ;; by one to extract the string, and we increment END by one to + ;; delete the string. + (let* ((escaped-string + (cond ((not (consp argument)) + (buffer-substring (1+ start) end)) + ((= 4 (car argument)) + (buffer-substring original-point end)) + (t + (buffer-substring (1+ start) original-point)))) + (unescaped-string + (paredit-unescape-string escaped-string))) + (if (not unescaped-string) + (error "Unspliceable string.") + (save-excursion + (goto-char start) + (delete-region start (1+ end)) + (insert unescaped-string)) + (if (not (and (consp argument) + (= 4 (car argument)))) + (goto-char (- original-point 1)))))))) + +(defun paredit-unescape-string (string) + (with-temp-buffer + (insert string) + (goto-char (point-min)) + (while (and (not (eobp)) + ;; nil -> no bound; t -> no errors. + (search-forward "\\" nil t)) + (delete-char -1) + (forward-char)) + (paredit-handle-sexp-errors + (progn (scan-sexps (point-min) (point-max)) + (buffer-string)) + nil))) + +;;;; Slurpage & Barfage + +(defun paredit-forward-slurp-sexp (&optional argument) + "Add the S-expression following the current list into that list + by moving the closing delimiter. +Automatically reindent the newly slurped S-expression with respect to + its new enclosing form. +If in a string, move the opening double-quote forward by one + S-expression and escape any intervening characters as necessary, + without altering any indentation or formatting." + (interactive "P") + (save-excursion + (cond ((paredit-in-comment-p) + (error "Invalid context for slurping S-expressions.")) + ((numberp argument) + (if (< argument 0) + (paredit-forward-barf-sexp (- 0 argument)) + (while (< 0 argument) + (paredit-forward-slurp-sexp) + (setq argument (- argument 1))))) + ((paredit-in-string-p) + ;; If there is anything to slurp into the string, take that. + ;; Otherwise, try to slurp into the enclosing list. + (if (save-excursion + (goto-char (paredit-enclosing-string-end)) + (paredit-handle-sexp-errors (progn (forward-sexp) nil) + t)) + (progn + (goto-char (paredit-enclosing-string-end)) + (paredit-forward-slurp-into-list argument)) + (paredit-forward-slurp-into-string argument))) + (t + (paredit-forward-slurp-into-list argument))))) + +(defun paredit-forward-slurp-into-list (&optional argument) + (let ((nestedp nil)) + (save-excursion + (up-list) ; Up to the end of the list to + (let ((close (char-before))) ; save and delete the closing + (delete-char -1) ; delimiter. + (let ((start (point))) + (catch 'return ; Go to the end of the desired + (while t ; S-expression, going up a + (paredit-handle-sexp-errors ; list if it's not in this, + (progn (forward-sexp) + (if argument + (paredit-ignore-sexp-errors + (while (not (eobp)) + (forward-sexp)))) + (throw 'return nil)) + (setq nestedp t) + (up-list) + (setq close ; adjusting for mixed + (prog1 (char-before) ; delimiters as necessary, + (delete-char -1) + (insert close)))))) + (insert close) ; to insert that delimiter. + (indent-region start (point) nil)))) + (if (and (not nestedp) + (eq (save-excursion (paredit-skip-whitespace nil) (point)) + (save-excursion (backward-up-list) (forward-char) (point))) + (eq (save-excursion (forward-sexp) (backward-sexp) (point)) + (save-excursion (paredit-skip-whitespace t) (point)))) + (delete-region (save-excursion (paredit-skip-whitespace nil) (point)) + (save-excursion (paredit-skip-whitespace t) (point)))))) + +(defun paredit-forward-slurp-into-string (&optional argument) + (let ((start (paredit-enclosing-string-start)) + (end (paredit-enclosing-string-end))) + (goto-char end) + ;; Signal any errors that we might get first, before mucking with + ;; the buffer's contents. + (save-excursion (forward-sexp)) + (let ((close (char-before))) + ;; Skip intervening whitespace if we're slurping into an empty + ;; string. XXX What about nonempty strings? + (if (and (= (+ start 2) end) + (eq (save-excursion (paredit-skip-whitespace t) (point)) + (save-excursion (forward-sexp) (backward-sexp) (point)))) + (delete-region (- (point) 1) + (save-excursion (paredit-skip-whitespace t) (point))) + (delete-char -1)) + (paredit-forward-for-quote + (save-excursion + (forward-sexp) + (if argument + (while (paredit-handle-sexp-errors (progn (forward-sexp) t) nil))) + (point))) + (insert close)))) + +(defun paredit-forward-barf-sexp (&optional argument) + "Remove the last S-expression in the current list from that list + by moving the closing delimiter. +Automatically reindent the newly barfed S-expression with respect to + its new enclosing form." + (interactive "P") + (paredit-lose-if-not-in-sexp 'paredit-forward-barf-sexp) + (if (and (numberp argument) (< argument 0)) + (paredit-forward-slurp-sexp (- 0 argument)) + (let ((start (point)) (end nil)) + (save-excursion + (up-list) ; Up to the end of the list to + (let ((close (char-before))) ; save and delete the closing + (delete-char -1) ; delimiter. + (setq end (point)) + (paredit-ignore-sexp-errors ; Go back to where we want to + (if (or (not argument) ; insert the delimiter. + (numberp argument)) + (backward-sexp argument) + (while (paredit-handle-sexp-errors + (save-excursion (backward-sexp) (<= start (point))) + nil) + (backward-sexp)))) + (paredit-skip-whitespace nil) ; Skip leading whitespace. + (cond ((bobp) + ;++ We'll have deleted the close, but there's no open. + ;++ Is that OK? + (error "Barfing all subexpressions with no open-paren?")) + ((paredit-in-comment-p) ; Don't put the close-paren in + (newline))) ; a comment. + (insert close)) + ;; Reindent all of the newly barfed S-expressions. Start at the + ;; start of the first barfed S-expression, not at the close we + ;; just inserted. + (forward-sexp) + (backward-sexp) + (if (or (not argument) (numberp argument)) + (paredit-forward-and-indent argument) + (indent-region (point) end)))))) + +(defun paredit-backward-slurp-sexp (&optional argument) + "Add the S-expression preceding the current list into that list + by moving the closing delimiter. +Automatically reindent the whole form into which new S-expression was + slurped. +If in a string, move the opening double-quote backward by one + S-expression and escape any intervening characters as necessary, + without altering any indentation or formatting." + (interactive "P") + (save-excursion + (cond ((paredit-in-comment-p) + (error "Invalid context for slurping S-expressions.")) + ((numberp argument) + (if (< argument 0) + (paredit-backward-barf-sexp (- 0 argument)) + (while (< 0 argument) + (paredit-backward-slurp-sexp) + (setq argument (- argument 1))))) + ((paredit-in-string-p) + ;; If there is anything to slurp into the string, take that. + ;; Otherwise, try to slurp into the enclosing list. + (if (save-excursion + (goto-char (paredit-enclosing-string-start)) + (paredit-handle-sexp-errors (progn (backward-sexp) nil) + t)) + (progn + (goto-char (paredit-enclosing-string-start)) + (paredit-backward-slurp-into-list argument)) + (paredit-backward-slurp-into-string argument))) + (t + (paredit-backward-slurp-into-list argument))))) + +(defun paredit-backward-slurp-into-list (&optional argument) + (let ((nestedp nil)) + (save-excursion + (backward-up-list) + (let ((open (char-after))) + (delete-char +1) + (catch 'return + (while t + (paredit-handle-sexp-errors + (progn (backward-sexp) + (if argument + (paredit-ignore-sexp-errors + (while (not (bobp)) + (backward-sexp)))) + (throw 'return nil)) + (setq nestedp t) + (backward-up-list) + (setq open + (prog1 (char-after) + (save-excursion (insert open) (delete-char +1))))))) + (insert open)) + ;; Reindent the line at the beginning of wherever we inserted the + ;; opening delimiter, and then indent the whole S-expression. + (backward-up-list) + (lisp-indent-line) + (indent-sexp)) + ;; If we slurped into an empty list, don't leave dangling space: + ;; (foo |). + (if (and (not nestedp) + (eq (save-excursion (paredit-skip-whitespace nil) (point)) + (save-excursion (backward-sexp) (forward-sexp) (point))) + (eq (save-excursion (up-list) (backward-char) (point)) + (save-excursion (paredit-skip-whitespace t) (point)))) + (delete-region (save-excursion (paredit-skip-whitespace nil) (point)) + (save-excursion (paredit-skip-whitespace t) (point)))))) + +(defun paredit-backward-slurp-into-string (&optional argument) + (let ((start (paredit-enclosing-string-start)) + (end (paredit-enclosing-string-end))) + (goto-char start) + ;; Signal any errors that we might get first, before mucking with + ;; the buffer's contents. + (save-excursion (backward-sexp)) + (let ((open (char-after)) + (target (point))) + ;; Skip intervening whitespace if we're slurping into an empty + ;; string. XXX What about nonempty strings? + (if (and (= (+ start 2) end) + (eq (save-excursion (paredit-skip-whitespace nil) (point)) + (save-excursion (backward-sexp) (forward-sexp) (point)))) + (delete-region (save-excursion (paredit-skip-whitespace nil) (point)) + (+ (point) 1)) + (delete-char +1)) + (backward-sexp) + (if argument + (paredit-ignore-sexp-errors + (while (not (bobp)) + (backward-sexp)))) + (insert open) + (paredit-forward-for-quote target)))) + +(defun paredit-backward-barf-sexp (&optional argument) + "Remove the first S-expression in the current list from that list + by moving the closing delimiter. +Automatically reindent the barfed S-expression and the form from which + it was barfed." + (interactive "P") + (paredit-lose-if-not-in-sexp 'paredit-backward-barf-sexp) + (if (and (numberp argument) (< argument 0)) + (paredit-backward-slurp-sexp (- 0 argument)) + (let ((end (make-marker))) + (set-marker end (point)) + (save-excursion + (backward-up-list) + (let ((open (char-after))) + (delete-char +1) + (paredit-ignore-sexp-errors + (paredit-forward-and-indent + (if (or (not argument) (numberp argument)) + argument + (let ((n 0)) + (save-excursion + (while (paredit-handle-sexp-errors + (save-excursion + (forward-sexp) + (<= (point) end)) + nil) + (forward-sexp) + (setq n (+ n 1)))) + n)))) + (while (progn (paredit-skip-whitespace t) (eq (char-after) ?\; )) + (forward-line 1)) + (if (eobp) + ;++ We'll have deleted the close, but there's no open. + ;++ Is that OK? + (error "Barfing all subexpressions with no close-paren?")) + ;** Don't use `insert' here. Consider, e.g., barfing from + ;** (foo|) + ;** and how `save-excursion' works. + (insert-before-markers open)) + (backward-up-list) + (lisp-indent-line) + (indent-sexp))))) + +;;;; Splitting & Joining + +(defun paredit-split-sexp () + "Split the list or string the point is on into two." + (interactive) + (cond ((paredit-in-string-p) + (insert "\"") + (save-excursion (insert " \""))) + ((or (paredit-in-comment-p) + (paredit-in-char-p)) + (error "Invalid context for splitting S-expression.")) + (t + (let ((open (save-excursion (backward-up-list) (char-after))) + (close (save-excursion (up-list) (char-before)))) + (delete-horizontal-space) + (insert close) + (save-excursion + (insert ?\ ) + (insert open) + (backward-char) + (indent-sexp)))))) + +(defun paredit-join-sexps () + "Join the S-expressions adjacent on either side of the point. +Both must be lists, strings, or atoms; error if there is a mismatch." + (interactive) + (cond ((paredit-in-comment-p) (error "Can't join S-expressions in comment.")) + ((paredit-in-string-p) (error "Nothing to join in a string.")) + ((paredit-in-char-p) (error "Can't join characters."))) + (let ((left-point (paredit-point-at-sexp-end)) + (right-point (paredit-point-at-sexp-start))) + (let ((left-char (char-before left-point)) + (right-char (char-after right-point))) + (let ((left-syntax (char-syntax left-char)) + (right-syntax (char-syntax right-char))) + (cond ((< right-point left-point) + (error "Can't join a datum with itself.")) + ((and (eq left-syntax ?\) ) + (eq right-syntax ?\( ) + (eq left-char (matching-paren right-char)) + (eq right-char (matching-paren left-char))) + (paredit-join-lists-internal left-point right-point) + (paredit-preserving-column + (save-excursion + (backward-up-list) + (indent-sexp)))) + ((and (eq left-syntax ?\" ) + (eq right-syntax ?\" )) + ;; Delete any intermediate formatting. + (delete-region (1- left-point) (1+ right-point))) + ((and (memq left-syntax '(?w ?_)) ; Word or symbol + (memq right-syntax '(?w ?_))) + (delete-region left-point right-point)) + (t (error "Mismatched S-expressions to join."))))))) + +(defun paredit-join-lists-internal (left-point right-point) + (save-excursion + ;; Leave intermediate formatting alone. + (goto-char right-point) + (delete-char +1) + (goto-char left-point) + (delete-char -1) + ;; Kludge: Add an extra space in several conditions. + (if (or + ;; (foo)| ;x\n(bar) => (foo | ;x\nbar), not (foo| ;x\nbar). + (and (not (eolp)) + (save-excursion + (paredit-skip-whitespace t (point-at-eol)) + (eq (char-after) ?\;))) + ;; (foo)|(bar) => (foo| bar), not (foo|bar). + (and (= left-point right-point) + (not (or (eq ?\ (char-syntax (char-before))) + (eq ?\ (char-syntax (char-after))))))) + (insert ?\ )))) + +;++ How ought paredit-join to handle comments intervening symbols or strings? +;++ Idea: +;++ +;++ "foo" | ;bar +;++ "baz" ;quux +;++ +;++ => +;++ +;++ "foo|baz" ;bar +;++ ;quux +;++ +;++ The point should stay where it is relative to the comments, and the +;++ the comments' columns should all be preserved, perhaps. Hmmmm... +;++ What about this? +;++ +;++ "foo" ;bar +;++ | ;baz +;++ "quux" ;zot + +;++ Should rename: +;++ paredit-point-at-sexp-start -> paredit-start-of-sexp-after-point +;++ paredit-point-at-sexp-end -> paredit-end-of-sexp-before-point + +;;;; Variations on the Lurid Theme + +;;; I haven't the imagination to concoct clever names for these. + +(defun paredit-add-to-previous-list () + "Add the S-expression following point to the list preceding point." + (interactive) + (paredit-lose-if-not-in-sexp 'paredit-add-to-previous-list) + (save-excursion + (down-list -1) ;++ backward-down-list... + (paredit-forward-slurp-sexp))) + +(defun paredit-add-to-next-list () + "Add the S-expression preceding point to the list following point. +If no S-expression precedes point, move up the tree until one does." + (interactive) + (paredit-lose-if-not-in-sexp 'paredit-add-to-next-list) + (save-excursion + (down-list) + (paredit-backward-slurp-sexp))) + +(defun paredit-join-with-previous-list () + "Join the list the point is on with the previous list in the buffer." + (interactive) + (paredit-lose-if-not-in-sexp 'paredit-join-with-previous-list) + (save-excursion + (while (paredit-handle-sexp-errors (save-excursion (backward-sexp) nil) + (backward-up-list) + t)) + (paredit-join-sexps))) + +(defun paredit-join-with-next-list () + "Join the list the point is on with the next list in the buffer." + (interactive) + (paredit-lose-if-not-in-sexp 'paredit-join-with-next-list) + (save-excursion + (while (paredit-handle-sexp-errors (save-excursion (forward-sexp) nil) + (up-list) + t)) + (paredit-join-sexps))) + +;;;; Utilities + +(defun paredit-in-string-escape-p () + "True if the point is on a character escape of a string. +This is true only if the character is preceded by an odd number of + backslashes. +This assumes that `paredit-in-string-p' has already returned true." + (let ((oddp nil)) + (save-excursion + (while (eq (char-before) ?\\ ) + (setq oddp (not oddp)) + (backward-char))) + oddp)) + +(defun paredit-in-char-p (&optional position) + "True if point is on a character escape outside a string." + (save-excursion + (goto-char (or position (point))) + (paredit-in-string-escape-p))) + +(defun paredit-skip-whitespace (trailing-p &optional limit) + "Skip past any whitespace, or until the point LIMIT is reached. +If TRAILING-P is nil, skip leading whitespace; otherwise, skip trailing + whitespace." + (funcall (if trailing-p 'skip-chars-forward 'skip-chars-backward) + " \t\n " ; This should skip using the syntax table, but LF + limit)) ; is a comment end, not newline, in Lisp mode. + +(defalias 'paredit-region-active-p + (xcond ((paredit-xemacs-p) 'region-active-p) + ((paredit-gnu-emacs-p) + (lambda () + (and mark-active transient-mark-mode))))) + +(defun paredit-hack-kill-region (start end) + "Kill the region between START and END. +Do not append to any current kill, and + do not let the next kill append to this one." + (interactive "r") ;Eh, why not? + ;; KILL-REGION sets THIS-COMMAND to tell the next kill that the last + ;; command was a kill. It also checks LAST-COMMAND to see whether it + ;; should append. If we bind these locally, any modifications to + ;; THIS-COMMAND will be masked, and it will not see LAST-COMMAND to + ;; indicate that it should append. + (let ((this-command nil) + (last-command nil)) + (kill-region start end))) + +;;;;; Reindentation utilities + +;++ Should `paredit-indent-sexps' and `paredit-forward-and-indent' use +;++ `paredit-indent-region' rather than `indent-region'? + +(defun paredit-indent-sexps () + "If in a list, indent all following S-expressions in the list." + (let* ((start (point)) + (end (paredit-handle-sexp-errors (progn (up-list) (point)) nil))) + (if end + (indent-region start end nil)))) + +(defun paredit-forward-and-indent (&optional n) + "Move forward by N S-expressions, indenting them with `indent-region'." + (let ((start (point))) + (forward-sexp n) + (indent-region start (point) nil))) + +(defun paredit-indent-region (start end) + "Indent the region from START to END. +Don't reindent the line starting at START, however." + (if (not (<= start end)) + (error "Incorrectly related points: %S, %S" start end)) + (save-excursion + (goto-char start) + (let ((bol (point-at-bol))) + ;; Skip all S-expressions that end on the starting line, but + ;; don't go past `end'. + (if (and (save-excursion (goto-char end) (not (eq bol (point-at-bol)))) + (paredit-handle-sexp-errors + (catch 'exit + (while t + (save-excursion + (forward-sexp) + (if (not (eq bol (point-at-bol))) + (throw 'exit t)) + (if (not (< (point) end)) + (throw 'exit nil))) + (forward-sexp))) + nil)) + (progn + ;; Point is still on the same line, but precedes an + ;; S-expression that ends on a different line. + (if (not (eq bol (point-at-bol))) + (error "Internal error -- we moved forward a line!")) + (goto-char (+ 1 (point-at-eol))) + (if (not (<= (point) end)) + (error "Internal error -- we frobnitzed the garfnut!")) + (indent-region (point) end nil)))))) + +;;;;; S-expression Parsing Utilities + +;++ These routines redundantly traverse S-expressions a great deal. +;++ If performance issues arise, this whole section will probably have +;++ to be refactored to preserve the state longer, like paredit.scm +;++ does, rather than to traverse the definition N times for every key +;++ stroke as it presently does. + +(defun paredit-current-parse-state () + "Return parse state of point from beginning of defun." + (let ((point (point))) + (beginning-of-defun) + ;; Calling PARSE-PARTIAL-SEXP will advance the point to its second + ;; argument (unless parsing stops due to an error, but we assume it + ;; won't in paredit-mode). + (parse-partial-sexp (point) point))) + +(defun paredit-in-string-p (&optional state) + "True if the parse state is within a double-quote-delimited string. +If no parse state is supplied, compute one from the beginning of the + defun to the point." + ;; 3. non-nil if inside a string (the terminator character, really) + (and (nth 3 (or state (paredit-current-parse-state))) + t)) + +(defun paredit-string-start+end-points (&optional state) + "Return a cons of the points of open and close quotes of the string. +The string is determined from the parse state STATE, or the parse state + from the beginning of the defun to the point. +This assumes that `paredit-in-string-p' has already returned true, i.e. + that the point is already within a string." + (save-excursion + ;; 8. character address of start of comment or string; nil if not + ;; in one + (let ((start (nth 8 (or state (paredit-current-parse-state))))) + (goto-char start) + (forward-sexp 1) + (cons start (1- (point)))))) + +(defun paredit-enclosing-string-start () + (car (paredit-string-start+end-points))) + +(defun paredit-enclosing-string-end () + (+ 1 (cdr (paredit-string-start+end-points)))) + +(defun paredit-enclosing-list-start () + (save-excursion + (backward-up-list) + (point))) + +(defun paredit-enclosing-list-end () + (save-excursion + (up-list) + (point))) + +(defun paredit-in-comment-p (&optional state) + "True if parse state STATE is within a comment. +If no parse state is supplied, compute one from the beginning of the + defun to the point." + ;; 4. nil if outside a comment, t if inside a non-nestable comment, + ;; else an integer (the current comment nesting) + (and (nth 4 (or state (paredit-current-parse-state))) + t)) + +(defun paredit-prefix-numeric-value (argument) + ;++ Kludgerific. + (cond ((integerp argument) argument) + ((eq argument '-) -1) + ((consp argument) + (cond ((equal argument '(4)) (paredit-count-sexps-forward)) ;C-u + ((equal argument '(16)) (paredit-count-sexps-backward)) ;C-u C-u + (t (error "Invalid prefix argument: %S" argument)))) + ((paredit-region-active-p) + (save-excursion + (save-restriction + (narrow-to-region (region-beginning) (region-end)) + (cond ((= (point) (point-min)) (paredit-count-sexps-forward)) + ((= (point) (point-max)) (paredit-count-sexps-backward)) + (t + (error "Point %S is not start or end of region: %S..%S" + (point) (region-beginning) (region-end))))))) + (t 1))) + +(defun paredit-count-sexps-forward () + (save-excursion + (let ((n 0) (p nil)) ;hurk + (paredit-ignore-sexp-errors + (while (setq p (scan-sexps (point) +1)) + (goto-char p) + (setq n (+ n 1)))) + n))) + +(defun paredit-count-sexps-backward () + (save-excursion + (let ((n 0) (p nil)) ;hurk + (paredit-ignore-sexp-errors + (while (setq p (scan-sexps (point) -1)) + (goto-char p) + (setq n (+ n 1)))) + n))) + +(defun paredit-point-at-sexp-boundary (n) + (cond ((< n 0) (paredit-point-at-sexp-start)) + ((= n 0) (point)) + ((> n 0) (paredit-point-at-sexp-end)))) + +(defun paredit-point-at-sexp-start () + (save-excursion + (forward-sexp) + (backward-sexp) + (point))) + +(defun paredit-point-at-sexp-end () + (save-excursion + (backward-sexp) + (forward-sexp) + (point))) + +(defun paredit-lose-if-not-in-sexp (command) + (if (or (paredit-in-string-p) + (paredit-in-comment-p) + (paredit-in-char-p)) + (error "Invalid context for command `%s'." command))) + +(defun paredit-check-region (start end) + "Signal an error if text between `start' and `end' is unbalanced." + ;; `narrow-to-region' will move the point, so avoid calling it if we + ;; don't need to. We don't want to use `save-excursion' because we + ;; want the point to move if `check-parens' reports an error. + (if (not (paredit-region-ok-p start end)) + (save-restriction + (narrow-to-region start end) + (check-parens)))) + +(defun paredit-region-ok-p (start end) + "Return true iff the region between `start' and `end' is balanced. +This is independent of context -- it doesn't check what state the + text at `start' is in." + (save-excursion + (paredit-handle-sexp-errors + (progn + (save-restriction + (narrow-to-region start end) + (scan-sexps (point-min) (point-max))) + t) + nil))) + +(defun paredit-current-indentation () + (save-excursion + (back-to-indentation) + (current-column))) + +(defun paredit-restore-column (column indentation) + ;; Preserve the point's position either in the indentation or in the + ;; code: if on code, move with the code; if in indentation, leave it + ;; in the indentation, either where it was (if still on indentation) + ;; or at the end of the indentation (if the code moved far enough + ;; left). + (let ((indentation* (paredit-current-indentation))) + (goto-char + (+ (point-at-bol) + (cond ((not (< column indentation)) + (+ column (- indentation* indentation))) + ((<= indentation* column) indentation*) + (t column)))))) + +;;;; Initialization + +(paredit-define-keys) +(paredit-annotate-mode-with-examples) +(paredit-annotate-functions-with-examples) + +(provide 'paredit) + +;;; Local Variables: +;;; outline-regexp: " \n;;;;+" +;;; End: + +;;; paredit.el ends here diff --git a/elpa/paredit-20140128.1248/paredit.elc b/elpa/paredit-20140128.1248/paredit.elc new file mode 100644 index 0000000000000000000000000000000000000000..5b332f8c5bc4771a6362e2f294e11041e54fca56 GIT binary patch literal 82118 zcmeIbi+>x(l_tu2_fCeCe%9J~Oya~=T2O3}wm<`o2SwXS^stgqVk@3ViF3#FEI|^K z5Rm`_fR^NFcmMVMzVFnju5L6aDfVRI-@TbJ)#$EwojUJx>Vw-K-}>Ro%F4M9KKLNJ zH90;R9Ssk%y{FmnV16C{&6=MK_HRxmk2a4c`-7uwGS2P|=Gl$Y2U)hAwYT2yw%>1E z%koyct0oSoljH0Vjb!irVK$u3-a{MjZ4QqI`?Jl1_l8F&gZEAb)8WBr-ejFtJHNKs z&b!zA?dI@E?Tp6RZC1*@L?a{gns+xln{9o2Jeohu21gjo$$WG?`f4yof!XFceZ2p0 zG_wJm&W5w>;OTg9Jlf9=Ci}DbbToc2yNa*V**qH@9AKugpZ4}Hfw5TzYKM&&09m4ulM@d z?I#Zhr?dI!%VBowcXvP9Ja=#OU<}B`LJz0Y$ut`sV*j%JBa|8v%=aG-XPZCO#KPd8 zVEPBym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?uIpA{4y7s3Pu@<@faKIYSh39|bRcm+n2R40+O{i%^ z)9xPV-QCzMBW$hV?yeXr)&H4<5j;9O<8#cEAP4D5isO#tv1UmwMAvoZX!awMW;=D@ zE;uh(E=J(C%2`Cnb`|ELs$3a<7YI4L;0b7aD)s=EO9FzKcG0jC%;fwE@?mA!!R97A z0W#{iP4C>;Dfj5vsXfd?sRBqA@V$W5N-nq@}Ya+psh) zQhe9}6v)4}B7st+{)lDm>9$;%pt-`_C5PB@KL$bd-vCtLW9rwvu9fn#yDw`9aEm0M zL@j;GWO`pp49cA?qXmE{<8@XkCSEw9!Amu`R<*BQTrt0*iDKMifXBY*{qjC{rEtR%}eruk;iU$QIfd0bOCZr*oCL})~?bS6QYkVmT zQ3i6{MW1Itak_ceI^dUaV&J&eZf!@&gUOlYOe_uh=+Lz1*2vkji*t)gc*<&2mofSS z2-FuAvLP<{pe>H-1&s-sROk{gc*r9rb!auIY!3^G<%2Q1mSat42ylu^K!6JT48fNx zNF?j*(t;>nTGHGj{wX$7|H-2sn@&+G9dv6@YT#3^!7azMtWhl*?|^fT!em+tT(3Ll zBOfx)9F4$9g{6nB;ys{qc655o{P8hN-i}-c{xYQVP!JOdcE1PP`p)>@aajxW1Q%CK zK?6R6{1Sez?d;e!j98GQt#`1$)%GJ0*3C2`9_U3N$P*P-B7JfGY4{JAhx_MmL^bKY zBN7*Qcq}j^wdSMY(?az;7=x5Ey#%$vxT*~{&Eb;)67JJp9O}g~yw-?`H)qv?Q>0sf NyHuzEyuESm{{Rnxk0Ss8 literal 0 HcmV?d00001 diff --git a/elpa/pkg-info-20140610.630/pkg-info-autoloads.el b/elpa/pkg-info-20140610.630/pkg-info-autoloads.el new file mode 100644 index 000000000..e1473d878 --- /dev/null +++ b/elpa/pkg-info-20140610.630/pkg-info-autoloads.el @@ -0,0 +1,131 @@ +;;; pkg-info-autoloads.el --- automatically extracted autoloads +;; +;;; Code: + + +;;;### (autoloads (pkg-info-version-info pkg-info-package-version +;;;;;; pkg-info-defining-library-version pkg-info-defining-library-original-version +;;;;;; pkg-info-library-version pkg-info-library-original-version) +;;;;;; "pkg-info" "pkg-info.el" (21478 16658 0 0)) +;;; Generated autoloads from pkg-info.el + +(autoload 'pkg-info-library-original-version "pkg-info" "\ +Get the original version in the header of LIBRARY. + +The original version is stored in the X-Original-Version header. +This header is added by the MELPA package archive to preserve +upstream version numbers. + +LIBRARY is either a symbol denoting a named feature, or a library +name as string. + +If SHOW is non-nil, show the version in the minibuffer. + +Return the version from the header of LIBRARY as list. Signal an +error if the LIBRARY was not found or had no X-Original-Version +header. + +See Info node `(elisp)Library Headers' for more information +about library headers. + +\(fn LIBRARY &optional SHOW)" t nil) + +(autoload 'pkg-info-library-version "pkg-info" "\ +Get the version in the header of LIBRARY. + +LIBRARY is either a symbol denoting a named feature, or a library +name as string. + +If SHOW is non-nil, show the version in the minibuffer. + +Return the version from the header of LIBRARY as list. Signal an +error if the LIBRARY was not found or had no proper header. + +See Info node `(elisp)Library Headers' for more information +about library headers. + +\(fn LIBRARY &optional SHOW)" t nil) + +(autoload 'pkg-info-defining-library-original-version "pkg-info" "\ +Get the original version of the library defining FUNCTION. + +The original version is stored in the X-Original-Version header. +This header is added by the MELPA package archive to preserve +upstream version numbers. + +If SHOW is non-nil, show the version in mini-buffer. + +This function is mainly intended to find the version of a major +or minor mode, i.e. + + (pkg-info-defining-library-version 'flycheck-mode) + +Return the version of the library defining FUNCTION. Signal an +error if FUNCTION is not a valid function, if its defining +library was not found, or if the library had no proper version +header. + +\(fn FUNCTION &optional SHOW)" t nil) + +(autoload 'pkg-info-defining-library-version "pkg-info" "\ +Get the version of the library defining FUNCTION. + +If SHOW is non-nil, show the version in mini-buffer. + +This function is mainly intended to find the version of a major +or minor mode, i.e. + + (pkg-info-defining-library-version 'flycheck-mode) + +Return the version of the library defining FUNCTION. Signal an +error if FUNCTION is not a valid function, if its defining +library was not found, or if the library had no proper version +header. + +\(fn FUNCTION &optional SHOW)" t nil) + +(autoload 'pkg-info-package-version "pkg-info" "\ +Get the version of an installed PACKAGE. + +If SHOW is non-nil, show the version in the minibuffer. + +Return the version as list, or nil if PACKAGE is not installed. + +\(fn PACKAGE &optional SHOW)" t nil) + +(autoload 'pkg-info-version-info "pkg-info" "\ +Obtain complete version info for LIBRARY and PACKAGE. + +LIBRARY is a symbol denoting a named feature, or a library name +as string. PACKAGE is a symbol denoting an ELPA package. If +omitted or nil, default to LIBRARY. + +If SHOW is non-nil, show the version in the minibuffer. + +When called interactively, prompt for LIBRARY. When called +interactively with prefix argument, prompt for PACKAGE as well. + +Return a string with complete version information for LIBRARY. +This version information contains the version from the headers of +LIBRARY, and the version of the installed PACKAGE, the LIBRARY is +part of. If PACKAGE is not installed, or if the PACKAGE version +is the same as the LIBRARY version, do not include a package +version. + +\(fn LIBRARY &optional PACKAGE SHOW)" t nil) + +;;;*** + +;;;### (autoloads nil nil ("pkg-info-pkg.el") (21478 16658 877262 +;;;;;; 0)) + +;;;*** + +(provide 'pkg-info-autoloads) +;; Local Variables: +;; version-control: never +;; no-byte-compile: t +;; no-update-autoloads: t +;; coding: utf-8 +;; End: +;;; pkg-info-autoloads.el ends here diff --git a/elpa/pkg-info-20140610.630/pkg-info-pkg.el b/elpa/pkg-info-20140610.630/pkg-info-pkg.el new file mode 100644 index 000000000..9e603b6d0 --- /dev/null +++ b/elpa/pkg-info-20140610.630/pkg-info-pkg.el @@ -0,0 +1 @@ +(define-package "pkg-info" "20140610.630" "Information about packages" (quote ((epl "0.4")))) diff --git a/elpa/pkg-info-20140610.630/pkg-info-pkg.elc b/elpa/pkg-info-20140610.630/pkg-info-pkg.elc new file mode 100644 index 0000000000000000000000000000000000000000..06da90747b2c0b13c39aa68c89c8d2866e0e456d GIT binary patch literal 623 zcmbtR%WlFj5agU6=yjD#K_bqB2nxBBA`VFHiS`2)+es`OJBpoF^y|BXKGh>D`QV-1 znORM-ecarPMx&r83fS1DRay!-oS;E}PtQe9$RDgdGHp3(um<+%Vck~%OGp>1JY6LV z$dWW4D9X+@P!b8mFHUwYCXSfN2DxJ*mb%5bJywx2rH#%@$vjQie3txl31(6cWXizy zya}(wq)0l;*^H$F_NIIdsL4_5Rioa~(|}{a06y2sU0n1|IuIv=jp86IcfM1ma#KP( z=K+PFbH8=cCCiroID{n*V?A(dJkoIQ%jk|eCR*<|yB+WvJLH~BP6v530-Obo1`ZOm z#XlmS$2gGKX(c=GH4SF7i!SAGRh`VR<;2Oo9)`$hKbq literal 0 HcmV?d00001 diff --git a/elpa/pkg-info-20140610.630/pkg-info.el b/elpa/pkg-info-20140610.630/pkg-info.el new file mode 100644 index 000000000..5c36a81d0 --- /dev/null +++ b/elpa/pkg-info-20140610.630/pkg-info.el @@ -0,0 +1,279 @@ +;;; pkg-info.el --- Information about packages -*- lexical-binding: t; -*- + +;; Copyright (C) 2013, 2014 Sebastian Wiesner + +;; Author: Sebastian Wiesner +;; URL: https://github.com/lunaryorn/pkg-info.el +;; Keywords: convenience +;; Version: 20140610.630 +;; X-Original-Version: 0.6-cvs +;; Package-Requires: ((epl "0.4")) + +;; This file is not part of GNU Emacs. + +;; 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: + +;; This library extracts information from installed packages. + +;;;; Functions: + +;; `pkg-info-library-version' extracts the version from the header of a library. +;; +;; `pkg-info-defining-library-version' extracts the version from the header of a +;; library defining a function. +;; +;; `pkg-info-package-version' gets the version of an installed package. +;; +;; `pkg-info-format-version' formats a version list as human readable string. +;; +;; `pkg-info-version-info' returns complete version information for a specific +;; package. + +;;; Code: + +(require 'epl) + +(require 'lisp-mnt) +(require 'find-func) + + +;;; Version information +(defun pkg-info-format-version (version) + "Format VERSION as human-readable string. + +Return a human-readable string representing VERSION." + ;; XXX: Find a better, more flexible way of formatting? + (package-version-join version)) + +(defsubst pkg-info--show-version-and-return (version show) + "Show and return VERSION. + +When SHOW is non-nil, show VERSION in minibuffer. + +Return VERSION." + (when show + (message (if (listp version) (pkg-info-format-version version) version))) + version) + +(defun pkg-info--read-library () + "Read a library from minibuffer." + (completing-read "Load library: " + (apply-partially 'locate-file-completion-table + load-path + (get-load-suffixes)))) + +(defun pkg-info--read-function () + "Read a function name from minibuffer." + (let ((input (completing-read "Function: " obarray #'boundp :require-match))) + (if (string= input "") nil (intern input)))) + +(defun pkg-info--read-package () + "Read a package name from minibuffer." + (let* ((installed (epl-installed-packages)) + (names (sort (mapcar (lambda (pkg) + (symbol-name (epl-package-name pkg))) + installed) + #'string<)) + (default (car names))) + (completing-read "Installed package: " names nil 'require-match + nil nil default))) + +(defun pkg-info-library-source (library) + "Get the source file of LIBRARY. + +LIBRARY is either a symbol denoting a named feature, or a library +name as string. + +Return the source file of LIBRARY as string." + (find-library-name (if (symbolp library) (symbol-name library) library))) + +(defun pkg-info-defining-library (function) + "Get the source file of the library defining FUNCTION. + +FUNCTION is a function symbol. + +Return the file name of the library as string. Signal an error +if the library does not exist, or if the definition of FUNCTION +was not found." + (unless (functionp function) + (signal 'wrong-type-argument (list 'functionp function))) + (let ((library (symbol-file function 'defun))) + (unless library + (error "Can't find definition of %s" function)) + library)) + +(defun pkg-info-x-original-version (file) + "Read the X-Original-Version header from FILE. + +Return the value as version list, or return nil if FILE lacks +this header. Signal an error, if the value of the header is not +a valid version." + (let ((version-str (with-temp-buffer + (insert-file-contents file) + (lm-header "X-Original-Version")))) + (when version-str + (version-to-list version-str)))) + +;;;###autoload +(defun pkg-info-library-original-version (library &optional show) + "Get the original version in the header of LIBRARY. + +The original version is stored in the X-Original-Version header. +This header is added by the MELPA package archive to preserve +upstream version numbers. + +LIBRARY is either a symbol denoting a named feature, or a library +name as string. + +If SHOW is non-nil, show the version in the minibuffer. + +Return the version from the header of LIBRARY as list. Signal an +error if the LIBRARY was not found or had no X-Original-Version +header. + +See Info node `(elisp)Library Headers' for more information +about library headers." + (interactive (list (pkg-info--read-library) t)) + (let ((version (pkg-info-x-original-version + (pkg-info-library-source library)))) + (if version + (pkg-info--show-version-and-return version show) + (error "Library %s has no original version" library)))) + +;;;###autoload +(defun pkg-info-library-version (library &optional show) + "Get the version in the header of LIBRARY. + +LIBRARY is either a symbol denoting a named feature, or a library +name as string. + +If SHOW is non-nil, show the version in the minibuffer. + +Return the version from the header of LIBRARY as list. Signal an +error if the LIBRARY was not found or had no proper header. + +See Info node `(elisp)Library Headers' for more information +about library headers." + (interactive (list (pkg-info--read-library) t)) + (let* ((source (pkg-info-library-source library)) + (version (epl-package-version (epl-package-from-file source)))) + (pkg-info--show-version-and-return version show))) + +;;;###autoload +(defun pkg-info-defining-library-original-version (function &optional show) + "Get the original version of the library defining FUNCTION. + +The original version is stored in the X-Original-Version header. +This header is added by the MELPA package archive to preserve +upstream version numbers. + +If SHOW is non-nil, show the version in mini-buffer. + +This function is mainly intended to find the version of a major +or minor mode, i.e. + + (pkg-info-defining-library-version 'flycheck-mode) + +Return the version of the library defining FUNCTION. Signal an +error if FUNCTION is not a valid function, if its defining +library was not found, or if the library had no proper version +header." + (interactive (list (pkg-info--read-function) t)) + (pkg-info-library-original-version (pkg-info-defining-library function) show)) + +;;;###autoload +(defun pkg-info-defining-library-version (function &optional show) + "Get the version of the library defining FUNCTION. + +If SHOW is non-nil, show the version in mini-buffer. + +This function is mainly intended to find the version of a major +or minor mode, i.e. + + (pkg-info-defining-library-version 'flycheck-mode) + +Return the version of the library defining FUNCTION. Signal an +error if FUNCTION is not a valid function, if its defining +library was not found, or if the library had no proper version +header." + (interactive (list (pkg-info--read-function) t)) + (pkg-info-library-version (pkg-info-defining-library function) show)) + +;;;###autoload +(defun pkg-info-package-version (package &optional show) + "Get the version of an installed PACKAGE. + +If SHOW is non-nil, show the version in the minibuffer. + +Return the version as list, or nil if PACKAGE is not installed." + (interactive (list (pkg-info--read-package) t)) + (let* ((name (if (stringp package) (intern package) package)) + (package (epl-find-installed-package name))) + (unless package + (error "Can't find installed package %s" name)) + (pkg-info--show-version-and-return (epl-package-version package) show))) + +;;;###autoload +(defun pkg-info-version-info (library &optional package show) + "Obtain complete version info for LIBRARY and PACKAGE. + +LIBRARY is a symbol denoting a named feature, or a library name +as string. PACKAGE is a symbol denoting an ELPA package. If +omitted or nil, default to LIBRARY. + +If SHOW is non-nil, show the version in the minibuffer. + +When called interactively, prompt for LIBRARY. When called +interactively with prefix argument, prompt for PACKAGE as well. + +Return a string with complete version information for LIBRARY. +This version information contains the version from the headers of +LIBRARY, and the version of the installed PACKAGE, the LIBRARY is +part of. If PACKAGE is not installed, or if the PACKAGE version +is the same as the LIBRARY version, do not include a package +version." + (interactive (list (pkg-info--read-library) + (when current-prefix-arg + (pkg-info--read-package)) + t)) + (let* ((package (or package (if (stringp library) (intern library) library))) + (orig-version (condition-case nil + (pkg-info-library-original-version library) + (error nil))) + ;; If we have X-Original-Version, we assume that MELPA replaced the + ;; library version with its generated version, so we use the + ;; X-Original-Version header instead, and ignore the library version + ;; header + (lib-version (or orig-version (pkg-info-library-version library))) + (pkg-version (condition-case nil + (pkg-info-package-version package) + (error nil))) + (version (if (and pkg-version + (not (version-list-= lib-version pkg-version))) + (format "%s (package: %s)" + (pkg-info-format-version lib-version) + (pkg-info-format-version pkg-version)) + (pkg-info-format-version lib-version)))) + (pkg-info--show-version-and-return version show))) + +(provide 'pkg-info) + +;; Local Variables: +;; indent-tabs-mode: nil +;; coding: utf-8 +;; End: + +;;; pkg-info.el ends here diff --git a/elpa/pkg-info-20140610.630/pkg-info.elc b/elpa/pkg-info-20140610.630/pkg-info.elc new file mode 100644 index 0000000000000000000000000000000000000000..5461539194e406eb9f50c552c89842dfb5ad6f3f GIT binary patch literal 8762 zcmeHM`)}LU751ZZQx3&C?1v5O9>;Rh*nugFq#l;jVsRZOHR>jTow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}peRKf4=H#rw zKQXKCEof#{SHCc`k5~Nq2bhe%SFpSWoilI0JP#8>Bo(P zYk+++aRhYhO4hTuN#%aQq07hK6|_56&BR;uAVaUR5J?Xyn6k+aIPbB?7cH+o&22rp z2U9lg!B91y@D=RhHy5*=QJSLh>1tHs4*Phm$tFo5g1%i!9|8AHR)K{VAwsV>Ltk_L E1GK`x+W-In literal 0 HcmV?d00001 diff --git a/elpa/popup-20140207.1702/popup-autoloads.el b/elpa/popup-20140207.1702/popup-autoloads.el new file mode 100644 index 000000000..3474b028d --- /dev/null +++ b/elpa/popup-20140207.1702/popup-autoloads.el @@ -0,0 +1,18 @@ +;;; popup-autoloads.el --- automatically extracted autoloads +;; +;;; Code: + + +;;;### (autoloads nil nil ("popup-pkg.el" "popup.el") (21478 16656 +;;;;;; 601786 0)) + +;;;*** + +(provide 'popup-autoloads) +;; Local Variables: +;; version-control: never +;; no-byte-compile: t +;; no-update-autoloads: t +;; coding: utf-8 +;; End: +;;; popup-autoloads.el ends here diff --git a/elpa/popup-20140207.1702/popup-pkg.el b/elpa/popup-20140207.1702/popup-pkg.el new file mode 100644 index 000000000..79df43d34 --- /dev/null +++ b/elpa/popup-20140207.1702/popup-pkg.el @@ -0,0 +1 @@ +(define-package "popup" "20140207.1702" "Visual Popup User Interface" (quote ((cl-lib "0.3")))) diff --git a/elpa/popup-20140207.1702/popup-pkg.elc b/elpa/popup-20140207.1702/popup-pkg.elc new file mode 100644 index 0000000000000000000000000000000000000000..bb726814b1709b28ef420a79d27e8fc4906f3657 GIT binary patch literal 620 zcmbtS%WA_g5X{*>(Cgw$6Nu$U3~Ay^(~v`;g+kiiHvW)H@%JuXm gUI#y6a2xi9UZO-UL%5$#xsJ3tLYS~cIGfFaA4Ju(_5c6? literal 0 HcmV?d00001 diff --git a/elpa/popup-20140207.1702/popup.el b/elpa/popup-20140207.1702/popup.el new file mode 100644 index 000000000..287785435 --- /dev/null +++ b/elpa/popup-20140207.1702/popup.el @@ -0,0 +1,1411 @@ +;;; popup.el --- Visual Popup User Interface + +;; Copyright (C) 2009, 2010, 2011, 2012, 2013 Tomohiro Matsuyama + +;; Author: Tomohiro Matsuyama +;; Keywords: lisp +;; Version: 20140207.1702 +;; X-Original-Version: 0.5.0 +;; Package-Requires: ((cl-lib "0.3")) + +;; 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: + +;; popup.el is a visual popup user interface library for Emacs. This +;; provides a basic API and common UI widgets such as popup tooltips +;; and popup menus. +;; See README.markdown for more information. + +;;; Code: + +(require 'cl-lib) + +(defconst popup-version "0.5.0") + + + +;;; Utilities + +(defun popup-calculate-max-width (max-width) + "Determines whether the width desired is +character or window proportion based, And returns the result." + (cl-typecase max-width + (integer max-width) + (float (* (ceiling (/ (round (* max-width (window-width))) 10.0)) 10)))) + +(defvar popup-use-optimized-column-computation t + "Use the optimized column computation routine. +If there is a problem, please set it nil.") + +(defmacro popup-aif (test then &rest else) + "Anaphoric if." + (declare (indent 2)) + `(let ((it ,test)) + (if it ,then ,@else))) + +(defmacro popup-awhen (test &rest body) + "Anaphoric when." + (declare (indent 1)) + `(let ((it ,test)) + (when it ,@body))) + +(defun popup-x-to-string (x) + "Convert any object to string effeciently. +This is faster than `prin1-to-string' in many cases." + (cl-typecase x + (string x) + (symbol (symbol-name x)) + (integer (number-to-string x)) + (float (number-to-string x)) + (t (format "%s" x)))) + +(defun popup-substring-by-width (string width) + "Return a cons cell of substring and remaining string by +splitting with WIDTH." + ;; Expand tabs into 4 spaces + (setq string (replace-regexp-in-string "\t" " " string)) + (cl-loop with len = (length string) + with w = 0 + for l from 0 + for c in (append string nil) + while (<= (cl-incf w (char-width c)) width) + finally return + (if (< l len) + (cons (substring string 0 l) (substring string l)) + (list string)))) + +(defun popup-fill-string (string &optional width max-width justify squeeze) + "Split STRING into fixed width strings and return a cons cell +like \(WIDTH . ROWS). Here, the car WIDTH indicates the actual +maxim width of ROWS. + +The argument WIDTH specifies the width of filling each +paragraph. WIDTH nil means don't perform any justification and +word wrap. Note that this function doesn't add any padding +characters at the end of each row. + +MAX-WIDTH, if WIDTH is nil, specifies the maximum number of +columns. + +The optional fourth argument JUSTIFY specifies which kind of +justification to do: `full', `left', `right', `center', or +`none' (equivalent to nil). A value of t means handle each +paragraph as specified by its text properties. + +SQUEEZE nil means leave whitespaces other than line breaks +untouched." + (if (eq width 0) + (error "Can't fill string with 0 width")) + (if width + (setq max-width width)) + (with-temp-buffer + (let ((tab-width 4) + (fill-column width) + (left-margin 0) + (kinsoku-limit 1) + indent-tabs-mode + row rows) + (insert string) + (untabify (point-min) (point-max)) + (if width + (fill-region (point-min) (point-max) justify (not squeeze))) + (goto-char (point-min)) + (setq width 0) + (while (prog2 + (let ((line (buffer-substring + (point) (progn (end-of-line) (point))))) + (if max-width + (while (progn + (setq row (truncate-string-to-width line max-width) + width (max width (string-width row))) + (push row rows) + (if (not (= (length row) (length line))) + (setq line (substring line (length row)))))) + (setq width (max width (string-width line))) + (push line rows))) + (< (point) (point-max)) + (beginning-of-line 2))) + (cons width (nreverse rows))))) + +(defmacro popup-save-buffer-state (&rest body) + (declare (indent 0)) + `(save-excursion + (let ((buffer-undo-list t) + (inhibit-read-only t) + (modified (buffer-modified-p))) + (unwind-protect + (progn ,@body) + (set-buffer-modified-p modified))))) + +(defun popup-window-full-width-p (&optional window) + "A portable version of `window-full-width-p'." + (if (fboundp 'window-full-width-p) + (window-full-width-p window) + (= (window-width window) (frame-width (window-frame (or window (selected-window))))))) + +(defun popup-truncated-partial-width-window-p (&optional window) + "A portable version of `truncated-partial-width-window-p'." + (unless window + (setq window (selected-window))) + (unless (popup-window-full-width-p window) + (let ((t-p-w-w (buffer-local-value 'truncate-partial-width-windows + (window-buffer window)))) + (if (integerp t-p-w-w) + (< (window-width window) t-p-w-w) + t-p-w-w)))) + +(defun popup-current-physical-column () + "Return the current physical column." + (or (when (and popup-use-optimized-column-computation + (eq (window-hscroll) 0)) + (let ((current-column (current-column))) + (if (or (popup-truncated-partial-width-window-p) + truncate-lines + (< current-column (window-width))) + current-column))) + (car (posn-col-row (posn-at-point))))) + +(defun popup-vertical-motion (column direction) + "A portable version of `vertical-motion'." + (if (>= emacs-major-version 23) + (vertical-motion (cons column direction)) + (vertical-motion direction) + (move-to-column (+ (current-column) column)))) + +(defun popup-last-line-of-buffer-p () + "Return non-nil if the cursor is at the last line of the +buffer." + (save-excursion (end-of-line) (/= (forward-line) 0))) + +(defun popup-lookup-key-by-event (function event) + (or (funcall function (vector event)) + (if (symbolp event) + (popup-aif (get event 'event-symbol-element-mask) + (funcall function + (vector (logior (or (get (car it) 'ascii-character) + 0) + (cadr it)))))))) + + + +;;; Core + +(defgroup popup nil + "Visual Popup User Interface" + :group 'lisp + :prefix "popup-") + +(defface popup-face + '((t (:background "lightgray" :foreground "black"))) + "Face for popup." + :group 'popup) + +(defface popup-summary-face + '((t (:inherit popup-face :foreground "dimgray"))) + "Face for popup summary." + :group 'popup) + +(defface popup-scroll-bar-foreground-face + '((t (:background "black"))) + "Foreground face for scroll-bar." + :group 'popup) + +(defface popup-scroll-bar-background-face + '((t (:background "gray"))) + "Background face for scroll-bar." + :group 'popup) + +(defvar popup-instances nil + "Popup instances.") + +(defvar popup-scroll-bar-foreground-char + (propertize " " 'face 'popup-scroll-bar-foreground-face) + "Foreground character for scroll-bar.") + +(defvar popup-scroll-bar-background-char + (propertize " " 'face 'popup-scroll-bar-background-face) + "Background character for scroll-bar.") + +(cl-defstruct popup + point row column width height min-height direction overlays keymap + parent depth + face mouse-face selection-face summary-face + margin-left margin-right margin-left-cancel scroll-bar symbol + cursor offset scroll-top current-height list newlines + pattern original-list) + +(defun popup-item-propertize (item &rest properties) + "Same as `propertize' except that this avoids overriding +existed value with `nil' property." + (cl-loop for (k v) on properties by 'cddr + if v append (list k v) into props + finally return + (apply 'propertize + (popup-x-to-string item) + props))) + +(defun popup-item-property (item property) + "Same as `get-text-property' except that this returns nil if +ITEM is not string." + (if (stringp item) + (get-text-property 0 property item))) + +(cl-defun popup-make-item (name + &key + value + face + mouse-face + selection-face + sublist + document + symbol + summary) + "Utility function to make popup item. See also +`popup-item-propertize'." + (popup-item-propertize name + 'value value + 'popup-face face + 'popup-mouse-face mouse-face + 'selection-face selection-face + 'document document + 'symbol symbol + 'summary summary + 'sublist sublist)) + +(defsubst popup-item-value (item) (popup-item-property item 'value)) +(defsubst popup-item-value-or-self (item) (or (popup-item-value item) item)) +(defsubst popup-item-face (item) (popup-item-property item 'popup-face)) +(defsubst popup-item-mouse-face (item) (popup-item-property item 'popup-mouse-face)) +(defsubst popup-item-selection-face (item) (popup-item-property item 'selection-face)) +(defsubst popup-item-document (item) (popup-item-property item 'document)) +(defsubst popup-item-summary (item) (popup-item-property item 'summary)) +(defsubst popup-item-symbol (item) (popup-item-property item 'symbol)) +(defsubst popup-item-sublist (item) (popup-item-property item 'sublist)) + +(defun popup-item-documentation (item) + (let ((doc (popup-item-document item))) + (if (functionp doc) + (setq doc (funcall doc (popup-item-value-or-self item)))) + doc)) + +(defun popup-item-show-help-1 (item) + (let ((doc (popup-item-documentation item))) + (when doc + (with-current-buffer (get-buffer-create " *Popup Help*") + (erase-buffer) + (insert doc) + (goto-char (point-min)) + (display-buffer (current-buffer))) + t))) + +(defun popup-item-show-help-with-event-loop (item) + (save-window-excursion + (when (popup-item-show-help-1 item) + (cl-loop do (clear-this-command-keys) + for key = (read-key-sequence-vector nil) + do + (cl-case (key-binding key) + (scroll-other-window + (scroll-other-window)) + (scroll-other-window-down + (scroll-other-window-down nil)) + (otherwise + (setq unread-command-events (append key unread-command-events)) + (cl-return))))))) + +(defun popup-item-show-help (item &optional persist) + "Display the documentation of ITEM with `display-buffer'. If +PERSIST is nil, the documentation buffer will be closed +automatically, meaning interal event loop ensures the buffer to +be closed. Otherwise, the buffer will be just displayed as +usual." + (when item + (if (not persist) + (popup-item-show-help-with-event-loop item) + (popup-item-show-help-1 item)))) + +(defun popup-set-list (popup list) + (popup-set-filtered-list popup list) + (setf (popup-pattern popup) nil) + (setf (popup-original-list popup) list)) + +(defun popup-set-filtered-list (popup list) + (let ((offset + (if (> (popup-direction popup) 0) + 0 + (max (- (popup-height popup) (length list)) 0)))) + (setf (popup-list popup) list + (popup-offset popup) offset))) + +(defun popup-selected-item (popup) + (nth (popup-cursor popup) (popup-list popup))) + +(defun popup-selected-line (popup) + (- (popup-cursor popup) (popup-scroll-top popup))) + +(defun popup-line-overlay (popup line) + (aref (popup-overlays popup) line)) + +(defun popup-selected-line-overlay (popup) + (popup-line-overlay popup (popup-selected-line popup))) + +(defun popup-hide-line (popup line) + (let ((overlay (popup-line-overlay popup line))) + (overlay-put overlay 'display nil) + (overlay-put overlay 'after-string nil))) + +(defun popup-line-hidden-p (popup line) + (let ((overlay (popup-line-overlay popup line))) + (and (eq (overlay-get overlay 'display) nil) + (eq (overlay-get overlay 'after-string) nil)))) + +(cl-defun popup-set-line-item (popup + line + &key + item + face + mouse-face + margin-left + margin-right + scroll-bar-char + symbol + summary + summary-face + keymap) + (let* ((overlay (popup-line-overlay popup line)) + (content (popup-create-line-string popup (popup-x-to-string item) + :margin-left margin-left + :margin-right margin-right + :symbol symbol + :summary summary + :summary-face summary-face)) + (start 0) + (prefix (overlay-get overlay 'prefix)) + (postfix (overlay-get overlay 'postfix)) + end) + (put-text-property 0 (length content) 'popup-item item content) + (put-text-property 0 (length content) 'keymap keymap content) + ;; Overlap face properties + (when (get-text-property start 'face content) + (setq start (next-single-property-change start 'face content))) + (while (and start (setq end (next-single-property-change start 'face content))) + (put-text-property start end 'face face content) + (setq start (next-single-property-change end 'face content))) + (when start + (put-text-property start (length content) 'face face content)) + (when mouse-face + (put-text-property 0 (length content) 'mouse-face mouse-face content)) + (unless (overlay-get overlay 'dangle) + (overlay-put overlay 'display (concat prefix (substring content 0 1))) + (setq prefix nil + content (concat (substring content 1)))) + (overlay-put overlay + 'after-string + (concat prefix + content + scroll-bar-char + postfix)))) + +(cl-defun popup-create-line-string (popup + string + &key + margin-left + margin-right + symbol + summary + summary-face) + (let* ((popup-width (popup-width popup)) + (summary-width (string-width summary)) + (content-width (max + (min popup-width (string-width string)) + (- popup-width + (if (> summary-width 0) + (+ summary-width 2) + 0)))) + (string (car (popup-substring-by-width string content-width))) + (string-width (string-width string)) + (spacing (max (- popup-width string-width summary-width) + (if (> popup-width string-width) 1 0))) + (truncated-summary + (car (popup-substring-by-width + summary (max (- popup-width string-width spacing) 0))))) + (when summary-face + (put-text-property 0 (length truncated-summary) + 'face summary-face truncated-summary)) + (concat margin-left + string + (make-string spacing ? ) + truncated-summary + symbol + margin-right))) + +(defun popup-live-p (popup) + "Return non-nil if POPUP is alive." + (and popup (popup-overlays popup) t)) + +(defun popup-child-point (popup &optional offset) + (overlay-end + (popup-line-overlay + popup + (or offset + (popup-selected-line popup))))) + +(defun popup-calculate-direction (height row) + "Return a proper direction when displaying a popup on this +window. HEIGHT is the a height of the popup, and ROW is a line +number at the point." + (let* ((remaining-rows (- (max 1 (- (window-height) + (if mode-line-format 1 0) + (if header-line-format 1 0))) + (count-lines (window-start) (point)))) + (enough-space-above (> row height)) + (enough-space-below (<= height remaining-rows))) + (if (and enough-space-above + (not enough-space-below)) + -1 + 1))) + +(cl-defun popup-create (point + width + height + &key + min-height + max-width + around + (face 'popup-face) + mouse-face + (selection-face face) + (summary-face 'popup-summary-face) + scroll-bar + margin-left + margin-right + symbol + parent + parent-offset + keymap) + "Create a popup instance at POINT with WIDTH and HEIGHT. + +MIN-HEIGHT is a minimal height of the popup. The default value is +0. + +MAX-WIDTH is the maximum width of the popup. The default value is +nil (no limit). If a floating point, the value refers to the ratio of +the window. If an integer, limit is in characters. + +If AROUND is non-nil, the popup will be displayed around the +point but not at the point. + +FACE is a background face of the popup. The default value is POPUP-FACE. + +SELECTION-FACE is a foreground (selection) face of the popup The +default value is POPUP-FACE. + +If SCROLL-BAR is non-nil, the popup will have a scroll bar at the +right. + +If MARGIN-LEFT is non-nil, the popup will have a margin at the +left. + +If MARGIN-RIGHT is non-nil, the popup will have a margin at the +right. + +SYMBOL is a single character which indicates a kind of the item. + +PARENT is a parent popup instance. If PARENT is omitted, the +popup will be a root instance. + +PARENT-OFFSET is a row offset from the parent popup. + +KEYMAP is a keymap that will be put on the popup contents." + (or margin-left (setq margin-left 0)) + (or margin-right (setq margin-right 0)) + (unless point + (setq point + (if parent (popup-child-point parent parent-offset) (point)))) + (when max-width + (setq width (min width (popup-calculate-max-width max-width)))) + (save-excursion + (goto-char point) + (let* ((row (line-number-at-pos)) + (column (popup-current-physical-column)) + (overlays (make-vector height nil)) + (popup-width (+ width + (if scroll-bar 1 0) + margin-left + margin-right + (if symbol 2 0))) + margin-left-cancel + (window (selected-window)) + (window-start (window-start)) + (window-hscroll (window-hscroll)) + (window-width (window-width)) + (right (+ column popup-width)) + (overflow (and (> right window-width) + (>= right popup-width))) + (foldable (and (null parent) + (>= column popup-width))) + (direction (or + ;; Currently the direction of cascade popup won't be changed + (and parent (popup-direction parent)) + + ;; Calculate direction + (popup-calculate-direction height row))) + (depth (if parent (1+ (popup-depth parent)) 0)) + (newlines (max 0 (+ (- height (count-lines point (point-max))) (if around 1 0)))) + current-column) + ;; Case: no newlines at the end of the buffer + (when (> newlines 0) + (popup-save-buffer-state + (goto-char (point-max)) + (insert (make-string newlines ?\n)))) + + ;; Case: the popup overflows + (if overflow + (if foldable + (progn + (cl-decf column (- popup-width margin-left margin-right)) + (unless around (move-to-column column))) + (when (not truncate-lines) + ;; Truncate. + (let ((d (1+ (- popup-width (- window-width column))))) + (cl-decf popup-width d) + (cl-decf width d))) + (cl-decf column margin-left)) + (cl-decf column margin-left)) + + ;; Case: no space at the left + (when (and (null parent) + (< column 0)) + ;; Cancel margin left + (setq column 0) + (cl-decf popup-width margin-left) + (setq margin-left-cancel t)) + + (dotimes (i height) + (let (overlay begin w (dangle t) (prefix "") (postfix "")) + (when around + (popup-vertical-motion column direction)) + (setq around t + current-column (popup-current-physical-column)) + + (when (> current-column column) + (backward-char) + (setq current-column (popup-current-physical-column))) + (when (< current-column column) + ;; Extend short buffer lines by popup prefix (line of spaces) + (setq prefix (make-string + (+ (if (= current-column 0) + (- window-hscroll (current-column)) + 0) + (- column current-column)) + ? ))) + + (setq begin (point)) + (setq w (+ popup-width (length prefix))) + (while (and (not (eolp)) (> w 0)) + (setq dangle nil) + (cl-decf w (char-width (char-after))) + (forward-char)) + (if (< w 0) + (setq postfix (make-string (- w) ? ))) + + (setq overlay (make-overlay begin (point))) + (overlay-put overlay 'window window) + (overlay-put overlay 'dangle dangle) + (overlay-put overlay 'prefix prefix) + (overlay-put overlay 'postfix postfix) + (overlay-put overlay 'width width) + (aset overlays + (if (> direction 0) i (- height i 1)) + overlay))) + (cl-loop for p from (- 10000 (* depth 1000)) + for overlay in (nreverse (append overlays nil)) + do (overlay-put overlay 'priority p)) + (let ((it (make-popup :point point + :row row + :column column + :width width + :height height + :min-height min-height + :direction direction + :parent parent + :depth depth + :face face + :mouse-face mouse-face + :selection-face selection-face + :summary-face summary-face + :margin-left margin-left + :margin-right margin-right + :margin-left-cancel margin-left-cancel + :scroll-bar scroll-bar + :symbol symbol + :cursor 0 + :offset 0 + :scroll-top 0 + :current-height 0 + :list nil + :newlines newlines + :overlays overlays + :keymap keymap))) + (push it popup-instances) + it)))) + +(defun popup-delete (popup) + "Delete POPUP instance." + (when (popup-live-p popup) + (popup-hide popup) + (mapc 'delete-overlay (popup-overlays popup)) + (setf (popup-overlays popup) nil) + (setq popup-instances (delq popup popup-instances)) + ;; Restore newlines state + (let ((newlines (popup-newlines popup))) + (when (> newlines 0) + (popup-save-buffer-state + (goto-char (point-max)) + (dotimes (i newlines) + (if (= (char-before) ?\n) + (delete-char -1))))))) + nil) + +(defun popup-draw (popup) + "Draw POPUP." + (cl-loop with height = (popup-height popup) + with min-height = (popup-min-height popup) + with popup-face = (popup-face popup) + with mouse-face = (popup-mouse-face popup) + with selection-face = (popup-selection-face popup) + with summary-face-0 = (popup-summary-face popup) + with list = (popup-list popup) + with length = (length list) + with thum-size = (max (/ (* height height) (max length 1)) 1) + with page-size = (/ (+ 0.0 (max length 1)) height) + with scroll-bar = (popup-scroll-bar popup) + with margin-left = (make-string (if (popup-margin-left-cancel popup) 0 (popup-margin-left popup)) ? ) + with margin-right = (make-string (popup-margin-right popup) ? ) + with symbol = (popup-symbol popup) + with cursor = (popup-cursor popup) + with scroll-top = (popup-scroll-top popup) + with offset = (popup-offset popup) + with keymap = (popup-keymap popup) + for o from offset + for i from scroll-top + while (< o height) + for item in (nthcdr scroll-top list) + for page-index = (* thum-size (/ o thum-size)) + for face = (if (= i cursor) + (or (popup-item-selection-face item) selection-face) + (or (popup-item-face item) popup-face)) + for summary-face = (unless (= i cursor) summary-face-0) + for empty-char = (propertize " " 'face face) + for scroll-bar-char = (if scroll-bar + (cond + ((and (not (eq scroll-bar :always)) + (<= page-size 1)) + empty-char) + ((and (> page-size 1) + (>= cursor (* page-index page-size)) + (< cursor (* (+ page-index thum-size) page-size))) + popup-scroll-bar-foreground-char) + (t + popup-scroll-bar-background-char)) + "") + for sym = (if symbol + (concat " " (or (popup-item-symbol item) " ")) + "") + for summary = (or (popup-item-summary item) "") + + do + ;; Show line and set item to the line + (popup-set-line-item popup o + :item item + :face face + :mouse-face mouse-face + :margin-left margin-left + :margin-right margin-right + :scroll-bar-char scroll-bar-char + :symbol sym + :summary summary + :summary-face summary-face + :keymap keymap) + + finally + ;; Remember current height + (setf (popup-current-height popup) (- o offset)) + + ;; Hide remaining lines + (let ((scroll-bar-char (if scroll-bar (propertize " " 'face popup-face) "")) + (symbol (if symbol " " ""))) + (if (> (popup-direction popup) 0) + (progn + (when min-height + (while (< o min-height) + (popup-set-line-item popup o + :item "" + :face popup-face + :margin-left margin-left + :margin-right margin-right + :scroll-bar-char scroll-bar-char + :symbol symbol + :summary "") + (cl-incf o))) + (while (< o height) + (popup-hide-line popup o) + (cl-incf o))) + (cl-loop with h = (if min-height (- height min-height) offset) + for o from 0 below offset + if (< o h) + do (popup-hide-line popup o) + if (>= o h) + do (popup-set-line-item popup o + :item "" + :face popup-face + :margin-left margin-left + :margin-right margin-right + :scroll-bar-char scroll-bar-char + :symbol symbol + :summary "")))))) + +(defun popup-hide (popup) + "Hide POPUP." + (dotimes (i (popup-height popup)) + (popup-hide-line popup i))) + +(defun popup-hidden-p (popup) + "Return non-nil if POPUP is hidden." + (let ((hidden t)) + (when (popup-live-p popup) + (dotimes (i (popup-height popup)) + (unless (popup-line-hidden-p popup i) + (setq hidden nil)))) + hidden)) + +(defun popup-jump (popup cursor) + "Jump to a position specified by CURSOR of POPUP and draw." + (let ((scroll-top (popup-scroll-top popup))) + ;; Do not change page as much as possible. + (unless (and (<= scroll-top cursor) + (< cursor (+ scroll-top (popup-height popup)))) + (setf (popup-scroll-top popup) cursor)) + (setf (popup-cursor popup) cursor) + (popup-draw popup))) + +(defun popup-select (popup i) + "Select the item at I of POPUP and draw." + (setq i (+ i (popup-offset popup))) + (when (and (<= 0 i) (< i (popup-height popup))) + (setf (popup-cursor popup) i) + (popup-draw popup) + t)) + +(defun popup-next (popup) + "Select the next item of POPUP and draw." + (let ((height (popup-height popup)) + (cursor (1+ (popup-cursor popup))) + (scroll-top (popup-scroll-top popup)) + (length (length (popup-list popup)))) + (cond + ((>= cursor length) + ;; Back to first page + (setq cursor 0 + scroll-top 0)) + ((= cursor (+ scroll-top height)) + ;; Go to next page + (setq scroll-top (min (1+ scroll-top) (max (- length height) 0))))) + (setf (popup-cursor popup) cursor + (popup-scroll-top popup) scroll-top) + (popup-draw popup))) + +(defun popup-previous (popup) + "Select the previous item of POPUP and draw." + (let ((height (popup-height popup)) + (cursor (1- (popup-cursor popup))) + (scroll-top (popup-scroll-top popup)) + (length (length (popup-list popup)))) + (cond + ((< cursor 0) + ;; Go to last page + (setq cursor (1- length) + scroll-top (max (- length height) 0))) + ((= cursor (1- scroll-top)) + ;; Go to previous page + (cl-decf scroll-top))) + (setf (popup-cursor popup) cursor + (popup-scroll-top popup) scroll-top) + (popup-draw popup))) + +(defun popup-page-next (popup) + "Select next item of POPUP per `popup-height' range. +Pages down through POPUP." + (dotimes (counter (1- (popup-height popup))) + (popup-next popup))) + +(defun popup-page-previous (popup) + "Select previous item of POPUP per `popup-height' range. +Pages up through POPUP." + (dotimes (counter (1- (popup-height popup))) + (popup-previous popup))) + +(defun popup-scroll-down (popup &optional n) + "Scroll down N of POPUP and draw." + (let ((scroll-top (min (+ (popup-scroll-top popup) (or n 1)) + (- (length (popup-list popup)) (popup-height popup))))) + (setf (popup-cursor popup) scroll-top + (popup-scroll-top popup) scroll-top) + (popup-draw popup))) + +(defun popup-scroll-up (popup &optional n) + "Scroll up N of POPUP and draw." + (let ((scroll-top (max (- (popup-scroll-top popup) (or n 1)) + 0))) + (setf (popup-cursor popup) scroll-top + (popup-scroll-top popup) scroll-top) + (popup-draw popup))) + + + +;;; Popup Incremental Search + +(defface popup-isearch-match + '((t (:background "sky blue"))) + "Popup isearch match face." + :group 'popup) + +(defvar popup-isearch-cursor-color "blue") + +(defvar popup-isearch-keymap + (let ((map (make-sparse-keymap))) + ;(define-key map "\r" 'popup-isearch-done) + (define-key map "\C-g" 'popup-isearch-cancel) + (define-key map "\C-b" 'popup-isearch-close) + (define-key map [left] 'popup-isearch-close) + (define-key map "\C-h" 'popup-isearch-delete) + (define-key map (kbd "DEL") 'popup-isearch-delete) + map)) + +(defvar popup-menu-show-quick-help-function 'popup-menu-show-quick-help + "Function used for showing quick help by `popup-menu*'.") + +(defsubst popup-isearch-char-p (char) + (and (integerp char) + (<= 32 char) + (<= char 126))) + +(defun popup-isearch-filter-list (pattern list) + (cl-loop with regexp = (regexp-quote pattern) + for item in list + do + (unless (stringp item) + (setq item (popup-item-propertize (popup-x-to-string item) + 'value item))) + if (string-match regexp item) + collect + (let ((beg (match-beginning 0)) + (end (match-end 0))) + (alter-text-property 0 (length item) 'face + (lambda (prop) + (unless (eq prop 'popup-isearch-match) + prop)) + item) + (put-text-property beg end + 'face 'popup-isearch-match + item) + item))) + +(defun popup-isearch-prompt (popup pattern) + (format "Pattern: %s" (if (= (length (popup-list popup)) 0) + (propertize pattern 'face 'isearch-fail) + pattern))) + +(defun popup-isearch-update (popup pattern &optional callback) + (setf (popup-cursor popup) 0 + (popup-scroll-top popup) 0 + (popup-pattern popup) pattern) + (let ((list (popup-isearch-filter-list pattern (popup-original-list popup)))) + (popup-set-filtered-list popup list) + (if callback + (funcall callback list))) + (popup-draw popup)) + +(cl-defun popup-isearch (popup + &key + (cursor-color popup-isearch-cursor-color) + (keymap popup-isearch-keymap) + callback + help-delay) + "Start isearch on POPUP. This function is synchronized, meaning +event loop waits for quiting of isearch. + +CURSOR-COLOR is a cursor color during isearch. The default value +is `popup-isearch-cursor-color'. + +KEYMAP is a keymap which is used when processing events during +event loop. The default value is `popup-isearch-keymap'. + +CALLBACK is a function taking one argument. `popup-isearch' calls +CALLBACK, if specified, after isearch finished or isearch +canceled. The arguments is whole filtered list of items. + +HELP-DELAY is a delay of displaying helps." + (let ((list (popup-original-list popup)) + (pattern (or (popup-pattern popup) "")) + (old-cursor-color (frame-parameter (selected-frame) 'cursor-color)) + prompt key binding) + (unwind-protect + (cl-block nil + (if cursor-color + (set-cursor-color cursor-color)) + (while t + (setq prompt (popup-isearch-prompt popup pattern)) + (setq key (popup-menu-read-key-sequence keymap prompt help-delay)) + (if (null key) + (unless (funcall popup-menu-show-quick-help-function popup nil :prompt prompt) + (clear-this-command-keys) + (push (read-event prompt) unread-command-events)) + (setq binding (lookup-key keymap key)) + (cond + ((and (stringp key) + (popup-isearch-char-p (aref key 0))) + (setq pattern (concat pattern key))) + ((eq binding 'popup-isearch-done) + (cl-return nil)) + ((eq binding 'popup-isearch-cancel) + (popup-isearch-update popup "" callback) + (cl-return t)) + ((eq binding 'popup-isearch-close) + (popup-isearch-update popup "" callback) + (setq unread-command-events + (append (listify-key-sequence key) unread-command-events)) + (cl-return nil)) + ((eq binding 'popup-isearch-delete) + (if (> (length pattern) 0) + (setq pattern (substring pattern 0 (1- (length pattern)))))) + (t + (setq unread-command-events + (append (listify-key-sequence key) unread-command-events)) + (cl-return nil))) + (popup-isearch-update popup pattern callback)))) + (if old-cursor-color + (set-cursor-color old-cursor-color))))) + + + +;;; Popup Tip + +(defface popup-tip-face + '((t (:background "khaki1" :foreground "black"))) + "Face for popup tip." + :group 'popup) + +(defvar popup-tip-max-width 80) + +(cl-defun popup-tip (string + &key + point + (around t) + width + (height 15) + min-height + max-width + truncate + margin + margin-left + margin-right + scroll-bar + parent + parent-offset + nowait + nostrip + prompt + &aux tip lines) + "Show a tooltip of STRING at POINT. This function is +synchronized unless NOWAIT specified. Almost arguments are same +as `popup-create' except for TRUNCATE, NOWAIT, and PROMPT. + +If TRUNCATE is non-nil, the tooltip can be truncated. + +If NOWAIT is non-nil, this function immediately returns the +tooltip instance without entering event loop. + +If `NOSTRIP` is non-nil, `STRING` properties are not stripped. + +PROMPT is a prompt string when reading events during event loop." + (if (bufferp string) + (setq string (with-current-buffer string (buffer-string)))) + + (unless nostrip + ;; TODO strip text (mainly face) properties + (setq string (substring-no-properties string))) + + (and (eq margin t) (setq margin 1)) + (or margin-left (setq margin-left margin)) + (or margin-right (setq margin-right margin)) + + (let ((it (popup-fill-string string width popup-tip-max-width))) + (setq width (car it) + lines (cdr it))) + + (setq tip (popup-create point width height + :min-height min-height + :max-width max-width + :around around + :margin-left margin-left + :margin-right margin-right + :scroll-bar scroll-bar + :face 'popup-tip-face + :parent parent + :parent-offset parent-offset)) + + (unwind-protect + (when (> (popup-width tip) 0) ; not to be corrupted + (when (and (not (eq width (popup-width tip))) ; truncated + (not truncate)) + ;; Refill once again to lines be fitted to popup width + (setq width (popup-width tip)) + (setq lines (cdr (popup-fill-string string width width)))) + + (popup-set-list tip lines) + (popup-draw tip) + (if nowait + tip + (clear-this-command-keys) + (push (read-event prompt) unread-command-events) + t)) + (unless nowait + (popup-delete tip)))) + + + +;;; Popup Menu + +(defface popup-menu-face + '((t (:inherit popup-face))) + "Face for popup menu." + :group 'popup) + +(defface popup-menu-mouse-face + '((t (:background "blue" :foreground "white"))) + "Face for popup menu." + :group 'popup) + +(defface popup-menu-selection-face + '((t (:background "steelblue" :foreground "white"))) + "Face for popup menu selection." + :group 'popup) + +(defface popup-menu-summary-face + '((t (:inherit popup-summary-face))) + "Face for popup summary." + :group 'popup) + +(defvar popup-menu-show-tip-function 'popup-tip + "Function used for showing tooltip by `popup-menu-show-quick-help'.") + +(defun popup-menu-show-help (menu &optional persist item) + (popup-item-show-help (or item (popup-selected-item menu)) persist)) + +(defun popup-menu-documentation (menu &optional item) + (popup-item-documentation (or item (popup-selected-item menu)))) + +(defun popup-menu-show-quick-help (menu &optional item &rest args) + (let* ((point (plist-get args :point)) + (height (or (plist-get args :height) (popup-height menu))) + (min-height (min height (popup-current-height menu))) + (around nil) + (parent-offset (popup-offset menu)) + (doc (popup-menu-documentation menu item))) + (when (stringp doc) + (if (popup-hidden-p menu) + (setq around t + menu nil + parent-offset nil) + (setq point nil)) + (let ((popup-use-optimized-column-computation nil)) ; To avoid wrong positioning + (apply popup-menu-show-tip-function + doc + :point point + :height height + :min-height min-height + :around around + :parent menu + :parent-offset parent-offset + args))))) + +(defun popup-menu-item-of-mouse-event (event) + (when (and (consp event) + (memq (cl-first event) '(mouse-1 mouse-2 mouse-3 mouse-4 mouse-5))) + (let* ((position (cl-second event)) + (object (elt position 4))) + (when (consp object) + (get-text-property (cdr object) 'popup-item (car object)))))) + +(defun popup-menu-read-key-sequence (keymap &optional prompt timeout) + (catch 'timeout + (let ((timer (and timeout + (run-with-timer timeout nil + (lambda () + (if (zerop (length (this-command-keys))) + (throw 'timeout nil)))))) + (old-global-map (current-global-map)) + (temp-global-map (make-sparse-keymap)) + (overriding-terminal-local-map (make-sparse-keymap))) + (substitute-key-definition 'keyboard-quit 'keyboard-quit + temp-global-map old-global-map) + (define-key temp-global-map [menu-bar] (lookup-key old-global-map [menu-bar])) + (define-key temp-global-map [tool-bar] (lookup-key old-global-map [tool-bar])) + (set-keymap-parent overriding-terminal-local-map keymap) + (if (current-local-map) + (define-key overriding-terminal-local-map [menu-bar] + (lookup-key (current-local-map) [menu-bar]))) + (unwind-protect + (progn + (use-global-map temp-global-map) + (clear-this-command-keys) + (with-temp-message prompt + (read-key-sequence nil))) + (use-global-map old-global-map) + (if timer (cancel-timer timer)))))) + +(defun popup-menu-fallback (event default)) + +(cl-defun popup-menu-event-loop (menu + keymap + fallback + &key + prompt + help-delay + isearch + isearch-cursor-color + isearch-keymap + isearch-callback + &aux key binding) + (cl-block nil + (while (popup-live-p menu) + (and isearch + (popup-isearch menu + :cursor-color isearch-cursor-color + :keymap isearch-keymap + :callback isearch-callback + :help-delay help-delay) + (keyboard-quit)) + (setq key (popup-menu-read-key-sequence keymap prompt help-delay)) + (setq binding (and key (lookup-key keymap key))) + (cond + ((or (null key) (zerop (length key))) + (unless (funcall popup-menu-show-quick-help-function menu nil :prompt prompt) + (clear-this-command-keys) + (push (read-event prompt) unread-command-events))) + ((eq (lookup-key (current-global-map) key) 'keyboard-quit) + (keyboard-quit) + (cl-return)) + ((eq binding 'popup-close) + (if (popup-parent menu) + (cl-return))) + ((memq binding '(popup-select popup-open)) + (let* ((item (or (popup-menu-item-of-mouse-event (elt key 0)) + (popup-selected-item menu))) + (index (cl-position item (popup-list menu))) + (sublist (popup-item-sublist item))) + (unless index (cl-return)) + (if sublist + (popup-aif (let (popup-use-optimized-column-computation) + (popup-cascade-menu sublist + :around nil + :margin-left (popup-margin-left menu) + :margin-right (popup-margin-right menu) + :scroll-bar (popup-scroll-bar menu) + :parent menu + :parent-offset index + :help-delay help-delay + :isearch isearch + :isearch-cursor-color isearch-cursor-color + :isearch-keymap isearch-keymap + :isearch-callback isearch-callback)) + (and it (cl-return it))) + (if (eq binding 'popup-select) + (cl-return (popup-item-value-or-self item)))))) + ((eq binding 'popup-next) + (popup-next menu)) + ((eq binding 'popup-previous) + (popup-previous menu)) + ((eq binding 'popup-page-next) + (popup-page-next menu)) + ((eq binding 'popup-page-previous) + (popup-page-previous menu)) + ((eq binding 'popup-help) + (popup-menu-show-help menu)) + ((eq binding 'popup-isearch) + (popup-isearch menu + :cursor-color isearch-cursor-color + :keymap isearch-keymap + :callback isearch-callback + :help-delay help-delay)) + ((commandp binding) + (call-interactively binding)) + (t + (funcall fallback key (key-binding key))))))) + +(defun popup-preferred-width (list) + "Return the preferred width to show LIST beautifully." + (cl-loop with tab-width = 4 + for item in list + for summary = (popup-item-summary item) + maximize (string-width (popup-x-to-string item)) into width + if (stringp summary) + maximize (+ (string-width summary) 2) into summary-width + finally return + (let ((total (+ (or width 0) (or summary-width 0)))) + (* (ceiling (/ total 10.0)) 10)))) + +(defvar popup-menu-keymap + (let ((map (make-sparse-keymap))) + (define-key map "\r" 'popup-select) + (define-key map "\C-f" 'popup-open) + (define-key map [right] 'popup-open) + (define-key map "\C-b" 'popup-close) + (define-key map [left] 'popup-close) + + (define-key map "\C-n" 'popup-next) + (define-key map [down] 'popup-next) + (define-key map "\C-p" 'popup-previous) + (define-key map [up] 'popup-previous) + + (define-key map [next] 'popup-page-next) + (define-key map [prior] 'popup-page-previous) + + (define-key map [f1] 'popup-help) + (define-key map (kbd "\C-?") 'popup-help) + + (define-key map "\C-s" 'popup-isearch) + + (define-key map [mouse-1] 'popup-select) + (define-key map [mouse-4] 'popup-previous) + (define-key map [mouse-5] 'popup-next) + map)) + +(cl-defun popup-menu* (list + &key + point + (around t) + (width (popup-preferred-width list)) + (height 15) + max-width + margin + margin-left + margin-right + scroll-bar + symbol + parent + parent-offset + cursor + (keymap popup-menu-keymap) + (fallback 'popup-menu-fallback) + help-delay + nowait + prompt + isearch + (isearch-cursor-color popup-isearch-cursor-color) + (isearch-keymap popup-isearch-keymap) + isearch-callback + &aux menu event) + "Show a popup menu of LIST at POINT. This function returns a +value of the selected item. Almost arguments are same as +`popup-create' except for KEYMAP, FALLBACK, HELP-DELAY, PROMPT, +ISEARCH, ISEARCH-CURSOR-COLOR, ISEARCH-KEYMAP, and +ISEARCH-CALLBACK. + +If KEYMAP is a keymap which is used when processing events during +event loop. + +If FALLBACK is a function taking two arguments; a key and a +command. FALLBACK is called when no special operation is found on +the key. The default value is `popup-menu-fallback', which does +nothing. + +HELP-DELAY is a delay of displaying helps. + +If NOWAIT is non-nil, this function immediately returns the menu +instance without entering event loop. + +PROMPT is a prompt string when reading events during event loop. + +If ISEARCH is non-nil, do isearch as soon as displaying the popup +menu. + +ISEARCH-CURSOR-COLOR is a cursor color during isearch. The +default value is `popup-isearch-cursor-color'. + +ISEARCH-KEYMAP is a keymap which is used when processing events +during event loop. The default value is `popup-isearch-keymap'. + +ISEARCH-CALLBACK is a function taking one argument. `popup-menu' +calls ISEARCH-CALLBACK, if specified, after isearch finished or +isearch canceled. The arguments is whole filtered list of items." + (and (eq margin t) (setq margin 1)) + (or margin-left (setq margin-left margin)) + (or margin-right (setq margin-right margin)) + (if (and scroll-bar + (integerp margin-right) + (> margin-right 0)) + ;; Make scroll-bar space as margin-right + (cl-decf margin-right)) + (setq menu (popup-create point width height + :max-width max-width + :around around + :face 'popup-menu-face + :mouse-face 'popup-menu-mouse-face + :selection-face 'popup-menu-selection-face + :summary-face 'popup-menu-summary-face + :margin-left margin-left + :margin-right margin-right + :scroll-bar scroll-bar + :symbol symbol + :parent parent + :parent-offset parent-offset)) + (unwind-protect + (progn + (popup-set-list menu list) + (if cursor + (popup-jump menu cursor) + (popup-draw menu)) + (if nowait + menu + (popup-menu-event-loop menu keymap fallback + :prompt prompt + :help-delay help-delay + :isearch isearch + :isearch-cursor-color isearch-cursor-color + :isearch-keymap isearch-keymap + :isearch-callback isearch-callback))) + (unless nowait + (popup-delete menu)))) + +(defun popup-cascade-menu (list &rest args) + "Same as `popup-menu' except that an element of LIST can be +also a sub-menu if the element is a cons cell formed (ITEM +. SUBLIST) where ITEM is an usual item and SUBLIST is a list of +the sub menu." + (apply 'popup-menu* + (mapcar (lambda (item) + (if (consp item) + (popup-make-item (car item) + :sublist (cdr item) + :symbol ">") + item)) + list) + :symbol t + args)) + +(provide 'popup) +;;; popup.el ends here diff --git a/elpa/popup-20140207.1702/popup.elc b/elpa/popup-20140207.1702/popup.elc new file mode 100644 index 0000000000000000000000000000000000000000..6d4b710366d6015288b43b6ac77f3d408dcc1d6b GIT binary patch literal 73625 zcmeHwi+dACvad+KyKC%^IcySqHVG(WI{`aEj%G#=>}(PnFxcU_*yKS>f-Fl|L6#gz z4tUSG_x|hm_p9oj>5<1^2*%v+Z1Q2vqo=#NySlonx*lIG-MsRjxm<4atFONDuXML} zTJ6TBzp>|U*9Hst*Du_v)h~CuPiEWQdadnuJN{~I;4khz_We0OsLq#y`C`cri$O`M zX!g3>eiN1WU*7LGdi^g^$CtB>?OMG*yZL3Ky;J*gr@OPeQ{WfHuvnc9s>M*B%{JOn zN2}v6@dN)4RM0|;VQDs+4dmU^)?mx8wE@V^ptarlS8ad-{n=4@xwh5nYva59M&IAu z>(sVeb$_#4?+<#d&g1??yzTV|erF`eoAjaskWYV`cU77B)u zwu|BaQ~wcwKl|V4=;(B>@%wJ8*YGdY+l6*(V`g-Ev(dx=V9<2l?3_#%XUnt2$(hlq zg`gPuR~s0I?N$dv_H?T;*pmJ={HLu=%-3e4k2*2n{n2>L{B93#JDc67{!XvE)9rC0 z{f%0`v3b#7#7OoUgWX=Ik6~)yy1&~V%zh%!)Y`3D-@l;X04M9a?b@JG*seV*Xme9P zPscYi{^ZDdST3%I#ptg&To$YN69nsFsfwHO>73q`i{Gw?mGA_gP2|?2Vt{|)2>wL= zuM_ww;fpda%D=LbN&n}#4Zq%KwSiuKue%GtwO0m~pg3FfgW^NKd*S+OQo5I z9JNbxK30fy&)_mfsNQYwZg=pry|X(I+-9W%jO*;^N|S{#H$d_l2W_L>*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ode 100644 index 000000000..90b4e3b33 --- /dev/null +++ b/elpa/projectile-20140808.941/projectile.el @@ -0,0 +1,2255 @@ +;;; projectile.el --- Manage and navigate projects in Emacs easily -*- lexical-binding: t -*- + +;; Copyright © 2011-2014 Bozhidar Batsov + +;; Author: Bozhidar Batsov +;; URL: https://github.com/bbatsov/projectile +;; Keywords: project, convenience +;; Version: 20140808.941 +;; X-Original-Version: 0.11.0 +;; Package-Requires: ((s "1.6.0") (dash "1.5.0") (pkg-info "0.4")) + +;; This file is NOT part of GNU Emacs. + +;; 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, 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 GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: +;; +;; This library provides easy project management and navigation. The +;; concept of a project is pretty basic - just a folder containing +;; special file. Currently git, mercurial and bazaar repos are +;; considered projects by default. If you want to mark a folder +;; manually as a project just create an empty .projectile file in +;; it. See the README for more details. +;; +;;; Code: + +(require 'thingatpt) +(require 's) +(require 'dash) +(require 'grep) ; For `rgrep' +(require 'pkg-info) ; For `pkg-info-version-info' +(require 'ibuffer) +(require 'ibuf-ext) + +(eval-when-compile + (defvar ack-and-a-half-arguments) + (defvar ggtags-completion-table)) + +;;;; Compatibility +(eval-and-compile + (unless (fboundp 'defvar-local) + (defmacro defvar-local (var val &optional docstring) + "Define VAR as a buffer-local variable with default value VAL. +Like `defvar' but additionally marks the variable as being automatically +buffer-local wherever it is set." + (declare (debug defvar) (doc-string 3)) + `(progn + (defvar ,var ,val ,docstring) + (make-variable-buffer-local ',var))))) + + +;;; Customization +(defgroup projectile nil + "Manage and navigate projects easily." + :group 'tools + :group 'convenience) + +(defcustom projectile-indexing-method (if (eq system-type 'windows-nt) 'native 'alien) + "Specifies the indexing method used by Projectile. + +There are two indexing methods - native and alien. + +The native method is implemented in Emacs Lisp (therefore it is +native to Emacs). It's advantage is that is portable and will +work everywhere that Emacs does. It's disadvantage is that is a +bit slow (especially for large projects). Generally it's a good +idea to pair the native indexing method with caching. + +The alien indexing method uses external tools (e.g. git, find, +etc) to speed up the indexing process. The disadvantage of this +method is that it's not well supported on Windows systems. + +By default alien indexing is the default on all operating +systems, except Windows." + :group 'projectile + :type 'symbol + :options '(native alien)) + +(defcustom projectile-enable-caching (eq projectile-indexing-method 'native) + "When t enables project files caching. + +Project caching is automatically enabled by default if you're +using the native indexing method." + :group 'projectile + :type 'boolean) + +(defcustom projectile-file-exists-local-cache-expire nil + "Number of seconds before file existence cache expires for a +file on a local file system. + + A value of nil disables this cache." + + :group 'projectile + :type '(choice (const :tag "Disabled" nil) + (integer :tag "Seconds"))) + +(defcustom projectile-file-exists-remote-cache-expire (* 5 60) + "Number of seconds before file existence cache expires for a +file on a remote file system such as tramp. + + A value of nil disables this cache." + :group 'projectile + :type '(choice (const :tag "Disabled" nil) + (integer :tag "Seconds"))) + +(defcustom projectile-require-project-root t + "Require the presence of a project root to operate when true. +Otherwise consider the current directory the project root." + :group 'projectile + :type 'boolean) + +(defcustom projectile-completion-system 'ido + "The completion system to be used by Projectile." + :group 'projectile + :type 'symbol + :options '(ido grizzl helm default)) + +(defcustom projectile-keymap-prefix (kbd "C-c p") + "Projectile keymap prefix." + :group 'projectile + :type 'string) + +(defcustom projectile-cache-file + (expand-file-name "projectile.cache" user-emacs-directory) + "The name of Projectile's cache file." + :group 'projectile + :type 'string) + +(defcustom projectile-tags-file-name "TAGS" + "The tags filename Projectile's going to use." + :group 'projectile + :type 'string) + +(defcustom projectile-tags-command "ctags -Re -f %s %s" + "The command Projectile's going to use to generate a TAGS file." + :group 'projectile + :type 'string) + +(defcustom projectile-sort-order 'default + "The sort order used for a project's files." + :group 'projectile + :type 'symbol + :options '(default recentf recently-active access-time modification-time)) + +(defcustom projectile-buffers-filter-function nil + "A function used to filter the buffers in `projectile-project-buffers'. + +The function should accept and return a list of Emacs buffers. +Two example filter functions are shipped by default - `projectile-buffers-with-file' +and `projectile-buffers-with-file-or-process'." + :group 'projectile + :type 'symbol) + +(defcustom projectile-project-root-files + '("rebar.config" ; Rebar project file + "project.clj" ; Leiningen project file + "pom.xml" ; Maven project file + "build.sbt" ; SBT project file + "build.gradle" ; Gradle project file + "Gemfile" ; Bundler file + "requirements.txt" ; Pip file + "package.json" ; npm package file + "gulpfile.js" ; Gulp build file + "Gruntfile.js" ; Grunt project file + "bower.json" ; Bower project file + "composer.json" ; Composer project file + "Cargo.toml" ; Cargo project file + "mix.exs" ; Elixir mix project file + ) + "A list of files considered to mark the root of a project." + :group 'projectile + :type '(repeat string)) + +(defcustom projectile-project-root-files-top-down-recurring + '(".svn" ; Svn VCS root dir + "CVS" ; Csv VCS root dir + ) + "A list of files considered to mark the root of a project. +This root files pattern stops at the parentmost match." + :group 'projectile + :type '(repeat string)) + +(defcustom projectile-project-root-files-bottom-up + '(".projectile" ; projectile project marker + ".git" ; Git VCS root dir + ".hg" ; Mercurial VCS root dir + ".fslckout" ; Fossil VCS root dir + ".bzr" ; Bazaar VCS root dir + "_darcs" ; Darcs VCS root dir + ) + "A list of files considered to mark the root of a project. +This root files pattern overrides discovery of any root files +pattern that would have found a project root in a subdirectory." + :group 'projectile + :type '(repeat string)) + +(defcustom projectile-project-root-files-functions + '(projectile-root-bottom-up + projectile-root-top-down + projectile-root-top-down-recurring) + "A list of functions for finding project roots." + :group 'projectile + :type '(repeat function)) + +(defcustom projectile-globally-ignored-files + (list projectile-tags-file-name) + "A list of files globally ignored by projectile." + :group 'projectile + :type '(repeat string)) + +(defcustom projectile-globally-ignored-directories + '(".idea" + ".eunit" + ".git" + ".hg" + ".fslckout" + ".bzr" + "_darcs" + ".tox" + ".svn" + "build") + "A list of directories globally ignored by projectile." + :group 'projectile + :type '(repeat string)) + +(defcustom projectile-globally-ignored-modes + '("erc-mode" + "help-mode" + "completion-list-mode" + "Buffer-menu-mode" + "gnus-.*-mode" + "occur-mode") + "A list of regular expressions for major modes ignored by projectile. + +If a buffer is using a given major mode, projectile will ignore +it for functions working with buffers." + :group 'projectile + :type '(repeat string)) + +(defcustom projectile-find-file-hook nil + "Hooks run when a file is opened with `projectile-find-file'." + :group 'projectile + :type 'hook) + +(defcustom projectile-find-dir-hook nil + "Hooks run when a directory is opened with `projectile-find-dir'." + :group 'projectile + :type 'hook) + +(defcustom projectile-switch-project-action 'projectile-find-file + "Action invoked after switching projects with `projectile-switch-project'. + +Any function that does not take arguments will do." + :group 'projectile + :type 'symbol) + +(defcustom projectile-find-dir-includes-top-level nil + "If true, add top-level dir to options offered by `projectile-find-dir'." + :group 'projectile + :type 'boolean) + +(defcustom projectile-use-git-grep nil + "If true, use `vc-git-grep' in git projects." + :group 'projectile + :type 'boolean) + +(defcustom projectile-remember-window-configs nil + "If true, restore the last window configuration when switching projects. +If no configuration exists, just run `projectile-switch-project-action' as usual." + :group 'projectile + :type 'boolean) + +;;; Idle Timer +(defvar projectile-idle-timer nil + "The timer object created when `project-enable-idle-timer' is non-nil.") + +(defcustom projectile-idle-timer-seconds 30 + "The idle period to use when `projectile-enable-idle-timer' is non-nil." + :group 'projectile + :type 'number) + +(defcustom projectile-idle-timer-hook '(projectile-regenerate-tags) + "The hook run when `projectile-enable-idle-timer' is non-nil." + :group 'projectile + :type '(repeat symbol)) + +(defcustom projectile-enable-idle-timer nil + "Enables idle timer hook `projectile-idle-timer-functions'. + +When `projectile-enable-idle-timer' is non-nil, the hook +`projectile-idle-timer-hook' is run each time Emacs has been idle +for `projectile-idle-timer-seconds' seconds and we're in a +project." + :group 'projectile + :set (lambda (symbol value) + (set symbol value) + (when projectile-idle-timer + (cancel-timer projectile-idle-timer)) + (setq projectile-idle-timer nil) + (when projectile-enable-idle-timer + (setq projectile-idle-timer (run-with-idle-timer + projectile-idle-timer-seconds t + (lambda () + (when (projectile-project-p) + (run-hooks 'projectile-idle-timer-hook))))))) + :type 'boolean) + +;;; Serialization +(defun projectile-serialize (data filename) + "Serialize DATA to FILENAME. + +The saved data can be restored with `projectile-unserialize'." + (when (file-writable-p filename) + (with-temp-file filename + (insert (let (print-length) (prin1-to-string data)))))) + +(defun projectile-unserialize (filename) + "Read data serialized by `projectile-serialize' from FILENAME." + (when (file-exists-p filename) + (with-temp-buffer + (insert-file-contents filename) + (read (buffer-string))))) + +(defvar projectile-projects-cache + (or (projectile-unserialize projectile-cache-file) + (make-hash-table :test 'equal)) + "A hashmap used to cache project file names to speed up related operations.") + +(defvar projectile-known-projects nil + "List of locations where we have previously seen projects. +The list of projects is ordered by the time they have been accessed.") + +(defcustom projectile-known-projects-file + (expand-file-name "projectile-bookmarks.eld" + user-emacs-directory) + "Name and location of the Projectile's known projects file." + :group 'projectile + :type 'string) + +(defcustom projectile-ignored-projects nil + "A list of projects not to be added to `projectile-known-projects'." + :group 'projectile + :type 'list + :package-version '(projectile . "0.11.0")) + + +;;; Version information + +(defun projectile-version (&optional show-version) + "Get the Projectile version as string. + +If called interactively or if SHOW-VERSION is non-nil, show the +version in the echo area and the messages buffer. + +The returned string includes both, the version from package.el +and the library version, if both a present and different. + +If the version number could not be determined, signal an error, +if called interactively, or if SHOW-VERSION is non-nil, otherwise +just return nil." + (interactive (list t)) + (let ((version (pkg-info-version-info 'projectile))) + (when show-version + (message "Projectile version: %s" version)) + version)) + + +;;; Caching +(defvar projectile-file-exists-cache + (make-hash-table :test 'equal) + "Cached `projectile-file-exists-p' results.") + +(defvar projectile-file-exists-cache-timer nil + "Timer for scheduling`projectile-file-exists-cache-cleanup'.") + +(defun projectile-file-exists-cache-cleanup () + "Removed timed out cache entries and reschedules or remove the +timer if no more items are in the cache." + (let ((now (current-time))) + (maphash (lambda (key value) + (if (time-less-p (cdr value) now) + (remhash key projectile-file-exists-cache))) + projectile-file-exists-cache) + (setq projectile-file-exists-cache-timer + (if (> (hash-table-count projectile-file-exists-cache) 0) + (run-with-timer 10 nil 'projectile-file-exists-cache-cleanup))))) + +(defun projectile-file-exists-p (filename) + "Return t if file FILENAME exist. +A wrapper around `file-exists-p' with additional caching support." + (let* ((file-remote (file-remote-p filename)) + (expire-seconds + (if file-remote + (and projectile-file-exists-remote-cache-expire + (> projectile-file-exists-remote-cache-expire 0) + projectile-file-exists-remote-cache-expire) + (and projectile-file-exists-local-cache-expire + (> projectile-file-exists-local-cache-expire 0) + projectile-file-exists-local-cache-expire))) + (remote-file-name-inhibit-cache (if expire-seconds + expire-seconds + remote-file-name-inhibit-cache))) + (if (not expire-seconds) + (file-exists-p filename) + (let* ((current-time (current-time)) + (cached (gethash filename projectile-file-exists-cache)) + (cached-value (if cached (car cached))) + (cached-expire (if cached (cdr cached))) + (cached-expired (if cached (time-less-p cached-expire current-time) t)) + (value (or (and (not cached-expired) cached-value) + (if (file-exists-p filename) 'found 'notfound)))) + (when (or (not cached) cached-expired) + (puthash filename + (cons value (time-add current-time (seconds-to-time expire-seconds))) + projectile-file-exists-cache)) + (unless projectile-file-exists-cache-timer + (setq projectile-file-exists-cache-timer + (run-with-timer 10 nil 'projectile-file-exists-cache-cleanup))) + (equal value 'found))))) + +(defun projectile-invalidate-cache (arg) + "Remove the current project's files from `projectile-projects-cache'. + +With a prefix argument ARG prompts for the name of the project whose cache +to invalidate." + (interactive "P") + (let ((project-root + (if arg + (completing-read "Remove cache for: " + (projectile-hash-keys projectile-projects-cache)) + (projectile-project-root)))) + (remhash project-root projectile-projects-cache) + (projectile-serialize-cache) + (message "Invalidated Projectile cache for %s." + (propertize project-root 'face 'font-lock-keyword-face)))) + +(defun projectile-cache-project (project files) + "Cache PROJECTs FILES. +The cache is created both in memory and on the hard drive." + (when projectile-enable-caching + (puthash project files projectile-projects-cache) + (projectile-serialize-cache))) + +(defun projectile-purge-file-from-cache (file) + "Purge FILE from the cache of the current project." + (interactive + (list (projectile-completing-read + "Remove file from cache: " + (projectile-current-project-files)))) + (let* ((project-root (projectile-project-root)) + (project-cache (gethash project-root projectile-projects-cache))) + (if (projectile-file-cached-p file project-root) + (progn + (puthash project-root (remove file project-cache) projectile-projects-cache) + (projectile-serialize-cache) + (message "%s removed from cache" file)) + (error "%s is not in the cache" file)))) + +(defun projectile-purge-dir-from-cache (dir) + "Purge DIR from the cache of the current project." + (interactive + (list (projectile-completing-read + "Remove directory from cache: " + (projectile-current-project-dirs)))) + (let* ((project-root (projectile-project-root)) + (project-cache (gethash project-root projectile-projects-cache))) + (puthash project-root + (-filter (lambda (file) + (s-starts-with-p dir file)) + project-cache) + projectile-projects-cache))) + +(defun projectile-file-cached-p (file project) + "Check if FILE is already in PROJECT cache." + (member file (gethash project projectile-projects-cache))) + +(defun projectile-cache-current-file () + "Add the currently visited file to the cache." + (interactive) + (let* ((current-project (projectile-project-root)) + (abs-current-file (buffer-file-name (current-buffer))) + (current-file (file-relative-name abs-current-file current-project))) + (unless (or (projectile-file-cached-p current-file current-project) + (projectile-ignored-directory-p (file-name-directory abs-current-file)) + (projectile-ignored-file-p abs-current-file)) + (puthash current-project + (cons current-file (gethash current-project projectile-projects-cache)) + projectile-projects-cache) + (projectile-serialize-cache) + (message "File %s added to project %s cache." + (propertize current-file 'face 'font-lock-keyword-face) + (propertize current-project 'face 'font-lock-keyword-face))))) + +;; cache opened files automatically to reduce the need for cache invalidation +(defun projectile-cache-files-find-file-hook () + "Function for caching files with `find-file-hook'." + (when (and (projectile-project-p) projectile-enable-caching) + (projectile-cache-current-file))) + +(defun projectile-cache-projects-find-file-hook () + "Function for caching projects with `find-file-hook'." + (when (projectile-project-p) + (projectile-add-known-project (projectile-project-root)) + (projectile-save-known-projects))) + +(defun projectile-maybe-invalidate-cache (force) + "Invalidate if FORCE or project's dirconfig newer than cache." + (when (or force (file-newer-than-file-p (projectile-dirconfig-file) + projectile-cache-file)) + (projectile-invalidate-cache nil))) + + +;;; Window configurations +(defvar projectile-window-config-map + (make-hash-table :test 'equal) + "A mapping from project names to their latest window configurations.") + +(defun projectile-save-window-config (project-name) + "Save PROJECT-NAME's configuration to `projectile-window-config-map'." + (puthash project-name (current-window-configuration) projectile-window-config-map)) + +(defun projectile-get-window-config (project-name) + "Return the window configuration corresponding to PROJECT-NAME. +If no such window configuration exists, +returns nil." + (gethash project-name projectile-window-config-map)) + +(defun projectile-restore-window-config (project-name) + "Restore the window configuration corresponding to the PROJECT-NAME. +Returns nil if no window configuration was found" + (let ((window-config (projectile-get-window-config project-name))) + (when window-config + (set-window-configuration window-config)))) + +(defadvice projectile-switch-project (before projectile-save-window-configuration-before-switching-projects activate) + "Save the current project's window configuration before switching projects." + (when (and projectile-remember-window-configs + (projectile-project-p)) + (projectile-save-window-config (projectile-project-name)))) + +(defadvice projectile-kill-buffers (before projectile-remove-window-configuration-before-kill-buffers activate) + "Remove's this project's window configuration from the table before killing buffers." + (remhash (projectile-project-name) projectile-window-config-map)) + +(defadvice projectile-kill-buffers (after projectile-restore-window-configuration-after-kill-buffers activate) + "Restore previous (if any) project's window configuration after killing a project's buffers." + (when (and projectile-remember-window-configs + (projectile-project-p)) + (projectile-restore-window-config (projectile-project-name)))) + + +;;; Project root related utilities +(defun projectile-parent (path) + "Return the parent directory of PATH. +PATH may be a file or directory and directory paths may end with a slash." + (directory-file-name (file-name-directory (directory-file-name (expand-file-name path))))) + +(defun projectile-locate-dominating-file (file name) + "Look up the directory hierarchy from FILE for a directory containing NAME. +Stop at the first parent directory containing a file NAME, +and return the directory. Return nil if not found. +Instead of a string, NAME can also be a predicate taking one argument +\(a directory) and returning a non-nil value if that directory is the one for +which we're looking." + ;; copied from files.el (stripped comments) emacs-24 bzr branch 2014-03-28 10:20 + (setq file (abbreviate-file-name file)) + (let ((root nil) + try) + (while (not (or root + (null file) + (string-match locate-dominating-stop-dir-regexp file))) + (setq try (if (stringp name) + (projectile-file-exists-p (expand-file-name name file)) + (funcall name file))) + (cond (try (setq root file)) + ((equal file (setq file (file-name-directory + (directory-file-name file)))) + (setq file nil)))) + (if root (file-name-as-directory root)))) + +(defun projectile-root-bottom-up (dir &optional list) + "Identify a project root in DIR by looking at `projectile-project-root-files-bottom-up'. +Returns a project root directory path or nil if not found." + (--reduce-from + (or acc + (projectile-locate-dominating-file dir it)) + nil + (or list projectile-project-root-files-bottom-up (list)))) + +(defun projectile-root-top-down (dir &optional list) + "Identify a project root in DIR by looking at `projectile-project-root-files-top-down'. +Returns a project root directory path or nil if not found." + (projectile-locate-dominating-file + dir + (lambda (dir) + (--first (projectile-file-exists-p (expand-file-name it dir)) + (or list projectile-project-root-files (list)))))) + +(defun projectile-root-top-down-recurring (dir &optional list) + "Identify a project root in DIR by looking at `projectile-project-root-files-top-down-recurring'. +Returns a project root directory path or nil if not found." + (--reduce-from + (or acc + (projectile-locate-dominating-file + dir + (lambda (dir) + (and (projectile-file-exists-p (expand-file-name it dir)) + (or (string-match locate-dominating-stop-dir-regexp (projectile-parent dir)) + (not (projectile-file-exists-p (expand-file-name it (projectile-parent dir))))))))) + nil + (or list projectile-project-root-files-top-down-recurring (list)))) + +(defun projectile-project-root () + "Retrieves the root directory of a project if available. +The current directory is assumed to be the project's root otherwise." + (file-truename + (let ((dir (file-truename default-directory))) + (or (--reduce-from + (or acc (funcall it dir)) nil + projectile-project-root-files-functions) + (if projectile-require-project-root + (error "You're not in a project") + default-directory))))) + +(defun projectile-file-truename (file-name) + "Return the truename of FILE-NAME. +A thin wrapper around `file-truename' that handles nil." + (when file-name + (file-truename file-name))) + +(defun projectile-project-p () + "Check if we're in a project." + (condition-case nil + (projectile-project-root) + (error nil))) + +(defun projectile-project-name () + "Return project name." + (let ((project-root + (condition-case nil + (projectile-project-root) + (error default-directory)))) + (file-name-nondirectory (directory-file-name project-root)))) + + +;;; Project indexing +(defun projectile-get-project-directories () + "Get the list of project directories that are of interest to the user." + (-map (lambda (subdir) (concat (projectile-project-root) subdir)) + (or (car (projectile-parse-dirconfig-file)) '("")))) + +(defun projectile-dir-files (directory) + "List the files in DIRECTORY and in its sub-directories. +Files are returned as relative paths to the project root." + ;; check for a cache hit first if caching is enabled + (let ((files-list (and projectile-enable-caching + (gethash directory projectile-projects-cache))) + (root (projectile-project-root))) + ;; cache disabled or cache miss + (or files-list + (if (eq projectile-indexing-method 'native) + (projectile-dir-files-native root directory) + ;; use external tools to get the project files + (projectile-remove-ignored (projectile-dir-files-external root directory)))))) + +(defun projectile-dir-files-native (root directory) + "Get the files for ROOT under DIRECTORY using just Emacs Lisp." + (message "Projectile is indexing %s. This may take a while." + (propertize directory 'face 'font-lock-keyword-face)) + ;; we need the files with paths relative to the project root + (-map (lambda (file) (file-relative-name file root)) + (projectile-index-directory directory (projectile-patterns-to-ignore)))) + +(defun projectile-dir-files-external (root directory) + "Get the files for ROOT under DIRECTORY using external tools." + (let ((default-directory directory) + (files-list nil)) + (setq files-list (-map (lambda (f) + (file-relative-name (expand-file-name f directory) root)) + (projectile-get-repo-files))) + files-list)) + +(defcustom projectile-git-command "git ls-files -zco --exclude-standard" + "Command used by projectile to get the files in a git project." + :group 'projectile + :type 'string) + +(defcustom projectile-hg-command "hg locate -0 -I ." + "Command used by projectile to get the files in a hg project." + :group 'projectile + :type 'string) + +(defcustom projectile-fossil-command "fossil ls" + "Command used by projectile to get the files in a fossil project." + :group 'projectile + :type 'string) + +(defcustom projectile-bzr-command "bzr ls -R --versioned -0" + "Command used by projectile to get the files in a bazaar project." + :group 'projectile + :type 'string) + +(defcustom projectile-darcs-command "darcs show files -0 . " + "Command used by projectile to get the files in a darcs project." + :group 'projectile + :type 'string) + +(defcustom projectile-svn-command "svn list -R . | grep -v '$/' | tr '\\n' '\\0'" + "Command used by projectile to get the files in a svn project." + :group 'projectile + :type 'string) + +(defcustom projectile-generic-command "find . -type f -print0" + "Command used by projectile to get the files in a generic project." + :group 'projectile + :type 'string) + +(defun projectile-get-ext-command () + "Determine which external command to invoke based on the project's VCS." + (let ((vcs (projectile-project-vcs))) + (cond + ((eq vcs 'git) projectile-git-command) + ((eq vcs 'hg) projectile-hg-command) + ((eq vcs 'fossil) projectile-fossil-command) + ((eq vcs 'bzr) projectile-bzr-command) + ((eq vcs 'darcs) projectile-darcs-command) + ((eq vcs 'svn) projectile-svn-command) + (t projectile-generic-command)))) + +(defun projectile-get-repo-files () + "Get a list of the files in the project." + (projectile-files-via-ext-command (projectile-get-ext-command))) + +(defun projectile-files-via-ext-command (command) + "Get a list of relative file names in the project root by executing COMMAND." + (split-string (shell-command-to-string command) "\0" t)) + +(defun projectile-index-directory (directory patterns) + "Index DIRECTORY taking into account PATTERNS. +The function calls itself recursively until all sub-directories +have been indexed." + (let (files-list) + (dolist (current-file (file-name-all-completions "" directory) files-list) + (let ((absolute-file (expand-file-name current-file directory))) + (cond + ;; check for directories that are not ignored + ((and (s-ends-with-p "/" current-file) + ;; avoid loops & ignore some well known directories + (not (-any? (lambda (file) + (string= (s-chop-suffix "/" current-file) file)) + '("." ".." ".svn" ".cvs"))) + (not (projectile-ignored-directory-p absolute-file)) + (not (and patterns + (projectile-ignored-rel-p absolute-file + directory patterns)))) + (setq files-list (append files-list + (projectile-index-directory + (expand-file-name current-file directory) + patterns)))) + ;; check for regular files that are not ignored + ((and (not (s-ends-with-p "/" current-file)) + (not (projectile-ignored-file-p absolute-file)) + (not (and patterns + (projectile-ignored-rel-p absolute-file + directory patterns)))) + (setq files-list (cons + (expand-file-name current-file directory) + files-list)))))))) + +(defun projectile-remove-ignored (files) + "Remove ignored files and folders from FILES. + +Operates on filenames relative to the project root." + (let ((ignored (append (projectile-ignored-files-rel) + (projectile-ignored-directories-rel)))) + (-remove (lambda (file) + (--any-p (s-starts-with-p it file) ignored)) + files))) + +(defun projectile-buffers-with-file (buffers) + "Return only those BUFFERS backed by files." + (--filter (buffer-file-name it) buffers)) + +(defun projectile-buffers-with-file-or-process (buffers) + "Return only those BUFFERS backed by files or processes." + (--filter (or (buffer-file-name it) + (get-buffer-process it)) buffers)) + +(defun projectile-project-buffers () + "Get a list of project buffers." + (let* ((project-root (projectile-project-root)) + (all-buffers (-filter (lambda (buffer) + (projectile-project-buffer-p buffer project-root)) + (buffer-list)))) + (if projectile-buffers-filter-function + (funcall projectile-buffers-filter-function all-buffers) + all-buffers))) + +(defun projectile-process-current-project-buffers (action) + "Process the current project's buffers using ACTION." + (let ((project-buffers (projectile-project-buffers))) + (dolist (buffer project-buffers) + (funcall action buffer)))) + +(defun projectile-project-buffer-files () + "Get a list of project buffer files." + (let ((project-root (projectile-project-root))) + (->> (projectile-buffers-with-file (projectile-project-buffers)) + (-map (lambda (buffer) + (file-relative-name (buffer-file-name buffer) project-root)))))) + +(defun projectile-project-buffer-p (buffer project-root) + "Check if BUFFER is under PROJECT-ROOT." + (with-current-buffer buffer + (and (not (s-starts-with? " " (buffer-name buffer))) + (not (projectile-ignored-buffer-p buffer)) + (s-equals? (file-remote-p default-directory) (file-remote-p project-root)) + (s-starts-with? project-root (file-truename default-directory))))) + +(defun projectile-ignored-buffer-p (buffer) + "Check if BUFFER should be ignored." + (with-current-buffer buffer + (--any-p (s-matches? (concat "^" it "$") + (symbol-name major-mode)) + projectile-globally-ignored-modes))) + +(defun projectile-recently-active-files () + "Get list of recently active files. + +Files are ordered by recently active buffers, and then recently +opened through use of recentf." + (let ((project-buffer-files (projectile-project-buffer-files))) + (append project-buffer-files + (-difference (projectile-recentf-files) + project-buffer-files)))) + +(defun projectile-project-buffer-names () + "Get a list of project buffer names." + (-map 'buffer-name (projectile-project-buffers))) + +(defun projectile-prepend-project-name (string) + "Prepend the current project's name to STRING." + (format "[%s] %s" (projectile-project-name) string)) + +(defun projectile-switch-to-buffer () + "Switch to a project buffer." + (interactive) + (switch-to-buffer + (projectile-completing-read + "Switch to buffer: " + (projectile-project-buffer-names)))) + +(defun projectile-switch-to-buffer-other-window () + "Switch to a project buffer and show it in another window." + (interactive) + (switch-to-buffer-other-window + (projectile-completing-read + "Switch to buffer: " + (projectile-project-buffer-names)))) + +(defun projectile-display-buffer () + "Display a project buffer in another window without selecting it." + (interactive) + (display-buffer + (projectile-completing-read + "Display buffer: " + (projectile-project-buffer-names)))) + +(defun projectile-project-buffers-other-buffer () + "Switch to the most recently selected buffer project buffer. +Only buffers not visible in windows are returned." + (interactive) + (switch-to-buffer (car (projectile-project-buffers-non-visible))) nil t) + +(defun projectile-project-buffers-non-visible () + "Get a list of non visible project buffers." + (-filter (lambda (buffer) + (not (get-buffer-window buffer 'visible))) + (projectile-project-buffers))) + +(defun projectile-multi-occur () + "Do a `multi-occur' in the project's buffers." + (interactive) + (multi-occur (projectile-project-buffers) + (car (occur-read-primary-args)))) + +(defun projectile-ignored-directory-p (directory) + "Check if DIRECTORY should be ignored." + (member directory (projectile-ignored-directories))) + +(defun projectile-ignored-file-p (file) + "Check if FILE should be ignored." + (member file (projectile-ignored-files))) + +(defun projectile-ignored-rel-p (file directory patterns) + "Check if FILE should be ignored relative to DIRECTORY according to PATTERNS." + (let ((default-directory directory)) + (-any? (lambda (pattern) + (or (s-ends-with? (s-chop-suffix "/" pattern) + (s-chop-suffix "/" file)) + (member file (file-expand-wildcards pattern t)))) + patterns))) + +(defun projectile-ignored-files () + "Return list of ignored files." + (-map + 'projectile-expand-root + (append + projectile-globally-ignored-files + (projectile-project-ignored-files)))) + +(defun projectile-ignored-directories () + "Return list of ignored directories." + (-map + 'file-name-as-directory + (-map + 'projectile-expand-root + (append + projectile-globally-ignored-directories + (projectile-project-ignored-directories))))) + +(defun projectile-ignored-directories-rel () + "Return list of ignored directories, relative to the root." + (let ((project-root (projectile-project-root))) + (--map (file-relative-name it project-root) (projectile-ignored-directories)))) + +(defun projectile-ignored-files-rel () + "Return list of ignored files, relative to the root." + (let ((project-root (projectile-project-root))) + (--map (file-relative-name it project-root) (projectile-ignored-files)))) + +(defun projectile-project-ignored-files () + "Return list of project ignored files." + (-remove 'file-directory-p (projectile-project-ignored))) + +(defun projectile-project-ignored-directories () + "Return list of project ignored directories." + (-filter 'file-directory-p (projectile-project-ignored))) + +(defun projectile-paths-to-ignore () + "Return a list of ignored project paths." + (-map (lambda (pattern) + (s-chop-prefix "/" pattern)) + (-filter (lambda (pattern) + (s-starts-with? "/" pattern)) + (cdr (projectile-parse-dirconfig-file))))) + +(defun projectile-patterns-to-ignore () + "Return a list of relative file patterns." + (-remove (lambda (pattern) + (s-starts-with? "/" pattern)) + (cdr (projectile-parse-dirconfig-file)))) + +(defun projectile-project-ignored () + "Return list of project ignored files/directories." + (let ((paths (projectile-paths-to-ignore)) + (default-directory (projectile-project-root))) + (-flatten (-map + (lambda (pattern) + (or (file-expand-wildcards pattern t) + (projectile-expand-root pattern))) + paths)))) + +(defun projectile-dirconfig-file () + "Return the absolute path to the project's dirconfig file." + (expand-file-name ".projectile" (projectile-project-root))) + +(defun projectile-parse-dirconfig-file () + "Parse project ignore file and return directories to ignore and keep. + +The return value will be a cons, the car being the list of +directories to keep, and the cdr being the list of files or +directories to ignore. + +Strings starting with + will be added to the list of directories +to keep, and strings starting with - will be added to the list of +directories to ignore. For backward compatibility, without a +prefix the string will be assumed to be an ignore string." + (let ((dirconfig-file (projectile-dirconfig-file))) + (when (projectile-file-exists-p dirconfig-file) + (with-temp-buffer + (insert-file-contents-literally dirconfig-file) + (let* ((split-string-default-separators "[\r\n]") + (strings (-map 's-trim (delete "" (split-string (buffer-string))))) + (separated-vals (--separate (s-starts-with? "+" it) strings))) + (cons (-map (lambda (dir) (projectile-ensure-trailing-slash + (projectile-strip-dir-prefix dir))) (car separated-vals)) + (-map 'projectile-strip-dir-prefix (cadr separated-vals)))))))) + +(defun projectile-ensure-trailing-slash (dir) + "Append / to DIR if missing." + (if (s-ends-with? "/" dir) dir + (concat dir "/"))) + +(defun projectile-strip-dir-prefix (dir) + "Strip + or - prefix from DIR." + (s-chop-prefixes '("-" "+") dir)) + +(defun projectile-expand-root (name) + "Expand NAME to project root. + +Never use on many files since it's going to recalculate the +project-root for every file." + (expand-file-name name (projectile-project-root))) + +(defun projectile-completing-read (prompt choices &optional initial-input) + "Present a project tailored PROMPT with CHOICES." + (let ((prompt (projectile-prepend-project-name prompt))) + (cond + ((eq projectile-completion-system 'ido) + (ido-completing-read prompt choices nil nil initial-input)) + ((eq projectile-completion-system 'default) + (completing-read prompt choices nil nil initial-input)) + ((eq projectile-completion-system 'helm) + (if (fboundp 'helm-comp-read) + (helm-comp-read prompt choices + :initial-input initial-input + :candidates-in-buffer t + :must-match 'confirm) + (user-error "Please install helm from \ +https://github.com/emacs-helm/helm"))) + ((eq projectile-completion-system 'grizzl) + (if (and (fboundp 'grizzl-completing-read) + (fboundp 'grizzl-make-index)) + (grizzl-completing-read prompt (grizzl-make-index choices)) + (user-error "Please install grizzl from \ +https://github.com/d11wtq/grizzl"))) + (t (funcall projectile-completion-system prompt choices))))) + +(defun projectile-current-project-files () + "Return a list of files for the current project." + (let ((files (and projectile-enable-caching + (gethash (projectile-project-root) projectile-projects-cache)))) + ;; nothing is cached + (unless files + (setq files (-mapcat 'projectile-dir-files + (projectile-get-project-directories))) + ;; cache the resulting list of files + (when projectile-enable-caching + (projectile-cache-project (projectile-project-root) files))) + (projectile-sort-files files))) + +(defun projectile-process-current-project-files (action) + "Process the current project's files using ACTION." + (let ((project-files (projectile-current-project-files)) + default-directory (projectile-project-root)) + (dolist (filename project-files) + (funcall action filename)))) + +(defun projectile-current-project-dirs () + "Return a list of dirs for the current project." + (-remove 'null (-distinct + (-map 'file-name-directory + (projectile-current-project-files))))) + +(defun projectile-hash-keys (hash) + "Return a list of all HASH keys." + (let (allkeys) + (maphash (lambda (k _v) (setq allkeys (cons k allkeys))) hash) + allkeys)) + + +;;; Interactive commands +(defun projectile-find-file (&optional arg) + "Jump to a project's file using completion. + +With a prefix ARG invalidates the cache first." + (interactive "P") + (projectile-maybe-invalidate-cache arg) + (let ((file (projectile-completing-read "Find file: " + (projectile-current-project-files)))) + (find-file (expand-file-name file (projectile-project-root))) + (run-hooks 'projectile-find-file-hook))) + +(defun projectile-find-file-other-window (&optional arg) + "Jump to a project's file using completion and show it in another window. + +With a prefix ARG invalidates the cache first." + (interactive "P") + (projectile-maybe-invalidate-cache arg) + (let ((file (projectile-completing-read "Find file: " + (projectile-current-project-files)))) + (find-file-other-window (expand-file-name file (projectile-project-root))) + (run-hooks 'projectile-find-file-hook))) + +(defun projectile-sort-files (files) + "Sort FILES according to `projectile-sort-order'." + (pcase projectile-sort-order + (`default files) + (`recentf (projectile-sort-by-recentf-first files)) + (`recently-active (projectile-sort-by-recently-active-first files)) + (`modification-time (projectile-sort-by-modification-time files)) + (`access-time (projectile-sort-by-access-time files)))) + +(defun projectile-sort-by-recentf-first (files) + "Sort FILES by a recent first scheme." + (let ((project-recentf-files (projectile-recentf-files))) + (append project-recentf-files + (-difference files project-recentf-files)))) + +(defun projectile-sort-by-recently-active-first (files) + "Sort FILES by most recently active buffers or opened files." + (let ((project-recently-active-files (projectile-recently-active-files))) + (append project-recently-active-files + (-difference files project-recently-active-files)))) + +(defun projectile-sort-by-modification-time (files) + "Sort FILES by modification time." + (let ((default-directory (projectile-project-root))) + (-sort (lambda (file1 file2) + (let ((file1-mtime (nth 5 (file-attributes file1))) + (file2-mtime (nth 5 (file-attributes file2)))) + (not (time-less-p file1-mtime file2-mtime)))) + files))) + +(defun projectile-sort-by-access-time (files) + "Sort FILES by access time." + (let ((default-directory (projectile-project-root))) + (-sort (lambda (file1 file2) + (let ((file1-atime (nth 4 (file-attributes file1))) + (file2-atime (nth 4 (file-attributes file2)))) + (not (time-less-p file1-atime file2-atime)))) + files))) + +(defun projectile-find-dir (&optional arg) + "Jump to a project's directory using completion. + +With a prefix ARG invalidates the cache first." + (interactive "P") + (projectile-maybe-invalidate-cache arg) + (let ((dir (projectile-complete-dir))) + (dired (expand-file-name dir (projectile-project-root))) + (run-hooks 'projectile-find-dir-hook))) + +(defun projectile-find-dir-other-window (&optional arg) + "Jump to a project's directory in other window using completion. + +With a prefix ARG invalidates the cache first." + (interactive "P") + (when arg + (projectile-invalidate-cache nil)) + (let ((dir (projectile-complete-dir))) + (dired-other-window (expand-file-name dir (projectile-project-root))) + (run-hooks 'projectile-find-dir-hook))) + +(defun projectile-complete-dir () + (projectile-completing-read + "Find dir: " + (if projectile-find-dir-includes-top-level + (append '("./") (projectile-current-project-dirs)) + (projectile-current-project-dirs)))) + +(defun projectile-find-test-file (&optional arg) + "Jump to a project's test file using completion. + +With a prefix ARG invalidates the cache first." + (interactive "P") + (projectile-maybe-invalidate-cache arg) + (let ((file (projectile-completing-read "Find test file: " + (projectile-current-project-test-files)))) + (find-file (expand-file-name file (projectile-project-root))))) + +(defcustom projectile-test-files-prefixes '("test_") + "Some common prefixes of test files." + :group 'projectile + :type '(repeat string)) + +(defcustom projectile-test-files-suffices '("_test" "_spec" "Spec" "Test" "-test") + "Some common suffices of test files." + :group 'projectile + :type '(repeat string)) + +(defun projectile-test-files (files) + "Return only the test FILES." + (-filter 'projectile-test-file-p files)) + +(defun projectile-test-file-p (file) + "Check if FILE is a test file." + (or (-any? (lambda (prefix) + (s-starts-with? prefix (file-name-nondirectory file))) + projectile-test-files-prefixes) + (-any? (lambda (suffix) + (s-ends-with? suffix (file-name-sans-extension file))) + projectile-test-files-suffices))) + +(defun projectile-current-project-test-files () + "Return a list of test files for the current project." + (projectile-test-files (projectile-current-project-files))) + +(defvar projectile-rails-rspec '("Gemfile" "app" "lib" "db" "config" "spec")) +(defvar projectile-rails-test '("Gemfile" "app" "lib" "db" "config" "test")) +(defvar projectile-symfony '("composer.json" "app" "src" "vendor")) +(defvar projectile-ruby-rspec '("Gemfile" "lib" "spec")) +(defvar projectile-ruby-test '("Gemfile" "lib" "test")) +(defvar projectile-django '("manage.py")) +(defvar projectile-python-pip '("requirements.txt")) +(defvar projectile-python-egg '("setup.py")) +(defvar projectile-maven '("pom.xml")) +(defvar projectile-gradle '("build.gradle")) +(defvar projectile-grails '("application.properties" "grails-app")) +(defvar projectile-lein '("project.clj")) +(defvar projectile-rebar '("rebar")) +(defvar projectile-sbt '("build.sbt")) +(defvar projectile-make '("Makefile")) +(defvar projectile-grunt '("Gruntfile.js")) +(defvar projectile-gulp '("gulpfile.js")) + +(defun projectile-go () + (-any? (lambda (file) + (string= (file-name-extension file) "go")) (projectile-current-project-files))) + +(defcustom projectile-go-function 'projectile-go + "Function to determine if project's type is go." + :group 'projectile + :type 'function) + +(defun projectile-project-type () + "Determine the project's type based on its structure." + (cond + ((projectile-verify-files projectile-rails-rspec) 'rails-rspec) + ((projectile-verify-files projectile-rails-test) 'rails-test) + ((projectile-verify-files projectile-ruby-rspec) 'ruby-rspec) + ((projectile-verify-files projectile-ruby-test) 'ruby-test) + ((projectile-verify-files projectile-django) 'django) + ((projectile-verify-files projectile-python-pip)'python) + ((projectile-verify-files projectile-python-egg) 'python) + ((projectile-verify-files projectile-symfony) 'symfony) + ((projectile-verify-files projectile-lein) 'lein) + ((projectile-verify-files projectile-maven) 'maven) + ((projectile-verify-files projectile-gradle) 'gradle) + ((projectile-verify-files projectile-grails) 'grails) + ((projectile-verify-files projectile-rebar) 'rebar) + ((projectile-verify-files projectile-sbt) 'sbt) + ((projectile-verify-files projectile-make) 'make) + ((projectile-verify-files projectile-gulp) 'gulp) + ((projectile-verify-files projectile-grunt) 'grunt) + ((funcall projectile-go-function) 'go) + (t 'generic))) + +(defun projectile-verify-files (files) + "Check whether all FILES exist in the current project." + (-all? 'projectile-verify-file files)) + +(defun projectile-verify-file (file) + "Check whether FILE exists in the current project." + (projectile-file-exists-p (projectile-expand-root file))) + +(defun projectile-project-vcs () + "Determine the VCS used by the project if any." + (let ((project-root (projectile-project-root))) + (cond + ((projectile-file-exists-p (expand-file-name ".git" project-root)) 'git) + ((projectile-file-exists-p (expand-file-name ".hg" project-root)) 'hg) + ((projectile-file-exists-p (expand-file-name ".fossil" project-root)) 'fossil) + ((projectile-file-exists-p (expand-file-name ".bzr" project-root)) 'bzr) + ((projectile-file-exists-p (expand-file-name "_darcs" project-root)) 'darcs) + ((projectile-file-exists-p (expand-file-name ".svn" project-root)) 'svn) + ((projectile-locate-dominating-file project-root ".git") 'git) + ((projectile-locate-dominating-file project-root ".hg") 'hg) + ((projectile-locate-dominating-file project-root ".fossil") 'fossil) + ((projectile-locate-dominating-file project-root ".bzr") 'bzr) + ((projectile-locate-dominating-file project-root "_darcs") 'darcs) + ((projectile-locate-dominating-file project-root ".svn") 'svn) + (t 'none)))) + +(defun projectile-find-implementation-or-test (file-name) + "Given a FILE-NAME return the matching implementation or test filename." + (unless file-name (error "The current buffer is not visiting a file")) + (if (projectile-test-file-p file-name) + ;; find the matching impl file + (let ((impl-file (projectile-find-matching-file file-name))) + (if impl-file + (projectile-expand-root impl-file) + (error "No matching source file found"))) + ;; find the matching test file + (let ((test-file (projectile-find-matching-test file-name))) + (if test-file + (projectile-expand-root test-file) + (error "No matching test file found"))))) + +(defun projectile-find-implementation-or-test-other-window () + "Open matching implementation or test file in other window." + (interactive) + (find-file-other-window + (projectile-find-implementation-or-test (buffer-file-name)))) + +(defun projectile-toggle-between-implementation-and-test () + "Toggle between an implementation file and its test file." + (interactive) + (find-file + (projectile-find-implementation-or-test (buffer-file-name)))) + +(defun projectile-test-affix (project-type) + "Find test files affix based on PROJECT-TYPE." + (or (funcall projectile-test-prefix-function project-type) + (funcall projectile-test-suffix-function project-type) + (error "Project type not supported!"))) + +(defcustom projectile-test-prefix-function 'projectile-test-prefix + "Function to find test files prefix based on PROJECT-TYPE." + :group 'projectile + :type 'function) + +(defcustom projectile-test-suffix-function 'projectile-test-suffix + "Function to find test files suffix based on PROJECT-TYPE." + :group 'projectile + :type 'function) + +(defun projectile-test-prefix (project-type) + "Find default test files prefix based on PROJECT-TYPE." + (cond + ((member project-type '(django python)) "test_"))) + +(defun projectile-test-suffix (project-type) + "Find default test files suffix based on PROJECT-TYPE." + (cond + ((member project-type '(rails-rspec ruby-rspec)) "_spec") + ((member project-type '(rails-test ruby-test lein go)) "_test") + ((member project-type '(maven symfony)) "Test") + ((member project-type '(gradle grails)) "Spec"))) + +(defun projectile-find-matching-test (file) + "Compute the name of the test matching FILE." + (let ((basename (file-name-nondirectory (file-name-sans-extension file))) + (test-affix (projectile-test-affix (projectile-project-type)))) + (-first (lambda (current-file) + (let ((current-file-basename (file-name-nondirectory (file-name-sans-extension current-file)))) + (or (s-equals? current-file-basename (concat test-affix basename)) + (s-equals? current-file-basename (concat basename test-affix))))) + (projectile-current-project-files)))) + +(defun projectile-find-matching-file (test-file) + "Compute the name of a file matching TEST-FILE." + (let ((basename (file-name-nondirectory (file-name-sans-extension test-file))) + (test-affix (projectile-test-affix (projectile-project-type)))) + (-first (lambda (current-file) + (let ((current-file-basename (file-name-nondirectory (file-name-sans-extension current-file)))) + (or (s-equals? (concat test-affix current-file-basename) basename) + (s-equals? (concat current-file-basename test-affix) basename)))) + (projectile-current-project-files)))) + +(defun projectile-grep-default-files () + "Try to find a default pattern for `projectile-grep'. +This is a subset of `grep-read-files', where either a matching entry from +`grep-files-aliases' or file name extension pattern is returned." + (when buffer-file-name + (let* ((fn (file-name-nondirectory buffer-file-name)) + (default-alias + (let ((aliases (remove (assoc "all" grep-files-aliases) + grep-files-aliases)) + alias) + (while aliases + (setq alias (car aliases) + aliases (cdr aliases)) + (if (string-match (mapconcat + 'wildcard-to-regexp + (split-string (cdr alias) nil t) + "\\|") + fn) + (setq aliases nil) + (setq alias nil))) + (cdr alias))) + (default-extension + (let ((ext (file-name-extension fn))) + (and ext (concat "*." ext))))) + (or default-alias default-extension)))) + +(defun projectile-grep (&optional arg) + "Perform rgrep in the project. + +With a prefix ARG asks for files (globbing-aware) which to grep in. +With prefix ARG of `-' (such as `M--'), default the files (without prompt), +to `projectile-grep-default-files'." + (interactive "P") + (let* ((roots (projectile-get-project-directories)) + (search-regexp (if (and transient-mark-mode mark-active) + (buffer-substring (region-beginning) (region-end)) + (read-string (projectile-prepend-project-name "Grep for: ") + (projectile-symbol-at-point)))) + (files (and arg (or (and (equal current-prefix-arg '-) + (projectile-grep-default-files)) + (read-string (projectile-prepend-project-name "Grep in: ") + (projectile-grep-default-files)))))) + (dolist (root-dir roots) + (require 'grep) + ;; in git projects users have the option to use `vc-git-grep' instead of `rgrep' + (if (and (eq (projectile-project-vcs) 'git) projectile-use-git-grep) + (vc-git-grep search-regexp (or files "") root-dir) + ;; paths for find-grep should relative and without trailing / + (let ((grep-find-ignored-directories (-union (-map (lambda (dir) (s-chop-suffix "/" (file-relative-name dir root-dir))) + (cdr (projectile-ignored-directories))) grep-find-ignored-directories)) + (grep-find-ignored-files (-union (-map (lambda (file) (file-relative-name file root-dir)) (projectile-ignored-files)) grep-find-ignored-files))) + (grep-compute-defaults) + (rgrep search-regexp (or files "* .*") root-dir)))))) + +(defun projectile-ack (regexp &optional arg) + "Run an ack search with REGEXP in the project. + +With a prefix argument ARG prompts you for a directory on which the search is performed ." + (interactive + (list (read-from-minibuffer + (projectile-prepend-project-name "Ack search for: ") + (projectile-symbol-at-point)) + current-prefix-arg)) + (if (require 'ack-and-a-half nil 'noerror) + (let* ((saved-arguments ack-and-a-half-arguments) + (root (if arg + (expand-file-name (projectile-complete-dir) (projectile-project-root)) + (projectile-project-root))) + (ack-and-a-half-arguments + (append saved-arguments + (-union (-map (lambda (path) + (concat "--ignore-dir=" (file-name-nondirectory (directory-file-name path)))) + (projectile-ignored-directories)) + (-map (lambda (path) + (concat "--ignore-file=is:" (file-relative-name path root))) + (projectile-ignored-files)))))) + (ack-and-a-half regexp t root)) + (error "ack-and-a-half not available"))) + +(defun projectile-ag (search-term &optional arg) + "Run an ag search with SEARCH-TERM in the project. + +With an optional prefix argument ARG SEARCH-TERM is interpreted as a +regular expression." + (interactive + (list (read-from-minibuffer + (projectile-prepend-project-name (format "Ag %ssearch for: " (if current-prefix-arg "regexp " ""))) + (projectile-symbol-at-point)) + current-prefix-arg)) + (if (fboundp 'ag-regexp) + (let ((ag-command (if arg 'ag-regexp 'ag)) + ;; reset the prefix arg, otherwise it will affect the ag-command + (current-prefix-arg nil)) + (funcall ag-command search-term (projectile-project-root))) + (error "Ag is not available"))) + +(defun projectile-tags-exclude-patterns () + "Return a string with exclude patterns for ctags." + (mapconcat (lambda (pattern) (format "--exclude=%s" + (directory-file-name pattern))) + (projectile-ignored-directories-rel) " ")) + +(defun projectile-regenerate-tags () + "Regenerate the project's [e|g]tags." + (interactive) + (if (boundp 'ggtags-mode) + (progn + (let* ((ggtags-project-root (projectile-project-root)) + (default-directory ggtags-project-root)) + (ggtags-ensure-project) + (ggtags-update-tags t))) + (let* ((project-root (projectile-project-root)) + (tags-exclude (projectile-tags-exclude-patterns)) + (default-directory project-root) + (tags-file (expand-file-name projectile-tags-file-name)) + (command (format projectile-tags-command tags-file tags-exclude)) + shell-output exit-code) + (with-temp-buffer + (setq exit-code + (call-process-shell-command command nil (current-buffer)) + shell-output + (s-trim (buffer-substring (point-min) (point-max))))) + (unless (zerop exit-code) + (error shell-output)) + (visit-tags-table tags-file)))) + +(defun projectile-visit-project-tags-table () + "Visit the current project's tags table." + (when (projectile-project-p) + (let ((tags-file (projectile-expand-root projectile-tags-file-name))) + (when (file-exists-p tags-file) + (with-demoted-errors + "Error loading tags-file: %s" + (visit-tags-table tags-file t)))))) + +(defun projectile-find-tag () + "Find tag in project." + (interactive) + (let ((find-tag-function (if (boundp 'ggtags-mode) 'ggtags-find-tag 'find-tag)) + (tags (if (boundp 'ggtags-mode) + (projectile--tags (all-completions "" ggtags-completion-table)) + ;; we have to manually reset the tags-completion-table every time + (setq tags-completion-table nil) + (tags-completion-table) + (projectile--tags tags-completion-table)))) + (funcall find-tag-function (projectile-completing-read "Find tag: " + tags + (projectile-symbol-at-point))))) + +(defun projectile--tags (completion-table) + "Find tags using COMPLETION-TABLE." + (-reject 'null + (-map (lambda (x) + (unless (integerp x) + (prin1-to-string x t))) + completion-table))) + +(defmacro projectile-with-default-dir (dir &rest body) + "Invoke in DIR the BODY." + (declare (debug t) (indent 1)) + `(let ((default-directory ,dir)) + ,@body)) + +(defun projectile-run-command-in-root () + "Invoke `execute-extended-command' in the project's root." + (interactive) + (projectile-with-default-dir (projectile-project-root) + (call-interactively 'execute-extended-command))) + +(defun projectile-run-shell-command-in-root () + "Invoke `shell-command' in the project's root." + (interactive) + (projectile-with-default-dir (projectile-project-root) + (call-interactively 'shell-command))) + +(defun projectile-run-async-shell-command-in-root () + "Invoke `async-shell-command' in the project's root." + (interactive) + (projectile-with-default-dir (projectile-project-root) + (call-interactively 'async-shell-command))) + +(defun projectile-files-in-project-directory (directory) + "Return a list of files in DIRECTORY." + (let ((dir (file-relative-name (expand-file-name directory) (projectile-project-root)))) + (-filter (lambda (file) (s-starts-with-p dir file)) + (projectile-current-project-files)))) + +(defun projectile-unixy-system-p () + "Check to see if unixy text utilities are installed." + (--all? (executable-find it) '("grep" "cut" "uniq"))) + +(defun projectile-files-from-cmd (cmd directory) + "Use a grep-like CMD to search for files within DIRECTORY. + +CMD should include the necessary search params and should output +equivalently to grep -H (colon-deliminated, with the relative +filename as the first column). Returns a list of expanded +filenames." + (let ((default-directory directory)) + (->> (s-trim (shell-command-to-string + (concat cmd " | cut -d: -f1 | uniq"))) + (s-split "\n+") + (-filter 's-present?) + (--map (concat directory (s-chop-prefix "./" it)))))) + +(defun projectile-files-with-string (string directory) + "Return a list of all files containing STRING in DIRECTORY. + +Tries to use ag, ack, git-grep, and grep in that order. If those +are impossible (for instance on Windows), returns a list of all +files in the project." + (if (projectile-unixy-system-p) + (let* ((search-term (shell-quote-argument string)) + (cmd (cond ((executable-find "ag") + (concat "ag --literal --nocolor --noheading -- " + search-term)) + ((executable-find "ack") + (concat "ack --noheading --nocolor -- " + search-term)) + ((and (executable-find "git") + (eq (projectile-project-vcs) 'git)) + (concat "git grep -H " + search-term)) + (t + (concat "grep -rH " + search-term + " ."))))) + (projectile-files-from-cmd cmd directory)) + ;; we have to reject directories as a workaround to work with git submodules + (-reject 'file-directory-p + (-map 'projectile-expand-root (projectile-dir-files directory))))) + +(defun projectile-replace (arg) + "Replace a string in the project using `tags-query-replace'. + +With a prefix argument ARG prompts you for a directory on which +to run the replacement." + (interactive "P") + (let* ((old-text (read-string + (projectile-prepend-project-name "Replace: ") + (projectile-symbol-at-point))) + (new-text (read-string + (projectile-prepend-project-name + (format "Replace %s with: " old-text)))) + (directory (if arg + (read-directory-name "Replace in directory: ") + (projectile-project-root))) + (files (projectile-files-with-string old-text directory))) + (tags-query-replace old-text new-text nil (cons 'list files)))) + +(defun projectile-symbol-at-point () + "Get the symbol at point and strip its properties." + (substring-no-properties (or (thing-at-point 'symbol) ""))) + +(defun projectile-kill-buffers () + "Kill all project buffers." + (interactive) + (let* ((buffers (projectile-project-buffers)) + (question + (format + "Are you sure you want to kill %d buffer(s) for '%s'? " + (length buffers) + (projectile-project-name)))) + (if (yes-or-no-p question) + ;; we take care not to kill indirect buffers directly + ;; as we might encounter them after their base buffers are killed + (mapc 'kill-buffer (-remove 'buffer-base-buffer buffers))))) + +(defun projectile-save-project-buffers () + "Save all project buffers." + (interactive) + (--each (projectile-project-buffers) + (with-current-buffer it + (when buffer-file-name + (save-buffer))))) + +(defun projectile-dired () + "Open `dired' at the root of the project." + (interactive) + (dired (projectile-project-root))) + +(defun projectile-vc () + "Open `vc-dir' at the root of the project. + +For git projects `magit-status' is used if available." + (interactive) + (cond + ((and (eq (projectile-project-vcs) 'git) (fboundp 'magit-status)) + (magit-status (projectile-project-root))) + (t (vc-dir (projectile-project-root))))) + +(defun projectile-recentf () + "Show a list of recently visited files in a project." + (interactive) + (if (boundp 'recentf-list) + (find-file (projectile-expand-root (projectile-completing-read "Recently visited files: " (projectile-recentf-files)))) + (message "recentf is not enabled"))) + +(defun projectile-recentf-files () + "Return a list of recently visited files in a project." + (if (boundp 'recentf-list) + (let ((project-root (projectile-project-root))) + (->> recentf-list + (-filter (lambda (file) (s-starts-with-p project-root file))) + (-map (lambda (file) (file-relative-name file project-root))))) + nil)) + +(defun projectile-serialize-cache () + "Serializes the memory cache to the hard drive." + (projectile-serialize projectile-projects-cache projectile-cache-file)) + +(defvar projectile-rails-compile-cmd "bundle exec rails server") +(defvar projectile-ruby-compile-cmd "bundle exec rake build") +(defvar projectile-ruby-test-cmd "bundle exec rake test") +(defvar projectile-ruby-rspec-cmd "bundle exec rspec") +(defvar projectile-django-compile-cmd "python manage.py runserver") +(defvar projectile-django-test-cmd "python manage.py test") +(defvar projectile-python-compile-cmd "python setup.py build") +(defvar projectile-python-test-cmd "python -m unittest discover") +(defvar projectile-symfony-compile-cmd "app/console server:run") +(defvar projectile-symfony-test-cmd "phpunit -c app ") +(defvar projectile-maven-compile-cmd "mvn clean install") +(defvar projectile-maven-test-cmd "mvn test") +(defvar projectile-gradle-compile-cmd "gradle build") +(defvar projectile-gradle-test-cmd "gradle test") +(defvar projectile-grails-compile-cmd "grails package") +(defvar projectile-grails-test-cmd "grails test-app") +(defvar projectile-lein-compile-cmd "lein compile") +(defvar projectile-lein-test-cmd "lein test") +(defvar projectile-rebar-compile-cmd "rebar") +(defvar projectile-rebar-test-cmd "rebar eunit") +(defvar projectile-sbt-compile-cmd "sbt compile") +(defvar projectile-sbt-test-cmd "sbt test") +(defvar projectile-make-compile-cmd "make") +(defvar projectile-make-test-cmd "make test") +(defvar projectile-grunt-compile-cmd "grunt") +(defvar projectile-grunt-test-cmd "grunt test") +(defvar projectile-gulp-compile-cmd "gulp") +(defvar projectile-gulp-test-cmd "gulp test") +(defvar projectile-go-compile-cmd "go build ./...") +(defvar projectile-go-test-cmd "go test ./...") + +(cl-dolist (var '(projectile-rails-compile-cmd + projectile-ruby-compile-cmd + projectile-ruby-test-cmd + projectile-ruby-rspec-cmd + projectile-django-compile-cmd + projectile-django-test-cmd + projectile-python-compile-cmd + projectile-python-test-cmd + projectile-symfony-compile-cmd + projectile-symfony-test-cmd + projectile-maven-compile-cmd + projectile-maven-test-cmd + projectile-lein-compile-cmd + projectile-lein-test-cmd + projectile-rebar-compile-cmd + projectile-rebar-test-cmd + projectile-sbt-compile-cmd + projectile-sbt-test-cmd + projectile-make-compile-cmd + projectile-make-test-cmd + projectile-grunt-compile-cmd + projectile-grunt-test-cmd)) + (put var 'safe-local-variable #'stringp)) + + +(defvar projectile-compilation-cmd-map + (make-hash-table :test 'equal) + "A mapping between projects and the last compilation command used on them.") +(defvar projectile-test-cmd-map + (make-hash-table :test 'equal) + "A mapping between projects and the last test command used on them.") + +(defun projectile-default-compilation-command (project-type) + "Retrieve default compilation command for PROJECT-TYPE." + (cond + ((member project-type '(rails-rspec rails-test)) projectile-rails-compile-cmd) + ((member project-type '(ruby-rspec ruby-test)) projectile-ruby-compile-cmd) + ((eq project-type 'django) projectile-django-compile-cmd) + ((eq project-type 'python) projectile-python-compile-cmd) + ((eq project-type 'symfony) projectile-symfony-compile-cmd) + ((eq project-type 'lein) projectile-lein-compile-cmd) + ((eq project-type 'make) projectile-make-compile-cmd) + ((eq project-type 'rebar) projectile-rebar-compile-cmd) + ((eq project-type 'maven) projectile-maven-compile-cmd) + ((eq project-type 'gradle) projectile-gradle-compile-cmd) + ((eq project-type 'grails) projectile-grails-compile-cmd) + ((eq project-type 'sbt) projectile-sbt-compile-cmd) + ((eq project-type 'grunt) projectile-grunt-compile-cmd) + ((eq project-type 'gulp) projectile-gulp-compile-cmd) + ((eq project-type 'go) projectile-go-compile-cmd) + (t projectile-make-compile-cmd))) + +(defun projectile-default-test-command (project-type) + "Retrieve default test command for PROJECT-TYPE." + (cond + ((member project-type '(rails-rspec ruby-rspec)) projectile-ruby-rspec-cmd) + ((member project-type '(rails-test ruby-test)) projectile-ruby-test-cmd) + ((eq project-type 'django) projectile-django-test-cmd) + ((eq project-type 'python) projectile-python-test-cmd) + ((eq project-type 'symfony) projectile-symfony-test-cmd) + ((eq project-type 'lein) projectile-lein-test-cmd) + ((eq project-type 'make) projectile-make-test-cmd) + ((eq project-type 'rebar) projectile-rebar-test-cmd) + ((eq project-type 'maven) projectile-maven-test-cmd) + ((eq project-type 'gradle) projectile-gradle-test-cmd) + ((eq project-type 'grails) projectile-grails-test-cmd) + ((eq project-type 'sbt) projectile-sbt-test-cmd) + ((eq project-type 'grunt) projectile-grunt-test-cmd) + ((eq project-type 'gulp) projectile-gulp-test-cmd) + ((eq project-type 'go) projectile-go-test-cmd) + (t projectile-make-test-cmd))) + +(defun projectile-compilation-command (project) + "Retrieve the compilation command for PROJECT." + (or (gethash project projectile-compilation-cmd-map) + (projectile-default-compilation-command (projectile-project-type)))) + +(defun projectile-test-command (project) + "Retrieve the test command for PROJECT." + (or (gethash project projectile-test-cmd-map) + (projectile-default-test-command (projectile-project-type)))) + +(defun projectile-compile-project (arg) + "Run project compilation command. + +Normally you'll be prompted for a compilation command, unless +variable `compilation-read-command'. You can force the prompt +with a prefix ARG." + (interactive "P") + (let* ((project-root (projectile-project-root)) + (default-cmd (projectile-compilation-command project-root)) + (compilation-cmd (if (or compilation-read-command arg) + (compilation-read-command default-cmd) + default-cmd)) + (default-directory project-root)) + (puthash project-root compilation-cmd projectile-compilation-cmd-map) + (compilation-start compilation-cmd))) + +(defadvice compilation-find-file (around projectile-compilation-find-file) + "Try to find a buffer for FILENAME, if we cannot find it, +fallback to the original function." + (let ((filename (ad-get-arg 1))) + (setf ad-return-value + (or + (if (file-exists-p (expand-file-name filename)) + (find-file-noselect filename)) + ;; Try to find the filename using projectile + (and (projectile-project-p) + (loop with root = (projectile-project-root) + for dir in (cons "" (projectile-current-project-dirs)) + for file = (expand-file-name filename + (expand-file-name dir root)) + if (file-exists-p file) + return (find-file-noselect file))) + ;; Fall back to the old function `compilation-find-file' + ad-do-it)))) + +;; TODO - factor this duplication out +(defun projectile-test-project (arg) + "Run project test command. + +Normally you'll be prompted for a compilation command, unless +variable `compilation-read-command'. You can force the prompt +with a prefix ARG." + (interactive "P") + (let* ((project-root (projectile-project-root)) + (default-cmd (projectile-test-command project-root)) + (test-cmd (if (or compilation-read-command arg) + (compilation-read-command default-cmd) + default-cmd)) + (default-directory project-root)) + (puthash project-root test-cmd projectile-test-cmd-map) + (compilation-start test-cmd))) + +(defun projectile-relevant-known-projects () + "Return a list of known projects except the current one (if present)." + (if (projectile-project-p) + (-difference projectile-known-projects + (list (abbreviate-file-name (projectile-project-root)))) + projectile-known-projects)) + +(defun projectile-switch-project (&optional arg) + "Switch to a project we have visited before. +Invokes the command referenced by `projectile-switch-project-action' on switch. +With a prefix ARG invokes `projectile-commander' instead of +`projectile-switch-project-action.'" + (interactive "P") + (let ((relevant-projects (projectile-relevant-known-projects))) + (if relevant-projects + (projectile-switch-project-by-name + (projectile-completing-read "Switch to project: " relevant-projects) + arg) + (error "There are no known projects")))) + +(defun projectile-switch-project-by-name (project-to-switch &optional arg) + "Switch to project by project name PROJECT-TO-SWITCH. +Invokes the command referenced by `projectile-switch-project-action' on switch. +With a prefix ARG invokes `projectile-commander' instead of +`projectile-switch-project-action.'" + (let* ((default-directory project-to-switch) + (switch-project-action (if arg + 'projectile-commander + projectile-switch-project-action))) + (if projectile-remember-window-configs + (unless (projectile-restore-window-config (projectile-project-name)) + (funcall switch-project-action) + (delete-other-windows)) + (funcall switch-project-action)) + (run-hooks 'projectile-switch-project-hook))) + + +(defun projectile-find-file-in-directory (&optional directory) + "Jump to a file in a (maybe regular) DIRECTORY. + +This command will first prompt for the directory the file is in." + (interactive "DFind file in directory: ") + (let ((default-directory directory) + (projectile-require-project-root nil)) + (if (projectile-project-p) + ;; target directory is in a project + (let ((file (projectile-completing-read "Find file: " + (projectile-dir-files directory)))) + (find-file (expand-file-name file (projectile-project-root))) + (run-hooks 'projectile-find-file-hook)) + ;; target directory is not in a project + (projectile-find-file)))) + +(defun projectile-find-file-in-known-projects () + "Jump to a file in any of the known projects." + (interactive) + (let ((projectile-require-project-root nil) + (all-files nil)) + (-each projectile-known-projects + (lambda (project) + (when (file-exists-p project) + (let ((default-directory project)) + (setq all-files (append all-files (-map (lambda (file) + (expand-file-name file project)) + (projectile-current-project-files)))))))) + (find-file (projectile-completing-read "Find file in projects: " all-files)))) + +(defcustom projectile-switch-project-hook nil + "Hooks run when project is switched." + :group 'projectile + :type 'hook) + + +(defun projectile-cleanup-known-projects () + "Remove known projects that don't exist anymore." + (interactive) + (setq projectile-known-projects (--filter (projectile-file-exists-p it) projectile-known-projects)) + (projectile-save-known-projects)) + +(defun projectile-clear-known-projects () + "Clear both `projectile-known-projects' and `projectile-known-projects-file'." + (interactive) + (setq projectile-known-projects nil) + (projectile-save-known-projects)) + +(defun projectile-remove-known-project (&optional project) + "Remove PROJECT from the list of known projects." + (interactive (list (projectile-completing-read "Remove from known projects: " + projectile-known-projects))) + (setq projectile-known-projects + (--reject (string= project it) projectile-known-projects)) + (projectile-save-known-projects) + (message "Project %s removed from the list of known projects." project)) + +(defun projectile-remove-current-project-from-known-projects () + "Remove the current project from the list of known projects." + (interactive) + (projectile-remove-known-project (abbreviate-file-name (projectile-project-root)))) + +(defun projectile-ignored-projects () + "A list of projects that should not be save in `projectile-known-projects'." + (-map 'file-truename projectile-ignored-projects)) + +(defun projectile-add-known-project (project-root) + "Add PROJECT-ROOT to the list of known projects." + (unless (member project-root (projectile-ignored-projects)) + (setq projectile-known-projects + (-distinct + (cons (abbreviate-file-name project-root) + projectile-known-projects))))) + +(defun projectile-load-known-projects () + "Load saved projects from `projectile-known-projects-file'. +Also set `projectile-known-projects'." + (setq projectile-known-projects + (projectile-unserialize projectile-known-projects-file))) + +;; load the known projects +(projectile-load-known-projects) + +(defun projectile-save-known-projects () + "Save PROJECTILE-KNOWN-PROJECTS to PROJECTILE-KNOWN-PROJECTS-FILE." + (projectile-serialize projectile-known-projects projectile-known-projects-file)) + +(define-ibuffer-filter projectile-files + "Show Ibuffer with all buffers in the current project." + (:reader (read-directory-name "Project root: " (ignore-errors (projectile-project-root))) + :description nil) + (with-current-buffer buf + (equal (file-name-as-directory (expand-file-name qualifier)) + (ignore-errors (projectile-project-root))))) + +(defun projectile-ibuffer-by-project (project-root) + "Open an IBuffer window showing all buffers in PROJECT-ROOT." + (let ((project-name (file-name-nondirectory (directory-file-name project-root)))) + (ibuffer nil (format "*%s Buffers*" project-name) + (list (cons 'projectile-files project-root))))) + +(defun projectile-ibuffer (prefix) + "Open an IBuffer window showing all buffers in the current project. + +Let user choose another project when PREFIX is supplied." + (interactive "p") + (let ((project-root (if (= prefix 4) + (projectile-completing-read + "Project name: " + (projectile-relevant-known-projects)) + (projectile-project-root)))) + + (projectile-ibuffer-by-project project-root))) + +;;;; projectile-commander + +(defconst projectile-commander-help-buffer "*Commander Help*") + +(defvar projectile-commander-methods nil + "List of file-selection methods for the `projectile-commander' command. +Each element is a list (KEY DESCRIPTION FUNCTION). +DESCRIPTION is a one-line description of what the key selects.") + +;;;###autoload +(defun projectile-commander () + "Execute a Projectile command with a single letter. +The user is prompted for a single character indicating the action to invoke. +The `?' character describes then +available actions. + +See `def-projectile-commander-method' for defining new methods." + (interactive) + (message "Commander [%s]: " + (apply #'string (mapcar #'car projectile-commander-methods))) + (let* ((ch (save-window-excursion + (select-window (minibuffer-window)) + (read-char))) + (method (cl-find ch projectile-commander-methods :key #'car))) + (cond (method + (funcall (cl-caddr method))) + (t + (message "No method for character: ?\\%c" ch) + (ding) + (sleep-for 1) + (discard-input) + (projectile-commander))))) + +(defmacro def-projectile-commander-method (key description &rest body) + "Define a new `projectile-commander' method. + +KEY is the key the user will enter to choose this method. + +DESCRIPTION is a one-line sentence describing how the method. + +BODY is a series of forms which are evaluated when the find +is chosen." + (let ((method `(lambda () + ,@body))) + `(setq projectile-commander-methods + (cl-sort (cons (list ,key ,description ,method) + (cl-remove ,key projectile-commander-methods :key #'car)) + #'< :key #'car)))) + +(def-projectile-commander-method ?? "Commander help buffer." + (ignore-errors (kill-buffer projectile-commander-help-buffer)) + (with-current-buffer (get-buffer-create projectile-commander-help-buffer) + (insert "Projectile Commander Methods:\n\n") + (loop for (key line nil) in projectile-commander-methods + do (insert (format "%c:\t%s\n" key line))) + (goto-char (point-min)) + (help-mode) + (display-buffer (current-buffer) t)) + (projectile-commander)) + +(def-projectile-commander-method ?a + "Run ack on project." + (call-interactively 'projectile-ack)) + +(def-projectile-commander-method ?A + "Find ag on project." + (call-interactively 'projectile-ag)) + +(def-projectile-commander-method ?f + "Find file in project." + (projectile-find-file)) + +(def-projectile-commander-method ?T + "Find test file in project." + (projectile-find-test-file)) + +(def-projectile-commander-method ?b + "Switch to project buffer." + (projectile-switch-to-buffer)) + +(def-projectile-commander-method ?d + "Find directory in project." + (projectile-find-dir)) + +(def-projectile-commander-method ?D + "Open project root in dired." + (projectile-dired)) + +(def-projectile-commander-method ?v + "Open project root in vc-dir or magit." + (projectile-vc)) + +(def-projectile-commander-method ?R + "Regenerate the project's [e|g]tags." + (projectile-regenerate-tags)) + +(def-projectile-commander-method ?g + "Run grep on project." + (projectile-grep)) + +(def-projectile-commander-method ?s + "Switch project." + (projectile-switch-project)) + +(def-projectile-commander-method ?o + "Run multi-occur on project buffers." + (projectile-multi-occur)) + +(def-projectile-commander-method ?j + "Find tag in project." + (projectile-find-tag)) + +(def-projectile-commander-method ?k + "Kill all project buffers." + (projectile-kill-buffers)) + +(def-projectile-commander-method ?e + "Find recently visited file in project." + (projectile-recentf)) + +;;; Minor mode +(defvar projectile-command-map + (let ((map (make-sparse-keymap))) + (define-key map (kbd "4 b") 'projectile-switch-to-buffer-other-window) + (define-key map (kbd "4 C-o") 'projectile-display-buffer) + (define-key map (kbd "4 d") 'projectile-find-dir-other-window) + (define-key map (kbd "4 f") 'projectile-find-file-other-window) + (define-key map (kbd "4 t") 'projectile-find-implementation-or-test-other-window) + (define-key map (kbd "!") 'projectile-run-shell-command-in-root) + (define-key map (kbd "&") 'projectile-run-async-shell-command-in-root) + (define-key map (kbd "b") 'projectile-switch-to-buffer) + (define-key map (kbd "c") 'projectile-compile-project) + (define-key map (kbd "d") 'projectile-find-dir) + (define-key map (kbd "D") 'projectile-dired) + (define-key map (kbd "e") 'projectile-recentf) + (define-key map (kbd "f") 'projectile-find-file) + (define-key map (kbd "F") 'projectile-find-file-in-known-projects) + (define-key map (kbd "i") 'projectile-invalidate-cache) + (define-key map (kbd "I") 'projectile-ibuffer) + (define-key map (kbd "j") 'projectile-find-tag) + (define-key map (kbd "k") 'projectile-kill-buffers) + (define-key map (kbd "l") 'projectile-find-file-in-directory) + (define-key map (kbd "m") 'projectile-commander) + (define-key map (kbd "o") 'projectile-multi-occur) + (define-key map (kbd "p") 'projectile-switch-project) + (define-key map (kbd "P") 'projectile-test-project) + (define-key map (kbd "r") 'projectile-replace) + (define-key map (kbd "R") 'projectile-regenerate-tags) + (define-key map (kbd "s a") 'projectile-ack) + (define-key map (kbd "s g") 'projectile-grep) + (define-key map (kbd "s s") 'projectile-ag) + (define-key map (kbd "S") 'projectile-save-project-buffers) + (define-key map (kbd "t") 'projectile-toggle-between-implementation-and-test) + (define-key map (kbd "T") 'projectile-find-test-file) + (define-key map (kbd "v") 'projectile-vc) + (define-key map (kbd "z") 'projectile-cache-current-file) + (define-key map (kbd "ESC") 'projectile-project-buffers-other-buffer) + map) + "Keymap for Projectile commands after `projectile-keymap-prefix'") +(fset 'projectile-command-map projectile-command-map) + +(defvar projectile-mode-map + (let ((map (make-sparse-keymap))) + (define-key map projectile-keymap-prefix 'projectile-command-map) + map) + "Keymap for Projectile mode.") + +(easy-menu-change + '("Tools") "Projectile" + '(["Find file" projectile-find-file] + ["Find file in known projects" projectile-find-file-in-known-projects] + ["Find test file" projectile-find-test-file] + ["Find directory" projectile-find-dir] + ["Find file in directory" projectile-find-file-in-directory] + ["Switch to buffer" projectile-switch-to-buffer] + ["Jump between implementation file and test file" projectile-toggle-between-implementation-and-test] + ["Kill project buffers" projectile-kill-buffers] + ["Recent files" projectile-recentf] + "--" + ["Open project in dired" projectile-dired] + ["Switch to project" projectile-switch-project] + ["Find in project (grep)" projectile-grep] + ["Find in project (ack)" projectile-ack] + ["Replace in project" projectile-replace] + ["Multi-occur in project" projectile-multi-occur] + "--" + ["Cache current file" projectile-cache-current-file] + ["Invalidate cache" projectile-invalidate-cache] + ["Regenerate [e|g]tags" projectile-regenerate-tags] + "--" + ["Compile project" projectile-compile-project] + ["Test project" projectile-test-project] + "--" + ["About" projectile-version]) + "Search Files (Grep)...") + +(easy-menu-change '("Tools") "--" nil "Search Files (Grep)...") + +;;;###autoload +(defcustom projectile-mode-line + '(:eval (format " Projectile[%s]" (projectile-project-name))) + "Mode line ligher for Projectile. + +The value of this variable is a mode line template as in +`mode-line-format'. See Info Node `(elisp)Mode Line Format' for +details about mode line templates. + +Customize this variable to change how Projectile displays its +status in the mode line. The default value displays the project +name. Set this variable to nil to disable the mode line +entirely." + :group 'projectile + :type 'sexp + :risky t + :package-version '(projectile "0.12.0")) + +;;;###autoload +(define-minor-mode projectile-mode + "Minor mode to assist project management and navigation. + +When called interactively, toggle `projectile-mode'. With prefix +ARG, enable `projectile-mode' if ARG is positive, otherwise disable +it. + +When called from Lisp, enable `projectile-mode' if ARG is omitted, +nil or positive. If ARG is `toggle', toggle `projectile-mode'. +Otherwise behave as if called interactively. + +\\{projectile-mode-map}" + :lighter projectile-mode-line + :keymap projectile-mode-map + :group 'projectile + :require 'projectile + (cond + (projectile-mode + (add-hook 'find-file-hook 'projectile-cache-files-find-file-hook t t) + (add-hook 'find-file-hook 'projectile-cache-projects-find-file-hook t t) + (add-hook 'projectile-find-dir-hook 'projectile-cache-projects-find-file-hook) + (add-hook 'find-file-hook 'projectile-visit-project-tags-table t t) + (ad-activate 'compilation-find-file)) + (t + (remove-hook 'find-file-hook 'projectile-cache-files-find-file-hook t) + (remove-hook 'find-file-hook 'projectile-cache-projects-find-file-hook t) + (remove-hook 'find-file-hook 'projectile-visit-project-tags-table t) + (ad-deactivate 'compilation-find-file)))) + +;;;###autoload +(define-globalized-minor-mode projectile-global-mode + projectile-mode + projectile-on) + +(defun projectile-on () + "Enable Projectile minor mode." + (projectile-mode 1)) + +(defun projectile-off () + "Disable Projectile minor mode." + (projectile-mode -1)) + +(defun projectile-global-on () + "Enable Projectile global minor mode." + (projectile-global-mode +1)) + +(defun projectile-global-off () + "Disable Projectile global minor mode." + (projectile-global-mode -1)) + +(provide 'projectile) + +;; Local Variables: +;; indent-tabs-mode: nil +;; End: + +;;; projectile.el ends here diff --git a/elpa/projectile-20140808.941/projectile.elc b/elpa/projectile-20140808.941/projectile.elc new file mode 100644 index 0000000000000000000000000000000000000000..16306da387f5521dacef99ae35729f038c30cf5f GIT binary patch literal 92679 zcmeIbi+@|kbtkTu6`T3QO}cHj&+Qcyg_JAMc!N}$ji{Hc#+Fo3j+>g^2n0bA76`xq zD2Z-=`?v4+d(N4;Gxq^dvXgB0^K(K0xOd)j=Dg3DUq1Nk-haPv;lkQ4fBDPg-sEID z91RYV{j=nxx4479dG+&N|L$b+a&t84_eRNNob2`%$h zaX6ctB!_4u`S^?ZU^f34ZG5~rIO+B0n+G2cM$_KM)7j*kL4ScVRaUEQ)wVXbTlL`i z=3pd^4adm?)=XZZr6Ia*v^JZYb$R!CxHwLFBaCRe7@iEj>n%`VzPTnZpC1qBI*QZz zV4fVDje94-85HE z=!8GI_Jb|f*>tVdzJRX{{={Dsf33TF745U$w#OZOcCW_|8)%|Yw}%Zh&_Lxz3xBB9 zK#fLMKby5*{79=d(M1y_n<&{t$!7chef-O^{Nq#9X`$g3O12um_#my<;#;fNYO!9+ z_2cSw!hTw4$(3){SiX%m!+zS0uzWjczb);zGwrvd_S-@G9cjOlX}=Yf?*#MiG&!CQ z*Q#LNopw0y4obLrbh@n9<-!N`y7h1#-JqYY^wZ7slPQl`y7s#rY2WtE?MGA|xZ@50 z#%kc#&IQ!L=UqH49Tnc+i)!7sS`RX{Z0}M2;e}uo@cWaf{-;*|QLcWl7O3?vQLW!t zt|$G*|CmGxeTD^>(e^^IW|zGWC8N)%()w{adcy?=toNJ*xMW z)!W<4Rs1?r@qa}Xe{U6E`oWTPr-+0G@eNYhkrcSJZkH)p~8U-W1lVbt}nNv%$Bg z!`T3Y3$(Pim@X2~*xvj&IhqZo$@Jw>bvQnpB*XpF!$Z(FepUx>7RllMIU$l;e9MP-6csLmM2iZRSI;7nIEDi>5 zuq4%!!QyywkQ|%YQAH{S;gV(+o#+<)8p`PqCiIH@kqrUPu( z_+avSUL7wmpsP4I{B(fJqdd_o-hH*@WlZ zn*{5XE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37d6627 --- /dev/null +++ b/elpa/rainbow-delimiters-1.3.21/rainbow-delimiters-autoloads.el @@ -0,0 +1,56 @@ +;;; rainbow-delimiters-autoloads.el --- automatically extracted autoloads +;; +;;; Code: + + +;;;### (autoloads (global-rainbow-delimiters-mode rainbow-delimiters-mode-enable +;;;;;; rainbow-delimiters-mode) "rainbow-delimiters" "rainbow-delimiters.el" +;;;;;; (21478 18819 0 0)) +;;; Generated autoloads from rainbow-delimiters.el + +(autoload 'rainbow-delimiters-mode "rainbow-delimiters" "\ +Highlight nested parentheses, brackets, and braces according to their depth. + +\(fn &optional ARG)" t nil) + +(autoload 'rainbow-delimiters-mode-enable "rainbow-delimiters" "\ + + +\(fn)" nil nil) + +(defvar global-rainbow-delimiters-mode nil "\ +Non-nil if Global-Rainbow-Delimiters mode is enabled. +See the command `global-rainbow-delimiters-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 `global-rainbow-delimiters-mode'.") + +(custom-autoload 'global-rainbow-delimiters-mode "rainbow-delimiters" nil) + +(autoload 'global-rainbow-delimiters-mode "rainbow-delimiters" "\ +Toggle Rainbow-Delimiters mode in all buffers. +With prefix ARG, enable Global-Rainbow-Delimiters mode if ARG is positive; +otherwise, disable it. If called from Lisp, enable the mode if +ARG is omitted or nil. + +Rainbow-Delimiters mode is enabled in all buffers where +`rainbow-delimiters-mode-enable' would do it. +See `rainbow-delimiters-mode' for more information on Rainbow-Delimiters mode. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads nil nil ("rainbow-delimiters-pkg.el") (21478 18819 +;;;;;; 281141 0)) + +;;;*** + +(provide 'rainbow-delimiters-autoloads) +;; Local Variables: +;; version-control: never +;; no-byte-compile: t +;; no-update-autoloads: t +;; coding: utf-8 +;; End: +;;; rainbow-delimiters-autoloads.el ends here diff --git a/elpa/rainbow-delimiters-1.3.21/rainbow-delimiters-pkg.el b/elpa/rainbow-delimiters-1.3.21/rainbow-delimiters-pkg.el new file mode 100644 index 000000000..d60bbd0cf --- /dev/null +++ b/elpa/rainbow-delimiters-1.3.21/rainbow-delimiters-pkg.el @@ -0,0 +1 @@ +(define-package "rainbow-delimiters" "1.3.21" "Highlight nested parens, brackets, braces a different color at each depth." (quote nil)) diff --git a/elpa/rainbow-delimiters-1.3.21/rainbow-delimiters-pkg.elc b/elpa/rainbow-delimiters-1.3.21/rainbow-delimiters-pkg.elc new file mode 100644 index 0000000000000000000000000000000000000000..800a7427cb9b48cc3e0db4e18eb507de3e0d2d98 GIT binary patch literal 678 zcmbtS!Ab-%4BhkmfY-;K6r7GT3cBt^T?7R^sUMJSGc#p7?a+1={d%*rB8c7$1VUf( zlDu?z`>;Bg&1S`Nxx^|AqjhYse#b!hN<5X1q;EplC>Jz21dk`mxZZZa0`LqbZm2gyw2hvHIirq+6Bm0H zwjQ@T9=uA4l|h;_DXS;!&E_8DWWF&A=?7&=NUE5?=ia9MOxwf>=H1g^HB8VcN9((E zENDy_WQ;8T-KSotX7P)|1mW-@LkFK_6>M``UdW3tub)=;_s~5>(!0Hmr}pFxQh+9p zHNyq^(d28H1g7XLN90}-o6~(?xyrw6H^6_bD2hYFt@T`vq&L(t=D%+^$9#W93GQsy wJMj$9DT|~dMfM`|T7=nf{)$9Lg0XGOg6{NmAwoVElkQ=7%)Oe!TX$4^0>Kc^p8x;= literal 0 HcmV?d00001 diff --git a/elpa/rainbow-delimiters-1.3.21/rainbow-delimiters.el b/elpa/rainbow-delimiters-1.3.21/rainbow-delimiters.el new file mode 100644 index 000000000..154092819 --- /dev/null +++ b/elpa/rainbow-delimiters-1.3.21/rainbow-delimiters.el @@ -0,0 +1,475 @@ +;;; rainbow-delimiters.el --- Highlight nested parens, brackets, braces a different color at each depth. + +;; Copyright (C) 2010-2011 Jeremy L. Rayman. +;; Author: Jeremy L. Rayman +;; Maintainer: Jeremy L. Rayman +;; Created: 2010-09-02 +;; Version: 1.3.21 +;; Keywords: faces, convenience, lisp, matching, tools, rainbow, rainbow parentheses, rainbow parens +;; EmacsWiki: http://www.emacswiki.org/emacs/RainbowDelimiters +;; Github: http://github.com/jlr/rainbow-delimiters +;; URL: http://www.emacswiki.org/emacs/download/rainbow-delimiters.el + +;; 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: + +;; rainbow-delimiters is a rainbow parentheses-like mode which highlights +;; parentheses, brackets, and braces according to their depth. Each +;; successive level is highlighted in a different color. This makes it easy +;; to spot matching delimiters, orient yourself in the code, and tell which +;; statements are at a given level. +;; +;; Great care has been taken to make this mode FAST. You should see no +;; discernible change in scrolling or editing speed while using it, +;; even in delimiter-rich languages like Clojure, Lisp, and Scheme. +;; +;; Default colors are subtle, with the philosophy that syntax highlighting +;; shouldn't being visually intrusive. Color schemes are always a matter +;; of taste. If you take the time to design a new color scheme, +;; please share it (even a simple list of colors works) on the EmacsWiki +;; page or via github. +;; EmacsWiki: http://www.emacswiki.org/emacs/RainbowDelimiters +;; Github: http://github.com/jlr/rainbow-delimiters + + +;;; Installation: + +;; 1. Place rainbow-delimiters.el on your emacs load-path. +;; +;; 2. Compile the file (necessary for speed): +;; M-x byte-compile-file +;; +;; 3. Add the following to your dot-emacs/init file: +;; (require 'rainbow-delimiters) +;; +;; 4. Activate the mode in your init file. +;; You can choose to enable it only in certain modes, or Emacs-wide: +;; +;; - To enable it only in specific modes, add lines like the following: +;; (add-hook 'clojure-mode-hook 'rainbow-delimiters-mode) +;; +;; - To activate the mode globally, add to your init file: +;; (global-rainbow-delimiters-mode) +;; +;; - To temporarily activate rainbow-delimiters mode in an open buffer: +;; M-x rainbow-delimiters-mode +;; +;; - To toggle global-rainbow-delimiters-mode: +;; M-x global-rainbow-delimiters-mode + +;;; Customization: + +;; To customize various options, including the color scheme: +;; M-x customize-group rainbow-delimiters +;; +;; color-theme.el users: +;; If you use the color-theme package, you can specify custom colors +;; by adding the appropriate faces to your theme. +;; - Faces take the form of: +;; 'rainbow-delimiters-depth-#-face' with # being the depth. +;; Depth begins at 1, the outermost color. +;; Faces exist for depths 1-9. +;; - The unmatched delimiter face (normally colored red) is: +;; 'rainbow-delimiters-unmatched-face' + + +;;; Change Log: + +;; 1.0 - Initial release. +;; 1.1 - Stop tracking each delimiter's depth independently. +;; This had lead to confusing results when viewing clojure +;; code. Instead, just color based on current nesting inside +;; all delimiters combined. +;; - Added 'all-delimiters' faces to apply a color scheme to +;; all delimiters at once. Other faces inherit from this group. +;; 1.1.1 - Change color scheme to a lighter, more subtle style. +;; 1.1.2: (2011-03-25) +;; - Add an unmatched-delimiter face and correct problem with +;; coloring of text following unmatched closing delims. +;; 1.2: (2011-03-28) +;; - Unify delimiter faces: all delimiter types now use the same depth +;; faces, of form 'rainbow-delimiters-depth-#-face'. +;; 1.2.1: (2011-03-29) +;; - Conform to ELPA conventions. +;; 1.3: (2011-05-24) +;; - Add separate color schemes for light and dark background modes. +;; - Checkboxes to enable/disable highlighting for each delimiter type. +;; - Improvements to Customize interface. +;; - Infinite depth support by cycling through defined faces repeatedly. +;; - Documentation changes. +;; 1.3.1 (2011-05-25) +;; - Light color theme appears entirely grey on SRGB monitors. Revert to +;; old color theme until a nicer light background theme can be added. +;; - Correct typo in the installation step for users of dark backgrounds. +;; 1.3.2 (2011-10-14) +;; - Add 'global-rainbow-delimiters-mode'. +;; - Respect syntax of current buffer major-mode so delimiters +;; highlight correctly in non-lisp languages. + +;;; TODO: + +;; - Add support for independent depth tracking of each delimiter type +;; for users of C-like languages. +;; - Python style - increase depth with each new indentation. +;; - Add support for nested tags (XML, HTML) +;; - Set up proper example color-theme.el themes for rainbow-delimiters mode. +;; - Intelligent support for other languages: Ruby, LaTeX tags, et al. + +;;; Issues: + +;; - Rainbow-delimiters mode does not appear to change the color of +;; delimiters when Org-mode is also enabled. + + +;;; Code: + +(eval-when-compile (require 'cl)) + + +;; Note: some of the functions in this file have been inlined for speed. +;; Inlining functions can cause problems with debugging. To debug these +;; functions more easily, change defsubst -> defun. +;; http://www.gnu.org/s/emacs/manual/html_node/elisp/Compilation-Tips.html + +;;; Customize interface: + +(defgroup rainbow-delimiters nil + "Highlight nested parentheses, brackets, and braces according to their depth." + :prefix "rainbow-delimiters-" + :link '(url-link :tag "Website for rainbow-delimiters (EmacsWiki)" + "http://www.emacswiki.org/emacs/RainbowDelimiters") + :group 'applications) + +(defgroup rainbow-delimiters-faces nil + "Faces for successively nested pairs of delimiters. + +When depth exceeds innermost defined face, colors cycle back through." + :tag "Color Scheme" + :group 'rainbow-delimiters + :link '(custom-group-link "rainbow-delimiters") + :link '(custom-group-link :tag "Toggle Delimiters" "rainbow-delimiters-toggle-delimiter-highlighting") + :prefix 'rainbow-delimiters-faces-) + +;; Choose which delimiters you want to highlight in your preferred language: + +(defgroup rainbow-delimiters-toggle-delimiter-highlighting nil + "Choose which delimiters to highlight." + :tag "Toggle Delimiters" + :group 'rainbow-delimiters + :link '(custom-group-link "rainbow-delimiters") + :link '(custom-group-link :tag "Color Scheme" "rainbow-delimiters-faces")) + +(defcustom rainbow-delimiters-highlight-parens-p t + "Enable highlighting of nested parentheses -- (). + +Non-nil (default) enables highlighting of parentheses. +Nil disables parentheses highlighting." + :tag "Highlight Parentheses?" + :type 'boolean + :group 'rainbow-delimiters-toggle-delimiter-highlighting) + +(defcustom rainbow-delimiters-highlight-brackets-p t + "Enable highlighting of nested brackets -- []. + +Non-nil (default) enables highlighting of brackets. +Nil disables bracket highlighting." + :tag "Highlight Brackets?" + :type 'boolean + :group 'rainbow-delimiters-toggle-delimiter-highlighting) + +(defcustom rainbow-delimiters-highlight-braces-p t + "Enable highlighting of nested braces -- {}. + +Non-nil (default) enables highlighting of braces. +Nil disables brace highlighting." + :tag "Highlight Braces?" + :type 'boolean + :group 'rainbow-delimiters-toggle-delimiter-highlighting) + + +;;; Faces: + +;; Unmatched delimiter face: +(defface rainbow-delimiters-unmatched-face + '((((background light)) (:foreground "#88090B")) + (((background dark)) (:foreground "#88090B"))) + "Face to highlight unmatched closing delimiters in." + :group 'rainbow-delimiters-faces) + +;; Faces for highlighting delimiters by nested level: +(defface rainbow-delimiters-depth-1-face + '((((background light)) (:foreground "grey55")) + (((background dark)) (:foreground "grey55"))) + "Nested delimiters face, depth 1 - outermost set." + :tag "Rainbow Delimiters Depth 1 Face -- OUTERMOST" + :group 'rainbow-delimiters-faces) + +(defface rainbow-delimiters-depth-2-face + '((((background light)) (:foreground "#93a8c6")) + (((background dark)) (:foreground "#93a8c6"))) + "Nested delimiters face, depth 2." + :group 'rainbow-delimiters-faces) + +(defface rainbow-delimiters-depth-3-face + '((((background light)) (:foreground "#b0b1a3")) + (((background dark)) (:foreground "#b0b1a3"))) + "Nested delimiters face, depth 3." + :group 'rainbow-delimiters-faces) + +(defface rainbow-delimiters-depth-4-face + '((((background light)) (:foreground "#97b098")) + (((background dark)) (:foreground "#97b098"))) + "Nested delimiters face, depth 4." + :group 'rainbow-delimiters-faces) + +(defface rainbow-delimiters-depth-5-face + '((((background light)) (:foreground "#aebed8")) + (((background dark)) (:foreground "#aebed8"))) + "Nested delimiters face, depth 5." + :group 'rainbow-delimiters-faces) + +(defface rainbow-delimiters-depth-6-face + '((((background light)) (:foreground "#b0b0b3")) + (((background dark)) (:foreground "#b0b0b3"))) + "Nested delimiters face, depth 6." + :group 'rainbow-delimiters-faces) + +(defface rainbow-delimiters-depth-7-face + '((((background light)) (:foreground "#90a890")) + (((background dark)) (:foreground "#90a890"))) + "Nested delimiters face, depth 7." + :group 'rainbow-delimiters-faces) + +(defface rainbow-delimiters-depth-8-face + '((((background light)) (:foreground "#a2b6da")) + (((background dark)) (:foreground "#a2b6da"))) + "Nested delimiters face, depth 8." + :group 'rainbow-delimiters-faces) + +(defface rainbow-delimiters-depth-9-face + '((((background light)) (:foreground "#9cb6ad")) + (((background dark)) (:foreground "#9cb6ad"))) + "Nested delimiters face, depth 9." + :group 'rainbow-delimiters-faces) + +;;; Faces 10+: +;; NOTE: Currently unused. Additional faces for depths 9+ can be added on request. + +(defconst rainbow-delimiters-max-face-count 9 + "Number of faces defined for highlighting delimiter levels. + +Determines depth at which to cycle through faces again.") + +;;; Face utility functions + +(defsubst rainbow-delimiters-depth-face (depth) + "Return face-name for DEPTH as a string 'rainbow-delimiters-depth-DEPTH-face'. + +For example: 'rainbow-delimiters-depth-1-face'." + (concat "rainbow-delimiters-depth-" + (number-to-string + (or + ;; Our nesting depth has a face defined for it. + (and (< depth rainbow-delimiters-max-face-count) + depth) + ;; Deeper than # of defined faces; cycle back through to beginning. + (let ((cycled-depth (mod depth rainbow-delimiters-max-face-count))) + (if (/= cycled-depth 0) + ;; Return face # that corresponds to current nesting level. + (mod depth rainbow-delimiters-max-face-count) + ;; Special case: depth divides evenly into max, correct face # is max. + rainbow-delimiters-max-face-count)))) + "-face")) + + +;;; Nesting level + +(defvar rainbow-delimiters-all-delimiters-syntax-table nil + "Syntax table (inherited from buffer major-mode) which uses all delimiters. + +When rainbow-delimiters-minor-mode is first activated, it sets this variable and +the other rainbow-delimiters specific syntax tables based on the current +major-mode. The syntax table is constructed by the function +'rainbow-delimiters-make-syntax-table-all-delimiters'.") + +;; syntax-table: used with parse-partial-sexp for determining current depth. +(defun rainbow-delimiters-make-syntax-table-all-delimiters (syntax-table) + "Inherit SYNTAX-TABLE and add delimiters intended to be highlighted by mode." + (let ((table (copy-syntax-table syntax-table))) + (modify-syntax-entry ?\( "() " table) + (modify-syntax-entry ?\) ")( " table) + (modify-syntax-entry ?\[ "(]" table) + (modify-syntax-entry ?\] ")[" table) + (modify-syntax-entry ?\{ "(}" table) + (modify-syntax-entry ?\} "){" table) + table)) + +(defun rainbow-delimiters-depth (point) + "Return # of nested levels of parens, brackets, braces POINT is inside of." + (save-excursion + (beginning-of-defun) + (let ((depth + (with-syntax-table rainbow-delimiters-all-delimiters-syntax-table + (car (parse-partial-sexp (point) point))))) + (if (>= depth 0) + depth + 0)))) ; ignore negative depths created by unmatched closing parens. + + +;;; Text properties + +(defsubst rainbow-delimiters-propertize-delimiter (loc depth) + "Highlight a single delimiter at LOC according to DEPTH. + +LOC is the location of the character to add text properties to. +DEPTH is the nested depth at LOC, which determines the face to use. + +Sets text properties: +`font-lock-face' to the appropriate delimiter face. +`rear-nonsticky' to prevent color from bleeding into subsequent characters typed by the user." + (with-silent-modifications + (let ((delim-face (if (<= depth 0) + "rainbow-delimiters-unmatched-face" + (rainbow-delimiters-depth-face depth)))) + ;; (when (eq depth -1) (message "Unmatched delimiter at char %s." loc)) + (add-text-properties loc (1+ loc) + `(font-lock-face ,delim-face + rear-nonsticky t))))) + + +(defsubst rainbow-delimiters-unpropertize-delimiter (loc) + "Remove text properties set by rainbow-delimiters mode from char at LOC." + (with-silent-modifications + (remove-text-properties loc (1+ loc) + '(font-lock-face nil + rear-nonsticky nil)))) + + +(defun rainbow-delimiters-char-ineligible-p (loc) + "Return t if char at LOC should be skipped, e.g. if inside a comment. + +Returns t if char at loc meets one of the following conditions: +- Inside a string. +- Inside a comment. +- Is an escaped char, e.g. ?\)" + (let ((parse-state (save-excursion + (beginning-of-defun) + ;; (point) is at beg-of-defun; loc is the char location + (parse-partial-sexp (point) loc)))) + (or + (nth 3 parse-state) ; inside string? + (nth 4 parse-state) ; inside comment? + (and (eq (char-before loc) ?\\) ; escaped char, e.g. ?\) - not counted + (and (not (eq (char-before (1- loc)) ?\\)) ; special-case: ignore ?\\ + (eq (char-before (1- loc)) ?\?)))))) +;; NOTE: standard char read syntax '?)' is not tested for because emacs manual +;; states punctuation such as delimiters should _always_ use escaped '?\)' form. + + +(defsubst rainbow-delimiters-apply-color (delim depth loc) + "Apply color for DEPTH to DELIM at LOC following user settings. + +DELIM is a string specifying delimiter type. +DEPTH is the delimiter depth, or corresponding face # if colors are repeating. +LOC is location of character (delimiter) to be colorized." + (and + ;; Ensure user has enabled highlighting of this delimiter type. + (symbol-value (intern-soft + (concat "rainbow-delimiters-highlight-" delim "s-p"))) + (rainbow-delimiters-propertize-delimiter loc + depth))) + + +;;; JIT-Lock functionality + +;; Used to skip delimiter-by-delimiter `rainbow-delimiters-propertize-region'. +(defvar rainbow-delimiters-delim-regex "\\(\(\\|\)\\|\\[\\|\\]\\|\{\\|\}\\)" + "Regex matching all opening and closing delimiters the mode highlights.") + +;; main function called by jit-lock: +(defun rainbow-delimiters-propertize-region (start end) + "Highlight delimiters in region between START and END. + +Used by jit-lock for dynamic highlighting." + (save-excursion + (goto-char start) + ;; START can be anywhere in buffer; determine the nesting depth at START loc + (let ((depth (rainbow-delimiters-depth start))) + (while (and (< (point) end) + (re-search-forward rainbow-delimiters-delim-regex end t)) + (backward-char) ; re-search-forward places point after delim; go back. + (unless (rainbow-delimiters-char-ineligible-p (point)) + (let ((delim (char-after (point)))) + (cond ((eq ?\( delim) ; ( + (setq depth (1+ depth)) + (rainbow-delimiters-apply-color "paren" depth (point))) + ((eq ?\) delim) ; ) + (rainbow-delimiters-apply-color "paren" depth (point)) + (setq depth (or (and (<= depth 0) 0) ; unmatched paren + (1- depth)))) + ((eq ?\[ delim) ; [ + (setq depth (1+ depth)) + (rainbow-delimiters-apply-color "bracket" depth (point))) + ((eq ?\] delim) ; ] + (rainbow-delimiters-apply-color "bracket" depth (point)) + (setq depth (or (and (<= depth 0) 0) ; unmatched bracket + (1- depth)))) + ((eq ?\{ delim) ; { + (setq depth (1+ depth)) + (rainbow-delimiters-apply-color "brace" depth (point))) + ((eq ?\} delim) ; } + (rainbow-delimiters-apply-color "brace" depth (point)) + (setq depth (or (and (<= depth 0) 0) ; unmatched brace + (1- depth))))))) + ;; move past delimiter so re-search-forward doesn't pick it up again + (forward-char))))) + +(defun rainbow-delimiters-unpropertize-region (start end) + "Remove highlighting from delimiters between START and END." + (save-excursion + (goto-char start) + (while (and (< (point) end) + (re-search-forward rainbow-delimiters-delim-regex end t)) + ;; re-search-forward places point 1 further than the delim matched: + (rainbow-delimiters-unpropertize-delimiter (1- (point)))))) + + +;;; Minor mode: + +;;;###autoload +(define-minor-mode rainbow-delimiters-mode + "Highlight nested parentheses, brackets, and braces according to their depth." + nil "" nil ; No modeline lighter - it's already obvious when the mode is on. + (if (not rainbow-delimiters-mode) + (progn + (jit-lock-unregister 'rainbow-delimiters-propertize-region) + (rainbow-delimiters-unpropertize-region (point-min) (point-max))) + (jit-lock-register 'rainbow-delimiters-propertize-region t) + ;; Create necessary syntax tables inheriting from current major-mode. + (set (make-local-variable 'rainbow-delimiters-all-delimiters-syntax-table) + (rainbow-delimiters-make-syntax-table-all-delimiters (syntax-table))))) + +;;;###autoload +(defun rainbow-delimiters-mode-enable () + (rainbow-delimiters-mode 1)) + +;;;###autoload +(define-globalized-minor-mode global-rainbow-delimiters-mode + rainbow-delimiters-mode rainbow-delimiters-mode-enable) + +(provide 'rainbow-delimiters) + +;;; rainbow-delimiters.el ends here. diff --git a/elpa/rainbow-delimiters-1.3.21/rainbow-delimiters.elc b/elpa/rainbow-delimiters-1.3.21/rainbow-delimiters.elc new file mode 100644 index 0000000000000000000000000000000000000000..0b73c838403869f6e1e2185bac1541e99ff6f4e4 GIT binary patch literal 18304 zcmd^H`*YhylBVseTS=~HchAY@v59s}B^H?&G+rb~`BL#SiMJdlv6OSROkW8kK?*Ap zU;xmvlFk2qU-t|^Py|Uac7C`!S5X9knMTh{chA?4@$H9?@4s6rm9}o*zAf&Dqp?5q zdZKeCMs9KkpIH0G?cNK+liD!sxEsC zZv7B@QG5$DZq>Yz+l_0zTi$T&-ilm5=!BIVO^tC4L1lrw$`;Q)p?y(!WT^iF( ze!Uy?L>!8)8;Fi4hM_z25;d4ucy2WGy+|a-XlPpUy;zag`bP}B?!T?AtxD%C@w9H( z^F+CA={i0JJ|;dEJ~lped>Z&TZOg!O!?>~8HtC958`KgX1Fa3THqe@%5f$_@s3(1+ zH&HY78*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H~^h-Fv}dPXMKWRhfi8F3*t zWbj5sKPBi&TVr^Z!?`yiV1WP*;u7>SIhc#nxIAqDU-pH-*9uX90OOEMFQi=7$`wFKEV~+cI+A`T?43!H zILe75R#a=muV3*79LPcmTB^tM)GtJ1bbO5P3;Fi)osyiaoTA--!HlZmakwc%c`Nw6 z2tO(2TR|$k0QAfDFU)v!qPa1AZvfpC5Pr3MfBsFlux_;KzY{KmN=>$un`{cN zw)Q^{)Y;+@&|L7t1AjjWj^Jg6&k% z*04J{UC)*LFVZQw3bK502$TR9rZ}3L!{{hj$xbq?;D3JF_poFPr07sE)$#2uCo$tY zEN=>TPeLsO_LV>F%C$rP8V90#H>XyJ9}mY0q}XH!^(%jvwR!xJb9svkr** k=p6N-7!94*S;1(R=HR?oFYiN@<1gv3!2DJRm%qC8KdknlL;wH) literal 0 HcmV?d00001 diff --git a/elpa/rainbow-delimiters-20140713.1131/rainbow-delimiters-autoloads.el b/elpa/rainbow-delimiters-20140713.1131/rainbow-delimiters-autoloads.el new file mode 100644 index 000000000..4126cd786 --- /dev/null +++ b/elpa/rainbow-delimiters-20140713.1131/rainbow-delimiters-autoloads.el @@ -0,0 +1,61 @@ +;;; rainbow-delimiters-autoloads.el --- automatically extracted autoloads +;; +;;; Code: + + +;;;### (autoloads (global-rainbow-delimiters-mode rainbow-delimiters-mode-disable +;;;;;; rainbow-delimiters-mode-enable rainbow-delimiters-mode) "rainbow-delimiters" +;;;;;; "rainbow-delimiters.el" (21478 16650 0 0)) +;;; Generated autoloads from rainbow-delimiters.el + +(autoload 'rainbow-delimiters-mode "rainbow-delimiters" "\ +Highlight nested parentheses, brackets, and braces according to their depth. + +\(fn &optional ARG)" t nil) + +(autoload 'rainbow-delimiters-mode-enable "rainbow-delimiters" "\ +Enable `rainbow-delimiters-mode'. + +\(fn)" nil nil) + +(autoload 'rainbow-delimiters-mode-disable "rainbow-delimiters" "\ +Disable `rainbow-delimiters-mode'. + +\(fn)" nil nil) + +(defvar global-rainbow-delimiters-mode nil "\ +Non-nil if Global-Rainbow-Delimiters mode is enabled. +See the command `global-rainbow-delimiters-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 `global-rainbow-delimiters-mode'.") + +(custom-autoload 'global-rainbow-delimiters-mode "rainbow-delimiters" nil) + +(autoload 'global-rainbow-delimiters-mode "rainbow-delimiters" "\ +Toggle Rainbow-Delimiters mode in all buffers. +With prefix ARG, enable Global-Rainbow-Delimiters mode if ARG is positive; +otherwise, disable it. If called from Lisp, enable the mode if +ARG is omitted or nil. + +Rainbow-Delimiters mode is enabled in all buffers where +`rainbow-delimiters-mode-enable' would do it. +See `rainbow-delimiters-mode' for more information on Rainbow-Delimiters mode. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads nil nil ("rainbow-delimiters-pkg.el") (21478 16650 +;;;;;; 989712 0)) + +;;;*** + +(provide 'rainbow-delimiters-autoloads) +;; Local Variables: +;; version-control: never +;; no-byte-compile: t +;; no-update-autoloads: t +;; coding: utf-8 +;; End: +;;; rainbow-delimiters-autoloads.el ends here diff --git a/elpa/rainbow-delimiters-20140713.1131/rainbow-delimiters-pkg.el b/elpa/rainbow-delimiters-20140713.1131/rainbow-delimiters-pkg.el new file mode 100644 index 000000000..1588458e9 --- /dev/null +++ b/elpa/rainbow-delimiters-20140713.1131/rainbow-delimiters-pkg.el @@ -0,0 +1 @@ +(define-package "rainbow-delimiters" "20140713.1131" "Highlight nested parens, brackets, braces a different color at each depth." (quote nil)) diff --git a/elpa/rainbow-delimiters-20140713.1131/rainbow-delimiters-pkg.elc b/elpa/rainbow-delimiters-20140713.1131/rainbow-delimiters-pkg.elc new file mode 100644 index 0000000000000000000000000000000000000000..b47d683367bccb504782e2575ad906e9281adf61 GIT binary patch literal 692 zcmbtS!A|2a5bZfX!1bvokciW?T|wyuwnADYII;TyQ+twFb?nG?7s1!>Bt=Mwy)n{A zwrA$OnK$0vKkm+Evstm-Zm|pfU>zImU(r*(6;I_8>7OASlna_1g2yvu+#OqBgZk=b zy}0?Y!E#ZrCx|A79*uyY`ja@ON-!$LJ?W%O#crS~lJ)!WQW|!)w^@?Pv3zk=uT)*H z>i;DShgPwh7_7(r2#3E?X{Dd#T1nv)d$G9#Icamqg8fEW5|S#W;P1|+Q)|b>3Fg&P zZ#7KNDM#zubScr8GRPRw;De{$sO9Dhh6#e9!}WBzrO zbId<2Q|`ZP+d1(J&nb(t14Z_t_FnWkaDG3DoCIT=h9x@6>OzEkH74D`@Q^z-hqvyc F_y +;; Maintainer: Jeremy Rayman +;; Created: 2010-09-02 +;; Version: 20140713.1131 +;; X-Original-Version: 1.3.7 +;; Keywords: faces, convenience, lisp, matching, tools, rainbow, rainbow parentheses, rainbow parens +;; EmacsWiki: http://www.emacswiki.org/emacs/RainbowDelimiters +;; Github: http://github.com/jlr/rainbow-delimiters +;; URL: http://github.com/jlr/rainbow-delimiters/raw/master/rainbow-delimiters.el + +;; 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: +;; +;; Rainbow-delimiters is a “rainbow parentheses”-like mode which highlights +;; parentheses, brackets, and braces according to their depth. Each +;; successive level is highlighted in a different color. This makes it easy +;; to spot matching delimiters, orient yourself in the code, and tell which +;; statements are at a given level. +;; +;; Great care has been taken to make this mode FAST. You shouldn't see +;; any discernible change in scrolling or editing speed while using it, +;; even in delimiter-rich languages like Clojure, Lisp, and Scheme. +;; +;; Default colors are subtle, with the philosophy that syntax highlighting +;; shouldn't be visually intrusive. Color schemes are always a matter of +;; taste. If you take the time to design a new color scheme, please share +;; (even a simple list of colors works) on the EmacsWiki page or via github. +;; EmacsWiki: http://www.emacswiki.org/emacs/RainbowDelimiters +;; Github: http://github.com/jlr/rainbow-delimiters + + +;;; Installation: + +;; 1. Place rainbow-delimiters.el on your emacs load-path. +;; +;; 2. Compile the file (necessary for speed): +;; M-x byte-compile-file +;; +;; 3. Add the following to your dot-emacs/init file: +;; (require 'rainbow-delimiters) +;; +;; 4. Activate the mode in your init file. +;; You can choose to enable it only in certain modes, or Emacs-wide: +;; +;; - To enable it only in certain modes, add lines like the following: +;; (add-hook 'clojure-mode-hook 'rainbow-delimiters-mode) +;; +;; - To enable it in all programming-related emacs modes (Emacs 24+): +;; (add-hook 'prog-mode-hook 'rainbow-delimiters-mode) +;; +;; - To activate the mode globally, add to your init file: +;; (global-rainbow-delimiters-mode) +;; +;; - To temporarily activate rainbow-delimiters mode in an open buffer: +;; M-x rainbow-delimiters-mode +;; +;; - To toggle global-rainbow-delimiters-mode: +;; M-x global-rainbow-delimiters-mode + +;;; Customization: + +;; To customize various options, including the color scheme: +;; M-x customize-group rainbow-delimiters +;; +;; deftheme / color-theme.el users: +;; You can specify custom colors by adding the appropriate faces to your theme. +;; - Faces take the form of: +;; 'rainbow-delimiters-depth-#-face' with # being the depth. +;; Depth begins at 1, the outermost color. +;; Faces exist for depths 1-9. +;; - The unmatched delimiter face (normally colored red) is: +;; 'rainbow-delimiters-unmatched-face' + + +;;; Change Log: + +;; 1.0 - Initial release. +;; 1.1 - Stop tracking each delimiter's depth independently. +;; This had lead to confusing results when viewing clojure +;; code. Instead, just color based on current nesting inside +;; all delimiters combined. +;; - Added 'all-delimiters' faces to apply a color scheme to +;; all delimiters at once. Other faces inherit from this group. +;; 1.1.1 - Change color scheme to a lighter, more subtle style. +;; 1.1.2: (2011-03-25) +;; - Add an unmatched-delimiter face and correct problem with +;; coloring of text following unmatched closing delims. +;; 1.2: (2011-03-28) +;; - Unify delimiter faces: all delimiter types now use the same depth +;; faces, of form 'rainbow-delimiters-depth-#-face'. +;; 1.2.1: (2011-03-29) +;; - Conform to ELPA conventions. +;; 1.3: (2011-05-24) +;; - Add separate color schemes for light and dark background modes. +;; - Checkboxes to enable/disable highlighting for each delimiter type. +;; - Improvements to Customize interface. +;; - Infinite depth support by cycling through defined faces repeatedly. +;; - Documentation changes. +;; 1.3.1 (2011-05-25) +;; - Light color theme appears entirely grey on SRGB monitors. Revert to +;; old color theme until a nicer light background theme can be added. +;; - Correct typo in the installation step for users of dark backgrounds. +;; 1.3.2 (2011-10-14) +;; - Add 'global-rainbow-delimiters-mode'. +;; - Respect syntax of current buffer major-mode so delimiters +;; highlight correctly in non-lisp languages. +;; 1.3.3 (2011-11-25) +;; - Backwards compatibility with Emacs versions prior to 23.2. +;; Defines "with-silent-modifications" if undefined. +;; 1.3.4 (2012-04-27) +;; - Further optimize highlighting speed. Benchmarks show 2x improvement. +;; - Color scheme for light backgrounds. +;; - Eliminate bottleneck seen in certain large files. +;; A large file which revealed this bottleneck now highlights ~40x faster. +;; - Correct broken/incorrect highlighting reported in certain languages. + +;;; TODO: + +;; - Add support for independent depth tracking of each delimiter type +;; for users of C-like languages. +;; - Python style - increase depth with each new indentation. +;; - Add support for nested tags (XML, HTML) +;; - Set up proper example defthemes for rainbow-delimiters faces. +;; - Intelligent support for other languages: Ruby, LaTeX tags, et al. + +;;; Issues: + +;; - Rainbow-delimiters mode does not appear to change the color of +;; delimiters when Org-mode is also enabled. + + +;;; Code: + +;; Note: some of the functions in this file have been inlined for speed. +;; Inlining functions can cause problems with debugging. To debug these +;; functions more easily, change defsubst -> defun. +;; http://www.gnu.org/s/emacs/manual/html_node/elisp/Compilation-Tips.html + +;;; Customize interface: + +(defgroup rainbow-delimiters nil + "Highlight nested parentheses, brackets, and braces according to their depth." + :prefix "rainbow-delimiters-" + :link '(url-link :tag "Website for rainbow-delimiters (EmacsWiki)" + "http://www.emacswiki.org/emacs/RainbowDelimiters") + :group 'applications) + +(defgroup rainbow-delimiters-faces nil + "Faces for successively nested pairs of delimiters. + +When depth exceeds innermost defined face, colors cycle back through." + :tag "Color Scheme" + :group 'rainbow-delimiters + :link '(custom-group-link "rainbow-delimiters") + :link '(custom-group-link :tag "Toggle Delimiters" "rainbow-delimiters-toggle-delimiter-highlighting") + :prefix "rainbow-delimiters-") + +;; Choose which delimiters you want to highlight in your preferred language: + +(defgroup rainbow-delimiters-toggle-delimiter-highlighting nil + "Choose which delimiters to highlight." + :tag "Toggle Delimiters" + :group 'rainbow-delimiters + :link '(custom-group-link "rainbow-delimiters") + :link '(custom-group-link :tag "Color Scheme" "rainbow-delimiters-faces")) + +(defcustom rainbow-delimiters-highlight-parens-p t + "Enable highlighting of nested parentheses -- (). + +Non-nil (default) enables highlighting of parentheses. +Nil disables parentheses highlighting." + :tag "Highlight Parentheses?" + :type 'boolean + :group 'rainbow-delimiters-toggle-delimiter-highlighting) + +(defcustom rainbow-delimiters-highlight-brackets-p t + "Enable highlighting of nested brackets -- []. + +Non-nil (default) enables highlighting of brackets. +Nil disables bracket highlighting." + :tag "Highlight Brackets?" + :type 'boolean + :group 'rainbow-delimiters-toggle-delimiter-highlighting) + +(defcustom rainbow-delimiters-highlight-braces-p t + "Enable highlighting of nested braces -- {}. + +Non-nil (default) enables highlighting of braces. +Nil disables brace highlighting." + :tag "Highlight Braces?" + :type 'boolean + :group 'rainbow-delimiters-toggle-delimiter-highlighting) + + +;;; Faces: + +;; Unmatched delimiter face: +(defface rainbow-delimiters-unmatched-face + '((((background light)) (:foreground "#88090B")) + (((background dark)) (:foreground "#88090B"))) + "Face to highlight unmatched closing delimiters in." + :group 'rainbow-delimiters-faces) + +;; Mismatched delimiter face: +(defface rainbow-delimiters-mismatched-face + '((t :inherit rainbow-delimiters-unmatched-face)) + "Face to highlight mismatched closing delimiters in." + :group 'rainbow-delimiters-faces) + +;; Faces for highlighting delimiters by nested level: +(defface rainbow-delimiters-depth-1-face + '((((background light)) (:foreground "#707183")) + (((background dark)) (:foreground "grey55"))) + "Nested delimiters face, depth 1 - outermost set." + :tag "Rainbow Delimiters Depth 1 Face -- OUTERMOST" + :group 'rainbow-delimiters-faces) + +(defface rainbow-delimiters-depth-2-face + '((((background light)) (:foreground "#7388d6")) + (((background dark)) (:foreground "#93a8c6"))) + "Nested delimiters face, depth 2." + :group 'rainbow-delimiters-faces) + +(defface rainbow-delimiters-depth-3-face + '((((background light)) (:foreground "#909183")) + (((background dark)) (:foreground "#b0b1a3"))) + "Nested delimiters face, depth 3." + :group 'rainbow-delimiters-faces) + +(defface rainbow-delimiters-depth-4-face + '((((background light)) (:foreground "#709870")) + (((background dark)) (:foreground "#97b098"))) + "Nested delimiters face, depth 4." + :group 'rainbow-delimiters-faces) + +(defface rainbow-delimiters-depth-5-face + '((((background light)) (:foreground "#907373")) + (((background dark)) (:foreground "#aebed8"))) + "Nested delimiters face, depth 5." + :group 'rainbow-delimiters-faces) + +(defface rainbow-delimiters-depth-6-face + '((((background light)) (:foreground "#6276ba")) + (((background dark)) (:foreground "#b0b0b3"))) + "Nested delimiters face, depth 6." + :group 'rainbow-delimiters-faces) + +(defface rainbow-delimiters-depth-7-face + '((((background light)) (:foreground "#858580")) + (((background dark)) (:foreground "#90a890"))) + "Nested delimiters face, depth 7." + :group 'rainbow-delimiters-faces) + +(defface rainbow-delimiters-depth-8-face + '((((background light)) (:foreground "#80a880")) + (((background dark)) (:foreground "#a2b6da"))) + "Nested delimiters face, depth 8." + :group 'rainbow-delimiters-faces) + +(defface rainbow-delimiters-depth-9-face + '((((background light)) (:foreground "#887070")) + (((background dark)) (:foreground "#9cb6ad"))) + "Nested delimiters face, depth 9." + :group 'rainbow-delimiters-faces) + +;;; Faces 10+: +;; NOTE: Currently unused. Additional faces for depths 9+ can be added on request. + +(defconst rainbow-delimiters-max-face-count 9 + "Number of faces defined for highlighting delimiter levels. + +Determines depth at which to cycle through faces again.") + +(defcustom rainbow-delimiters-outermost-only-face-count 0 + "Number of faces to be used only for N outermost delimiter levels. + +This should be smaller than `rainbow-delimiters-max-face-count'." + :type 'integer + :group 'rainbow-delimiters-faces) + +;;; Face utility functions + +(defsubst rainbow-delimiters-depth-face (depth) + "Return face name for DEPTH as a symbol 'rainbow-delimiters-depth-DEPTH-face'. + +For example: `rainbow-delimiters-depth-1-face'." + (intern-soft + (concat "rainbow-delimiters-depth-" + (number-to-string + (or + ;; Our nesting depth has a face defined for it. + (and (<= depth rainbow-delimiters-max-face-count) + depth) + ;; Deeper than # of defined faces; cycle back through to + ;; `rainbow-delimiters-outermost-only-face-count' + 1. + ;; Return face # that corresponds to current nesting level. + (+ 1 rainbow-delimiters-outermost-only-face-count + (mod (- depth rainbow-delimiters-max-face-count 1) + (- rainbow-delimiters-max-face-count + rainbow-delimiters-outermost-only-face-count))))) + "-face"))) + +;;; Parse partial sexp cache + +;; If the block inside the delimiters is too big (where "too big" is +;; in some way related to `jit-lock-chunk-size'), `syntax-ppss' will +;; for some reason return wrong depth. Is it because we're misusing +;; it? Is it because it's buggy? Nobody knows. But users do notice it, +;; and have reported it as a bug. Hence this workaround: don't use +;; `syntax-ppss' at all, use the low-level primitive instead. However, +;; naively replacing `syntax-ppss' with `parse-partial-sexp' slows +;; down the delimiter highlighting noticeably in big files. Therefore, +;; we build a simple cache around it. This brings the speed to around +;; what it used to be, while fixing the bug. See issue #25. + +(defvar rainbow-delimiters-parse-partial-sexp-cache nil + "Cache of the last `parse-partial-sexp' call. + +It's a list of conses, where car is the position for which `parse-partial-sexp' +was called and cdr is the result of the call. +The list is ordered descending by car.") +(make-variable-buffer-local 'rainbow-delimiters-parse-partial-sexp-cache) + +(defconst rainbow-delimiters-parse-partial-sexp-cache-max-span 20000) + +(defun rainbow-delimiters-syntax-ppss-flush-cache (beg _end) + "Flush the `parse-partial-sexp' cache starting from position BEG." + (let ((it rainbow-delimiters-parse-partial-sexp-cache)) + (while (and it (>= (caar it) beg)) + (setq it (cdr it))) + (setq rainbow-delimiters-parse-partial-sexp-cache it))) + +(defsubst rainbow-delimiters-syntax-ppss-run (from to oldstate cache-nearest-after) + "Run `parse-partial-sexp' from FROM to TO starting with state OLDSTATE. + +CACHE-NEAREST-AFTER should be a list of cache entries starting at the first +entry after TO, or nil if there's no such entry. +Intermediate `parse-partial-sexp' results are added to the cache." + (if (= from to) + (parse-partial-sexp from to nil nil oldstate) + (while (< from to) + (let ((newpos (min to (+ from rainbow-delimiters-parse-partial-sexp-cache-max-span)))) + (let ((state (parse-partial-sexp from newpos nil nil oldstate))) + (if (/= newpos to) + (if cache-nearest-after + (push (cons newpos state) (cdr cache-nearest-after)) + (push (cons newpos state) rainbow-delimiters-parse-partial-sexp-cache))) + (setq oldstate state + from newpos)))) + oldstate)) + +(defsubst rainbow-delimiters-syntax-ppss (pos) + "Parse-Partial-Sexp State at POS, defaulting to point. + +The returned value is the same as that of `parse-partial-sexp' from +`point-min' to POS, except that positions 2 and 6 cannot be relied +upon. + +This is essentialy `syntax-ppss', only specific to rainbow-delimiters +to work around a bug." + (save-excursion + (let ((it rainbow-delimiters-parse-partial-sexp-cache) + (prev nil)) + (while (and it (>= (caar it) pos)) + (setq prev it) + (setq it (cdr it))) + (let* ((nearest-after (if (consp prev) prev nil)) + (nearest-before (if (consp it) (car it) it)) + (nearest-before-pos (if nearest-before (car nearest-before) (point-min))) + (nearest-before-data (if nearest-before (cdr nearest-before) nil))) + (rainbow-delimiters-syntax-ppss-run nearest-before-pos pos nearest-before-data nearest-after))))) + +;;; Nesting level + +(defvar rainbow-delimiters-syntax-table nil + "Syntax table (inherited from `major-mode''s) which uses all delimiters. + +When `rainbow-delimiters-mode' is first activated, it sets this variable and +the other rainbow-delimiters specific syntax tables based on the current +`major-mode'. +The syntax table is constructed by the function +`rainbow-delimiters-make-syntax-table'.") + +;; syntax-table: used with syntax-ppss for determining current depth. +(defun rainbow-delimiters-make-syntax-table (syntax-table) + "Inherit SYNTAX-TABLE and add delimiters intended to be highlighted by mode." + (let ((table (copy-syntax-table syntax-table))) + (modify-syntax-entry ?\( "() " table) + (modify-syntax-entry ?\) ")( " table) + (modify-syntax-entry ?\[ "(]" table) + (modify-syntax-entry ?\] ")[" table) + (modify-syntax-entry ?\{ "(}" table) + (modify-syntax-entry ?\} "){" table) + table)) + +(defsubst rainbow-delimiters-depth (loc) + "Return # of nested levels of parens, brackets, braces LOC is inside of." + (let ((depth (car (rainbow-delimiters-syntax-ppss loc)))) + (if (>= depth 0) + depth + 0))) ; ignore negative depths created by unmatched closing parens. + + +;;; Text properties + +;; Backwards compatibility: Emacs < v23.2 lack macro 'with-silent-modifications'. +(eval-and-compile + (unless (fboundp 'with-silent-modifications) + (defmacro with-silent-modifications (&rest body) + "Defined by rainbow-delimiters.el for backwards compatibility with Emacs < 23.2. + Execute BODY, pretending it does not modify the buffer. +If BODY performs real modifications to the buffer's text, other +than cosmetic ones, undo data may become corrupted. + +This macro will run BODY normally, but doesn't count its buffer +modifications as being buffer modifications. This affects things +like buffer-modified-p, checking whether the file is locked by +someone else, running buffer modification hooks, and other things +of that nature. + +Typically used around modifications of text-properties which do +not really affect the buffer's content." + (declare (debug t) (indent 0)) + (let ((modified (make-symbol "modified"))) + `(let* ((,modified (buffer-modified-p)) + (buffer-undo-list t) + (inhibit-read-only t) + (inhibit-modification-hooks t) + deactivate-mark + ;; Avoid setting and removing file locks and checking + ;; buffer's uptodate-ness w.r.t the underlying file. + buffer-file-name + buffer-file-truename) + (unwind-protect + (progn + ,@body) + (unless ,modified + (restore-buffer-modified-p nil)))))))) + +(defsubst rainbow-delimiters-propertize-delimiter (loc depth match) + "Highlight a single delimiter at LOC according to DEPTH. + +LOC is the location of the character to add text properties to. +DEPTH is the nested depth at LOC, which determines the face to use. +MATCH is nil iff it's a mismatched closing delimiter. + +Sets text properties: +`font-lock-face' to the appropriate delimiter face. +`rear-nonsticky' to prevent color from bleeding into subsequent characters typed by the user." + (let ((delim-face (cond + ((<= depth 0) + 'rainbow-delimiters-unmatched-face) + ((not match) + 'rainbow-delimiters-mismatched-face) + (t + (rainbow-delimiters-depth-face depth))))) + ;; (when (eq depth -1) (message "Unmatched delimiter at char %s." loc)) + (add-text-properties loc (1+ loc) + `(font-lock-face ,delim-face + rear-nonsticky t)))) + + +(defsubst rainbow-delimiters-unpropertize-delimiter (loc) + "Remove text properties set by rainbow-delimiters mode from char at LOC." + (remove-text-properties loc (1+ loc) + '(font-lock-face nil + rear-nonsticky nil))) + +(defvar rainbow-delimiters-escaped-char-predicate nil) +(make-variable-buffer-local 'rainbow-delimiters-escaped-char-predicate) + +(defvar rainbow-delimiters-escaped-char-predicate-list + '((emacs-lisp-mode . rainbow-delimiters-escaped-char-predicate-emacs-lisp) + (lisp-interaction-mode . rainbow-delimiters-escaped-char-predicate-emacs-lisp) + (inferior-emacs-lisp-mode . rainbow-delimiters-escaped-char-predicate-emacs-lisp) + (lisp-mode . rainbow-delimiters-escaped-char-predicate-lisp) + (scheme-mode . rainbow-delimiters-escaped-char-predicate-lisp) + (clojure-mode . rainbow-delimiters-escaped-char-predicate-lisp) + (inferior-scheme-mode . rainbow-delimiters-escaped-char-predicate-lisp) + )) + +(defun rainbow-delimiters-escaped-char-predicate-emacs-lisp (loc) + "Non-nil iff the character at LOC is escaped as per Emacs Lisp rules." + (or (and (eq (char-before loc) ?\?) ; e.g. ?) - deprecated, but people use it + (not (and (eq (char-before (1- loc)) ?\\) ; special case: ignore ?\? + (eq (char-before (- loc 2)) ?\?)))) + (and (eq (char-before loc) ?\\) ; escaped char, e.g. ?\) - not counted + (eq (char-before (1- loc)) ?\?)))) + +(defun rainbow-delimiters-escaped-char-predicate-lisp (loc) + "Non-nil iff the character at LOC is escaped as per some generic Lisp rules." + (eq (char-before loc) ?\\)) + +(defsubst rainbow-delimiters-char-ineligible-p (loc ppss) + "Return t if char at LOC should be skipped, e.g. if inside a comment. +PPSS should be the `parse-partial-sexp' state at LOC. + +Returns t if char at loc meets one of the following conditions: +- Inside a string. +- Inside a comment. +- Is an escaped char, e.g. ?\)" + (or + (nth 3 ppss) ; inside string? + (nth 4 ppss) ; inside comment? + (and rainbow-delimiters-escaped-char-predicate + (funcall rainbow-delimiters-escaped-char-predicate loc)))) + + +(defsubst rainbow-delimiters-apply-color (delim depth loc match) + "Apply color for DEPTH to DELIM at LOC following user settings. + +DELIM is a string specifying delimiter type. +DEPTH is the delimiter depth, or corresponding face # if colors are repeating. +LOC is location of character (delimiter) to be colorized. +MATCH is nil iff it's a mismatched closing delimiter." + (and + ;; Ensure user has enabled highlighting of this delimiter type. + (symbol-value (intern-soft + (concat "rainbow-delimiters-highlight-" delim "s-p"))) + (rainbow-delimiters-propertize-delimiter loc + depth + match))) + + +;;; JIT-Lock functionality + +;; Used to skip delimiter-by-delimiter `rainbow-delimiters-propertize-region'. +(defconst rainbow-delimiters-delim-regex "\\(\(\\|\)\\|\\[\\|\\]\\|\{\\|\}\\)" + "Regex matching all opening and closing delimiters the mode highlights.") + +(defconst rainbow-delimiters-opening-delim-info + '((?\( . "paren") (?\{ . "brace") (?\[ . "bracket")) + "Open delimiter information: list of (DELIMITER . TYPE). + +DELIMITER is the opening delimiter. +TYPE is the delimiter type string for `rainbow-delimiters-apply-color'.") + +(defconst rainbow-delimiters-closing-delim-info + '((?\) ?\( . "paren") (?\} ?\{ . "brace") (?\] ?\[ . "bracket")) + "Closing delimiter information: list of (DELIMITER OPENING . TYPE). + +DELIMITER is the closing delimiter. +OPENING is the corresponding opening delimiter. +TYPE is the delimiter type string for `rainbow-delimiters-apply-color'.") + +;; main function called by jit-lock: +(defsubst rainbow-delimiters-propertize-region (start end) + "Highlight delimiters in region between START and END. + +Used by jit-lock for dynamic highlighting." + (setq rainbow-delimiters-escaped-char-predicate + (cdr (assoc major-mode rainbow-delimiters-escaped-char-predicate-list))) + (save-excursion + (with-syntax-table rainbow-delimiters-syntax-table + (with-silent-modifications + (let ((inhibit-point-motion-hooks t)) + (goto-char start) + ;; START can be anywhere in buffer; determine the nesting depth at START loc + (let ((depth (rainbow-delimiters-depth start))) + (while (and (< (point) end) + (re-search-forward rainbow-delimiters-delim-regex end t)) + (backward-char) ; re-search-forward places point after delim; go back. + (let ((ppss (rainbow-delimiters-syntax-ppss (point)))) + (unless (rainbow-delimiters-char-ineligible-p (point) ppss) + (let* ((delim (char-after (point))) + (opening-delim-info + (assq delim rainbow-delimiters-opening-delim-info))) + (if opening-delim-info + (progn + (setq depth (1+ depth)) + (rainbow-delimiters-apply-color (cdr opening-delim-info) + depth + (point) + t)) + ;; Not an opening delimiters, so it's a closing delimiter. + (let ((closing-delim-info + (assq delim rainbow-delimiters-closing-delim-info)) + (matching-opening-delim (char-after (nth 1 ppss)))) + (rainbow-delimiters-apply-color (nthcdr 2 closing-delim-info) + depth + (point) + (= (nth 1 closing-delim-info) + matching-opening-delim)) + (setq depth (or (and (<= depth 0) 0) ; unmatched delim + (1- depth)))))))) + ;; move past delimiter so re-search-forward doesn't pick it up again + (forward-char)))))))) + +(defun rainbow-delimiters-unpropertize-region (start end) + "Remove highlighting from delimiters between START and END." + (save-excursion + (with-silent-modifications + (let ((inhibit-point-motion-hooks t)) + (goto-char start) + (while (and (< (point) end) + (re-search-forward rainbow-delimiters-delim-regex end t)) + ;; re-search-forward places point 1 further than the delim matched: + (rainbow-delimiters-unpropertize-delimiter (1- (point)))))))) + + +;;; Minor mode: + +(defun rainbow-delimiters-mode-turn-on () + "Set up `rainbow-delimiters-mode'." + ;; Flush the ppss cache now in case there's something left in there. + (setq rainbow-delimiters-parse-partial-sexp-cache nil) + (add-hook 'before-change-functions 'rainbow-delimiters-syntax-ppss-flush-cache t t) + (add-hook 'change-major-mode-hook 'rainbow-delimiters-mode-turn-off nil t) + (jit-lock-register 'rainbow-delimiters-propertize-region t) + ;; Create necessary syntax tables inheriting from current major-mode. + (set (make-local-variable 'rainbow-delimiters-syntax-table) + (rainbow-delimiters-make-syntax-table (syntax-table)))) + +(defun rainbow-delimiters-mode-turn-off () + "Tear down `rainbow-delimiters-mode'." + (kill-local-variable 'rainbow-delimiters-syntax-table) + (rainbow-delimiters-unpropertize-region (point-min) (point-max)) + (jit-lock-unregister 'rainbow-delimiters-propertize-region) + (remove-hook 'change-major-mode-hook 'rainbow-delimiters-mode-turn-off t) + (remove-hook 'before-change-functions 'rainbow-delimiters-syntax-ppss-flush-cache t)) + +;;;###autoload +(define-minor-mode rainbow-delimiters-mode + "Highlight nested parentheses, brackets, and braces according to their depth." + nil "" nil ; No modeline lighter - it's already obvious when the mode is on. + (if rainbow-delimiters-mode + (rainbow-delimiters-mode-turn-on) + (rainbow-delimiters-mode-turn-off))) + +;;;###autoload +(defun rainbow-delimiters-mode-enable () + "Enable `rainbow-delimiters-mode'." + (rainbow-delimiters-mode 1)) + +;;;###autoload +(defun rainbow-delimiters-mode-disable () + "Disable `rainbow-delimiters-mode'." + (rainbow-delimiters-mode 0)) + +;;;###autoload +(define-globalized-minor-mode global-rainbow-delimiters-mode + rainbow-delimiters-mode rainbow-delimiters-mode-enable) + +(provide 'rainbow-delimiters) + +;;; rainbow-delimiters.el ends here diff --git a/elpa/rainbow-delimiters-20140713.1131/rainbow-delimiters.elc b/elpa/rainbow-delimiters-20140713.1131/rainbow-delimiters.elc new file mode 100644 index 0000000000000000000000000000000000000000..084f644425942d857f744524026db088f1b6d3c1 GIT binary patch literal 25747 zcmd5^3wPVbm6nrpb}i``c9Pbc=E0p%O(Z!2O#pm|a#CB8<;0C+rYwcG!`-*;y~f+9$Yc5+%LlE}e4?%bKV_q&h5y}c*9|Fy8NuypU88%qK~^dzf-G6xyD_;-L2j2)mp((cy2fRcB|9sqms?$`Lg5X9LIA~D&+jO z^xg{89=lR6(W(Vn+(HhGa5?iH&GJU+xxqZ zAFKLFtyimaY8x_qEoi7HRP|b*j(pV)Ya@f0$wbPp_1Z1Jr}`(T=z4lwEX*7IBLQ#v zZ)s_1?dYQK+x4*Ft8CTF=kep<$Hk9_p8|f0_$lG1T=g70cbv}_t1dsWw!@nEaZuYq zZ3ngG8GAu1hb{RRt#xmo-59oZ*$Y~`sLj?cdt#Ys?UDwxb_<^^>sBuMcUgk|JdTf6 z9%_4N>5&GMx%rqv*7n#hYm+k8M(ZiHQIoX`rtiYUz6%(!fDsGmvtVZJxSwh=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 zXY-PUT-n$zaUHz$N>*-iE|*z|_*$7s;u>A)QKib$kDnnPqd`C`AQmJPAQT<&-t$$P z#@{sYivENpPhg$PF9wU{zB+D)M}R03dJv(X9cIR;uXOe2vvpE6*!M3frRig>N@S&m z;9XSjwM10wv=OK&+1{e|V9Nj}>+8Hp1%{W|^^h5kl!rmCd>_zC`I0bxuNwHcB?0WF z-%5gH0bbQxiwubp$O|YK5BF-(h1!)@Uz*q3uC7;cxNvC_VO2&K2RYS;GbV($-E6^M z7W1C2v&1>Yo6C>@12hj>%)3&CC9sm^+H(AclkxQ#eE}a$X*tlya5Aq!oVZ4T1cJ#tX8|Isl8!_Zy2|@V~gs?=iM+UG2B_@qTw*u6_>k9}qF7+lQBfUw zLS+O;(E5U(3{Hx}1cJI4$KW$`nRlg2d?*PDLmb5srOU4xh{d%rJ+G|CK#_+I@G@cy zgD;Fo;(ZP=A}hF8L1Z(w0yZ#S&({bUD6sL`>o(riH(^ggYRHY?D}uOzH7!^8Vq^NU z*)yFyb8rB#%;hNDMbSoiq95Hq?}lkmhPT$@J(IkVB_M9b2y%00O7BDkXU`j7x=B ze)uAdVg**_gLhC?X6P;NISai-5rxauCMA6#ucaT&NJ>A4MuCQgTD;({wyWA$O9na(L_~ohiKv=7mx~2{6Zayo^R4I^MOFrMZar zAPrsuHiQ0gwyy#@36NqwH(%zmI=zc|7I{=S4Si;2A;x^IP!01e!gNAYgs;f5gq#Bu z>myNBoIvwS+d0@i%7|Z;<&@<^PKzPcjloO8dX8Bwm#xgL;u-vm_x?aL{vzy4G5m0n rfs67?_2Eg@h96Hq4=8Vg&mgo;9$enm)7$Xs`YP0;@b3>9rZ literal 0 HcmV?d00001 diff --git a/elpa/s-20140714.707/s-autoloads.el b/elpa/s-20140714.707/s-autoloads.el new file mode 100644 index 000000000..6dc1589a6 --- /dev/null +++ b/elpa/s-20140714.707/s-autoloads.el @@ -0,0 +1,18 @@ +;;; s-autoloads.el --- automatically extracted autoloads +;; +;;; Code: + + +;;;### (autoloads nil nil ("s-pkg.el" "s.el") (21478 16648 636949 +;;;;;; 0)) + +;;;*** + +(provide 's-autoloads) +;; Local Variables: +;; version-control: never +;; no-byte-compile: t +;; no-update-autoloads: t +;; coding: utf-8 +;; End: +;;; s-autoloads.el ends here diff --git a/elpa/s-20140714.707/s-pkg.el b/elpa/s-20140714.707/s-pkg.el new file mode 100644 index 000000000..d57e7862c --- /dev/null +++ b/elpa/s-20140714.707/s-pkg.el @@ -0,0 +1 @@ +(define-package "s" "20140714.707" "The long lost Emacs string manipulation library." (quote nil)) diff --git a/elpa/s-20140714.707/s-pkg.elc b/elpa/s-20140714.707/s-pkg.elc new file mode 100644 index 0000000000000000000000000000000000000000..f7dae5fed0bf568e33507be3375db399eeac22d8 GIT binary patch literal 613 zcmbtSO;5ux4BfeZfUDILNNd_|gR=F)n0A;1r;Q)rC21QiO{ydVjbD%3A_U?%ONr$8 z`8|K6+`epXCX-22mL+U#+bJyt952vfc%tKzSLDyuo|v{AHCO|C46r`e087Y=)goKn zKfo-@7XwA*Yzq~UK>FsT^C@wpOt#296RFf4ratM>S&=VTkrm{2rm49t-c3 zt4M6NU~`rau@4m*KutAtLAB}=0|7jXhTx%5e$+jC=|Nl!wu*zW+y|#j?WYuVJ^%_q z4gTolOEz2n;}DiOj19o82}s~`sFFu|G0A$r+3kQg=#U30ayrPP5#TLwG;oxlE&dVt zZpMQ|r +;; Version: 20140714.707 +;; X-Original-Version: 1.9.0 +;; Keywords: strings + +;; 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: + +;; The long lost Emacs string manipulation library. +;; +;; See documentation on https://github.com/magnars/s.el#functions + +;;; Code: + +(require 'ucs-normalize) + +(defun s-trim-left (s) + "Remove whitespace at the beginning of S." + (if (string-match "\\`[ \t\n\r]+" s) + (replace-match "" t t s) + s)) + +(defun s-trim-right (s) + "Remove whitespace at the end of S." + (if (string-match "[ \t\n\r]+\\'" s) + (replace-match "" t t s) + s)) + +(defun s-trim (s) + "Remove whitespace at the beginning and end of S." + (s-trim-left (s-trim-right s))) + +(defun s-collapse-whitespace (s) + "Convert all adjacent whitespace characters to a single space." + (replace-regexp-in-string "[ \t\n\r]+" " " s)) + +(defun s-split (separator s &optional omit-nulls) + "Split S into substrings bounded by matches for regexp SEPARATOR. +If OMIT-NULLS is non-nil, zero-length substrings are omitted. + +This is a simple wrapper around the built-in `split-string'." + (split-string s separator omit-nulls)) + +(defun s-split-up-to (separator s n &optional omit-nulls) + "Split S up to N times into substrings bounded by matches for regexp SEPARATOR. + +If OMIT-NULLS is non-nil, zero-length substrings are omitted. + +See also `s-split'." + (save-match-data + (let ((op 0) + (r nil)) + (with-temp-buffer + (insert s) + (setq op (goto-char (point-min))) + (while (and (re-search-forward separator nil t) + (< 0 n)) + (let ((sub (buffer-substring-no-properties op (match-beginning 0)))) + (unless (and omit-nulls + (equal sub "")) + (push sub r))) + (setq op (goto-char (match-end 0))) + (setq n (1- n))) + (if (/= (point) (point-max)) + (push (buffer-substring-no-properties op (point-max)) r) + (unless omit-nulls + (push "" r)))) + (nreverse r)))) + +(defun s-lines (s) + "Splits S into a list of strings on newline characters." + (s-split "\\(\r\n\\|[\n\r]\\)" s)) + +(defun s-join (separator strings) + "Join all the strings in STRINGS with SEPARATOR in between." + (mapconcat 'identity strings separator)) + +(defun s-concat (&rest strings) + "Join all the string arguments into one string." + (apply 'concat strings)) + +(defun s-prepend (prefix s) + "Concatenate PREFIX and S." + (concat prefix s)) + +(defun s-append (suffix s) + "Concatenate S and SUFFIX." + (concat s suffix)) + +(defun s-repeat (num s) + "Make a string of S repeated NUM times." + (let (ss) + (while (> num 0) + (setq ss (cons s ss)) + (setq num (1- num))) + (apply 'concat ss))) + +(defun s-chop-suffix (suffix s) + "Remove SUFFIX if it is at end of S." + (let ((pos (- (length suffix)))) + (if (and (>= (length s) (length suffix)) + (string= suffix (substring s pos))) + (substring s 0 pos) + s))) + +(defun s-chop-suffixes (suffixes s) + "Remove SUFFIXES one by one in order, if they are at the end of S." + (while suffixes + (setq s (s-chop-suffix (car suffixes) s)) + (setq suffixes (cdr suffixes))) + s) + +(defun s-chop-prefix (prefix s) + "Remove PREFIX if it is at the start of S." + (let ((pos (length prefix))) + (if (and (>= (length s) (length prefix)) + (string= prefix (substring s 0 pos))) + (substring s pos) + s))) + +(defun s-chop-prefixes (prefixes s) + "Remove PREFIXES one by one in order, if they are at the start of S." + (while prefixes + (setq s (s-chop-prefix (car prefixes) s)) + (setq prefixes (cdr prefixes))) + s) + +(defun s-shared-start (s1 s2) + "Returns the longest prefix S1 and S2 have in common." + (let ((search-length (min (length s1) (length s2))) + (i 0)) + (while (and (< i search-length) + (= (aref s1 i) (aref s2 i))) + (setq i (1+ i))) + (substring s1 0 i))) + +(defun s-shared-end (s1 s2) + "Returns the longest suffix S1 and S2 have in common." + (let* ((l1 (length s1)) + (l2 (length s2)) + (search-length (min l1 l2)) + (i 0)) + (while (and (< i search-length) + (= (aref s1 (- l1 i 1)) (aref s2 (- l2 i 1)))) + (setq i (1+ i))) + ;; If I is 0, then it means that there's no common suffix between + ;; S1 and S2. + ;; + ;; However, since (substring s (- 0)) will return the whole + ;; string, `s-shared-end' should simply return the empty string + ;; when I is 0. + (if (zerop i) + "" + (substring s1 (- i))))) + +(defun s-chomp (s) + "Remove one trailing `\\n`, `\\r` or `\\r\\n` from S." + (s-chop-suffixes '("\n" "\r") s)) + +(defun s-truncate (len s) + "If S is longer than LEN, cut it down to LEN - 3 and add ... at the end." + (if (> (length s) len) + (format "%s..." (substring s 0 (- len 3))) + s)) + +(defun s-word-wrap (len s) + "If S is longer than LEN, wrap the words with newlines." + (with-temp-buffer + (insert s) + (let ((fill-column len)) + (fill-region (point-min) (point-max))) + (buffer-substring-no-properties (point-min) (point-max)))) + +(defun s-center (len s) + "If S is shorter than LEN, pad it with spaces so it is centered." + (let ((extra (max 0 (- len (length s))))) + (concat + (make-string (ceiling extra 2) ? ) + s + (make-string (floor extra 2) ? )))) + +(defun s-pad-left (len padding s) + "If S is shorter than LEN, pad it with PADDING on the left." + (let ((extra (max 0 (- len (length s))))) + (concat (make-string extra (string-to-char padding)) + s))) + +(defun s-pad-right (len padding s) + "If S is shorter than LEN, pad it with PADDING on the right." + (let ((extra (max 0 (- len (length s))))) + (concat s + (make-string extra (string-to-char padding))))) + +(defun s-left (len s) + "Returns up to the LEN first chars of S." + (if (> (length s) len) + (substring s 0 len) + s)) + +(defun s-right (len s) + "Returns up to the LEN last chars of S." + (let ((l (length s))) + (if (> l len) + (substring s (- l len) l) + s))) + +(defun s-ends-with? (suffix s &optional ignore-case) + "Does S end with SUFFIX? + +If IGNORE-CASE is non-nil, the comparison is done without paying +attention to case differences. + +Alias: `s-suffix?'" + (let ((start-pos (- (length s) (length suffix)))) + (and (>= start-pos 0) + (eq t (compare-strings suffix nil nil + s start-pos nil ignore-case))))) + +(defalias 's-ends-with-p 's-ends-with?) + +(defun s-starts-with? (prefix s &optional ignore-case) + "Does S start with PREFIX? + +If IGNORE-CASE is non-nil, the comparison is done without paying +attention to case differences. + +Alias: `s-prefix?'. This is a simple wrapper around the built-in +`string-prefix-p'." + (string-prefix-p prefix s ignore-case)) + +(defalias 's-starts-with-p 's-starts-with?) + +(defalias 's-suffix? 's-ends-with?) +(defalias 's-prefix? 's-starts-with?) +(defalias 's-suffix-p 's-ends-with?) +(defalias 's-prefix-p 's-starts-with?) + +(defun s--truthy? (val) + (not (null val))) + +(defun s-contains? (needle s &optional ignore-case) + "Does S contain NEEDLE? + +If IGNORE-CASE is non-nil, the comparison is done without paying +attention to case differences." + (let ((case-fold-search ignore-case)) + (s--truthy? (string-match-p (regexp-quote needle) s)))) + +(defalias 's-contains-p 's-contains?) + +(defun s-equals? (s1 s2) + "Is S1 equal to S2? + +This is a simple wrapper around the built-in `string-equal'." + (string-equal s1 s2)) + +(defalias 's-equals-p 's-equals?) + +(defun s-less? (s1 s2) + "Is S1 less than S2? + +This is a simple wrapper around the built-in `string-lessp'." + (string-lessp s1 s2)) + +(defalias 's-less-p 's-less?) + +(defun s-matches? (regexp s &optional start) + "Does REGEXP match S? +If START is non-nil the search starts at that index. + +This is a simple wrapper around the built-in `string-match-p'." + (s--truthy? (string-match-p regexp s start))) + +(defalias 's-matches-p 's-matches?) + +(defun s-blank? (s) + "Is S nil or the empty string?" + (or (null s) (string= "" s))) + +(defun s-present? (s) + "Is S anything but nil or the empty string?" + (not (s-blank? s))) + +(defun s-presence (s) + "Return S if it's `s-present?', otherwise return nil." + (and (s-present? s) s)) + +(defun s-lowercase? (s) + "Are all the letters in S in lower case?" + (let ((case-fold-search nil)) + (not (string-match-p "[[:upper:]]" s)))) + +(defun s-uppercase? (s) + "Are all the letters in S in upper case?" + (let ((case-fold-search nil)) + (not (string-match-p "[[:lower:]]" s)))) + +(defun s-mixedcase? (s) + "Are there both lower case and upper case letters in S?" + (let ((case-fold-search nil)) + (s--truthy? + (and (string-match-p "[[:lower:]]" s) + (string-match-p "[[:upper:]]" s))))) + +(defun s-capitalized? (s) + "In S, is the first letter upper case, and all other letters lower case?" + (let ((case-fold-search nil)) + (s--truthy? + (string-match-p "^[[:upper:]][^[:upper:]]*$" s)))) + +(defun s-numeric? (s) + "Is S a number?" + (s--truthy? + (string-match-p "^[0-9]+$" s))) + +(defun s-replace (old new s) + "Replaces OLD with NEW in S." + (replace-regexp-in-string (regexp-quote old) new s t t)) + +(defun s--aget (alist key) + (cdr (assoc 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)) + +(defun s-downcase (s) + "Convert S to lower case. + +This is a simple wrapper around the built-in `downcase'." + (downcase s)) + +(defun s-upcase (s) + "Convert S to upper case. + +This is a simple wrapper around the built-in `upcase'." + (upcase s)) + +(defun s-capitalize (s) + "Convert the first word's first character to upper case and the rest to lower case in S." + (concat (upcase (substring s 0 1)) (downcase (substring s 1)))) + +(defun s-titleize (s) + "Convert each word's first character to upper case and the rest to lower case in S. + +This is a simple wrapper around the built-in `capitalize'." + (capitalize s)) + +(defmacro s-with (s form &rest more) + "Threads S through the forms. Inserts S as the last item +in the first form, making a list of it if it is not a list +already. If there are more forms, inserts the first form as the +last item in second form, etc." + (declare (debug (form &rest [&or (function &rest form) fboundp]))) + (if (null more) + (if (listp form) + `(,(car form) ,@(cdr form) ,s) + (list form s)) + `(s-with (s-with ,s ,form) ,@more))) + +(put 's-with 'lisp-indent-function 1) + +(defun s-index-of (needle s &optional ignore-case) + "Returns first index of NEEDLE in S, or nil. + +If IGNORE-CASE is non-nil, the comparison is done without paying +attention to case differences." + (let ((case-fold-search ignore-case)) + (string-match-p (regexp-quote needle) s))) + +(defun s-reverse (s) + "Return the reverse of S." + (if (multibyte-string-p s) + (let ((input (string-to-list s)) + (output ())) + (while input + ;; Handle entire grapheme cluster as a single unit + (let ((grapheme (list (pop input)))) + (while (memql (car input) ucs-normalize-combining-chars) + (push (pop input) grapheme)) + (setq output (nconc (nreverse grapheme) output)))) + (concat output)) + (concat (nreverse (string-to-list s))))) + +(defun s-match-strings-all (regex string) + "Return a list of matches for REGEX in STRING. + +Each element itself is a list of matches, as per +`match-string'. Multiple matches at the same position will be +ignored after the first." + (let ((all-strings ()) + (i 0)) + (while (and (< i (length string)) + (string-match regex string i)) + (setq i (1+ (match-beginning 0))) + (let (strings + (num-matches (/ (length (match-data)) 2)) + (match 0)) + (while (/= match num-matches) + (push (match-string match string) strings) + (setq match (1+ match))) + (push (nreverse strings) all-strings))) + (nreverse all-strings))) + +(defun s-match (regexp s &optional start) + "When the given expression matches the string, this function returns a list +of the whole matching string and a string for each matched subexpressions. +If it did not match the returned value is an empty list (nil). + +When START is non-nil the search will start at that index." + (save-match-data + (if (string-match regexp s start) + (let ((match-data-list (match-data)) + result) + (while match-data-list + (let* ((beg (car match-data-list)) + (end (cadr match-data-list)) + (subs (if (and beg end) (substring s beg end) nil))) + (setq result (cons subs result)) + (setq match-data-list + (cddr match-data-list)))) + (nreverse result))))) + +(defun s-slice-at (regexp s) + "Slices S up at every index matching REGEXP." + (save-match-data + (let (i) + (setq i (string-match regexp s 1)) + (if i + (cons (substring s 0 i) + (s-slice-at regexp (substring s i))) + (list s))))) + +(defun s-split-words (s) + "Split S into list of words." + (s-split + "[^[:word:]0-9]+" + (let ((case-fold-search nil)) + (replace-regexp-in-string + "\\([[:lower:]]\\)\\([[:upper:]]\\)" "\\1 \\2" + (replace-regexp-in-string "\\([[:upper:]]\\)\\([[:upper:]][0-9[:lower:]]\\)" "\\1 \\2" s))) + t)) + +(defun s--mapcar-head (fn-head fn-rest list) + "Like MAPCAR, but applies a different function to the first element." + (if list + (cons (funcall fn-head (car list)) (mapcar fn-rest (cdr list))))) + +(defun s-lower-camel-case (s) + "Convert S to lowerCamelCase." + (s-join "" (s--mapcar-head 'downcase 'capitalize (s-split-words s)))) + +(defun s-upper-camel-case (s) + "Convert S to UpperCamelCase." + (s-join "" (mapcar 'capitalize (s-split-words s)))) + +(defun s-snake-case (s) + "Convert S to snake_case." + (s-join "_" (mapcar 'downcase (s-split-words s)))) + +(defun s-dashed-words (s) + "Convert S to dashed-words." + (s-join "-" (mapcar 'downcase (s-split-words s)))) + +(defun s-capitalized-words (s) + "Convert S to Capitalized words." + (let ((words (s-split-words s))) + (s-join " " (cons (capitalize (car words)) (mapcar 'downcase (cdr words)))))) + +(defun s-titleized-words (s) + "Convert S to Titleized Words." + (s-join " " (mapcar 's-titleize (s-split-words s)))) + +(defun s-word-initials (s) + "Convert S to its initials." + (s-join "" (mapcar (lambda (ss) (substring ss 0 1)) + (s-split-words s)))) + +;; Errors for s-format +(progn + (put 's-format-resolve + 'error-conditions + '(error s-format s-format-resolve)) + (put 's-format-resolve + 'error-message + "Cannot resolve a template to values")) + +(defun s-format (template replacer &optional extra) + "Format TEMPLATE with the function REPLACER. + +REPLACER takes an argument of the format variable and optionally +an extra argument which is the EXTRA value from the call to +`s-format'. + +Several standard `s-format' helper functions are recognized and +adapted for this: + + (s-format \"${name}\" 'gethash hash-table) + (s-format \"${name}\" 'aget alist) + (s-format \"$0\" 'elt sequence) + +The REPLACER function may be used to do any other kind of +transformation." + (let ((saved-match-data (match-data))) + (unwind-protect + (replace-regexp-in-string + "\\$\\({\\([^}]+\\)}\\|[0-9]+\\)" + (lambda (md) + (let ((var + (let ((m (match-string 2 md))) + (if m m + (string-to-number (match-string 1 md))))) + (replacer-match-data (match-data))) + (unwind-protect + (let ((v + (cond + ((eq replacer 'gethash) + (funcall replacer var extra)) + ((eq replacer 'aget) + (funcall 's--aget extra var)) + ((eq replacer 'elt) + (funcall replacer extra var)) + (t + (set-match-data saved-match-data) + (if extra + (funcall replacer var extra) + (funcall replacer var)))))) + (if v v (signal 's-format-resolve md))) + (set-match-data replacer-match-data)))) template + ;; Need literal to make sure it works + t t) + (set-match-data saved-match-data)))) + +(defvar s-lex-value-as-lisp nil + "If `t' interpolate lisp values as lisp. + +`s-lex-format' inserts values with (format \"%S\").") + +(defun s-lex-fmt|expand (fmt) + "Expand FMT into lisp." + (list 's-format fmt (quote 'aget) + (append '(list) + (mapcar + (lambda (matches) + (list + 'cons + (cadr matches) + `(format + (if s-lex-value-as-lisp "%S" "%s") + ,(intern (cadr matches))))) + (s-match-strings-all "${\\([^}]+\\)}" fmt))))) + +(defmacro s-lex-format (format-str) + "`s-format` with the current environment. + +FORMAT-STR may use the `s-format' variable reference to refer to +any variable: + + (let ((x 1)) + (s-lex-format \"x is: ${x}\")) + +The values of the variables are interpolated with \"%s\" unless +the variable `s-lex-value-as-lisp' is `t' and then they are +interpolated with \"%S\"." + (declare (debug (form))) + (s-lex-fmt|expand format-str)) + +(defun s-count-matches (regexp s &optional start end) + "Count occurrences of `regexp' in `s'. + +`start', inclusive, and `end', exclusive, delimit the part of `s' +to match. " + (with-temp-buffer + (insert s) + (goto-char (point-min)) + (count-matches regexp (or start 1) (or end (point-max))))) + +(provide 's) +;;; s.el ends here diff --git a/elpa/s-20140714.707/s.elc b/elpa/s-20140714.707/s.elc new file mode 100644 index 0000000000000000000000000000000000000000..05f4dcced37484471c218a2181147eb484bf2a29 GIT binary patch literal 18363 zcmc&+3wIkumiC_AbH_Ux#*+dxxjZc%ka44@vv1;)-^&Ia-n8@?@ zs(Y^7dlAhBDi~t^$t)U0e+_1MAlWO)&Er9o=sD*}n5f=G9E_r_>W#a}Y#PPq$u90r zlbH&7JuEJr$8GL;%}ZnS#uy_W&s29D&jLI=pY@%6T#227_Tl~esyhg#L3aiscV+q@ z?x|#~x?U0%n5{%RP_c7#vpPzH0CNzO>y7 z`*<@*)K=nv_akQ*_GfDI*>;iH zSv^aX-aZE+)E(gU&gnC?)`>SxZk5$EoD4yUy;oMV6ID~&n;)t@RrB|EPDp#TzMS?D zyS9|-X>>mLSCMUL?sT?ZO?IPN*JRf!%gN4IPO*E{A}(?L=FN<;xy>;fB}+b0Rl~!k z+tkF=t1t^Oq!{W0{R?`30o&tQUK%omP_wZLR04^B0T5AH6pHS6I1DC9=;WknK|ClG ztD7mUcBiM|dH8bTM6sjALX|CN%L@OUDBqCoR_YZ^yW6a&_GB2%R2y0k+LHO1F$wBy zJddfU+SGLiQ2PFO3c2Des@-~W@buvL@zcH1{l0qq@cyy$=&J`0Fbr)&?8MP18FM=Ed^j|^R$Ya%WPD80m$C=3N7;Ni4tl=XeYftX z9Gp+My^jn3!3}J9j6GzCunorJr;(%PrR=RNP-7EN2S8qe~8Zbol zPSvg8$9?Br{Pyruy?JB0{sV6DvM-PHyZjoSUB{K$27bY|xpnfp`Vf}Qtz3Ka>-0;b z6Z2BX^ZZWvgX`Dc;+@Y{uHj`5SF0Yr`*-nu?cSR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mKv>n7ZZTd~Y+pcrGqdsLE7 zt$dtjj-@-Fq7j&9@194~aZLCQ+xx}irwj%>(9w8lI3ld>`3XVnUR$|&l z`9k+V3uzyrHOJ8rtabaPa(Do*>9M1qM$G=p|?OP?kw0KOMPUzEbA2Z!MHYw4En* zr_EtjOUmwG4~rt3D=jsApSp+|2SHvmE9ZE$b*W~tB^oBW;<`N3I>$bayLv~7lYn=p z8g!sagBA4Ervg=>4JwMe!+8RvPq$i}q9GPn!1|rf<%**@c4p~(!fgNMvpGdhuq>2nWYZJm0OyIv&v9}ZyS!8SKP^(RjQ{`u literal 0 HcmV?d00001 diff --git a/elpa/smex-20140425.1314/smex-autoloads.el b/elpa/smex-20140425.1314/smex-autoloads.el new file mode 100644 index 000000000..59dca4fc7 --- /dev/null +++ b/elpa/smex-20140425.1314/smex-autoloads.el @@ -0,0 +1,38 @@ +;;; smex-autoloads.el --- automatically extracted autoloads +;; +;;; Code: + + +;;;### (autoloads (smex-initialize smex-major-mode-commands smex) +;;;;;; "smex" "smex.el" (21478 16647 0 0)) +;;; Generated autoloads from smex.el + +(autoload 'smex "smex" "\ + + +\(fn)" t nil) + +(autoload 'smex-major-mode-commands "smex" "\ +Like `smex', but limited to commands that are relevant to the active major mode. + +\(fn)" t nil) + +(autoload 'smex-initialize "smex" "\ + + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads nil nil ("smex-pkg.el") (21478 16647 270867 0)) + +;;;*** + +(provide 'smex-autoloads) +;; Local Variables: +;; version-control: never +;; no-byte-compile: t +;; no-update-autoloads: t +;; coding: utf-8 +;; End: +;;; smex-autoloads.el ends here diff --git a/elpa/smex-20140425.1314/smex-pkg.el b/elpa/smex-20140425.1314/smex-pkg.el new file mode 100644 index 000000000..ecf6975dd --- /dev/null +++ b/elpa/smex-20140425.1314/smex-pkg.el @@ -0,0 +1 @@ +(define-package "smex" "20140425.1314" "M-x interface with Ido-style fuzzy matching." (quote ((emacs "24")))) diff --git a/elpa/smex-20140425.1314/smex-pkg.elc b/elpa/smex-20140425.1314/smex-pkg.elc new file mode 100644 index 0000000000000000000000000000000000000000..b7bc2327f0f3e13f985a46e79e574d9b1f17de85 GIT binary patch literal 632 zcmbtSO>e?54CUNEu&dR}K%yxvMH}=ohBzRN)3zUAlC+Izld4HK;MdO$(TTCXJf*MnQV|-CSqB)7~4jkqM=}xr3;qKlkDnhk0q0}M^PHK zLkWBlgd)x~V{?}H*tc>OU`?&GPBrR+juI>jeDI@E_DbJdX+fMdHj0BV+`3Nb(oQMb zSqCTt&H2ZZELpnzhan7MXybqz?U0gtS47X`(b4*Sv)ci$utV;s$*HGDEx;P!sNo=? zHh4qwJB$U1U9DsXuA; and contributors +;; URL: http://github.com/nonsequitur/smex/ +;; Package-Requires: ((emacs "24")) +;; Version: 20140425.1314 +;; X-Original-Version: 3.0 +;; Keywords: convenience, usability + +;; This file is not part of GNU Emacs. + +;;; License: + +;; Licensed under the same terms as Emacs. + +;;; Commentary: + +;; Quick start: +;; run (smex-initialize) +;; +;; Bind the following commands: +;; smex, smex-major-mode-commands +;; +;; For a detailed introduction see: +;; http://github.com/nonsequitur/smex/blob/master/README.markdown + +;;; Code: + +(require 'ido) + +(defgroup smex nil + "M-x interface with Ido-style fuzzy matching and ranking heuristics." + :group 'extensions + :group 'convenience + :link '(emacs-library-link :tag "Lisp File" "smex.el")) + +(defcustom smex-auto-update t + "If non-nil, `Smex' checks for new commands each time it is run. +Turn it off for minor speed improvements on older systems." + :type 'boolean + :group 'smex) + +(defcustom smex-save-file "~/.smex-items" + "File in which the smex state is saved between Emacs sessions. +Variables stored are: `smex-data', `smex-history'. +Must be set before initializing Smex." + :type 'string + :group 'smex) + +(defcustom smex-history-length 7 + "Determines on how many recently executed commands +Smex should keep a record. +Must be set before initializing Smex." + :type 'integer + :group 'smex) + +(defcustom smex-prompt-string "M-x " + "String to display in the Smex prompt." + :type 'string + :group 'smex) + +(defcustom smex-flex-matching t + "Enables Ido flex matching. On by default. +Set this to nil to disable fuzzy matching." + :type 'boolean + :group 'smex) + +(defvar smex-initialized-p nil) +(defvar smex-cache) +(defvar smex-ido-cache) +(defvar smex-data) +(defvar smex-history) +(defvar smex-command-count 0) +(defvar smex-custom-action nil) + +;; Check if Smex is supported +(when (equal (cons 1 1) + (ignore-errors + (subr-arity (symbol-function 'execute-extended-command)))) + (error "Your Emacs has a non-elisp version of `execute-extended-command', which is incompatible with Smex")) + +;;-------------------------------------------------------------------------------- +;; Smex Interface + +;;;###autoload +(defun smex () + (interactive) + (unless smex-initialized-p + (smex-initialize)) + (if (smex-already-running) + (smex-update-and-rerun) + (and smex-auto-update + (smex-detect-new-commands) + (smex-update)) + (smex-read-and-run smex-ido-cache))) + +(defsubst smex-already-running () + (and (boundp 'ido-choice-list) + (eql ido-choice-list smex-ido-cache) + (minibuffer-window-active-p (selected-window)))) + +(defsubst smex-update-and-rerun () + (smex-do-with-selected-item + (lambda (ignore) (smex-update) (smex-read-and-run smex-ido-cache ido-text)))) + +(defun smex-read-and-run (commands &optional initial-input) + (let* ((chosen-item-name (smex-completing-read commands initial-input)) + (chosen-item (intern chosen-item-name))) + (if smex-custom-action + (let ((action smex-custom-action)) + (setq smex-custom-action nil) + (funcall action chosen-item)) + (unwind-protect + (execute-extended-command current-prefix-arg chosen-item-name) + (smex-rank chosen-item))))) + +;;;###autoload +(defun smex-major-mode-commands () + "Like `smex', but limited to commands that are relevant to the active major mode." + (interactive) + (unless smex-initialized-p + (smex-initialize)) + (let ((commands (delete-dups (append (smex-extract-commands-from-keymap (current-local-map)) + (smex-extract-commands-from-features major-mode))))) + (setq commands (smex-sort-according-to-cache commands)) + (setq commands (mapcar #'symbol-name commands)) + (smex-read-and-run commands))) + +(defun smex-completing-read (choices initial-input) + (let ((ido-completion-map ido-completion-map) + (ido-setup-hook (cons 'smex-prepare-ido-bindings ido-setup-hook)) + (ido-enable-prefix nil) + (ido-enable-flex-matching smex-flex-matching) + (ido-max-prospects 10) + (minibuffer-completion-table choices)) + (ido-completing-read (smex-prompt-with-prefix-arg) choices nil nil + initial-input 'extended-command-history (car choices)))) + +(defun smex-prompt-with-prefix-arg () + (if (not current-prefix-arg) + smex-prompt-string + (concat + (if (eq current-prefix-arg '-) + "- " + (if (integerp current-prefix-arg) + (format "%d " current-prefix-arg) + (if (= (car current-prefix-arg) 4) + "C-u " + (format "%d " (car current-prefix-arg))))) + smex-prompt-string))) + +(defun smex-prepare-ido-bindings () + (define-key ido-completion-map (kbd "TAB") 'minibuffer-complete) + (define-key ido-completion-map (kbd "C-h f") 'smex-describe-function) + (define-key ido-completion-map (kbd "C-h w") 'smex-where-is) + (define-key ido-completion-map (kbd "M-.") 'smex-find-function) + (define-key ido-completion-map (kbd "C-a") 'move-beginning-of-line)) + +;;-------------------------------------------------------------------------------- +;; Cache and Maintenance + +(defun smex-rebuild-cache () + (interactive) + (setq smex-cache nil) + + ;; Build up list 'new-commands' and later put it at the end of 'smex-cache'. + ;; This speeds up sorting. + (let (new-commands) + (mapatoms (lambda (symbol) + (when (commandp symbol) + (let ((known-command (assq symbol smex-data))) + (if known-command + (setq smex-cache (cons known-command smex-cache)) + (setq new-commands (cons (list symbol) new-commands))))))) + (if (eq (length smex-cache) 0) + (setq smex-cache new-commands) + (setcdr (last smex-cache) new-commands))) + + (setq smex-cache (sort smex-cache 'smex-sorting-rules)) + (smex-restore-history) + (setq smex-ido-cache (smex-convert-for-ido smex-cache))) + +(defun smex-convert-for-ido (command-items) + (mapcar (lambda (command-item) (symbol-name (car command-item))) command-items)) + +(defun smex-restore-history () + "Rearranges `smex-cache' according to `smex-history'" + (if (> (length smex-history) smex-history-length) + (setcdr (nthcdr (- smex-history-length 1) smex-history) nil)) + (mapc (lambda (command) + (unless (eq command (caar smex-cache)) + (let ((command-cell-position (smex-detect-position smex-cache (lambda (cell) + (eq command (caar cell)))))) + (if command-cell-position + (let ((command-cell (smex-remove-nth-cell command-cell-position smex-cache))) + (setcdr command-cell smex-cache) + (setq smex-cache command-cell)))))) + (reverse smex-history))) + +(defun smex-sort-according-to-cache (list) + "Sorts a list of commands by their order in `smex-cache'" + (let (sorted) + (dolist (command-item smex-cache) + (let ((command (car command-item))) + (when (memq command list) + (setq sorted (cons command sorted)) + (setq list (delq command list))))) + (nreverse (append list sorted)))) + +(defun smex-update () + (interactive) + (smex-save-history) + (smex-rebuild-cache)) + +(defun smex-detect-new-commands () + (let ((i 0)) + (mapatoms (lambda (symbol) (if (commandp symbol) (setq i (1+ i))))) + (unless (= i smex-command-count) + (setq smex-command-count i)))) + +(defun smex-auto-update (&optional idle-time) + "Update Smex when Emacs has been idle for IDLE-TIME." + (unless idle-time (setq idle-time 60)) + (run-with-idle-timer idle-time t + '(lambda () (if (smex-detect-new-commands) (smex-update))))) + +;;;###autoload +(defun smex-initialize () + (interactive) + (unless ido-mode (smex-initialize-ido)) + (smex-load-save-file) + (smex-detect-new-commands) + (smex-rebuild-cache) + (add-hook 'kill-emacs-hook 'smex-save-to-file) + (setq smex-initialized-p t)) + +(defun smex-initialize-ido () + "Sets up a minimal Ido environment for `ido-completing-read'." + (ido-init-completion-maps) + (add-hook 'minibuffer-setup-hook 'ido-minibuffer-setup)) + +(defun smex-load-save-file () + "Loads `smex-history' and `smex-data' from `smex-save-file'" + (let ((save-file (expand-file-name smex-save-file))) + (if (file-readable-p save-file) + (with-temp-buffer + (insert-file-contents save-file) + (condition-case nil + (setq smex-history (read (current-buffer)) + smex-data (read (current-buffer))) + (error (if (smex-save-file-not-empty-p) + (error "Invalid data in smex-save-file (%s). Can't restore history." + smex-save-file) + (if (not (boundp 'smex-history)) (setq smex-history)) + (if (not (boundp 'smex-data)) (setq smex-data)))))) + (setq smex-history nil smex-data nil)))) + +(defsubst smex-save-file-not-empty-p () + (string-match-p "\[^[:space:]\]" (buffer-string))) + +(defun smex-save-history () + "Updates `smex-history'" + (setq smex-history nil) + (let ((cell smex-cache)) + (dotimes (i smex-history-length) + (setq smex-history (cons (caar cell) smex-history)) + (setq cell (cdr cell)))) + (setq smex-history (nreverse smex-history))) + +(defun smex-save-to-file () + (interactive) + (smex-save-history) + (with-temp-file (expand-file-name smex-save-file) + (ido-pp 'smex-history) + (ido-pp 'smex-data))) + +;;-------------------------------------------------------------------------------- +;; Ranking + +(defun smex-sorting-rules (command-item other-command-item) + "Returns true if COMMAND-ITEM should sort before OTHER-COMMAND-ITEM." + (let* ((count (or (cdr command-item ) 0)) + (other-count (or (cdr other-command-item) 0)) + (name (car command-item)) + (other-name (car other-command-item)) + (length (length (symbol-name name))) + (other-length (length (symbol-name other-name)))) + (or (> count other-count) ; 1. Frequency of use + (and (= count other-count) + (or (< length other-length) ; 2. Command length + (and (= length other-length) + (string< name other-name))))))) ; 3. Alphabetical order + +(defun smex-rank (command) + (let ((command-item (or (assq command smex-cache) + ;; Update caches and try again if not found. + (progn (smex-update) + (assq command smex-cache))))) + (when command-item + (smex-update-counter command-item) + + ;; Don't touch the cache order if the chosen command + ;; has just been execucted previously. + (unless (eq command-item (car smex-cache)) + (let (command-cell + (pos (smex-detect-position smex-cache (lambda (cell) + (eq command-item (car cell)))))) + ;; Remove the just executed command. + (setq command-cell (smex-remove-nth-cell pos smex-cache)) + ;; And put it on top of the cache. + (setcdr command-cell smex-cache) + (setq smex-cache command-cell) + + ;; Repeat the same for the ido cache. Should this be DRYed? + (setq command-cell (smex-remove-nth-cell pos smex-ido-cache)) + (setcdr command-cell smex-ido-cache) + (setq smex-ido-cache command-cell) + + ;; Now put the last history item back to its normal place. + (smex-sort-item-at smex-history-length)))))) + +(defun smex-update-counter (command-item) + (let ((count (cdr command-item))) + (setcdr command-item + (if count + (1+ count) + ;; Else: Command has just been executed for the first time. + ;; Add it to `smex-data'. + (if smex-data + (setcdr (last smex-data) (list command-item)) + (setq smex-data (list command-item))) + 1)))) + +(defun smex-sort-item-at (n) + "Sorts item at position N in `smex-cache'." + (let* ((command-cell (nthcdr n smex-cache)) + (command-item (car command-cell)) + (command-count (cdr command-item))) + (let ((insert-at (smex-detect-position command-cell (lambda (cell) + (smex-sorting-rules command-item (car cell)))))) + ;; TODO: Should we handle the case of 'insert-at' being nil? + ;; This will never happen in practice. + (when (> insert-at 1) + (setq command-cell (smex-remove-nth-cell n smex-cache)) + ;; smex-cache just got shorter by one element, so subtract '1' from insert-at. + (setq insert-at (+ n (- insert-at 1))) + (smex-insert-cell command-cell insert-at smex-cache) + + ;; Repeat the same for the ido cache. DRY? + (setq command-cell (smex-remove-nth-cell n smex-ido-cache)) + (smex-insert-cell command-cell insert-at smex-ido-cache))))) + +(defun smex-detect-position (cell function) + "Detects, relatively to CELL, the position of the cell +on which FUNCTION returns true. +Only checks cells after CELL, starting with the cell right after CELL. +Returns nil when reaching the end of the list." + (let ((pos 1)) + (catch 'break + (while t + (setq cell (cdr cell)) + (if (not cell) + (throw 'break nil) + (if (funcall function cell) (throw 'break pos)) + (setq pos (1+ pos))))))) + +(defun smex-remove-nth-cell (n list) + "Removes and returns the Nth cell in LIST." + (let* ((previous-cell (nthcdr (- n 1) list)) + (result (cdr previous-cell))) + (setcdr previous-cell (cdr result)) + result)) + +(defun smex-insert-cell (new-cell n list) + "Inserts cell at position N in LIST." + (let* ((cell (nthcdr (- n 1) list)) + (next-cell (cdr cell))) + (setcdr (setcdr cell new-cell) next-cell))) + +;;-------------------------------------------------------------------------------- +;; Help and Reference + +(defun smex-do-with-selected-item (fn) + (setq smex-custom-action fn) + (ido-exit-minibuffer)) + +(defun smex-describe-function () + (interactive) + (smex-do-with-selected-item (lambda (chosen) + (describe-function chosen) + (pop-to-buffer "*Help*")))) + +(defun smex-where-is () + (interactive) + (smex-do-with-selected-item 'where-is)) + +(defun smex-find-function () + (interactive) + (smex-do-with-selected-item 'find-function)) + +(defun smex-extract-commands-from-keymap (map) + (let (commands) + (smex-parse-keymap map commands) + commands)) + +(defun smex-parse-keymap (map commands) + (map-keymap (lambda (binding element) + (if (and (listp element) (eq 'keymap (car element))) + (smex-parse-keymap element commands) + ; Strings are commands, too. Reject them. + (if (and (symbolp element) (commandp element)) + (push element commands)))) + map)) + +(defun smex-extract-commands-from-features (mode) + (let ((library-path (symbol-file mode)) + (mode-name (symbol-name mode)) + commands) + + (string-match "\\(.+?\\)\\(-mode\\)?$" mode-name) + ;; 'lisp-mode' -> 'lisp' + (setq mode-name (match-string 1 mode-name)) + (if (string= mode-name "c") (setq mode-name "cc")) + (setq mode-name (regexp-quote mode-name)) + + (dolist (feature load-history) + (let ((feature-path (car feature))) + (when (and feature-path (or (equal feature-path library-path) + (string-match mode-name (file-name-nondirectory + feature-path)))) + (dolist (item (cdr feature)) + (if (and (listp item) (eq 'defun (car item))) + (let ((function (cdr item))) + (when (commandp function) + (setq commands (append commands (list function)))))))))) + commands)) + +(defun smex-show-unbound-commands () + "Shows unbound commands in a new buffer, +sorted by frequency of use." + (interactive) + (setq smex-data (sort smex-data 'smex-sorting-rules)) + (let ((unbound-commands (delq nil + (mapcar (lambda (command-item) + (unless (where-is-internal (car command-item)) + command-item)) + smex-data)))) + (view-buffer-other-window "*Smex: Unbound Commands*") + (setq buffer-read-only t) + (let ((inhibit-read-only t)) + (erase-buffer) + (ido-pp 'unbound-commands)) + (set-buffer-modified-p nil) + (goto-char (point-min)))) + +(provide 'smex) +;;; smex.el ends here diff --git a/elpa/smex-20140425.1314/smex.elc b/elpa/smex-20140425.1314/smex.elc new file mode 100644 index 0000000000000000000000000000000000000000..e161fe6045385361bf385d42639333eb2b8fc6c7 GIT binary patch literal 12936 zcmc&)`*YhycV&M`NNJ=xuI7l(ULd^$A?Eps&^h{VXwdt=~WRqy|f>x zW;bwMe7udW@9~R|Pk>JwpIv-9`0VL_`P}pH@xN;5-X3~-=;@)Shn^mK`kaNMg0DWV zdifaVV{V@#*o*To_QE_qT7C3juVCq10p$ygD>Dv5`x`NDYzBmo73uoo%8=TSd(^5P0AFqr)QyJ%AH z9Qad2NERk<`TabaWN}`^P>ZH|s%MSf6;VRS=LFqFl*CbjNuLhmyy>kWKgK!E3eaj}vPB(cq$r3iCgMkbg#R&%H zVcUCw-*DKH#5Uqx8;De~(7zcmpkt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S;J5ftlbFT@lqq)R|j8d-W&iu)9Ii-xkus_c|)y;5eJ|GqaV8 z!Bs*j_KO*sS+!ZNY;gG|mkYPN3BYY5xv00>!FpiO`PXxA-(e`t=m}QZP%YC)a@RqA zdvH>iX2Q*0Y?)PIufrx@VnJAmZ|>*Z)_um7^d5rR`VH|PZpz>LH+8$~)z)uX!*27F*7}VD&UT9{Z2xO*d$yrf+ioy}M&CqIuofM1$wUWi_Hr+3mFIGU zyo{BNjIH0VgT<*!71TYQbTN6BX1BYw^YwS#ZVO)|=Zml3eSyNRL_YrXIl$T+7pA(m`EKcmjlKJ9@S*s(v5Vz4F`2(o533ja?IFOnQ}Uqz+e*zQoxe|K8_Kri!2+C^E#1h^Xt4VWv;}tNR1S#yC=P) zQ%fL~BfYQ?lW=4f&`IfI*`!<5BEhaqF&o87eTmxuWqhy@D>=Ug%Q%ZsizRDhw0Zd| zgolC<<|2kYHA~Ymq`umxn%l=n*F06P%^@9XS2;&2p+Ful1S1+#LnFydK$V&R!s9{A d>$)eZV_a9yZ@Z7n>pi>_9-|T=*G^k2{|%$ox_|%x literal 0 HcmV?d00001 diff --git a/elpa/starter-kit-20130904.1547/starter-kit-autoloads.el b/elpa/starter-kit-20130904.1547/starter-kit-autoloads.el new file mode 100644 index 000000000..91e1b13eb --- /dev/null +++ b/elpa/starter-kit-20130904.1547/starter-kit-autoloads.el @@ -0,0 +1,43 @@ +;;; starter-kit-autoloads.el --- automatically extracted autoloads +;; +;;; Code: + + +;;;### (autoloads nil "starter-kit" "starter-kit.el" (21478 16645 +;;;;;; 0 0)) +;;; Generated autoloads from starter-kit.el + +(dolist (mode '(menu-bar-mode tool-bar-mode scroll-bar-mode)) (when (fboundp mode) (funcall mode -1))) + +(mapc 'require '(uniquify starter-kit-defuns starter-kit-misc)) + +(setq esk-system-config (concat user-emacs-directory system-name ".el") esk-user-config (concat user-emacs-directory user-login-name ".el") esk-user-dir (concat user-emacs-directory user-login-name)) + +(setq smex-save-file (concat user-emacs-directory ".smex-items")) + +(smex-initialize) + +(global-set-key (kbd "M-x") 'smex) + +(defun esk-eval-after-init (form) "\ +Add `(lambda () FORM)' to `after-init-hook'. + + If Emacs has already finished initialization, also eval FORM immediately." (let ((func (list (quote lambda) nil form))) (add-hook (quote after-init-hook) func) (when after-init-time (eval form)))) + +(esk-eval-after-init '(progn (when (file-exists-p esk-system-config) (load esk-system-config)) (when (file-exists-p esk-user-config) (load esk-user-config)) (when (file-exists-p esk-user-dir) (mapc 'load (directory-files esk-user-dir t "^[^#].*el$"))))) + +;;;*** + +;;;### (autoloads nil nil ("starter-kit-defuns.el" "starter-kit-misc.el" +;;;;;; "starter-kit-pkg.el") (21478 16645 976622 0)) + +;;;*** + +(provide 'starter-kit-autoloads) +;; Local Variables: +;; version-control: never +;; no-byte-compile: t +;; no-update-autoloads: t +;; coding: utf-8 +;; End: +;;; starter-kit-autoloads.el ends here diff --git a/elpa/starter-kit-20130904.1547/starter-kit-defuns.el b/elpa/starter-kit-20130904.1547/starter-kit-defuns.el new file mode 100644 index 000000000..d460b496b --- /dev/null +++ b/elpa/starter-kit-20130904.1547/starter-kit-defuns.el @@ -0,0 +1,166 @@ +;;; starter-kit-defuns.el --- Saner defaults and goodies: function defs. +;; +;; Copyright (c) 2008-2010 Phil Hagelberg and contributors +;; +;; Author: Phil Hagelberg +;; URL: http://www.emacswiki.org/cgi-bin/wiki/StarterKit +;; Version: 2.0.2 +;; Keywords: convenience + +;; This file is not part of GNU Emacs. + +;;; Commentary: + +;; "Emacs outshines all other editing software in approximately the +;; same way that the noonday sun does the stars. It is not just bigger +;; and brighter; it simply makes everything else vanish." +;; -Neal Stephenson, "In the Beginning was the Command Line" + +;; This file contains all the function definitions for the starter kit. + +;;; License: + +;; 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 GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Code: + +;;; These belong in prog-mode-hook: + +;; We have a number of turn-on-* functions since it's advised that lambda +;; functions not go in hooks. Repeatedly evaling an add-to-list with a +;; hook value will repeatedly add it since there's no way to ensure +;; that a byte-compiled lambda doesn't already exist in the list. + +(defun esk-local-column-number-mode () + (make-local-variable 'column-number-mode) + (column-number-mode t)) + +(defun esk-local-comment-auto-fill () + (set (make-local-variable 'comment-auto-fill-only-comments) t) + (auto-fill-mode t)) + +(defun esk-turn-on-hl-line-mode () + (when (> (display-color-cells) 8) + (hl-line-mode t))) + +(defun esk-turn-on-save-place-mode () + (require 'saveplace) + (setq save-place t)) + +(defun esk-pretty-lambdas () + (font-lock-add-keywords + nil `(("(?\\(lambda\\>\\)" + (0 (progn (compose-region (match-beginning 1) (match-end 1) + ,(make-char 'greek-iso8859-7 107)) + nil)))))) + +(defun esk-add-watchwords () + (font-lock-add-keywords + nil '(("\\<\\(FIX\\(ME\\)?\\|TODO\\|HACK\\|REFACTOR\\|NOCOMMIT\\)" + 1 font-lock-warning-face t)))) + +(add-hook 'prog-mode-hook 'esk-local-column-number-mode) +(add-hook 'prog-mode-hook 'esk-local-comment-auto-fill) +(add-hook 'prog-mode-hook 'esk-turn-on-hl-line-mode) +(add-hook 'prog-mode-hook 'esk-turn-on-save-place-mode) +(add-hook 'prog-mode-hook 'esk-pretty-lambdas) +(add-hook 'prog-mode-hook 'esk-add-watchwords) +(add-hook 'prog-mode-hook 'idle-highlight-mode) + +(defun esk-prog-mode-hook () + (run-hooks 'prog-mode-hook)) + +(defun esk-turn-off-tool-bar () + (if (functionp 'tool-bar-mode) (tool-bar-mode -1))) + +(defun esk-untabify-buffer () + (interactive) + (untabify (point-min) (point-max))) + +(defun esk-indent-buffer () + (interactive) + (indent-region (point-min) (point-max))) + +(defun esk-cleanup-buffer () + "Perform a bunch of operations on the whitespace content of a buffer." + (interactive) + (esk-indent-buffer) + (esk-untabify-buffer) + (delete-trailing-whitespace)) + +;; Commands + +(defun esk-eval-and-replace () + "Replace the preceding sexp with its value." + (interactive) + (backward-kill-sexp) + (condition-case nil + (prin1 (eval (read (current-kill 0))) + (current-buffer)) + (error (message "Invalid expression") + (insert (current-kill 0))))) + +(defun esk-sudo-edit (&optional arg) + (interactive "p") + (if (or arg (not buffer-file-name)) + (find-file (concat "/sudo:root@localhost:" (ido-read-file-name "File: "))) + (find-alternate-file (concat "/sudo:root@localhost:" buffer-file-name)))) + +(defun esk-lorem () + "Insert a lorem ipsum." + (interactive) + (insert "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do " + "eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim" + "ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut " + "aliquip ex ea commodo consequat. Duis aute irure dolor in " + "reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla " + "pariatur. Excepteur sint occaecat cupidatat non proident, sunt in " + "culpa qui officia deserunt mollit anim id est laborum.")) + +(defun esk-suck-it (suckee) + "Insert a comment of appropriate length about what can suck it." + (interactive "MWhat can suck it? ") + (let ((prefix (concat ";; " suckee " can s")) + (postfix "ck it!") + (col (current-column))) + (insert prefix) + (dotimes (_ (- 80 col (length prefix) (length postfix))) (insert "u")) + (insert postfix))) + +(defun esk-insert-date () + "Insert a time-stamp according to locale's date and time format." + (interactive) + (insert (format-time-string "%c" (current-time)))) + +(defun esk-pairing-bot () + "If you can't pair program with a human, use this instead." + (interactive) + (message (if (y-or-n-p "Do you have a test for that? ") "Good." "Bad!"))) + +(defun esk-paredit-nonlisp () + "Turn on paredit mode for non-lisps." + (interactive) + (set (make-local-variable 'paredit-space-for-delimiter-predicates) + '((lambda (endp delimiter) nil))) + (paredit-mode 1)) + +;; A monkeypatch to cause annotate to ignore whitespace +(defun vc-git-annotate-command (file buf &optional rev) + (let ((name (file-relative-name file))) + (vc-git-command buf 0 name "blame" "-w" rev))) + +(provide 'starter-kit-defuns) +;;; starter-kit-defuns.el ends here diff --git a/elpa/starter-kit-20130904.1547/starter-kit-defuns.elc b/elpa/starter-kit-20130904.1547/starter-kit-defuns.elc new file mode 100644 index 0000000000000000000000000000000000000000..742b167f039dc5800ec8f24a4fb9c8b285e983ba GIT binary patch literal 4696 zcmbtY`EMJ?71mF!Eu(;cDA1+{^0Z20vh`40E-6ZO(a4sM3XQA8QJMguPz-m6&I_{_*|Z?5;?Wj8Py2mb*L0yXGC=+vl&pJpIki&d%=h=g;Z1$V#26gr>KYNq2(F zigz-8Srk{jw1{O&MNZ#HM=z>5(J_VNXT$!p(U1oHaOg?QOp(zHMCjmKtBgGWjf0-b zWNdrMfl5nxV4XBh8F8hZz`m$|+#mMB(QtfkCQ-90w>_15vO1^NOoOgLQ$vWsuov}0 zKX;?uf@BKWN~bgZAL+2b_ICZ`#X{R!p2{jq$!#t(9aB=o))}48?NiJe>qsUE6u;vW z9`^>v8#IyvH1fhxT;xt-aph*>2qU?8@y+Sk8N~}}WDM=>Q_o)J3E6^TnbTBJTF84$ z8f7dgX;Q5Wxdj#uqM9#G!@-QDfrBxI_kr63GW6XF48K?MP6l7oMcuc ziuQlVbxOe`>i2Pldy_%vAMi53OMe{D51G7D4TWoIw4B0Ewvcj{G`Q^k6z42cxf8N- zg@B`_D~v;C-ZCCM##^+?JucR^iXu;Mp^G23aQRK?;213eA*&b|re-IJw z;p65YmV3ykA1iGX@sOuN+u4;yId>~knN1To!`gATTH!v#HNtg>YdndVc?e0u!6bNt zTlDhft5>I!ppj&TNMe_`5{N)?rEYHulOV|0mpWfeCY_q$Wb(Jkq#ID5N>j{pcuiIo zRtcl#oDMojGx0)9@s{TZYYMyVm_i8R%^xm@C(VsgS3=w3=xB5-#uWC))B(TlC57Rp z+p$ zc>L%2>G`{NXBS@Ukd|h;k%l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convenience + +;; This file is not part of GNU Emacs. + +;;; Commentary: + +;; "Emacs outshines all other editing software in approximately the +;; same way that the noonday sun does the stars. It is not just bigger +;; and brighter; it simply makes everything else vanish." +;; -Neal Stephenson, "In the Beginning was the Command Line" + +;; This file contains setqs and things that aren't bindings or defuns. + +;;; License: + +;; 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 GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Code: + +(when window-system + (setq frame-title-format '(buffer-file-name "%f" ("%b"))) + (tooltip-mode -1) + (mouse-wheel-mode t) + (blink-cursor-mode -1)) + +;; can't do it at launch or emacsclient won't always honor it +(add-hook 'before-make-frame-hook 'esk-turn-off-tool-bar) + +(setq visible-bell t + inhibit-startup-message t + color-theme-is-global t + sentence-end-double-space nil + shift-select-mode nil + mouse-yank-at-point t + uniquify-buffer-name-style 'forward + whitespace-style '(face trailing lines-tail tabs) + whitespace-line-column 80 + ediff-window-setup-function 'ediff-setup-windows-plain + oddmuse-directory (concat user-emacs-directory "oddmuse") + save-place-file (concat user-emacs-directory "places") + backup-directory-alist `(("." . ,(concat user-emacs-directory "backups"))) + diff-switches "-u") + +(add-to-list 'safe-local-variable-values '(lexical-binding . t)) +(add-to-list 'safe-local-variable-values '(whitespace-line-column . 80)) + +;; Set this to whatever browser you use +;; (setq browse-url-browser-function 'browse-url-firefox) +;; (setq browse-url-browser-function 'browse-default-macosx-browser) +;; (setq browse-url-browser-function 'browse-default-windows-browser) +;; (setq browse-url-browser-function 'browse-default-kde) +;; (setq browse-url-browser-function 'browse-default-epiphany) +;; (setq browse-url-browser-function 'browse-default-w3m) +;; (setq browse-url-browser-function 'browse-url-generic +;; browse-url-generic-program "~/src/conkeror/conkeror") + +;; Highlight matching parentheses when the point is on them. +(show-paren-mode 1) + +;; ido-mode is like magic pixie dust! +(ido-mode t) +(ido-ubiquitous-mode) +(setq ido-enable-prefix nil + ido-enable-flex-matching t + ido-auto-merge-work-directories-length nil + ido-create-new-buffer 'always + ido-use-filename-at-point 'guess + ido-use-virtual-buffers t + ido-handle-duplicate-virtual-buffers 2 + ido-max-prospects 10) + +(require 'ffap) +(defvar ffap-c-commment-regexp "^/\\*+" + "Matches an opening C-style comment, like \"/***\".") + +(defadvice ffap-file-at-point (after avoid-c-comments activate) + "Don't return paths like \"/******\" unless they actually exist. + +This fixes the bug where ido would try to suggest a C-style +comment as a filename." + (ignore-errors + (when (and ad-return-value + (string-match-p ffap-c-commment-regexp + ad-return-value) + (not (ffap-file-exists-string ad-return-value))) + (setq ad-return-value nil)))) + +(set-default 'indent-tabs-mode nil) +(set-default 'indicate-empty-lines t) +(set-default 'imenu-auto-rescan t) + +(add-hook 'text-mode-hook 'turn-on-auto-fill) +;; (when (executable-find ispell-program-name) +;; (add-hook 'text-mode-hook 'turn-on-flyspell)) + +(eval-after-load "ispell" + '(when (executable-find ispell-program-name) + (add-hook 'text-mode-hook 'turn-on-flyspell))) + + + +(defalias 'yes-or-no-p 'y-or-n-p) +(defalias 'auto-tail-revert-mode 'tail-mode) + +(random t) ;; Seed the random-number generator + +;; Hippie expand: at times perhaps too hip +(eval-after-load 'hippie-exp + '(progn + (dolist (f '(try-expand-line try-expand-list try-complete-file-name-partially)) + (delete f hippie-expand-try-functions-list)) + + ;; Add this back in at the end of the list. + (add-to-list 'hippie-expand-try-functions-list 'try-complete-file-name-partially t))) + +(eval-after-load 'grep + '(when (boundp 'grep-find-ignored-files) + (add-to-list 'grep-find-ignored-files "*.class"))) + +;; Cosmetics + +(eval-after-load 'diff-mode + '(progn + (set-face-foreground 'diff-added "green4") + (set-face-foreground 'diff-removed "red3"))) + +(eval-after-load 'magit + '(progn + (set-face-foreground 'magit-diff-add "green4") + (set-face-foreground 'magit-diff-del "red3"))) + +;; Get around the emacswiki spam protection +(eval-after-load 'oddmuse + (add-hook 'oddmuse-mode-hook + (lambda () + (unless (string-match "question" oddmuse-post) + (setq oddmuse-post (concat "uihnscuskc=1;" oddmuse-post)))))) + +(provide 'starter-kit-misc) +;;; starter-kit-misc.el ends here diff --git a/elpa/starter-kit-20130904.1547/starter-kit-misc.elc b/elpa/starter-kit-20130904.1547/starter-kit-misc.elc new file mode 100644 index 0000000000000000000000000000000000000000..52d53646d6e1f3b552c76b3bffce5b8cac5dfe8b GIT binary patch literal 3660 zcmbtXTW{pH72d~%ffj9=OdorqP2d@4Io8d$7)35_9s)GL0%@NzTY!?N8N!mNC8@Ee zzdqlgG~@AR7kP*Q$s&1p?&mvaZh!dq-QQolcyV%jdrNnw?RBFnDt6RL|1BOTev;+) z#@sI(Q_6-+M?XtX-wkV`8%nOe&f~8ya!TVQ4=ieHTB^Z>&j0I_b?4x5zErI&-Lg7Y zO)t-#m)0vQ?zI=Vm&G@6zDzFit7j*zcI8qvfvN832j)OqaMVyC&6n9S31<)5Z%8)K ztoORr|Cb&FZg~<8|Fh9<)MjwXQMK!2t4pd(>Acn5+P%i9b)IBZ!R&*a;=$MA8ati%?&rH7f249Ftt?@idmY5ft|DislpPg{8Y7s-GQ+hzon3}~+{&}rHQxE`25&xNmhn|YzdY!!G7rM-oL8s^D_bSJ_Kgy? zu_y`JYNrb<3x(9x-9{IvhEN$pFIwfCTr1>RW32ESh1=SRbz=&Ypi`Y!U8#iXDp8q% z*|=Voisr>o*QhM6KY>(7%)YE6nnzz2(PBZ~n8s_c=V*$AT7#+(4;!VLanDoH==>U2XOe~`AKdCj_cD>ay} z2`}XY>Zc(u3%8)_m{g^4+bIv@N7p&gH(X+osj3!gMigPAR1P0YJcTUphn`nrh`4+q zTQnM_>}0J(04uSTR!erzRyG4_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h4ker`UcbJ z#h-X!&tAUaDf=(ec)D-)z2Si=RQHG#6urab!czh!t3hu%R}SvJ{AY3-y`}6e!N9G? Q^mzOmj(@4WrHjSMudPR+TmS$7 literal 0 HcmV?d00001 diff --git a/elpa/starter-kit-20130904.1547/starter-kit-pkg.el b/elpa/starter-kit-20130904.1547/starter-kit-pkg.el new file mode 100644 index 000000000..8df43bb2a --- /dev/null +++ b/elpa/starter-kit-20130904.1547/starter-kit-pkg.el @@ -0,0 +1,7 @@ +(define-package "starter-kit" "20130904.1547" "Saner defaults and goodies." + '((paredit "22") + (idle-highlight-mode "1.1.1") + (find-file-in-project "3.0") + (smex "1.1.2") + (ido-ubiquitous "0.3") + (magit "0.8.1"))) diff --git a/elpa/starter-kit-20130904.1547/starter-kit-pkg.elc b/elpa/starter-kit-20130904.1547/starter-kit-pkg.elc new file mode 100644 index 0000000000000000000000000000000000000000..2c663cfb58061bbcf77863cebc90e564d8613dc6 GIT binary patch literal 751 zcmbu7&u-f=490Wz3+zhxvIMB)zeStovM%VMz;?>^0F0#AT4c!+tOz=2$09&Z; z9@_HZwuQQ^+68fnVSp1up!iBAQo)QungJC_T^KiFK?!3rQJifOoY$1wvX#|sdv~Rb z=S~{8Fs+BD82~>RXt{#Am5rniSN`P8(*MEJgt*p2IF?3*t4+&K82|0L5Cvnezym&n9pPxbX7*TO+bhFr_ z*FXUjdN>+z0k2G6n;|e5oi!0s&w+Jw@#S&6Y0U+^b!Az$*5+ir5hJQIb_Vi)hL=Nr zH9kHc&~qc4gOf`H^96JvXlqF3@P54>F&b?XC)W7})>b`+PmW|fV# yn4glcUW_q(Gm0}CS>}I!8-p|O*Ci?@HeB9{( literal 0 HcmV?d00001 diff --git a/elpa/starter-kit-20130904.1547/starter-kit.el b/elpa/starter-kit-20130904.1547/starter-kit.el new file mode 100644 index 000000000..3ac557b5d --- /dev/null +++ b/elpa/starter-kit-20130904.1547/starter-kit.el @@ -0,0 +1,75 @@ +;;; starter-kit.el --- Saner defaults and goodies. +;; +;; Copyright (c) 2008-2011 Phil Hagelberg and contributors +;; +;; Author: Phil Hagelberg +;; URL: http://www.emacswiki.org/cgi-bin/wiki/StarterKit +;; Version: 2.0.2 +;; Keywords: convenience + +;; This file is not part of GNU Emacs. + +;;; Commentary: + +;; "Emacs outshines all other editing software in approximately the +;; same way that the noonday sun does the stars. It is not just bigger +;; and brighter; it simply makes everything else vanish." +;; -Neal Stephenson, "In the Beginning was the Command Line" + +;; This file just brings together other pieces of the starter kit plus +;; user- and host-specific configs. + +;;; License: + +;; 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 GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Code: + +;;;###autoload +(progn + ;; Turn off mouse interface early in startup to avoid momentary display + (dolist (mode '(menu-bar-mode tool-bar-mode scroll-bar-mode)) + (when (fboundp mode) (funcall mode -1))) + + (mapc 'require '(uniquify starter-kit-defuns starter-kit-misc)) + + ;; You can keep system- or user-specific customizations here + (setq esk-system-config (concat user-emacs-directory system-name ".el") + esk-user-config (concat user-emacs-directory user-login-name ".el") + esk-user-dir (concat user-emacs-directory user-login-name)) + + (setq smex-save-file (concat user-emacs-directory ".smex-items")) + (smex-initialize) + (global-set-key (kbd "M-x") 'smex) + + (defun esk-eval-after-init (form) + "Add `(lambda () FORM)' to `after-init-hook'. + + If Emacs has already finished initialization, also eval FORM immediately." + (let ((func (list 'lambda nil form))) + (add-hook 'after-init-hook func) + (when after-init-time + (eval form)))) + + (esk-eval-after-init + '(progn + (when (file-exists-p esk-system-config) (load esk-system-config)) + (when (file-exists-p esk-user-config) (load esk-user-config)) + (when (file-exists-p esk-user-dir) + (mapc 'load (directory-files esk-user-dir t "^[^#].*el$")))))) + +(provide 'starter-kit) +;;; starter-kit.el ends here diff --git a/elpa/starter-kit-20130904.1547/starter-kit.elc b/elpa/starter-kit-20130904.1547/starter-kit.elc new file mode 100644 index 0000000000000000000000000000000000000000..f93cfabb38e393ede73f7b9c2e1c87c956841ad9 GIT binary patch literal 1637 zcmbtUU2oeq6!l}`VZe&5*$Nccty3UU5i0s}oHQ@Vf(!_-V%@qu#V$%qlud*pJ&{i9 z{`wu#UgNGE_D}+pczG}H2k$vNyZYtw`(CftKRY|4OVci-5;aX%)N*%@Y1s>2{bbB- zqD;jV8BMRaql@K?=#;Y2^D=!tEGbX3GPr0u(^3N`bo8ecojrn&qeQg4vPpd;)Pf&b z$2%uFb}JpjxgtGH%Oo3?qiszhRPZM?UHQXw2WJw|^D-%tEa=`!Hz%%;)WXSDzUK}G zHt7fDA9HEfi7c(KRIfB|Wkt2Atm~wn*+XbM>xkDiD*g~BJ5BP_Pkht{KD2RE8SOZX zm#$$a*wO6b)#ddyRde3)3T4^D5T5Irtf7i)nhH{ee-va>j3vQ4B}GSW4#T`y$3-i? zX!r!aboBfEXu5KORi+j+7#Ha==IDoUo@I~5d0IT~?Vf)#F0ypzi5DOCb|7R}XX);R zw|ao>a;NtU+c{=|S&j!@Kh|GC82#%iOabqwuLj1jurv4AsH%T83zbStte>qN`YdO^b8vW<);HgdK;qRdR{ zwMEnly<}6~u@J!-qwXbJbw=IGF=?r&nVO}p7sN8~Wl>Ql{#qh9MN2KQYLLMe*lW=& zwf$(Tm9~m$0JIPAwXJx^Br>)GTCcTqk}LUM&`g;rSIi2>ZpDgjvZBnh(MfqS38taE za0i>>e7Ql!ZLFPHekYix=7h?)zkiNEs{sSdoV)&qktaQOY`1&3&@ebg%Z1E{BV~YHH@fig)|K(w;_1ovSxBu@nfC7_%") 'menu-bar-mode) + +(define-key global-map (kbd "C-+") 'text-scale-increase) + +(define-key global-map (kbd "C--") 'text-scale-decrease) + +(global-set-key (kbd "C-s") 'isearch-forward-regexp) + +(global-set-key (kbd "") 'isearch-backward-regexp) + +(global-set-key (kbd "M-%") 'query-replace-regexp) + +(global-set-key (kbd "C-M-s") 'isearch-forward) + +(global-set-key (kbd "C-M-r") 'isearch-backward) + +(global-set-key (kbd "C-M-%") 'query-replace) + +(global-set-key (kbd "C-x C-i") 'imenu) + +(global-set-key (kbd "C-x M-f") 'ido-find-file-other-window) + +(global-set-key (kbd "C-c y") 'bury-buffer) + +(global-set-key (kbd "C-c r") 'revert-buffer) + +(windmove-default-keybindings) + +(global-set-key (kbd "C-x O") (lambda nil (interactive) (other-window -1))) + +(global-set-key (kbd "C-x C-o") (lambda nil (interactive) (other-window 2))) + +(global-set-key (kbd "C-x m") 'eshell) + +(global-set-key (kbd "C-x M") (lambda nil (interactive) (eshell t))) + +(global-set-key (kbd "C-x C-m") 'shell) + +(global-set-key (kbd "C-c x") 'execute-extended-command) + +(define-key 'help-command "a" 'apropos) + +(global-set-key (kbd "C-c e") 'esk-eval-and-replace) + +(global-set-key (kbd "C-c q") 'join-line) + +(global-set-key (kbd "C-c g") 'magit-status) + +(eval-after-load 'vc (define-key vc-prefix-map "i" '(lambda nil (interactive) (if (not (eq 'Git (vc-backend buffer-file-name))) (vc-register) (shell-command (format "git add %s" buffer-file-name)) (message "Staged changes."))))) + +(define-key isearch-mode-map (kbd "C-o") (lambda nil (interactive) (let ((case-fold-search isearch-case-fold-search)) (occur (if isearch-regexp isearch-string (regexp-quote isearch-string)))))) + +;;;*** + +;;;### (autoloads nil nil ("starter-kit-bindings-pkg.el") (21478 +;;;;;; 16644 603092 0)) + +;;;*** + +(provide 'starter-kit-bindings-autoloads) +;; Local Variables: +;; version-control: never +;; no-byte-compile: t +;; no-update-autoloads: t +;; coding: utf-8 +;; End: +;;; starter-kit-bindings-autoloads.el ends here diff --git a/elpa/starter-kit-bindings-20120101.1955/starter-kit-bindings-pkg.el b/elpa/starter-kit-bindings-20120101.1955/starter-kit-bindings-pkg.el new file mode 100644 index 000000000..859712c24 --- /dev/null +++ b/elpa/starter-kit-bindings-20120101.1955/starter-kit-bindings-pkg.el @@ -0,0 +1 @@ +(define-package "starter-kit-bindings" "20120101.1955" "Saner defaults and goodies: bindings" (quote ((starter-kit "2.0.2")))) diff --git a/elpa/starter-kit-bindings-20120101.1955/starter-kit-bindings-pkg.elc b/elpa/starter-kit-bindings-20120101.1955/starter-kit-bindings-pkg.elc new file mode 100644 index 0000000000000000000000000000000000000000..8d9207dc1b279a2561568e2556fde7b0f11de64e GIT binary patch literal 681 zcmbu7&u+pn48}S41$MQ18Avpx1+)Q|F~k9BJFz{0NkWN8lPV6I*wfE+e>601M9Cqs z^ZP!>nJu3dH=Rx=nayUf@O5LXR9~Y)P>fo{HuxI041xTWbfBCWxzIIA5-QiW!JHz7s6)0lG20lYjH@VP0M9`oiph9< zIi=ZGLfclwI9Q&L@Wv8`J(VLd6h#|*H*p7O*=iF_Z9Xt^0*RyzzU&Nr**lOXP)CQg zk)XV!7*0m|91Ro!mEw2!)hQ;Tocv=b&kW}yNbe$Y@*!@sdp>d5e7#t$K<+T0z>% literal 0 HcmV?d00001 diff --git a/elpa/starter-kit-bindings-20120101.1955/starter-kit-bindings.el b/elpa/starter-kit-bindings-20120101.1955/starter-kit-bindings.el new file mode 100644 index 000000000..ad14d1a7a --- /dev/null +++ b/elpa/starter-kit-bindings-20120101.1955/starter-kit-bindings.el @@ -0,0 +1,124 @@ +;;; starter-kit-bindings.el --- Saner defaults and goodies: bindings +;; +;; Copyright (c) 2008-2010 Phil Hagelberg and contributors +;; +;; Author: Phil Hagelberg +;; URL: http://www.emacswiki.org/cgi-bin/wiki/StarterKit +;; Version: 20120101.1955 +;; X-Original-Version: 2.0.2 +;; Keywords: convenience +;; Package-Requires: ((starter-kit "2.0.2")) + +;; This file is not part of GNU Emacs. + +;;; Commentary: + +;; "Emacs outshines all other editing software in approximately the +;; same way that the noonday sun does the stars. It is not just bigger +;; and brighter; it simply makes everything else vanish." +;; -Neal Stephenson, "In the Beginning was the Command Line" + +;; This file just contains key bindings. + +;;; License: + +;; 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 GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Code: + +;;;###autoload +(progn + ;; It's all about the project. + (global-set-key (kbd "C-c f") 'find-file-in-project) + + ;; You know, like Readline. + (global-set-key (kbd "C-M-h") 'backward-kill-word) + + ;; Completion that uses many different methods to find options. + (global-set-key (kbd "M-/") 'hippie-expand) + + ;; Perform general cleanup. + (global-set-key (kbd "C-c n") 'esk-cleanup-buffer) + + ;; Turn on the menu bar for exploring new modes + (global-set-key (kbd "C-") 'menu-bar-mode) + + ;; Font size + (define-key global-map (kbd "C-+") 'text-scale-increase) + (define-key global-map (kbd "C--") 'text-scale-decrease) + + ;; Use regex searches by default. + (global-set-key (kbd "C-s") 'isearch-forward-regexp) + (global-set-key (kbd "\C-r") 'isearch-backward-regexp) + (global-set-key (kbd "M-%") 'query-replace-regexp) + (global-set-key (kbd "C-M-s") 'isearch-forward) + (global-set-key (kbd "C-M-r") 'isearch-backward) + (global-set-key (kbd "C-M-%") 'query-replace) + + ;; Jump to a definition in the current file. (Protip: this is awesome.) + (global-set-key (kbd "C-x C-i") 'imenu) + + ;; File finding + (global-set-key (kbd "C-x M-f") 'ido-find-file-other-window) + (global-set-key (kbd "C-c y") 'bury-buffer) + (global-set-key (kbd "C-c r") 'revert-buffer) + + ;; Window switching. (C-x o goes to the next window) + (windmove-default-keybindings) ;; Shift+direction + (global-set-key (kbd "C-x O") (lambda () (interactive) (other-window -1))) ;; back one + (global-set-key (kbd "C-x C-o") (lambda () (interactive) (other-window 2))) ;; forward two + + ;; Start eshell or switch to it if it's active. + (global-set-key (kbd "C-x m") 'eshell) + + ;; Start a new eshell even if one is active. + (global-set-key (kbd "C-x M") (lambda () (interactive) (eshell t))) + + ;; Start a regular shell if you prefer that. + (global-set-key (kbd "C-x C-m") 'shell) + + ;; If you want to be able to M-x without meta (phones, etc) + (global-set-key (kbd "C-c x") 'execute-extended-command) + + ;; Help should search more than just commands + (define-key 'help-command "a" 'apropos) + + ;; Should be able to eval-and-replace anywhere. + (global-set-key (kbd "C-c e") 'esk-eval-and-replace) + + ;; M-S-6 is awkward + (global-set-key (kbd "C-c q") 'join-line) + + ;; So good! + (global-set-key (kbd "C-c g") 'magit-status) + + ;; This is a little hacky since VC doesn't support git add internally + (eval-after-load 'vc + (define-key vc-prefix-map "i" + '(lambda () (interactive) + (if (not (eq 'Git (vc-backend buffer-file-name))) + (vc-register) + (shell-command (format "git add %s" buffer-file-name)) + (message "Staged changes."))))) + + ;; Activate occur easily inside isearch + (define-key isearch-mode-map (kbd "C-o") + (lambda () (interactive) + (let ((case-fold-search isearch-case-fold-search)) + (occur (if isearch-regexp isearch-string (regexp-quote isearch-string))))))) + +(provide 'starter-kit-bindings) +;;; starter-kit-bindings.el ends here diff --git a/elpa/starter-kit-bindings-20120101.1955/starter-kit-bindings.elc b/elpa/starter-kit-bindings-20120101.1955/starter-kit-bindings.elc new file mode 100644 index 0000000000000000000000000000000000000000..1749c3a520c90bda91ba240ce01a24a86ae18213 GIT binary patch literal 2366 zcmbtWOK;mo5EkG|qM$9%9-7|9YZR4%tSr8*_!7qriU19IaC?$^nS$e-i0?t#8M< zPDM_-q-$a6vRM&L$xGgbledvi{=^Ggh-Iw{S^|X5{xY&QXTUfc%R;1PoSn(M5@*JW z+RB>WD$5tD%v8BD902&6cw=uGMPC#d%e>W~O8Vg7Xajf!d;D-5jJ=k3uk4yc4l^sO z3iY?J5HRCm%lvb#%+9pNNJH7S6opDD)2XqwGvW=nwXr0!3^6$9@up*c`Y()31EbWI zQe9dB;l?icIVdH+yuSMQkDD-Wfwu)VY#1*);_H zV5b+!`KpgI;A=m_;c&FrTFFzLNn$s_B)}8miEh}9?@jiU81LjM#c@2ZNAW=kdKBPz z2OKYcfn#zL_>+?za!c_&Q2af`Y4_a|KE?4PP~sj1Fu~+0B>+s|_b9*#dN=`af*wu) zoUn%z0w?U@gun@VI3aMt15TLGW1u30CF+GGLRg|+SR#ZaI)uf!93i|>FT62u;vP;6 zocMs_;YJLc7^cMWljz0pDCv2Wz@wz+Q3938!J`Ba3E;f=C4M9~=-79IlP;1_R65e- zzQC3aK!vr0y`+(r-^wkq zqa{O+mKk>whN}{n^=Fw{nt4ctmn1I$o!MX2=sdC-z}*51H8OmoUi10YV||0(~AJHY(FdM3)V1*BI*e zIO}_ab<1ecz`%Vx*-_1?mKbvw`nwQ2(L!$|M^r_Vw<+%S0kr (display-color-cells) 8) (font-lock-add-keywords (intern (concat (symbol-name mode) "-mode")) '(("(\\|)" quote esk-paren-face)))) (add-hook (intern (concat (symbol-name mode) "-mode-hook")) 'paredit-mode)) + +(defun esk-pretty-fn nil (font-lock-add-keywords nil `(("(\\(\\\\)" (0 (progn (compose-region (match-beginning 1) (match-end 1) "ƒ" 'decompose-region))))))) + +(add-hook 'clojure-mode-hook 'esk-pretty-fn) + +(add-hook 'clojurescript-mode-hook 'esk-pretty-fn) + +;;;*** + +;;;### (autoloads nil nil ("starter-kit-lisp-pkg.el") (21478 16643 +;;;;;; 207711 0)) + +;;;*** + +(provide 'starter-kit-lisp-autoloads) +;; Local Variables: +;; version-control: never +;; no-byte-compile: t +;; no-update-autoloads: t +;; coding: utf-8 +;; End: +;;; starter-kit-lisp-autoloads.el ends here diff --git a/elpa/starter-kit-lisp-20120504.1225/starter-kit-lisp-pkg.el b/elpa/starter-kit-lisp-20120504.1225/starter-kit-lisp-pkg.el new file mode 100644 index 000000000..7f40fb629 --- /dev/null +++ b/elpa/starter-kit-lisp-20120504.1225/starter-kit-lisp-pkg.el @@ -0,0 +1 @@ +(define-package "starter-kit-lisp" "20120504.1225" "Saner defaults and goodies for lisp languages" (quote ((starter-kit "2.0.2") (elisp-slime-nav "0.1")))) diff --git a/elpa/starter-kit-lisp-20120504.1225/starter-kit-lisp-pkg.elc b/elpa/starter-kit-lisp-20120504.1225/starter-kit-lisp-pkg.elc new file mode 100644 index 0000000000000000000000000000000000000000..2a0c6e31654123946e6cb5e016b9f21f94cf2b79 GIT binary patch literal 702 zcmbu7%}&EG499ow3vji1VUyOh4Vz%>0!$o`;52vuFG;&-X;Q^02%a9VAjHQJOF1OA zfByJqeS5z-nM@|xdcB5C=z8mnhTSW4n6CIx@qp?kgoAKFp@ZOIiwUlW7GMSS`Q@Uz zTuP8ty%-Tq3>`EKf%1t=q>>q>FdZrqx-_oGk`l&bVsWskaF+UllV!E67NVAN`Pbba zT4CHsw;pbfD0pVH{cFFQ8yU(2#=s!e0PDSA`~Yz^eUWy~S} zAtc|o=y@7W#K9$k;}+TwwB_wJA;M97aOm5Cft17Pbovd-I8h0i&tPiCZ$i#?rttU- Lc_r$6Hk)Pds8-S; literal 0 HcmV?d00001 diff --git a/elpa/starter-kit-lisp-20120504.1225/starter-kit-lisp.el b/elpa/starter-kit-lisp-20120504.1225/starter-kit-lisp.el new file mode 100644 index 000000000..e9c8821e1 --- /dev/null +++ b/elpa/starter-kit-lisp-20120504.1225/starter-kit-lisp.el @@ -0,0 +1,98 @@ +;;; starter-kit-lisp.el --- Saner defaults and goodies for lisp languages +;; +;; Copyright (c) 2008-2011 Phil Hagelberg and contributors +;; +;; Author: Phil Hagelberg +;; URL: http://www.emacswiki.org/cgi-bin/wiki/StarterKit +;; Version: 20120504.1225 +;; X-Original-Version: 2.0.3 +;; Keywords: convenience +;; Package-Requires: ((starter-kit "2.0.2") (elisp-slime-nav "0.1")) + +;; This file is not part of GNU Emacs. + +;;; Commentary: + +;; "Emacs outshines all other editing software in approximately the +;; same way that the noonday sun does the stars. It is not just bigger +;; and brighter; it simply makes everything else vanish." +;; -Neal Stephenson, "In the Beginning was the Command Line" + +;; This file contains tweaks specific to Lisp languages. + +;;; License: + +;; 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 GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Code: + +;; Emacs Lisp + +;;;###autoload +(progn + (add-hook 'emacs-lisp-mode-hook 'turn-on-eldoc-mode) + (add-hook 'emacs-lisp-mode-hook 'esk-remove-elc-on-save) + (add-hook 'emacs-lisp-mode-hook 'esk-prog-mode-hook) + (add-hook 'emacs-lisp-mode-hook 'elisp-slime-nav-mode) + + (defun esk-remove-elc-on-save () + "If you're saving an elisp file, likely the .elc is no longer valid." + (make-local-variable 'after-save-hook) + (add-hook 'after-save-hook + (lambda () + (if (file-exists-p (concat buffer-file-name "c")) + (delete-file (concat buffer-file-name "c")))))) + + (define-key emacs-lisp-mode-map (kbd "C-c v") 'eval-buffer) + +;;; Enhance Lisp Modes + + (define-key read-expression-map (kbd "TAB") 'lisp-complete-symbol) + (define-key lisp-mode-shared-map (kbd "RET") 'reindent-then-newline-and-indent) + + ;; TODO: look into parenface package + (defface esk-paren-face + '((((class color) (background dark)) + (:foreground "grey50")) + (((class color) (background light)) + (:foreground "grey55"))) + "Face used to dim parentheses." + :group 'starter-kit-faces) + + (eval-after-load 'paredit + ;; need a binding that works in the terminal + '(progn + (define-key paredit-mode-map (kbd "M-)") 'paredit-forward-slurp-sexp) + (define-key paredit-mode-map (kbd "M-(") 'paredit-backward-slurp-sexp))) + + (dolist (mode '(scheme emacs-lisp lisp clojure clojurescript)) + (when (> (display-color-cells) 8) + (font-lock-add-keywords (intern (concat (symbol-name mode) "-mode")) + '(("(\\|)" . 'esk-paren-face)))) + (add-hook (intern (concat (symbol-name mode) "-mode-hook")) + 'paredit-mode)) + + (defun esk-pretty-fn () + (font-lock-add-keywords nil `(("(\\(\\\\)" + (0 (progn (compose-region (match-beginning 1) + (match-end 1) + "\u0192" + 'decompose-region))))))) + (add-hook 'clojure-mode-hook 'esk-pretty-fn) + (add-hook 'clojurescript-mode-hook 'esk-pretty-fn)) + +(provide 'starter-kit-lisp) +;;; starter-kit-lisp.el ends here diff --git a/elpa/starter-kit-lisp-20120504.1225/starter-kit-lisp.elc b/elpa/starter-kit-lisp-20120504.1225/starter-kit-lisp.elc new file mode 100644 index 0000000000000000000000000000000000000000..30bc614066fc7787d03bd5a8f1a14cddfaaef1d3 GIT binary patch literal 2399 zcma)8U60#D6kUlI8q_C{cmRpp*;cVpC+m--X?H8=QWdEZMMwo+>Pk%Pabhx_F*8n< zAbtfuir>W<+u3Zo6k%yLo_ptB-;Z<8?8S@ko_~6Bax%KOxS;2zZYm`UTI{G6?K3RL zUy1x1W7ZR8a-qm*dM#SI+$@QnP&_}MM(4AHk|>^bE=p@^D&d6Aesa>fGx#{0$XeuX zQk+TEh%?s;+e*vVRm)Z78V=(mnnlw|oFubb>WNgH=StHH?}oN;TOp2QI!PySr@N}! z6$yp#nzpK|KSYZIZZhhWKdvg*hm;%Lib^}$v?YH`+Gu|H`uWS3l&^#pIf8NzI}@P` za)xrDwP|S~Nf}X~E|qT05Ji%Zu_T36m9&#l;7x*s+32F7ahES20u4vxpWrD4!pf44 zloZ6A0wwhl860WCFr=?9_r|WZm0ofsookNI5ld3GKPIh3RP2`rZcJCgQNHhJ32|S( zB=vzSfovI_-VejBN@)Lkp3!I&EOxErxhW*EER76`(cb(_x{;M|xqqv6`bpQWYlWUQW`jxs|oqN=S3BbYk0!8*7%`p}}M4%&DrD zT#Id|c}rsA7zKqa@rojk-xJsA8(pbG#qJHoN`~@v#p()Ci?!t4eDSTYl~`bWMCoV5=htU+ zU95xG_(R`>AK*8d-95p3dJy>fE;eNeAATB9gj#mlart}YFxCyRoKYc_L~H#Kl;g*o`I-N~Bdq!9kj(5(mU;-p@wFt=*doa|9YpaIn;8}?<9U`QIG@B1 zdJhRsCMni6QW6|Z9(@LN{5eufzdy;!XCFg0rz}mQpS|oU(oKQE6xM0_(LMZ~q7Z4? zq00x9;$t_obFZC70~*Uq@BI^anvPGt^q<44FIhi<2PD>_AuC0Jsx=m~2U_7?b~xcc z9kS?z9Y#4X474o=(&#{}nr#(^`zm_=1n&a9|f3jBa;@Tr}qd|KlQ#T!Fo{;d&NT*(s-{$a#z9@+^LOi zxI-V2+W+wq-1Oqh_O2WFarsJOt`4Z_+DW-Gziz-T!>`M2)wCgbHYmU{O6)+U=m*cG zQjQ)|iHpe-z?%Cp2Uf0(Eu6n@q}9}eq90+_rOVJA7G&9LZ`&O&H63VXPwpMvcT@77aD9G#TnO!Hsk7{>EJK7rblpA=bmJsg zeCe<70RJ82E55)^Yfr>6irUL05Q-i9`!7agVEo7s5DP<3ShpDJDA?<}3H);7wgMeR nGtZhwm(b9x9!~wWgzM%|kfUbaI0ayCD_l-DvFz!gyKepgLOJkp literal 0 HcmV?d00001 diff --git a/elpa/starter-kit-ruby-20120202.1132/starter-kit-ruby-autoloads.el b/elpa/starter-kit-ruby-20120202.1132/starter-kit-ruby-autoloads.el new file mode 100644 index 000000000..104fd7797 --- /dev/null +++ b/elpa/starter-kit-ruby-20120202.1132/starter-kit-ruby-autoloads.el @@ -0,0 +1,65 @@ +;;; starter-kit-ruby-autoloads.el --- automatically extracted autoloads +;; +;;; Code: + + +;;;### (autoloads nil "starter-kit-ruby" "starter-kit-ruby.el" (21478 +;;;;;; 16642 0 0)) +;;; Generated autoloads from starter-kit-ruby.el + +(eval-after-load 'ruby-mode '(progn (ignore-errors (require 'ruby-compilation)) (setq ruby-use-encoding-map nil) (add-hook 'ruby-mode-hook 'inf-ruby-keys) (define-key ruby-mode-map (kbd "RET") 'reindent-then-newline-and-indent) (define-key ruby-mode-map (kbd "C-M-h") 'backward-kill-word))) + +(define-key 'help-command (kbd "S-r") 'ri) + +(add-to-list 'auto-mode-alist '("\\.rake$" . ruby-mode)) + +(add-to-list 'auto-mode-alist '("\\.thor$" . ruby-mode)) + +(add-to-list 'auto-mode-alist '("\\.gemspec$" . ruby-mode)) + +(add-to-list 'auto-mode-alist '("\\.ru$" . ruby-mode)) + +(add-to-list 'auto-mode-alist '("Rakefile$" . ruby-mode)) + +(add-to-list 'auto-mode-alist '("Thorfile$" . ruby-mode)) + +(add-to-list 'auto-mode-alist '("Gemfile$" . ruby-mode)) + +(add-to-list 'auto-mode-alist '("Capfile$" . ruby-mode)) + +(add-to-list 'auto-mode-alist '("Vagrantfile$" . ruby-mode)) + +(add-to-list 'completion-ignored-extensions ".rbc") + +(add-to-list 'completion-ignored-extensions ".rbo") + +(defun pcomplete/rake nil "\ +Completion rules for the `ssh' command." (pcomplete-here (pcmpl-rake-tasks))) + +(defun pcmpl-rake-tasks nil "\ +Return a list of all the rake tasks defined in the current +projects. I know this is a hack to put all the logic in the +exec-to-string command, but it works and seems fast" (delq nil (mapcar (quote (lambda (line) (if (string-match "rake \\([^ ]+\\)" line) (match-string 1 line)))) (split-string (shell-command-to-string "rake -T") "[ +]")))) + +(defun rake (task) (interactive (list (completing-read "Rake (default: default): " (pcmpl-rake-tasks)))) (shell-command-to-string (concat "rake " (if (= 0 (length task)) "default" task)))) + +(eval-after-load 'ruby-compilation '(progn (defadvice ruby-do-run-w/compilation (before kill-buffer (name cmdlist)) (let ((comp-buffer-name (format "*%s*" name))) (when (get-buffer comp-buffer-name) (with-current-buffer comp-buffer-name (delete-region (point-min) (point-max)))))) (ad-activate 'ruby-do-run-w/compilation))) + +(setq rinari-major-modes (list 'mumamo-after-change-major-mode-hook 'dired-mode-hook 'ruby-mode-hook 'css-mode-hook 'yaml-mode-hook 'javascript-mode-hook)) + +;;;*** + +;;;### (autoloads nil nil ("starter-kit-ruby-pkg.el") (21478 16642 +;;;;;; 437362 0)) + +;;;*** + +(provide 'starter-kit-ruby-autoloads) +;; Local Variables: +;; version-control: never +;; no-byte-compile: t +;; no-update-autoloads: t +;; coding: utf-8 +;; End: +;;; starter-kit-ruby-autoloads.el ends here diff --git a/elpa/starter-kit-ruby-20120202.1132/starter-kit-ruby-pkg.el b/elpa/starter-kit-ruby-20120202.1132/starter-kit-ruby-pkg.el new file mode 100644 index 000000000..a065787a6 --- /dev/null +++ b/elpa/starter-kit-ruby-20120202.1132/starter-kit-ruby-pkg.el @@ -0,0 +1 @@ +(define-package "starter-kit-ruby" "20120202.1132" "Saner defaults and goodies for Ruby" (quote ((inf-ruby "2.2.3") (starter-kit "2.0.1")))) diff --git a/elpa/starter-kit-ruby-20120202.1132/starter-kit-ruby-pkg.elc b/elpa/starter-kit-ruby-20120202.1132/starter-kit-ruby-pkg.elc new file mode 100644 index 0000000000000000000000000000000000000000..d724a07c7e3e690649179d125992b8d66d4275e0 GIT binary patch literal 687 zcmbu7OHTqZ5P&)FAMiTai;%G02N(q|BH=)y7ttRuwB6l?Zo6r_8vOMRi!mZcrs<*c z_~zBc`gwIT7!0DtVgW1Lv`R|>y8|>B9_jkz1^JV;d!{W%4c5RG11!4=U0^>ARQCr^HB^Y>;~V^Wb)4{`W3YE1&(ez5|;FXpi!|iaWOxgbgBCvu@;t>r0(2v@T +;; URL: http://www.emacswiki.org/cgi-bin/wiki/StarterKit +;; Version: 20120202.1132 +;; X-Original-Version: 2.0.3 +;; Keywords: convenience +;; Package-Requires: ((inf-ruby "2.2.3") (starter-kit "2.0.1")) +;; This file is not part of GNU Emacs. + +;;; Commentary: + +;; "Emacs outshines all other editing software in approximately the +;; same way that the noonday sun does the stars. It is not just bigger +;; and brighter; it simply makes everything else vanish." +;; -Neal Stephenson, "In the Beginning was the Command Line" + +;; This file contains tweaks specific to Ruby. + +;;; License: + +;; 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 GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Code: + +;;;###autoload +(progn + (eval-after-load 'ruby-mode + '(progn + ;; work around possible elpa bug + (ignore-errors (require 'ruby-compilation)) + (setq ruby-use-encoding-map nil) + (add-hook 'ruby-mode-hook 'inf-ruby-keys) + (define-key ruby-mode-map (kbd "RET") 'reindent-then-newline-and-indent) + (define-key ruby-mode-map (kbd "C-M-h") 'backward-kill-word))) + + (define-key 'help-command (kbd "S-r") 'ri) + + ;; Rake files are ruby, too, as are gemspecs, rackup files, etc. + (add-to-list 'auto-mode-alist '("\\.rake$" . ruby-mode)) + (add-to-list 'auto-mode-alist '("\\.thor$" . ruby-mode)) + (add-to-list 'auto-mode-alist '("\\.gemspec$" . ruby-mode)) + (add-to-list 'auto-mode-alist '("\\.ru$" . ruby-mode)) + (add-to-list 'auto-mode-alist '("Rakefile$" . ruby-mode)) + (add-to-list 'auto-mode-alist '("Thorfile$" . ruby-mode)) + (add-to-list 'auto-mode-alist '("Gemfile$" . ruby-mode)) + (add-to-list 'auto-mode-alist '("Capfile$" . ruby-mode)) + (add-to-list 'auto-mode-alist '("Vagrantfile$" . ruby-mode)) + + ;; We never want to edit Rubinius bytecode or MacRuby binaries + (add-to-list 'completion-ignored-extensions ".rbc") + (add-to-list 'completion-ignored-extensions ".rbo") + +;;; Rake + + (defun pcomplete/rake () + "Completion rules for the `ssh' command." + (pcomplete-here (pcmpl-rake-tasks))) + + (defun pcmpl-rake-tasks () + "Return a list of all the rake tasks defined in the current +projects. I know this is a hack to put all the logic in the +exec-to-string command, but it works and seems fast" + (delq nil (mapcar '(lambda(line) + (if (string-match "rake \\([^ ]+\\)" line) (match-string 1 line))) + (split-string (shell-command-to-string "rake -T") "[\n]")))) + + (defun rake (task) + (interactive (list (completing-read "Rake (default: default): " + (pcmpl-rake-tasks)))) + (shell-command-to-string (concat "rake " (if (= 0 (length task)) "default" task)))) + + + ;; Clear the compilation buffer between test runs. + (eval-after-load 'ruby-compilation + '(progn + (defadvice ruby-do-run-w/compilation (before kill-buffer (name cmdlist)) + (let ((comp-buffer-name (format "*%s*" name))) + (when (get-buffer comp-buffer-name) + (with-current-buffer comp-buffer-name + (delete-region (point-min) (point-max)))))) + (ad-activate 'ruby-do-run-w/compilation))) + + ;; Rinari (Minor Mode for Ruby On Rails) + (setq rinari-major-modes + (list 'mumamo-after-change-major-mode-hook 'dired-mode-hook 'ruby-mode-hook + 'css-mode-hook 'yaml-mode-hook 'javascript-mode-hook))) + +(provide 'starter-kit-ruby) +;;; starter-kit-ruby.el ends here diff --git a/elpa/starter-kit-ruby-20120202.1132/starter-kit-ruby.elc b/elpa/starter-kit-ruby-20120202.1132/starter-kit-ruby.elc new file mode 100644 index 0000000000000000000000000000000000000000..0406d3fa79a6b06478a75a995d7a2b09efc90290 GIT binary patch literal 2824 zcmbtW-*4MC5YE#uc-XMFJ?^S>sN9vZCE4+kytE67qQD9aX}Xu#!)S@NSWBWx(s8rD zejh2@v14z0s2w2|?|8f)-+jl+*S}r;aB_0exxBojD^)eJ6gf@rsp9q}9>d=8>{q20 zQK>RslB(%FxAbZ`CpxEibTQ~(4EvPyUiNzAx-Pj(g;KOea$PGQLZv$wXEmn1*F+SBK^}DQRZM!VQy@6&fX0jFxZx23sL*ZhYQ*izICg{S7kaaF<%WNTPR*O~X zHUX2YUH^YWSL_`toT(|#7AvlEG;Ue4mC`vP+VP@5cLO9< z7%K#zyR(J1D)62;gUoWXFcXR=4zd#(Qh53lm5T@Id3WOcjz=k73%k@caq=}*GtbV> zaqp8ivBr*PTqntvS_7#awADwESrZYxrA4h)2p9~GKTZWONLEp^1dzb@ZeOY9pmQ)W zUOM8l$Q;yKYTqR21x>L*S^{bpu;VCM06;Y3#y(2kew@3x0J*ia_lWSGK;VeSecOcQ zqWt8tgDKi%T*FA{`mXEC;B9>Eb%)=aV6SJ-cEK@@)1=ma^s~(h3VhPW;G$khLI&gz-EH~Y_laSUFy8+a0$MpnI8*S=$mJD3|c968jPw2|E z>-!t$^asS6e(U@n;8*h9$=AO>S%>fR>AyV)s84~z?6R~D?><{d5(pyPbP9-33s7!w z?Qrb`= zM?ptaxyy(f93TM-eP&pz!n{U^oqz%b&wnz{19EFf0EH{CJ%w{&*V?WTn%$jF2bU(c zZn}R{b6LmH0)?2nJ6G5!iD6R78V1(C`DYyIPvtqo%}3sGyBUAS0)~Ipvf`Cmk5ycl z>bcm-Z#(dE4AHzD6n-FX2X8CRjM)+1^Qzo={mAdQ$+T?X>UM&HSMDU{_T&5KgwDF1 Fe*oSMZ(#rc literal 0 HcmV?d00001